summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt6
-rw-r--r--korganizer/calendarview.cpp14
-rw-r--r--korganizer/mainwindow.cpp12
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() );