author | zautrix <zautrix> | 2004-09-15 11:10:41 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-15 11:10:41 (UTC) |
commit | 12091abdaa7e60e408fc248e286f37e12cb10a23 (patch) (side-by-side diff) | |
tree | ea180ecc6687978492e4040d4efc9c8793f178af | |
parent | d4adafe41cf399585b8e35cb600ff35706d55ae0 (diff) | |
download | kdepimpi-12091abdaa7e60e408fc248e286f37e12cb10a23.zip kdepimpi-12091abdaa7e60e408fc248e286f37e12cb10a23.tar.gz kdepimpi-12091abdaa7e60e408fc248e286f37e12cb10a23.tar.bz2 |
Close kopi fix
-rw-r--r-- | korganizer/mainwindow.cpp | 5 | ||||
-rw-r--r-- | korganizer/mainwindow.h | 1 |
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 @@ -68,12 +68,13 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : { #ifdef DESKTOP_VERSION setFont( QFont("Arial"), 14 ); #endif + mClosed = false; //QString confFile = KStandardDirs::appDir() + "config/korganizerrc"; QString confFile = locateLocal("config","korganizerrc"); QFileInfo finf ( confFile ); bool showWarning = !finf.exists(); setIcon(SmallIcon( "ko24" ) ); mBlockAtStartup = true; @@ -218,34 +219,38 @@ MainWindow::~MainWindow() } void MainWindow::showMaximized () { #ifndef DESKTOP_VERSION if ( ! globalFlagBlockStartup ) + if ( mClosed ) mView->goToday(); #endif QWidget::showMaximized () ; + mClosed = false; } void MainWindow::closeEvent( QCloseEvent* ce ) { if ( ! KOPrefs::instance()->mAskForQuit ) { saveOnClose(); + mClosed = true; ce->accept(); return; } switch( QMessageBox::information( this, "KO/Pi", i18n("Do you really want\nto close KO/Pi?"), i18n("Close"), i18n("No"), 0, 0 ) ) { case 0: saveOnClose(); + mClosed = true; ce->accept(); break; case 1: ce->ignore(); break; case 2: diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index 3e854cb..47a7a90 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h @@ -86,12 +86,13 @@ class MainWindow : public QMainWindow void displayText( QString, QString); void displayFile( QString, QString); void enableIncidenceActions( bool ); private: + bool mClosed; void saveOnClose(); int mCurrentSyncProfile; void syncRemote( KSyncProfile* , bool ask = true); void fillSyncMenu(); bool mFlagKeyPressed; bool mBlockAtStartup; |