-rw-r--r-- | korganizer/mainwindow.cpp | 8 | ||||
-rw-r--r-- | korganizer/mainwindow.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 4b00062..d4fadcb 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -194,48 +194,56 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : | |||
194 | //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); | 194 | //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); |
195 | fillSyncMenu(); | 195 | fillSyncMenu(); |
196 | mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins ); | 196 | mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins ); |
197 | if ( showWarning ) { | 197 | if ( showWarning ) { |
198 | KMessageBox::information( this, | 198 | KMessageBox::information( this, |
199 | "You are starting KO/Pi for the first time.\nPlease read menu: Help-What's New,\nif you did an update!\nPlease choose your timezone in the \nConfigure Dialog TAB Time Zone!\nPlease choose your language\nin the TAB Locale!\nYou get the Configure Dialog\nvia Menu: Actions - Configure....\nClick OK to show the Configure Dialog!\n", "KO/Pi information"); | 199 | "You are starting KO/Pi for the first time.\nPlease read menu: Help-What's New,\nif you did an update!\nPlease choose your timezone in the \nConfigure Dialog TAB Time Zone!\nPlease choose your language\nin the TAB Locale!\nYou get the Configure Dialog\nvia Menu: Actions - Configure....\nClick OK to show the Configure Dialog!\n", "KO/Pi information"); |
200 | qApp->processEvents(); | 200 | qApp->processEvents(); |
201 | mView->dialogManager()->showSyncOptions(); | 201 | mView->dialogManager()->showSyncOptions(); |
202 | } | 202 | } |
203 | 203 | ||
204 | //US listen for result adressed from Ka/Pi | 204 | //US listen for result adressed from Ka/Pi |
205 | connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); | 205 | connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); |
206 | } | 206 | } |
207 | MainWindow::~MainWindow() | 207 | MainWindow::~MainWindow() |
208 | { | 208 | { |
209 | //qDebug("MainWindow::~MainWindow() "); | 209 | //qDebug("MainWindow::~MainWindow() "); |
210 | //save toolbar location | 210 | //save toolbar location |
211 | 211 | ||
212 | delete mCalendar; | 212 | delete mCalendar; |
213 | delete KOPrefs::instance(); | 213 | delete KOPrefs::instance(); |
214 | delete KIncidenceFormatter::instance(); | 214 | delete KIncidenceFormatter::instance(); |
215 | 215 | ||
216 | 216 | ||
217 | } | 217 | } |
218 | void MainWindow::showMaximized () | ||
219 | { | ||
220 | #ifndef DESKTOP_VERSION | ||
221 | if ( ! globalFlagBlockStartup ) | ||
222 | mView->goToday(); | ||
223 | #endif | ||
224 | QWidget::showMaximized () ; | ||
225 | } | ||
218 | void MainWindow::closeEvent( QCloseEvent* ce ) | 226 | void MainWindow::closeEvent( QCloseEvent* ce ) |
219 | { | 227 | { |
220 | 228 | ||
221 | 229 | ||
222 | 230 | ||
223 | if ( ! KOPrefs::instance()->mAskForQuit ) { | 231 | if ( ! KOPrefs::instance()->mAskForQuit ) { |
224 | saveOnClose(); | 232 | saveOnClose(); |
225 | ce->accept(); | 233 | ce->accept(); |
226 | return; | 234 | return; |
227 | 235 | ||
228 | } | 236 | } |
229 | 237 | ||
230 | switch( QMessageBox::information( this, "KO/Pi", | 238 | switch( QMessageBox::information( this, "KO/Pi", |
231 | i18n("Do you really want\nto close KO/Pi?"), | 239 | i18n("Do you really want\nto close KO/Pi?"), |
232 | i18n("Close"), i18n("No"), | 240 | i18n("Close"), i18n("No"), |
233 | 0, 0 ) ) { | 241 | 0, 0 ) ) { |
234 | case 0: | 242 | case 0: |
235 | saveOnClose(); | 243 | saveOnClose(); |
236 | ce->accept(); | 244 | ce->accept(); |
237 | break; | 245 | break; |
238 | case 1: | 246 | case 1: |
239 | ce->ignore(); | 247 | ce->ignore(); |
240 | break; | 248 | break; |
241 | case 2: | 249 | case 2: |
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index 1d87db0..3e854cb 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h | |||
@@ -10,48 +10,49 @@ | |||
10 | 10 | ||
11 | class QAction; | 11 | class QAction; |
12 | class CalendarView; | 12 | class CalendarView; |
13 | class KSyncProfile; | 13 | class KSyncProfile; |
14 | #ifdef DESKTOP_VERSION | 14 | #ifdef DESKTOP_VERSION |
15 | 15 | ||
16 | #define QPEToolBar QToolBar | 16 | #define QPEToolBar QToolBar |
17 | #define QPEMenuBar QMenuBar | 17 | #define QPEMenuBar QMenuBar |
18 | #endif | 18 | #endif |
19 | class QPEToolBar; | 19 | class QPEToolBar; |
20 | 20 | ||
21 | namespace KCal { | 21 | namespace KCal { |
22 | class CalendarLocal; | 22 | class CalendarLocal; |
23 | } | 23 | } |
24 | 24 | ||
25 | using namespace KCal; | 25 | using namespace KCal; |
26 | 26 | ||
27 | class MainWindow : public QMainWindow | 27 | class MainWindow : public QMainWindow |
28 | { | 28 | { |
29 | Q_OBJECT | 29 | Q_OBJECT |
30 | public: | 30 | public: |
31 | MainWindow( QWidget *parent = 0, const char *name = 0, QString command = ""); | 31 | MainWindow( QWidget *parent = 0, const char *name = 0, QString command = ""); |
32 | ~MainWindow(); | 32 | ~MainWindow(); |
33 | public slots: | 33 | public slots: |
34 | virtual void showMaximized (); | ||
34 | void configureAgenda( int ); | 35 | void configureAgenda( int ); |
35 | void recieve( const QCString& msg, const QByteArray& data ); | 36 | void recieve( const QCString& msg, const QByteArray& data ); |
36 | static QString defaultFileName(); | 37 | static QString defaultFileName(); |
37 | static QString resourcePath(); | 38 | static QString resourcePath(); |
38 | protected slots: | 39 | protected slots: |
39 | void setCaptionToDates(); | 40 | void setCaptionToDates(); |
40 | int ringSync(); | 41 | int ringSync(); |
41 | void multiSync( bool askforPrefs = false ); | 42 | void multiSync( bool askforPrefs = false ); |
42 | void about(); | 43 | void about(); |
43 | void licence(); | 44 | void licence(); |
44 | void faq(); | 45 | void faq(); |
45 | void usertrans(); | 46 | void usertrans(); |
46 | void features(); | 47 | void features(); |
47 | void synchowto(); | 48 | void synchowto(); |
48 | void whatsNew(); | 49 | void whatsNew(); |
49 | void keyBindings(); | 50 | void keyBindings(); |
50 | void aboutAutoSaving();; | 51 | void aboutAutoSaving();; |
51 | void aboutKnownBugs(); | 52 | void aboutKnownBugs(); |
52 | 53 | ||
53 | void processIncidenceSelection( Incidence * ); | 54 | void processIncidenceSelection( Incidence * ); |
54 | 55 | ||
55 | void importQtopia(); | 56 | void importQtopia(); |
56 | void importBday(); | 57 | void importBday(); |
57 | void importOL(); | 58 | void importOL(); |