summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp5
-rw-r--r--korganizer/mainwindow.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index aa30b52..3bc6081 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -71,6 +71,7 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
71 setFont( QFont("Arial"), 14 ); 71 setFont( QFont("Arial"), 14 );
72#endif 72#endif
73 73
74 mClosed = false;
74 //QString confFile = KStandardDirs::appDir() + "config/korganizerrc"; 75 //QString confFile = KStandardDirs::appDir() + "config/korganizerrc";
75 QString confFile = locateLocal("config","korganizerrc"); 76 QString confFile = locateLocal("config","korganizerrc");
76 QFileInfo finf ( confFile ); 77 QFileInfo finf ( confFile );
@@ -221,9 +222,11 @@ void MainWindow::showMaximized ()
221{ 222{
222#ifndef DESKTOP_VERSION 223#ifndef DESKTOP_VERSION
223 if ( ! globalFlagBlockStartup ) 224 if ( ! globalFlagBlockStartup )
225 if ( mClosed )
224 mView->goToday(); 226 mView->goToday();
225#endif 227#endif
226 QWidget::showMaximized () ; 228 QWidget::showMaximized () ;
229 mClosed = false;
227} 230}
228void MainWindow::closeEvent( QCloseEvent* ce ) 231void MainWindow::closeEvent( QCloseEvent* ce )
229{ 232{
@@ -232,6 +235,7 @@ void MainWindow::closeEvent( QCloseEvent* ce )
232 235
233 if ( ! KOPrefs::instance()->mAskForQuit ) { 236 if ( ! KOPrefs::instance()->mAskForQuit ) {
234 saveOnClose(); 237 saveOnClose();
238 mClosed = true;
235 ce->accept(); 239 ce->accept();
236 return; 240 return;
237 241
@@ -243,6 +247,7 @@ void MainWindow::closeEvent( QCloseEvent* ce )
243 0, 0 ) ) { 247 0, 0 ) ) {
244 case 0: 248 case 0:
245 saveOnClose(); 249 saveOnClose();
250 mClosed = true;
246 ce->accept(); 251 ce->accept();
247 break; 252 break;
248 case 1: 253 case 1:
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h
index 3e854cb..47a7a90 100644
--- a/korganizer/mainwindow.h
+++ b/korganizer/mainwindow.h
@@ -89,6 +89,7 @@ class MainWindow : public QMainWindow
89 void enableIncidenceActions( bool ); 89 void enableIncidenceActions( bool );
90 90
91 private: 91 private:
92 bool mClosed;
92 void saveOnClose(); 93 void saveOnClose();
93 int mCurrentSyncProfile; 94 int mCurrentSyncProfile;
94 void syncRemote( KSyncProfile* , bool ask = true); 95 void syncRemote( KSyncProfile* , bool ask = true);