summaryrefslogtreecommitdiffabout
path: root/korganizer/koviewmanager.cpp
authorzautrix <zautrix>2005-02-01 12:06:53 (UTC)
committer zautrix <zautrix>2005-02-01 12:06:53 (UTC)
commitd1aa72f683fb264cca6936a8119d0abe9b310325 (patch) (unidiff)
treee9099e8a366ba9890139f6ecce5ad686d3c06d93 /korganizer/koviewmanager.cpp
parent00b559c52051c05d6df41724b207a038c0e548bf (diff)
downloadkdepimpi-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.cpp41
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)
98 } 98 }
99} 99}
100 100
101
102void KOViewManager::showDateView( int view, QDate date) 101void KOViewManager::showDateView( int view, QDate date)
103{ 102{
104 103 static int lastMode = 0;
104 static int lastCount = 0;
105 static bool lastNDMode = false;
106 static QDate lastDate;
105 //qDebug("date %d %s", view, date.toString().latin1()); 107 //qDebug("date %d %s", view, date.toString().latin1());
106#if 0 108
107 mNewItemPopup->insertItem ( SmallIcon( pathString +"day" ), i18n("Day view"),3 ); 109 //qDebug("%d %d ", lastNDMode, mFlagShowNextxDays );
108 mNewItemPopup->insertItem ( SmallIcon( pathString +"week" ), i18n("Next Week"),4 ); 110 bool savemFlagShowNextxDays = mFlagShowNextxDays;
109 mNewItemPopup->insertItem ( SmallIcon( pathString +"month" ), i18n("Next Two Weeks"),5 ); 111 mFlagShowNextxDays = false;
110 mNewItemPopup->insertItem ( SmallIcon( pathString +"month" ), i18n("Next Month"),6 );
111 mNewItemPopup->insertItem ( SmallIcon( pathString +"journal" ), i18n("Journal view"),7 );
112#endif
113 if ( view == 3 ) { 112 if ( view == 3 ) {
114 //mCurrentAgendaView = 1 ; 113 //mCurrentAgendaView = 1 ;
114 lastDate = mMainView->dateNavigator()->selectedDates().first();
115 lastCount = mMainView->dateNavigator()->selectedDates().count();
116 lastNDMode = savemFlagShowNextxDays;
115 mMainView->showDay( date ); 117 mMainView->showDay( date );
116 } else if (view == 4 ) { 118 } else if (view == 4 ) {
117 mCurrentAgendaView = 7 ; 119 mCurrentAgendaView = 7 ;
@@ -138,19 +140,20 @@ void KOViewManager::showDateView( int view, QDate date)
138 KOPrefs::instance()->mNextXDays ); 140 KOPrefs::instance()->mNextXDays );
139 mFlagShowNextxDays = true; 141 mFlagShowNextxDays = true;
140 mCurrentAgendaView = 3 ; 142 mCurrentAgendaView = 3 ;
141 } if (view == 9) { 143 } if (view == 9) { // return behaviour, for getting back from mode == 3 (single day mode )
142 showWeekView(); 144 if ( lastMode ) {
145 mCurrentAgendaView = lastCount ;
146 mMainView->dateNavigator()->selectDates( lastDate, lastCount);
147 mFlagShowNextxDays = lastNDMode;
148 if ( mFlagShowNextxDays ) {
149 mCurrentAgendaView = 3 ;
150 }
151 } else
152 showWeekView();
143 } else if (view == 10) { 153 } else if (view == 10) {
144 mMainView->dateNavigator()->selectDates( date,mMainView->dateNavigator()->selectedDates().count() ); 154 mMainView->dateNavigator()->selectDates( date,mMainView->dateNavigator()->selectedDates().count() );
145 } 155 }
146 156 lastMode = view;
147#if 0
148 dateNavigator()->blockSignals( true );
149 dateNavigator()->selectDate( d );
150 dateNavigator()->blockSignals( false );
151 mViewManager->showDayView();
152#endif
153
154} 157}
155 158
156 159