-rw-r--r-- | bin/kdepim/WhatsNew.txt | 5 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 18 | ||||
-rw-r--r-- | korganizer/calendarview.h | 2 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 19 | ||||
-rw-r--r-- | korganizer/mainwindow.h | 1 |
5 files changed, 40 insertions, 5 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index ac70a55..3dbbbb6 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -10,9 +10,12 @@ Added WhatsThis support for the todo view and the list view. | |||
10 | 10 | ||
11 | Added a quite useful feature to the montview. | 11 | Added a quite useful feature to the montview. |
12 | Just click on the week numbers on the left. | 12 | Just click on the week numbers on the left. |
13 | And on top of the week numbers there is now a "week view quick selector". | 13 | And in the top right corner of month view/agenda view |
14 | there is now a "week number quick selector". | ||
14 | (Click on the black triangle). | 15 | (Click on the black triangle). |
15 | 16 | ||
17 | Made the quite difficult timezone change in KO/Pi easy. | ||
18 | |||
16 | 19 | ||
17 | ********** VERSION 2.0.1 ************ | 20 | ********** VERSION 2.0.1 ************ |
18 | 21 | ||
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index e0380fa..77de94f 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -2251,8 +2251,24 @@ void CalendarView::edit_paste() | |||
2251 | 2251 | ||
2252 | void CalendarView::edit_options() | 2252 | void CalendarView::edit_options() |
2253 | { | 2253 | { |
2254 | QString tz = KPimGlobalPrefs::instance()->mTimeZoneId; | ||
2255 | emit save(); | ||
2256 | emit saveStopTimer(); | ||
2254 | mDialogManager->showOptionsDialog(); | 2257 | mDialogManager->showOptionsDialog(); |
2255 | //writeSettings(); | 2258 | if ( tz != KPimGlobalPrefs::instance()->mTimeZoneId) { |
2259 | emit saveStopTimer(); | ||
2260 | if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, i18n("The timezone has changed!\nShould the calendar be reloaded\nto apply timezone changes?\nPlease read Menu: Help->FAQ:\n\"How do I change the timezone?\"\nas well!"), | ||
2261 | i18n("Timezone settings"),i18n("Reload"))) { | ||
2262 | qDebug("KO: TZ reload cancelled "); | ||
2263 | return; | ||
2264 | } | ||
2265 | qDebug("KO: Timezone change "); | ||
2266 | openCalendar( MainWindow::defaultFileName() ); | ||
2267 | setModified(true); | ||
2268 | } | ||
2269 | else | ||
2270 | qDebug("KO: No tz change "); | ||
2271 | |||
2256 | } | 2272 | } |
2257 | 2273 | ||
2258 | 2274 | ||
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index 6ea8287..8d7ff36 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h | |||
@@ -117,6 +117,8 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser | |||
117 | Incidence *currentSelection(); | 117 | Incidence *currentSelection(); |
118 | 118 | ||
119 | signals: | 119 | signals: |
120 | void save (); | ||
121 | void saveStopTimer (); | ||
120 | void tempDisableBR(bool); | 122 | void tempDisableBR(bool); |
121 | /** This todo has been modified */ | 123 | /** This todo has been modified */ |
122 | void todoModified(Todo *, int); | 124 | void todoModified(Todo *, int); |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 3feb4ab..a2c20a8 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -259,6 +259,8 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : | |||
259 | 259 | ||
260 | 260 | ||
261 | connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) ); | 261 | connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) ); |
262 | connect(mView , SIGNAL( save() ), this, SLOT( save() ) ); | ||
263 | connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) ); | ||
262 | connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); | 264 | connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); |
263 | connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); | 265 | connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); |
264 | mSyncManager->setDefaultFileName( defaultFileName()); | 266 | mSyncManager->setDefaultFileName( defaultFileName()); |
@@ -1447,6 +1449,7 @@ void MainWindow::slotModifiedChanged( bool changed ) | |||
1447 | { | 1449 | { |
1448 | if ( mBlockAtStartup ) | 1450 | if ( mBlockAtStartup ) |
1449 | return; | 1451 | return; |
1452 | |||
1450 | int msec; | 1453 | int msec; |
1451 | // we store the changes after 1 minute, | 1454 | // we store the changes after 1 minute, |
1452 | // and for safety reasons after 10 minutes again | 1455 | // and for safety reasons after 10 minutes again |
@@ -1458,18 +1461,29 @@ void MainWindow::slotModifiedChanged( bool changed ) | |||
1458 | qDebug("KO: Saving File in %d secs!", msec/1000); | 1461 | qDebug("KO: Saving File in %d secs!", msec/1000); |
1459 | mCalendarModifiedFlag = true; | 1462 | mCalendarModifiedFlag = true; |
1460 | } | 1463 | } |
1464 | void MainWindow::saveStopTimer() | ||
1465 | { | ||
1466 | mSaveTimer.stop(); | ||
1467 | if (mSaveTimer.isActive() ) | ||
1468 | qDebug("ti active "); | ||
1469 | else | ||
1470 | qDebug("KO: Save timer stopped"); | ||
1471 | } | ||
1461 | void MainWindow::save() | 1472 | void MainWindow::save() |
1462 | { | 1473 | { |
1474 | if ( !mCalendarModifiedFlag ) { | ||
1475 | qDebug("KO: Calendar not modified. Nothing saved."); | ||
1476 | return; | ||
1477 | } | ||
1463 | if ( mSyncManager->blockSave() ) | 1478 | if ( mSyncManager->blockSave() ) |
1464 | return; | 1479 | return; |
1465 | mSyncManager->setBlockSave(true); | 1480 | mSyncManager->setBlockSave(true); |
1466 | if ( mView->checkFileVersion( defaultFileName()) ) { | 1481 | if ( mView->checkFileVersion( defaultFileName()) ) { |
1467 | |||
1468 | QTime neededSaveTime = QDateTime::currentDateTime().time(); | 1482 | QTime neededSaveTime = QDateTime::currentDateTime().time(); |
1469 | setCaption(i18n("KO/Pi:Saving Data to File ..." )); | 1483 | setCaption(i18n("KO/Pi:Saving Data to File ..." )); |
1470 | qDebug("KO: Start saving data to file!"); | 1484 | qDebug("KO: Start saving data to file!"); |
1471 | mView->saveCalendar( defaultFileName() ); | 1485 | mView->saveCalendar( defaultFileName() ); |
1472 | 1486 | mCalendarModifiedFlag = false; | |
1473 | int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); | 1487 | int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); |
1474 | qDebug("KO: Needed %d ms for saving.",msNeeded ); | 1488 | qDebug("KO: Needed %d ms for saving.",msNeeded ); |
1475 | QString savemes; | 1489 | QString savemes; |
@@ -1477,7 +1491,6 @@ void MainWindow::save() | |||
1477 | setCaption(savemes); | 1491 | setCaption(savemes); |
1478 | } else | 1492 | } else |
1479 | setCaption(i18n("Saving cancelled!")); | 1493 | setCaption(i18n("Saving cancelled!")); |
1480 | mCalendarModifiedFlag = false; | ||
1481 | mSyncManager->setBlockSave( false ); | 1494 | mSyncManager->setBlockSave( false ); |
1482 | } | 1495 | } |
1483 | 1496 | ||
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index 6de0543..8dd55ac 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h | |||
@@ -72,6 +72,7 @@ class MainWindow : public QMainWindow | |||
72 | void slotModifiedChanged( bool ); | 72 | void slotModifiedChanged( bool ); |
73 | 73 | ||
74 | void save(); | 74 | void save(); |
75 | void saveStopTimer(); | ||
75 | void configureToolBar( int ); | 76 | void configureToolBar( int ); |
76 | void printSel(); | 77 | void printSel(); |
77 | void printCal(); | 78 | void printCal(); |