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/calendarview.cpp | |
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 |
1 files changed, 12 insertions, 2 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 316826a..ca071b2 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -835,7 +835,7 @@ void CalendarView::checkFiles() | |||
835 | } | 835 | } |
836 | if ( !message.isEmpty() ) { | 836 | if ( !message.isEmpty() ) { |
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 | } |
840 | static bool firstTime = true; | 840 | static bool firstTime = true; |
841 | if ( firstTime ) { | 841 | if ( firstTime ) { |
@@ -2531,7 +2531,9 @@ bool CalendarView::saveCalendars() | |||
2531 | KopiCalendarFile * cal = calendars.first(); | 2531 | KopiCalendarFile * cal = calendars.first(); |
2532 | mCalendar->setDefaultCalendar( 1 ); | 2532 | mCalendar->setDefaultCalendar( 1 ); |
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(); |
2536 | while ( cal ) { | 2538 | while ( cal ) { |
2537 | if ( !cal->isReadOnly && !cal->mErrorOnLoad ) { | 2539 | if ( !cal->isReadOnly && !cal->mErrorOnLoad ) { |
@@ -2539,10 +2541,18 @@ bool CalendarView::saveCalendars() | |||
2539 | mCalendar->setDefaultCalendarEnabledOnly(); | 2541 | mCalendar->setDefaultCalendarEnabledOnly(); |
2540 | if ( saveCalendar( cal->mFileName ) ) | 2542 | if ( saveCalendar( cal->mFileName ) ) |
2541 | cal->mLoadDt = QDateTime::currentDateTime(); | 2543 | cal->mLoadDt = QDateTime::currentDateTime(); |
2544 | else | ||
2545 | saveError += cal->mName + "\n"; | ||
2542 | } | 2546 | } |
2543 | cal = calendars.next(); | 2547 | cal = calendars.next(); |
2544 | } | 2548 | } |
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; |
2547 | } | 2557 | } |
2548 | bool CalendarView::saveCalendar( QString filename ) | 2558 | bool CalendarView::saveCalendar( QString filename ) |