summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt6
-rw-r--r--korganizer/calendarview.cpp14
-rw-r--r--korganizer/mainwindow.cpp10
3 files changed, 26 insertions, 4 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,3 +2012,3 @@ void MainWindow::save()
qDebug("KO: Start saving data to file!");
- mView->saveCalendars();
+ if ( mView->saveCalendars() )
mCalendarModifiedFlag = false;