summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp7
-rw-r--r--korganizer/mainwindow.h1
2 files changed, 7 insertions, 1 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index aa30b52..3bc6081 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -66,16 +66,17 @@ int globalFlagBlockStartup;
MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
QMainWindow( parent, name )
{
#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;
mFlagKeyPressed = false;
setCaption("KOrganizer/Pi");
@@ -216,38 +217,42 @@ MainWindow::~MainWindow()
delete KIncidenceFormatter::instance();
}
void MainWindow::showMaximized ()
{
#ifndef DESKTOP_VERSION
if ( ! globalFlagBlockStartup )
- mView->goToday();
+ 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:
default:
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h
index 3e854cb..47a7a90 100644
--- a/korganizer/mainwindow.h
+++ b/korganizer/mainwindow.h
@@ -84,16 +84,17 @@ class MainWindow : public QMainWindow
protected:
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;
QPEToolBar *iconToolBar;
void initActions();