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 | 10 |
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 @@ -1472,5 +1472,5 @@ { "Error loading calendar %1","Fehler beim Laden von Kalender %1" }, { "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" }, { "Delete selected...","Lösche Ausgewählte..." }, @@ -1545,4 +1545,8 @@ { "Click this button to <b>add a calendar</b>. You can add an existing calendar file or you can add a new calendar and KO/Pi creates a new empty calendar file for you.","Klicken Sie diesen Knopf <b>um einen Kalender hinzuzufügen</b>. Sie können eine existierende Kalenderdatei hinzufügen oder einen neuen Kalender und KO/Pi legt dann eine neue leere Kalenderdatei für Sie an." }, { "<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 @@ -836,5 +836,5 @@ 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; @@ -2532,5 +2532,7 @@ bool CalendarView::saveCalendars() mCalendar->setDefaultCalendar( 1 ); mCalendar->setDefaultCalendarEnabledOnly(); - saveCalendar( MainWindow::defaultFileName() ); + QString saveError; + if ( !saveCalendar( MainWindow::defaultFileName() ) ) + saveError = cal->mName +"\n"; cal = calendars.next(); while ( cal ) { @@ -2540,8 +2542,16 @@ bool CalendarView::saveCalendars() 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; } diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 94bc4c1..9c55e9f 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -507,4 +507,8 @@ void MainWindow::closeEvent( QCloseEvent* ce ) if ( ! KOPrefs::instance()->mAskForQuit ) { saveOnClose(); + if ( mCalendarModifiedFlag ) { + ce->ignore(); + return; + } mClosed = true; ce->accept(); @@ -519,4 +523,8 @@ void MainWindow::closeEvent( QCloseEvent* ce ) case 0: saveOnClose(); + if ( mCalendarModifiedFlag ) { + ce->ignore(); + return; + } mClosed = true; ce->accept(); @@ -2003,5 +2011,5 @@ void MainWindow::save() setCaption(i18n("KO/Pi:Saving Data to File ..." )); qDebug("KO: Start saving data to file!"); - mView->saveCalendars(); + if ( mView->saveCalendars() ) mCalendarModifiedFlag = false; int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); |