-rw-r--r-- | korganizer/calendarview.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 1e83236..beb19d9 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -1818,78 +1818,82 @@ void CalendarView::readSettings() | |||
1818 | } | 1818 | } |
1819 | mPanner->setSizes(sizes); | 1819 | mPanner->setSizes(sizes); |
1820 | 1820 | ||
1821 | sizes = config->readIntListEntry("Separator2"); | 1821 | sizes = config->readIntListEntry("Separator2"); |
1822 | if ( ( mResourceView && sizes.count() == 4 ) || | 1822 | if ( ( mResourceView && sizes.count() == 4 ) || |
1823 | ( !mResourceView && sizes.count() == 3 ) ) { | 1823 | ( !mResourceView && sizes.count() == 3 ) ) { |
1824 | mLeftSplitter->setSizes(sizes); | 1824 | mLeftSplitter->setSizes(sizes); |
1825 | } | 1825 | } |
1826 | #endif | 1826 | #endif |
1827 | globalFlagBlockAgenda = 1; | 1827 | globalFlagBlockAgenda = 1; |
1828 | mViewManager->showAgendaView(); | 1828 | mViewManager->showAgendaView(); |
1829 | //mViewManager->readSettings( config ); | 1829 | //mViewManager->readSettings( config ); |
1830 | mTodoList->restoreLayout(config,QString("Todo Layout")); | 1830 | mTodoList->restoreLayout(config,QString("Todo Layout")); |
1831 | readFilterSettings(config); | 1831 | readFilterSettings(config); |
1832 | 1832 | ||
1833 | #ifdef DESKTOP_VERSION | 1833 | #ifdef DESKTOP_VERSION |
1834 | config->setGroup("WidgetLayout"); | 1834 | config->setGroup("WidgetLayout"); |
1835 | QStringList list; | 1835 | QStringList list; |
1836 | list = config->readListEntry("MainLayout"); | 1836 | list = config->readListEntry("MainLayout"); |
1837 | int x,y,w,h; | 1837 | int x,y,w,h; |
1838 | if ( ! list.isEmpty() ) { | 1838 | if ( ! list.isEmpty() ) { |
1839 | x = list[0].toInt(); | 1839 | x = list[0].toInt(); |
1840 | y = list[1].toInt(); | 1840 | y = list[1].toInt(); |
1841 | w = list[2].toInt(); | 1841 | w = list[2].toInt(); |
1842 | h = list[3].toInt(); | 1842 | h = list[3].toInt(); |
1843 | KApplication::testCoords( &x,&y,&w,&h ); | ||
1843 | topLevelWidget()->setGeometry(x,y,w,h); | 1844 | topLevelWidget()->setGeometry(x,y,w,h); |
1844 | 1845 | ||
1845 | } else { | 1846 | } else { |
1846 | topLevelWidget()->setGeometry( 40 ,40 , 640, 440); | 1847 | topLevelWidget()->setGeometry( 40 ,40 , 640, 440); |
1847 | } | 1848 | } |
1848 | list = config->readListEntry("EditEventLayout"); | 1849 | list = config->readListEntry("EditEventLayout"); |
1849 | if ( ! list.isEmpty() ) { | 1850 | if ( ! list.isEmpty() ) { |
1850 | x = list[0].toInt(); | 1851 | x = list[0].toInt(); |
1851 | y = list[1].toInt(); | 1852 | y = list[1].toInt(); |
1852 | w = list[2].toInt(); | 1853 | w = list[2].toInt(); |
1853 | h = list[3].toInt(); | 1854 | h = list[3].toInt(); |
1855 | KApplication::testCoords( &x,&y,&w,&h ); | ||
1854 | mEventEditor->setGeometry(x,y,w,h); | 1856 | mEventEditor->setGeometry(x,y,w,h); |
1855 | 1857 | ||
1856 | } | 1858 | } |
1857 | list = config->readListEntry("EditTodoLayout"); | 1859 | list = config->readListEntry("EditTodoLayout"); |
1858 | if ( ! list.isEmpty() ) { | 1860 | if ( ! list.isEmpty() ) { |
1859 | x = list[0].toInt(); | 1861 | x = list[0].toInt(); |
1860 | y = list[1].toInt(); | 1862 | y = list[1].toInt(); |
1861 | w = list[2].toInt(); | 1863 | w = list[2].toInt(); |
1862 | h = list[3].toInt(); | 1864 | h = list[3].toInt(); |
1865 | KApplication::testCoords( &x,&y,&w,&h ); | ||
1863 | mTodoEditor->setGeometry(x,y,w,h); | 1866 | mTodoEditor->setGeometry(x,y,w,h); |
1864 | 1867 | ||
1865 | } | 1868 | } |
1866 | list = config->readListEntry("ViewerLayout"); | 1869 | list = config->readListEntry("ViewerLayout"); |
1867 | if ( ! list.isEmpty() ) { | 1870 | if ( ! list.isEmpty() ) { |
1868 | x = list[0].toInt(); | 1871 | x = list[0].toInt(); |
1869 | y = list[1].toInt(); | 1872 | y = list[1].toInt(); |
1870 | w = list[2].toInt(); | 1873 | w = list[2].toInt(); |
1871 | h = list[3].toInt(); | 1874 | h = list[3].toInt(); |
1875 | KApplication::testCoords( &x,&y,&w,&h ); | ||
1872 | getEventViewerDialog()->setGeometry(x,y,w,h); | 1876 | getEventViewerDialog()->setGeometry(x,y,w,h); |
1873 | } | 1877 | } |
1874 | #endif | 1878 | #endif |
1875 | config->setGroup( "Views" ); | 1879 | config->setGroup( "Views" ); |
1876 | int dateCount = config->readNumEntry( "ShownDatesCount", 7 ); | 1880 | int dateCount = config->readNumEntry( "ShownDatesCount", 7 ); |
1877 | 1881 | ||
1878 | QValueList<int> sizes = config->readIntListEntry("Left Splitter Frame"); | 1882 | QValueList<int> sizes = config->readIntListEntry("Left Splitter Frame"); |
1879 | 1883 | ||
1880 | int resetval = 0; | 1884 | int resetval = 0; |
1881 | int maxVal = 0; | 1885 | int maxVal = 0; |
1882 | if (sizes.count() != 3) { | 1886 | if (sizes.count() != 3) { |
1883 | if ( KOPrefs::instance()->mVerticalScreen ) { | 1887 | if ( KOPrefs::instance()->mVerticalScreen ) { |
1884 | resetval = mDateNavigator->sizeHint().width()+2; | 1888 | resetval = mDateNavigator->sizeHint().width()+2; |
1885 | } else { | 1889 | } else { |
1886 | resetval = mDateNavigator->sizeHint().height()+2; | 1890 | resetval = mDateNavigator->sizeHint().height()+2; |
1887 | } | 1891 | } |
1888 | } | 1892 | } |
1889 | if ( resetval ) { | 1893 | if ( resetval ) { |
1890 | sizes.clear(); | 1894 | sizes.clear(); |
1891 | if ( KOPrefs::instance()->mVerticalScreen ) { | 1895 | if ( KOPrefs::instance()->mVerticalScreen ) { |
1892 | maxVal = QApplication::desktop()->width() -10; | 1896 | maxVal = QApplication::desktop()->width() -10; |
1893 | } else { | 1897 | } else { |
1894 | maxVal = QApplication::desktop()->height()-10; | 1898 | maxVal = QApplication::desktop()->height()-10; |
1895 | } | 1899 | } |