summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-08-17 19:50:38 (UTC)
committer zautrix <zautrix>2005-08-17 19:50:38 (UTC)
commit39f1119563e038a029fd23c4b3af03eda02fe308 (patch) (unidiff)
treeb552570e883436ec451cdb7d4b215206c2ca3ba3
parentdfb9cdc7d39b988e23e5491e1c8f0e8c5713dae5 (diff)
downloadkdepimpi-39f1119563e038a029fd23c4b3af03eda02fe308.zip
kdepimpi-39f1119563e038a029fd23c4b3af03eda02fe308.tar.gz
kdepimpi-39f1119563e038a029fd23c4b3af03eda02fe308.tar.bz2
kopi save error warning
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
@@ -1378,175 +1378,179 @@
1378{ "New Calendar","Neuer Kalender" }, 1378{ "New Calendar","Neuer Kalender" },
1379{ "Calendar","Kalender" }, 1379{ "Calendar","Kalender" },
1380{ "Filter selector","Filterauswahl" }, 1380{ "Filter selector","Filterauswahl" },
1381{ "Filtermenu","Filtermenu" }, 1381{ "Filtermenu","Filtermenu" },
1382{ "Toggle Fullscreen","Vollbild umschalten" }, 1382{ "Toggle Fullscreen","Vollbild umschalten" },
1383{ "Toggle Resource View","Resourcenansicht umschalten" }, 1383{ "Toggle Resource View","Resourcenansicht umschalten" },
1384{ "Storage HowTo...","Speicherort HowTo..." }, 1384{ "Storage HowTo...","Speicherort HowTo..." },
1385{ "Timetracking HowTo...","Timetracking HowTo..." }, 1385{ "Timetracking HowTo...","Timetracking HowTo..." },
1386{ "Juni","Juni" }, 1386{ "Juni","Juni" },
1387{ "Juli","Juli" }, 1387{ "Juli","Juli" },
1388{ "ToDo:","ToDo:" }, 1388{ "ToDo:","ToDo:" },
1389{ "Set Calendar","Setze Kalender" }, 1389{ "Set Calendar","Setze Kalender" },
1390{ "Todo: %1","Todo: %1" }, 1390{ "Todo: %1","Todo: %1" },
1391{ ": (Prio ",": (Prio " }, 1391{ ": (Prio ",": (Prio " },
1392{ "Todos","Todos" }, 1392{ "Todos","Todos" },
1393{ "Todo Viewer","Todo Anzeige" }, 1393{ "Todo Viewer","Todo Anzeige" },
1394{ "Todo ","Todo " }, 1394{ "Todo ","Todo " },
1395{ " Calendar \n Resource "," Kalender \n Resource " }, 1395{ " Calendar \n Resource "," Kalender \n Resource " },
1396{ " Color "," Farbe " }, 1396{ " Color "," Farbe " },
1397{ "The calendar <b>%1</b> is displaying file <b>%2</b>. Do you want to remove this calendar from KO/Pi? (The file is not removed!)","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>. Möchten Sie diesen Kalender aus KO/Pi entfernen? (Die Datei wird dabei nicht gelöscht!)" }, 1397{ "The calendar <b>%1</b> is displaying file <b>%2</b>. Do you want to remove this calendar from KO/Pi? (The file is not removed!)","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>. Möchten Sie diesen Kalender aus KO/Pi entfernen? (Die Datei wird dabei nicht gelöscht!)" },
1398{ "The calendar <b>%1</b> is displaying file <b>%2</b>","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>" }, 1398{ "The calendar <b>%1</b> is displaying file <b>%2</b>","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>" },
1399{ "Add new Calendar","Füge Kalender hinzu" }, 1399{ "Add new Calendar","Füge Kalender hinzu" },
1400{ "<b>Name of new calendar:</b>","<b>Name des Kalenders:</b>" }, 1400{ "<b>Name of new calendar:</b>","<b>Name des Kalenders:</b>" },
1401{ "Sorry, the calendar name is empty!","Sorry, der Kalendername ist leer!" }, 1401{ "Sorry, the calendar name is empty!","Sorry, der Kalendername ist leer!" },
1402{ "Sorry, the file name is empty!","Sorry, der Dateiname ist leer!" }, 1402{ "Sorry, the file name is empty!","Sorry, der Dateiname ist leer!" },
1403{ "Error loading calendar file\n%1.","Fehler beim Laden der Kalenderdatei\n%1." }, 1403{ "Error loading calendar file\n%1.","Fehler beim Laden der Kalenderdatei\n%1." },
1404{ "The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>","Der Kalender <b>%1</b> ist nicht geladen! Das Laden der Datei <b>%2</b> schlug fehl! <b>Soll erneut versucht werden den Kalender zu laden?</b>" }, 1404{ "The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>","Der Kalender <b>%1</b> ist nicht geladen! Das Laden der Datei <b>%2</b> schlug fehl! <b>Soll erneut versucht werden den Kalender zu laden?</b>" },
1405{ "Global application font for all apps:","Globale Schriftart:" }, 1405{ "Global application font for all apps:","Globale Schriftart:" },
1406{ "Application Font","Applikationsschriftart" }, 1406{ "Application Font","Applikationsschriftart" },
1407{ "Kx/Pi","Kx/Pi" }, 1407{ "Kx/Pi","Kx/Pi" },
1408{ "Backup","Backup" }, 1408{ "Backup","Backup" },
1409{ "KDE-Pim Global Settings","KDE-Pim Globale Einstellungen" }, 1409{ "KDE-Pim Global Settings","KDE-Pim Globale Einstellungen" },
1410{ "Sorry, the calendar name \n%1\nalready exists!\nPlease choose another name!","Sorry, der Kalendername \n%1\nist schon in Benutzung!\nBitte wählen Sie einen anderen!" }, 1410{ "Sorry, the calendar name \n%1\nalready exists!\nPlease choose another name!","Sorry, der Kalendername \n%1\nist schon in Benutzung!\nBitte wählen Sie einen anderen!" },
1411{ "Sorry, the file \n%1\nis already loaded!\nPlease choose another file!","Sorry, die Datei \n%1\nist schon geladen!\nBitte wählen Sie eine andere!" }, 1411{ "Sorry, the file \n%1\nis already loaded!\nPlease choose another file!","Sorry, die Datei \n%1\nist schon geladen!\nBitte wählen Sie eine andere!" },
1412{ "Choose Color","Wähle Farbe" }, 1412{ "Choose Color","Wähle Farbe" },
1413{ " OK "," OK " }, 1413{ " OK "," OK " },
1414{ " Cancel "," Abbrechen " }, 1414{ " Cancel "," Abbrechen " },
1415{ "Matching items will be added to list","Passende werden zur Liste hinzugefügt" }, 1415{ "Matching items will be added to list","Passende werden zur Liste hinzugefügt" },
1416{ "Matching items will be removed from list","Passende werden von der Liste entfernt" }, 1416{ "Matching items will be removed from list","Passende werden von der Liste entfernt" },
1417{ "Search on displayed list only","Suche auf der dargestellten Liste" }, 1417{ "Search on displayed list only","Suche auf der dargestellten Liste" },
1418{ "List will be cleared before search","Liste wird vor der Suche gelöscht" }, 1418{ "List will be cleared before search","Liste wird vor der Suche gelöscht" },
1419{ "<center>%1</center> <center>is not running. Do you want to set\nthe state to running?</center>","<center>%1</center> <center>ist nicht am Laufen. Möchten Sie den Zustand auf "laufend" setzen?</center>" }, 1419{ "<center>%1</center> <center>is not running. Do you want to set\nthe state to running?</center>","<center>%1</center> <center>ist nicht am Laufen. Möchten Sie den Zustand auf "laufend" setzen?</center>" },
1420{ "%1\nis running!","%1\nist am Laufen!" }, 1420{ "%1\nis running!","%1\nist am Laufen!" },
1421{ "Additional Comment:","Zusätzlicher Kommentar:" }, 1421{ "Additional Comment:","Zusätzlicher Kommentar:" },
1422{ "Stop and save","Stopp und Speichern" }, 1422{ "Stop and save","Stopp und Speichern" },
1423{ "Continue running","Weiter laufen lassen" }, 1423{ "Continue running","Weiter laufen lassen" },
1424{ "Stop - do not save","Stopp - nicht Speichern" }, 1424{ "Stop - do not save","Stopp - nicht Speichern" },
1425{ "Do you really want to set\nthe state to stopped\nwithout saving the data?","Möchten sie den Zustand\nwirklich auf gestoppt setzen\nohne die Daten abzuspeichern?" }, 1425{ "Do you really want to set\nthe state to stopped\nwithout saving the data?","Möchten sie den Zustand\nwirklich auf gestoppt setzen\nohne die Daten abzuspeichern?" },
1426{ "Time mismatch!","Zeiten stimmen nicht!" }, 1426{ "Time mismatch!","Zeiten stimmen nicht!" },
1427{ "The start time is\nafter the end time!","Die Startzeit ist\nhinter der Endzeit!" }, 1427{ "The start time is\nafter the end time!","Die Startzeit ist\nhinter der Endzeit!" },
1428{ "Yes, stop todo","Ja, stoppe Todo" }, 1428{ "Yes, stop todo","Ja, stoppe Todo" },
1429{ "Todo stopped - no data saved because runtime was < 15 sec!","Todo gestoppt - nichts gespeichert da Laufzeit < 15 sec!" }, 1429{ "Todo stopped - no data saved because runtime was < 15 sec!","Todo gestoppt - nichts gespeichert da Laufzeit < 15 sec!" },
1430{ "Todo started! Double click again to stop!","Todo gestartet! Doppelklicke um es zu stoppen!" }, 1430{ "Todo started! Double click again to stop!","Todo gestartet! Doppelklicke um es zu stoppen!" },
1431{ "Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.","Bitte wählen Sie den <b>Default-Kalender</b> in dieser Spalte. Neu angelegte oder importierte Einträge werden dem Default-Kalender hinzugefügt." }, 1431{ "Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.","Bitte wählen Sie den <b>Default-Kalender</b> in dieser Spalte. Neu angelegte oder importierte Einträge werden dem Default-Kalender hinzugefügt." },
1432{ "Spouse","Ehegatte" }, 1432{ "Spouse","Ehegatte" },
1433{ "Notes","Notizen" }, 1433{ "Notes","Notizen" },
1434{ "Messanger","Messanger" }, 1434{ "Messanger","Messanger" },
1435{ "Assistant","Assistent" }, 1435{ "Assistant","Assistent" },
1436{ "Manager","Manager" }, 1436{ "Manager","Manager" },
1437{ "Secrecy","Sichtbar" }, 1437{ "Secrecy","Sichtbar" },
1438{ "male","männlich" }, 1438{ "male","männlich" },
1439{ "female","weiblich" }, 1439{ "female","weiblich" },
1440{ "Hide!","Verbergen!" }, 1440{ "Hide!","Verbergen!" },
1441{ "Show!","Anzeigen!" }, 1441{ "Show!","Anzeigen!" },
1442{ "Details","Details" }, 1442{ "Details","Details" },
1443{ "Profession","Beruf" }, 1443{ "Profession","Beruf" },
1444{ "Children","Kinder" }, 1444{ "Children","Kinder" },
1445{ "Department","Abteilung" }, 1445{ "Department","Abteilung" },
1446{ "Backup cancelled","Backup abgebrochen" }, 1446{ "Backup cancelled","Backup abgebrochen" },
1447{ "Backup globally disabled","Backup global abgeschaltet" }, 1447{ "Backup globally disabled","Backup global abgeschaltet" },
1448{ "Backup succesfully finished","Backup erfolgreich beendet" }, 1448{ "Backup succesfully finished","Backup erfolgreich beendet" },
1449{ "(Hint: You can enable automatic backup in the global settings!)","(Hinweis: Sie können ein automatisches Backup in den globalen Einstellungen konfigurieren!)" }, 1449{ "(Hint: You can enable automatic backup in the global settings!)","(Hinweis: Sie können ein automatisches Backup in den globalen Einstellungen konfigurieren!)" },
1450{ "This will <b>backup all calendar files</b> to the directory %1 %2","Das schreibt ein <b>Backup aller Kalenderdateien</b> in das Verzeichnis %1 %2" }, 1450{ "This will <b>backup all calendar files</b> to the directory %1 %2","Das schreibt ein <b>Backup aller Kalenderdateien</b> in das Verzeichnis %1 %2" },
1451{ "Birthdays","Geburtstage" }, 1451{ "Birthdays","Geburtstage" },
1452{ "KO/Pi import information!","KO/Pi Import Information!" }, 1452{ "KO/Pi import information!","KO/Pi Import Information!" },
1453{ "Start this todo\nand stop all running","Starte dieses Todo\nund stoppe alle Laufenden" }, 1453{ "Start this todo\nand stop all running","Starte dieses Todo\nund stoppe alle Laufenden" },
1454{ "Cancel - do not start"," Abbrechen - Todo nicht starten" }, 1454{ "Cancel - do not start"," Abbrechen - Todo nicht starten" },
1455{ "The timezone has changed!\nShould the calendar be reloaded\nto shift the time of the events?\nPlease read Menu: Help->FAQ:\n"How do I change the timezone?"\nas well!","Die Zeitzone wurde geändert!\nSollen die Kalender neu geladen\nwerden num die Zeiten\nder Termine zu ändern?\nBitte lesen Sie auch\nMenu: Help->FAQ:\n"How do I change the timezone?"" }, 1455{ "The timezone has changed!\nShould the calendar be reloaded\nto shift the time of the events?\nPlease read Menu: Help->FAQ:\n"How do I change the timezone?"\nas well!","Die Zeitzone wurde geändert!\nSollen die Kalender neu geladen\nwerden num die Zeiten\nder Termine zu ändern?\nBitte lesen Sie auch\nMenu: Help->FAQ:\n"How do I change the timezone?"" },
1456{ "Reload","Neu laden" }, 1456{ "Reload","Neu laden" },
1457{ "Timezone settings","Zeitzoneneinstellung" }, 1457{ "Timezone settings","Zeitzoneneinstellung" },
1458{ "Title: ","Titel: " }, 1458{ "Title: ","Titel: " },
1459{ "Journal from: ","Journal vom: " }, 1459{ "Journal from: ","Journal vom: " },
1460{ "Journal: %1 from ","Journal: %1 vom " }, 1460{ "Journal: %1 from ","Journal: %1 vom " },
1461{ "<b>Click here to edit categories: </b>","<b>Klicke hier um Kategorien zu ändern: </b>" }, 1461{ "<b>Click here to edit categories: </b>","<b>Klicke hier um Kategorien zu ändern: </b>" },
1462{ "Selected Item","Ausgewähltes Item" }, 1462{ "Selected Item","Ausgewähltes Item" },
1463{ "Select Date...","Wähle Datum..." }, 1463{ "Select Date...","Wähle Datum..." },
1464{ "After importing/loading/syncing there may be new categories in events or todos which are not added automatically to the category list. Please choose what to do <b>now</b>:","Nach dem Importieren/Laden/Syncen kann es neue Kategorien in den Terminen oder Todos geben, die nicht automatisch der Kategorieliste hinzugefügt werden. Bitte wählen Sie, was <b>jetzt</b> passieren soll:" }, 1464{ "After importing/loading/syncing there may be new categories in events or todos which are not added automatically to the category list. Please choose what to do <b>now</b>:","Nach dem Importieren/Laden/Syncen kann es neue Kategorien in den Terminen oder Todos geben, die nicht automatisch der Kategorieliste hinzugefügt werden. Bitte wählen Sie, was <b>jetzt</b> passieren soll:" },
1465{ "Change category list now!","Ändere Kategorieliste jetzt!" }, 1465{ "Change category list now!","Ändere Kategorieliste jetzt!" },
1466{ "Edit category list...","Ändere Kategorieliste..." }, 1466{ "Edit category list...","Ändere Kategorieliste..." },
1467{ "Toolbar changes needs a restart!","Neustart benötigt für Toolbaränderungen!" }, 1467{ "Toolbar changes needs a restart!","Neustart benötigt für Toolbaränderungen!" },
1468{ "Filepath: ","Dateipfad: " }, 1468{ "Filepath: ","Dateipfad: " },
1469{ "You can try to reload the calendar in the Resource View!","In der Resourcenansicht können Sie erneut versuchen den Kalender zu laden!" }, 1469{ "You can try to reload the calendar in the Resource View!","In der Resourcenansicht können Sie erneut versuchen den Kalender zu laden!" },
1470{ "<b>WARNING:</b> There is a pending suspended alarm!","<b>WARNUNG:</b> Es gibt einen laufenden Suspendalarm!" }, 1470{ "<b>WARNING:</b> There is a pending suspended alarm!","<b>WARNUNG:</b> Es gibt einen laufenden Suspendalarm!" },
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" },
1478{ "Selection","Auswahl" }, 1478{ "Selection","Auswahl" },
1479{ "Set categories","Setze Kategorien" }, 1479{ "Set categories","Setze Kategorien" },
1480{ "This adds the selected\nitems to the calendar\n%1\nand removes them from\ntheir current calendar!","Das fügt die ausgewählten\nEinträge dem Kalender\n%1\nhinzu und entfernt sie von\nihrem aktuellen Kalender!" }, 1480{ "This adds the selected\nitems to the calendar\n%1\nand removes them from\ntheir current calendar!","Das fügt die ausgewählten\nEinträge dem Kalender\n%1\nhinzu und entfernt sie von\nihrem aktuellen Kalender!" },
1481{ "Reset","Neu setzen" }, 1481{ "Reset","Neu setzen" },
1482{ "Do you want to <b>add</b> categories to the selected items or <b>reset</b> the list (i.e. remove current categories)?","Möchten Sie Kategorien zu den ausgewählten Einträgen <b>hinzufügen</b> oder die Liste <b>neu setzen</b> (d.h. vorhandene Kategorien löschen)?" }, 1482{ "Do you want to <b>add</b> categories to the selected items or <b>reset</b> the list (i.e. remove current categories)?","Möchten Sie Kategorien zu den ausgewählten Einträgen <b>hinzufügen</b> oder die Liste <b>neu setzen</b> (d.h. vorhandene Kategorien löschen)?" },
1483{ "The file\n%1\ndoes not exist!\nShall I create it for you?","Die Datei\n%1\nexistiert nicht!\nSoll sie neu angelegt werden?" }, 1483{ "The file\n%1\ndoes not exist!\nShall I create it for you?","Die Datei\n%1\nexistiert nicht!\nSoll sie neu angelegt werden?" },
1484{ "Sorry, cannot create the file\n%1!\nNo calendar added!","Kann leider die Datei\n%1\nnicht anlegen!\nKein Kalender hinzugefügt!" }, 1484{ "Sorry, cannot create the file\n%1!\nNo calendar added!","Kann leider die Datei\n%1\nnicht anlegen!\nKein Kalender hinzugefügt!" },
1485{ "\nNO\n WRITEABLE\n CALENDAR\n FOUND!\n\nPlease fix your calendar settings!\n","\nKEIN\n SCHREIBBARER\n KALENDER\n GEFUNDEN!\n\nBitte korrigieren Sie\nihre Kalendereinstellungen!\n" }, 1485{ "\nNO\n WRITEABLE\n CALENDAR\n FOUND!\n\nPlease fix your calendar settings!\n","\nKEIN\n SCHREIBBARER\n KALENDER\n GEFUNDEN!\n\nBitte korrigieren Sie\nihre Kalendereinstellungen!\n" },
1486{ "\nThe file\n%1\non disk has changed!\nFile size: %2 bytes.\nLast modified: %3\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n","\nDie Datei\n%1\nwurde verändert!\nDatei Grösse: %2 Bytes.\nZuletzt geändert: %3\nMöchten Sie:\n\n - Speichern und die Datei überschreiben?\n - Mit Datei Synchronisieren, dann speichern?\n - Abbrechen ohne zu speichern? \n" }, 1486{ "\nThe file\n%1\non disk has changed!\nFile size: %2 bytes.\nLast modified: %3\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n","\nDie Datei\n%1\nwurde verändert!\nDatei Grösse: %2 Bytes.\nZuletzt geändert: %3\nMöchten Sie:\n\n - Speichern und die Datei überschreiben?\n - Mit Datei Synchronisieren, dann speichern?\n - Abbrechen ohne zu speichern? \n" },
1487{ "Edit","Edit" }, 1487{ "Edit","Edit" },
1488{ "Last Modified","Zuletzt geändert" }, 1488{ "Last Modified","Zuletzt geändert" },
1489{ "Journal viewer","Journal Anzeige" }, 1489{ "Journal viewer","Journal Anzeige" },
1490{ "Configure Calendar Files...","Konfiguriere Kalenderdateien..." }, 1490{ "Configure Calendar Files...","Konfiguriere Kalenderdateien..." },
1491{ "You can use and display <b>more than one</b> calendar file in KO/Pi. A calendar file is called a <b>resource</b>. To add a calendar or change calendar settings please use menu: <b>View -> Toggle Resource View</b>.","Sie können <b>mehr als eine</b> Kalenderdatei in KO/Pi darstellen und benutzen. Eine Kalenderdatei wird <b>Resource</b> genannt. Um einen Kalender hinzuzufügen oder die Kalendereinstellungen zu ändern benutzen Sie bitte das Menu: <b>Ansicht -> Resourcenansicht umschalten</b>." }, 1491{ "You can use and display <b>more than one</b> calendar file in KO/Pi. A calendar file is called a <b>resource</b>. To add a calendar or change calendar settings please use menu: <b>View -> Toggle Resource View</b>.","Sie können <b>mehr als eine</b> Kalenderdatei in KO/Pi darstellen und benutzen. Eine Kalenderdatei wird <b>Resource</b> genannt. Um einen Kalender hinzuzufügen oder die Kalendereinstellungen zu ändern benutzen Sie bitte das Menu: <b>Ansicht -> Resourcenansicht umschalten</b>." },
1492{ "Hide Completed","Verstecke erledigte Todos" }, 1492{ "Hide Completed","Verstecke erledigte Todos" },
1493{ "Show not Running","Zeige nicht Laufende" }, 1493{ "Show not Running","Zeige nicht Laufende" },
1494{ "Click to add new Todo","Klick für neues Todo!" }, 1494{ "Click to add new Todo","Klick für neues Todo!" },
1495{ "Show next conflict for","Zeige nächsten Konflikt für" }, 1495{ "Show next conflict for","Zeige nächsten Konflikt für" },
1496{ "All events","Alle Termine" }, 1496{ "All events","Alle Termine" },
1497{ "Allday events","Ganztagestermine" }, 1497{ "Allday events","Ganztagestermine" },
1498{ "Events with time","Termine mit Zeit" }, 1498{ "Events with time","Termine mit Zeit" },
1499{ "No conflict found","Kein Konflikt gefunden" }, 1499{ "No conflict found","Kein Konflikt gefunden" },
1500{ "Conflict %1 <-> %2","Konflikt %1 <-> %2" }, 1500{ "Conflict %1 <-> %2","Konflikt %1 <-> %2" },
1501{ "<p><b>Q</b>: Show next date with conflicting events\n ","<p><b>Q</b>: Zeige nächstes Datum mit Terminen im Konflikt\n " }, 1501{ "<p><b>Q</b>: Show next date with conflicting events\n ","<p><b>Q</b>: Zeige nächstes Datum mit Terminen im Konflikt\n " },
1502{ "Week view mode uses row layout","Wochenansicht Modus nutzt Reihenlayout" }, 1502{ "Week view mode uses row layout","Wochenansicht Modus nutzt Reihenlayout" },
1503{ "The event\n%1\nconflicts with event\n%2\nat date\n%3.\n","Der Termin\n%1\nist im Konflikt mit Termin\n%2\nam Datum\n%3.\n" }, 1503{ "The event\n%1\nconflicts with event\n%2\nat date\n%3.\n","Der Termin\n%1\nist im Konflikt mit Termin\n%2\nam Datum\n%3.\n" },
1504{ "KO/Pi Conflict delected","KO/Pi Konflikt erkannt" }, 1504{ "KO/Pi Conflict delected","KO/Pi Konflikt erkannt" },
1505{ "Show date","Zeige Datum" }, 1505{ "Show date","Zeige Datum" },
1506{ "No problem!","Null Problemo!" }, 1506{ "No problem!","Null Problemo!" },
1507{ "Automatically sync with KDE-Desktop\nwhen receiving sync request","Synce automatisch mit KDE-Desktop\nwenn eine Sync-Anforderung kommt" }, 1507{ "Automatically sync with KDE-Desktop\nwhen receiving sync request","Synce automatisch mit KDE-Desktop\nwenn eine Sync-Anforderung kommt" },
1508{ "Pi-Sync Port Error","Pi-Sync Port Fehler" }, 1508{ "Pi-Sync Port Error","Pi-Sync Port Fehler" },
1509{ "<b>Enabling Pi-Sync failed!</b> Failed to bind or listen to the port %1! Is another instance already listening to that port?","<b>Anschalten von Pi-Sync fehlgeschlagen!</b> Fehler beim Ansprechen des Ports %1! Ist bereits eine andere Anwendung dabei diesen Port zu nutzen?" }, 1509{ "<b>Enabling Pi-Sync failed!</b> Failed to bind or listen to the port %1! Is another instance already listening to that port?","<b>Anschalten von Pi-Sync fehlgeschlagen!</b> Fehler beim Ansprechen des Ports %1! Ist bereits eine andere Anwendung dabei diesen Port zu nutzen?" },
1510{ "No valid port number:\n%1","Keine gültige Port Nummer:\n%1" }, 1510{ "No valid port number:\n%1","Keine gültige Port Nummer:\n%1" },
1511{ "Port number (Default: %1)\nValid range from 1 to 65535","Port Nummer (Standard: %1)\nGültiger Bereich von 1 bis 65535" }, 1511{ "Port number (Default: %1)\nValid range from 1 to 65535","Port Nummer (Standard: %1)\nGültiger Bereich von 1 bis 65535" },
1512{ "Pi-Sync Error","Pi-Sync Fehler" }, 1512{ "Pi-Sync Error","Pi-Sync Fehler" },
1513{ "Got send file request\nwith invalid password","Erhielt "sende Datei" Anfrage\nmit ungültigem Passwort" }, 1513{ "Got send file request\nwith invalid password","Erhielt "sende Datei" Anfrage\nmit ungültigem Passwort" },
1514{ "Got receive file request\nwith invalid password","Erhielt "empfange Datei" Anfrage\nmit ungültigem Passwort" }, 1514{ "Got receive file request\nwith invalid password","Erhielt "empfange Datei" Anfrage\nmit ungültigem Passwort" },
1515{ "Wrong password: Receiving remote file failed.","Falsches Passwort: Empfangen von entfernter Datei fehlgeschlagen." }, 1515{ "Wrong password: Receiving remote file failed.","Falsches Passwort: Empfangen von entfernter Datei fehlgeschlagen." },
1516{ "Please close error dialog on remote.","Bitte schließe Fehler-Dialog am entfernten Rechner" }, 1516{ "Please close error dialog on remote.","Bitte schließe Fehler-Dialog am entfernten Rechner" },
1517{ "Unknown error on remote.","Unbekannter Fehler am entfernten Rechner" }, 1517{ "Unknown error on remote.","Unbekannter Fehler am entfernten Rechner" },
1518{ "Pi-Sync: Connected!","Pi-Sync: Verbunden!" }, 1518{ "Pi-Sync: Connected!","Pi-Sync: Verbunden!" },
1519{ "Receiving file from remote...","Empfange entfernte Datei..." }, 1519{ "Receiving file from remote...","Empfange entfernte Datei..." },
1520{ "Sending back synced file...","Sende synchronisierte Datei zurück..." }, 1520{ "Sending back synced file...","Sende synchronisierte Datei zurück..." },
1521{ "Do you want to\nclear all sync info\nof all profiles?","Möchten Sie wirklich\ndie Sync-Info\nfür alle Profile\nlöschen?" }, 1521{ "Do you want to\nclear all sync info\nof all profiles?","Möchten Sie wirklich\ndie Sync-Info\nfür alle Profile\nlöschen?" },
1522{ "Do you want to\nclear the sync\ninfo of profile\n%1?\n","Möchten Sie wirklich\ndie Sync-Info für Profil\n%1?\nlöschen" }, 1522{ "Do you want to\nclear the sync\ninfo of profile\n%1?\n","Möchten Sie wirklich\ndie Sync-Info für Profil\n%1?\nlöschen" },
1523{ "Sorry, no valid port.Syncing cancelled.","Sorry, kein gültiger Port. Syncing abgebrochen." }, 1523{ "Sorry, no valid port.Syncing cancelled.","Sorry, kein gültiger Port. Syncing abgebrochen." },
1524{ "Remote port number:\n(May be: 1 - 65535)","Ferne Port Nummer:\n(Darf sein: 1 - 65535)" }, 1524{ "Remote port number:\n(May be: 1 - 65535)","Ferne Port Nummer:\n(Darf sein: 1 - 65535)" },
1525{ "Writing back file ...","Schreibe Datei zurück..." }, 1525{ "Writing back file ...","Schreibe Datei zurück..." },
1526{ "Sending back file ...","Sende Datei zurück..." }, 1526{ "Sending back file ...","Sende Datei zurück..." },
1527{ "Eeek, there I am ticklish!","Hihi, da bin ich kitzlig!" }, 1527{ "Eeek, there I am ticklish!","Hihi, da bin ich kitzlig!" },
1528{ "Created","Angelegt" }, 1528{ "Created","Angelegt" },
1529{ "Last Modified Sub","Zuletzt geändertes Sub" }, 1529{ "Last Modified Sub","Zuletzt geändertes Sub" },
1530{ "Checking conflicts ... please wait","Überprüfe Konflikte ... bitte warten" }, 1530{ "Checking conflicts ... please wait","Überprüfe Konflikte ... bitte warten" },
1531{ "Show times on two lines","Zeige Zeiten auf zwei Zeilen" }, 1531{ "Show times on two lines","Zeige Zeiten auf zwei Zeilen" },
1532{ "Save using LOCAL storage","Speichere nutze LOCAL Pfad" }, 1532{ "Save using LOCAL storage","Speichere nutze LOCAL Pfad" },
1533{ "Duration","Dauer" }, 1533{ "Duration","Dauer" },
1534{ " day"," Tag" }, 1534{ " day"," Tag" },
1535{ "Click this button to display all todos in a <b>flat</b> hierarchy","Klicke diesen Knopf um alle Todos in einer <b>flachen</b> Hierarchie darzustellen" }, 1535{ "Click this button to display all todos in a <b>flat</b> hierarchy","Klicke diesen Knopf um alle Todos in einer <b>flachen</b> Hierarchie darzustellen" },
1536{ "Click this button to display all todos <b>openend</b>","Klicke diesen Knopf um alle Todos <b>geöffnet</b> darzustellen" }, 1536{ "Click this button to display all todos <b>openend</b>","Klicke diesen Knopf um alle Todos <b>geöffnet</b> darzustellen" },
1537{ "Click this button to display all todos <b>closed</b>","Klicke diesen Knopf um alle Todos <b>geschlossen</b> darzustellen" }, 1537{ "Click this button to display all todos <b>closed</b>","Klicke diesen Knopf um alle Todos <b>geschlossen</b> darzustellen" },
1538{ "Click this button to toggle show/hide <b>running</b> todos","Klicke diesen Knopf um <b>zeige Laufende</b> umzuschalten" }, 1538{ "Click this button to toggle show/hide <b>running</b> todos","Klicke diesen Knopf um <b>zeige Laufende</b> umzuschalten" },
1539{ "Click this button to toggle show/hide <b>completed</b> todos","Klicke diesen Knopf um <b>zeige Erledigte</b> umzuschalten" }, 1539{ "Click this button to toggle show/hide <b>completed</b> todos","Klicke diesen Knopf um <b>zeige Erledigte</b> umzuschalten" },
1540{ "Click this button to add a new subtodo to the currently selected todo","Klicke diesen Knopf um ein Untertodo zu dem gerade selektierten Todo hinzuzufügen" }, 1540{ "Click this button to add a new subtodo to the currently selected todo","Klicke diesen Knopf um ein Untertodo zu dem gerade selektierten Todo hinzuzufügen" },
1541{ "In this column you can <b>set a calendar to be visible</b>. If a calendar is not visible its entries are not displayed in the views. You can add items to it and it is loaded/saved as usual.","In dieser Spalte kann man einen <b>Kalender auf sichtbar schalten</b>. Wenn ein Kalender nicht sichtbar ist werden seine Einträge nicht in den Ansichten angezeigt. Man kann Einträge hinzufügen und laden/speichern wie gewöhnlich." }, 1541{ "In this column you can <b>set a calendar to be visible</b>. If a calendar is not visible its entries are not displayed in the views. You can add items to it and it is loaded/saved as usual.","In dieser Spalte kann man einen <b>Kalender auf sichtbar schalten</b>. Wenn ein Kalender nicht sichtbar ist werden seine Einträge nicht in den Ansichten angezeigt. Man kann Einträge hinzufügen und laden/speichern wie gewöhnlich." },
1542{ "In this column you can see the <b>name of the calendar</b>. If you click on the name button you will get an information box about the loaded calendar file. If the file was not loaded at startup you can try to load it here again.","In dieser Spalte wird der <b>Name des Kalenders</b> angezeigt. Wenn Sie auf den Namen klicken wird Information über die Kalenderdatei angezeigt. Wenn die Datei beim Start nicht geladen wurde können Sie hier erneut versuchen sie zu laden." }, 1542{ "In this column you can see the <b>name of the calendar</b>. If you click on the name button you will get an information box about the loaded calendar file. If the file was not loaded at startup you can try to load it here again.","In dieser Spalte wird der <b>Name des Kalenders</b> angezeigt. Wenn Sie auf den Namen klicken wird Information über die Kalenderdatei angezeigt. Wenn die Datei beim Start nicht geladen wurde können Sie hier erneut versuchen sie zu laden." },
1543{ "In this column you can <b>disable the alarms of a calendar all together</b>. The alarm data in the calendar itself is not changed, the alarms are marked internally as "do not use". Useful if you load a calendar of another person but do not want to get notified about alarms of that person.","In dieser Spalte können die <b>Alarme eines Kalenders alle zusammen abgeschaltet werden</b>. Die Alarmdaten im Kalender selbst werden nicht verändert, es werde die Alarme intern als "nicht beachten" markiert. Nützlich wenn Sie den Kalender einer anderen Person laden aber nicht über dessen Alarme unterrichtet werden wollen." }, 1543{ "In this column you can <b>disable the alarms of a calendar all together</b>. The alarm data in the calendar itself is not changed, the alarms are marked internally as "do not use". Useful if you load a calendar of another person but do not want to get notified about alarms of that person.","In dieser Spalte können die <b>Alarme eines Kalenders alle zusammen abgeschaltet werden</b>. Die Alarmdaten im Kalender selbst werden nicht verändert, es werde die Alarme intern als "nicht beachten" markiert. Nützlich wenn Sie den Kalender einer anderen Person laden aber nicht über dessen Alarme unterrichtet werden wollen." },
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{ "","" },
1550{ "","" }, 1554{ "","" },
1551{ "","" }, 1555{ "","" },
1552{ "","" }, 1556{ "","" },
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 316826a..ca071b2 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -742,193 +742,193 @@ void CalendarView::nextConflict( bool all, bool allday )
742 return; 742 return;
743 } 743 }
744 744
745 topLevelWidget()->setCaption( i18n("No conflict found") ); 745 topLevelWidget()->setCaption( i18n("No conflict found") );
746 //qDebug("No conflict found "); 746 //qDebug("No conflict found ");
747 block = false; 747 block = false;
748 return; 748 return;
749} 749}
750 750
751void CalendarView::conflictAll() 751void CalendarView::conflictAll()
752{ 752{
753 nextConflict ( true, true ); 753 nextConflict ( true, true );
754} 754}
755void CalendarView::conflictAllday() 755void CalendarView::conflictAllday()
756{ 756{
757 nextConflict ( false, true ); 757 nextConflict ( false, true );
758} 758}
759void CalendarView::conflictNotAll() 759void CalendarView::conflictNotAll()
760{ 760{
761 nextConflict ( false, false ); 761 nextConflict ( false, false );
762} 762}
763 763
764void CalendarView::setCalReadOnly( int id, bool readO ) 764void CalendarView::setCalReadOnly( int id, bool readO )
765{ 765{
766 if ( readO ) { 766 if ( readO ) {
767 emit save(); 767 emit save();
768 } 768 }
769 mCalendar->setReadOnly( id, readO ); 769 mCalendar->setReadOnly( id, readO );
770} 770}
771void CalendarView::setScrollBarStep(int val ) 771void CalendarView::setScrollBarStep(int val )
772{ 772{
773#ifdef DESKTOP_VERSION 773#ifdef DESKTOP_VERSION
774 mDateScrollBar->setLineStep ( val ); 774 mDateScrollBar->setLineStep ( val );
775#endif 775#endif
776} 776}
777void CalendarView::scrollBarValue(int val ) 777void CalendarView::scrollBarValue(int val )
778{ 778{
779#ifdef DESKTOP_VERSION 779#ifdef DESKTOP_VERSION
780 if ( QApplication::desktop()->width() < 800 ) return; 780 if ( QApplication::desktop()->width() < 800 ) return;
781 static bool block = false; 781 static bool block = false;
782 if ( block ) return; 782 if ( block ) return;
783 block = true; 783 block = true;
784 int count = mNavigator->selectedDates().count(); 784 int count = mNavigator->selectedDates().count();
785 int day = mNavigator->selectedDates().first().dayOfYear(); 785 int day = mNavigator->selectedDates().first().dayOfYear();
786 int stepdays = val; 786 int stepdays = val;
787 if ( mDateScrollBar->lineStep () <= count ) { 787 if ( mDateScrollBar->lineStep () <= count ) {
788 //val = val/mDateScrollBar->lineStep ()*mDateScrollBar->lineStep(); 788 //val = val/mDateScrollBar->lineStep ()*mDateScrollBar->lineStep();
789 //qDebug("VAL %d ",val ); 789 //qDebug("VAL %d ",val );
790 stepdays = (val-day)/mDateScrollBar->lineStep ()*mDateScrollBar->lineStep(); 790 stepdays = (val-day)/mDateScrollBar->lineStep ()*mDateScrollBar->lineStep();
791 stepdays = day+stepdays; 791 stepdays = day+stepdays;
792 if ( stepdays < 0 ) stepdays = 0; 792 if ( stepdays < 0 ) stepdays = 0;
793 } 793 }
794 if ( stepdays == day ) { 794 if ( stepdays == day ) {
795 block = false; 795 block = false;
796 return; 796 return;
797 } 797 }
798 int year = mNavigator->selectedDates().first().year(); 798 int year = mNavigator->selectedDates().first().year();
799 QDate d ( year,1,1 ); 799 QDate d ( year,1,1 );
800 mNavigator->selectDates( d.addDays( stepdays-1) , count ); 800 mNavigator->selectDates( d.addDays( stepdays-1) , count );
801 block = false; 801 block = false;
802#endif 802#endif
803 803
804} 804}
805void CalendarView::updateView(const QDate &start, const QDate &end) 805void CalendarView::updateView(const QDate &start, const QDate &end)
806{ 806{
807#ifdef DESKTOP_VERSION 807#ifdef DESKTOP_VERSION
808 if ( ! mDateScrollBar->draggingSlider () ) { 808 if ( ! mDateScrollBar->draggingSlider () ) {
809 int dof = start.dayOfYear(); 809 int dof = start.dayOfYear();
810 //qDebug("dof %d day %d val %d ", dof, start.dayOfYear(),mDateScrollBar->value() ); 810 //qDebug("dof %d day %d val %d ", dof, start.dayOfYear(),mDateScrollBar->value() );
811 if ( dof != mDateScrollBar->value() ) { 811 if ( dof != mDateScrollBar->value() ) {
812 mDateScrollBar->blockSignals( true ); 812 mDateScrollBar->blockSignals( true );
813 mDateScrollBar->setValue( start.dayOfYear()); 813 mDateScrollBar->setValue( start.dayOfYear());
814 mDateScrollBar->blockSignals( false ); 814 mDateScrollBar->blockSignals( false );
815 } 815 }
816 } 816 }
817#endif 817#endif
818 mTodoList->updateView(); 818 mTodoList->updateView();
819 mViewManager->updateView(start, end); 819 mViewManager->updateView(start, end);
820 //mDateNavigator->updateView(); 820 //mDateNavigator->updateView();
821} 821}
822 822
823 823
824 824
825void CalendarView::checkFiles() 825void CalendarView::checkFiles()
826{ 826{
827 QString message; 827 QString message;
828 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; 828 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
829 KopiCalendarFile * cal = calendars.first(); 829 KopiCalendarFile * cal = calendars.first();
830 while ( cal ) { 830 while ( cal ) {
831 if ( cal->mErrorOnLoad ) { 831 if ( cal->mErrorOnLoad ) {
832 message += cal->mName +"\n"+KGlobal::formatMessage ( "(" +i18n( "Filepath: ")+ cal->mFileName+")" ,0 )+"\n"; 832 message += cal->mName +"\n"+KGlobal::formatMessage ( "(" +i18n( "Filepath: ")+ cal->mFileName+")" ,0 )+"\n";
833 } 833 }
834 cal = calendars.next(); 834 cal = calendars.next();
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 ) {
842 firstTime = false; 842 firstTime = false;
843 QTimer::singleShot( 2000, this, SLOT ( checkAlarms() )); 843 QTimer::singleShot( 2000, this, SLOT ( checkAlarms() ));
844 } 844 }
845} 845}
846void CalendarView::checkAlarms() 846void CalendarView::checkAlarms()
847{ 847{
848 KConfig *config = KOGlobals::config(); 848 KConfig *config = KOGlobals::config();
849 config->setGroup( "AppRun" ); 849 config->setGroup( "AppRun" );
850 QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); 850 QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) );
851 int daysto = dt.daysTo( QDate::currentDate() ); 851 int daysto = dt.daysTo( QDate::currentDate() );
852 int days = config->readNumEntry( "LatestProgramStopDays" , daysto); 852 int days = config->readNumEntry( "LatestProgramStopDays" , daysto);
853 dt = dt.addDays( days ); 853 dt = dt.addDays( days );
854 int secto = dt.secsTo( QDateTime::currentDateTime() ); 854 int secto = dt.secsTo( QDateTime::currentDateTime() );
855 int secs = config->readNumEntry( "LatestProgramStopSecs" , secto) - 30; 855 int secs = config->readNumEntry( "LatestProgramStopSecs" , secto) - 30;
856 //qDebug("KO: Reading program stop %d ", secs); 856 //qDebug("KO: Reading program stop %d ", secs);
857 //secs -= ( 3600 * 24*3 ); // debug only 857 //secs -= ( 3600 * 24*3 ); // debug only
858 QDateTime latest = dt.addSecs ( secs ); 858 QDateTime latest = dt.addSecs ( secs );
859 qDebug("KO: Last termination on %s ", latest.toString().latin1()); 859 qDebug("KO: Last termination on %s ", latest.toString().latin1());
860 //qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() ); 860 //qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() );
861 QPtrList<Incidence> el = mCalendar->rawIncidences(); 861 QPtrList<Incidence> el = mCalendar->rawIncidences();
862 QPtrList<Incidence> al; 862 QPtrList<Incidence> al;
863 Incidence* inL = el.first(); 863 Incidence* inL = el.first();
864 QDateTime cur = QDateTime::currentDateTime().addSecs(-59); 864 QDateTime cur = QDateTime::currentDateTime().addSecs(-59);
865 qDebug("KO: Checking alarm until %s ", cur.toString().latin1()); 865 qDebug("KO: Checking alarm until %s ", cur.toString().latin1());
866 while ( inL ) { 866 while ( inL ) {
867 bool ok = false; 867 bool ok = false;
868 int offset = 0; 868 int offset = 0;
869 QDateTime next = inL->getNextAlarmDateTime(& ok, &offset, latest ) ; 869 QDateTime next = inL->getNextAlarmDateTime(& ok, &offset, latest ) ;
870 if ( ok ) { 870 if ( ok ) {
871 //qDebug("OK %s",next.toString().latin1()); 871 //qDebug("OK %s",next.toString().latin1());
872 if ( next < cur ) { 872 if ( next < cur ) {
873 al.append( inL ); 873 al.append( inL );
874 //qDebug("found missed alarm: %s ", inL->summary().latin1() ); 874 //qDebug("found missed alarm: %s ", inL->summary().latin1() );
875 } 875 }
876 } 876 }
877 inL = el.next(); 877 inL = el.next();
878 } 878 }
879 if ( al.count() ) { 879 if ( al.count() ) {
880 QDialog* dia = new QDialog( this, "huhu", false, WDestructiveClose | WStyle_StaysOnTop ); 880 QDialog* dia = new QDialog( this, "huhu", false, WDestructiveClose | WStyle_StaysOnTop );
881 dia->setCaption( i18n("KO/Pi: Missing alarms!") ); 881 dia->setCaption( i18n("KO/Pi: Missing alarms!") );
882 QVBoxLayout* lay = new QVBoxLayout( dia ); 882 QVBoxLayout* lay = new QVBoxLayout( dia );
883 lay->setSpacing( 0 ); 883 lay->setSpacing( 0 );
884 lay->setMargin( 0 ); 884 lay->setMargin( 0 );
885 MissedAlarmTextBrowser* matb = new MissedAlarmTextBrowser ( dia, al, latest ); 885 MissedAlarmTextBrowser* matb = new MissedAlarmTextBrowser ( dia, al, latest );
886 connect( matb, SIGNAL( showIncidence( QString ) ),SLOT( showIncidence( QString ) )); 886 connect( matb, SIGNAL( showIncidence( QString ) ),SLOT( showIncidence( QString ) ));
887 lay->addWidget( matb ); 887 lay->addWidget( matb );
888 if ( QApplication::desktop()->width() == 480 || QApplication::desktop()->width() == 640 ) { 888 if ( QApplication::desktop()->width() == 480 || QApplication::desktop()->width() == 640 ) {
889 int wid = 210; 889 int wid = 210;
890 int x = QApplication::desktop()->width() - wid - 7; 890 int x = QApplication::desktop()->width() - wid - 7;
891 int y = QApplication::desktop()->height() - wid - 70; 891 int y = QApplication::desktop()->height() - wid - 70;
892 dia->setGeometry ( x,y,wid,wid); 892 dia->setGeometry ( x,y,wid,wid);
893 } else { 893 } else {
894 int si = 220; 894 int si = 220;
895 if ( QApplication::desktop()->width() > 470 ) 895 if ( QApplication::desktop()->width() > 470 )
896 si = 400; 896 si = 400;
897 dia->resize(si,si/2); 897 dia->resize(si,si/2);
898 } 898 }
899 dia->setBackgroundColor( QColor( 255, 255, 255 ) ); 899 dia->setBackgroundColor( QColor( 255, 255, 255 ) );
900 dia->show(); 900 dia->show();
901 901
902 } 902 }
903#if 0 903#if 0
904 // for creating timetracker test data 904 // for creating timetracker test data
905 qDebug("CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCc "); 905 qDebug("CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCc ");
906 Todo * nt; 906 Todo * nt;
907 mCalendar->close(); 907 mCalendar->close();
908 { 908 {
909 Todo * root1 = new Todo; 909 Todo * root1 = new Todo;
910 mCalendar->addTodo( root1 ); 910 mCalendar->addTodo( root1 );
911 root1->setSummary( "Project1"); 911 root1->setSummary( "Project1");
912 root1->setPriority( 1 ); 912 root1->setPriority( 1 );
913 root1->setCategories( QString( "Cat_Pro1") ); 913 root1->setCategories( QString( "Cat_Pro1") );
914 root1->setDescription( "This is a test description of a root Project" ); 914 root1->setDescription( "This is a test description of a root Project" );
915 root1->setPercentComplete( 20 ); 915 root1->setPercentComplete( 20 );
916 updateView(); 916 updateView();
917 QDateTime start = QDateTime ( QDate( 2004,11,1), QTime ( 7,30,0) ); 917 QDateTime start = QDateTime ( QDate( 2004,11,1), QTime ( 7,30,0) );
918 QDateTime end = QDateTime ( QDate( 2005,8,5), QTime ( 0,0,0) ); 918 QDateTime end = QDateTime ( QDate( 2005,8,5), QTime ( 0,0,0) );
919 919
920 nt = new Todo; 920 nt = new Todo;
921 mCalendar->addTodo( nt ); 921 mCalendar->addTodo( nt );
922 nt->setSummary( "Planning Project1"); 922 nt->setSummary( "Planning Project1");
923 nt->setPriority( 1 ); 923 nt->setPriority( 1 );
924 nt->setDescription( "This is a test description of Planning Project1" ); 924 nt->setDescription( "This is a test description of Planning Project1" );
925 nt->setPercentComplete( 20 ); 925 nt->setPercentComplete( 20 );
926 nt->setCategories( QString( "Cat_Pro1,Cat_Plan_Pro1") ); 926 nt->setCategories( QString( "Cat_Pro1,Cat_Plan_Pro1") );
927 927
928 928
929 Todo * sub1 = nt; 929 Todo * sub1 = nt;
930 sub1->setRelatedTo( root1 ); 930 sub1->setRelatedTo( root1 );
931 931
932 nt = new Todo; 932 nt = new Todo;
933 mCalendar->addTodo( nt ); 933 mCalendar->addTodo( nt );
934 nt->setSummary( "Planning Project1: Lutz"); 934 nt->setSummary( "Planning Project1: Lutz");
@@ -2438,204 +2438,214 @@ void CalendarView::showOpenError()
2438} 2438}
2439void CalendarView::setLoadedFileVersion(QDateTime dt) 2439void CalendarView::setLoadedFileVersion(QDateTime dt)
2440{ 2440{
2441 loadedFileVersion = dt; 2441 loadedFileVersion = dt;
2442} 2442}
2443bool CalendarView::checkFileChanged(QString fn) 2443bool CalendarView::checkFileChanged(QString fn)
2444{ 2444{
2445 QFileInfo finf ( fn ); 2445 QFileInfo finf ( fn );
2446 if ( !finf.exists() ) 2446 if ( !finf.exists() )
2447 return true; 2447 return true;
2448 QDateTime dt = finf.lastModified (); 2448 QDateTime dt = finf.lastModified ();
2449 if ( dt <= loadedFileVersion ) 2449 if ( dt <= loadedFileVersion )
2450 return false; 2450 return false;
2451 return true; 2451 return true;
2452 2452
2453} 2453}
2454void CalendarView::watchSavedFile() 2454void CalendarView::watchSavedFile()
2455{ 2455{
2456 QFileInfo finf ( MainWindow::defaultFileName()); 2456 QFileInfo finf ( MainWindow::defaultFileName());
2457 if ( !finf.exists() ) 2457 if ( !finf.exists() )
2458 return; 2458 return;
2459 QDateTime dt = finf.lastModified (); 2459 QDateTime dt = finf.lastModified ();
2460 if ( dt < loadedFileVersion ) { 2460 if ( dt < loadedFileVersion ) {
2461 //qDebug("watch %s %s ", dt.toString().latin1(), loadedFileVersion.toString().latin1()); 2461 //qDebug("watch %s %s ", dt.toString().latin1(), loadedFileVersion.toString().latin1());
2462 QTimer::singleShot( 1000 , this, SLOT ( watchSavedFile() ) ); 2462 QTimer::singleShot( 1000 , this, SLOT ( watchSavedFile() ) );
2463 return; 2463 return;
2464 } 2464 }
2465 loadedFileVersion = dt; 2465 loadedFileVersion = dt;
2466} 2466}
2467bool CalendarView::checkAllFileVersions() 2467bool CalendarView::checkAllFileVersions()
2468{ 2468{
2469 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; 2469 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
2470 KopiCalendarFile * cal = calendars.first(); 2470 KopiCalendarFile * cal = calendars.first();
2471 mCalendar->setDefaultCalendar( 1 ); 2471 mCalendar->setDefaultCalendar( 1 );
2472 mCalendar->setDefaultCalendarEnabledOnly(); 2472 mCalendar->setDefaultCalendarEnabledOnly();
2473 if ( !cal->isReadOnly && !cal->mErrorOnLoad ) { 2473 if ( !cal->isReadOnly && !cal->mErrorOnLoad ) {
2474 if ( !checkFileVersion(MainWindow::defaultFileName())) { 2474 if ( !checkFileVersion(MainWindow::defaultFileName())) {
2475 restoreCalendarSettings(); 2475 restoreCalendarSettings();
2476 return false; 2476 return false;
2477 } 2477 }
2478 } 2478 }
2479 cal = calendars.next(); 2479 cal = calendars.next();
2480 QDateTime storeTemp = loadedFileVersion; 2480 QDateTime storeTemp = loadedFileVersion;
2481 while ( cal ) { 2481 while ( cal ) {
2482 if ( !cal->isReadOnly && !cal->mErrorOnLoad ) { 2482 if ( !cal->isReadOnly && !cal->mErrorOnLoad ) {
2483 mCalendar->setDefaultCalendar( cal->mCalNumber ); 2483 mCalendar->setDefaultCalendar( cal->mCalNumber );
2484 mCalendar->setDefaultCalendarEnabledOnly(); 2484 mCalendar->setDefaultCalendarEnabledOnly();
2485 loadedFileVersion = cal->mLoadDt.addSecs( 15 ); 2485 loadedFileVersion = cal->mLoadDt.addSecs( 15 );
2486 if ( !checkFileVersion(cal->mFileName )) { 2486 if ( !checkFileVersion(cal->mFileName )) {
2487 loadedFileVersion = storeTemp; 2487 loadedFileVersion = storeTemp;
2488 restoreCalendarSettings(); 2488 restoreCalendarSettings();
2489 return false; 2489 return false;
2490 } 2490 }
2491 } 2491 }
2492 cal = calendars.next(); 2492 cal = calendars.next();
2493 } 2493 }
2494 loadedFileVersion = storeTemp; 2494 loadedFileVersion = storeTemp;
2495 return true; 2495 return true;
2496} 2496}
2497bool CalendarView::checkFileVersion(QString fn) 2497bool CalendarView::checkFileVersion(QString fn)
2498{ 2498{
2499 QFileInfo finf ( fn ); 2499 QFileInfo finf ( fn );
2500 if ( !finf.exists() ) 2500 if ( !finf.exists() )
2501 return true; 2501 return true;
2502 QDateTime dt = finf.lastModified (); 2502 QDateTime dt = finf.lastModified ();
2503 qDebug("loaded file version %s %s", fn.latin1(), loadedFileVersion.toString().latin1()); 2503 qDebug("loaded file version %s %s", fn.latin1(), loadedFileVersion.toString().latin1());
2504 qDebug("file on disk version %s %s", fn.latin1(),dt.toString().latin1()); 2504 qDebug("file on disk version %s %s", fn.latin1(),dt.toString().latin1());
2505 if ( dt <= loadedFileVersion ) 2505 if ( dt <= loadedFileVersion )
2506 return true; 2506 return true;
2507 int km = KMessageBox::warningYesNoCancel(this, i18n("\nThe file\n%1\non disk has changed!\nFile size: %2 bytes.\nLast modified: %3\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n").arg(KGlobal::formatMessage(fn,0)).arg( QString::number( finf.size())).arg( KGlobal::locale()->formatDateTime(finf.lastModified (), true, true)) , 2507 int km = KMessageBox::warningYesNoCancel(this, i18n("\nThe file\n%1\non disk has changed!\nFile size: %2 bytes.\nLast modified: %3\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n").arg(KGlobal::formatMessage(fn,0)).arg( QString::number( finf.size())).arg( KGlobal::locale()->formatDateTime(finf.lastModified (), true, true)) ,
2508 i18n("KO/Pi Warning"),i18n("Overwrite"), 2508 i18n("KO/Pi Warning"),i18n("Overwrite"),
2509 i18n("Sync+save")); 2509 i18n("Sync+save"));
2510 2510
2511 if ( km == KMessageBox::Cancel ) 2511 if ( km == KMessageBox::Cancel )
2512 return false; 2512 return false;
2513 if ( km == KMessageBox::Yes ) 2513 if ( km == KMessageBox::Yes )
2514 return true; 2514 return true;
2515 2515
2516 setSyncDevice("deleteaftersync" ); 2516 setSyncDevice("deleteaftersync" );
2517 mSyncManager->mAskForPreferences = true; 2517 mSyncManager->mAskForPreferences = true;
2518 mSyncManager->mSyncAlgoPrefs = 3; 2518 mSyncManager->mSyncAlgoPrefs = 3;
2519 mSyncManager->mWriteBackFile = false; 2519 mSyncManager->mWriteBackFile = false;
2520 mSyncManager->mWriteBackExistingOnly = false; 2520 mSyncManager->mWriteBackExistingOnly = false;
2521 mSyncManager->mShowSyncSummary = false; 2521 mSyncManager->mShowSyncSummary = false;
2522 syncCalendar( fn, 3 ); 2522 syncCalendar( fn, 3 );
2523 Event * e = getLastSyncEvent(); 2523 Event * e = getLastSyncEvent();
2524 if ( e ) 2524 if ( e )
2525 mCalendar->deleteEvent( e ); 2525 mCalendar->deleteEvent( e );
2526 return true; 2526 return true;
2527} 2527}
2528bool CalendarView::saveCalendars() 2528bool CalendarView::saveCalendars()
2529{ 2529{
2530 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; 2530 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
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 ) {
2538 mCalendar->setDefaultCalendar( cal->mCalNumber ); 2540 mCalendar->setDefaultCalendar( cal->mCalNumber );
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 )
2549{ 2559{
2550 2560
2551 // Store back all unsaved data into calendar object 2561 // Store back all unsaved data into calendar object
2552 // qDebug("file %s %d ", filename.latin1() , mViewManager->currentView() ); 2562 // qDebug("file %s %d ", filename.latin1() , mViewManager->currentView() );
2553 if ( mViewManager->currentView() ) 2563 if ( mViewManager->currentView() )
2554 mViewManager->currentView()->flushView(); 2564 mViewManager->currentView()->flushView();
2555 2565
2556 2566
2557 QDateTime lfv = QDateTime::currentDateTime().addSecs( -2); 2567 QDateTime lfv = QDateTime::currentDateTime().addSecs( -2);
2558 mStorage->setSaveFormat( new ICalFormat() ); 2568 mStorage->setSaveFormat( new ICalFormat() );
2559 mStorage->setFileName( filename ); 2569 mStorage->setFileName( filename );
2560 bool success; 2570 bool success;
2561 success = mStorage->save(); 2571 success = mStorage->save();
2562 if ( !success ) { 2572 if ( !success ) {
2563 return false; 2573 return false;
2564 } 2574 }
2565 if ( filename == MainWindow::defaultFileName() ) { 2575 if ( filename == MainWindow::defaultFileName() ) {
2566 setLoadedFileVersion( lfv ); 2576 setLoadedFileVersion( lfv );
2567 watchSavedFile(); 2577 watchSavedFile();
2568 } 2578 }
2569 return true; 2579 return true;
2570} 2580}
2571 2581
2572void CalendarView::closeCalendar() 2582void CalendarView::closeCalendar()
2573{ 2583{
2574 2584
2575 // child windows no longer valid 2585 // child windows no longer valid
2576 clearAllViews(); 2586 clearAllViews();
2577 emit closingDown(); 2587 emit closingDown();
2578 2588
2579 mCalendar->close(); 2589 mCalendar->close();
2580 setModified(false); 2590 setModified(false);
2581 updateView(); 2591 updateView();
2582} 2592}
2583 2593
2584void CalendarView::archiveCalendar() 2594void CalendarView::archiveCalendar()
2585{ 2595{
2586 mDialogManager->showArchiveDialog(); 2596 mDialogManager->showArchiveDialog();
2587} 2597}
2588 2598
2589 2599
2590void CalendarView::readSettings() 2600void CalendarView::readSettings()
2591{ 2601{
2592 2602
2593 2603
2594 // mViewManager->showAgendaView(); 2604 // mViewManager->showAgendaView();
2595 QString str; 2605 QString str;
2596 //qDebug("CalendarView::readSettings() "); 2606 //qDebug("CalendarView::readSettings() ");
2597 // read settings from the KConfig, supplying reasonable 2607 // read settings from the KConfig, supplying reasonable
2598 // defaults where none are to be found 2608 // defaults where none are to be found
2599 KConfig *config = KOGlobals::config(); 2609 KConfig *config = KOGlobals::config();
2600#ifndef KORG_NOSPLITTER 2610#ifndef KORG_NOSPLITTER
2601 config->setGroup("KOrganizer Geometry"); 2611 config->setGroup("KOrganizer Geometry");
2602 2612
2603 QValueList<int> sizes = config->readIntListEntry("Separator1"); 2613 QValueList<int> sizes = config->readIntListEntry("Separator1");
2604 if (sizes.count() != 2) { 2614 if (sizes.count() != 2) {
2605 sizes << mDateNavigator->minimumSizeHint().width(); 2615 sizes << mDateNavigator->minimumSizeHint().width();
2606 sizes << 300; 2616 sizes << 300;
2607 } 2617 }
2608 mPanner->setSizes(sizes); 2618 mPanner->setSizes(sizes);
2609 2619
2610 sizes = config->readIntListEntry("Separator2"); 2620 sizes = config->readIntListEntry("Separator2");
2611 if ( ( mResourceView && sizes.count() == 4 ) || 2621 if ( ( mResourceView && sizes.count() == 4 ) ||
2612 ( !mResourceView && sizes.count() == 3 ) ) { 2622 ( !mResourceView && sizes.count() == 3 ) ) {
2613 mLeftSplitter->setSizes(sizes); 2623 mLeftSplitter->setSizes(sizes);
2614 } 2624 }
2615#endif 2625#endif
2616 globalFlagBlockAgenda = 1; 2626 globalFlagBlockAgenda = 1;
2617 mViewManager->showAgendaView(); 2627 mViewManager->showAgendaView();
2618 //mViewManager->readSettings( config ); 2628 //mViewManager->readSettings( config );
2619 mTodoList->restoreLayout(config,QString("Todo Layout")); 2629 mTodoList->restoreLayout(config,QString("Todo Layout"));
2620 readFilterSettings(config); 2630 readFilterSettings(config);
2621 2631
2622#ifdef DESKTOP_VERSION 2632#ifdef DESKTOP_VERSION
2623 config->setGroup("WidgetLayout"); 2633 config->setGroup("WidgetLayout");
2624 QStringList list; 2634 QStringList list;
2625 list = config->readListEntry("MainLayout"); 2635 list = config->readListEntry("MainLayout");
2626 int x,y,w,h; 2636 int x,y,w,h;
2627 if ( ! list.isEmpty() ) { 2637 if ( ! list.isEmpty() ) {
2628 x = list[0].toInt(); 2638 x = list[0].toInt();
2629 y = list[1].toInt(); 2639 y = list[1].toInt();
2630 w = list[2].toInt(); 2640 w = list[2].toInt();
2631 h = list[3].toInt(); 2641 h = list[3].toInt();
2632 KApplication::testCoords( &x,&y,&w,&h ); 2642 KApplication::testCoords( &x,&y,&w,&h );
2633 topLevelWidget()->setGeometry(x,y,w,h); 2643 topLevelWidget()->setGeometry(x,y,w,h);
2634 2644
2635 } else { 2645 } else {
2636 topLevelWidget()->setGeometry( 40 ,40 , 640, 440); 2646 topLevelWidget()->setGeometry( 40 ,40 , 640, 440);
2637 } 2647 }
2638 list = config->readListEntry("EditEventLayout"); 2648 list = config->readListEntry("EditEventLayout");
2639 if ( ! list.isEmpty() ) { 2649 if ( ! list.isEmpty() ) {
2640 x = list[0].toInt(); 2650 x = list[0].toInt();
2641 y = list[1].toInt(); 2651 y = list[1].toInt();
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 94bc4c1..9c55e9f 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -413,204 +413,212 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
413 413
414 QTimer::singleShot( 1000, mView, SLOT ( checkFiles() )); 414 QTimer::singleShot( 1000, mView, SLOT ( checkFiles() ));
415} 415}
416MainWindow::~MainWindow() 416MainWindow::~MainWindow()
417{ 417{
418 //qDebug("MainWindow::~MainWindow() "); 418 //qDebug("MainWindow::~MainWindow() ");
419 //save toolbar location 419 //save toolbar location
420 delete mCalendar; 420 delete mCalendar;
421 delete mSyncManager; 421 delete mSyncManager;
422#ifndef DESKTOP_VERSION 422#ifndef DESKTOP_VERSION
423 if ( infrared ) 423 if ( infrared )
424 delete infrared; 424 delete infrared;
425#endif 425#endif
426 426
427 427
428} 428}
429void MainWindow::slotResetFocus() 429void MainWindow::slotResetFocus()
430{ 430{
431 //qDebug(" CalendarView::slotResetFocus() %x %x %x %x", qApp->focusWidget(), menuBar1, mView,iconToolBar); 431 //qDebug(" CalendarView::slotResetFocus() %x %x %x %x", qApp->focusWidget(), menuBar1, mView,iconToolBar);
432 mFocusLoop = 3; 432 mFocusLoop = 3;
433 QTimer::singleShot( 0, this, SLOT(slotResetFocusLoop() )); 433 QTimer::singleShot( 0, this, SLOT(slotResetFocusLoop() ));
434} 434}
435void MainWindow::slotResetFocusLoop() 435void MainWindow::slotResetFocusLoop()
436{ 436{
437 --mFocusLoop; 437 --mFocusLoop;
438 QWidget* fw = mView->viewManager()->currentView(); 438 QWidget* fw = mView->viewManager()->currentView();
439 if ( fw ) { 439 if ( fw ) {
440 //qDebug("loop "); 440 //qDebug("loop ");
441 fw->setFocus(); 441 fw->setFocus();
442 if ( qApp->focusWidget() != fw && mFocusLoop > 0 ) 442 if ( qApp->focusWidget() != fw && mFocusLoop > 0 )
443 QTimer::singleShot( 0, this, SLOT(slotResetFocusLoop() )); 443 QTimer::singleShot( 0, this, SLOT(slotResetFocusLoop() ));
444 } 444 }
445 445
446} 446}
447void MainWindow::disableBR(bool b) 447void MainWindow::disableBR(bool b)
448{ 448{
449#ifndef DESKTOP_VERSION 449#ifndef DESKTOP_VERSION
450 if ( b ) { 450 if ( b ) {
451 if ( infrared ) { 451 if ( infrared ) {
452 toggleBeamReceive(); 452 toggleBeamReceive();
453 mBRdisabled = true; 453 mBRdisabled = true;
454 } 454 }
455 mBRdisabled = true; 455 mBRdisabled = true;
456 } else { 456 } else {
457 if ( mBRdisabled ) { 457 if ( mBRdisabled ) {
458 mBRdisabled = false; 458 mBRdisabled = false;
459 //makes no sense,because other cal ap is probably running 459 //makes no sense,because other cal ap is probably running
460 // toggleBeamReceive(); 460 // toggleBeamReceive();
461 } 461 }
462 } 462 }
463#endif 463#endif
464 464
465} 465}
466bool MainWindow::beamReceiveEnabled() 466bool MainWindow::beamReceiveEnabled()
467{ 467{
468#ifndef DESKTOP_VERSION 468#ifndef DESKTOP_VERSION
469 return ( infrared != 0 ); 469 return ( infrared != 0 );
470#endif 470#endif
471 return false; 471 return false;
472} 472}
473 473
474void MainWindow::toggleBeamReceive() 474void MainWindow::toggleBeamReceive()
475{ 475{
476 if ( mBRdisabled ) 476 if ( mBRdisabled )
477 return; 477 return;
478#ifndef DESKTOP_VERSION 478#ifndef DESKTOP_VERSION
479 if ( infrared ) { 479 if ( infrared ) {
480 qDebug("KO: Disable BeamReceive "); 480 qDebug("KO: Disable BeamReceive ");
481 delete infrared; 481 delete infrared;
482 infrared = 0; 482 infrared = 0;
483 brAction->setOn(false); 483 brAction->setOn(false);
484 return; 484 return;
485 } 485 }
486 qDebug("KO: Enable BeamReceive "); 486 qDebug("KO: Enable BeamReceive ");
487 brAction->setOn(true); 487 brAction->setOn(true);
488 infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ; 488 infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ;
489 QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& ))); 489 QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& )));
490#endif 490#endif
491} 491}
492void MainWindow::showMaximized () 492void MainWindow::showMaximized ()
493{ 493{
494#ifndef DESKTOP_VERSION 494#ifndef DESKTOP_VERSION
495 if ( ! globalFlagBlockStartup ) 495 if ( ! globalFlagBlockStartup )
496 if ( mClosed ) 496 if ( mClosed )
497 mView->goToday(); 497 mView->goToday();
498#endif 498#endif
499 QWidget::showMaximized () ; 499 QWidget::showMaximized () ;
500 mClosed = false; 500 mClosed = false;
501} 501}
502void MainWindow::closeEvent( QCloseEvent* ce ) 502void MainWindow::closeEvent( QCloseEvent* ce )
503{ 503{
504 504
505 505
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;
512 516
513 } 517 }
514 518
515 switch( QMessageBox::information( this, "KO/Pi", 519 switch( QMessageBox::information( this, "KO/Pi",
516 i18n("Do you really want\nto close KO/Pi?"), 520 i18n("Do you really want\nto close KO/Pi?"),
517 i18n("Close"), i18n("No"), 521 i18n("Close"), i18n("No"),
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;
524 case 1: 532 case 1:
525 ce->ignore(); 533 ce->ignore();
526 break; 534 break;
527 case 2: 535 case 2:
528 536
529 default: 537 default:
530 break; 538 break;
531 } 539 }
532 540
533 541
534} 542}
535 543
536void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) 544void MainWindow::recieve( const QCString& cmsg, const QByteArray& data )
537{ 545{
538 QDataStream stream( data, IO_ReadOnly ); 546 QDataStream stream( data, IO_ReadOnly );
539 // QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" ); 547 // QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" );
540 //QString datamess; 548 //QString datamess;
541 //qDebug("message "); 549 //qDebug("message ");
542 qDebug("KO: QCOP message received: %s ", cmsg.data() ); 550 qDebug("KO: QCOP message received: %s ", cmsg.data() );
543 551
544 if ( cmsg == "setDocument(QString)" ) { 552 if ( cmsg == "setDocument(QString)" ) {
545 QDataStream stream( data, IO_ReadOnly ); 553 QDataStream stream( data, IO_ReadOnly );
546 QString fileName; 554 QString fileName;
547 stream >> fileName; 555 stream >> fileName;
548 //qDebug("filename %s ", fileName.latin1()); 556 //qDebug("filename %s ", fileName.latin1());
549 showMaximized(); 557 showMaximized();
550 raise(); 558 raise();
551 KOPrefs::instance()->mLastSyncedLocalFile = fileName ; 559 KOPrefs::instance()->mLastSyncedLocalFile = fileName ;
552 mSyncManager->slotSyncMenu( 1002 ); 560 mSyncManager->slotSyncMenu( 1002 );
553 return; 561 return;
554 } 562 }
555 563
556 if ( cmsg == "-writeFile" ) { 564 if ( cmsg == "-writeFile" ) {
557 // I made from the "-writeFile" an "-writeAlarm" 565 // I made from the "-writeFile" an "-writeAlarm"
558 mView->viewManager()->showWhatsNextView(); 566 mView->viewManager()->showWhatsNextView();
559 mCalendar->checkAlarmForIncidence( 0, true); 567 mCalendar->checkAlarmForIncidence( 0, true);
560 showMaximized(); 568 showMaximized();
561 raise(); 569 raise();
562 return; 570 return;
563 571
564 } 572 }
565 if ( cmsg == "-writeFileSilent" ) { 573 if ( cmsg == "-writeFileSilent" ) {
566 // I made from the "-writeFile" an "-writeAlarm" 574 // I made from the "-writeFile" an "-writeAlarm"
567 // mView->viewManager()->showWhatsNextView(); 575 // mView->viewManager()->showWhatsNextView();
568 mCalendar->checkAlarmForIncidence( 0, true); 576 mCalendar->checkAlarmForIncidence( 0, true);
569 //showMaximized(); 577 //showMaximized();
570 //raise(); 578 //raise();
571 hide(); 579 hide();
572 return; 580 return;
573 } 581 }
574 if ( cmsg == "-newCountdown" ) { 582 if ( cmsg == "-newCountdown" ) {
575 qDebug("newCountdown "); 583 qDebug("newCountdown ");
576 584
577 } 585 }
578 QString msg ; 586 QString msg ;
579 QString allmsg = cmsg; 587 QString allmsg = cmsg;
580 while ( allmsg.length() > 0 ) { 588 while ( allmsg.length() > 0 ) {
581 int nextC = allmsg.find( "-", 1 ); 589 int nextC = allmsg.find( "-", 1 );
582 if ( nextC == -1 ) { 590 if ( nextC == -1 ) {
583 msg = allmsg; 591 msg = allmsg;
584 allmsg = ""; 592 allmsg = "";
585 } else{ 593 } else{
586 msg = allmsg.left( nextC ); 594 msg = allmsg.left( nextC );
587 allmsg = allmsg.mid( nextC, allmsg.length()-nextC ); 595 allmsg = allmsg.mid( nextC, allmsg.length()-nextC );
588 } 596 }
589 //qDebug("msg: %s all: %s ", msg.latin1(), allmsg.latin1() ); 597 //qDebug("msg: %s all: %s ", msg.latin1(), allmsg.latin1() );
590 if ( msg == "-newEvent" ) { 598 if ( msg == "-newEvent" ) {
591 QTimer::singleShot( 0, mView, SLOT ( newEvent())); 599 QTimer::singleShot( 0, mView, SLOT ( newEvent()));
592 } 600 }
593 if ( msg == "-newTodo" ) { 601 if ( msg == "-newTodo" ) {
594 QTimer::singleShot( 0, mView, SLOT ( newTodo())); 602 QTimer::singleShot( 0, mView, SLOT ( newTodo()));
595 } 603 }
596 if ( msg == "-showWN" ) { 604 if ( msg == "-showWN" ) {
597 mView->viewManager()->showWhatsNextView(); 605 mView->viewManager()->showWhatsNextView();
598 } 606 }
599 if ( msg == "-showTodo" ) { 607 if ( msg == "-showTodo" ) {
600 mView->viewManager()->showTodoView(); 608 mView->viewManager()->showTodoView();
601 } 609 }
602 if ( msg == "-showList" ) { 610 if ( msg == "-showList" ) {
603 mView->viewManager()->showListView(); 611 mView->viewManager()->showListView();
604 } 612 }
605 else if ( msg == "-showDay" ) { 613 else if ( msg == "-showDay" ) {
606 mView->viewManager()->showDayView(); 614 mView->viewManager()->showDayView();
607 } 615 }
608 else if ( msg == "-showWWeek" ) { 616 else if ( msg == "-showWWeek" ) {
609 mView->viewManager()->showWorkWeekView(); 617 mView->viewManager()->showWorkWeekView();
610 } 618 }
611 else if ( msg == "-ringSync" ) { 619 else if ( msg == "-ringSync" ) {
612 QTimer::singleShot( 0, this, SLOT (startMultiSync())); 620 QTimer::singleShot( 0, this, SLOT (startMultiSync()));
613 } 621 }
614 else if ( msg == "-showWeek" ) { 622 else if ( msg == "-showWeek" ) {
615 mView->viewManager()->showWeekView(); 623 mView->viewManager()->showWeekView();
616 } 624 }
@@ -1909,194 +1917,194 @@ void MainWindow::saveOnClose()
1909 p->mToolBarUpF = filterToolBar->x() > width()/2 ; 1917 p->mToolBarUpF = filterToolBar->x() > width()/2 ;
1910 } 1918 }
1911#endif 1919#endif
1912 save(); 1920 save();
1913 mView->writeSettings(); 1921 mView->writeSettings();
1914 mView->checkSuspendAlarm(); 1922 mView->checkSuspendAlarm();
1915} 1923}
1916void MainWindow::slotModifiedChanged( bool ) 1924void MainWindow::slotModifiedChanged( bool )
1917{ 1925{
1918 if ( mBlockAtStartup ) 1926 if ( mBlockAtStartup )
1919 return; 1927 return;
1920 1928
1921 int msec; 1929 int msec;
1922 if ( mCalendarModifiedFlag ) { 1930 if ( mCalendarModifiedFlag ) {
1923 //qDebug(" MainWindow timer is running "); 1931 //qDebug(" MainWindow timer is running ");
1924 return; 1932 return;
1925 } 1933 }
1926 // we store the changes after 1 minute, 1934 // we store the changes after 1 minute,
1927 // and for safety reasons after 10 minutes again 1935 // and for safety reasons after 10 minutes again
1928 if ( !mSyncManager->blockSave() ) 1936 if ( !mSyncManager->blockSave() )
1929 msec = (1000 * 60*KOPrefs::instance()->mAutoSaveInterval) +1000; 1937 msec = (1000 * 60*KOPrefs::instance()->mAutoSaveInterval) +1000;
1930 else 1938 else
1931 msec = 1000 * 600; 1939 msec = 1000 * 600;
1932 mSaveTimer.start( msec, true ); // 1 minute 1940 mSaveTimer.start( msec, true ); // 1 minute
1933 qDebug("KO: Saving File in %d secs!", msec/1000); 1941 qDebug("KO: Saving File in %d secs!", msec/1000);
1934 mCalendarModifiedFlag = true; 1942 mCalendarModifiedFlag = true;
1935} 1943}
1936void MainWindow::saveStopTimer() 1944void MainWindow::saveStopTimer()
1937{ 1945{
1938 mSaveTimer.stop(); 1946 mSaveTimer.stop();
1939} 1947}
1940void MainWindow::backupAllFiles() 1948void MainWindow::backupAllFiles()
1941{ 1949{
1942 QDate reference ( 2000,1,1); 1950 QDate reference ( 2000,1,1);
1943 int daysTo = reference.daysTo ( QDate::currentDate() ); 1951 int daysTo = reference.daysTo ( QDate::currentDate() );
1944 setCaption(i18n("Creating backup ... please wait ..." )); 1952 setCaption(i18n("Creating backup ... please wait ..." ));
1945 qDebug("KO: Last backup was %d days ago ", daysTo - KOPrefs::instance()->mLastBackupDate); 1953 qDebug("KO: Last backup was %d days ago ", daysTo - KOPrefs::instance()->mLastBackupDate);
1946 // we need the file path, the backup dir and the number of bups as param 1954 // we need the file path, the backup dir and the number of bups as param
1947 QString bupDir = KPimGlobalPrefs::instance()->mBackupDatadir; 1955 QString bupDir = KPimGlobalPrefs::instance()->mBackupDatadir;
1948 if ( KPimGlobalPrefs::instance()->mBackupUseDefaultDir) 1956 if ( KPimGlobalPrefs::instance()->mBackupUseDefaultDir)
1949 bupDir = KGlobalSettings::backupDataDir(); 1957 bupDir = KGlobalSettings::backupDataDir();
1950 int retval = KApplication::createBackup( defaultFileName(), bupDir, KPimGlobalPrefs::instance()->mBackupNumbers ); 1958 int retval = KApplication::createBackup( defaultFileName(), bupDir, KPimGlobalPrefs::instance()->mBackupNumbers );
1951 if ( retval == 0 ) { 1959 if ( retval == 0 ) {
1952 setCaption(i18n("Backup cancelled" )); 1960 setCaption(i18n("Backup cancelled" ));
1953 qDebug("KO: Backup cancelled. Will try again tomorrow "); 1961 qDebug("KO: Backup cancelled. Will try again tomorrow ");
1954 // retval == 0 : backup skipped for today, try again tomorrow 1962 // retval == 0 : backup skipped for today, try again tomorrow
1955 KOPrefs::instance()->mLastBackupDate = daysTo- KPimGlobalPrefs::instance()->mBackupDayCount+1; 1963 KOPrefs::instance()->mLastBackupDate = daysTo- KPimGlobalPrefs::instance()->mBackupDayCount+1;
1956 } else if ( retval == 1 ){ 1964 } else if ( retval == 1 ){
1957 qDebug("KO: Backup created."); 1965 qDebug("KO: Backup created.");
1958 // backup ok 1966 // backup ok
1959 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; 1967 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
1960 KopiCalendarFile * cal = calendars.first(); 1968 KopiCalendarFile * cal = calendars.first();
1961 cal = calendars.next(); 1969 cal = calendars.next();
1962 while ( cal ) { 1970 while ( cal ) {
1963 if ( !cal->mErrorOnLoad ) { 1971 if ( !cal->mErrorOnLoad ) {
1964 KApplication::createBackup( cal->mFileName, bupDir, KPimGlobalPrefs::instance()->mBackupNumbers ); 1972 KApplication::createBackup( cal->mFileName, bupDir, KPimGlobalPrefs::instance()->mBackupNumbers );
1965 } 1973 }
1966 cal = calendars.next(); 1974 cal = calendars.next();
1967 } 1975 }
1968 KOPrefs::instance()->mLastBackupDate = daysTo; 1976 KOPrefs::instance()->mLastBackupDate = daysTo;
1969 setCaption(i18n("Backup succesfully finished" )); 1977 setCaption(i18n("Backup succesfully finished" ));
1970 } else if ( retval == 2 ){ 1978 } else if ( retval == 2 ){
1971 setCaption(i18n("Backup globally disabled" )); 1979 setCaption(i18n("Backup globally disabled" ));
1972 qDebug("KO: Backup globally cancelled."); 1980 qDebug("KO: Backup globally cancelled.");
1973 // backup globally cancelled 1981 // backup globally cancelled
1974 KPimGlobalPrefs::instance()->mBackupEnabled = false; 1982 KPimGlobalPrefs::instance()->mBackupEnabled = false;
1975 } 1983 }
1976 // retval == 3: do nothing, try again later 1984 // retval == 3: do nothing, try again later
1977} 1985}
1978void MainWindow::save() 1986void MainWindow::save()
1979{ 1987{
1980 1988
1981 if ( mView->viewManager()->journalView() ) 1989 if ( mView->viewManager()->journalView() )
1982 mView->viewManager()->journalView()->checkModified(); 1990 mView->viewManager()->journalView()->checkModified();
1983 if ( !mCalendarModifiedFlag ) { 1991 if ( !mCalendarModifiedFlag ) {
1984 qDebug("KO: Calendar not modified. Nothing saved."); 1992 qDebug("KO: Calendar not modified. Nothing saved.");
1985 return; 1993 return;
1986 } 1994 }
1987 if ( mSyncManager->blockSave() ) { 1995 if ( mSyncManager->blockSave() ) {
1988 slotModifiedChanged( true ); 1996 slotModifiedChanged( true );
1989 return; 1997 return;
1990 } 1998 }
1991 mSyncManager->setBlockSave(true); 1999 mSyncManager->setBlockSave(true);
1992 if ( mView->checkAllFileVersions() ) { 2000 if ( mView->checkAllFileVersions() ) {
1993 if ( KPimGlobalPrefs::instance()->mBackupEnabled ){ 2001 if ( KPimGlobalPrefs::instance()->mBackupEnabled ){
1994 QDate reference ( 2000,1,1); 2002 QDate reference ( 2000,1,1);
1995 int daysTo = reference.daysTo ( QDate::currentDate() ); 2003 int daysTo = reference.daysTo ( QDate::currentDate() );
1996 if ( daysTo - KPimGlobalPrefs::instance()->mBackupDayCount >= KOPrefs::instance()->mLastBackupDate ) { 2004 if ( daysTo - KPimGlobalPrefs::instance()->mBackupDayCount >= KOPrefs::instance()->mLastBackupDate ) {
1997 backupAllFiles(); 2005 backupAllFiles();
1998 } 2006 }
1999 ; // KPimGlobalPrefs::instance()->mLastBackupDate 2007 ; // KPimGlobalPrefs::instance()->mLastBackupDate
2000 } 2008 }
2001 QTime neededSaveTime = QDateTime::currentDateTime().time(); 2009 QTime neededSaveTime = QDateTime::currentDateTime().time();
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;
2010 savemes.sprintf(i18n("KO/Pi:File Saved. Needed %d sec, %d ms"),(msNeeded/1000)%100,msNeeded%1000 ); 2018 savemes.sprintf(i18n("KO/Pi:File Saved. Needed %d sec, %d ms"),(msNeeded/1000)%100,msNeeded%1000 );
2011 if ( !isMinimized () ) 2019 if ( !isMinimized () )
2012 setCaption(savemes); 2020 setCaption(savemes);
2013 else 2021 else
2014 qDebug(savemes); 2022 qDebug(savemes);
2015 } else { 2023 } else {
2016 setCaption(i18n("Saving cancelled!")); 2024 setCaption(i18n("Saving cancelled!"));
2017 mCalendarModifiedFlag = false; 2025 mCalendarModifiedFlag = false;
2018 slotModifiedChanged( true ); 2026 slotModifiedChanged( true );
2019 } 2027 }
2020 mSyncManager->setBlockSave( false ); 2028 mSyncManager->setBlockSave( false );
2021} 2029}
2022 2030
2023void MainWindow::keyReleaseEvent ( QKeyEvent * e) 2031void MainWindow::keyReleaseEvent ( QKeyEvent * e)
2024{ 2032{
2025 if ( !e->isAutoRepeat() ) { 2033 if ( !e->isAutoRepeat() ) {
2026 mFlagKeyPressed = false; 2034 mFlagKeyPressed = false;
2027 } 2035 }
2028} 2036}
2029void MainWindow::keyPressEvent ( QKeyEvent * e ) 2037void MainWindow::keyPressEvent ( QKeyEvent * e )
2030{ 2038{
2031 qApp->processEvents(); 2039 qApp->processEvents();
2032 if ( e->isAutoRepeat() && !mFlagKeyPressed ) { 2040 if ( e->isAutoRepeat() && !mFlagKeyPressed ) {
2033 e->ignore(); 2041 e->ignore();
2034 // qDebug(" ignore %d",e->isAutoRepeat() ); 2042 // qDebug(" ignore %d",e->isAutoRepeat() );
2035 return; 2043 return;
2036 } 2044 }
2037 if (! e->isAutoRepeat() ) 2045 if (! e->isAutoRepeat() )
2038 mFlagKeyPressed = true; 2046 mFlagKeyPressed = true;
2039 KOPrefs *p = KOPrefs::instance(); 2047 KOPrefs *p = KOPrefs::instance();
2040 bool showSelectedDates = false; 2048 bool showSelectedDates = false;
2041 int size; 2049 int size;
2042 int pro = 0; 2050 int pro = 0;
2043 //qDebug("MainWindow::keyPressEvent "); 2051 //qDebug("MainWindow::keyPressEvent ");
2044 switch ( e->key() ) { 2052 switch ( e->key() ) {
2045 case Qt::Key_Right: 2053 case Qt::Key_Right:
2046 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) 2054 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton)
2047 mView->goNextMonth(); 2055 mView->goNextMonth();
2048 else 2056 else
2049 mView->goNext(); 2057 mView->goNext();
2050 showSelectedDates = true; 2058 showSelectedDates = true;
2051 break; 2059 break;
2052 case Qt::Key_Left: 2060 case Qt::Key_Left:
2053 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) 2061 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
2054 mView->goPreviousMonth(); 2062 mView->goPreviousMonth();
2055 else 2063 else
2056 mView->goPrevious(); 2064 mView->goPrevious();
2057 showSelectedDates = true; 2065 showSelectedDates = true;
2058 break; 2066 break;
2059 case Qt::Key_Down: 2067 case Qt::Key_Down:
2060 mView->viewManager()->agendaView()->scrollOneHourDown(); 2068 mView->viewManager()->agendaView()->scrollOneHourDown();
2061 break; 2069 break;
2062 case Qt::Key_Up: 2070 case Qt::Key_Up:
2063 mView->viewManager()->agendaView()->scrollOneHourUp(); 2071 mView->viewManager()->agendaView()->scrollOneHourUp();
2064 break; 2072 break;
2065 case Qt::Key_K: 2073 case Qt::Key_K:
2066 mView->viewManager()->showMonthViewWeek(); 2074 mView->viewManager()->showMonthViewWeek();
2067 break; 2075 break;
2068 case Qt::Key_I: 2076 case Qt::Key_I:
2069 mView->showIncidence(); 2077 mView->showIncidence();
2070 break; 2078 break;
2071 case Qt::Key_Delete: 2079 case Qt::Key_Delete:
2072 case Qt::Key_Backspace: 2080 case Qt::Key_Backspace:
2073 mView->deleteIncidence(); 2081 mView->deleteIncidence();
2074 break; 2082 break;
2075 case Qt::Key_D: 2083 case Qt::Key_D:
2076 mView->viewManager()->showDayView(); 2084 mView->viewManager()->showDayView();
2077 showSelectedDates = true; 2085 showSelectedDates = true;
2078 break; 2086 break;
2079 case Qt::Key_O: 2087 case Qt::Key_O:
2080 mView->toggleFilerEnabled( ); 2088 mView->toggleFilerEnabled( );
2081 break; 2089 break;
2082 case Qt::Key_0: 2090 case Qt::Key_0:
2083 case Qt::Key_1: 2091 case Qt::Key_1:
2084 case Qt::Key_2: 2092 case Qt::Key_2:
2085 case Qt::Key_3: 2093 case Qt::Key_3:
2086 case Qt::Key_4: 2094 case Qt::Key_4:
2087 case Qt::Key_5: 2095 case Qt::Key_5:
2088 case Qt::Key_6: 2096 case Qt::Key_6:
2089 case Qt::Key_7: 2097 case Qt::Key_7:
2090 case Qt::Key_8: 2098 case Qt::Key_8:
2091 case Qt::Key_9: 2099 case Qt::Key_9:
2092 pro = e->key()-48; 2100 pro = e->key()-48;
2093 if ( pro == 0 ) 2101 if ( pro == 0 )
2094 pro = 10; 2102 pro = 10;
2095 if ( e->state() == Qt::ControlButton) 2103 if ( e->state() == Qt::ControlButton)
2096 pro += 10; 2104 pro += 10;
2097 break; 2105 break;
2098 case Qt::Key_M: 2106 case Qt::Key_M:
2099 mView->viewManager()->showMonthView(); 2107 mView->viewManager()->showMonthView();
2100 showSelectedDates = true; 2108 showSelectedDates = true;
2101 break; 2109 break;
2102 case Qt::Key_Insert: 2110 case Qt::Key_Insert: