summaryrefslogtreecommitdiffabout
path: root/korganizer/koviewmanager.cpp
Unidiff
Diffstat (limited to 'korganizer/koviewmanager.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koviewmanager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index c35de0a..62d3e7f 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -179,73 +179,73 @@ void KOViewManager::writeSettings(KConfig *config)
179 if (mListView) { 179 if (mListView) {
180 mListView->writeSettings(config); 180 mListView->writeSettings(config);
181 } 181 }
182 if (mTodoView) { 182 if (mTodoView) {
183 mTodoView->saveLayout(config,"Todo View"); 183 mTodoView->saveLayout(config,"Todo View");
184 } 184 }
185} 185}
186 186
187void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen ) 187void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen )
188{ 188{
189 189
190 //mFlagShowNextxDays = false; 190 //mFlagShowNextxDays = false;
191 //if(view == mCurrentView) return; 191 //if(view == mCurrentView) return;
192 if ( view == 0 ) { 192 if ( view == 0 ) {
193 view = mCurrentView; 193 view = mCurrentView;
194 if ( view == 0 ) 194 if ( view == 0 )
195 return; 195 return;
196 } 196 }
197 bool full = fullScreen; 197 bool full = fullScreen;
198 if(view == mCurrentView && view != mWhatsNextView ) { 198 if(view == mCurrentView && view != mWhatsNextView ) {
199 if ( mCurrentAgendaView < 0 ) 199 if ( mCurrentAgendaView < 0 )
200 return; 200 return;
201 full = mMainView->leftFrame()->isVisible(); 201 full = mMainView->leftFrame()->isVisible();
202 } else { 202 } else {
203 if ( view == mMonthView && mMonthView)
204 mMonthView->setIgnoreResizeEvent( 1 );
203 mCurrentView = view; 205 mCurrentView = view;
204 // bool full = fullScreen; 206 // bool full = fullScreen;
205 bool isFull = !mMainView->leftFrame()->isVisible(); 207 bool isFull = !mMainView->leftFrame()->isVisible();
206 if ( isFull && KOPrefs::instance()->mViewChangeHoldFullscreen ) 208 if ( isFull && KOPrefs::instance()->mViewChangeHoldFullscreen )
207 full = true; 209 full = true;
208 if ( !isFull && KOPrefs::instance()->mViewChangeHoldNonFullscreen ) 210 if ( !isFull && KOPrefs::instance()->mViewChangeHoldNonFullscreen )
209 full = false; 211 full = false;
210 } 212 }
211 if ( mAgendaView ) mAgendaView->deleteSelectedDateTime(); 213 if ( mAgendaView ) mAgendaView->deleteSelectedDateTime();
212 //raiseCurrentView( full ); 214 //raiseCurrentView( full );
213 mMainView->processIncidenceSelection( 0 ); 215 mMainView->processIncidenceSelection( 0 );
214 //mMainView->updateView(); 216 //mMainView->updateView();
215 raiseCurrentView( full, true ); 217 raiseCurrentView( full, true );
216 mMainView->adaptNavigationUnits(); 218 mMainView->adaptNavigationUnits();
217} 219}
218 220
219void KOViewManager::raiseCurrentView( bool fullScreen, bool callUpdateView ) 221void KOViewManager::raiseCurrentView( bool fullScreen, bool callUpdateView )
220{ 222{
221 mCurrentAgendaView = 0; 223 mCurrentAgendaView = 0;
222 int wid = mMainView->width() ; 224 int wid = mMainView->width() ;
223 int hei = mMainView->height(); 225 int hei = mMainView->height();
224 if ( mCurrentView == mMonthView ) { 226 if ( mCurrentView == mMonthView ) {
225 if ( true /* !KOPrefs::instance()->mMonthViewWeek*/ ) { 227 if ( true /* !KOPrefs::instance()->mMonthViewWeek*/ ) {
226
227 mMonthView->setIgnoreResizeEvent( 2 ,mMainView->navigatorBar()->height());
228 mMainView->navigatorBar()->show(); 228 mMainView->navigatorBar()->show();
229 hei -= mMainView->navigatorBar()->sizeHint().height(); 229 hei -= mMainView->navigatorBar()->sizeHint().height();
230 } 230 }
231 //mMainView->navigatorBar()->hide(); 231 //mMainView->navigatorBar()->hide();
232 } else { 232 } else {
233 mMainView->navigatorBar()->hide(); 233 mMainView->navigatorBar()->hide();
234 } 234 }
235 if ( fullScreen ) { 235 if ( fullScreen ) {
236 mMainView->leftFrame()->hide(); 236 mMainView->leftFrame()->hide();
237 } else { 237 } else {
238 mMainView->leftFrame()->show(); 238 mMainView->leftFrame()->show();
239 if ( KOPrefs::instance()->mVerticalScreen ) 239 if ( KOPrefs::instance()->mVerticalScreen )
240 hei -= mMainView->leftFrame()->height(); 240 hei -= mMainView->leftFrame()->height();
241 else 241 else
242 wid -= mMainView->leftFrame()->width(); 242 wid -= mMainView->leftFrame()->width();
243 } 243 }
244 emit signalFullScreen( !fullScreen ); 244 emit signalFullScreen( !fullScreen );
245 if ( callUpdateView ) 245 if ( callUpdateView )
246 mMainView->updateView(); 246 mMainView->updateView();
247 247
248 if ( globalFlagBlockAgenda == 5 ) { 248 if ( globalFlagBlockAgenda == 5 ) {
249 globalFlagBlockAgenda = 4; 249 globalFlagBlockAgenda = 4;
250 globalFlagBlockAgendaItemPaint = 1; 250 globalFlagBlockAgendaItemPaint = 1;
251 } 251 }