author | zautrix <zautrix> | 2005-02-01 12:06:53 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-01 12:06:53 (UTC) |
commit | d1aa72f683fb264cca6936a8119d0abe9b310325 (patch) (side-by-side diff) | |
tree | e9099e8a366ba9890139f6ecce5ad686d3c06d93 /korganizer/koviewmanager.cpp | |
parent | 00b559c52051c05d6df41724b207a038c0e548bf (diff) | |
download | kdepimpi-d1aa72f683fb264cca6936a8119d0abe9b310325.zip kdepimpi-d1aa72f683fb264cca6936a8119d0abe9b310325.tar.gz kdepimpi-d1aa72f683fb264cca6936a8119d0abe9b310325.tar.bz2 |
fixes
Diffstat (limited to 'korganizer/koviewmanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/koviewmanager.cpp | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index 188ad23..7e126d9 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp @@ -98,20 +98,22 @@ void KOViewManager::readSettings(KConfig *config) } } - void KOViewManager::showDateView( int view, QDate date) { - + static int lastMode = 0; + static int lastCount = 0; + static bool lastNDMode = false; + static QDate lastDate; //qDebug("date %d %s", view, date.toString().latin1()); -#if 0 - mNewItemPopup->insertItem ( SmallIcon( pathString +"day" ), i18n("Day view"),3 ); - mNewItemPopup->insertItem ( SmallIcon( pathString +"week" ), i18n("Next Week"),4 ); - mNewItemPopup->insertItem ( SmallIcon( pathString +"month" ), i18n("Next Two Weeks"),5 ); - mNewItemPopup->insertItem ( SmallIcon( pathString +"month" ), i18n("Next Month"),6 ); - mNewItemPopup->insertItem ( SmallIcon( pathString +"journal" ), i18n("Journal view"),7 ); -#endif + + //qDebug("%d %d ", lastNDMode, mFlagShowNextxDays ); + bool savemFlagShowNextxDays = mFlagShowNextxDays; + mFlagShowNextxDays = false; if ( view == 3 ) { //mCurrentAgendaView = 1 ; + lastDate = mMainView->dateNavigator()->selectedDates().first(); + lastCount = mMainView->dateNavigator()->selectedDates().count(); + lastNDMode = savemFlagShowNextxDays; mMainView->showDay( date ); } else if (view == 4 ) { mCurrentAgendaView = 7 ; @@ -138,19 +140,20 @@ void KOViewManager::showDateView( int view, QDate date) KOPrefs::instance()->mNextXDays ); mFlagShowNextxDays = true; mCurrentAgendaView = 3 ; - } if (view == 9) { - showWeekView(); + } if (view == 9) { // return behaviour, for getting back from mode == 3 (single day mode ) + if ( lastMode ) { + mCurrentAgendaView = lastCount ; + mMainView->dateNavigator()->selectDates( lastDate, lastCount); + mFlagShowNextxDays = lastNDMode; + if ( mFlagShowNextxDays ) { + mCurrentAgendaView = 3 ; + } + } else + showWeekView(); } else if (view == 10) { mMainView->dateNavigator()->selectDates( date,mMainView->dateNavigator()->selectedDates().count() ); } - -#if 0 - dateNavigator()->blockSignals( true ); - dateNavigator()->selectDate( d ); - dateNavigator()->blockSignals( false ); - mViewManager->showDayView(); -#endif - + lastMode = view; } |