summaryrefslogtreecommitdiffabout
Unidiff
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
@@ -1471,7 +1471,7 @@
1471{ "Pending Suspend Alarm","Laufender Suspend Alarm" }, 1471{ "Pending Suspend Alarm","Laufender Suspend Alarm" },
1472{ "Error loading calendar %1","Fehler beim Laden von Kalender %1" }, 1472{ "Error loading calendar %1","Fehler beim Laden von Kalender %1" },
1473{ "Calendar(s) not loaded:","Nicht geladene(r) Kalender:" }, 1473{ "Calendar(s) not loaded:","Nicht geladene(r) Kalender:" },
1474{ "Loding of calendar(s) failed","Laden von Kalendern fehlgeschlagen" }, 1474{ "Loading of calendar(s) failed","Laden von Kalendern fehlgeschlagen" },
1475{ "Alarm Options","Alarm Einstellungen" }, 1475{ "Alarm Options","Alarm Einstellungen" },
1476{ "Delete selected...","Lösche Ausgewählte..." }, 1476{ "Delete selected...","Lösche Ausgewählte..." },
1477{ "None","Nichts" }, 1477{ "None","Nichts" },
@@ -1544,6 +1544,10 @@
1544{ "In this column you can <b>set a calendar and all entries of the calendar to read only</b>. If a calendar is readonly the entries cannot be edited and no items can be added to the calendar. If you change a setting of a calendar to readonly in this column all data will be saved because the data of a readonly calendar is not saved later.","In dieser Spalte können Sie einen <b>Kalender und alle Einträge auf schreibgeschützt setzen</b>. Einträge eines schreibgeschützten Kalenders können nicht verändert werden und es können keine Einträge zum Kalender hinzugefügt werden. Wenn Sie die Einstellung eines Kalenders in dieser Spalte auf schreibgeschützt setzen werden alle Daten automatisch abgespeichert, da die Daten eines schreibgeschützten Kalenders später nicht mehr gespeichert werden." }, 1544{ "In this column you can <b>set a calendar and all entries of the calendar to read only</b>. If a calendar is readonly the entries cannot be edited and no items can be added to the calendar. If you change a setting of a calendar to readonly in this column all data will be saved because the data of a readonly calendar is not saved later.","In dieser Spalte können Sie einen <b>Kalender und alle Einträge auf schreibgeschützt setzen</b>. Einträge eines schreibgeschützten Kalenders können nicht verändert werden und es können keine Einträge zum Kalender hinzugefügt werden. Wenn Sie die Einstellung eines Kalenders in dieser Spalte auf schreibgeschützt setzen werden alle Daten automatisch abgespeichert, da die Daten eines schreibgeschützten Kalenders später nicht mehr gespeichert werden." },
1545{ "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." }, 1545{ "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." },
1546{ "<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)" }, 1546{ "<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)" },
1547{ "Error saving data","Fehler beim Abspeichern" },
1548{ "Calendar(s) not saved:","Nicht gespeicherte Kalender:" },
1549{ "","" },
1550{ "","" },
1547{ "","" }, 1551{ "","" },
1548{ "","" }, 1552{ "","" },
1549{ "","" }, 1553{ "","" },
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()
835 } 835 }
836 if ( !message.isEmpty() ) { 836 if ( !message.isEmpty() ) {
837 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); 837 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);
838 KMessageBox::error(this,message, i18n("Loding of calendar(s) failed")); 838 KMessageBox::error(this,message, i18n("Loading of calendar(s) failed"));
839 } 839 }
840 static bool firstTime = true; 840 static bool firstTime = true;
841 if ( firstTime ) { 841 if ( firstTime ) {
@@ -2531,7 +2531,9 @@ bool CalendarView::saveCalendars()
2531 KopiCalendarFile * cal = calendars.first(); 2531 KopiCalendarFile * cal = calendars.first();
2532 mCalendar->setDefaultCalendar( 1 ); 2532 mCalendar->setDefaultCalendar( 1 );
2533 mCalendar->setDefaultCalendarEnabledOnly(); 2533 mCalendar->setDefaultCalendarEnabledOnly();
2534 saveCalendar( MainWindow::defaultFileName() ); 2534 QString saveError;
2535 if ( !saveCalendar( MainWindow::defaultFileName() ) )
2536 saveError = cal->mName +"\n";
2535 cal = calendars.next(); 2537 cal = calendars.next();
2536 while ( cal ) { 2538 while ( cal ) {
2537 if ( !cal->isReadOnly && !cal->mErrorOnLoad ) { 2539 if ( !cal->isReadOnly && !cal->mErrorOnLoad ) {
@@ -2539,10 +2541,18 @@ bool CalendarView::saveCalendars()
2539 mCalendar->setDefaultCalendarEnabledOnly(); 2541 mCalendar->setDefaultCalendarEnabledOnly();
2540 if ( saveCalendar( cal->mFileName ) ) 2542 if ( saveCalendar( cal->mFileName ) )
2541 cal->mLoadDt = QDateTime::currentDateTime(); 2543 cal->mLoadDt = QDateTime::currentDateTime();
2544 else
2545 saveError += cal->mName + "\n";
2542 } 2546 }
2543 cal = calendars.next(); 2547 cal = calendars.next();
2544 } 2548 }
2545 restoreCalendarSettings(); 2549 restoreCalendarSettings();
2550
2551 if ( !saveError.isEmpty() ) {
2552 saveError = KGlobal::formatMessage( i18n("Calendar(s) not saved:"),0 )+"\n" + saveError;
2553 KMessageBox::error(this, saveError, i18n("Error saving data"));
2554 return false;
2555 }
2546 return true; 2556 return true;
2547} 2557}
2548bool CalendarView::saveCalendar( QString filename ) 2558bool CalendarView::saveCalendar( QString filename )
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 94bc4c1..9c55e9f 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -506,6 +506,10 @@ void MainWindow::closeEvent( QCloseEvent* ce )
506 506
507 if ( ! KOPrefs::instance()->mAskForQuit ) { 507 if ( ! KOPrefs::instance()->mAskForQuit ) {
508 saveOnClose(); 508 saveOnClose();
509 if ( mCalendarModifiedFlag ) {
510 ce->ignore();
511 return;
512 }
509 mClosed = true; 513 mClosed = true;
510 ce->accept(); 514 ce->accept();
511 return; 515 return;
@@ -518,6 +522,10 @@ void MainWindow::closeEvent( QCloseEvent* ce )
518 0, 0 ) ) { 522 0, 0 ) ) {
519 case 0: 523 case 0:
520 saveOnClose(); 524 saveOnClose();
525 if ( mCalendarModifiedFlag ) {
526 ce->ignore();
527 return;
528 }
521 mClosed = true; 529 mClosed = true;
522 ce->accept(); 530 ce->accept();
523 break; 531 break;
@@ -2002,8 +2010,8 @@ void MainWindow::save()
2002 if ( !isMinimized () ) 2010 if ( !isMinimized () )
2003 setCaption(i18n("KO/Pi:Saving Data to File ..." )); 2011 setCaption(i18n("KO/Pi:Saving Data to File ..." ));
2004 qDebug("KO: Start saving data to file!"); 2012 qDebug("KO: Start saving data to file!");
2005 mView->saveCalendars(); 2013 if ( mView->saveCalendars() )
2006 mCalendarModifiedFlag = false; 2014 mCalendarModifiedFlag = false;
2007 int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); 2015 int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() );
2008 qDebug("KO: Needed %d ms for saving.",msNeeded ); 2016 qDebug("KO: Needed %d ms for saving.",msNeeded );
2009 QString savemes; 2017 QString savemes;