author | zautrix <zautrix> | 2005-03-21 14:46:33 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-21 14:46:33 (UTC) |
commit | 86c420a68008e4430bd769ebdecdfa430ba552f5 (patch) (side-by-side diff) | |
tree | 76a1e6485169f5601c82754dc9d8971702b5c1b1 | |
parent | 6e5a0c6cff04fff115e63b62537c5274dc7a5564 (diff) | |
download | kdepimpi-86c420a68008e4430bd769ebdecdfa430ba552f5.zip kdepimpi-86c420a68008e4430bd769ebdecdfa430ba552f5.tar.gz kdepimpi-86c420a68008e4430bd769ebdecdfa430ba552f5.tar.bz2 |
init fix
-rw-r--r-- | korganizer/calendarview.cpp | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 96ced08..90b36ac 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -1814,24 +1814,67 @@ void CalendarView::readSettings() sizes = config->readIntListEntry("Separator2"); if ( ( mResourceView && sizes.count() == 4 ) || ( !mResourceView && sizes.count() == 3 ) ) { mLeftSplitter->setSizes(sizes); } #endif globalFlagBlockAgenda = 1; mViewManager->showAgendaView(); //mViewManager->readSettings( config ); mTodoList->restoreLayout(config,QString("Todo Layout")); readFilterSettings(config); + +#ifdef DESKTOP_VERSION + config->setGroup("WidgetLayout"); + QStringList list; + list = config->readListEntry("MainLayout"); + int x,y,w,h; + if ( ! list.isEmpty() ) { + x = list[0].toInt(); + y = list[1].toInt(); + w = list[2].toInt(); + h = list[3].toInt(); + topLevelWidget()->setGeometry(x,y,w,h); + + } else { + topLevelWidget()->setGeometry( 40 ,40 , 640, 440); + } + list = config->readListEntry("EditEventLayout"); + if ( ! list.isEmpty() ) { + x = list[0].toInt(); + y = list[1].toInt(); + w = list[2].toInt(); + h = list[3].toInt(); + mEventEditor->setGeometry(x,y,w,h); + + } + list = config->readListEntry("EditTodoLayout"); + if ( ! list.isEmpty() ) { + x = list[0].toInt(); + y = list[1].toInt(); + w = list[2].toInt(); + h = list[3].toInt(); + mTodoEditor->setGeometry(x,y,w,h); + + } + list = config->readListEntry("ViewerLayout"); + if ( ! list.isEmpty() ) { + x = list[0].toInt(); + y = list[1].toInt(); + w = list[2].toInt(); + h = list[3].toInt(); + getEventViewerDialog()->setGeometry(x,y,w,h); + } +#endif config->setGroup( "Views" ); int dateCount = config->readNumEntry( "ShownDatesCount", 7 ); QValueList<int> sizes = config->readIntListEntry("Left Splitter Frame"); int resetval = 0; int maxVal = 0; if (sizes.count() != 3) { if ( KOPrefs::instance()->mVerticalScreen ) { resetval = mDateNavigator->sizeHint().width()+2; } else { resetval = mDateNavigator->sizeHint().height()+2; @@ -1889,67 +1932,24 @@ void CalendarView::readSettings() resetval = maxVal - resetval; sizes << resetval; } mMainFrame->setSizes(sizes); if ( dateCount == 5 ) mNavigator->selectWorkWeek(); else if ( dateCount == 7 ) mNavigator->selectWeek(); else mNavigator->selectDates( dateCount ); // mViewManager->readSettings( config ); updateConfig(); globalFlagBlockAgenda = 2; mViewManager->readSettings( config ); -#ifdef DESKTOP_VERSION - config->setGroup("WidgetLayout"); - QStringList list; - list = config->readListEntry("MainLayout"); - int x,y,w,h; - if ( ! list.isEmpty() ) { - x = list[0].toInt(); - y = list[1].toInt(); - w = list[2].toInt(); - h = list[3].toInt(); - topLevelWidget()->setGeometry(x,y,w,h); - - } else { - topLevelWidget()->setGeometry( 40 ,40 , 640, 440); - } - list = config->readListEntry("EditEventLayout"); - if ( ! list.isEmpty() ) { - x = list[0].toInt(); - y = list[1].toInt(); - w = list[2].toInt(); - h = list[3].toInt(); - mEventEditor->setGeometry(x,y,w,h); - - } - list = config->readListEntry("EditTodoLayout"); - if ( ! list.isEmpty() ) { - x = list[0].toInt(); - y = list[1].toInt(); - w = list[2].toInt(); - h = list[3].toInt(); - mTodoEditor->setGeometry(x,y,w,h); - - } - list = config->readListEntry("ViewerLayout"); - if ( ! list.isEmpty() ) { - x = list[0].toInt(); - y = list[1].toInt(); - w = list[2].toInt(); - h = list[3].toInt(); - getEventViewerDialog()->setGeometry(x,y,w,h); - } -#endif - } void CalendarView::writeSettings() { // kdDebug() << "CalendarView::writeSettings" << endl; KConfig *config = KOGlobals::config(); mViewManager->writeSettings( config ); mTodoList->saveLayout(config,QString("Todo Layout")); mDialogManager->writeSettings( config ); |