author | zautrix <zautrix> | 2005-08-17 19:50:38 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-08-17 19:50:38 (UTC) |
commit | 39f1119563e038a029fd23c4b3af03eda02fe308 (patch) (unidiff) | |
tree | b552570e883436ec451cdb7d4b215206c2ca3ba3 /korganizer | |
parent | dfb9cdc7d39b988e23e5491e1c8f0e8c5713dae5 (diff) | |
download | kdepimpi-39f1119563e038a029fd23c4b3af03eda02fe308.zip kdepimpi-39f1119563e038a029fd23c4b3af03eda02fe308.tar.gz kdepimpi-39f1119563e038a029fd23c4b3af03eda02fe308.tar.bz2 |
kopi save error warning
-rw-r--r-- | korganizer/calendarview.cpp | 14 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 12 |
2 files changed, 22 insertions, 4 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 316826a..ca071b2 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -837,3 +837,3 @@ void CalendarView::checkFiles() | |||
837 | message = KGlobal::formatMessage( i18n("Calendar(s) not loaded:"),0 )+"\n" + message +KGlobal::formatMessage(i18n("You can try to reload the calendar in the Resource View!"),0); | 837 | message = KGlobal::formatMessage( i18n("Calendar(s) not loaded:"),0 )+"\n" + message +KGlobal::formatMessage(i18n("You can try to reload the calendar in the Resource View!"),0); |
838 | KMessageBox::error(this,message, i18n("Loding of calendar(s) failed")); | 838 | KMessageBox::error(this,message, i18n("Loading of calendar(s) failed")); |
839 | } | 839 | } |
@@ -2533,3 +2533,5 @@ bool CalendarView::saveCalendars() | |||
2533 | mCalendar->setDefaultCalendarEnabledOnly(); | 2533 | mCalendar->setDefaultCalendarEnabledOnly(); |
2534 | saveCalendar( MainWindow::defaultFileName() ); | 2534 | QString saveError; |
2535 | if ( !saveCalendar( MainWindow::defaultFileName() ) ) | ||
2536 | saveError = cal->mName +"\n"; | ||
2535 | cal = calendars.next(); | 2537 | cal = calendars.next(); |
@@ -2541,2 +2543,4 @@ bool CalendarView::saveCalendars() | |||
2541 | cal->mLoadDt = QDateTime::currentDateTime(); | 2543 | cal->mLoadDt = QDateTime::currentDateTime(); |
2544 | else | ||
2545 | saveError += cal->mName + "\n"; | ||
2542 | } | 2546 | } |
@@ -2545,2 +2549,8 @@ bool CalendarView::saveCalendars() | |||
2545 | restoreCalendarSettings(); | 2549 | restoreCalendarSettings(); |
2550 | |||
2551 | if ( !saveError.isEmpty() ) { | ||
2552 | saveError = KGlobal::formatMessage( i18n("Calendar(s) not saved:"),0 )+"\n" + saveError; | ||
2553 | KMessageBox::error(this, saveError, i18n("Error saving data")); | ||
2554 | return false; | ||
2555 | } | ||
2546 | return true; | 2556 | return true; |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 94bc4c1..9c55e9f 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -508,2 +508,6 @@ void MainWindow::closeEvent( QCloseEvent* ce ) | |||
508 | saveOnClose(); | 508 | saveOnClose(); |
509 | if ( mCalendarModifiedFlag ) { | ||
510 | ce->ignore(); | ||
511 | return; | ||
512 | } | ||
509 | mClosed = true; | 513 | mClosed = true; |
@@ -520,2 +524,6 @@ void MainWindow::closeEvent( QCloseEvent* ce ) | |||
520 | saveOnClose(); | 524 | saveOnClose(); |
525 | if ( mCalendarModifiedFlag ) { | ||
526 | ce->ignore(); | ||
527 | return; | ||
528 | } | ||
521 | mClosed = true; | 529 | mClosed = true; |
@@ -2004,4 +2012,4 @@ void MainWindow::save() | |||
2004 | qDebug("KO: Start saving data to file!"); | 2012 | qDebug("KO: Start saving data to file!"); |
2005 | mView->saveCalendars(); | 2013 | if ( mView->saveCalendars() ) |
2006 | mCalendarModifiedFlag = false; | 2014 | mCalendarModifiedFlag = false; |
2007 | int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); | 2015 | int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); |