author | zautrix <zautrix> | 2005-08-17 19:50:38 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-08-17 19:50:38 (UTC) |
commit | 39f1119563e038a029fd23c4b3af03eda02fe308 (patch) (side-by-side diff) | |
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() } if ( !message.isEmpty() ) { 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); - KMessageBox::error(this,message, i18n("Loding of calendar(s) failed")); + KMessageBox::error(this,message, i18n("Loading of calendar(s) failed")); } static bool firstTime = true; if ( firstTime ) { @@ -2531,7 +2531,9 @@ bool CalendarView::saveCalendars() KopiCalendarFile * cal = calendars.first(); mCalendar->setDefaultCalendar( 1 ); mCalendar->setDefaultCalendarEnabledOnly(); - saveCalendar( MainWindow::defaultFileName() ); + QString saveError; + if ( !saveCalendar( MainWindow::defaultFileName() ) ) + saveError = cal->mName +"\n"; cal = calendars.next(); while ( cal ) { if ( !cal->isReadOnly && !cal->mErrorOnLoad ) { @@ -2539,10 +2541,18 @@ bool CalendarView::saveCalendars() mCalendar->setDefaultCalendarEnabledOnly(); if ( saveCalendar( cal->mFileName ) ) cal->mLoadDt = QDateTime::currentDateTime(); + else + saveError += cal->mName + "\n"; } cal = calendars.next(); } restoreCalendarSettings(); + + if ( !saveError.isEmpty() ) { + saveError = KGlobal::formatMessage( i18n("Calendar(s) not saved:"),0 )+"\n" + saveError; + KMessageBox::error(this, saveError, i18n("Error saving data")); + return false; + } return true; } bool CalendarView::saveCalendar( QString filename ) |