-rw-r--r-- | korganizer/calendarview.cpp | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 8100e25..9a4e719 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -1852,104 +1852,88 @@ void CalendarView::readSettings() 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; } } - if ( !resetval ){// i.e. sizes.count() == 3 - if ( KOPrefs::instance()->mVerticalScreen ) { - if ( sizes[0] < mDateNavigator->sizeHint().width()+1 ) - resetval = mDateNavigator->sizeHint().width()+2; - } else { - if ( sizes[0] < mDateNavigator->sizeHint().height()+1 ) - resetval = mDateNavigator->sizeHint().height()+2; - } - } if ( resetval ) { sizes.clear(); if ( KOPrefs::instance()->mVerticalScreen ) { maxVal = QApplication::desktop()->width() -10; } else { maxVal = QApplication::desktop()->height()-10; } sizes << resetval; if ( maxVal < resetval + resetval) resetval = maxVal - resetval; sizes << resetval; sizes << 100; } mLeftFrame->setSizes(sizes); sizes = config->readIntListEntry("Main Splitter Frame"); + resetval = 0; + maxVal = 0; if (sizes.count() != 2) { if ( !KOPrefs::instance()->mVerticalScreen ) { resetval = mDateNavigator->sizeHint().width()+2; } else { resetval = mDateNavigator->sizeHint().height()+2; } } - if ( !resetval ){// i.e. sizes.count() == 3 - if ( !KOPrefs::instance()->mVerticalScreen ) { - if ( sizes[0] < mDateNavigator->sizeHint().width()+1 ) - resetval = mDateNavigator->sizeHint().width()+2; - } else { - if ( sizes[0] < mDateNavigator->sizeHint().height()+1 ) - resetval = mDateNavigator->sizeHint().height()+2; - } - } if ( resetval ) { sizes.clear(); if ( !KOPrefs::instance()->mVerticalScreen ) { maxVal = QApplication::desktop()->width() -10; } else { maxVal = QApplication::desktop()->height()-10; } sizes << resetval; if ( maxVal < resetval + resetval) 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 ); } void CalendarView::writeSettings() { // kdDebug() << "CalendarView::writeSettings" << endl; KConfig *config = KOGlobals::config(); mViewManager->writeSettings( config ); mTodoList->saveLayout(config,QString("Todo Layout")); |