summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-06-04 09:25:09 (UTC)
committer zautrix <zautrix>2005-06-04 09:25:09 (UTC)
commitd40cf5135c640506011334364274b8ee5df9998b (patch) (unidiff)
tree56895a78e170856ff641dfa13f2f6eb4cc2b3488
parent0e0ac7a92ac2fe052b3e72d49e505a078b05e7f3 (diff)
downloadkdepimpi-d40cf5135c640506011334364274b8ee5df9998b.zip
kdepimpi-d40cf5135c640506011334364274b8ee5df9998b.tar.gz
kdepimpi-d40cf5135c640506011334364274b8ee5df9998b.tar.bz2
fix
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt2
-rw-r--r--korganizer/calendarview.cpp10
-rw-r--r--korganizer/calendarview.h1
-rw-r--r--korganizer/mainwindow.cpp7
4 files changed, 14 insertions, 6 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index cc8102c..5a27a10 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1181,201 +1181,201 @@
1181{ "Tomorrow","Morgen" }, 1181{ "Tomorrow","Morgen" },
1182{ "Day before yesterday","Vorgestern" }, 1182{ "Day before yesterday","Vorgestern" },
1183{ "Size %1","Größe %1" }, 1183{ "Size %1","Größe %1" },
1184{ "New Agendasize: %1","Neue Agendagröße: %1" }, 1184{ "New Agendasize: %1","Neue Agendagröße: %1" },
1185{ " (%1 y.)"," (%1 J.)" }, 1185{ " (%1 y.)"," (%1 J.)" },
1186{ "Allday:","Ganztägig:" }, 1186{ "Allday:","Ganztägig:" },
1187{ "compl.todos","erled.Todos" }, 1187{ "compl.todos","erled.Todos" },
1188{ "Day view","Tagesansicht" }, 1188{ "Day view","Tagesansicht" },
1189{ "Next days","Nächste Tage" }, 1189{ "Next days","Nächste Tage" },
1190{ "Next week","Nächste Woche" }, 1190{ "Next week","Nächste Woche" },
1191{ "Next two weeks","Nächste zwei Wochen" }, 1191{ "Next two weeks","Nächste zwei Wochen" },
1192{ "This month","Dieser Monat" }, 1192{ "This month","Dieser Monat" },
1193{ "Journal view","Journal" }, 1193{ "Journal view","Journal" },
1194{ "Display all opened","Zeige alle geöffnet" }, 1194{ "Display all opened","Zeige alle geöffnet" },
1195{ "Display all closed","Zeige alle geschlossen" }, 1195{ "Display all closed","Zeige alle geschlossen" },
1196{ "Display all flat","Zeige alle flach" }, 1196{ "Display all flat","Zeige alle flach" },
1197{ "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, 1197{ "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" },
1198{ "Default todo done color:","Standard Todo erledigt Farbe" }, 1198{ "Default todo done color:","Standard Todo erledigt Farbe" },
1199{ "Select week %1-%2","Wähle Woche %1-%2" }, 1199{ "Select week %1-%2","Wähle Woche %1-%2" },
1200{ "Select Week","Wähle Woche" }, 1200{ "Select Week","Wähle Woche" },
1201{ "Set alarm for selected...","Setze Alarm für Selekt..." }, 1201{ "Set alarm for selected...","Setze Alarm für Selekt..." },
1202{ "Set Alarm!","Setze Alarm!" }, 1202{ "Set Alarm!","Setze Alarm!" },
1203{ "Changed alarm for %1 items","Alarm für %1 Items geändert" }, 1203{ "Changed alarm for %1 items","Alarm für %1 Items geändert" },
1204{ " and "," und " }, 1204{ " and "," und " },
1205{ "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, 1205{ "<IMG src="%1"> only )","nur <IMG src="%1"> )" },
1206{ "Mail to selected","Mail an Ausgewählte" }, 1206{ "Mail to selected","Mail an Ausgewählte" },
1207{ "Mail to all","Mail an Alle" }, 1207{ "Mail to all","Mail an Alle" },
1208{ "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, 1208{ "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" },
1209{ "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, 1209{ "Set reminder ON with offset to:","Alarm AN mit Offset auf:" },
1210{ " on"," am" }, 1210{ " on"," am" },
1211{ " completed on "," erledigt am " }, 1211{ " completed on "," erledigt am " },
1212{ "Save as Event template","Speichere als Vorlage" }, 1212{ "Save as Event template","Speichere als Vorlage" },
1213{ "Load Event template","Lade Termin Vorlage" }, 1213{ "Load Event template","Lade Termin Vorlage" },
1214{ "Save as Journal template","Speichere als Journal Vorlage" }, 1214{ "Save as Journal template","Speichere als Journal Vorlage" },
1215{ "Insert Journal template","Füge Journal Vorlage ein" }, 1215{ "Insert Journal template","Füge Journal Vorlage ein" },
1216{ "Sub todos:<br>","Unter Todos:<br>" }, 1216{ "Sub todos:<br>","Unter Todos:<br>" },
1217{ "Parent todo:<br>","Über Todo:<br>" }, 1217{ "Parent todo:<br>","Über Todo:<br>" },
1218{ "Set current as color category","Setze Gewählte als Farbkategorie" }, 1218{ "Set current as color category","Setze Gewählte als Farbkategorie" },
1219{ " completed"," erledigt" }, 1219{ " completed"," erledigt" },
1220{ "(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!","(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi basiert auf KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) und das KDE Team.\nKOrganizer/Pi ist lizensiert unter der GPL.\nKO/Pi kann kompiliert werden für\nLinux, Zaurus-PDA und Windows\nwww.pi-sync.info --- www.korganizer.org\nBesonderen Dank an Michael und Ben\nfür intensives Testen!" }, 1220{ "(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!","(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi basiert auf KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) und das KDE Team.\nKOrganizer/Pi ist lizensiert unter der GPL.\nKO/Pi kann kompiliert werden für\nLinux, Zaurus-PDA und Windows\nwww.pi-sync.info --- www.korganizer.org\nBesonderen Dank an Michael und Ben\nfür intensives Testen!" },
1221{ "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, 1221{ "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." },
1222{ "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, 1222{ "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." },
1223{ "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, 1223{ "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." },
1224{ "Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?","Verbindungsversuch wegen\nZeitüberschreitung gescheitert!\nWurde vergessen Pi-Sync auf\nder Gegenstelle anzuschalten?" }, 1224{ "Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?","Verbindungsversuch wegen\nZeitüberschreitung gescheitert!\nWurde vergessen Pi-Sync auf\nder Gegenstelle anzuschalten?" },
1225{ "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, 1225{ "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." },
1226{ "Error","Fehler" }, 1226{ "Error","Fehler" },
1227{ ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, 1227{ ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." },
1228{ "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, 1228{ "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." },
1229{ "Warning","Warnung" }, 1229{ "Warning","Warnung" },
1230{ "Select week number","Wähle Wochen Nummer" }, 1230{ "Select week number","Wähle Wochen Nummer" },
1231{ "Februar","Februar" }, 1231{ "Februar","Februar" },
1232{ "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, 1232{ "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" },
1233{ "W","W" }, 1233{ "W","W" },
1234{ "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, 1234{ "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" },
1235{ "T: %1","T: %1" }, 1235{ "T: %1","T: %1" },
1236{ "Start: ","Start: " }, 1236{ "Start: ","Start: " },
1237{ "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, 1237{ "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " },
1238{ "Password for remote access:","Passwort für fernen Zugriff:" }, 1238{ "Password for remote access:","Passwort für fernen Zugriff:" },
1239{ "Remote IP address:","Ferne IP Adresse:" }, 1239{ "Remote IP address:","Ferne IP Adresse:" },
1240{ "Remote port number:","Ferne Port Nummer:" }, 1240{ "Remote port number:","Ferne Port Nummer:" },
1241{ "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, 1241{ "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." },
1242{ "Remote from: ","Fern von: " }, 1242{ "Remote from: ","Fern von: " },
1243{ "Local from: ","Lokal von: " }, 1243{ "Local from: ","Lokal von: " },
1244{ "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n","Synchronisationsübersicht:\n\n %d lokal hinzugefügt\n %d fern hinzugefügt\n %d lokal geändert\n %d fern geändert\n %d lokal gelöscht\n %d fern gelöscht\n %d eingehende ausgefiltert\n %d ausgehende ausgefiltert\n" }, 1244{ "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n","Synchronisationsübersicht:\n\n %d lokal hinzugefügt\n %d fern hinzugefügt\n %d lokal geändert\n %d fern geändert\n %d lokal gelöscht\n %d fern gelöscht\n %d eingehende ausgefiltert\n %d ausgehende ausgefiltert\n" },
1245{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, 1245{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" },
1246{ "Write back","Schreibe zurück" }, 1246{ "Write back","Schreibe zurück" },
1247{ "KO/Pi Synchronization","KO/Pi Synchronisation" }, 1247{ "KO/Pi Synchronization","KO/Pi Synchronisation" },
1248{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, 1248{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" },
1249{ "Received sync request","Sync Anfrage erhalten" }, 1249{ "Received sync request","Sync Anfrage erhalten" },
1250{ "Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog.","Ferne Synchronisation ...\n\nBenutze diese Anwendung nicht!\n\nWenn das Syncen fehlschlägt kann\ndieser Dialog geschlossen werden." }, 1250{ "Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog.","Ferne Synchronisation ...\n\nBenutze diese Anwendung nicht!\n\nWenn das Syncen fehlschlägt kann\ndieser Dialog geschlossen werden." },
1251{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, 1251{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." },
1252{ "Data saved to temp file!","Daten in temp Datei gespeichert!" }, 1252{ "Data saved to temp file!","Daten in temp Datei gespeichert!" },
1253{ "Sending file...","Sende Datei..." }, 1253{ "Sending file...","Sende Datei..." },
1254{ "Waiting for synced file...","Warte auf gesyncte Daten..." }, 1254{ "Waiting for synced file...","Warte auf gesyncte Daten..." },
1255{ "Receiving synced file...","Gesyncte Daten erhalten..." }, 1255{ "Receiving synced file...","Gesyncte Daten erhalten..." },
1256{ "Received %1 bytes","%1 Bytes erhalten" }, 1256{ "Received %1 bytes","%1 Bytes erhalten" },
1257{ "Writing file to disk...","Speichere Datei..." }, 1257{ "Writing file to disk...","Speichere Datei..." },
1258{ "Pi-Sync successful!","Pi-Sync erfolgreich!" }, 1258{ "Pi-Sync successful!","Pi-Sync erfolgreich!" },
1259{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, 1259{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" },
1260{ "Synchronize!","Synchronisiere!" }, 1260{ "Synchronize!","Synchronisiere!" },
1261{ "High clock skew!","Großer Uhrzeitunterschied!" }, 1261{ "High clock skew!","Großer Uhrzeitunterschied!" },
1262{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, 1262{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" },
1263{ "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" }, 1263{ "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" },
1264{ "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, 1264{ "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." },
1265{ "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, 1265{ "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" },
1266{ "List week view","Listenwochenansicht" }, 1266{ "List week view","Listenwochenansicht" },
1267{ "List week","Listenwochenansicht" }, 1267{ "List week","Listenwochenansicht" },
1268{ "Next Week","Nächste Woche" }, 1268{ "Next Week","Nächste Woche" },
1269{ "Previous Week","Vorherige Woche" }, 1269{ "Previous Week","Vorherige Woche" },
1270{ "No items were found matching\nyour search expression.\nUse the wildcard characters\n'*' and '?' where needed.","Keine Einträge gefunden die\ndem Suchausdruck entsprechen.\nBenutze Platzhalter Zeichen\n'*' und '?' wo benötigt." }, 1270{ "No items were found matching\nyour search expression.\nUse the wildcard characters\n'*' and '?' where needed.","Keine Einträge gefunden die\ndem Suchausdruck entsprechen.\nBenutze Platzhalter Zeichen\n'*' und '?' wo benötigt." },
1271{ "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, 1271{ "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" },
1272{ "Details","Details" }, 1272{ "Details","Details" },
1273{ "Created time","Erstellt Zeit" }, 1273{ "Created time","Erstellt Zeit" },
1274{ "Last modified time","Geändert Zeit" }, 1274{ "Last modified time","Geändert Zeit" },
1275{ "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, 1275{ "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" },
1276{ "View Options","Anzeige Optionen" }, 1276{ "View Options","Anzeige Optionen" },
1277{ "<b>Created: ","<b>Erstellt am: " }, 1277{ "<b>Created: ","<b>Erstellt am: " },
1278{ "<b>Last modified: ","<b>Zuletzt geändert am: " }, 1278{ "<b>Last modified: ","<b>Zuletzt geändert am: " },
1279{ "Journal: ","Journal: " }, 1279{ "Journal: ","Journal: " },
1280{ "yearly","jährlich" }, 1280{ "yearly","jährlich" },
1281{ "(%1) ","%1-" }, 1281{ "(%1) ","%1-" },
1282{ "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, 1282{ "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" },
1283{ "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, 1283{ "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" },
1284{ "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, 1284{ "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" },
1285{ "Summary/Loc.","Titel/Ort" }, 1285{ "Summary/Loc.","Titel/Ort" },
1286{ "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, 1286{ "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." },
1287{ "Week Number","Wochennummer" }, 1287{ "Week Number","Wochennummer" },
1288{ "Import","Importiere" }, 1288{ "Import","Importiere" },
1289{ "Export","Exportiere" }, 1289{ "Export","Exportiere" },
1290{ "Beam","Beame" }, 1290{ "Beam","Beame" },
1291{ "Export selected","Exportiere Selektierte" }, 1291{ "Export selected","Exportiere Selektierte" },
1292{ "As iCal (ics) file...","Als iCal (ics) Datei..." }, 1292{ "As iCal (ics) file...","Als iCal (ics) Datei..." },
1293{ "As vCal (vcs) file...","Als vCal (vcs) Datei..." }, 1293{ "As vCal (vcs) file...","Als vCal (vcs) Datei..." },
1294{ "Journal/Details...","Journale/Details..." }, 1294{ "Journal/Details...","Journale/Details..." },
1295{ "Agenda View","Agenda Ansicht" }, 1295{ "Agenda View","Agenda Ansicht" },
1296{ "Show current time","Zeige aktuelle Zeit" }, 1296{ "Show current time","Zeige aktuelle Zeit" },
1297{ "Edit new item","Bearbeite neuen Eintrag" }, 1297{ "Edit new item","Bearbeite neuen Eintrag" },
1298{ "Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals","Bitte wählen Sie mindestens\neinen dieser Typen\num darin zu suchen:\n\nTermine\nTodos\nJournale" }, 1298{ "Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals","Bitte wählen Sie mindestens\neinen dieser Typen\num darin zu suchen:\n\nTermine\nTodos\nJournale" },
1299{ "There is no next alarm.","Es gibt keinen nächsten Alarm." }, 1299{ "There is no next alarm.","Es gibt keinen nächsten Alarm." },
1300{ "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" }, 1300{ "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" },
1301{ "The next alarm is in:\n","Der nächste Alarm ist in:\n" }, 1301{ "The next alarm is in:\n","Der nächste Alarm ist in:\n" },
1302{ "%1 days\n","%1 Tagen\n" }, 1302{ "%1 days\n","%1 Tagen\n" },
1303{ "1 day\n","1 Tag\n" }, 1303{ "1 day\n","1 Tag\n" },
1304{ "%1 hours\n","%1 Stunden\n" }, 1304{ "%1 hours\n","%1 Stunden\n" },
1305{ "1 hour\n","1 Stunde\n" }, 1305{ "1 hour\n","1 Stunde\n" },
1306{ "%1 minutes\n","%1 Minuten\n" }, 1306{ "%1 minutes\n","%1 Minuten\n" },
1307{ "1 minute\n","1 Minute\n" }, 1307{ "1 minute\n","1 Minute\n" },
1308{ "Only one toolbar","Nur eine Toolbar" }, 1308{ "Only one toolbar","Nur eine Toolbar" },
1309{ "Print","Drucke" }, 1309{ "Print","Drucke" },
1310{ "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." }, 1310{ "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." },
1311{ "There is nothing selected!","Es ist nichts ausgewählt!" }, 1311{ "There is nothing selected!","Es ist nichts ausgewählt!" },
1312{ "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " }, 1312{ "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " },
1313{ "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" }, 1313{ "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" },
1314{ "This prints the view as you see it.\n(With the complete content, of course.)\nYou may change the print layout by resizing the view.\nPrint unscaled may print several pages\ndepending on the amount of data.\nPrint scaled down will print all on one page.\nPrint scaled up/down will print all on one page,\nbut will scale up the text to page boundaries,\nif the text is smaller than the page.\nYou can select page geometry setup in the next dialog.\n","Dies druckt die Ansicht wie man sie sieht.\n(Mit dem kompletten Inhalt natürlich.)\nMan kann das Layout ändern durch ändern der Fenstergröße.\nDrucke unskaliert druckt ggf. mehrere Seiten\nabhängig von der Menge der Daten.\nDrucke runterskaliert um auf eine Seite zu passen\ndruckt alles auf eine Seite.\nDrucke hoch/runterskaliert um genau auf eine Seite zu passen\nvergrößert den Text gegebenenfalls.\nDas Seitenlayout kann im nächsten Dialog gewählt werden.\n" }, 1314{ "This prints the view as you see it.\n(With the complete content, of course.)\nYou may change the print layout by resizing the view.\nPrint unscaled may print several pages\ndepending on the amount of data.\nPrint scaled down will print all on one page.\nPrint scaled up/down will print all on one page,\nbut will scale up the text to page boundaries,\nif the text is smaller than the page.\nYou can select page geometry setup in the next dialog.\n","Dies druckt die Ansicht wie man sie sieht.\n(Mit dem kompletten Inhalt natürlich.)\nMan kann das Layout ändern durch ändern der Fenstergröße.\nDrucke unskaliert druckt ggf. mehrere Seiten\nabhängig von der Menge der Daten.\nDrucke runterskaliert um auf eine Seite zu passen\ndruckt alles auf eine Seite.\nDrucke hoch/runterskaliert um genau auf eine Seite zu passen\nvergrößert den Text gegebenenfalls.\nDas Seitenlayout kann im nächsten Dialog gewählt werden.\n" },
1315{ "KO/Pi Printout","KO/Pi Ausdruck" }, 1315{ "KO/Pi Printout","KO/Pi Ausdruck" },
1316{ "Print unscaled","Drucke unskaliert" }, 1316{ "Print unscaled","Drucke unskaliert" },
1317{ "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." }, 1317{ "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." },
1318{ "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." }, 1318{ "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." },
1319{ "Printout Mode","Druck Modus" }, 1319{ "Printout Mode","Druck Modus" },
1320{ "Filter menu icon","Filtermenu Icon" }, 1320{ "Filter menu icon","Filtermenu Icon" },
1321{ "<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n","<p><b>A+(shift oder ctrl)</b>: Zeige Zeit bis zum nächsten Alarm</p>\n" }, 1321{ "<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n","<p><b>A+(shift oder ctrl)</b>: Zeige Zeit bis zum nächsten Alarm</p>\n" },
1322{ "<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n","<p><b>N</b>: Wechsle zur nächsten Ansicht, die ein Icon in der Toolbar hat</p>\n" }, 1322{ "<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n","<p><b>N</b>: Wechsle zur nächsten Ansicht, die ein Icon in der Toolbar hat</p>\n" },
1323{ "%1d","%1t" }, 1323{ "%1d","%1t" },
1324{ "%1h","%1std" }, 1324{ "%1h","%1std" },
1325{ "%1min","%1min" }, 1325{ "%1min","%1min" },
1326{ "( %1 before )","( %1 vorher )" }, 1326{ "( %1 before )","( %1 vorher )" },
1327{ "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" }, 1327{ "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" },
1328{ "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" }, 1328{ "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" },
1329{ "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." }, 1329{ "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." },
1330{ "Show Sync Events","Zeige Sync-Ereignisse" }, 1330{ "Show Sync Events","Zeige Sync-Ereignisse" },
1331{ "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" }, 1331{ "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" },
1332{ "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" }, 1332{ "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" },
1333{ " on "," am " }, 1333{ " on "," am " },
1334{ "On: ","Am: " }, 1334{ "On: ","Am: " },
1335{ "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" }, 1335{ "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" },
1336{ "Start/Stop todo...","Starte/Stoppe Todo..." }, 1336{ "Start/Stop todo...","Starte/Stoppe Todo..." },
1337{ "Color for running todos:","Farbe für laufende Todos:" }, 1337{ "Color for running todos:","Farbe für laufende Todos:" },
1338{ "The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?","Das Todo\n%1\nist gestartet.\nWollen Sie es\nauf gestoppt setzen?" }, 1338{ "The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?","Das Todo\n%1\nist gestartet.\nWollen Sie es\nauf gestoppt setzen?" },
1339{ "Todo is started","Todo ist gestartet" }, 1339{ "Todo is started","Todo ist gestartet" },
1340{ "Stop todo","Stoppe Todo" }, 1340{ "Stop todo","Stoppe Todo" },
1341{ "Todo is stopped","Todo ist gestoppt" }, 1341{ "Todo is stopped","Todo ist gestoppt" },
1342{ "Start todo","Starte Todo" }, 1342{ "Start todo","Starte Todo" },
1343{ "The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?","Das Todo\n%1\nist gestoppt.\nWollen Sie es auf\ngestartet setzen?" }, 1343{ "The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?","Das Todo\n%1\nist gestoppt.\nWollen Sie es auf\ngestartet setzen?" },
1344{ "The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?","Das Todo\n%1\nwird geklont!\nEs hat Untertodos!\nMöchten Sie alle\nUntertodos auch klonen?" }, 1344{ "The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?","Das Todo\n%1\nwird geklont!\nEs hat Untertodos!\nMöchten Sie alle\nUntertodos auch klonen?" },
1345{ "Todo has subtodos","Todo hat Untertodos" }, 1345{ "Todo has subtodos","Todo hat Untertodos" },
1346{ "Block popup until mouse button release","Sperre Popup bis Mausknopf losgelassen" }, 1346{ "Block popup until mouse button release","Sperre Popup bis Mausknopf losgelassen" },
1347{ "Colors","Farben" }, 1347{ "Colors","Farben" },
1348{ "Click on new parent item","Klicke auf neues Übertodo" }, 1348{ "Click on new parent item","Klicke auf neues Übertodo" },
1349{ "Reparenting aborted!","Übertodo setzen abgebrochen" }, 1349{ "Reparenting aborted!","Übertodo setzen abgebrochen" },
1350{ "Cannot move Todo to itself\nor a child of itself","Kann nicht Todo auf\nsich selbst oder\nein Untertodo verschieben" }, 1350{ "Cannot move Todo to itself\nor a child of itself","Kann nicht Todo auf\nsich selbst oder\nein Untertodo verschieben" },
1351{ "Recursive reparenting not possible!","Rekursives Verschieben nicht möglich" }, 1351{ "Recursive reparenting not possible!","Rekursives Verschieben nicht möglich" },
1352{ "Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)","Entferne alle erledigten Todos?\n(Erledigte wiederholende Todos\nwerden nicht gelöscht!)" }, 1352{ "Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)","Entferne alle erledigten Todos?\n(Erledigte wiederholende Todos\nwerden nicht gelöscht!)" },
1353{ "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, 1353{ "Alternating background of list views","Abwechselnder Hintergrund für Listen" },
1354{ "times","Zeiten" }, 1354{ "times","Zeiten" },
1355{ "The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?","Das Todo\n%1\nhat Untertodos!\nMöchten Sie die Kategorien\nauch für alle Untertodos setzen?" }, 1355{ "The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?","Das Todo\n%1\nhat Untertodos!\nMöchten Sie die Kategorien\nauch für alle Untertodos setzen?" },
1356{ "Backup enabled","Backup angeschaltet" }, 1356{ "Backup enabled","Backup angeschaltet" },
1357{ "Use standard backup dir","Standard Backupverzeichnis" }, 1357{ "Use standard backup dir","Standard Backupverzeichnis" },
1358{ "Number of Backups:","Anzahl der Backups" }, 1358{ "Number of Backups:","Anzahl der Backups" },
1359{ "Make backup every ","Mache ein Backup alle " }, 1359{ "Make backup every ","Mache ein Backup alle " },
1360{ " days"," Tage" }, 1360{ " days"," Tage" },
1361{ "Creating backup ... please wait ...","Erzeuge Backup ... bitte warten ..." }, 1361{ "Creating backup ... please wait ...","Erzeuge Backup ... bitte warten ..." },
1362{ "Backup Failed!","Backup Problem!" }, 1362{ "Backup Failed!","Backup Problem!" },
1363{ "Try again now","Versuche jetzt nochmal" }, 1363{ "Try again now","Versuche jetzt nochmal" },
1364{ "Try again later","Versuche später nochmal" }, 1364{ "Try again later","Versuche später nochmal" },
1365{ "Try again tomorrow","Versuche morgen nochmal" }, 1365{ "Try again tomorrow","Versuche morgen nochmal" },
1366{ "Disable backup","Schalte Backup ab" }, 1366{ "Disable backup","Schalte Backup ab" },
1367{ "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" }, 1367{ "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" },
1368{ "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" }, 1368{ "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" },
1369{ "Choose action","Wähle Aktion" }, 1369{ "Choose action","Wähle Aktion" },
1370{ "Comment for todo:","Kommentar zum Todo:" }, 1370{ "Comment for todo:","Kommentar zum Todo:" },
1371{ "Stop+note","Stop+Notiz" }, 1371{ "Stop+note","Stop+Notiz" },
1372{ "Agenda view shows completed todos","Agenda Ansicht zeigt erledigte Todos" }, 1372{ "Agenda view shows completed todos","Agenda Ansicht zeigt erledigte Todos" },
1373{ "KO/Pi: Missing alarm notification!","KO/Pi: Benachrichtigung über verpasste Alarme!" }, 1373{ "KO/Pi: Missing alarms!","KO/Pi: Verpasste Alarme!" },
1374{ "You missed the alarms for the following events or todos:","Sie verpassten die Alarme für folgende Termine oder Todos:" }, 1374{ "You missed the alarms for the following events or todos:","Sie verpassten die Alarme für folgende Termine oder Todos:" },
1375{ "","" }, 1375{ "","" },
1376{ "","" }, 1376{ "","" },
1377{ "","" }, 1377{ "","" },
1378{ "","" }, 1378{ "","" },
1379{ "","" }, 1379{ "","" },
1380{ "","" }, 1380{ "","" },
1381{ "","" }, \ No newline at end of file 1381{ "","" }, \ No newline at end of file
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 5132f98..42166ab 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -22,384 +22,388 @@
22 but WITHOUT ANY WARRANTY; without even the implied warranty of 22 but WITHOUT ANY WARRANTY; without even the implied warranty of
23 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the 23 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
24 GNU General Public License for more details. 24 GNU General Public License for more details.
25 25
26 You should have received a copy of the GNU General Public License 26 You should have received a copy of the GNU General Public License
27 along with this program; if not, write to the Free Software 27 along with this program; if not, write to the Free Software
28 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 28 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29*/ 29*/
30 30
31#include <stdlib.h> 31#include <stdlib.h>
32 32
33#include <qapplication.h> 33#include <qapplication.h>
34#include <qradiobutton.h> 34#include <qradiobutton.h>
35#include <qbuttongroup.h> 35#include <qbuttongroup.h>
36#include <qlayout.h> 36#include <qlayout.h>
37#include <qclipboard.h> 37#include <qclipboard.h>
38#include <qcursor.h> 38#include <qcursor.h>
39#include <qmessagebox.h> 39#include <qmessagebox.h>
40#include <qprogressbar.h> 40#include <qprogressbar.h>
41#include <qmultilineedit.h> 41#include <qmultilineedit.h>
42#include <qtimer.h> 42#include <qtimer.h>
43#include <qwidgetstack.h> 43#include <qwidgetstack.h>
44#include <qptrlist.h> 44#include <qptrlist.h>
45#include <qregexp.h> 45#include <qregexp.h>
46#include <qgroupbox.h> 46#include <qgroupbox.h>
47#include <qfile.h> 47#include <qfile.h>
48#include <qdir.h> 48#include <qdir.h>
49#ifndef KORG_NOSPLITTER 49#ifndef KORG_NOSPLITTER
50#include <qsplitter.h> 50#include <qsplitter.h>
51#endif 51#endif
52 52
53#include <kglobal.h> 53#include <kglobal.h>
54#include <kdebug.h> 54#include <kdebug.h>
55#include <kstandarddirs.h> 55#include <kstandarddirs.h>
56#include <kfiledialog.h> 56#include <kfiledialog.h>
57#include <kmessagebox.h> 57#include <kmessagebox.h>
58#include <knotifyclient.h> 58#include <knotifyclient.h>
59#include <kconfig.h> 59#include <kconfig.h>
60 60
61#include <libkdepim/ksyncprefsdialog.h> 61#include <libkdepim/ksyncprefsdialog.h>
62#include <krun.h> 62#include <krun.h>
63#include <kdirwatch.h> 63#include <kdirwatch.h>
64#include <libkdepim/kdatepicker.h> 64#include <libkdepim/kdatepicker.h>
65#include <libkdepim/ksyncprofile.h> 65#include <libkdepim/ksyncprofile.h>
66#include <libkdepim/kpimglobalprefs.h> 66#include <libkdepim/kpimglobalprefs.h>
67 67
68#include <libkcal/vcaldrag.h> 68#include <libkcal/vcaldrag.h>
69#include <libkcal/icaldrag.h> 69#include <libkcal/icaldrag.h>
70#include <libkcal/icalformat.h> 70#include <libkcal/icalformat.h>
71#include <libkcal/vcalformat.h> 71#include <libkcal/vcalformat.h>
72#include <libkcal/scheduler.h> 72#include <libkcal/scheduler.h>
73#include <libkcal/calendarlocal.h> 73#include <libkcal/calendarlocal.h>
74#include <libkcal/journal.h> 74#include <libkcal/journal.h>
75#include <libkcal/calfilter.h> 75#include <libkcal/calfilter.h>
76#include <libkcal/attendee.h> 76#include <libkcal/attendee.h>
77#include <libkcal/dndfactory.h> 77#include <libkcal/dndfactory.h>
78#include <libkcal/freebusy.h> 78#include <libkcal/freebusy.h>
79#include <libkcal/filestorage.h> 79#include <libkcal/filestorage.h>
80#include <libkcal/calendarresources.h> 80#include <libkcal/calendarresources.h>
81#include <libkcal/qtopiaformat.h> 81#include <libkcal/qtopiaformat.h>
82#include "../kalarmd/alarmdialog.h" 82#include "../kalarmd/alarmdialog.h"
83 83
84#ifndef DESKTOP_VERSION 84#ifndef DESKTOP_VERSION
85#include <libkcal/sharpformat.h> 85#include <libkcal/sharpformat.h>
86#include <externalapphandler.h> 86#include <externalapphandler.h>
87#endif 87#endif
88#include <libkcal/phoneformat.h> 88#include <libkcal/phoneformat.h>
89#ifndef KORG_NOMAIL 89#ifndef KORG_NOMAIL
90#include "komailclient.h" 90#include "komailclient.h"
91#endif 91#endif
92#ifndef KORG_NOPRINTER 92#ifndef KORG_NOPRINTER
93#include "calprinter.h" 93#include "calprinter.h"
94#endif 94#endif
95#ifndef KORG_NOPLUGINS 95#ifndef KORG_NOPLUGINS
96#include "kocore.h" 96#include "kocore.h"
97#endif 97#endif
98#include "koeventeditor.h" 98#include "koeventeditor.h"
99#include "kotodoeditor.h" 99#include "kotodoeditor.h"
100#include "koprefs.h" 100#include "koprefs.h"
101#include "koeventviewerdialog.h" 101#include "koeventviewerdialog.h"
102#include "publishdialog.h" 102#include "publishdialog.h"
103#include "kofilterview.h" 103#include "kofilterview.h"
104#include "koglobals.h" 104#include "koglobals.h"
105#include "koviewmanager.h" 105#include "koviewmanager.h"
106#include "koagendaview.h" 106#include "koagendaview.h"
107#include "kodialogmanager.h" 107#include "kodialogmanager.h"
108#include "outgoingdialog.h" 108#include "outgoingdialog.h"
109#include "incomingdialog.h" 109#include "incomingdialog.h"
110#include "datenavigatorcontainer.h" 110#include "datenavigatorcontainer.h"
111#include "statusdialog.h" 111#include "statusdialog.h"
112#include "kdatenavigator.h" 112#include "kdatenavigator.h"
113#include "kotodoview.h" 113#include "kotodoview.h"
114#include "datenavigator.h" 114#include "datenavigator.h"
115#include "resourceview.h" 115#include "resourceview.h"
116#include "navigatorbar.h" 116#include "navigatorbar.h"
117#include "searchdialog.h" 117#include "searchdialog.h"
118#include "mainwindow.h" 118#include "mainwindow.h"
119 119
120#include "calendarview.h" 120#include "calendarview.h"
121#ifndef DESKTOP_VERSION 121#ifndef DESKTOP_VERSION
122#include <qtopia/alarmserver.h> 122#include <qtopia/alarmserver.h>
123#endif 123#endif
124#ifndef _WIN32_ 124#ifndef _WIN32_
125#include <stdlib.h> 125#include <stdlib.h>
126#include <stdio.h> 126#include <stdio.h>
127#include <unistd.h> 127#include <unistd.h>
128#else 128#else
129#include <qprocess.h> 129#include <qprocess.h>
130#endif 130#endif
131 131
132#ifdef DESKTOP_VERSION 132#ifdef DESKTOP_VERSION
133#include <kabc/stdaddressbook.h> 133#include <kabc/stdaddressbook.h>
134#endif 134#endif
135using namespace KOrg; 135using namespace KOrg;
136using namespace KCal; 136using namespace KCal;
137extern int globalFlagBlockAgenda; 137extern int globalFlagBlockAgenda;
138extern int globalFlagBlockStartup; 138extern int globalFlagBlockStartup;
139 139
140 140
141MissedAlarmTextBrowser::MissedAlarmTextBrowser(QWidget *parent, QPtrList<Incidence> alarms,QDateTime start ) : QTextBrowser(parent) 141MissedAlarmTextBrowser::MissedAlarmTextBrowser(QWidget *parent, QPtrList<Incidence> alarms,QDateTime start ) : QTextBrowser(parent)
142 142
143{ 143{
144 mAlarms = alarms; 144 mAlarms = alarms;
145 setBackgroundColor( QColor( 86, 153, 205 ) ); 145 setBackgroundColor( QColor( 86, 153, 205 ) );
146 QString mText = "<table width=\"100%\">\n"; 146 QString mText = "<table width=\"100%\">\n";
147 //mText += "<tr bgcolor=\"#3679AD\"><td><h2>"; 147 //mText += "<tr bgcolor=\"#3679AD\"><td><h2>";
148#ifdef DESKTOP_VERSION 148#ifdef DESKTOP_VERSION
149 mText += "<tr bgcolor=\"#5699CD\"><td align=\"center\"><h2>"; 149 mText += "<tr bgcolor=\"#5699CD\"><td align=\"center\"><h2>";
150#else 150#else
151 mText += "<tr bgcolor=\"#5699CD\"><td align=\"center\"><h3>"; 151 mText += "<tr bgcolor=\"#5699CD\"><td align=\"center\"><h3>";
152#endif 152#endif
153 // mText += "<img src=\""; 153 // mText += "<img src=\"";
154 // mText += ipath; 154 // mText += ipath;
155 // mText += "\">"; 155 // mText += "\">";
156 //mEventDate = QDate::currentDate(); 156 //mEventDate = QDate::currentDate();
157#ifdef DESKTOP_VERSION 157#ifdef DESKTOP_VERSION
158 mText += "<font color=\"#FFFFFF\"> <em>" + i18n("You missed the alarms for the following events or todos:")+"</em></font></h2>"; 158 mText += "<font color=\"#FFFFFF\"> <em>" + i18n("You missed the alarms for the following events or todos:")+"</em></font></h2>";
159#else 159#else
160 mText += "<font color=\"#FFFFFF\"> <em>" + i18n("You missed the alarms for the following events or todos:")+"</em></font></h3>"; 160 mText += "<font color=\"#FFFFFF\"> <em>" + i18n("You missed the alarms for the following events or todos:")+"</em></font></h3>";
161#endif 161#endif
162 mText += "</td></tr>\n<tr bgcolor=\"#FF997D\"><td>"; 162 mText += "</td></tr>\n<tr bgcolor=\"#FF997D\"><td>";
163 163
164 Incidence * inc = getNextInc( start ); 164 Incidence * inc = getNextInc( start );
165 int time = 0; 165 int time = 0;
166 mText += "<table>"; 166 mText += "<table>";
167 while ( inc ) { 167 while ( inc ) {
168 QDateTime dt ; 168 QDateTime dt ;
169 QString tempText = "<a "; 169 QString tempText = "<a ";
170 bool ok; 170 bool ok;
171 dt = inc->getNextOccurence( start, &ok ); 171 dt = inc->getNextOccurence( start, &ok );
172 if ( !ok ) continue; 172 if ( !ok ) continue;
173 if ( inc->type() == "Event" ) { 173 if ( inc->type() == "Event" ) {
174 tempText += "href=\"event:"; 174 tempText += "href=\"event:";
175 } else if ( inc->type() == "Todo" ) { 175 } else if ( inc->type() == "Todo" ) {
176 tempText += "href=\"todo:"; 176 tempText += "href=\"todo:";
177 } 177 }
178 tempText += inc->uid() + "\">"; 178 tempText += inc->uid() + "\">";
179 if ( inc->type() == "Todo" ) 179 if ( inc->type() == "Todo" )
180 tempText += i18n("Todo: "); 180 tempText += i18n("Todo: ");
181 if ( inc->summary().length() > 0 ) 181 if ( inc->summary().length() > 0 )
182 tempText += inc->summary(); 182 tempText += inc->summary();
183 else 183 else
184 tempText += i18n("-no summary-"); 184 tempText += i18n("-no summary-");
185 QString timestr; 185 QString timestr;
186 if (!inc->doesFloat()) 186 if (!inc->doesFloat())
187 timestr = KGlobal::locale()->formatDateTime( dt, KOPrefs::instance()->mShortDateInViewer) +": "; 187 timestr = KGlobal::locale()->formatDateTime( dt, KOPrefs::instance()->mShortDateInViewer) +": ";
188 else 188 else
189 timestr = KGlobal::locale()->formatDate( dt.date() , KOPrefs::instance()->mShortDateInViewer) +": "; 189 timestr = KGlobal::locale()->formatDate( dt.date() , KOPrefs::instance()->mShortDateInViewer) +": ";
190 if ( dt.date() == QDate::currentDate() && time == 0 ) { 190 if ( dt.date() == QDate::currentDate() && time == 0 ) {
191 time = 1; 191 time = 1;
192 mText +="</table>"; 192 mText +="</table>";
193 mText += "</td></tr>\n<tr bgcolor=\"#FFDC64\"><td>"; 193 mText += "</td></tr>\n<tr bgcolor=\"#FFDC64\"><td>";
194 mText += "<table>"; 194 mText += "<table>";
195 195
196 } 196 }
197 if ( dt.date() > QDate::currentDate() && time != 2 ) { 197 if ( dt.date() > QDate::currentDate() && time != 2 ) {
198 time = 2; 198 time = 2;
199 mText +="</table>"; 199 mText +="</table>";
200 mText += "</td></tr>\n<tr bgcolor=\"#6AFF6A\"><td>"; 200 mText += "</td></tr>\n<tr bgcolor=\"#6AFF6A\"><td>";
201 mText += "<table>"; 201 mText += "<table>";
202 } 202 }
203 mText +="<tr><td><b>"; 203 mText +="<tr><td><b>";
204 mText += timestr; 204 mText += timestr;
205 mText += "</b></td><td>"; 205 mText += "</b></td><td>";
206 mText += tempText; 206 mText += tempText;
207 mText += "</td></tr>\n"; 207 mText += "</td></tr>\n";
208 inc = getNextInc( start ); 208 inc = getNextInc( start );
209 } 209 }
210 mText +="</table>"; 210 mText +="</table>";
211 setText( mText ); 211 setText( mText );
212} 212}
213 213
214MissedAlarmTextBrowser::~MissedAlarmTextBrowser()
215{
216 //qDebug("delete MissedAlarmTextBrowser::~MissedAlarmTextBrowser() ");
217}
214Incidence * MissedAlarmTextBrowser::getNextInc( QDateTime start ) 218Incidence * MissedAlarmTextBrowser::getNextInc( QDateTime start )
215{ 219{
216 QDateTime dt ; 220 QDateTime dt ;
217 Incidence * retInc; 221 Incidence * retInc;
218 Incidence * inc = mAlarms.first(); 222 Incidence * inc = mAlarms.first();
219 if ( inc == 0 ) 223 if ( inc == 0 )
220 return 0; 224 return 0;
221 bool ok; 225 bool ok;
222 dt = inc->getNextOccurence( start, &ok ); 226 dt = inc->getNextOccurence( start, &ok );
223 if ( ! ok ) return 0; 227 if ( ! ok ) return 0;
224 QDateTime dtn ; 228 QDateTime dtn ;
225 retInc = inc; 229 retInc = inc;
226 inc = mAlarms.next(); 230 inc = mAlarms.next();
227 while ( inc ) { 231 while ( inc ) {
228 dtn = inc->getNextOccurence( start, &ok ); 232 dtn = inc->getNextOccurence( start, &ok );
229 if ( ! ok ) return 0; 233 if ( ! ok ) return 0;
230 if ( dtn < dt ) { 234 if ( dtn < dt ) {
231 dt = dtn; 235 dt = dtn;
232 retInc = inc; 236 retInc = inc;
233 } 237 }
234 inc = mAlarms.next(); 238 inc = mAlarms.next();
235 } 239 }
236 mAlarms.remove( retInc ); 240 mAlarms.remove( retInc );
237 return retInc; 241 return retInc;
238 242
239} 243}
240void MissedAlarmTextBrowser::setSource(const QString & n) 244void MissedAlarmTextBrowser::setSource(const QString & n)
241{ 245{
242 if (n.startsWith("event:")) { 246 if (n.startsWith("event:")) {
243#ifdef DESKTOP_VERSION 247#ifdef DESKTOP_VERSION
244 emit showIncidence(n.mid(8)); 248 emit showIncidence(n.mid(8));
245#else 249#else
246 emit showIncidence(n.mid(6)); 250 emit showIncidence(n.mid(6));
247#endif 251#endif
248 return; 252 return;
249 } else if (n.startsWith("todo:")) { 253 } else if (n.startsWith("todo:")) {
250#ifdef DESKTOP_VERSION 254#ifdef DESKTOP_VERSION
251 emit showIncidence(n.mid(7)); 255 emit showIncidence(n.mid(7));
252#else 256#else
253 emit showIncidence(n.mid(5)); 257 emit showIncidence(n.mid(5));
254#endif 258#endif
255 return; 259 return;
256 } 260 }
257} 261}
258 262
259 263
260class KOBeamPrefs : public QDialog 264class KOBeamPrefs : public QDialog
261{ 265{
262 public: 266 public:
263 KOBeamPrefs( QWidget *parent=0, const char *name=0 ) : 267 KOBeamPrefs( QWidget *parent=0, const char *name=0 ) :
264 QDialog( parent, name, true ) 268 QDialog( parent, name, true )
265 { 269 {
266 setCaption( i18n("Beam Options") ); 270 setCaption( i18n("Beam Options") );
267 QVBoxLayout* lay = new QVBoxLayout( this ); 271 QVBoxLayout* lay = new QVBoxLayout( this );
268 lay->setSpacing( 3 ); 272 lay->setSpacing( 3 );
269 lay->setMargin( 3 ); 273 lay->setMargin( 3 );
270 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("File format"), this ); 274 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("File format"), this );
271 lay->addWidget( format ); 275 lay->addWidget( format );
272 format->setExclusive ( true ) ; 276 format->setExclusive ( true ) ;
273 QButtonGroup* time = new QButtonGroup(1, Horizontal, i18n("Time format"), this ); 277 QButtonGroup* time = new QButtonGroup(1, Horizontal, i18n("Time format"), this );
274 lay->addWidget( time ); time->setExclusive ( true ) ; 278 lay->addWidget( time ); time->setExclusive ( true ) ;
275 vcal = new QRadioButton(" vCalendar ", format ); 279 vcal = new QRadioButton(" vCalendar ", format );
276 ical = new QRadioButton(" iCalendar ", format ); 280 ical = new QRadioButton(" iCalendar ", format );
277 vcal->setChecked( true ); 281 vcal->setChecked( true );
278 tz = new QRadioButton(i18n(" With timezone "), time ); 282 tz = new QRadioButton(i18n(" With timezone "), time );
279 local = new QRadioButton(i18n(" Local time "), time ); 283 local = new QRadioButton(i18n(" Local time "), time );
280 tz->setChecked( true ); 284 tz->setChecked( true );
281 QPushButton * ok = new QPushButton( i18n("Beam via IR!"), this ); 285 QPushButton * ok = new QPushButton( i18n("Beam via IR!"), this );
282 lay->addWidget( ok ); 286 lay->addWidget( ok );
283 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 287 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
284 lay->addWidget( cancel ); 288 lay->addWidget( cancel );
285 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); 289 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
286 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 290 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
287 resize( 200, 200 ); 291 resize( 200, 200 );
288 } 292 }
289 293
290 bool beamVcal() { return vcal->isChecked(); } 294 bool beamVcal() { return vcal->isChecked(); }
291 bool beamLocal() { return local->isChecked(); } 295 bool beamLocal() { return local->isChecked(); }
292private: 296private:
293 QRadioButton* vcal, *ical, *local, *tz; 297 QRadioButton* vcal, *ical, *local, *tz;
294}; 298};
295class KOCatPrefs : public QDialog 299class KOCatPrefs : public QDialog
296{ 300{
297 public: 301 public:
298 KOCatPrefs( QWidget *parent=0, const char *name=0 ) : 302 KOCatPrefs( QWidget *parent=0, const char *name=0 ) :
299 QDialog( parent, name, true ) 303 QDialog( parent, name, true )
300 { 304 {
301 setCaption( i18n("Manage new Categories") ); 305 setCaption( i18n("Manage new Categories") );
302 QVBoxLayout* lay = new QVBoxLayout( this ); 306 QVBoxLayout* lay = new QVBoxLayout( this );
303 lay->setSpacing( 3 ); 307 lay->setSpacing( 3 );
304 lay->setMargin( 3 ); 308 lay->setMargin( 3 );
305 QLabel * lab = new QLabel( i18n("After importing/loading/syncing\nthere may be new categories in\nevents or todos\nwhich are not in the category list.\nPlease choose what to do:\n "), this ); 309 QLabel * lab = new QLabel( i18n("After importing/loading/syncing\nthere may be new categories in\nevents or todos\nwhich are not in the category list.\nPlease choose what to do:\n "), this );
306 lay->addWidget( lab ); 310 lay->addWidget( lab );
307 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this ); 311 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this );
308 lay->addWidget( format ); 312 lay->addWidget( format );
309 format->setExclusive ( true ) ; 313 format->setExclusive ( true ) ;
310 addCatBut = new QRadioButton(i18n("Add to category list"), format ); 314 addCatBut = new QRadioButton(i18n("Add to category list"), format );
311 new QRadioButton(i18n("Remove from Events/Todos"), format ); 315 new QRadioButton(i18n("Remove from Events/Todos"), format );
312 addCatBut->setChecked( true ); 316 addCatBut->setChecked( true );
313 QPushButton * ok = new QPushButton( i18n("OK"), this ); 317 QPushButton * ok = new QPushButton( i18n("OK"), this );
314 lay->addWidget( ok ); 318 lay->addWidget( ok );
315 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 319 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
316 lay->addWidget( cancel ); 320 lay->addWidget( cancel );
317 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); 321 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
318 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 322 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
319 resize( 200, 200 ); 323 resize( 200, 200 );
320 } 324 }
321 325
322 bool addCat() { return addCatBut->isChecked(); } 326 bool addCat() { return addCatBut->isChecked(); }
323private: 327private:
324 QRadioButton* addCatBut; 328 QRadioButton* addCatBut;
325}; 329};
326 330
327 331
328 332
329CalendarView::CalendarView( CalendarResources *calendar, 333CalendarView::CalendarView( CalendarResources *calendar,
330 QWidget *parent, const char *name ) 334 QWidget *parent, const char *name )
331 : CalendarViewBase( parent, name ), 335 : CalendarViewBase( parent, name ),
332 mCalendar( calendar ), 336 mCalendar( calendar ),
333 mResourceManager( calendar->resourceManager() ) 337 mResourceManager( calendar->resourceManager() )
334{ 338{
335 339
336 mEventEditor = 0; 340 mEventEditor = 0;
337 mTodoEditor = 0; 341 mTodoEditor = 0;
338 342
339 init(); 343 init();
340} 344}
341 345
342CalendarView::CalendarView( Calendar *calendar, 346CalendarView::CalendarView( Calendar *calendar,
343 QWidget *parent, const char *name ) 347 QWidget *parent, const char *name )
344 : CalendarViewBase( parent, name ), 348 : CalendarViewBase( parent, name ),
345 mCalendar( calendar ), 349 mCalendar( calendar ),
346 mResourceManager( 0 ) 350 mResourceManager( 0 )
347{ 351{
348 352
349 mEventEditor = 0; 353 mEventEditor = 0;
350 mTodoEditor = 0; 354 mTodoEditor = 0;
351 init(); 355 init();
352} 356}
353 357
354void CalendarView::init() 358void CalendarView::init()
355{ 359{
356 mNextAlarmDateTime = QDateTime::currentDateTime(); 360 mNextAlarmDateTime = QDateTime::currentDateTime();
357 setFocusPolicy ( NoFocus ); 361 setFocusPolicy ( NoFocus );
358 mViewerCallerIsSearchDialog = false; 362 mViewerCallerIsSearchDialog = false;
359 mBlockShowDates = false; 363 mBlockShowDates = false;
360 beamDialog = new KOBeamPrefs(); 364 beamDialog = new KOBeamPrefs();
361 mDatePickerMode = 0; 365 mDatePickerMode = 0;
362 mCurrentSyncDevice = ""; 366 mCurrentSyncDevice = "";
363 writeLocale(); 367 writeLocale();
364 mViewManager = new KOViewManager( this ); 368 mViewManager = new KOViewManager( this );
365 mDialogManager = new KODialogManager( this ); 369 mDialogManager = new KODialogManager( this );
366 mEventViewerDialog = 0; 370 mEventViewerDialog = 0;
367 mModified = false; 371 mModified = false;
368 mReadOnly = false; 372 mReadOnly = false;
369 mSelectedIncidence = 0; 373 mSelectedIncidence = 0;
370 mCalPrinter = 0; 374 mCalPrinter = 0;
371 mFilters.setAutoDelete(true); 375 mFilters.setAutoDelete(true);
372 376
373 mCalendar->registerObserver( this ); 377 mCalendar->registerObserver( this );
374 // TODO: Make sure that view is updated, when calendar is changed. 378 // TODO: Make sure that view is updated, when calendar is changed.
375 379
376 mStorage = new FileStorage( mCalendar ); 380 mStorage = new FileStorage( mCalendar );
377 mNavigator = new DateNavigator( this, "datevav", mViewManager ); 381 mNavigator = new DateNavigator( this, "datevav", mViewManager );
378 382
379 QBoxLayout *topLayout = (QBoxLayout*)layout(); 383 QBoxLayout *topLayout = (QBoxLayout*)layout();
380#ifndef KORG_NOSPLITTER 384#ifndef KORG_NOSPLITTER
381 // create the main layout frames. 385 // create the main layout frames.
382 mPanner = new QSplitter(QSplitter::Horizontal,this,"CalendarView::Panner"); 386 mPanner = new QSplitter(QSplitter::Horizontal,this,"CalendarView::Panner");
383 topLayout->addWidget(mPanner); 387 topLayout->addWidget(mPanner);
384 388
385 mLeftSplitter = new QSplitter(QSplitter::Vertical,mPanner, 389 mLeftSplitter = new QSplitter(QSplitter::Vertical,mPanner,
386 "CalendarView::LeftFrame"); 390 "CalendarView::LeftFrame");
387 mPanner->setResizeMode(mLeftSplitter,QSplitter::KeepSize); 391 mPanner->setResizeMode(mLeftSplitter,QSplitter::KeepSize);
388 392
389 mDateNavigator = new DateNavigatorContainer( mLeftSplitter, 393 mDateNavigator = new DateNavigatorContainer( mLeftSplitter,
390 "CalendarView::DateNavigator" ); 394 "CalendarView::DateNavigator" );
391 395
392 mLeftSplitter->setResizeMode(mDateNavigator,QSplitter::KeepSize); 396 mLeftSplitter->setResizeMode(mDateNavigator,QSplitter::KeepSize);
393 mTodoList = new KOTodoView(mCalendar, mLeftSplitter, "todolist_small2"); 397 mTodoList = new KOTodoView(mCalendar, mLeftSplitter, "todolist_small2");
394 mTodoList->setNavigator( mNavigator ); 398 mTodoList->setNavigator( mNavigator );
395 mFilterView = new KOFilterView(&mFilters,mLeftSplitter,"CalendarView::FilterView"); 399 mFilterView = new KOFilterView(&mFilters,mLeftSplitter,"CalendarView::FilterView");
396 400
397#ifdef KORG_NORESOURCEVIEW 401#ifdef KORG_NORESOURCEVIEW
398 mResourceView = 0; 402 mResourceView = 0;
399#else 403#else
400 if ( mResourceManager ) { 404 if ( mResourceManager ) {
401 mResourceView = new ResourceView( mResourceManager, mLeftSplitter ); 405 mResourceView = new ResourceView( mResourceManager, mLeftSplitter );
402 mResourceView->updateView(); 406 mResourceView->updateView();
403 connect( mResourceView, SIGNAL( resourcesChanged() ), 407 connect( mResourceView, SIGNAL( resourcesChanged() ),
404 SLOT( updateView() ) ); 408 SLOT( updateView() ) );
405 } else { 409 } else {
@@ -455,392 +459,392 @@ void CalendarView::init()
455 459
456 } else { 460 } else {
457 leftFrameLayout->addWidget(mTodoList,2 ); 461 leftFrameLayout->addWidget(mTodoList,2 );
458 leftFrameLayout->addWidget(mFilterView ); 462 leftFrameLayout->addWidget(mFilterView );
459 } 463 }
460#endif 464#endif
461 mFilterView->hide(); 465 mFilterView->hide();
462 QWidget *rightBox = new QWidget( mMainFrame ); 466 QWidget *rightBox = new QWidget( mMainFrame );
463 //mainBoxLayout->addWidget ( rightBox, 10 ); 467 //mainBoxLayout->addWidget ( rightBox, 10 );
464 QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); 468 QBoxLayout *rightLayout = new QVBoxLayout( rightBox );
465 mRightFrame = new QWidgetStack( rightBox ); 469 mRightFrame = new QWidgetStack( rightBox );
466 rightLayout->addWidget( mRightFrame, 10 ); 470 rightLayout->addWidget( mRightFrame, 10 );
467 471
468 //mLeftFrame = (QWidget *)leftFrame; 472 //mLeftFrame = (QWidget *)leftFrame;
469 if ( KOPrefs::instance()->mVerticalScreen ) { 473 if ( KOPrefs::instance()->mVerticalScreen ) {
470 //mDateNavigator->setFixedHeight( mDateNavigator->sizeHint().height() ); 474 //mDateNavigator->setFixedHeight( mDateNavigator->sizeHint().height() );
471 //mDateNavigator->setMinimumWidth( mDateNavigator->sizeHint().width() ); 475 //mDateNavigator->setMinimumWidth( mDateNavigator->sizeHint().width() );
472 //mTodoList->setFixedHeight( mDateNavigator->sizeHint().height() ); 476 //mTodoList->setFixedHeight( mDateNavigator->sizeHint().height() );
473 //leftFrame->setFixedHeight( mDateNavigator->sizeHint().height() ); 477 //leftFrame->setFixedHeight( mDateNavigator->sizeHint().height() );
474 } else { 478 } else {
475 //mDateNavigator->setFixedWidth( mDateNavigator->sizeHint().width() ); 479 //mDateNavigator->setFixedWidth( mDateNavigator->sizeHint().width() );
476 //mTodoList->setFixedWidth( mDateNavigator->sizeHint().width() ); 480 //mTodoList->setFixedWidth( mDateNavigator->sizeHint().width() );
477 //leftFrame->setFixedWidth( mDateNavigator->sizeHint().width() ); 481 //leftFrame->setFixedWidth( mDateNavigator->sizeHint().width() );
478 } 482 }
479 if ( !KOPrefs::instance()->mShowDateNavigator) 483 if ( !KOPrefs::instance()->mShowDateNavigator)
480 mDateNavigator->hide(); 484 mDateNavigator->hide();
481 //qDebug("Calendarview Size %d %d ", width(), height()); 485 //qDebug("Calendarview Size %d %d ", width(), height());
482#endif 486#endif
483 487
484 connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), 488 connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ),
485 SLOT( showDates( const KCal::DateList & ) ) ); 489 SLOT( showDates( const KCal::DateList & ) ) );
486 490
487 connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), 491 connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ),
488 mDateNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); 492 mDateNavigator, SLOT( selectDates( const KCal::DateList & ) ) );
489 493
490 494
491 495
492 connect( mDateNavigator, SIGNAL( showMonth( const QDate & ) ), 496 connect( mDateNavigator, SIGNAL( showMonth( const QDate & ) ),
493 mViewManager, SLOT( showMonth( const QDate & ) ) ); 497 mViewManager, SLOT( showMonth( const QDate & ) ) );
494 498
495 connect( mDateNavigator, SIGNAL( weekClicked( const QDate & ) ), 499 connect( mDateNavigator, SIGNAL( weekClicked( const QDate & ) ),
496 mNavigator, SLOT( selectWeek( const QDate & ) ) ); 500 mNavigator, SLOT( selectWeek( const QDate & ) ) );
497 501
498 connect( mDateNavigator, SIGNAL( goPrevYear() ), 502 connect( mDateNavigator, SIGNAL( goPrevYear() ),
499 mNavigator, SLOT( selectPreviousYear() ) ); 503 mNavigator, SLOT( selectPreviousYear() ) );
500 connect( mDateNavigator, SIGNAL( goNextYear() ), 504 connect( mDateNavigator, SIGNAL( goNextYear() ),
501 mNavigator, SLOT( selectNextYear() ) ); 505 mNavigator, SLOT( selectNextYear() ) );
502 connect( mDateNavigator, SIGNAL( goPrevMonth() ), 506 connect( mDateNavigator, SIGNAL( goPrevMonth() ),
503 mNavigator, SLOT( selectPreviousMonth() ) ); 507 mNavigator, SLOT( selectPreviousMonth() ) );
504 connect( mDateNavigator, SIGNAL( goNextMonth() ), 508 connect( mDateNavigator, SIGNAL( goNextMonth() ),
505 mNavigator, SLOT( selectNextMonth() ) ); 509 mNavigator, SLOT( selectNextMonth() ) );
506 510
507 connect( mDateNavigator, SIGNAL( goPrevious() ), 511 connect( mDateNavigator, SIGNAL( goPrevious() ),
508 mNavigator, SLOT( selectPrevious() ) ); 512 mNavigator, SLOT( selectPrevious() ) );
509 connect( mDateNavigator, SIGNAL( goNext() ), 513 connect( mDateNavigator, SIGNAL( goNext() ),
510 mNavigator, SLOT( selectNext() ) ); 514 mNavigator, SLOT( selectNext() ) );
511 connect( mDateNavigator, SIGNAL( monthSelected ( int ) ), 515 connect( mDateNavigator, SIGNAL( monthSelected ( int ) ),
512 mNavigator, SLOT( slotMonthSelect( int ) ) ); 516 mNavigator, SLOT( slotMonthSelect( int ) ) );
513 517
514 connect( mDateNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), 518 connect( mDateNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ),
515 mNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); 519 mNavigator, SLOT( selectDates( const KCal::DateList & ) ) );
516#if 0 520#if 0
517 connect( mDateNavigator, SIGNAL( incidenceDropped( Incidence * ) ), 521 connect( mDateNavigator, SIGNAL( incidenceDropped( Incidence * ) ),
518 SLOT( incidenceAdded( Incidence *) ) ); 522 SLOT( incidenceAdded( Incidence *) ) );
519#endif 523#endif
520 // connect(mDateNavigator,SIGNAL(dayPassed(QDate)),SLOT(updateView())); 524 // connect(mDateNavigator,SIGNAL(dayPassed(QDate)),SLOT(updateView()));
521 525
522 connect( this, SIGNAL( configChanged() ), 526 connect( this, SIGNAL( configChanged() ),
523 mDateNavigator, SLOT( updateConfig() ) ); 527 mDateNavigator, SLOT( updateConfig() ) );
524 528
525 connect( mTodoList, SIGNAL( newTodoSignal() ), 529 connect( mTodoList, SIGNAL( newTodoSignal() ),
526 SLOT( newTodo() ) ); 530 SLOT( newTodo() ) );
527 connect( mTodoList, SIGNAL( newSubTodoSignal( Todo *) ), 531 connect( mTodoList, SIGNAL( newSubTodoSignal( Todo *) ),
528 SLOT( newSubTodo( Todo * ) ) ); 532 SLOT( newSubTodo( Todo * ) ) );
529 connect( mTodoList, SIGNAL( editTodoSignal( Todo * ) ), 533 connect( mTodoList, SIGNAL( editTodoSignal( Todo * ) ),
530 SLOT( editTodo( Todo * ) ) ); 534 SLOT( editTodo( Todo * ) ) );
531 connect( mTodoList, SIGNAL( showTodoSignal( Todo * ) ), 535 connect( mTodoList, SIGNAL( showTodoSignal( Todo * ) ),
532 SLOT( showTodo( Todo *) ) ); 536 SLOT( showTodo( Todo *) ) );
533 connect( mTodoList, SIGNAL( deleteTodoSignal( Todo *) ), 537 connect( mTodoList, SIGNAL( deleteTodoSignal( Todo *) ),
534 SLOT( deleteTodo( Todo *) ) ); 538 SLOT( deleteTodo( Todo *) ) );
535 connect( this, SIGNAL( configChanged()), mTodoList, SLOT( updateConfig() ) ); 539 connect( this, SIGNAL( configChanged()), mTodoList, SLOT( updateConfig() ) );
536 connect( mTodoList, SIGNAL( purgeCompletedSignal() ), 540 connect( mTodoList, SIGNAL( purgeCompletedSignal() ),
537 SLOT( purgeCompleted() ) ); 541 SLOT( purgeCompleted() ) );
538 connect( mTodoList, SIGNAL( todoModifiedSignal( Todo *, int ) ), 542 connect( mTodoList, SIGNAL( todoModifiedSignal( Todo *, int ) ),
539 SIGNAL( todoModified( Todo *, int ) ) ); 543 SIGNAL( todoModified( Todo *, int ) ) );
540 544
541 connect( mTodoList, SIGNAL( cloneTodoSignal( Incidence * ) ), 545 connect( mTodoList, SIGNAL( cloneTodoSignal( Incidence * ) ),
542 this, SLOT ( cloneIncidence( Incidence * ) ) ); 546 this, SLOT ( cloneIncidence( Incidence * ) ) );
543 connect( mTodoList, SIGNAL( cancelTodoSignal( Incidence * ) ), 547 connect( mTodoList, SIGNAL( cancelTodoSignal( Incidence * ) ),
544 this, SLOT (cancelIncidence( Incidence * ) ) ); 548 this, SLOT (cancelIncidence( Incidence * ) ) );
545 549
546 connect( mTodoList, SIGNAL( moveTodoSignal( Incidence * ) ), 550 connect( mTodoList, SIGNAL( moveTodoSignal( Incidence * ) ),
547 this, SLOT ( moveIncidence( Incidence * ) ) ); 551 this, SLOT ( moveIncidence( Incidence * ) ) );
548 connect( mTodoList, SIGNAL( beamTodoSignal( Incidence * ) ), 552 connect( mTodoList, SIGNAL( beamTodoSignal( Incidence * ) ),
549 this, SLOT ( beamIncidence( Incidence * ) ) ); 553 this, SLOT ( beamIncidence( Incidence * ) ) );
550 554
551 connect( mTodoList, SIGNAL( unparentTodoSignal( Todo * ) ), 555 connect( mTodoList, SIGNAL( unparentTodoSignal( Todo * ) ),
552 this, SLOT ( todo_unsub( Todo * ) ) ); 556 this, SLOT ( todo_unsub( Todo * ) ) );
553 557
554 connect( mTodoList, SIGNAL( reparentTodoSignal( Todo *,Todo * ) ), 558 connect( mTodoList, SIGNAL( reparentTodoSignal( Todo *,Todo * ) ),
555 this, SLOT ( todo_resub( Todo *,Todo * ) ) ); 559 this, SLOT ( todo_resub( Todo *,Todo * ) ) );
556 connect( this, SIGNAL( todoModified( Todo *, int )), mTodoList, 560 connect( this, SIGNAL( todoModified( Todo *, int )), mTodoList,
557 SLOT( updateTodo( Todo *, int ) ) ); 561 SLOT( updateTodo( Todo *, int ) ) );
558 connect( this, SIGNAL( todoModified( Todo *, int )), this, 562 connect( this, SIGNAL( todoModified( Todo *, int )), this,
559 SLOT( changeTodoDisplay( Todo *, int ) ) ); 563 SLOT( changeTodoDisplay( Todo *, int ) ) );
560 564
561 565
562 connect( mFilterView, SIGNAL( filterChanged() ), SLOT( updateFilter() ) ); 566 connect( mFilterView, SIGNAL( filterChanged() ), SLOT( updateFilter() ) );
563 connect( mFilterView, SIGNAL( editFilters() ), SLOT( editFilters() ) ); 567 connect( mFilterView, SIGNAL( editFilters() ), SLOT( editFilters() ) );
564 connect( mCalendar, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addAlarm(const QDateTime &, const QString & ) ) ); 568 connect( mCalendar, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addAlarm(const QDateTime &, const QString & ) ) );
565 connect( mCalendar, SIGNAL( removeAlarm(const QDateTime &, const QString & ) ), SLOT( removeAlarm(const QDateTime &, const QString & ) ) ); 569 connect( mCalendar, SIGNAL( removeAlarm(const QDateTime &, const QString & ) ), SLOT( removeAlarm(const QDateTime &, const QString & ) ) );
566 570
567 571
568 572
569 573
570 574
571 connect(QApplication::clipboard(),SIGNAL(dataChanged()), 575 connect(QApplication::clipboard(),SIGNAL(dataChanged()),
572 SLOT(checkClipboard())); 576 SLOT(checkClipboard()));
573 connect( mTodoList,SIGNAL( incidenceSelected( Incidence * ) ), 577 connect( mTodoList,SIGNAL( incidenceSelected( Incidence * ) ),
574 SLOT( processTodoListSelection( Incidence * ) ) ); 578 SLOT( processTodoListSelection( Incidence * ) ) );
575 connect(mTodoList,SIGNAL(isModified(bool)),SLOT(setModified(bool))); 579 connect(mTodoList,SIGNAL(isModified(bool)),SLOT(setModified(bool)));
576 580
577 // kdDebug() << "CalendarView::CalendarView() done" << endl; 581 // kdDebug() << "CalendarView::CalendarView() done" << endl;
578 582
579 mDateFrame = new QVBox(0,0,WType_Popup); 583 mDateFrame = new QVBox(0,0,WType_Popup);
580 //mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised); 584 //mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised);
581 mDateFrame->setFrameStyle( QFrame::WinPanel |QFrame::Raised ); 585 mDateFrame->setFrameStyle( QFrame::WinPanel |QFrame::Raised );
582 mDateFrame->setLineWidth(3); 586 mDateFrame->setLineWidth(3);
583 mDateFrame->hide(); 587 mDateFrame->hide();
584 mDateFrame->setCaption( i18n( "Pick a date to display")); 588 mDateFrame->setCaption( i18n( "Pick a date to display"));
585 mDatePicker = new KDatePicker ( mDateFrame , QDate::currentDate() ); 589 mDatePicker = new KDatePicker ( mDateFrame , QDate::currentDate() );
586 590
587 connect(mDatePicker,SIGNAL(dateSelected(QDate)),SLOT(slotSelectPickerDate(QDate))); 591 connect(mDatePicker,SIGNAL(dateSelected(QDate)),SLOT(slotSelectPickerDate(QDate)));
588 592
589 mEventEditor = mDialogManager->getEventEditor(); 593 mEventEditor = mDialogManager->getEventEditor();
590 mTodoEditor = mDialogManager->getTodoEditor(); 594 mTodoEditor = mDialogManager->getTodoEditor();
591 595
592 mFlagEditDescription = false; 596 mFlagEditDescription = false;
593 597
594 mSuspendTimer = new QTimer( this ); 598 mSuspendTimer = new QTimer( this );
595 mAlarmTimer = new QTimer( this ); 599 mAlarmTimer = new QTimer( this );
596 mRecheckAlarmTimer = new QTimer( this ); 600 mRecheckAlarmTimer = new QTimer( this );
597 connect( mRecheckAlarmTimer, SIGNAL( timeout () ), SLOT( recheckTimerAlarm() ) ); 601 connect( mRecheckAlarmTimer, SIGNAL( timeout () ), SLOT( recheckTimerAlarm() ) );
598 connect( mSuspendTimer, SIGNAL( timeout () ), SLOT( suspendAlarm() ) ); 602 connect( mSuspendTimer, SIGNAL( timeout () ), SLOT( suspendAlarm() ) );
599 connect( mAlarmTimer, SIGNAL( timeout () ), SLOT( timerAlarm() ) ); 603 connect( mAlarmTimer, SIGNAL( timeout () ), SLOT( timerAlarm() ) );
600 mAlarmDialog = new AlarmDialog( this ); 604 mAlarmDialog = new AlarmDialog( this );
601 connect( mAlarmDialog, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addSuspendAlarm(const QDateTime &, const QString & ) ) ); 605 connect( mAlarmDialog, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addSuspendAlarm(const QDateTime &, const QString & ) ) );
602 mAlarmDialog->setServerNotification( false ); 606 mAlarmDialog->setServerNotification( false );
603 mAlarmDialog->setSuspendTime( KOPrefs::instance()->mAlarmSuspendTime ); 607 mAlarmDialog->setSuspendTime( KOPrefs::instance()->mAlarmSuspendTime );
604 608
605 609
606#ifndef DESKTOP_VERSION 610#ifndef DESKTOP_VERSION
607//US listen for arriving address resultsets 611//US listen for arriving address resultsets
608 connect(ExternalAppHandler::instance(), SIGNAL(receivedBirthdayListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)), 612 connect(ExternalAppHandler::instance(), SIGNAL(receivedBirthdayListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)),
609 this, SLOT(insertBirthdays(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&))); 613 this, SLOT(insertBirthdays(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)));
610#endif 614#endif
611 mDateNavigator->setCalendar( mCalendar ); 615 mDateNavigator->setCalendar( mCalendar );
612} 616}
613 617
614 618
615CalendarView::~CalendarView() 619CalendarView::~CalendarView()
616{ 620{
617 // kdDebug() << "~CalendarView()" << endl; 621 // kdDebug() << "~CalendarView()" << endl;
618 //qDebug("CalendarView::~CalendarView() "); 622 //qDebug("CalendarView::~CalendarView() ");
619 delete mDialogManager; 623 delete mDialogManager;
620 delete mViewManager; 624 delete mViewManager;
621 delete mStorage; 625 delete mStorage;
622 delete mDateFrame ; 626 delete mDateFrame ;
623 delete beamDialog; 627 delete beamDialog;
624 delete mEventViewerDialog; 628 delete mEventViewerDialog;
625 //kdDebug() << "~CalendarView() done" << endl; 629 //kdDebug() << "~CalendarView() done" << endl;
626} 630}
627void CalendarView::checkAlarms() 631void CalendarView::checkAlarms()
628{ 632{
629 KConfig *config = KOGlobals::config(); 633 KConfig *config = KOGlobals::config();
630 config->setGroup( "AppRun" ); 634 config->setGroup( "AppRun" );
631 QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); 635 QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) );
632 int secs = config->readNumEntry( "LatestProgramStop" ) - 30; 636 int secs = config->readNumEntry( "LatestProgramStop" ) - 30;
633 secs -= ( 3600 * 24*3 ); // debug only 637 secs -= ( 3600 * 24*3 ); // debug only
634 QDateTime latest = dt.addSecs ( secs ); 638 QDateTime latest = dt.addSecs ( secs );
635 qDebug("KO: Last termination on %s ", latest.toString().latin1()); 639 qDebug("KO: Last termination on %s ", latest.toString().latin1());
636 QPtrList<Incidence> el = mCalendar->rawIncidences(); 640 QPtrList<Incidence> el = mCalendar->rawIncidences();
637 QPtrList<Incidence> al; 641 QPtrList<Incidence> al;
638 Incidence* inL = el.first(); 642 Incidence* inL = el.first();
639 while ( inL ) { 643 while ( inL ) {
640 bool ok = false; 644 bool ok = false;
641 int offset = 0; 645 int offset = 0;
642 QDateTime next = inL->getNextAlarmDateTime(& ok, &offset, latest ) ; 646 QDateTime next = inL->getNextAlarmDateTime(& ok, &offset, latest ) ;
643 if ( ok ) { 647 if ( ok ) {
644 //qDebug("OK %s",next.toString().latin1()); 648 //qDebug("OK %s",next.toString().latin1());
645 if ( next < QDateTime::currentDateTime() ) { 649 if ( next < QDateTime::currentDateTime() ) {
646 al.append( inL ); 650 al.append( inL );
647 qDebug("found missed alarm: %s ", inL->summary().latin1() ); 651 //qDebug("found missed alarm: %s ", inL->summary().latin1() );
648 } 652 }
649 } 653 }
650 inL = el.next(); 654 inL = el.next();
651 } 655 }
652 if ( al.count() ) { 656 if ( al.count() ) {
653 QDialog* dia = new QDialog( this, "huhu", false ); 657 QDialog* dia = new QDialog( this, "huhu", false, WDestructiveClose | WStyle_StaysOnTop );
654 dia->setCaption( i18n("KO/Pi: Missing alarm notification!") ); 658 dia->setCaption( i18n("KO/Pi: Missing alarms!") );
655 QVBoxLayout* lay = new QVBoxLayout( dia ); 659 QVBoxLayout* lay = new QVBoxLayout( dia );
656 lay->setSpacing( 0 ); 660 lay->setSpacing( 0 );
657 lay->setMargin( 0 ); 661 lay->setMargin( 0 );
658 MissedAlarmTextBrowser* matb = new MissedAlarmTextBrowser ( dia, al, latest ); 662 MissedAlarmTextBrowser* matb = new MissedAlarmTextBrowser ( dia, al, latest );
659 connect( matb, SIGNAL( showIncidence( QString ) ),SLOT( showIncidence( QString ) )); 663 connect( matb, SIGNAL( showIncidence( QString ) ),SLOT( showIncidence( QString ) ));
660 lay->addWidget( matb ); 664 lay->addWidget( matb );
661 int si = 220; 665 int si = 220;
662 if ( QApplication::desktop()->width() > 470 ) 666 if ( QApplication::desktop()->width() > 470 )
663 si = 400; 667 si = 400;
664 dia->resize(si,si/2); 668 dia->resize(si,si/2);
665 dia->setBackgroundColor( QColor( 255, 255, 255 ) ); 669 dia->setBackgroundColor( QColor( 255, 255, 255 ) );
666 dia->show(); 670 dia->show();
667 671
668 } 672 }
669} 673}
670void CalendarView::showDay( QDate d ) 674void CalendarView::showDay( QDate d )
671{ 675{
672 dateNavigator()->blockSignals( true ); 676 dateNavigator()->blockSignals( true );
673 dateNavigator()->selectDate( d ); 677 dateNavigator()->selectDate( d );
674 dateNavigator()->blockSignals( false ); 678 dateNavigator()->blockSignals( false );
675 mViewManager->showDayView(); 679 mViewManager->showDayView();
676 //dateNavigator()->selectDate( d ); 680 //dateNavigator()->selectDate( d );
677} 681}
678void CalendarView::timerAlarm() 682void CalendarView::timerAlarm()
679{ 683{
680 //qDebug("CalendarView::timerAlarm() "); 684 //qDebug("CalendarView::timerAlarm() ");
681 computeAlarm(mAlarmNotification ); 685 computeAlarm(mAlarmNotification );
682} 686}
683 687
684void CalendarView::suspendAlarm() 688void CalendarView::suspendAlarm()
685{ 689{
686 //qDebug(" CalendarView::suspendAlarm() "); 690 //qDebug(" CalendarView::suspendAlarm() ");
687 computeAlarm(mSuspendAlarmNotification ); 691 computeAlarm(mSuspendAlarmNotification );
688 692
689} 693}
690 694
691void CalendarView::startAlarm( QString mess , QString filename) 695void CalendarView::startAlarm( QString mess , QString filename)
692{ 696{
693 697
694 topLevelWidget()->showNormal(); 698 topLevelWidget()->showNormal();
695 topLevelWidget()->setActiveWindow(); 699 topLevelWidget()->setActiveWindow();
696 topLevelWidget()->raise(); 700 topLevelWidget()->raise();
697 701
698 mAlarmDialog->eventNotification( mess, KOPrefs::instance()->mAlarmPlayBeeps, filename, true,KOPrefs::instance()->mAlarmBeepInterval ,KOPrefs::instance()->mAlarmSuspendCount ); 702 mAlarmDialog->eventNotification( mess, KOPrefs::instance()->mAlarmPlayBeeps, filename, true,KOPrefs::instance()->mAlarmBeepInterval ,KOPrefs::instance()->mAlarmSuspendCount );
699 QTimer::singleShot( 3000, this, SLOT( checkNextTimerAlarm() ) ); 703 QTimer::singleShot( 3000, this, SLOT( checkNextTimerAlarm() ) );
700 704
701} 705}
702 706
703void CalendarView::checkNextTimerAlarm() 707void CalendarView::checkNextTimerAlarm()
704{ 708{
705 mCalendar->checkAlarmForIncidence( 0, true ); 709 mCalendar->checkAlarmForIncidence( 0, true );
706} 710}
707 711
708void CalendarView::computeAlarm( QString msg ) 712void CalendarView::computeAlarm( QString msg )
709{ 713{
710 714
711 QString mess = msg; 715 QString mess = msg;
712 QString mAlarmMessage = mess.mid( 9 ); 716 QString mAlarmMessage = mess.mid( 9 );
713 QString filename = MainWindow::resourcePath(); 717 QString filename = MainWindow::resourcePath();
714 filename += "koalarm.wav"; 718 filename += "koalarm.wav";
715 QString tempfilename; 719 QString tempfilename;
716 if ( mess.left( 13 ) == "suspend_alarm") { 720 if ( mess.left( 13 ) == "suspend_alarm") {
717 bool error = false; 721 bool error = false;
718 int len = mess.mid( 13 ).find("+++"); 722 int len = mess.mid( 13 ).find("+++");
719 if ( len < 2 ) 723 if ( len < 2 )
720 error = true; 724 error = true;
721 else { 725 else {
722 tempfilename = mess.mid( 13, len ); 726 tempfilename = mess.mid( 13, len );
723 if ( !QFile::exists( tempfilename ) ) 727 if ( !QFile::exists( tempfilename ) )
724 error = true; 728 error = true;
725 } 729 }
726 if ( ! error ) { 730 if ( ! error ) {
727 filename = tempfilename; 731 filename = tempfilename;
728 } 732 }
729 mAlarmMessage = mess.mid( 13+len+3 ); 733 mAlarmMessage = mess.mid( 13+len+3 );
730 //qDebug("suspend file %s ",tempfilename.latin1() ); 734 //qDebug("suspend file %s ",tempfilename.latin1() );
731 startAlarm( mAlarmMessage, filename); 735 startAlarm( mAlarmMessage, filename);
732 return; 736 return;
733 } 737 }
734 if ( mess.left( 11 ) == "timer_alarm") { 738 if ( mess.left( 11 ) == "timer_alarm") {
735 //mTimerTime = 0; 739 //mTimerTime = 0;
736 startAlarm( mess.mid( 11 ), filename ); 740 startAlarm( mess.mid( 11 ), filename );
737 return; 741 return;
738 } 742 }
739 if ( mess.left( 10 ) == "proc_alarm") { 743 if ( mess.left( 10 ) == "proc_alarm") {
740 bool error = false; 744 bool error = false;
741 int len = mess.mid( 10 ).find("+++"); 745 int len = mess.mid( 10 ).find("+++");
742 if ( len < 2 ) 746 if ( len < 2 )
743 error = true; 747 error = true;
744 else { 748 else {
745 tempfilename = mess.mid( 10, len ); 749 tempfilename = mess.mid( 10, len );
746 if ( !QFile::exists( tempfilename ) ) 750 if ( !QFile::exists( tempfilename ) )
747 error = true; 751 error = true;
748 } 752 }
749 if ( error ) { 753 if ( error ) {
750 mAlarmMessage = "Procedure Alarm\nError - File not found\n"; 754 mAlarmMessage = "Procedure Alarm\nError - File not found\n";
751 mAlarmMessage += mess.mid( 10+len+3+9 ); 755 mAlarmMessage += mess.mid( 10+len+3+9 );
752 } else { 756 } else {
753 //QCopEnvelope e("QPE/Application/kopi", "-writeFileSilent"); 757 //QCopEnvelope e("QPE/Application/kopi", "-writeFileSilent");
754 //qDebug("-----system command %s ",tempfilename.latin1() ); 758 //qDebug("-----system command %s ",tempfilename.latin1() );
755#ifndef _WIN32_ 759#ifndef _WIN32_
756 if ( vfork () == 0 ) { 760 if ( vfork () == 0 ) {
757 execl ( tempfilename.latin1(), 0 ); 761 execl ( tempfilename.latin1(), 0 );
758 return; 762 return;
759 } 763 }
760#else 764#else
761 QProcess* p = new QProcess(); 765 QProcess* p = new QProcess();
762 p->addArgument( tempfilename.latin1() ); 766 p->addArgument( tempfilename.latin1() );
763 p->start(); 767 p->start();
764 return; 768 return;
765#endif 769#endif
766 770
767 return; 771 return;
768 } 772 }
769 773
770 //qDebug("+++++++system command %s ",tempfilename.latin1() ); 774 //qDebug("+++++++system command %s ",tempfilename.latin1() );
771 } 775 }
772 if ( mess.left( 11 ) == "audio_alarm") { 776 if ( mess.left( 11 ) == "audio_alarm") {
773 bool error = false; 777 bool error = false;
774 int len = mess.mid( 11 ).find("+++"); 778 int len = mess.mid( 11 ).find("+++");
775 if ( len < 2 ) 779 if ( len < 2 )
776 error = true; 780 error = true;
777 else { 781 else {
778 tempfilename = mess.mid( 11, len ); 782 tempfilename = mess.mid( 11, len );
779 if ( !QFile::exists( tempfilename ) ) 783 if ( !QFile::exists( tempfilename ) )
780 error = true; 784 error = true;
781 } 785 }
782 if ( ! error ) { 786 if ( ! error ) {
783 filename = tempfilename; 787 filename = tempfilename;
784 } 788 }
785 mAlarmMessage = mess.mid( 11+len+3+9 ); 789 mAlarmMessage = mess.mid( 11+len+3+9 );
786 //qDebug("audio file command %s ",tempfilename.latin1() ); 790 //qDebug("audio file command %s ",tempfilename.latin1() );
787 } 791 }
788 if ( mess.left( 9 ) == "cal_alarm") { 792 if ( mess.left( 9 ) == "cal_alarm") {
789 mAlarmMessage = mess.mid( 9 ) ; 793 mAlarmMessage = mess.mid( 9 ) ;
790 } 794 }
791 795
792 startAlarm( mAlarmMessage, filename ); 796 startAlarm( mAlarmMessage, filename );
793 797
794 798
795} 799}
796 800
797void CalendarView::addSuspendAlarm(const QDateTime &qdt, const QString &noti ) 801void CalendarView::addSuspendAlarm(const QDateTime &qdt, const QString &noti )
798{ 802{
799 //qDebug("+++++addSUSPENDAlarm %s %s ", qdt.toString().latin1() , noti.latin1() ); 803 //qDebug("+++++addSUSPENDAlarm %s %s ", qdt.toString().latin1() , noti.latin1() );
800 804
801 mSuspendAlarmNotification = noti; 805 mSuspendAlarmNotification = noti;
802 int ms = QDateTime::currentDateTime().secsTo( qdt )*1000; 806 int ms = QDateTime::currentDateTime().secsTo( qdt )*1000;
803 //qDebug("Suspend Alarm timer started with secs: %d ", ms/1000); 807 //qDebug("Suspend Alarm timer started with secs: %d ", ms/1000);
804 mSuspendTimer->start( ms , true ); 808 mSuspendTimer->start( ms , true );
805 809
806} 810}
807 811
808void CalendarView::addAlarm(const QDateTime &qdt, const QString &noti ) 812void CalendarView::addAlarm(const QDateTime &qdt, const QString &noti )
809{ 813{
810 mNextAlarmDateTime = qdt; 814 mNextAlarmDateTime = qdt;
811 //qDebug("+++++addAlarm %s %s ", qdt.toString().latin1() , noti.latin1() ); 815 //qDebug("+++++addAlarm %s %s ", qdt.toString().latin1() , noti.latin1() );
812 if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) { 816 if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) {
813#ifndef DESKTOP_VERSION 817#ifndef DESKTOP_VERSION
814 AlarmServer::addAlarm ( qdt,"koalarm", noti.latin1() ); 818 AlarmServer::addAlarm ( qdt,"koalarm", noti.latin1() );
815#endif 819#endif
816 return; 820 return;
817 } 821 }
818 int maxSec; 822 int maxSec;
819 //maxSec = 5; //testing only 823 //maxSec = 5; //testing only
820 maxSec = 86400+3600; // one day+1hour 824 maxSec = 86400+3600; // one day+1hour
821 mAlarmNotification = noti; 825 mAlarmNotification = noti;
822 int sec = QDateTime::currentDateTime().secsTo( qdt ); 826 int sec = QDateTime::currentDateTime().secsTo( qdt );
823 if ( sec > maxSec ) { 827 if ( sec > maxSec ) {
824 mRecheckAlarmTimer->start( maxSec * 1000 ); 828 mRecheckAlarmTimer->start( maxSec * 1000 );
825 // qDebug("recheck Alarm timer started with secs: %d next alarm in sec:%d", maxSec,sec ); 829 // qDebug("recheck Alarm timer started with secs: %d next alarm in sec:%d", maxSec,sec );
826 return; 830 return;
827 } else { 831 } else {
828 mRecheckAlarmTimer->stop(); 832 mRecheckAlarmTimer->stop();
829 } 833 }
830 //qDebug("Alarm timer started with secs: %d ", sec); 834 //qDebug("Alarm timer started with secs: %d ", sec);
831 mAlarmTimer->start( sec *1000 , true ); 835 mAlarmTimer->start( sec *1000 , true );
832 836
833} 837}
834// called by mRecheckAlarmTimer to get next alarm 838// called by mRecheckAlarmTimer to get next alarm
835// we need this, because a QTimer has only a max range of 25 days 839// we need this, because a QTimer has only a max range of 25 days
836void CalendarView::recheckTimerAlarm() 840void CalendarView::recheckTimerAlarm()
837{ 841{
838 mAlarmTimer->stop(); 842 mAlarmTimer->stop();
839 mRecheckAlarmTimer->stop(); 843 mRecheckAlarmTimer->stop();
840 mCalendar->checkAlarmForIncidence( 0, true ); 844 mCalendar->checkAlarmForIncidence( 0, true );
841} 845}
842void CalendarView::removeAlarm(const QDateTime &qdt, const QString &noti ) 846void CalendarView::removeAlarm(const QDateTime &qdt, const QString &noti )
843{ 847{
844 //qDebug("-----removeAlarm %s %s ", qdt.toString().latin1() , noti.latin1() ); 848 //qDebug("-----removeAlarm %s %s ", qdt.toString().latin1() , noti.latin1() );
845 if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) { 849 if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) {
846#ifndef DESKTOP_VERSION 850#ifndef DESKTOP_VERSION
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index 1eca905..084b6db 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -1,282 +1,283 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2000, 2001 3 Copyright (c) 2000, 2001
4 Cornelius Schumacher <schumacher@kde.org> 4 Cornelius Schumacher <schumacher@kde.org>
5 5
6 This program is free software; you can redistribute it and/or modify 6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by 7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or 8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version. 9 (at your option) any later version.
10 10
11 This program is distributed in the hope that it will be useful, 11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details. 14 GNU General Public License for more details.
15 15
16 You should have received a copy of the GNU General Public License 16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software 17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 19
20 As a special exception, permission is given to link this program 20 As a special exception, permission is given to link this program
21 with any edition of Qt, and distribute the resulting executable, 21 with any edition of Qt, and distribute the resulting executable,
22 without including the source code for Qt in the source distribution. 22 without including the source code for Qt in the source distribution.
23*/ 23*/
24#ifndef CALENDARVIEW_H 24#ifndef CALENDARVIEW_H
25#define CALENDARVIEW_H 25#define CALENDARVIEW_H
26 26
27#include <qframe.h> 27#include <qframe.h>
28#include <qlayout.h> 28#include <qlayout.h>
29#include <qwidget.h> 29#include <qwidget.h>
30#include <qptrlist.h> 30#include <qptrlist.h>
31#include <qvbox.h> 31#include <qvbox.h>
32#include <qmap.h> 32#include <qmap.h>
33#ifndef DESKTOP_VERSION 33#ifndef DESKTOP_VERSION
34#include <qtopia/ir.h> 34#include <qtopia/ir.h>
35#else 35#else
36#define Ir char 36#define Ir char
37#endif 37#endif
38#include <libkcal/calendar.h> 38#include <libkcal/calendar.h>
39#include <libkcal/scheduler.h> 39#include <libkcal/scheduler.h>
40#include <libkcal/calendarresources.h> 40#include <libkcal/calendarresources.h>
41#include <libkcal/resourcecalendar.h> 41#include <libkcal/resourcecalendar.h>
42#include <KDGanttMinimizeSplitter.h> 42#include <KDGanttMinimizeSplitter.h>
43 43
44#include <korganizer/calendarviewbase.h> 44#include <korganizer/calendarviewbase.h>
45 45
46#include <ksyncmanager.h> 46#include <ksyncmanager.h>
47 47
48class QWidgetStack; 48class QWidgetStack;
49class QSplitter; 49class QSplitter;
50 50
51class CalPrinter; 51class CalPrinter;
52class KOFilterView; 52class KOFilterView;
53class KOViewManager; 53class KOViewManager;
54class KODialogManager; 54class KODialogManager;
55class KOTodoView; 55class KOTodoView;
56class KDateNavigator; 56class KDateNavigator;
57class DateNavigatorContainer; 57class DateNavigatorContainer;
58class DateNavigator; 58class DateNavigator;
59class KOIncidenceEditor; 59class KOIncidenceEditor;
60class KDatePicker; 60class KDatePicker;
61class ResourceView; 61class ResourceView;
62class KOEventEditor; 62class KOEventEditor;
63class KOTodoEditor ; 63class KOTodoEditor ;
64class KOEventViewerDialog; 64class KOEventViewerDialog;
65class KOBeamPrefs; 65class KOBeamPrefs;
66class KSyncProfile; 66class KSyncProfile;
67class AlarmDialog; 67class AlarmDialog;
68class KCal::Attendee; 68class KCal::Attendee;
69 69
70namespace KCal { class FileStorage; } 70namespace KCal { class FileStorage; }
71 71
72using namespace KCal; 72using namespace KCal;
73 73
74/** 74/**
75 This is the main calendar widget. It provides the different vies on t he 75 This is the main calendar widget. It provides the different vies on t he
76 calendar data as well as the date navigator. It also handles synchronisation 76 calendar data as well as the date navigator. It also handles synchronisation
77 of the different views and controls the different dialogs like preferences, 77 of the different views and controls the different dialogs like preferences,
78 event editor, search dialog etc. 78 event editor, search dialog etc.
79 79
80 @short main calendar view widget 80 @short main calendar view widget
81 @author Cornelius Schumacher 81 @author Cornelius Schumacher
82*/ 82*/
83 83
84#include <qtextbrowser.h> 84#include <qtextbrowser.h>
85#include <qtextcodec.h> 85#include <qtextcodec.h>
86 86
87class MissedAlarmTextBrowser : public QTextBrowser { 87class MissedAlarmTextBrowser : public QTextBrowser {
88 Q_OBJECT 88 Q_OBJECT
89 public: 89 public:
90 MissedAlarmTextBrowser(QWidget *parent, QPtrList<Incidence> alarms ,QDateTime start); 90 MissedAlarmTextBrowser(QWidget *parent, QPtrList<Incidence> alarms ,QDateTime start);
91 ~MissedAlarmTextBrowser();
91 void setSource(const QString & n); 92 void setSource(const QString & n);
92 93
93 private: 94 private:
94 Incidence * getNextInc(QDateTime start ); 95 Incidence * getNextInc(QDateTime start );
95 QPtrList<Incidence> mAlarms; 96 QPtrList<Incidence> mAlarms;
96 signals: 97 signals:
97 void showIncidence( QString uid); 98 void showIncidence( QString uid);
98}; 99};
99 100
100 101
101class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Observer, public KSyncInterface 102class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Observer, public KSyncInterface
102{ 103{
103 Q_OBJECT 104 Q_OBJECT
104 public: 105 public:
105 /** 106 /**
106 Constructs a new calendar view widget. 107 Constructs a new calendar view widget.
107 108
108 @param calendar calendar document 109 @param calendar calendar document
109 @param parent parent window 110 @param parent parent window
110 @param name Qt internal widget object name 111 @param name Qt internal widget object name
111 */ 112 */
112 CalendarView( CalendarResources *calendar, QWidget *parent = 0, 113 CalendarView( CalendarResources *calendar, QWidget *parent = 0,
113 const char *name = 0 ); 114 const char *name = 0 );
114 CalendarView( Calendar *calendar, QWidget *parent = 0, 115 CalendarView( Calendar *calendar, QWidget *parent = 0,
115 const char *name = 0 ); 116 const char *name = 0 );
116 virtual ~CalendarView(); 117 virtual ~CalendarView();
117 118
118 Calendar *calendar() { return mCalendar; } 119 Calendar *calendar() { return mCalendar; }
119 120
120 KOViewManager *viewManager(); 121 KOViewManager *viewManager();
121 KODialogManager *dialogManager(); 122 KODialogManager *dialogManager();
122 123
123 QDate startDate(); 124 QDate startDate();
124 QDate endDate(); 125 QDate endDate();
125 126
126 QWidgetStack *viewStack(); 127 QWidgetStack *viewStack();
127 QWidget *leftFrame(); 128 QWidget *leftFrame();
128 129
129 DateNavigator *dateNavigator(); 130 DateNavigator *dateNavigator();
130 KDateNavigator *dateNavigatorWidget(); 131 KDateNavigator *dateNavigatorWidget();
131 132
132 void addView(KOrg::BaseView *); 133 void addView(KOrg::BaseView *);
133 void showView(KOrg::BaseView *); 134 void showView(KOrg::BaseView *);
134 KOEventViewerDialog* getEventViewerDialog(); 135 KOEventViewerDialog* getEventViewerDialog();
135 Incidence *currentSelection(); 136 Incidence *currentSelection();
136 137
137 signals: 138 signals:
138 void save (); 139 void save ();
139 void saveStopTimer (); 140 void saveStopTimer ();
140 void tempDisableBR(bool); 141 void tempDisableBR(bool);
141 /** This todo has been modified */ 142 /** This todo has been modified */
142 void todoModified(Todo *, int); 143 void todoModified(Todo *, int);
143 144
144 /** when change is made to options dialog, the topwidget will catch this 145 /** when change is made to options dialog, the topwidget will catch this
145 * and emit this signal which notifies all widgets which have registered 146 * and emit this signal which notifies all widgets which have registered
146 * for notification to update their settings. */ 147 * for notification to update their settings. */
147 void configChanged(); 148 void configChanged();
148 /** emitted when the topwidget is closing down, so that any attached 149 /** emitted when the topwidget is closing down, so that any attached
149 child windows can also close. */ 150 child windows can also close. */
150 void closingDown(); 151 void closingDown();
151 /** emitted right before we die */ 152 /** emitted right before we die */
152 void closed(QWidget *); 153 void closed(QWidget *);
153 154
154 /** Emitted when state of modified flag changes */ 155 /** Emitted when state of modified flag changes */
155 void modifiedChanged(bool); 156 void modifiedChanged(bool);
156 void signalmodified(); 157 void signalmodified();
157 158
158 /** Emitted when state of read-only flag changes */ 159 /** Emitted when state of read-only flag changes */
159 void readOnlyChanged(bool); 160 void readOnlyChanged(bool);
160 161
161 /** Emitted when the unit of navigation changes */ 162 /** Emitted when the unit of navigation changes */
162 void changeNavStringPrev(const QString &); 163 void changeNavStringPrev(const QString &);
163 void changeNavStringNext(const QString &); 164 void changeNavStringNext(const QString &);
164 165
165 /** Emitted when state of events selection has changed and user is organizer*/ 166 /** Emitted when state of events selection has changed and user is organizer*/
166 void organizerEventsSelected(bool); 167 void organizerEventsSelected(bool);
167 /** Emitted when state of events selection has changed and user is attendee*/ 168 /** Emitted when state of events selection has changed and user is attendee*/
168 void groupEventsSelected(bool); 169 void groupEventsSelected(bool);
169 /** 170 /**
170 Emitted when an incidence gets selected. If the selection is cleared the 171 Emitted when an incidence gets selected. If the selection is cleared the
171 signal is emitted with 0 as argument. 172 signal is emitted with 0 as argument.
172 */ 173 */
173 void incidenceSelected( Incidence * ); 174 void incidenceSelected( Incidence * );
174 /** Emitted, when a todoitem is selected or deselected. */ 175 /** Emitted, when a todoitem is selected or deselected. */
175 void todoSelected( bool ); 176 void todoSelected( bool );
176 177
177 /** 178 /**
178 Emitted, when clipboard content changes. Parameter indicates if paste 179 Emitted, when clipboard content changes. Parameter indicates if paste
179 is possible or not. 180 is possible or not.
180 */ 181 */
181 void pasteEnabled(bool); 182 void pasteEnabled(bool);
182 183
183 /** Emitted, when the number of incoming messages has changed. */ 184 /** Emitted, when the number of incoming messages has changed. */
184 void numIncomingChanged(int); 185 void numIncomingChanged(int);
185 186
186 /** Emitted, when the number of outgoing messages has changed. */ 187 /** Emitted, when the number of outgoing messages has changed. */
187 void numOutgoingChanged(int); 188 void numOutgoingChanged(int);
188 189
189 /** Send status message, which can e.g. be displayed in the status bar. */ 190 /** Send status message, which can e.g. be displayed in the status bar. */
190 void statusMessage(const QString &); 191 void statusMessage(const QString &);
191 192
192 void calendarViewExpanded( bool ); 193 void calendarViewExpanded( bool );
193 void updateSearchDialog(); 194 void updateSearchDialog();
194 195
195 196
196 public slots: 197 public slots:
197 void checkAlarms(); 198 void checkAlarms();
198 void slotprintSelInc(); 199 void slotprintSelInc();
199 void showNextAlarms(); 200 void showNextAlarms();
200 void showOpenError(); 201 void showOpenError();
201 void watchSavedFile(); 202 void watchSavedFile();
202 void recheckTimerAlarm(); 203 void recheckTimerAlarm();
203 void checkNextTimerAlarm(); 204 void checkNextTimerAlarm();
204 void addAlarm(const QDateTime &qdt, const QString &noti ); 205 void addAlarm(const QDateTime &qdt, const QString &noti );
205 void addSuspendAlarm(const QDateTime &qdt, const QString &noti ); 206 void addSuspendAlarm(const QDateTime &qdt, const QString &noti );
206 void removeAlarm(const QDateTime &qdt, const QString &noti ); 207 void removeAlarm(const QDateTime &qdt, const QString &noti );
207 208
208 /** options dialog made a changed to the configuration. we catch this 209 /** options dialog made a changed to the configuration. we catch this
209 * and notify all widgets which need to update their configuration. */ 210 * and notify all widgets which need to update their configuration. */
210 void updateConfig(); 211 void updateConfig();
211 212
212 void insertBirthdays(const QString& uid, const QStringList& birthdayList, 213 void insertBirthdays(const QString& uid, const QStringList& birthdayList,
213 const QStringList& anniversaryList, const QStringList& realNameList, 214 const QStringList& anniversaryList, const QStringList& realNameList,
214 const QStringList& emailList, const QStringList& assembledNameList, 215 const QStringList& emailList, const QStringList& assembledNameList,
215 const QStringList& uidList); 216 const QStringList& uidList);
216 217
217 /** 218 /**
218 Load calendar from file \a filename. If \a merge is true, load 219 Load calendar from file \a filename. If \a merge is true, load
219 calendar into existing one, if it is false, clear calendar, before 220 calendar into existing one, if it is false, clear calendar, before
220 loading. Return true, if calendar could be successfully loaded. 221 loading. Return true, if calendar could be successfully loaded.
221 */ 222 */
222 bool openCalendar(QString filename, bool merge=false); 223 bool openCalendar(QString filename, bool merge=false);
223 bool syncCalendar(QString filename,int mode = 0 ); 224 bool syncCalendar(QString filename,int mode = 0 );
224 225
225 /** 226 /**
226 Save calendar data to file. Return true if calendar could be 227 Save calendar data to file. Return true if calendar could be
227 successfully saved. 228 successfully saved.
228 */ 229 */
229 bool saveCalendar(QString filename); 230 bool saveCalendar(QString filename);
230 231
231 /** 232 /**
232 Close calendar. Clear calendar data and reset views to display an empty 233 Close calendar. Clear calendar data and reset views to display an empty
233 calendar. 234 calendar.
234 */ 235 */
235 void closeCalendar(); 236 void closeCalendar();
236 237
237 /** Archive old events of calendar */ 238 /** Archive old events of calendar */
238 void archiveCalendar(); 239 void archiveCalendar();
239 240
240 void showIncidence(); 241 void showIncidence();
241 void editIncidence(); 242 void editIncidence();
242 void editIncidenceDescription(); 243 void editIncidenceDescription();
243 void deleteIncidence(); 244 void deleteIncidence();
244 void cloneIncidence(); 245 void cloneIncidence();
245 void moveIncidence(); 246 void moveIncidence();
246 void beamIncidence(); 247 void beamIncidence();
247 void toggleCancelIncidence(); 248 void toggleCancelIncidence();
248 249
249 /** create an editeventwin with supplied date/time, and if bool is true, 250 /** create an editeventwin with supplied date/time, and if bool is true,
250 * make the event take all day. */ 251 * make the event take all day. */
251 void newEvent(QDateTime, QDateTime, bool allDay ); 252 void newEvent(QDateTime, QDateTime, bool allDay );
252 void newEvent(QDateTime, QDateTime); 253 void newEvent(QDateTime, QDateTime);
253 void newEvent(QDateTime fh); 254 void newEvent(QDateTime fh);
254 void newEvent(QDate dt); 255 void newEvent(QDate dt);
255 /** create new event without having a date hint. Takes current date as 256 /** create new event without having a date hint. Takes current date as
256 default hint. */ 257 default hint. */
257 void newEvent(); 258 void newEvent();
258 void newFloatingEvent(); 259 void newFloatingEvent();
259 260
260 /** Create a read-only viewer dialog for the supplied incidence. It calls the correct showXXX method*/ 261 /** Create a read-only viewer dialog for the supplied incidence. It calls the correct showXXX method*/
261 void showIncidence(Incidence *); 262 void showIncidence(Incidence *);
262 void showIncidence(QString uid); 263 void showIncidence(QString uid);
263 /** Create an editor for the supplied incidence. It calls the correct editXXX method*/ 264 /** Create an editor for the supplied incidence. It calls the correct editXXX method*/
264 void editIncidence(Incidence *); 265 void editIncidence(Incidence *);
265 /** Delete the supplied incidence. It calls the correct deleteXXX method*/ 266 /** Delete the supplied incidence. It calls the correct deleteXXX method*/
266 void deleteIncidence(Incidence *); 267 void deleteIncidence(Incidence *);
267 void cloneIncidence(Incidence *); 268 void cloneIncidence(Incidence *);
268 void cancelIncidence(Incidence *); 269 void cancelIncidence(Incidence *);
269 /** Create an editor for the supplied event. */ 270 /** Create an editor for the supplied event. */
270 void editEvent(Event *); 271 void editEvent(Event *);
271 /** Delete the supplied event. */ 272 /** Delete the supplied event. */
272 void deleteEvent(Event *); 273 void deleteEvent(Event *);
273 /** Delete the event with the given unique ID. Returns false, if event wasn't 274 /** Delete the event with the given unique ID. Returns false, if event wasn't
274 found. */ 275 found. */
275 bool deleteEvent(const QString &uid); 276 bool deleteEvent(const QString &uid);
276 /** Create a read-only viewer dialog for the supplied event. */ 277 /** Create a read-only viewer dialog for the supplied event. */
277 void showEvent(Event *); 278 void showEvent(Event *);
278 279
279 void editJournal(Journal *); 280 void editJournal(Journal *);
280 void showJournal(Journal *); 281 void showJournal(Journal *);
281 void deleteJournal(Journal *); 282 void deleteJournal(Journal *);
282 /** Create an editor dialog for a todo */ 283 /** Create an editor dialog for a todo */
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 1320231..63053a5 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -183,386 +183,389 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
183 else { 183 else {
184 if ( p->mToolBarUpF ) 184 if ( p->mToolBarUpF )
185 tbd = Right; 185 tbd = Right;
186 else 186 else
187 tbd = Left; 187 tbd = Left;
188 } 188 }
189 filterToolBar = new QPEToolBar ( this ); 189 filterToolBar = new QPEToolBar ( this );
190 filterMenubar = new QMenuBar( 0 ); 190 filterMenubar = new QMenuBar( 0 );
191 QFontMetrics fm ( filterMenubar->font() ); 191 QFontMetrics fm ( filterMenubar->font() );
192 192
193 filterPopupMenu = new QPopupMenu( this ); 193 filterPopupMenu = new QPopupMenu( this );
194 filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 ); 194 filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 );
195 QString addTest = "A"; 195 QString addTest = "A";
196 filterMenubar->setMinimumWidth( fm.width( i18n("No Filter")+addTest ) ); 196 filterMenubar->setMinimumWidth( fm.width( i18n("No Filter")+addTest ) );
197#ifdef DESKTOP_VERSION 197#ifdef DESKTOP_VERSION
198 addTest = "AAABBBCCCx"; 198 addTest = "AAABBBCCCx";
199#else 199#else
200 addTest = "AAx"; 200 addTest = "AAx";
201#endif 201#endif
202 filterMenubar->setMaximumWidth( fm.width( i18n("No Filter")+addTest ) ); 202 filterMenubar->setMaximumWidth( fm.width( i18n("No Filter")+addTest ) );
203 addToolBar (filterToolBar , tbd ); 203 addToolBar (filterToolBar , tbd );
204 connect ( filterPopupMenu , SIGNAL( activated ( int ) ), this, SLOT (selectFilterPopup( int ) ) ); 204 connect ( filterPopupMenu , SIGNAL( activated ( int ) ), this, SLOT (selectFilterPopup( int ) ) );
205 connect ( filterPopupMenu , SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenuPopup() ) ); 205 connect ( filterPopupMenu , SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenuPopup() ) );
206 if ( !KOPrefs::instance()->mShowIconFilter && !p->mShowIconOnetoolbar ) 206 if ( !KOPrefs::instance()->mShowIconFilter && !p->mShowIconOnetoolbar )
207 filterToolBar->hide(); 207 filterToolBar->hide();
208 } else { 208 } else {
209 filterToolBar = 0; 209 filterToolBar = 0;
210 filterMenubar = 0; 210 filterMenubar = 0;
211 filterPopupMenu = 0; 211 filterPopupMenu = 0;
212 } 212 }
213 if ( p->mShowIconOnetoolbar ) { 213 if ( p->mShowIconOnetoolbar ) {
214 viewToolBar = iconToolBar ; 214 viewToolBar = iconToolBar ;
215 navigatorToolBar = iconToolBar ; 215 navigatorToolBar = iconToolBar ;
216 } else { 216 } else {
217#ifndef DESKTOP_VERSION 217#ifndef DESKTOP_VERSION
218 setToolBarsMovable( false ); 218 setToolBarsMovable( false );
219#endif 219#endif
220 if ( p->mToolBarHorV ) { 220 if ( p->mToolBarHorV ) {
221 if ( p->mToolBarUpV ) 221 if ( p->mToolBarUpV )
222 tbd = Bottom; 222 tbd = Bottom;
223 else 223 else
224 tbd = Top; 224 tbd = Top;
225 } 225 }
226 else { 226 else {
227 if ( p->mToolBarUpV ) 227 if ( p->mToolBarUpV )
228 tbd = Right; 228 tbd = Right;
229 else 229 else
230 tbd = Left; 230 tbd = Left;
231 } 231 }
232 viewToolBar = new QPEToolBar( this ); 232 viewToolBar = new QPEToolBar( this );
233 addToolBar (viewToolBar , tbd ); 233 addToolBar (viewToolBar , tbd );
234 if ( p->mToolBarHorN ) { 234 if ( p->mToolBarHorN ) {
235 if ( p->mToolBarUpN ) 235 if ( p->mToolBarUpN )
236 tbd = Bottom; 236 tbd = Bottom;
237 else 237 else
238 tbd = Top; 238 tbd = Top;
239 } 239 }
240 else { 240 else {
241 if ( p->mToolBarUpN ) 241 if ( p->mToolBarUpN )
242 tbd = Right; 242 tbd = Right;
243 else 243 else
244 tbd = Left; 244 tbd = Left;
245 } 245 }
246 navigatorToolBar = new QPEToolBar( this ); 246 navigatorToolBar = new QPEToolBar( this );
247 addToolBar (navigatorToolBar , tbd ); 247 addToolBar (navigatorToolBar , tbd );
248 } 248 }
249 249
250 250
251 251
252 mCalendarModifiedFlag = false; 252 mCalendarModifiedFlag = false;
253 QLabel* splash = new QLabel(i18n("KO/Pi is starting ... "), this ); 253 QLabel* splash = new QLabel(i18n("KO/Pi is starting ... "), this );
254 splash->setAlignment ( AlignCenter ); 254 splash->setAlignment ( AlignCenter );
255 setCentralWidget( splash ); 255 setCentralWidget( splash );
256#ifndef DESKTOP_VERSION 256#ifndef DESKTOP_VERSION
257 showMaximized(); 257 showMaximized();
258#endif 258#endif
259 259
260 //qDebug("Mainwidget x %d y %d w %d h %d", x(), y(), width(), height ()); 260 //qDebug("Mainwidget x %d y %d w %d h %d", x(), y(), width(), height ());
261 setDefaultPreferences(); 261 setDefaultPreferences();
262 mCalendar = new CalendarLocal(); 262 mCalendar = new CalendarLocal();
263 mView = new CalendarView( mCalendar, this,"mCalendar " ); 263 mView = new CalendarView( mCalendar, this,"mCalendar " );
264 mView->hide(); 264 mView->hide();
265 //mView->resize(splash->size() ); 265 //mView->resize(splash->size() );
266 initActions(); 266 initActions();
267 mSyncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)mView, KSyncManager::KOPI, KOPrefs::instance(), syncMenu); 267 mSyncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)mView, KSyncManager::KOPI, KOPrefs::instance(), syncMenu);
268 mSyncManager->setBlockSave(false); 268 mSyncManager->setBlockSave(false);
269 mView->setSyncManager(mSyncManager); 269 mView->setSyncManager(mSyncManager);
270#ifndef DESKTOP_VERSION 270#ifndef DESKTOP_VERSION
271 iconToolBar->show(); 271 iconToolBar->show();
272 qApp->processEvents(); 272 qApp->processEvents();
273#endif 273#endif
274 //qDebug("Splashwidget x %d y %d w %d h %d", splash-> x(), splash->y(), splash->width(),splash-> height ()); 274 //qDebug("Splashwidget x %d y %d w %d h %d", splash-> x(), splash->y(), splash->width(),splash-> height ());
275 int vh = height() ; 275 int vh = height() ;
276 int vw = width(); 276 int vw = width();
277 //qDebug("Toolbar hei %d ",iconToolBar->height() ); 277 //qDebug("Toolbar hei %d ",iconToolBar->height() );
278 if ( iconToolBar->orientation () == Qt:: Horizontal ) { 278 if ( iconToolBar->orientation () == Qt:: Horizontal ) {
279 vh -= iconToolBar->height(); 279 vh -= iconToolBar->height();
280 } else { 280 } else {
281 vw -= iconToolBar->height(); 281 vw -= iconToolBar->height();
282 } 282 }
283 //mView->setMaximumSize( splash->size() ); 283 //mView->setMaximumSize( splash->size() );
284 //mView->resize( splash->size() ); 284 //mView->resize( splash->size() );
285 //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); 285 //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ());
286 mView->readSettings(); 286 mView->readSettings();
287 bool newFile = false; 287 bool newFile = false;
288 if( !QFile::exists( defaultFileName() ) ) { 288 if( !QFile::exists( defaultFileName() ) ) {
289 QFileInfo finfo ( defaultFileName() ); 289 QFileInfo finfo ( defaultFileName() );
290 QString oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/Applications/korganizer/mycalendar.ics"); 290 QString oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/Applications/korganizer/mycalendar.ics");
291 QString message = "You are starting KO/Pi for the\nfirst time after updating to a\nversion >= 1.9.1. The location of the\ndefault calendar file has changed.\nA mycalendar.ics file was detected\nat the old location.\nThis file will be loaded now\nand stored at the new location!\n(Config file location has changed, too!)\nPlease read menu Help-What's New!\n"; 291 QString message = "You are starting KO/Pi for the\nfirst time after updating to a\nversion >= 1.9.1. The location of the\ndefault calendar file has changed.\nA mycalendar.ics file was detected\nat the old location.\nThis file will be loaded now\nand stored at the new location!\n(Config file location has changed, too!)\nPlease read menu Help-What's New!\n";
292 finfo.setFile( oldFile ); 292 finfo.setFile( oldFile );
293 if (finfo.exists() ) { 293 if (finfo.exists() ) {
294 KMessageBox::information( this, message); 294 KMessageBox::information( this, message);
295 mView->openCalendar( oldFile ); 295 mView->openCalendar( oldFile );
296 qApp->processEvents(); 296 qApp->processEvents();
297 } else { 297 } else {
298 oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/korganizer/mycalendar.ics"); 298 oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/korganizer/mycalendar.ics");
299 finfo.setFile( oldFile ); 299 finfo.setFile( oldFile );
300 if (finfo.exists() ) { 300 if (finfo.exists() ) {
301 KMessageBox::information( this, message); 301 KMessageBox::information( this, message);
302 mView->openCalendar( oldFile ); 302 mView->openCalendar( oldFile );
303 qApp->processEvents(); 303 qApp->processEvents();
304 } 304 }
305 } 305 }
306 mView->saveCalendar( defaultFileName() ); 306 mView->saveCalendar( defaultFileName() );
307 newFile = true; 307 newFile = true;
308 } 308 }
309 309
310 QTime neededSaveTime = QDateTime::currentDateTime().time(); 310 QTime neededSaveTime = QDateTime::currentDateTime().time();
311 mView->openCalendar( defaultFileName() ); 311 mView->openCalendar( defaultFileName() );
312 int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); 312 int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() );
313 qDebug("KO: Calendar loading time: %d ms",msNeeded ); 313 qDebug("KO: Calendar loading time: %d ms",msNeeded );
314 314
315 if ( KPimGlobalPrefs::instance()->mPreferredLanguage != KOPrefs::instance()->mOldLoadedLanguage ) { 315 if ( KPimGlobalPrefs::instance()->mPreferredLanguage != KOPrefs::instance()->mOldLoadedLanguage ) {
316 KOPrefs::instance()->setAllDefaults(); 316 KOPrefs::instance()->setAllDefaults();
317 int count = mView->addCategories(); 317 int count = mView->addCategories();
318 } 318 }
319 processIncidenceSelection( 0 ); 319 processIncidenceSelection( 0 );
320 connect( mView, SIGNAL( incidenceSelected( Incidence * ) ), 320 connect( mView, SIGNAL( incidenceSelected( Incidence * ) ),
321 SLOT( processIncidenceSelection( Incidence * ) ) ); 321 SLOT( processIncidenceSelection( Incidence * ) ) );
322 connect( mView, SIGNAL( modifiedChanged( bool ) ), 322 connect( mView, SIGNAL( modifiedChanged( bool ) ),
323 SLOT( slotModifiedChanged( bool ) ) ); 323 SLOT( slotModifiedChanged( bool ) ) );
324 324
325 325
326 connect( mView, SIGNAL( tempDisableBR(bool) ), 326 connect( mView, SIGNAL( tempDisableBR(bool) ),
327 SLOT( disableBR(bool) ) ); 327 SLOT( disableBR(bool) ) );
328 connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) ); 328 connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) );
329 mView->setModified( false ); 329 mView->setModified( false );
330 mBlockAtStartup = false; 330 mBlockAtStartup = false;
331 mView->setModified( false ); 331 mView->setModified( false );
332 setCentralWidget( mView ); 332 setCentralWidget( mView );
333 globalFlagBlockStartup = 0; 333 globalFlagBlockStartup = 0;
334 mView->show(); 334 mView->show();
335 delete splash; 335 delete splash;
336 if ( newFile ) 336 if ( newFile )
337 mView->updateConfig(); 337 mView->updateConfig();
338 // qApp->processEvents(); 338 // qApp->processEvents();
339 //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); 339 //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ());
340 //fillSyncMenu(); 340 //fillSyncMenu();
341 341
342 342
343 connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) ); 343 connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) );
344 connect(mView , SIGNAL( save() ), this, SLOT( save() ) ); 344 connect(mView , SIGNAL( save() ), this, SLOT( save() ) );
345 connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) ); 345 connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) );
346 connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); 346 connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) );
347 connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); 347 connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) );
348 mSyncManager->setDefaultFileName( sentSyncFile()); 348 mSyncManager->setDefaultFileName( sentSyncFile());
349 connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) ); 349 connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) );
350 mSyncManager->fillSyncMenu(); 350 mSyncManager->fillSyncMenu();
351 351
352 352
353 353
354 mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins ); 354 mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins );
355 if ( showWarning ) { 355 if ( showWarning ) {
356 KMessageBox::information( this, 356 KMessageBox::information( this,
357 "You are starting KO/Pi for the first time.\nPlease read menu: Help-What's New,\nif you did an update!\nPlease choose your timezone in the \nConfigure Dialog TAB Time Zone!\nPlease choose your language\nin the TAB Locale!\nYou get the Configure Dialog\nvia Menu: Actions - Configure....\nClick OK to show the Configure Dialog!\n", "KO/Pi information"); 357 "You are starting KO/Pi for the first time.\nPlease read menu: Help-What's New,\nif you did an update!\nPlease choose your timezone in the \nConfigure Dialog TAB Time Zone!\nPlease choose your language\nin the TAB Locale!\nYou get the Configure Dialog\nvia Menu: Actions - Configure....\nClick OK to show the Configure Dialog!\n", "KO/Pi information");
358 qApp->processEvents(); 358 qApp->processEvents();
359 mView->dialogManager()->showSyncOptions(); 359 mView->dialogManager()->showSyncOptions();
360 } 360 }
361 361
362 //US listen for result adressed from Ka/Pi 362 //US listen for result adressed from Ka/Pi
363#ifndef DESKTOP_VERSION 363#ifndef DESKTOP_VERSION
364 connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); 364 connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
365#endif 365#endif
366#ifndef DESKTOP_VERSION 366#ifndef DESKTOP_VERSION
367 infrared = 0; 367 infrared = 0;
368#endif 368#endif
369 updateFilterToolbar(); 369 updateFilterToolbar();
370 updateWeek( mView->startDate() ); 370 updateWeek( mView->startDate() );
371 connect( mView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ), 371 connect( mView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ),
372 SLOT( updateWeekNum( const KCal::DateList & ) ) ); 372 SLOT( updateWeekNum( const KCal::DateList & ) ) );
373 mBRdisabled = false; 373 mBRdisabled = false;
374 //toggleBeamReceive(); 374 //toggleBeamReceive();
375 375 int tiint= 3000;
376 QTimer::singleShot( 1000, mView, SLOT ( checkAlarms() )); 376#ifndef DESKTOP_VERSION
377 tiint = 5000;
378#endif
379 QTimer::singleShot( tiint, mView, SLOT ( checkAlarms() ));
377} 380}
378MainWindow::~MainWindow() 381MainWindow::~MainWindow()
379{ 382{
380 //qDebug("MainWindow::~MainWindow() "); 383 //qDebug("MainWindow::~MainWindow() ");
381 //save toolbar location 384 //save toolbar location
382 delete mCalendar; 385 delete mCalendar;
383 delete mSyncManager; 386 delete mSyncManager;
384#ifndef DESKTOP_VERSION 387#ifndef DESKTOP_VERSION
385 if ( infrared ) 388 if ( infrared )
386 delete infrared; 389 delete infrared;
387#endif 390#endif
388 391
389 392
390} 393}
391 394
392void MainWindow::disableBR(bool b) 395void MainWindow::disableBR(bool b)
393{ 396{
394#ifndef DESKTOP_VERSION 397#ifndef DESKTOP_VERSION
395 if ( b ) { 398 if ( b ) {
396 if ( infrared ) { 399 if ( infrared ) {
397 toggleBeamReceive(); 400 toggleBeamReceive();
398 mBRdisabled = true; 401 mBRdisabled = true;
399 } 402 }
400 mBRdisabled = true; 403 mBRdisabled = true;
401 } else { 404 } else {
402 if ( mBRdisabled ) { 405 if ( mBRdisabled ) {
403 mBRdisabled = false; 406 mBRdisabled = false;
404 //makes no sense,because other cal ap is probably running 407 //makes no sense,because other cal ap is probably running
405 // toggleBeamReceive(); 408 // toggleBeamReceive();
406 } 409 }
407 } 410 }
408#endif 411#endif
409 412
410} 413}
411bool MainWindow::beamReceiveEnabled() 414bool MainWindow::beamReceiveEnabled()
412{ 415{
413#ifndef DESKTOP_VERSION 416#ifndef DESKTOP_VERSION
414 return ( infrared != 0 ); 417 return ( infrared != 0 );
415#endif 418#endif
416 return false; 419 return false;
417} 420}
418 421
419void MainWindow::toggleBeamReceive() 422void MainWindow::toggleBeamReceive()
420{ 423{
421 if ( mBRdisabled ) 424 if ( mBRdisabled )
422 return; 425 return;
423#ifndef DESKTOP_VERSION 426#ifndef DESKTOP_VERSION
424 if ( infrared ) { 427 if ( infrared ) {
425 qDebug("KO: Disable BeamReceive "); 428 qDebug("KO: Disable BeamReceive ");
426 delete infrared; 429 delete infrared;
427 infrared = 0; 430 infrared = 0;
428 brAction->setOn(false); 431 brAction->setOn(false);
429 return; 432 return;
430 } 433 }
431 qDebug("KO: Enable BeamReceive "); 434 qDebug("KO: Enable BeamReceive ");
432 brAction->setOn(true); 435 brAction->setOn(true);
433 infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ; 436 infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ;
434 QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& ))); 437 QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& )));
435#endif 438#endif
436} 439}
437void MainWindow::showMaximized () 440void MainWindow::showMaximized ()
438{ 441{
439#ifndef DESKTOP_VERSION 442#ifndef DESKTOP_VERSION
440 if ( ! globalFlagBlockStartup ) 443 if ( ! globalFlagBlockStartup )
441 if ( mClosed ) 444 if ( mClosed )
442 mView->goToday(); 445 mView->goToday();
443#endif 446#endif
444 QWidget::showMaximized () ; 447 QWidget::showMaximized () ;
445 mClosed = false; 448 mClosed = false;
446} 449}
447void MainWindow::closeEvent( QCloseEvent* ce ) 450void MainWindow::closeEvent( QCloseEvent* ce )
448{ 451{
449 452
450 453
451 454
452 if ( ! KOPrefs::instance()->mAskForQuit ) { 455 if ( ! KOPrefs::instance()->mAskForQuit ) {
453 saveOnClose(); 456 saveOnClose();
454 mClosed = true; 457 mClosed = true;
455 ce->accept(); 458 ce->accept();
456 return; 459 return;
457 460
458 } 461 }
459 462
460 switch( QMessageBox::information( this, "KO/Pi", 463 switch( QMessageBox::information( this, "KO/Pi",
461 i18n("Do you really want\nto close KO/Pi?"), 464 i18n("Do you really want\nto close KO/Pi?"),
462 i18n("Close"), i18n("No"), 465 i18n("Close"), i18n("No"),
463 0, 0 ) ) { 466 0, 0 ) ) {
464 case 0: 467 case 0:
465 saveOnClose(); 468 saveOnClose();
466 mClosed = true; 469 mClosed = true;
467 ce->accept(); 470 ce->accept();
468 break; 471 break;
469 case 1: 472 case 1:
470 ce->ignore(); 473 ce->ignore();
471 break; 474 break;
472 case 2: 475 case 2:
473 476
474 default: 477 default:
475 break; 478 break;
476 } 479 }
477 480
478 481
479} 482}
480 483
481void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) 484void MainWindow::recieve( const QCString& cmsg, const QByteArray& data )
482{ 485{
483 QDataStream stream( data, IO_ReadOnly ); 486 QDataStream stream( data, IO_ReadOnly );
484 // QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" ); 487 // QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" );
485 //QString datamess; 488 //QString datamess;
486 //qDebug("message "); 489 //qDebug("message ");
487 qDebug("KO: QCOP message received: %s ", cmsg.data() ); 490 qDebug("KO: QCOP message received: %s ", cmsg.data() );
488 491
489 if ( cmsg == "setDocument(QString)" ) { 492 if ( cmsg == "setDocument(QString)" ) {
490 QDataStream stream( data, IO_ReadOnly ); 493 QDataStream stream( data, IO_ReadOnly );
491 QString fileName; 494 QString fileName;
492 stream >> fileName; 495 stream >> fileName;
493 //qDebug("filename %s ", fileName.latin1()); 496 //qDebug("filename %s ", fileName.latin1());
494 showMaximized(); 497 showMaximized();
495 raise(); 498 raise();
496 KOPrefs::instance()->mLastSyncedLocalFile = fileName ; 499 KOPrefs::instance()->mLastSyncedLocalFile = fileName ;
497 mSyncManager->slotSyncMenu( 1002 ); 500 mSyncManager->slotSyncMenu( 1002 );
498 return; 501 return;
499 } 502 }
500 503
501 if ( cmsg == "-writeFile" ) { 504 if ( cmsg == "-writeFile" ) {
502 // I made from the "-writeFile" an "-writeAlarm" 505 // I made from the "-writeFile" an "-writeAlarm"
503 mView->viewManager()->showWhatsNextView(); 506 mView->viewManager()->showWhatsNextView();
504 mCalendar->checkAlarmForIncidence( 0, true); 507 mCalendar->checkAlarmForIncidence( 0, true);
505 showMaximized(); 508 showMaximized();
506 raise(); 509 raise();
507 return; 510 return;
508 511
509 } 512 }
510 if ( cmsg == "-writeFileSilent" ) { 513 if ( cmsg == "-writeFileSilent" ) {
511 // I made from the "-writeFile" an "-writeAlarm" 514 // I made from the "-writeFile" an "-writeAlarm"
512 // mView->viewManager()->showWhatsNextView(); 515 // mView->viewManager()->showWhatsNextView();
513 mCalendar->checkAlarmForIncidence( 0, true); 516 mCalendar->checkAlarmForIncidence( 0, true);
514 //showMaximized(); 517 //showMaximized();
515 //raise(); 518 //raise();
516 hide(); 519 hide();
517 return; 520 return;
518 } 521 }
519 if ( cmsg == "-newCountdown" ) { 522 if ( cmsg == "-newCountdown" ) {
520 qDebug("newCountdown "); 523 qDebug("newCountdown ");
521 524
522 } 525 }
523 QString msg ; 526 QString msg ;
524 QString allmsg = cmsg; 527 QString allmsg = cmsg;
525 while ( allmsg.length() > 0 ) { 528 while ( allmsg.length() > 0 ) {
526 int nextC = allmsg.find( "-", 1 ); 529 int nextC = allmsg.find( "-", 1 );
527 if ( nextC == -1 ) { 530 if ( nextC == -1 ) {
528 msg = allmsg; 531 msg = allmsg;
529 allmsg = ""; 532 allmsg = "";
530 } else{ 533 } else{
531 msg = allmsg.left( nextC ); 534 msg = allmsg.left( nextC );
532 allmsg = allmsg.mid( nextC, allmsg.length()-nextC ); 535 allmsg = allmsg.mid( nextC, allmsg.length()-nextC );
533 } 536 }
534 //qDebug("msg: %s all: %s ", msg.latin1(), allmsg.latin1() ); 537 //qDebug("msg: %s all: %s ", msg.latin1(), allmsg.latin1() );
535 if ( msg == "-newEvent" ) { 538 if ( msg == "-newEvent" ) {
536 mView->newEvent(); 539 mView->newEvent();
537 } 540 }
538 if ( msg == "-newTodo" ) { 541 if ( msg == "-newTodo" ) {
539 mView->newTodo(); 542 mView->newTodo();
540 543
541 } 544 }
542 if ( msg == "-showWN" ) { 545 if ( msg == "-showWN" ) {
543 mView->viewManager()->showWhatsNextView(); 546 mView->viewManager()->showWhatsNextView();
544 } 547 }
545 if ( msg == "-showTodo" ) { 548 if ( msg == "-showTodo" ) {
546 mView->viewManager()->showTodoView(); 549 mView->viewManager()->showTodoView();
547 } 550 }
548 if ( msg == "-showList" ) { 551 if ( msg == "-showList" ) {
549 mView->viewManager()->showListView(); 552 mView->viewManager()->showListView();
550 } 553 }
551 else if ( msg == "-showDay" ) { 554 else if ( msg == "-showDay" ) {
552 mView->viewManager()->showDayView(); 555 mView->viewManager()->showDayView();
553 } 556 }
554 else if ( msg == "-showWWeek" ) { 557 else if ( msg == "-showWWeek" ) {
555 mView->viewManager()->showWorkWeekView(); 558 mView->viewManager()->showWorkWeekView();
556 } 559 }
557 else if ( msg == "-ringSync" ) { 560 else if ( msg == "-ringSync" ) {
558 mSyncManager->multiSync( false ); 561 mSyncManager->multiSync( false );
559 } 562 }
560 else if ( msg == "-showWeek" ) { 563 else if ( msg == "-showWeek" ) {
561 mView->viewManager()->showWeekView(); 564 mView->viewManager()->showWeekView();
562 } 565 }
563 else if ( msg == "-showTodo" ) { 566 else if ( msg == "-showTodo" ) {
564 mView->viewManager()->showTodoView(); 567 mView->viewManager()->showTodoView();
565 } 568 }
566 else if ( msg == "-showJournal" ) { 569 else if ( msg == "-showJournal" ) {
567 mView->dateNavigator()->selectDates( 1 ); 570 mView->dateNavigator()->selectDates( 1 );
568 mView->dateNavigator()->selectToday(); 571 mView->dateNavigator()->selectToday();