summaryrefslogtreecommitdiffabout
path: root/korganizer/koviewmanager.cpp
Unidiff
Diffstat (limited to 'korganizer/koviewmanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koviewmanager.cpp33
1 files changed, 17 insertions, 16 deletions
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index b5de4a1..e80b3fc 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -181,106 +181,107 @@ void KOViewManager::writeSettings(KConfig *config)
181 else if (mCurrentView == mJournalView) view = "Journal"; 181 else if (mCurrentView == mJournalView) view = "Journal";
182 else if (mCurrentView == mTimeSpanView) view = "TimeSpan"; 182 else if (mCurrentView == mTimeSpanView) view = "TimeSpan";
183 else if (mCurrentView == mTodoView) view = "Todo"; 183 else if (mCurrentView == mTodoView) view = "Todo";
184 else view = "Agenda"; 184 else view = "Agenda";
185 185
186 config->writeEntry("Current View",view); 186 config->writeEntry("Current View",view);
187 187
188 if (mAgendaView) { 188 if (mAgendaView) {
189 mAgendaView->writeSettings(config); 189 mAgendaView->writeSettings(config);
190 } 190 }
191 if (mTimeSpanView) { 191 if (mTimeSpanView) {
192 mTimeSpanView->writeSettings(config); 192 mTimeSpanView->writeSettings(config);
193 } 193 }
194 if (mListView) { 194 if (mListView) {
195 mListView->writeSettings(config); 195 mListView->writeSettings(config);
196 } 196 }
197 if (mTodoView) { 197 if (mTodoView) {
198 mTodoView->saveLayout(config,"Todo View"); 198 mTodoView->saveLayout(config,"Todo View");
199 } 199 }
200} 200}
201void KOViewManager::showNextView() 201void KOViewManager::showNextView()
202{ 202{
203 if (mCurrentView == mWhatsNextView) goto NEXT_X; 203 if (mCurrentView == mWhatsNextView) goto NEXT_X;
204 204
205 if (mCurrentView == mAgendaView && mFlagShowNextxDays) goto LIST; 205 if (mCurrentView == mAgendaView && mFlagShowNextxDays) goto JOURNAL;
206 206
207 if (mCurrentView == mListView ) goto DAY_1; 207 if (mCurrentView == mJournalView ) goto DAY_1;
208 208
209 if (mCurrentView == mAgendaView && mCurrentAgendaView == 1 ) goto DAY_5; 209 if (mCurrentView == mAgendaView && mCurrentAgendaView == 1 ) goto DAY_5;
210 210
211 if (mCurrentView == mAgendaView && mCurrentAgendaView == 5 ) goto DAY_7; 211 if (mCurrentView == mAgendaView && mCurrentAgendaView == 5 ) goto DAY_7;
212 212
213 if (mCurrentView == mAgendaView ) goto DAY_6; 213 if (mCurrentView == mAgendaView ) goto DAY_6;
214 214
215 if (mCurrentView == mMonthView && KOPrefs::instance()->mMonthViewWeek) goto MONTH; 215 if (mCurrentView == mMonthView && KOPrefs::instance()->mMonthViewWeek) goto MONTH;
216 216
217 if (mCurrentView == mMonthView ) goto TODO; 217 if (mCurrentView == mMonthView ) goto LIST;
218
219 if (mCurrentView == mListView ) goto TODO;
220
221 // if (mCurrentView == mTodoView ) goto LIST;
218 222
219 if (mCurrentView == mTodoView ) goto JOURNAL;
220 223
221 NEXT: 224 NEXT:
222 if ( KOPrefs::instance()->mShowIconNext ) { showWhatsNextView();return ;} 225 if ( KOPrefs::instance()->mShowIconNext ) { showWhatsNextView();return ;}
223 NEXT_X: 226 NEXT_X:
224 if ( KOPrefs::instance()->mShowIconNextDays ) { showNextXView() ;return ;} 227 if ( KOPrefs::instance()->mShowIconNextDays ) { showNextXView() ;return ;}
225 LIST: 228 JOURNAL:
226 if ( KOPrefs::instance()->mShowIconList ) { showListView() ;return ;} 229 if ( KOPrefs::instance()->mShowIconJournal ) { showJournalView() ;return ;}
227 DAY_1: 230 DAY_1:
228 if ( KOPrefs::instance()->mShowIconDay1 ) { showDayView() ;return ;} 231 if ( KOPrefs::instance()->mShowIconDay1 ) { showDayView() ;return ;}
229 DAY_5: 232 DAY_5:
230 if ( KOPrefs::instance()->mShowIconDay5 ) { showWorkWeekView() ;return ;} 233 if ( KOPrefs::instance()->mShowIconDay5 ) { showWorkWeekView() ;return ;}
231 DAY_7: 234 DAY_7:
232 if ( KOPrefs::instance()->mShowIconDay7 ) { showWeekView();return ;} 235 if ( KOPrefs::instance()->mShowIconDay7 ) { showWeekView();return ;}
233 DAY_6: 236 DAY_6:
234 if ( KOPrefs::instance()->mShowIconDay6 ) { showMonthViewWeek();return ;} 237 if ( KOPrefs::instance()->mShowIconDay6 ) { showMonthViewWeek();return ;}
235 MONTH: 238 MONTH:
236 if ( KOPrefs::instance()->mShowIconMonth ) { showMonthView();return ;} 239 if ( KOPrefs::instance()->mShowIconMonth ) { showMonthView();return ;}
240 LIST:
241 if ( KOPrefs::instance()->mShowIconList ) { showListView() ;return ;}
237 TODO: 242 TODO:
238 if ( KOPrefs::instance()->mShowIconTodoview ) { showTodoView() ;return ;} 243 if ( KOPrefs::instance()->mShowIconTodoview ) { showTodoView() ;return ;}
239 JOURNAL:
240 if ( KOPrefs::instance()->mShowIconJournal ) { showJournalView() ;return ;}
241
242
243 244
244 if ( KOPrefs::instance()->mShowIconNext ) { showWhatsNextView();return ;} 245 if ( KOPrefs::instance()->mShowIconNext ) { showWhatsNextView();return ;}
245 246
246 if ( KOPrefs::instance()->mShowIconNextDays ) { showNextXView() ;return ;} 247 if ( KOPrefs::instance()->mShowIconNextDays ) { showNextXView() ;return ;}
247
248 if ( KOPrefs::instance()->mShowIconList ) { showListView() ;return ;}
249 248
250 if ( KOPrefs::instance()->mShowIconDay1 ) { showDayView() ;return ;} 249 if ( KOPrefs::instance()->mShowIconJournal ) { showJournalView() ;return ;}
251 250
251 if ( KOPrefs::instance()->mShowIconDay1 ) { showDayView() ;return ;}
252
252 if ( KOPrefs::instance()->mShowIconDay5 ) { showWorkWeekView() ;return ;} 253 if ( KOPrefs::instance()->mShowIconDay5 ) { showWorkWeekView() ;return ;}
253 254
254 if ( KOPrefs::instance()->mShowIconDay7 ) { showWeekView();return ;} 255 if ( KOPrefs::instance()->mShowIconDay7 ) { showWeekView();return ;}
255 256
256 if ( KOPrefs::instance()->mShowIconDay6 ) { showMonthViewWeek();return ;} 257 if ( KOPrefs::instance()->mShowIconDay6 ) { showMonthViewWeek();return ;}
257 258
258 if ( KOPrefs::instance()->mShowIconMonth ) { showMonthView();return ;} 259 if ( KOPrefs::instance()->mShowIconMonth ) { showMonthView();return ;}
259 260
260 if ( KOPrefs::instance()->mShowIconTodoview ) { showTodoView() ;return ;} 261 if ( KOPrefs::instance()->mShowIconList ) { showListView() ;return ;}
261 262
262 if ( KOPrefs::instance()->mShowIconJournal ) { showJournalView() ;return ;} 263 if ( KOPrefs::instance()->mShowIconTodoview ) { showTodoView() ;return ;}
263 264
264 265
265 266
266} 267}
267void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen ) 268void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen )
268{ 269{
269 270
270 //mFlagShowNextxDays = false; 271 //mFlagShowNextxDays = false;
271 //if(view == mCurrentView) return; 272 //if(view == mCurrentView) return;
272 if ( view == 0 ) { 273 if ( view == 0 ) {
273 view = mCurrentView; 274 view = mCurrentView;
274 if ( view == 0 ) 275 if ( view == 0 )
275 return; 276 return;
276 } 277 }
277 bool callupdate = !(view == mCurrentView); 278 bool callupdate = !(view == mCurrentView);
278 bool full = fullScreen; 279 bool full = fullScreen;
279 if(view == mCurrentView && view != mWhatsNextView ) { 280 if(view == mCurrentView && view != mWhatsNextView ) {
280 if ( mCurrentAgendaView < 0 ) 281 if ( mCurrentAgendaView < 0 )
281 return; 282 return;
282 if ( view != mMonthView ) 283 if ( view != mMonthView )
283 full = mMainView->leftFrame()->isVisible(); 284 full = mMainView->leftFrame()->isVisible();
284 } else { 285 } else {
285 if ( view == mMonthView && mMonthView) 286 if ( view == mMonthView && mMonthView)
286 ;//mMonthView->skipResize = true ; 287 ;//mMonthView->skipResize = true ;