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 | |
parent | dfb9cdc7d39b988e23e5491e1c8f0e8c5713dae5 (diff) | |
download | kdepimpi-39f1119563e038a029fd23c4b3af03eda02fe308.zip kdepimpi-39f1119563e038a029fd23c4b3af03eda02fe308.tar.gz kdepimpi-39f1119563e038a029fd23c4b3af03eda02fe308.tar.bz2 |
kopi save error warning
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 6 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 14 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 12 |
3 files changed, 27 insertions, 5 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index 78fa13b..1a1fd0e 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt @@ -1473,3 +1473,3 @@ { "Calendar(s) not loaded:","Nicht geladene(r) Kalender:" }, -{ "Loding of calendar(s) failed","Laden von Kalendern fehlgeschlagen" }, +{ "Loading of calendar(s) failed","Laden von Kalendern fehlgeschlagen" }, { "Alarm Options","Alarm Einstellungen" }, @@ -1546,2 +1546,6 @@ { "<b>iCal (*.ics) file on disk:</b><br>(will be created, if not existing)","<b>iCal (*.ics) Datei:</b><br>(Datei wird angelegt, wenn sie nicht existiert)" }, +{ "Error saving data","Fehler beim Abspeichern" }, +{ "Calendar(s) not saved:","Nicht gespeicherte Kalender:" }, +{ "","" }, +{ "","" }, { "","" }, 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() 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")); } @@ -2533,3 +2533,5 @@ bool CalendarView::saveCalendars() mCalendar->setDefaultCalendarEnabledOnly(); - saveCalendar( MainWindow::defaultFileName() ); + QString saveError; + if ( !saveCalendar( MainWindow::defaultFileName() ) ) + saveError = cal->mName +"\n"; cal = calendars.next(); @@ -2541,2 +2543,4 @@ bool CalendarView::saveCalendars() cal->mLoadDt = QDateTime::currentDateTime(); + else + saveError += cal->mName + "\n"; } @@ -2545,2 +2549,8 @@ bool CalendarView::saveCalendars() 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; 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 ) saveOnClose(); + if ( mCalendarModifiedFlag ) { + ce->ignore(); + return; + } mClosed = true; @@ -520,2 +524,6 @@ void MainWindow::closeEvent( QCloseEvent* ce ) saveOnClose(); + if ( mCalendarModifiedFlag ) { + ce->ignore(); + return; + } mClosed = true; @@ -2004,4 +2012,4 @@ void MainWindow::save() qDebug("KO: Start saving data to file!"); - mView->saveCalendars(); - mCalendarModifiedFlag = false; + if ( mView->saveCalendars() ) + mCalendarModifiedFlag = false; int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); |