-rw-r--r-- | korganizer/calendarview.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 9a4e719..6ed6a1c 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -1873,104 +1873,104 @@ void CalendarView::readSettings() 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 ) { 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 ) { 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 ); + QTimer::singleShot( 1, mDateNavigator, SLOT ( setResizeEnabled() ) ); } void CalendarView::writeSettings() { // kdDebug() << "CalendarView::writeSettings" << endl; KConfig *config = KOGlobals::config(); mViewManager->writeSettings( config ); mTodoList->saveLayout(config,QString("Todo Layout")); mDialogManager->writeSettings( config ); //KOPrefs::instance()->usrWriteConfig(); KOPrefs::instance()->writeConfig(); writeFilterSettings(config); config->setGroup( "Views" ); config->writeEntry( "ShownDatesCount", mNavigator->selectedDates().count() ); QValueList<int> listINT = mLeftFrame->sizes(); config->writeEntry("Left Splitter Frame",listINT); QValueList<int> listINT2 = mMainFrame->sizes(); config->writeEntry("Main Splitter Frame",listINT2); #ifdef DESKTOP_VERSION config->setGroup("WidgetLayout"); QStringList list ;//= config->readListEntry("MainLayout"); int x,y,w,h; QWidget* wid; wid = topLevelWidget(); x = wid->geometry().x(); y = wid->geometry().y(); w = wid->width(); h = wid->height(); list.clear(); list << QString::number( x ); list << QString::number( y ); list << QString::number( w ); list << QString::number( h ); config->writeEntry("MainLayout",list ); wid = mEventEditor; x = wid->geometry().x(); y = wid->geometry().y(); w = wid->width(); h = wid->height(); list.clear(); list << QString::number( x ); |