summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-06-09 16:17:14 (UTC)
committer zautrix <zautrix>2005-06-09 16:17:14 (UTC)
commit89c5159208fd982f527117e49d67ea1f90553dbe (patch) (unidiff)
treeb6b72ca9e0668e871a6969b25654945747015d0f
parentad88eadf0bdb34cb4a93639b50a5566a06470c22 (diff)
downloadkdepimpi-89c5159208fd982f527117e49d67ea1f90553dbe.zip
kdepimpi-89c5159208fd982f527117e49d67ea1f90553dbe.tar.gz
kdepimpi-89c5159208fd982f527117e49d67ea1f90553dbe.tar.bz2
dialog fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt4
-rw-r--r--korganizer/calendarview.cpp10
-rw-r--r--korganizer/calendarview.h1
-rw-r--r--korganizer/kodialogmanager.cpp28
-rw-r--r--korganizer/kodialogmanager.h1
-rw-r--r--korganizer/koprefsdialog.cpp28
-rw-r--r--korganizer/mainwindow.cpp9
7 files changed, 56 insertions, 25 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index 6b62d4e..bb3a00d 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1189,203 +1189,203 @@
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 alarms!","KO/Pi: 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{ "Print complete list","Drucke komplette Liste" }, 1375{ "Print complete list","Drucke komplette Liste" },
1376{ "Hide all selected","Verstecke Selektierte" }, 1376{ "Hide all selected","Verstecke Selektierte" },
1377{ "Add items","hinzufügen" }, 1377{ "Add items","hinzufügen" },
1378{ "One (or more) selected\ntodo has subtodos!\nDo you want to select\nall subtodos of all\nselected todos as well?","Ein (oder mehrere) ausgewähltes\nTodo hat Untertodos!\nMöchten Sie der Auswahlliste\nalle Untertodos von allen\nausgewählten Todos hinzufügen?" }, 1378{ "One (or more) selected\ntodo has subtodos!\nDo you want to select\nall subtodos of all\nselected todos as well?","Ein (oder mehrere) ausgewähltes\nTodo hat Untertodos!\nMöchten Sie der Auswahlliste\nalle Untertodos von allen\nausgewählten Todos hinzufügen?" },
1379{ "Print List View...","Drucke Listenansicht..." }, 1379{ "Print List View...","Drucke Listenansicht..." },
1380{ "You can make a printout of the <b>List View</b> and the list view in the <b>Search Dialog</b>! To do this, please go to the <b>List View/Search Dialog</b>. Right click on the list. Select in the popup menu the entry <b>Print complete list</b>. That prints the list as you see it. You can remove items from the list before printing without deleting the corresponding event/todo! Simply select all items you do not want to print out. Then right click on one of the items and choose <b>Hide selected items</b>. After that you can print the list without these items.","Sie können die <b>Listenansicht</b> und die Listenansicht im <b>Suchdialog</b> ausdrucken! Um das zu machen gehen Sie bitte zur <b>Listenansicht</b> oder zum <b>Suchdialog</b>. Rechtsklicken Sie auf die Liste. Wählen Sie im Popupmenu den Eintrag <b>Drucke komplette Liste</b>. Das druckt die Liste so, wie man sie sieht. Sie können Listeneinträge entfernen ohne die korrespondierenden Ereignisse/Todos zu löschen! Selektieren sie einfach alle Einträge, die sie nicht ausdrucken möchten. Dann Rechtsklicken Sie auf einen Eintrag und wählen <b>Verstecke Selektierte</b>. Danach können Sie die Liste ohne diese Einträge ausdrucken." }, 1380{ "You can make a printout of the <b>List View</b> and the list view in the <b>Search Dialog</b>! To do this, please go to the <b>List View/Search Dialog</b>. Right click on the list. Select in the popup menu the entry <b>Print complete list</b>. That prints the list as you see it. You can remove items from the list before printing without deleting the corresponding event/todo! Simply select all items you do not want to print out. Then right click on one of the items and choose <b>Hide selected items</b>. After that you can print the list without these items.","Sie können die <b>Listenansicht</b> und die Listenansicht im <b>Suchdialog</b> ausdrucken! Um das zu machen gehen Sie bitte zur <b>Listenansicht</b> oder zum <b>Suchdialog</b>. Rechtsklicken Sie auf die Liste. Wählen Sie im Popupmenu den Eintrag <b>Drucke komplette Liste</b>. Das druckt die Liste so, wie man sie sieht. Sie können Listeneinträge entfernen ohne die korrespondierenden Ereignisse/Todos zu löschen! Selektieren sie einfach alle Einträge, die sie nicht ausdrucken möchten. Dann Rechtsklicken Sie auf einen Eintrag und wählen <b>Verstecke Selektierte</b>. Danach können Sie die Liste ohne diese Einträge ausdrucken." },
1381{ "","" }, 1381{ "Configure KO/Pi...","Konfiguriere KO/Pi..." },
1382{ "","" }, 1382{ "Global Settings...","Globale Einstellungen..." },
1383{ "","" }, 1383{ "","" },
1384{ "","" }, 1384{ "","" },
1385{ "","" }, 1385{ "","" },
1386{ "","" }, 1386{ "","" },
1387{ "","" }, 1387{ "","" },
1388{ "","" }, 1388{ "","" },
1389{ "","" }, 1389{ "","" },
1390{ "","" }, 1390{ "","" },
1391{ "","" }, \ No newline at end of file 1391{ "","" }, \ No newline at end of file
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 7c7466b..4794414 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2331,405 +2331,407 @@ void CalendarView::writeLocale()
2331 KGlobal::locale()->setLanguage( KOPrefs::instance()->mPreferredLanguage ); 2331 KGlobal::locale()->setLanguage( KOPrefs::instance()->mPreferredLanguage );
2332 QString dummy = KOPrefs::instance()->mUserDateFormatLong; 2332 QString dummy = KOPrefs::instance()->mUserDateFormatLong;
2333 KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") )); 2333 KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") ));
2334 dummy = KOPrefs::instance()->mUserDateFormatShort; 2334 dummy = KOPrefs::instance()->mUserDateFormatShort;
2335 KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") )); 2335 KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") ));
2336 KGlobal::locale()->setDaylightSaving( KOPrefs::instance()->mUseDaylightsaving, 2336 KGlobal::locale()->setDaylightSaving( KOPrefs::instance()->mUseDaylightsaving,
2337 KOPrefs::instance()->mDaylightsavingStart, 2337 KOPrefs::instance()->mDaylightsavingStart,
2338 KOPrefs::instance()->mDaylightsavingEnd ); 2338 KOPrefs::instance()->mDaylightsavingEnd );
2339 KGlobal::locale()->setTimezone( KPimGlobalPrefs::instance()->mTimeZoneId ); 2339 KGlobal::locale()->setTimezone( KPimGlobalPrefs::instance()->mTimeZoneId );
2340#endif 2340#endif
2341} 2341}
2342void CalendarView::updateConfig() 2342void CalendarView::updateConfig()
2343{ 2343{
2344 writeLocale(); 2344 writeLocale();
2345 if ( KOPrefs::instance()->mUseAppColors ) 2345 if ( KOPrefs::instance()->mUseAppColors )
2346 QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); 2346 QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true );
2347 emit configChanged(); 2347 emit configChanged();
2348 mTodoList->updateConfig(); 2348 mTodoList->updateConfig();
2349 // mDateNavigator->setFont ( KOPrefs::instance()->mDateNavigatorFont); 2349 // mDateNavigator->setFont ( KOPrefs::instance()->mDateNavigatorFont);
2350 mCalendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); 2350 mCalendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
2351 // To make the "fill window" configurations work 2351 // To make the "fill window" configurations work
2352 //mViewManager->raiseCurrentView(); 2352 //mViewManager->raiseCurrentView();
2353} 2353}
2354 2354
2355 2355
2356void CalendarView::eventChanged(Event *event) 2356void CalendarView::eventChanged(Event *event)
2357{ 2357{
2358 changeEventDisplay(event,KOGlobals::EVENTEDITED); 2358 changeEventDisplay(event,KOGlobals::EVENTEDITED);
2359 //updateUnmanagedViews(); 2359 //updateUnmanagedViews();
2360} 2360}
2361 2361
2362void CalendarView::eventAdded(Event *event) 2362void CalendarView::eventAdded(Event *event)
2363{ 2363{
2364 changeEventDisplay(event,KOGlobals::EVENTADDED); 2364 changeEventDisplay(event,KOGlobals::EVENTADDED);
2365} 2365}
2366 2366
2367void CalendarView::eventToBeDeleted(Event *) 2367void CalendarView::eventToBeDeleted(Event *)
2368{ 2368{
2369 kdDebug() << "CalendarView::eventToBeDeleted(): to be implemented" << endl; 2369 kdDebug() << "CalendarView::eventToBeDeleted(): to be implemented" << endl;
2370} 2370}
2371 2371
2372void CalendarView::eventDeleted() 2372void CalendarView::eventDeleted()
2373{ 2373{
2374 changeEventDisplay(0,KOGlobals::EVENTDELETED); 2374 changeEventDisplay(0,KOGlobals::EVENTDELETED);
2375} 2375}
2376void CalendarView::changeTodoDisplay(Todo *which, int action) 2376void CalendarView::changeTodoDisplay(Todo *which, int action)
2377{ 2377{
2378 changeIncidenceDisplay((Incidence *)which, action); 2378 changeIncidenceDisplay((Incidence *)which, action);
2379 mDateNavigator->updateView(); //LR 2379 mDateNavigator->updateView(); //LR
2380 //mDialogManager->updateSearchDialog(); 2380 //mDialogManager->updateSearchDialog();
2381 2381
2382 if (which) { 2382 if (which) {
2383 mViewManager->updateWNview(); 2383 mViewManager->updateWNview();
2384 //mTodoList->updateView(); 2384 //mTodoList->updateView();
2385 } 2385 }
2386 2386
2387} 2387}
2388 2388
2389void CalendarView::changeIncidenceDisplay(Incidence *which, int action) 2389void CalendarView::changeIncidenceDisplay(Incidence *which, int action)
2390{ 2390{
2391 updateUnmanagedViews(); 2391 updateUnmanagedViews();
2392 //qDebug(" CalendarView::changeIncidenceDisplay++++++++++++++++++++++++++ %d %d ",which, action ); 2392 //qDebug(" CalendarView::changeIncidenceDisplay++++++++++++++++++++++++++ %d %d ",which, action );
2393 if ( action == KOGlobals::EVENTDELETED ) { //delete 2393 if ( action == KOGlobals::EVENTDELETED ) { //delete
2394 mCalendar->checkAlarmForIncidence( 0, true ); 2394 mCalendar->checkAlarmForIncidence( 0, true );
2395 if ( mEventViewerDialog ) 2395 if ( mEventViewerDialog )
2396 mEventViewerDialog->hide(); 2396 mEventViewerDialog->hide();
2397 } 2397 }
2398 else 2398 else
2399 mCalendar->checkAlarmForIncidence( which , false ); 2399 mCalendar->checkAlarmForIncidence( which , false );
2400} 2400}
2401 2401
2402// most of the changeEventDisplays() right now just call the view's 2402// most of the changeEventDisplays() right now just call the view's
2403// total update mode, but they SHOULD be recoded to be more refresh-efficient. 2403// total update mode, but they SHOULD be recoded to be more refresh-efficient.
2404void CalendarView::changeEventDisplay(Event *which, int action) 2404void CalendarView::changeEventDisplay(Event *which, int action)
2405{ 2405{
2406 // kdDebug() << "CalendarView::changeEventDisplay" << endl; 2406 // kdDebug() << "CalendarView::changeEventDisplay" << endl;
2407 changeIncidenceDisplay((Incidence *)which, action); 2407 changeIncidenceDisplay((Incidence *)which, action);
2408 mDateNavigator->updateView(); 2408 mDateNavigator->updateView();
2409 //mDialogManager->updateSearchDialog(); 2409 //mDialogManager->updateSearchDialog();
2410 2410
2411 if (which) { 2411 if (which) {
2412 // If there is an event view visible update the display 2412 // If there is an event view visible update the display
2413 mViewManager->currentView()->changeEventDisplay(which,action); 2413 mViewManager->currentView()->changeEventDisplay(which,action);
2414 // TODO: check, if update needed 2414 // TODO: check, if update needed
2415 // if (which->getTodoStatus()) { 2415 // if (which->getTodoStatus()) {
2416 mTodoList->updateView(); 2416 mTodoList->updateView();
2417 // } 2417 // }
2418 } else { 2418 } else {
2419 mViewManager->currentView()->updateView(); 2419 mViewManager->currentView()->updateView();
2420 } 2420 }
2421} 2421}
2422 2422
2423 2423
2424void CalendarView::updateTodoViews() 2424void CalendarView::updateTodoViews()
2425{ 2425{
2426 mTodoList->updateView(); 2426 mTodoList->updateView();
2427 mViewManager->currentView()->updateView(); 2427 mViewManager->currentView()->updateView();
2428 2428
2429} 2429}
2430 2430
2431 2431
2432void CalendarView::updateView(const QDate &start, const QDate &end) 2432void CalendarView::updateView(const QDate &start, const QDate &end)
2433{ 2433{
2434 mTodoList->updateView(); 2434 mTodoList->updateView();
2435 mViewManager->updateView(start, end); 2435 mViewManager->updateView(start, end);
2436 //mDateNavigator->updateView(); 2436 //mDateNavigator->updateView();
2437} 2437}
2438 2438
2439void CalendarView::clearAllViews() 2439void CalendarView::clearAllViews()
2440{ 2440{
2441 mTodoList->clearList(); 2441 mTodoList->clearList();
2442 mViewManager->clearAllViews(); 2442 mViewManager->clearAllViews();
2443 SearchDialog * sd = mDialogManager->getSearchDialog(); 2443 SearchDialog * sd = mDialogManager->getSearchDialog();
2444 if ( sd ) { 2444 if ( sd ) {
2445 KOListView* kol = sd->listview(); 2445 KOListView* kol = sd->listview();
2446 if ( kol ) 2446 if ( kol )
2447 kol->clearList(); 2447 kol->clearList();
2448 } 2448 }
2449} 2449}
2450void CalendarView::updateView() 2450void CalendarView::updateView()
2451{ 2451{
2452 DateList tmpList = mNavigator->selectedDates(); 2452 DateList tmpList = mNavigator->selectedDates();
2453 2453
2454 if ( KOPrefs::instance()->mHideNonStartedTodos ) 2454 if ( KOPrefs::instance()->mHideNonStartedTodos )
2455 mTodoList->updateView(); 2455 mTodoList->updateView();
2456 // We assume that the navigator only selects consecutive days. 2456 // We assume that the navigator only selects consecutive days.
2457 updateView( tmpList.first(), tmpList.last() ); 2457 updateView( tmpList.first(), tmpList.last() );
2458} 2458}
2459 2459
2460void CalendarView::updateUnmanagedViews() 2460void CalendarView::updateUnmanagedViews()
2461{ 2461{
2462 mDateNavigator->updateDayMatrix(); 2462 mDateNavigator->updateDayMatrix();
2463} 2463}
2464 2464
2465int CalendarView::msgItemDelete(const QString name) 2465int CalendarView::msgItemDelete(const QString name)
2466{ 2466{
2467 return KMessageBox::warningContinueCancel(this,name +"\n\n"+ 2467 return KMessageBox::warningContinueCancel(this,name +"\n\n"+
2468 i18n("This item will be\npermanently deleted."), 2468 i18n("This item will be\npermanently deleted."),
2469 i18n("KO/Pi Confirmation"),i18n("Delete")); 2469 i18n("KO/Pi Confirmation"),i18n("Delete"));
2470} 2470}
2471 2471
2472 2472
2473void CalendarView::edit_cut() 2473void CalendarView::edit_cut()
2474{ 2474{
2475 Event *anEvent=0; 2475 Event *anEvent=0;
2476 2476
2477 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); 2477 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first();
2478 2478
2479 if (mViewManager->currentView()->isEventView()) { 2479 if (mViewManager->currentView()->isEventView()) {
2480 if ( incidence && incidence->typeID() == eventID ) { 2480 if ( incidence && incidence->typeID() == eventID ) {
2481 anEvent = static_cast<Event *>(incidence); 2481 anEvent = static_cast<Event *>(incidence);
2482 } 2482 }
2483 } 2483 }
2484 2484
2485 if (!anEvent) { 2485 if (!anEvent) {
2486 KNotifyClient::beep(); 2486 KNotifyClient::beep();
2487 return; 2487 return;
2488 } 2488 }
2489 DndFactory factory( mCalendar ); 2489 DndFactory factory( mCalendar );
2490 factory.cutIncidence(anEvent); 2490 factory.cutIncidence(anEvent);
2491 changeEventDisplay(anEvent, KOGlobals::EVENTDELETED); 2491 changeEventDisplay(anEvent, KOGlobals::EVENTDELETED);
2492} 2492}
2493 2493
2494void CalendarView::edit_copy() 2494void CalendarView::edit_copy()
2495{ 2495{
2496 Event *anEvent=0; 2496 Event *anEvent=0;
2497 2497
2498 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); 2498 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first();
2499 2499
2500 if (mViewManager->currentView()->isEventView()) { 2500 if (mViewManager->currentView()->isEventView()) {
2501 if ( incidence && incidence->typeID() == eventID ) { 2501 if ( incidence && incidence->typeID() == eventID ) {
2502 anEvent = static_cast<Event *>(incidence); 2502 anEvent = static_cast<Event *>(incidence);
2503 } 2503 }
2504 } 2504 }
2505 2505
2506 if (!anEvent) { 2506 if (!anEvent) {
2507 KNotifyClient::beep(); 2507 KNotifyClient::beep();
2508 return; 2508 return;
2509 } 2509 }
2510 DndFactory factory( mCalendar ); 2510 DndFactory factory( mCalendar );
2511 factory.copyIncidence(anEvent); 2511 factory.copyIncidence(anEvent);
2512} 2512}
2513 2513
2514void CalendarView::edit_paste() 2514void CalendarView::edit_paste()
2515{ 2515{
2516 QDate date = mNavigator->selectedDates().first(); 2516 QDate date = mNavigator->selectedDates().first();
2517 2517
2518 DndFactory factory( mCalendar ); 2518 DndFactory factory( mCalendar );
2519 Event *pastedEvent = (Event *)factory.pasteIncidence( date ); 2519 Event *pastedEvent = (Event *)factory.pasteIncidence( date );
2520 2520
2521 changeEventDisplay( pastedEvent, KOGlobals::EVENTADDED ); 2521 changeEventDisplay( pastedEvent, KOGlobals::EVENTADDED );
2522} 2522}
2523 2523void CalendarView::edit_global_options()
2524void CalendarView::edit_options()
2525{ 2524{
2526 QString tz = KPimGlobalPrefs::instance()->mTimeZoneId; 2525 QString tz = KPimGlobalPrefs::instance()->mTimeZoneId;
2527 emit save(); 2526 emit save();
2528 emit saveStopTimer(); 2527 emit saveStopTimer();
2529 mDialogManager->showOptionsDialog(); 2528 mDialogManager->showGlobalOptionsDialog();
2530 if ( tz != KPimGlobalPrefs::instance()->mTimeZoneId) { 2529 if ( tz != KPimGlobalPrefs::instance()->mTimeZoneId) {
2531 emit saveStopTimer(); 2530 emit saveStopTimer();
2532 if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, i18n("The timezone has changed!\nShould the calendar be reloaded\nto apply timezone changes?\nPlease read Menu: Help->FAQ:\n\"How do I change the timezone?\"\nas well!"), 2531 if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, i18n("The timezone has changed!\nShould the calendar be reloaded\nto apply timezone changes?\nPlease read Menu: Help->FAQ:\n\"How do I change the timezone?\"\nas well!"),
2533 i18n("Timezone settings"),i18n("Reload"))) { 2532 i18n("Timezone settings"),i18n("Reload"))) {
2534 qDebug("KO: TZ reload cancelled "); 2533 qDebug("KO: TZ reload cancelled ");
2535 return; 2534 return;
2536 } 2535 }
2537 qDebug("KO: Timezone change "); 2536 qDebug("KO: Timezone change ");
2538 openCalendar( MainWindow::defaultFileName() ); 2537 openCalendar( MainWindow::defaultFileName() );
2539 setModified(true); 2538 setModified(true);
2540 } 2539 }
2541 else 2540 else
2542 qDebug("KO: No tz change "); 2541 qDebug("KO: No tz change ");
2543 2542}
2543void CalendarView::edit_options()
2544{
2545 mDialogManager->showOptionsDialog();
2544} 2546}
2545 2547
2546 2548
2547void CalendarView::slotSelectPickerDate( QDate d) 2549void CalendarView::slotSelectPickerDate( QDate d)
2548{ 2550{
2549 mDateFrame->hide(); 2551 mDateFrame->hide();
2550 if ( mDatePickerMode == 1 ) { 2552 if ( mDatePickerMode == 1 ) {
2551 mNavigator->slotDaySelect( d ); 2553 mNavigator->slotDaySelect( d );
2552 } else if ( mDatePickerMode == 2 ) { 2554 } else if ( mDatePickerMode == 2 ) {
2553 if ( mMoveIncidence->typeID() == todoID ) { 2555 if ( mMoveIncidence->typeID() == todoID ) {
2554 Todo * to = (Todo *) mMoveIncidence; 2556 Todo * to = (Todo *) mMoveIncidence;
2555 QTime tim; 2557 QTime tim;
2556 int len = 0; 2558 int len = 0;
2557 if ( to->hasStartDate() && to->hasDueDate() ) 2559 if ( to->hasStartDate() && to->hasDueDate() )
2558 len = to->dtStart().secsTo( to->dtDue()); 2560 len = to->dtStart().secsTo( to->dtDue());
2559 if ( to->hasDueDate() ) 2561 if ( to->hasDueDate() )
2560 tim = to->dtDue().time(); 2562 tim = to->dtDue().time();
2561 else { 2563 else {
2562 tim = QTime ( 0,0,0 ); 2564 tim = QTime ( 0,0,0 );
2563 to->setFloats( true ); 2565 to->setFloats( true );
2564 to->setHasDueDate( true ); 2566 to->setHasDueDate( true );
2565 } 2567 }
2566 QDateTime dt ( d,tim ); 2568 QDateTime dt ( d,tim );
2567 to->setDtDue( dt ); 2569 to->setDtDue( dt );
2568 2570
2569 if ( to->hasStartDate() ) { 2571 if ( to->hasStartDate() ) {
2570 if ( len>0 ) 2572 if ( len>0 )
2571 to->setDtStart(to->dtDue().addSecs( -len )); 2573 to->setDtStart(to->dtDue().addSecs( -len ));
2572 else 2574 else
2573 if (to->dtStart() > to->dtDue() ) 2575 if (to->dtStart() > to->dtDue() )
2574 to->setDtStart(to->dtDue().addDays( -3 )); 2576 to->setDtStart(to->dtDue().addDays( -3 ));
2575 } 2577 }
2576 2578
2577 todoChanged( to ); 2579 todoChanged( to );
2578 } else { 2580 } else {
2579 if ( mMoveIncidence->doesRecur() ) { 2581 if ( mMoveIncidence->doesRecur() ) {
2580#if 0 2582#if 0
2581 // PENDING implement this 2583 // PENDING implement this
2582 Incidence* newInc = mMoveIncidence->recreateCloneException( mMoveIncidenceOldDate ); 2584 Incidence* newInc = mMoveIncidence->recreateCloneException( mMoveIncidenceOldDate );
2583 mCalendar()->addIncidence( newInc ); 2585 mCalendar()->addIncidence( newInc );
2584 if ( mMoveIncidence->typeID() == todoID ) 2586 if ( mMoveIncidence->typeID() == todoID )
2585 emit todoMoved((Todo*)mMoveIncidence, KOGlobals::EVENTEDITED ); 2587 emit todoMoved((Todo*)mMoveIncidence, KOGlobals::EVENTEDITED );
2586 else 2588 else
2587 emit incidenceChanged(mMoveIncidence, KOGlobals::EVENTEDITED); 2589 emit incidenceChanged(mMoveIncidence, KOGlobals::EVENTEDITED);
2588 mMoveIncidence = newInc; 2590 mMoveIncidence = newInc;
2589 2591
2590#endif 2592#endif
2591 } 2593 }
2592 QTime tim = mMoveIncidence->dtStart().time(); 2594 QTime tim = mMoveIncidence->dtStart().time();
2593 int secs = mMoveIncidence->dtStart().secsTo( mMoveIncidence->dtEnd()); 2595 int secs = mMoveIncidence->dtStart().secsTo( mMoveIncidence->dtEnd());
2594 QDateTime dt ( d,tim ); 2596 QDateTime dt ( d,tim );
2595 mMoveIncidence->setDtStart( dt ); 2597 mMoveIncidence->setDtStart( dt );
2596 ((Event*)mMoveIncidence)->setDtEnd( dt.addSecs( secs ) ); 2598 ((Event*)mMoveIncidence)->setDtEnd( dt.addSecs( secs ) );
2597 changeEventDisplay((Event*)mMoveIncidence, KOGlobals::EVENTEDITED); 2599 changeEventDisplay((Event*)mMoveIncidence, KOGlobals::EVENTEDITED);
2598 } 2600 }
2599 2601
2600 mMoveIncidence->setRevision( mMoveIncidence->revision()+1 ); 2602 mMoveIncidence->setRevision( mMoveIncidence->revision()+1 );
2601 } 2603 }
2602} 2604}
2603 2605
2604void CalendarView::removeCategories() 2606void CalendarView::removeCategories()
2605{ 2607{
2606 QPtrList<Incidence> incList = mCalendar->rawIncidences(); 2608 QPtrList<Incidence> incList = mCalendar->rawIncidences();
2607 QStringList catList = KOPrefs::instance()->mCustomCategories; 2609 QStringList catList = KOPrefs::instance()->mCustomCategories;
2608 QStringList catIncList; 2610 QStringList catIncList;
2609 QStringList newCatList; 2611 QStringList newCatList;
2610 Incidence* inc = incList.first(); 2612 Incidence* inc = incList.first();
2611 int i; 2613 int i;
2612 int count = 0; 2614 int count = 0;
2613 while ( inc ) { 2615 while ( inc ) {
2614 newCatList.clear(); 2616 newCatList.clear();
2615 catIncList = inc->categories() ; 2617 catIncList = inc->categories() ;
2616 for( i = 0; i< catIncList.count(); ++i ) { 2618 for( i = 0; i< catIncList.count(); ++i ) {
2617 if ( catList.contains (catIncList[i])) 2619 if ( catList.contains (catIncList[i]))
2618 newCatList.append( catIncList[i] ); 2620 newCatList.append( catIncList[i] );
2619 } 2621 }
2620 newCatList.sort(); 2622 newCatList.sort();
2621 inc->setCategories( newCatList.join(",") ); 2623 inc->setCategories( newCatList.join(",") );
2622 inc = incList.next(); 2624 inc = incList.next();
2623 } 2625 }
2624} 2626}
2625 2627
2626int CalendarView::addCategories() 2628int CalendarView::addCategories()
2627{ 2629{
2628 QPtrList<Incidence> incList = mCalendar->rawIncidences(); 2630 QPtrList<Incidence> incList = mCalendar->rawIncidences();
2629 QStringList catList = KOPrefs::instance()->mCustomCategories; 2631 QStringList catList = KOPrefs::instance()->mCustomCategories;
2630 QStringList catIncList; 2632 QStringList catIncList;
2631 Incidence* inc = incList.first(); 2633 Incidence* inc = incList.first();
2632 int i; 2634 int i;
2633 int count = 0; 2635 int count = 0;
2634 while ( inc ) { 2636 while ( inc ) {
2635 catIncList = inc->categories() ; 2637 catIncList = inc->categories() ;
2636 for( i = 0; i< catIncList.count(); ++i ) { 2638 for( i = 0; i< catIncList.count(); ++i ) {
2637 if ( !catList.contains (catIncList[i])) { 2639 if ( !catList.contains (catIncList[i])) {
2638 catList.append( catIncList[i] ); 2640 catList.append( catIncList[i] );
2639 //qDebug("add cat %s ", catIncList[i].latin1()); 2641 //qDebug("add cat %s ", catIncList[i].latin1());
2640 ++count; 2642 ++count;
2641 } 2643 }
2642 } 2644 }
2643 inc = incList.next(); 2645 inc = incList.next();
2644 } 2646 }
2645 catList.sort(); 2647 catList.sort();
2646 KOPrefs::instance()->mCustomCategories = catList; 2648 KOPrefs::instance()->mCustomCategories = catList;
2647 return count; 2649 return count;
2648} 2650}
2649 2651
2650void CalendarView::manageCategories() 2652void CalendarView::manageCategories()
2651{ 2653{
2652 KOCatPrefs* cp = new KOCatPrefs(); 2654 KOCatPrefs* cp = new KOCatPrefs();
2653 cp->show(); 2655 cp->show();
2654 int w =cp->sizeHint().width() ; 2656 int w =cp->sizeHint().width() ;
2655 int h = cp->sizeHint().height() ; 2657 int h = cp->sizeHint().height() ;
2656 int dw = QApplication::desktop()->width(); 2658 int dw = QApplication::desktop()->width();
2657 int dh = QApplication::desktop()->height(); 2659 int dh = QApplication::desktop()->height();
2658 cp->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 2660 cp->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
2659 if ( !cp->exec() ) { 2661 if ( !cp->exec() ) {
2660 delete cp; 2662 delete cp;
2661 return; 2663 return;
2662 } 2664 }
2663 int count = 0; 2665 int count = 0;
2664 if ( cp->addCat() ) { 2666 if ( cp->addCat() ) {
2665 count = addCategories(); 2667 count = addCategories();
2666 if ( count ) { 2668 if ( count ) {
2667 topLevelWidget()->setCaption(QString::number( count )+ i18n(" Categories added to list! ")); 2669 topLevelWidget()->setCaption(QString::number( count )+ i18n(" Categories added to list! "));
2668 writeSettings(); 2670 writeSettings();
2669 } else 2671 } else
2670 topLevelWidget()->setCaption(QString::number( 0 )+ i18n(" Categories added to list! ")); 2672 topLevelWidget()->setCaption(QString::number( 0 )+ i18n(" Categories added to list! "));
2671 } else { 2673 } else {
2672 removeCategories(); 2674 removeCategories();
2673 updateView(); 2675 updateView();
2674 } 2676 }
2675 delete cp; 2677 delete cp;
2676} 2678}
2677 2679
2678void CalendarView::beamIncidence(Incidence * Inc) 2680void CalendarView::beamIncidence(Incidence * Inc)
2679{ 2681{
2680 QPtrList<Incidence> delSel ; 2682 QPtrList<Incidence> delSel ;
2681 delSel.append(Inc); 2683 delSel.append(Inc);
2682 beamIncidenceList( delSel ); 2684 beamIncidenceList( delSel );
2683} 2685}
2684void CalendarView::beamCalendar() 2686void CalendarView::beamCalendar()
2685{ 2687{
2686 QPtrList<Incidence> delSel = mCalendar->rawIncidences(); 2688 QPtrList<Incidence> delSel = mCalendar->rawIncidences();
2687 //qDebug("beamCalendar() "); 2689 //qDebug("beamCalendar() ");
2688 beamIncidenceList( delSel ); 2690 beamIncidenceList( delSel );
2689} 2691}
2690void CalendarView::beamFilteredCalendar() 2692void CalendarView::beamFilteredCalendar()
2691{ 2693{
2692 QPtrList<Incidence> delSel = mCalendar->incidences(); 2694 QPtrList<Incidence> delSel = mCalendar->incidences();
2693 //qDebug("beamFilteredCalendar() "); 2695 //qDebug("beamFilteredCalendar() ");
2694 beamIncidenceList( delSel ); 2696 beamIncidenceList( delSel );
2695} 2697}
2696void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel ) 2698void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel )
2697{ 2699{
2698 if ( beamDialog->exec () == QDialog::Rejected ) 2700 if ( beamDialog->exec () == QDialog::Rejected )
2699 return; 2701 return;
2700#ifdef DESKTOP_VERSION 2702#ifdef DESKTOP_VERSION
2701 QString fn = locateLocal( "tmp", "kopibeamfile" ); 2703 QString fn = locateLocal( "tmp", "kopibeamfile" );
2702#else 2704#else
2703 QString fn = "/tmp/kopibeamfile"; 2705 QString fn = "/tmp/kopibeamfile";
2704#endif 2706#endif
2705 QString mes; 2707 QString mes;
2706 bool createbup = true; 2708 bool createbup = true;
2707 if ( createbup ) { 2709 if ( createbup ) {
2708 QString description = "\n"; 2710 QString description = "\n";
2709 CalendarLocal* cal = new CalendarLocal(); 2711 CalendarLocal* cal = new CalendarLocal();
2710 if ( beamDialog->beamLocal() ) 2712 if ( beamDialog->beamLocal() )
2711 cal->setLocalTime(); 2713 cal->setLocalTime();
2712 else 2714 else
2713 cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); 2715 cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
2714 Incidence *incidence = delSel.first(); 2716 Incidence *incidence = delSel.first();
2715 bool addText = false; 2717 bool addText = false;
2716 if ( delSel.count() < 10 ) 2718 if ( delSel.count() < 10 )
2717 addText = true; 2719 addText = true;
2718 else { 2720 else {
2719 description.sprintf(i18n(" %d items?"),delSel.count() ); 2721 description.sprintf(i18n(" %d items?"),delSel.count() );
2720 } 2722 }
2721 while ( incidence ) { 2723 while ( incidence ) {
2722 Incidence *in = incidence->clone(); 2724 Incidence *in = incidence->clone();
2723 if ( ! in->summary().isEmpty() ) { 2725 if ( ! in->summary().isEmpty() ) {
2724 in->setDescription(""); 2726 in->setDescription("");
2725 } else { 2727 } else {
2726 in->setSummary( in->description().left(20)); 2728 in->setSummary( in->description().left(20));
2727 in->setDescription(""); 2729 in->setDescription("");
2728 } 2730 }
2729 if ( addText ) 2731 if ( addText )
2730 description += in->summary() + "\n"; 2732 description += in->summary() + "\n";
2731 cal->addIncidence( in ); 2733 cal->addIncidence( in );
2732 incidence = delSel.next(); 2734 incidence = delSel.next();
2733 } 2735 }
2734 if ( beamDialog->beamVcal() ) { 2736 if ( beamDialog->beamVcal() ) {
2735 fn += ".vcs"; 2737 fn += ".vcs";
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index 4600090..1215a99 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -160,384 +160,385 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
160 void readOnlyChanged(bool); 160 void readOnlyChanged(bool);
161 161
162 /** Emitted when the unit of navigation changes */ 162 /** Emitted when the unit of navigation changes */
163 void changeNavStringPrev(const QString &); 163 void changeNavStringPrev(const QString &);
164 void changeNavStringNext(const QString &); 164 void changeNavStringNext(const QString &);
165 165
166 /** 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*/
167 void organizerEventsSelected(bool); 167 void organizerEventsSelected(bool);
168 /** 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*/
169 void groupEventsSelected(bool); 169 void groupEventsSelected(bool);
170 /** 170 /**
171 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
172 signal is emitted with 0 as argument. 172 signal is emitted with 0 as argument.
173 */ 173 */
174 void incidenceSelected( Incidence * ); 174 void incidenceSelected( Incidence * );
175 /** Emitted, when a todoitem is selected or deselected. */ 175 /** Emitted, when a todoitem is selected or deselected. */
176 void todoSelected( bool ); 176 void todoSelected( bool );
177 177
178 /** 178 /**
179 Emitted, when clipboard content changes. Parameter indicates if paste 179 Emitted, when clipboard content changes. Parameter indicates if paste
180 is possible or not. 180 is possible or not.
181 */ 181 */
182 void pasteEnabled(bool); 182 void pasteEnabled(bool);
183 183
184 /** Emitted, when the number of incoming messages has changed. */ 184 /** Emitted, when the number of incoming messages has changed. */
185 void numIncomingChanged(int); 185 void numIncomingChanged(int);
186 186
187 /** Emitted, when the number of outgoing messages has changed. */ 187 /** Emitted, when the number of outgoing messages has changed. */
188 void numOutgoingChanged(int); 188 void numOutgoingChanged(int);
189 189
190 /** 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. */
191 void statusMessage(const QString &); 191 void statusMessage(const QString &);
192 192
193 void calendarViewExpanded( bool ); 193 void calendarViewExpanded( bool );
194 void updateSearchDialog(); 194 void updateSearchDialog();
195 195
196 196
197 public slots: 197 public slots:
198 void checkAlarms(); 198 void checkAlarms();
199 void slotprintSelInc(); 199 void slotprintSelInc();
200 void showNextAlarms(); 200 void showNextAlarms();
201 void showOpenError(); 201 void showOpenError();
202 void watchSavedFile(); 202 void watchSavedFile();
203 void recheckTimerAlarm(); 203 void recheckTimerAlarm();
204 void checkNextTimerAlarm(); 204 void checkNextTimerAlarm();
205 void addAlarm(const QDateTime &qdt, const QString &noti ); 205 void addAlarm(const QDateTime &qdt, const QString &noti );
206 void addSuspendAlarm(const QDateTime &qdt, const QString &noti ); 206 void addSuspendAlarm(const QDateTime &qdt, const QString &noti );
207 void removeAlarm(const QDateTime &qdt, const QString &noti ); 207 void removeAlarm(const QDateTime &qdt, const QString &noti );
208 208
209 /** options dialog made a changed to the configuration. we catch this 209 /** options dialog made a changed to the configuration. we catch this
210 * and notify all widgets which need to update their configuration. */ 210 * and notify all widgets which need to update their configuration. */
211 void updateConfig(); 211 void updateConfig();
212 212
213 void insertBirthdays(const QString& uid, const QStringList& birthdayList, 213 void insertBirthdays(const QString& uid, const QStringList& birthdayList,
214 const QStringList& anniversaryList, const QStringList& realNameList, 214 const QStringList& anniversaryList, const QStringList& realNameList,
215 const QStringList& emailList, const QStringList& assembledNameList, 215 const QStringList& emailList, const QStringList& assembledNameList,
216 const QStringList& uidList); 216 const QStringList& uidList);
217 217
218 /** 218 /**
219 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
220 calendar into existing one, if it is false, clear calendar, before 220 calendar into existing one, if it is false, clear calendar, before
221 loading. Return true, if calendar could be successfully loaded. 221 loading. Return true, if calendar could be successfully loaded.
222 */ 222 */
223 bool openCalendar(QString filename, bool merge=false); 223 bool openCalendar(QString filename, bool merge=false);
224 bool syncCalendar(QString filename,int mode = 0 ); 224 bool syncCalendar(QString filename,int mode = 0 );
225 225
226 /** 226 /**
227 Save calendar data to file. Return true if calendar could be 227 Save calendar data to file. Return true if calendar could be
228 successfully saved. 228 successfully saved.
229 */ 229 */
230 bool saveCalendar(QString filename); 230 bool saveCalendar(QString filename);
231 231
232 /** 232 /**
233 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
234 calendar. 234 calendar.
235 */ 235 */
236 void closeCalendar(); 236 void closeCalendar();
237 237
238 /** Archive old events of calendar */ 238 /** Archive old events of calendar */
239 void archiveCalendar(); 239 void archiveCalendar();
240 240
241 void showIncidence(); 241 void showIncidence();
242 void editIncidence(); 242 void editIncidence();
243 void editIncidenceDescription(); 243 void editIncidenceDescription();
244 void deleteIncidence(); 244 void deleteIncidence();
245 void cloneIncidence(); 245 void cloneIncidence();
246 void moveIncidence(); 246 void moveIncidence();
247 void beamIncidence(); 247 void beamIncidence();
248 void toggleCancelIncidence(); 248 void toggleCancelIncidence();
249 249
250 /** 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,
251 * make the event take all day. */ 251 * make the event take all day. */
252 void newEvent(QDateTime, QDateTime, bool allDay ); 252 void newEvent(QDateTime, QDateTime, bool allDay );
253 void newEvent(QDateTime, QDateTime); 253 void newEvent(QDateTime, QDateTime);
254 void newEvent(QDateTime fh); 254 void newEvent(QDateTime fh);
255 void newEvent(QDate dt); 255 void newEvent(QDate dt);
256 /** 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
257 default hint. */ 257 default hint. */
258 void newEvent(); 258 void newEvent();
259 void newFloatingEvent(); 259 void newFloatingEvent();
260 260
261 /** 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*/
262 void showIncidence(Incidence *); 262 void showIncidence(Incidence *);
263 void showIncidence(QString uid); 263 void showIncidence(QString uid);
264 /** 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*/
265 void editIncidence(Incidence *); 265 void editIncidence(Incidence *);
266 /** Delete the supplied incidence. It calls the correct deleteXXX method*/ 266 /** Delete the supplied incidence. It calls the correct deleteXXX method*/
267 void deleteIncidence(Incidence *); 267 void deleteIncidence(Incidence *);
268 void cloneIncidence(Incidence *); 268 void cloneIncidence(Incidence *);
269 void cancelIncidence(Incidence *); 269 void cancelIncidence(Incidence *);
270 /** Create an editor for the supplied event. */ 270 /** Create an editor for the supplied event. */
271 void editEvent(Event *); 271 void editEvent(Event *);
272 /** Delete the supplied event. */ 272 /** Delete the supplied event. */
273 void deleteEvent(Event *); 273 void deleteEvent(Event *);
274 /** 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
275 found. */ 275 found. */
276 bool deleteEvent(const QString &uid); 276 bool deleteEvent(const QString &uid);
277 /** Create a read-only viewer dialog for the supplied event. */ 277 /** Create a read-only viewer dialog for the supplied event. */
278 void showEvent(Event *); 278 void showEvent(Event *);
279 279
280 void editJournal(Journal *); 280 void editJournal(Journal *);
281 void showJournal(Journal *); 281 void showJournal(Journal *);
282 void deleteJournal(Journal *); 282 void deleteJournal(Journal *);
283 /** Create an editor dialog for a todo */ 283 /** Create an editor dialog for a todo */
284 void editTodo(Todo *); 284 void editTodo(Todo *);
285 /** Create a read-only viewer dialog for the supplied todo */ 285 /** Create a read-only viewer dialog for the supplied todo */
286 void showTodo(Todo *); 286 void showTodo(Todo *);
287 /** create new todo */ 287 /** create new todo */
288 void newTodo(); 288 void newTodo();
289 void newTodoDateTime(QDateTime, bool allday); 289 void newTodoDateTime(QDateTime, bool allday);
290 /** create new todo with a parent todo */ 290 /** create new todo with a parent todo */
291 void newSubTodo(); 291 void newSubTodo();
292 /** create new todo with a parent todo */ 292 /** create new todo with a parent todo */
293 void newSubTodo(Todo *); 293 void newSubTodo(Todo *);
294 /** Delete todo */ 294 /** Delete todo */
295 void deleteTodo(Todo *); 295 void deleteTodo(Todo *);
296 296
297 297
298 /** Check if clipboard contains vCalendar event. The signal pasteEnabled() is 298 /** Check if clipboard contains vCalendar event. The signal pasteEnabled() is
299 * emitted as result. */ 299 * emitted as result. */
300 void checkClipboard(); 300 void checkClipboard();
301 301
302 /** using the KConfig associated with the kapp variable, read in the 302 /** using the KConfig associated with the kapp variable, read in the
303 * settings from the config file. 303 * settings from the config file.
304 */ 304 */
305 void readSettings(); 305 void readSettings();
306 306
307 /** write current state to config file. */ 307 /** write current state to config file. */
308 void writeSettings(); 308 void writeSettings();
309 309
310 /** read settings for calendar filters */ 310 /** read settings for calendar filters */
311 void readFilterSettings(KConfig *config); 311 void readFilterSettings(KConfig *config);
312 312
313 /** write settings for calendar filters */ 313 /** write settings for calendar filters */
314 void writeFilterSettings(KConfig *config); 314 void writeFilterSettings(KConfig *config);
315 315
316 /** passes on the message that an event has changed to the currently 316 /** passes on the message that an event has changed to the currently
317 * activated view so that it can make appropriate display changes. */ 317 * activated view so that it can make appropriate display changes. */
318 void changeEventDisplay(Event *, int); 318 void changeEventDisplay(Event *, int);
319 void changeIncidenceDisplay(Incidence *, int); 319 void changeIncidenceDisplay(Incidence *, int);
320 void changeTodoDisplay(Todo *, int); 320 void changeTodoDisplay(Todo *, int);
321 321
322 void eventAdded(Event *); 322 void eventAdded(Event *);
323 void eventChanged(Event *); 323 void eventChanged(Event *);
324 void eventToBeDeleted(Event *); 324 void eventToBeDeleted(Event *);
325 void eventDeleted(); 325 void eventDeleted();
326 326
327 void todoAdded(Todo *); 327 void todoAdded(Todo *);
328 void todoChanged(Todo *); 328 void todoChanged(Todo *);
329 void todoToBeDeleted(Todo *); 329 void todoToBeDeleted(Todo *);
330 void todoDeleted(); 330 void todoDeleted();
331 331
332 void updateView(const QDate &start, const QDate &end); 332 void updateView(const QDate &start, const QDate &end);
333 void updateView(); 333 void updateView();
334 void clearAllViews(); 334 void clearAllViews();
335 335
336 /** Full update of visible todo views */ 336 /** Full update of visible todo views */
337 void updateTodoViews(); 337 void updateTodoViews();
338 338
339 void updateUnmanagedViews(); 339 void updateUnmanagedViews();
340 340
341 /** cut the current appointment to the clipboard */ 341 /** cut the current appointment to the clipboard */
342 void edit_cut(); 342 void edit_cut();
343 343
344 /** copy the current appointment(s) to the clipboard */ 344 /** copy the current appointment(s) to the clipboard */
345 void edit_copy(); 345 void edit_copy();
346 346
347 /** paste the current vobject(s) in the clipboard buffer into calendar */ 347 /** paste the current vobject(s) in the clipboard buffer into calendar */
348 void edit_paste(); 348 void edit_paste();
349 349
350 /** edit viewing and configuration options. */ 350 /** edit viewing and configuration options. */
351 void edit_options(); 351 void edit_options();
352 void edit_global_options();
352 /** 353 /**
353 Functions for printing, previewing a print, and setting up printing 354 Functions for printing, previewing a print, and setting up printing
354 parameters. 355 parameters.
355 */ 356 */
356 void print(); 357 void print();
357 void printSetup(); 358 void printSetup();
358 void printPreview(); 359 void printPreview();
359 360
360 /** Export as iCalendar file */ 361 /** Export as iCalendar file */
361 void exportICalendar(); 362 void exportICalendar();
362 363
363 /** Export as vCalendar file */ 364 /** Export as vCalendar file */
364 bool exportVCalendar( QString fn); 365 bool exportVCalendar( QString fn);
365 366
366 /** pop up a dialog to show an existing appointment. */ 367 /** pop up a dialog to show an existing appointment. */
367 void appointment_show(); 368 void appointment_show();
368 /** 369 /**
369 * pop up an Appointment Dialog to edit an existing appointment.Get 370 * pop up an Appointment Dialog to edit an existing appointment.Get
370 * information on the appointment from the list of unique IDs that is 371 * information on the appointment from the list of unique IDs that is
371 * currently in the View, called currIds. 372 * currently in the View, called currIds.
372 */ 373 */
373 void appointment_edit(); 374 void appointment_edit();
374 /** 375 /**
375 * pop up dialog confirming deletion of currently selected event in the 376 * pop up dialog confirming deletion of currently selected event in the
376 * View. 377 * View.
377 */ 378 */
378 void appointment_delete(); 379 void appointment_delete();
379 380
380 /** mails the currently selected event to a particular user as a vCalendar 381 /** mails the currently selected event to a particular user as a vCalendar
381 attachment. */ 382 attachment. */
382 void action_mail(); 383 void action_mail();
383 384
384 /* frees a subtodo from it's relation */ 385 /* frees a subtodo from it's relation */
385 void todo_unsub( Todo * ); 386 void todo_unsub( Todo * );
386 void todo_resub( Todo * parent, Todo * sub ); 387 void todo_resub( Todo * parent, Todo * sub );
387 388
388 /** Take ownership of selected event. */ 389 /** Take ownership of selected event. */
389 void takeOverEvent(); 390 void takeOverEvent();
390 391
391 /** Take ownership of all events in calendar. */ 392 /** Take ownership of all events in calendar. */
392 void takeOverCalendar(); 393 void takeOverCalendar();
393 394
394 /** query whether or not the calendar is "dirty". */ 395 /** query whether or not the calendar is "dirty". */
395 bool isModified(); 396 bool isModified();
396 /** set the state of calendar. Modified means "dirty", i.e. needing a save. */ 397 /** set the state of calendar. Modified means "dirty", i.e. needing a save. */
397 void setModified(bool modified=true); 398 void setModified(bool modified=true);
398 399
399 /** query if the calendar is read-only. */ 400 /** query if the calendar is read-only. */
400 bool isReadOnly(); 401 bool isReadOnly();
401 /** set state of calendar to read-only */ 402 /** set state of calendar to read-only */
402 void setReadOnly(bool readOnly=true); 403 void setReadOnly(bool readOnly=true);
403 404
404 void eventUpdated(Incidence *); 405 void eventUpdated(Incidence *);
405 406
406 /* iTIP scheduling actions */ 407 /* iTIP scheduling actions */
407 void schedule_publish(Incidence *incidence = 0); 408 void schedule_publish(Incidence *incidence = 0);
408 void schedule_request(Incidence *incidence = 0); 409 void schedule_request(Incidence *incidence = 0);
409 void schedule_refresh(Incidence *incidence = 0); 410 void schedule_refresh(Incidence *incidence = 0);
410 void schedule_cancel(Incidence *incidence = 0); 411 void schedule_cancel(Incidence *incidence = 0);
411 void schedule_add(Incidence *incidence = 0); 412 void schedule_add(Incidence *incidence = 0);
412 void schedule_reply(Incidence *incidence = 0); 413 void schedule_reply(Incidence *incidence = 0);
413 void schedule_counter(Incidence *incidence = 0); 414 void schedule_counter(Incidence *incidence = 0);
414 void schedule_declinecounter(Incidence *incidence = 0); 415 void schedule_declinecounter(Incidence *incidence = 0);
415 void schedule_publish_freebusy(int daysToPublish = 30); 416 void schedule_publish_freebusy(int daysToPublish = 30);
416 417
417 void openAddressbook(); 418 void openAddressbook();
418 419
419 void editFilters(); 420 void editFilters();
420 void toggleFilerEnabled(); 421 void toggleFilerEnabled();
421 QPtrList<CalFilter> filters(); 422 QPtrList<CalFilter> filters();
422 void toggleFilter(); 423 void toggleFilter();
423 void showFilter(bool visible); 424 void showFilter(bool visible);
424 void updateFilter(); 425 void updateFilter();
425 void filterEdited(); 426 void filterEdited();
426 void selectFilter( int ); 427 void selectFilter( int );
427 KOFilterView *filterView(); 428 KOFilterView *filterView();
428 429
429 void showIntro(); 430 void showIntro();
430 431
431 /** Move the curdatepient view date to today */ 432 /** Move the curdatepient view date to today */
432 void goToday(); 433 void goToday();
433 434
434 /** Move to the next date(s) in the current view */ 435 /** Move to the next date(s) in the current view */
435 void goNext(); 436 void goNext();
436 437
437 /** Move to the previous date(s) in the current view */ 438 /** Move to the previous date(s) in the current view */
438 void goPrevious(); 439 void goPrevious();
439 /** Move to the next date(s) in the current view */ 440 /** Move to the next date(s) in the current view */
440 void goNextMonth(); 441 void goNextMonth();
441 442
442 /** Move to the previous date(s) in the current view */ 443 /** Move to the previous date(s) in the current view */
443 void goPreviousMonth(); 444 void goPreviousMonth();
444 445
445 void toggleExpand(); 446 void toggleExpand();
446 void toggleDateNavigatorWidget(); 447 void toggleDateNavigatorWidget();
447 void toggleAllDaySize(); 448 void toggleAllDaySize();
448 void dialogClosing(Incidence *); 449 void dialogClosing(Incidence *);
449 450
450 /** Look for new messages in the inbox */ 451 /** Look for new messages in the inbox */
451 void lookForIncomingMessages(); 452 void lookForIncomingMessages();
452 /** Look for new messages in the outbox */ 453 /** Look for new messages in the outbox */
453 void lookForOutgoingMessages(); 454 void lookForOutgoingMessages();
454 455
455 void processMainViewSelection( Incidence * ); 456 void processMainViewSelection( Incidence * );
456 void processTodoListSelection( Incidence * ); 457 void processTodoListSelection( Incidence * );
457 458
458 void processIncidenceSelection( Incidence * ); 459 void processIncidenceSelection( Incidence * );
459 460
460 void purgeCompleted(); 461 void purgeCompleted();
461 bool removeCompletedSubTodos( Todo* ); 462 bool removeCompletedSubTodos( Todo* );
462 void slotCalendarChanged(); 463 void slotCalendarChanged();
463 bool importBday(); 464 bool importBday();
464 bool addAnniversary( QDate data, QString name, KCal::Attendee* a , bool birthday ); 465 bool addAnniversary( QDate data, QString name, KCal::Attendee* a , bool birthday );
465 bool importQtopia( const QString &categoriesFile, 466 bool importQtopia( const QString &categoriesFile,
466 const QString &datebookFile, 467 const QString &datebookFile,
467 const QString &tasklistFile ); 468 const QString &tasklistFile );
468 void syncExternal( int mode ); 469 void syncExternal( int mode );
469 void slotSelectPickerDate( QDate ) ; 470 void slotSelectPickerDate( QDate ) ;
470 void showDatePicker() ; 471 void showDatePicker() ;
471 void showDatePickerPopup() ; 472 void showDatePickerPopup() ;
472 void moveIncidence(Incidence *) ; 473 void moveIncidence(Incidence *) ;
473 void beamIncidence(Incidence *) ; 474 void beamIncidence(Incidence *) ;
474 void beamCalendar() ; 475 void beamCalendar() ;
475 void beamFilteredCalendar() ; 476 void beamFilteredCalendar() ;
476 void beamIncidenceList(QPtrList<Incidence>) ; 477 void beamIncidenceList(QPtrList<Incidence>) ;
477 void manageCategories(); 478 void manageCategories();
478 int addCategories(); 479 int addCategories();
479 void removeCategories(); 480 void removeCategories();
480 void setSyncDevice( QString ); 481 void setSyncDevice( QString );
481 void setSyncName( QString ); 482 void setSyncName( QString );
482 void showDay( QDate ); 483 void showDay( QDate );
483 void undo_delete(); 484 void undo_delete();
484 protected slots: 485 protected slots:
485 void resetFocus(); 486 void resetFocus();
486 void slotViewerClosed(); 487 void slotViewerClosed();
487 void timerAlarm(); 488 void timerAlarm();
488 void suspendAlarm(); 489 void suspendAlarm();
489 void beamDone( Ir *ir ); 490 void beamDone( Ir *ir );
490 /** Select a view or adapt the current view to display the specified dates. */ 491 /** Select a view or adapt the current view to display the specified dates. */
491 void showDates( const KCal::DateList & ); 492 void showDates( const KCal::DateList & );
492 void selectWeekNum ( int ); 493 void selectWeekNum ( int );
493 494
494 public: 495 public:
495 // show a standard warning 496 // show a standard warning
496 // returns KMsgBox::yesNoCancel() 497 // returns KMsgBox::yesNoCancel()
497 int msgCalModified(); 498 int msgCalModified();
498 virtual bool sync(KSyncManager* manager, QString filename, int mode); 499 virtual bool sync(KSyncManager* manager, QString filename, int mode);
499 500
500 virtual bool syncExternal(KSyncManager* manager, QString resource); 501 virtual bool syncExternal(KSyncManager* manager, QString resource);
501 virtual void removeSyncInfo( QString syncProfile); 502 virtual void removeSyncInfo( QString syncProfile);
502 void setSyncManager(KSyncManager* manager); 503 void setSyncManager(KSyncManager* manager);
503 void setLoadedFileVersion(QDateTime); 504 void setLoadedFileVersion(QDateTime);
504 bool checkFileVersion(QString fn); 505 bool checkFileVersion(QString fn);
505 bool checkFileChanged(QString fn); 506 bool checkFileChanged(QString fn);
506 Event* getLastSyncEvent(); 507 Event* getLastSyncEvent();
507 /** Adapt navigation units correpsonding to step size of navigation of the 508 /** Adapt navigation units correpsonding to step size of navigation of the
508 * current view. 509 * current view.
509 */ 510 */
510 void adaptNavigationUnits(); 511 void adaptNavigationUnits();
511 bool synchronizeCalendar( Calendar* local, Calendar* remote, int mode ); 512 bool synchronizeCalendar( Calendar* local, Calendar* remote, int mode );
512 int takeEvent( Incidence* local, Incidence* remote, int mode, bool full = false ); 513 int takeEvent( Incidence* local, Incidence* remote, int mode, bool full = false );
513 //Attendee* getYourAttendee(Event *event); 514 //Attendee* getYourAttendee(Event *event);
514 void setBlockShowDates( bool b ) { mBlockShowDates = b ;} 515 void setBlockShowDates( bool b ) { mBlockShowDates = b ;}
515 protected: 516 protected:
516 void schedule(Scheduler::Method, Incidence *incidence = 0); 517 void schedule(Scheduler::Method, Incidence *incidence = 0);
517 518
518 // returns KMsgBox::OKCandel() 519 // returns KMsgBox::OKCandel()
519 int msgItemDelete(const QString name); 520 int msgItemDelete(const QString name);
520 void showEventEditor(); 521 void showEventEditor();
521 void showTodoEditor(); 522 void showTodoEditor();
522 void writeLocale(); 523 void writeLocale();
523 Todo *selectedTodo(); 524 Todo *selectedTodo();
524 525
525 private: 526 private:
526 QDateTime mNextAlarmDateTime; 527 QDateTime mNextAlarmDateTime;
527 bool mViewerCallerIsSearchDialog; 528 bool mViewerCallerIsSearchDialog;
528 bool mBlockShowDates; 529 bool mBlockShowDates;
529 KSyncManager* mSyncManager; 530 KSyncManager* mSyncManager;
530 AlarmDialog * mAlarmDialog; 531 AlarmDialog * mAlarmDialog;
531 QString mAlarmNotification; 532 QString mAlarmNotification;
532 QString mSuspendAlarmNotification; 533 QString mSuspendAlarmNotification;
533 QTimer* mSuspendTimer; 534 QTimer* mSuspendTimer;
534 QTimer* mAlarmTimer; 535 QTimer* mAlarmTimer;
535 QTimer* mRecheckAlarmTimer; 536 QTimer* mRecheckAlarmTimer;
536 void computeAlarm( QString ); 537 void computeAlarm( QString );
537 void startAlarm( QString, QString ); 538 void startAlarm( QString, QString );
538 void setSyncEventsReadOnly(); 539 void setSyncEventsReadOnly();
539 540
540 QDateTime loadedFileVersion; 541 QDateTime loadedFileVersion;
541 void checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete ); 542 void checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete );
542 void checkExternalId( Incidence * inc ); 543 void checkExternalId( Incidence * inc );
543 int mGlobalSyncMode; 544 int mGlobalSyncMode;
diff --git a/korganizer/kodialogmanager.cpp b/korganizer/kodialogmanager.cpp
index c927b37..aa30c52 100644
--- a/korganizer/kodialogmanager.cpp
+++ b/korganizer/kodialogmanager.cpp
@@ -1,308 +1,324 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 3
4 Copyright (c) 2001 4 Copyright (c) 2001
5 Cornelius Schumacher <schumacher@kde.org> 5 Cornelius Schumacher <schumacher@kde.org>
6 6
7 This program is free software; you can redistribute it and/or modify 7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by 8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or 9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version. 10 (at your option) any later version.
11 11
12 This program is distributed in the hope that it will be useful, 12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
15 GNU General Public License for more details. 15 GNU General Public License for more details.
16 16
17 You should have received a copy of the GNU General Public License 17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software 18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20*/ 20*/
21 21
22#include <libkdepim/categoryeditdialog.h> 22#include <libkdepim/categoryeditdialog.h>
23 23
24#include "calendarview.h" 24#include "calendarview.h"
25#include "incomingdialog.h" 25#include "incomingdialog.h"
26#include "outgoingdialog.h" 26#include "outgoingdialog.h"
27#include "koprefsdialog.h" 27#include "koprefsdialog.h"
28#include "koeventeditor.h" 28#include "koeventeditor.h"
29#include "koprefs.h" 29#include "koprefs.h"
30#include "datenavigator.h" 30#include "datenavigator.h"
31#include "kotodoeditor.h" 31#include "kotodoeditor.h"
32#include "searchdialog.h" 32#include "searchdialog.h"
33#include "filtereditdialog.h" 33#include "filtereditdialog.h"
34#ifndef KORG_NOPLUGINS 34#ifndef KORG_NOPLUGINS
35#include "plugindialog.h" 35#include "plugindialog.h"
36#endif 36#endif
37#ifndef KORG_NOARCHIVE 37#ifndef KORG_NOARCHIVE
38#include "archivedialog.h" 38#include "archivedialog.h"
39#endif 39#endif
40 40
41#include "kconfig.h" 41#include "kconfig.h"
42#include "kodialogmanager.h" 42#include "kodialogmanager.h"
43#include <kapplication.h> 43#include <kapplication.h>
44 44
45KODialogManager::KODialogManager( CalendarView *mainView ) : 45KODialogManager::KODialogManager( CalendarView *mainView ) :
46 QObject(), mMainView( mainView ) 46 QObject(), mMainView( mainView )
47{ 47{
48 mOutgoingDialog = 0; 48 mOutgoingDialog = 0;
49 mIncomingDialog = 0; 49 mIncomingDialog = 0;
50 mOptionsDialog = 0; 50 mOptionsDialog = 0;
51 mSearchDialog = 0; 51 mSearchDialog = 0;
52 mArchiveDialog = 0; 52 mArchiveDialog = 0;
53 mFilterEditDialog = 0; 53 mFilterEditDialog = 0;
54 mPluginDialog = 0; 54 mPluginDialog = 0;
55 55
56 // mCategoryEditDialog = new KPIM::CategoryEditDialog(KOPrefs::instance(),mMainView); 56 // mCategoryEditDialog = new KPIM::CategoryEditDialog(KOPrefs::instance(),mMainView);
57 //KOGlobals::fitDialogToScreen( mCategoryEditDialog ); 57 //KOGlobals::fitDialogToScreen( mCategoryEditDialog );
58} 58}
59 59
60KODialogManager::~KODialogManager() 60KODialogManager::~KODialogManager()
61{ 61{
62 delete mOutgoingDialog; 62 delete mOutgoingDialog;
63 delete mIncomingDialog; 63 delete mIncomingDialog;
64 delete mOptionsDialog; 64 delete mOptionsDialog;
65 delete mSearchDialog; 65 delete mSearchDialog;
66#ifndef KORG_NOARCHIVE 66#ifndef KORG_NOARCHIVE
67 delete mArchiveDialog; 67 delete mArchiveDialog;
68#endif 68#endif
69 delete mFilterEditDialog; 69 delete mFilterEditDialog;
70#ifndef KORG_NOPLUGINS 70#ifndef KORG_NOPLUGINS
71 delete mPluginDialog; 71 delete mPluginDialog;
72#endif 72#endif
73} 73}
74 74
75OutgoingDialog *KODialogManager::outgoingDialog() 75OutgoingDialog *KODialogManager::outgoingDialog()
76{ 76{
77 createOutgoingDialog(); 77 createOutgoingDialog();
78 return mOutgoingDialog; 78 return mOutgoingDialog;
79} 79}
80 80
81void KODialogManager::createOutgoingDialog() 81void KODialogManager::createOutgoingDialog()
82{ 82{
83 if (!mOutgoingDialog) { 83 if (!mOutgoingDialog) {
84 mOutgoingDialog = new OutgoingDialog(mMainView->calendar(),mMainView); 84 mOutgoingDialog = new OutgoingDialog(mMainView->calendar(),mMainView);
85 if (mIncomingDialog) mIncomingDialog->setOutgoingDialog(mOutgoingDialog); 85 if (mIncomingDialog) mIncomingDialog->setOutgoingDialog(mOutgoingDialog);
86 connect(mOutgoingDialog,SIGNAL(numMessagesChanged(int)), 86 connect(mOutgoingDialog,SIGNAL(numMessagesChanged(int)),
87 mMainView,SIGNAL(numOutgoingChanged(int))); 87 mMainView,SIGNAL(numOutgoingChanged(int)));
88 } 88 }
89} 89}
90 90
91void KODialogManager::showGlobalOptionsDialog( bool showSync )
92{
93 if (!mOptionsDialog) {
94 mOptionsDialog = new KOPrefsDialog(0);
95 connect(mOptionsDialog,SIGNAL(configChanged()),
96 mMainView,SLOT(updateConfig()));
97 }
98 mOptionsDialog->readConfig();
99#ifndef DESKTOP_VERSION
100 mOptionsDialog->showMaximized();
101#else
102 mOptionsDialog->show();
103#endif
104 if ( showSync )
105 mOptionsDialog->showSyncPage();
106 mOptionsDialog->exec();
107 delete mOptionsDialog;
108 mOptionsDialog = 0;
109}
91void KODialogManager::showOptionsDialog( bool showSync ) 110void KODialogManager::showOptionsDialog( bool showSync )
92{ 111{
93 112
94 if (!mOptionsDialog) { 113 if (!mOptionsDialog) {
95 mOptionsDialog = new KOPrefsDialog(mMainView); 114 mOptionsDialog = new KOPrefsDialog(mMainView);
96 //mOptionsDialog->readConfig();
97 connect(mOptionsDialog,SIGNAL(configChanged()), 115 connect(mOptionsDialog,SIGNAL(configChanged()),
98 mMainView,SLOT(updateConfig())); 116 mMainView,SLOT(updateConfig()));
99 //connect(mCategoryEditDialog,SIGNAL(categoryConfigChanged()),
100 // mOptionsDialog,SLOT(updateCategories()));
101
102 } 117 }
103 mOptionsDialog->readConfig(); 118 mOptionsDialog->readConfig();
104#ifndef DESKTOP_VERSION 119#ifndef DESKTOP_VERSION
105 mOptionsDialog->showMaximized(); 120 mOptionsDialog->showMaximized();
106#else 121#else
107 mOptionsDialog->show(); 122 mOptionsDialog->show();
108#endif 123#endif
109 if ( showSync ) 124 if ( showSync )
110 mOptionsDialog->showSyncPage(); 125 mOptionsDialog->showSyncPage();
111 mOptionsDialog->exec(); 126 mOptionsDialog->exec();
112 127 delete mOptionsDialog;
128 mOptionsDialog = 0;
113} 129}
114void KODialogManager::showSyncOptions() 130void KODialogManager::showSyncOptions()
115{ 131{
116 showOptionsDialog( true ); 132 showGlobalOptionsDialog( true );
117 133
118} 134}
119void KODialogManager::showOutgoingDialog() 135void KODialogManager::showOutgoingDialog()
120{ 136{
121 createOutgoingDialog(); 137 createOutgoingDialog();
122 mOutgoingDialog->show(); 138 mOutgoingDialog->show();
123 mOutgoingDialog->raise(); 139 mOutgoingDialog->raise();
124} 140}
125 141
126IncomingDialog *KODialogManager::incomingDialog() 142IncomingDialog *KODialogManager::incomingDialog()
127{ 143{
128 createOutgoingDialog(); 144 createOutgoingDialog();
129 if (!mIncomingDialog) { 145 if (!mIncomingDialog) {
130 mIncomingDialog = new IncomingDialog(mMainView->calendar(),mOutgoingDialog,mMainView); 146 mIncomingDialog = new IncomingDialog(mMainView->calendar(),mOutgoingDialog,mMainView);
131 connect(mIncomingDialog,SIGNAL(numMessagesChanged(int)), 147 connect(mIncomingDialog,SIGNAL(numMessagesChanged(int)),
132 mMainView,SIGNAL(numIncomingChanged(int))); 148 mMainView,SIGNAL(numIncomingChanged(int)));
133 connect(mIncomingDialog,SIGNAL(calendarUpdated()), 149 connect(mIncomingDialog,SIGNAL(calendarUpdated()),
134 mMainView,SLOT(updateView())); 150 mMainView,SLOT(updateView()));
135 } 151 }
136 return mIncomingDialog; 152 return mIncomingDialog;
137} 153}
138 154
139void KODialogManager::createIncomingDialog() 155void KODialogManager::createIncomingDialog()
140{ 156{
141 createOutgoingDialog(); 157 createOutgoingDialog();
142 if (!mIncomingDialog) { 158 if (!mIncomingDialog) {
143 mIncomingDialog = new IncomingDialog(mMainView->calendar(),mOutgoingDialog,mMainView); 159 mIncomingDialog = new IncomingDialog(mMainView->calendar(),mOutgoingDialog,mMainView);
144 connect(mIncomingDialog,SIGNAL(numMessagesChanged(int)), 160 connect(mIncomingDialog,SIGNAL(numMessagesChanged(int)),
145 mMainView,SIGNAL(numIncomingChanged(int))); 161 mMainView,SIGNAL(numIncomingChanged(int)));
146 connect(mIncomingDialog,SIGNAL(calendarUpdated()), 162 connect(mIncomingDialog,SIGNAL(calendarUpdated()),
147 mMainView,SLOT(updateView())); 163 mMainView,SLOT(updateView()));
148 } 164 }
149} 165}
150 166
151void KODialogManager::showIncomingDialog() 167void KODialogManager::showIncomingDialog()
152{ 168{
153 createIncomingDialog(); 169 createIncomingDialog();
154 mIncomingDialog->show(); 170 mIncomingDialog->show();
155 mIncomingDialog->raise(); 171 mIncomingDialog->raise();
156} 172}
157/* 173/*
158void KODialogManager::showCategoryEditDialog() 174void KODialogManager::showCategoryEditDialog()
159{ 175{
160 mCategoryEditDialog->show(); 176 mCategoryEditDialog->show();
161} 177}
162*/ 178*/
163void KODialogManager::hideSearchDialog() 179void KODialogManager::hideSearchDialog()
164{ 180{
165 if (mSearchDialog) 181 if (mSearchDialog)
166 mSearchDialog->hide(); 182 mSearchDialog->hide();
167} 183}
168 184
169void KODialogManager::showSearchDialog() 185void KODialogManager::showSearchDialog()
170{ 186{
171 if (!mSearchDialog) { 187 if (!mSearchDialog) {
172 mSearchDialog = new SearchDialog(mMainView->calendar(),mMainView); 188 mSearchDialog = new SearchDialog(mMainView->calendar(),mMainView);
173 KOListView * lview = mSearchDialog->listview(); 189 KOListView * lview = mSearchDialog->listview();
174 190
175 connect(lview, SIGNAL(showIncidenceSignal(Incidence *)), 191 connect(lview, SIGNAL(showIncidenceSignal(Incidence *)),
176 mMainView, SLOT(showIncidence(Incidence *))); 192 mMainView, SLOT(showIncidence(Incidence *)));
177 connect(lview, SIGNAL(editIncidenceSignal(Incidence *)), 193 connect(lview, SIGNAL(editIncidenceSignal(Incidence *)),
178 mMainView, SLOT(editIncidence(Incidence *))); 194 mMainView, SLOT(editIncidence(Incidence *)));
179 connect(lview, SIGNAL(deleteIncidenceSignal(Incidence *)), 195 connect(lview, SIGNAL(deleteIncidenceSignal(Incidence *)),
180 mMainView, SLOT(deleteIncidence(Incidence *))); 196 mMainView, SLOT(deleteIncidence(Incidence *)));
181 connect(lview, SIGNAL(cloneIncidenceSignal(Incidence *)), 197 connect(lview, SIGNAL(cloneIncidenceSignal(Incidence *)),
182 mMainView, SLOT(cloneIncidence(Incidence *))); 198 mMainView, SLOT(cloneIncidence(Incidence *)));
183 connect(lview, SIGNAL(beamIncidenceSignal(Incidence *)), 199 connect(lview, SIGNAL(beamIncidenceSignal(Incidence *)),
184 mMainView, SLOT(beamIncidence(Incidence *))); 200 mMainView, SLOT(beamIncidence(Incidence *)));
185 connect(lview, SIGNAL(moveIncidenceSignal(Incidence *)), 201 connect(lview, SIGNAL(moveIncidenceSignal(Incidence *)),
186 mMainView, SLOT(moveIncidence(Incidence *))); 202 mMainView, SLOT(moveIncidence(Incidence *)));
187 connect(lview, SIGNAL(beamIncidenceList(QPtrList<Incidence> )), 203 connect(lview, SIGNAL(beamIncidenceList(QPtrList<Incidence> )),
188 mMainView, SLOT(beamIncidenceList(QPtrList<Incidence> ))); 204 mMainView, SLOT(beamIncidenceList(QPtrList<Incidence> )));
189 205
190 connect(mMainView, SIGNAL(configChanged()), mSearchDialog, SLOT(updateConfig())); 206 connect(mMainView, SIGNAL(configChanged()), mSearchDialog, SLOT(updateConfig()));
191 connect(mMainView, SIGNAL(updateSearchDialog()), mSearchDialog, SLOT(updateList())); 207 connect(mMainView, SIGNAL(updateSearchDialog()), mSearchDialog, SLOT(updateList()));
192 // connect( lview, SIGNAL( incidenceSelected( Incidence * ) ), 208 // connect( lview, SIGNAL( incidenceSelected( Incidence * ) ),
193 // mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); 209 // mMainView, SLOT( processMainViewSelection( Incidence * ) ) );
194#ifndef DESKTOP_VERSION 210#ifndef DESKTOP_VERSION
195 mSearchDialog->setMaximumSize( QApplication::desktop()->size()); 211 mSearchDialog->setMaximumSize( QApplication::desktop()->size());
196 mSearchDialog->showMaximized(); 212 mSearchDialog->showMaximized();
197#else 213#else
198 KConfig *config = KOGlobals::config(); 214 KConfig *config = KOGlobals::config();
199 config->setGroup("WidgetLayout"); 215 config->setGroup("WidgetLayout");
200 QStringList list; 216 QStringList list;
201 list = config->readListEntry("SearchLayout"); 217 list = config->readListEntry("SearchLayout");
202 int x,y,w,h; 218 int x,y,w,h;
203 if ( ! list.isEmpty() ) { 219 if ( ! list.isEmpty() ) {
204 x = list[0].toInt(); 220 x = list[0].toInt();
205 y = list[1].toInt(); 221 y = list[1].toInt();
206 w = list[2].toInt(); 222 w = list[2].toInt();
207 h = list[3].toInt(); 223 h = list[3].toInt();
208 KApplication::testCoords( &x,&y,&w,&h ); 224 KApplication::testCoords( &x,&y,&w,&h );
209 mSearchDialog->setGeometry(x,y,w,h); 225 mSearchDialog->setGeometry(x,y,w,h);
210 226
211 } 227 }
212 228
213#endif 229#endif
214 } 230 }
215 // make sure the widget is on top again 231 // make sure the widget is on top again
216#ifdef DESKTOP_VERSION 232#ifdef DESKTOP_VERSION
217 mSearchDialog->show(); 233 mSearchDialog->show();
218#else 234#else
219 mSearchDialog->setMaximumSize( QApplication::desktop()->size()); 235 mSearchDialog->setMaximumSize( QApplication::desktop()->size());
220 mSearchDialog->showMaximized(); 236 mSearchDialog->showMaximized();
221#endif 237#endif
222 mSearchDialog->raiseAndSelect(); 238 mSearchDialog->raiseAndSelect();
223} 239}
224 240
225SearchDialog * KODialogManager::getSearchDialog() 241SearchDialog * KODialogManager::getSearchDialog()
226{ 242{
227 return mSearchDialog; 243 return mSearchDialog;
228} 244}
229void KODialogManager::showArchiveDialog() 245void KODialogManager::showArchiveDialog()
230{ 246{
231#ifndef KORG_NOARCHIVE 247#ifndef KORG_NOARCHIVE
232 if (!mArchiveDialog) { 248 if (!mArchiveDialog) {
233 mArchiveDialog = new ArchiveDialog(mMainView->calendar(),mMainView); 249 mArchiveDialog = new ArchiveDialog(mMainView->calendar(),mMainView);
234 connect(mArchiveDialog,SIGNAL(eventsDeleted()), 250 connect(mArchiveDialog,SIGNAL(eventsDeleted()),
235 mMainView,SLOT(updateView())); 251 mMainView,SLOT(updateView()));
236 } 252 }
237 mArchiveDialog->show(); 253 mArchiveDialog->show();
238 mArchiveDialog->raise(); 254 mArchiveDialog->raise();
239 255
240 // Workaround. 256 // Workaround.
241 QApplication::restoreOverrideCursor(); 257 QApplication::restoreOverrideCursor();
242#endif 258#endif
243} 259}
244 260
245void KODialogManager::showFilterEditDialog(QPtrList<CalFilter> *filters) 261void KODialogManager::showFilterEditDialog(QPtrList<CalFilter> *filters)
246{ 262{
247 if (!mFilterEditDialog) { 263 if (!mFilterEditDialog) {
248 mFilterEditDialog = new FilterEditDialog(filters,mMainView); 264 mFilterEditDialog = new FilterEditDialog(filters,mMainView);
249 connect(mFilterEditDialog,SIGNAL(filterChanged()), 265 connect(mFilterEditDialog,SIGNAL(filterChanged()),
250 mMainView,SLOT(filterEdited())); 266 mMainView,SLOT(filterEdited()));
251 267
252 } 268 }
253 269
254#ifndef DESKTOP_VERSION 270#ifndef DESKTOP_VERSION
255 mFilterEditDialog->showMaximized(); 271 mFilterEditDialog->showMaximized();
256#else 272#else
257 mFilterEditDialog->show(); 273 mFilterEditDialog->show();
258#endif 274#endif
259 mFilterEditDialog->raise(); 275 mFilterEditDialog->raise();
260} 276}
261 277
262void KODialogManager::showPluginDialog() 278void KODialogManager::showPluginDialog()
263{ 279{
264#ifndef KORG_NOPLUGINS 280#ifndef KORG_NOPLUGINS
265 if (!mPluginDialog) { 281 if (!mPluginDialog) {
266 mPluginDialog = new PluginDialog(mMainView); 282 mPluginDialog = new PluginDialog(mMainView);
267 connect(mPluginDialog,SIGNAL(configChanged()), 283 connect(mPluginDialog,SIGNAL(configChanged()),
268 mMainView,SLOT(updateConfig())); 284 mMainView,SLOT(updateConfig()));
269 } 285 }
270 mPluginDialog->show(); 286 mPluginDialog->show();
271 mPluginDialog->raise(); 287 mPluginDialog->raise();
272#endif 288#endif
273} 289}
274 290
275KOEventEditor *KODialogManager::getEventEditor() 291KOEventEditor *KODialogManager::getEventEditor()
276{ 292{
277 KOEventEditor *eventEditor = new KOEventEditor( mMainView->calendar(), 293 KOEventEditor *eventEditor = new KOEventEditor( mMainView->calendar(),
278 mMainView ); 294 mMainView );
279 295
280 connect(eventEditor,SIGNAL(eventAdded(Event *)), 296 connect(eventEditor,SIGNAL(eventAdded(Event *)),
281 mMainView,SLOT(eventAdded(Event *))); 297 mMainView,SLOT(eventAdded(Event *)));
282 connect(eventEditor,SIGNAL(eventChanged(Event *)), 298 connect(eventEditor,SIGNAL(eventChanged(Event *)),
283 mMainView,SLOT(eventChanged(Event *))); 299 mMainView,SLOT(eventChanged(Event *)));
284 connect(eventEditor,SIGNAL(eventDeleted()), 300 connect(eventEditor,SIGNAL(eventDeleted()),
285 mMainView,SLOT(eventDeleted())); 301 mMainView,SLOT(eventDeleted()));
286 connect(eventEditor,SIGNAL(deleteAttendee(Incidence *)), 302 connect(eventEditor,SIGNAL(deleteAttendee(Incidence *)),
287 mMainView,SLOT(schedule_cancel(Incidence *))); 303 mMainView,SLOT(schedule_cancel(Incidence *)));
288 connect( eventEditor, SIGNAL(jumpToTime( const QDate &)), 304 connect( eventEditor, SIGNAL(jumpToTime( const QDate &)),
289 mMainView->dateNavigator(), SLOT( selectWeek( const QDate & ) ) ); 305 mMainView->dateNavigator(), SLOT( selectWeek( const QDate & ) ) );
290 connect( eventEditor, SIGNAL( showAgendaView( bool)), 306 connect( eventEditor, SIGNAL( showAgendaView( bool)),
291 mMainView->viewManager(), SLOT( showAgendaView( bool) ) ); 307 mMainView->viewManager(), SLOT( showAgendaView( bool) ) );
292 308
293 // connect(mCategoryEditDialog,SIGNAL(categoryConfigChanged()), 309 // connect(mCategoryEditDialog,SIGNAL(categoryConfigChanged()),
294 // eventEditor,SLOT(updateCategoryConfig())); 310 // eventEditor,SLOT(updateCategoryConfig()));
295 // connect(eventEditor,SIGNAL(editCategories()), 311 // connect(eventEditor,SIGNAL(editCategories()),
296 // mCategoryEditDialog,SLOT(show())); 312 // mCategoryEditDialog,SLOT(show()));
297 connect(eventEditor,SIGNAL(dialogClose(Incidence*)), 313 connect(eventEditor,SIGNAL(dialogClose(Incidence*)),
298 mMainView,SLOT(dialogClosing(Incidence*))); 314 mMainView,SLOT(dialogClosing(Incidence*)));
299 315
300 //connect(mMainView,SIGNAL(closingDown()),eventEditor,SLOT(reject())); 316 //connect(mMainView,SIGNAL(closingDown()),eventEditor,SLOT(reject()));
301 317
302#ifndef DESKTOP_VERSION 318#ifndef DESKTOP_VERSION
303 eventEditor->resize( QApplication::desktop()->width() -20, 100 ); 319 eventEditor->resize( QApplication::desktop()->width() -20, 100 );
304#endif 320#endif
305 return eventEditor; 321 return eventEditor;
306} 322}
307 323
308KOTodoEditor *KODialogManager::getTodoEditor() 324KOTodoEditor *KODialogManager::getTodoEditor()
diff --git a/korganizer/kodialogmanager.h b/korganizer/kodialogmanager.h
index a6cc621..b68ddc2 100644
--- a/korganizer/kodialogmanager.h
+++ b/korganizer/kodialogmanager.h
@@ -1,100 +1,101 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2001 3 Copyright (c) 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 KODIALOGMANAGER_H 24#ifndef KODIALOGMANAGER_H
25#define KODIALOGMANAGER_H 25#define KODIALOGMANAGER_H
26 26
27#include <qobject.h> 27#include <qobject.h>
28#include <qptrlist.h> 28#include <qptrlist.h>
29 29
30#include <libkcal/calfilter.h> 30#include <libkcal/calfilter.h>
31 31
32class CalendarView; 32class CalendarView;
33class OutgoingDialog; 33class OutgoingDialog;
34class IncomingDialog; 34class IncomingDialog;
35class KOPrefsDialog; 35class KOPrefsDialog;
36//namespace KPIM { class CategoryEditDialog; } 36//namespace KPIM { class CategoryEditDialog; }
37class KOEventEditor; 37class KOEventEditor;
38class KOTodoEditor; 38class KOTodoEditor;
39class SearchDialog; 39class SearchDialog;
40class ArchiveDialog; 40class ArchiveDialog;
41class PluginDialog; 41class PluginDialog;
42class KConfig; 42class KConfig;
43class FilterEditDialog; 43class FilterEditDialog;
44 44
45using namespace KCal; 45using namespace KCal;
46 46
47/** 47/**
48 This class manages the dialogs used by the calendar view. It owns the objects 48 This class manages the dialogs used by the calendar view. It owns the objects
49 and handles creation and selection. 49 and handles creation and selection.
50*/ 50*/
51class KODialogManager : public QObject 51class KODialogManager : public QObject
52{ 52{
53 Q_OBJECT 53 Q_OBJECT
54 public: 54 public:
55 KODialogManager( CalendarView * ); 55 KODialogManager( CalendarView * );
56 virtual ~KODialogManager(); 56 virtual ~KODialogManager();
57 57
58 /** Get an editor dialog for an Event. */ 58 /** Get an editor dialog for an Event. */
59 KOEventEditor *getEventEditor(); 59 KOEventEditor *getEventEditor();
60 60
61 /** Get an editor dialog for a Todo. */ 61 /** Get an editor dialog for a Todo. */
62 KOTodoEditor *getTodoEditor(); 62 KOTodoEditor *getTodoEditor();
63 63
64 OutgoingDialog *outgoingDialog(); 64 OutgoingDialog *outgoingDialog();
65 65
66 IncomingDialog *incomingDialog(); 66 IncomingDialog *incomingDialog();
67 void writeSettings( KConfig *config); 67 void writeSettings( KConfig *config);
68 void updateSearchDialog(); 68 void updateSearchDialog();
69 SearchDialog * getSearchDialog(); 69 SearchDialog * getSearchDialog();
70 void setDocumentId( const QString &id ); 70 void setDocumentId( const QString &id );
71 71
72 public slots: 72 public slots:
73 void showOptionsDialog( bool showSync = false); 73 void showOptionsDialog( bool showSync = false);
74 void showGlobalOptionsDialog(bool showSync = false);
74 void showSyncOptions(); 75 void showSyncOptions();
75 void showIncomingDialog(); 76 void showIncomingDialog();
76 void showOutgoingDialog(); 77 void showOutgoingDialog();
77 // void showCategoryEditDialog(); 78 // void showCategoryEditDialog();
78 void showSearchDialog(); 79 void showSearchDialog();
79 void showArchiveDialog(); 80 void showArchiveDialog();
80 void showFilterEditDialog(QPtrList<CalFilter> *filters); 81 void showFilterEditDialog(QPtrList<CalFilter> *filters);
81 void showPluginDialog(); 82 void showPluginDialog();
82 void hideSearchDialog(); 83 void hideSearchDialog();
83 84
84 private: 85 private:
85 void createOutgoingDialog(); 86 void createOutgoingDialog();
86 void createIncomingDialog(); 87 void createIncomingDialog();
87 88
88 CalendarView *mMainView; 89 CalendarView *mMainView;
89 90
90 OutgoingDialog *mOutgoingDialog; 91 OutgoingDialog *mOutgoingDialog;
91 IncomingDialog *mIncomingDialog; 92 IncomingDialog *mIncomingDialog;
92 KOPrefsDialog *mOptionsDialog; 93 KOPrefsDialog *mOptionsDialog;
93 // KPIM::CategoryEditDialog *mCategoryEditDialog; 94 // KPIM::CategoryEditDialog *mCategoryEditDialog;
94 SearchDialog *mSearchDialog; 95 SearchDialog *mSearchDialog;
95 ArchiveDialog *mArchiveDialog; 96 ArchiveDialog *mArchiveDialog;
96 FilterEditDialog *mFilterEditDialog; 97 FilterEditDialog *mFilterEditDialog;
97 PluginDialog *mPluginDialog; 98 PluginDialog *mPluginDialog;
98}; 99};
99 100
100#endif 101#endif
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index c9477e3..4b5b66a 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -1,435 +1,437 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <qlayout.h> 24#include <qlayout.h>
25#include <qlabel.h> 25#include <qlabel.h>
26#include <qgroupbox.h> 26#include <qgroupbox.h>
27#include <qbuttongroup.h> 27#include <qbuttongroup.h>
28#include <qlineedit.h> 28#include <qlineedit.h>
29#include <qfont.h> 29#include <qfont.h>
30#include <qslider.h> 30#include <qslider.h>
31#include <qfile.h> 31#include <qfile.h>
32#include <qtextstream.h> 32#include <qtextstream.h>
33#include <qcombobox.h> 33#include <qcombobox.h>
34#include <qvbox.h> 34#include <qvbox.h>
35#include <qhbox.h> 35#include <qhbox.h>
36#include <qregexp.h> 36#include <qregexp.h>
37#include <qspinbox.h> 37#include <qspinbox.h>
38#include <qdatetime.h> 38#include <qdatetime.h>
39#include <qcheckbox.h> 39#include <qcheckbox.h>
40#include <qradiobutton.h> 40#include <qradiobutton.h>
41#include <qpushbutton.h> 41#include <qpushbutton.h>
42#include <qstrlist.h> 42#include <qstrlist.h>
43#include <qapplication.h> 43#include <qapplication.h>
44 44
45#include <kcolorbutton.h> 45#include <kcolorbutton.h>
46#include <kdebug.h> 46#include <kdebug.h>
47#include <klocale.h> 47#include <klocale.h>
48#include <kglobal.h> 48#include <kglobal.h>
49#include <kfontdialog.h> 49#include <kfontdialog.h>
50#include <kfiledialog.h> 50#include <kfiledialog.h>
51#include <kmessagebox.h> 51#include <kmessagebox.h>
52#include <kcolordialog.h> 52#include <kcolordialog.h>
53#include <kiconloader.h> 53#include <kiconloader.h>
54#include <kemailsettings.h> 54#include <kemailsettings.h>
55#include <kstandarddirs.h> 55#include <kstandarddirs.h>
56#include <kglobalsettings.h> 56#include <kglobalsettings.h>
57 57
58#include <kurlrequester.h> 58#include <kurlrequester.h>
59#include <klineedit.h> 59#include <klineedit.h>
60 60
61#if defined(USE_SOLARIS) 61#if defined(USE_SOLARIS)
62#include <sys/param.h> 62#include <sys/param.h>
63 63
64#define ZONEINFODIR "/usr/share/lib/zoneinfo" 64#define ZONEINFODIR "/usr/share/lib/zoneinfo"
65#define INITFILE "/etc/default/init" 65#define INITFILE "/etc/default/init"
66#endif 66#endif
67 67
68#include "koprefs.h" 68#include "koprefs.h"
69 69
70#include "koprefsdialog.h" 70#include "koprefsdialog.h"
71#include "kpimglobalprefs.h" 71#include "kpimglobalprefs.h"
72 72
73 73
74KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : 74KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) :
75 KPrefsDialog(KOPrefs::instance(),parent,name,true) 75 KPrefsDialog(KOPrefs::instance(),parent,name,true)
76{ 76{
77 77
78 setFont( KGlobalSettings::generalMaxFont() ); 78 setFont( KGlobalSettings::generalMaxFont() );
79 setCaption( i18n("Preferences - some settings need a restart (nr)")); 79 setCaption( i18n("Preferences - some settings need a restart (nr)"));
80 mCategoryDict.setAutoDelete(true); 80 mCategoryDict.setAutoDelete(true);
81 81
82 KGlobal::locale()->insertCatalogue("timezones"); 82 KGlobal::locale()->insertCatalogue("timezones");
83 mSpacingHint = spacingHintSmall(); 83 mSpacingHint = spacingHintSmall();
84 mMarginHint = marginHintSmall(); 84 mMarginHint = marginHintSmall();
85#ifndef DESKTOP_VERSION 85#ifndef DESKTOP_VERSION
86 if ( QApplication::desktop()->height() == 480 ) 86 if ( QApplication::desktop()->height() == 480 )
87 hideButtons(); 87 hideButtons();
88#endif 88#endif
89 89 kdelibcfg = 0;
90 if ( !parent )
90 setupGlobalTab(); 91 setupGlobalTab();
92 else {
91 setupMainTab(); 93 setupMainTab();
92 // setupLocaleTab(); 94 // setupLocaleTab();
93 //setupTimeZoneTab(); 95 //setupTimeZoneTab();
94 setupTimeTab(); 96 setupTimeTab();
95 //setupLocaleDateTab(); 97 //setupLocaleDateTab();
96 setupFontsTab(); 98 setupFontsTab();
97 setupColorsTab(); 99 setupColorsTab();
98 setupViewsTab(); 100 setupViewsTab();
99 //setupSyncTab(); 101 //setupSyncTab();
100 //setupSyncAlgTab(); 102 //setupSyncAlgTab();
101 //setupPrinterTab(); 103 //setupPrinterTab();
102 //setupGroupSchedulingTab(); 104 //setupGroupSchedulingTab();
103 //setupGroupAutomationTab(); 105 //setupGroupAutomationTab();
104 106 }
105 107
106} 108}
107 109
108 110
109KOPrefsDialog::~KOPrefsDialog() 111KOPrefsDialog::~KOPrefsDialog()
110{ 112{
111} 113}
112void KOPrefsDialog::setupGlobalTab() 114void KOPrefsDialog::setupGlobalTab()
113{ 115{
114 QFrame *topFrame = addPage(i18n("Global"),0,0); 116 //QFrame *topFrame = addPage(i18n("Global"),0,0);
115 kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" ); 117 kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), this, "KCMKdeLibConfig" );
116 QVBoxLayout *topLayout = new QVBoxLayout(topFrame); 118 setMainWidget( kdelibcfg );
117 topLayout->addWidget( kdelibcfg ); 119 setCaption( i18n("KDE-Pim Global Settings"));
118 120
119 121
120} 122}
121void KOPrefsDialog::setupLocaleDateTab() 123void KOPrefsDialog::setupLocaleDateTab()
122{ 124{
123#if 0 125#if 0
124QFrame *topFrame = addPage(i18n("Date Format"),0,0); 126QFrame *topFrame = addPage(i18n("Date Format"),0,0);
125 QGridLayout *topLayout = new QGridLayout(topFrame,3,2); 127 QGridLayout *topLayout = new QGridLayout(topFrame,3,2);
126 topLayout->setSpacing(mSpacingHint); 128 topLayout->setSpacing(mSpacingHint);
127 topLayout->setMargin(mMarginHint); 129 topLayout->setMargin(mMarginHint);
128 int iii = 0; 130 int iii = 0;
129 131
130 132
131 KPrefsDialogWidRadios *syncPrefsGroup = 133 KPrefsDialogWidRadios *syncPrefsGroup =
132 addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); 134 addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame);
133 QString format; 135 QString format;
134 if ( QApplication::desktop()->width() < 480 ) 136 if ( QApplication::desktop()->width() < 480 )
135 format = "(%d.%m.%Y)"; 137 format = "(%d.%m.%Y)";
136 else 138 else
137 format = "(%d.%m.%Y|%A %d %B %Y)"; 139 format = "(%d.%m.%Y|%A %d %B %Y)";
138 syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); 140 syncPrefsGroup->addRadio(i18n("24.03.2004 "+format));
139 if ( QApplication::desktop()->width() < 480 ) 141 if ( QApplication::desktop()->width() < 480 )
140 format = "(%m.%d.%Y)"; 142 format = "(%m.%d.%Y)";
141 else 143 else
142 format = "(%m.%d.%Y|%A %B %d %Y)"; 144 format = "(%m.%d.%Y|%A %B %d %Y)";
143 syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); 145 syncPrefsGroup->addRadio(i18n("03.24.2004 "+format));
144 if ( QApplication::desktop()->width() < 480 ) 146 if ( QApplication::desktop()->width() < 480 )
145 format = "(%Y-%m-%d)"; 147 format = "(%Y-%m-%d)";
146 else 148 else
147 format = "(%Y-%m-%d|%A %Y %B %d)"; 149 format = "(%Y-%m-%d|%A %Y %B %d)";
148 syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); 150 syncPrefsGroup->addRadio(i18n("2004-03-24 "+format));
149 syncPrefsGroup->addRadio(i18n("User defined")); 151 syncPrefsGroup->addRadio(i18n("User defined"));
150 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 152 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
151 ++iii; 153 ++iii;
152 ++iii; 154 ++iii;
153 QLabel * lab; 155 QLabel * lab;
154 mUserDateFormatLong = new QLineEdit(topFrame); 156 mUserDateFormatLong = new QLineEdit(topFrame);
155 lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); 157 lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame);
156 topLayout->addWidget(lab ,iii,0); 158 topLayout->addWidget(lab ,iii,0);
157 topLayout->addWidget(mUserDateFormatLong,iii,1); 159 topLayout->addWidget(mUserDateFormatLong,iii,1);
158 ++iii; 160 ++iii;
159 mUserDateFormatShort = new QLineEdit(topFrame); 161 mUserDateFormatShort = new QLineEdit(topFrame);
160 lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); 162 lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame);
161 topLayout->addWidget(lab ,iii,0); 163 topLayout->addWidget(lab ,iii,0);
162 topLayout->addWidget(mUserDateFormatShort,iii,1); 164 topLayout->addWidget(mUserDateFormatShort,iii,1);
163 ++iii; 165 ++iii;
164 lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); 166 lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame);
165 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 167 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
166 ++iii; 168 ++iii;
167 lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); 169 lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame);
168 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 170 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
169 ++iii; 171 ++iii;
170 lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); 172 lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame);
171 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 173 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
172 ++iii; 174 ++iii;
173#endif 175#endif
174 176
175} 177}
176 178
177void KOPrefsDialog::setupLocaleTab() 179void KOPrefsDialog::setupLocaleTab()
178{ 180{
179#if 0 181#if 0
180 QFrame *topFrame = addPage(i18n("Locale"),0,0); 182 QFrame *topFrame = addPage(i18n("Locale"),0,0);
181 QGridLayout *topLayout = new QGridLayout(topFrame,4,2); 183 QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
182 topLayout->setSpacing(mSpacingHint); 184 topLayout->setSpacing(mSpacingHint);
183 topLayout->setMargin(mMarginHint); 185 topLayout->setMargin(mMarginHint);
184 int iii = 0; 186 int iii = 0;
185 KPrefsDialogWidRadios *syncPrefsGroup = 187 KPrefsDialogWidRadios *syncPrefsGroup =
186 addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame); 188 addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame);
187 syncPrefsGroup->addRadio(i18n("English")); 189 syncPrefsGroup->addRadio(i18n("English"));
188 syncPrefsGroup->addRadio(i18n("German")); 190 syncPrefsGroup->addRadio(i18n("German"));
189 syncPrefsGroup->addRadio(i18n("French")); 191 syncPrefsGroup->addRadio(i18n("French"));
190 syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); 192 syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)"));
191 if ( QApplication::desktop()->width() < 300 ) 193 if ( QApplication::desktop()->width() < 300 )
192 ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); 194 ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical);
193 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 195 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
194 ++iii; 196 ++iii;
195 197
196 syncPrefsGroup = 198 syncPrefsGroup =
197 addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame); 199 addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame);
198 if ( QApplication::desktop()->width() > 300 ) 200 if ( QApplication::desktop()->width() > 300 )
199 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); 201 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical);
200 syncPrefsGroup->addRadio(i18n("24:00")); 202 syncPrefsGroup->addRadio(i18n("24:00"));
201 syncPrefsGroup->addRadio(i18n("12:00am")); 203 syncPrefsGroup->addRadio(i18n("12:00am"));
202 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); 204 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical);
203 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 205 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
204 ++iii; 206 ++iii;
205 KPrefsDialogWidBool *sb; 207 KPrefsDialogWidBool *sb;
206 if ( QApplication::desktop()->width() < 300 ) { 208 if ( QApplication::desktop()->width() < 300 ) {
207 sb = 209 sb =
208 addWidBool(i18n("Week starts on Sunday"), 210 addWidBool(i18n("Week starts on Sunday"),
209 &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame); 211 &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame);
210 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 212 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
211 ++iii; 213 ++iii;
212 sb = 214 sb =
213 addWidBool(i18n("Use short date in (WN/E) view"), 215 addWidBool(i18n("Use short date in (WN/E) view"),
214 &(KOPrefs::instance()->mShortDateInViewer),topFrame); 216 &(KOPrefs::instance()->mShortDateInViewer),topFrame);
215 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 217 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
216 } 218 }
217 else { 219 else {
218 QWidget * hb = new QWidget( topFrame ); 220 QWidget * hb = new QWidget( topFrame );
219 QHBoxLayout *hbLayout = new QHBoxLayout(hb); 221 QHBoxLayout *hbLayout = new QHBoxLayout(hb);
220 sb = 222 sb =
221 addWidBool(i18n("Week starts on Sunday"), 223 addWidBool(i18n("Week starts on Sunday"),
222 &(KOPrefs::instance()->mWeekStartsOnSunday),hb); 224 &(KOPrefs::instance()->mWeekStartsOnSunday),hb);
223 hbLayout->addWidget(sb->checkBox() ); 225 hbLayout->addWidget(sb->checkBox() );
224 sb = 226 sb =
225 addWidBool(i18n("Use short date in (WN/E) view"), 227 addWidBool(i18n("Use short date in (WN/E) view"),
226 &(KOPrefs::instance()->mShortDateInViewer),hb); 228 &(KOPrefs::instance()->mShortDateInViewer),hb);
227 hbLayout->addWidget(sb->checkBox() ); 229 hbLayout->addWidget(sb->checkBox() );
228 topLayout->addMultiCellWidget(hb, iii,iii,0,1); 230 topLayout->addMultiCellWidget(hb, iii,iii,0,1);
229 231
230 } 232 }
231 // KPrefsDialogWidBool *sb; //#ifndef DESKTOP_VERSION 233 // KPrefsDialogWidBool *sb; //#ifndef DESKTOP_VERSION
232#if 0 234#if 0
233 ++iii; 235 ++iii;
234 sb = 236 sb =
235 addWidBool(i18n("Quick load/save (w/o Unicode)"), 237 addWidBool(i18n("Quick load/save (w/o Unicode)"),
236 &(KOPrefs::instance()->mUseQuicksave),topFrame); 238 &(KOPrefs::instance()->mUseQuicksave),topFrame);
237 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 239 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
238#endif 240#endif
239#endif 241#endif
240} 242}
241void KOPrefsDialog::showSyncPage() 243void KOPrefsDialog::showSyncPage()
242{ 244{
243 showPage ( 0 ) ; 245 // showPage ( 0 ) ;
244 kdelibcfg->showTimeZoneTab() ; 246 kdelibcfg->showTimeZoneTab() ;
245 247
246} 248}
247void KOPrefsDialog::setupSyncAlgTab() 249void KOPrefsDialog::setupSyncAlgTab()
248{ 250{
249#if 0 251#if 0
250 QLabel * lab; 252 QLabel * lab;
251 QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0); 253 QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0);
252 mSetupSyncAlgTab = topFrame; 254 mSetupSyncAlgTab = topFrame;
253 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 255 QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
254 topLayout->setSpacing(mSpacingHint); 256 topLayout->setSpacing(mSpacingHint);
255 topLayout->setMargin(mMarginHint); 257 topLayout->setMargin(mMarginHint);
256 int iii = 0; 258 int iii = 0;
257 259
258 KPrefsDialogWidBool *sb = 260 KPrefsDialogWidBool *sb =
259 addWidBool(i18n("Ask for preferences before syncing"), 261 addWidBool(i18n("Ask for preferences before syncing"),
260 &(KOPrefs::instance()->mAskForPreferences),topFrame); 262 &(KOPrefs::instance()->mAskForPreferences),topFrame);
261 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 263 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
262 264
263 ++iii; 265 ++iii;
264 266
265 KPrefsDialogWidRadios *syncPrefsGroup = 267 KPrefsDialogWidRadios *syncPrefsGroup =
266 addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs), 268 addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs),
267 topFrame); 269 topFrame);
268 syncPrefsGroup->addRadio(i18n("Take local entry on conflict")); 270 syncPrefsGroup->addRadio(i18n("Take local entry on conflict"));
269 syncPrefsGroup->addRadio(i18n("Take remote entry on conflict")); 271 syncPrefsGroup->addRadio(i18n("Take remote entry on conflict"));
270 syncPrefsGroup->addRadio(i18n("Take newest entry on conflict")); 272 syncPrefsGroup->addRadio(i18n("Take newest entry on conflict"));
271 syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict")); 273 syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict"));
272 syncPrefsGroup->addRadio(i18n("Force take local entry always")); 274 syncPrefsGroup->addRadio(i18n("Force take local entry always"));
273 syncPrefsGroup->addRadio(i18n("Force take remote entry always")); 275 syncPrefsGroup->addRadio(i18n("Force take remote entry always"));
274 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 276 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
275 ++iii; 277 ++iii;
276 sb = 278 sb =
277 addWidBool(i18n("Show summary after syncing"), 279 addWidBool(i18n("Show summary after syncing"),
278 &(KOPrefs::instance()->mShowSyncSummary),topFrame); 280 &(KOPrefs::instance()->mShowSyncSummary),topFrame);
279 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 281 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
280 282
281 ++iii; 283 ++iii;
282#endif 284#endif
283 285
284 286
285 287
286} 288}
287 289
288 290
289void KOPrefsDialog::setupSyncTab() 291void KOPrefsDialog::setupSyncTab()
290{ 292{
291#if 0 293#if 0
292 QLabel * lab; 294 QLabel * lab;
293 QFrame *topFrame = addPage(i18n("Sync Network"),0,0); 295 QFrame *topFrame = addPage(i18n("Sync Network"),0,0);
294 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 296 QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
295 topLayout->setSpacing(mSpacingHint); 297 topLayout->setSpacing(mSpacingHint);
296 topLayout->setMargin(mMarginHint); 298 topLayout->setMargin(mMarginHint);
297 lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame); 299 lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame);
298 int iii = 0; 300 int iii = 0;
299 topLayout->addMultiCellWidget(lab , iii,iii,0,1); 301 topLayout->addMultiCellWidget(lab , iii,iii,0,1);
300 ++iii; 302 ++iii;
301 303
302 mRemoteIPEdit = new QLineEdit(topFrame); 304 mRemoteIPEdit = new QLineEdit(topFrame);
303 lab = new QLabel(mRemoteIPEdit, i18n("Remote IP:"), topFrame); 305 lab = new QLabel(mRemoteIPEdit, i18n("Remote IP:"), topFrame);
304 topLayout->addWidget(lab ,iii,0); 306 topLayout->addWidget(lab ,iii,0);
305 topLayout->addWidget(mRemoteIPEdit,iii,1); 307 topLayout->addWidget(mRemoteIPEdit,iii,1);
306 ++iii; 308 ++iii;
307 mRemoteUser = new QLineEdit(topFrame); 309 mRemoteUser = new QLineEdit(topFrame);
308 lab = new QLabel(mRemoteUser, i18n("Remote user:"), topFrame); 310 lab = new QLabel(mRemoteUser, i18n("Remote user:"), topFrame);
309 topLayout->addWidget(lab ,iii,0); 311 topLayout->addWidget(lab ,iii,0);
310 topLayout->addWidget(mRemoteUser, iii,1); 312 topLayout->addWidget(mRemoteUser, iii,1);
311 ++iii; 313 ++iii;
312 314
313 mRemoteFile = new QLineEdit(topFrame); 315 mRemoteFile = new QLineEdit(topFrame);
314 lab = new QLabel(mRemoteFile, i18n("Remote file:"), topFrame); 316 lab = new QLabel(mRemoteFile, i18n("Remote file:"), topFrame);
315 topLayout->addWidget(lab ,iii,0); 317 topLayout->addWidget(lab ,iii,0);
316 topLayout->addWidget(mRemoteFile,iii,1); 318 topLayout->addWidget(mRemoteFile,iii,1);
317 ++iii; 319 ++iii;
318 320
319 mLocalTempFile = new QLineEdit(topFrame); 321 mLocalTempFile = new QLineEdit(topFrame);
320 lab = new QLabel(mLocalTempFile, i18n("Local temp file:"), topFrame); 322 lab = new QLabel(mLocalTempFile, i18n("Local temp file:"), topFrame);
321 topLayout->addWidget(lab ,iii,0); 323 topLayout->addWidget(lab ,iii,0);
322 topLayout->addWidget(mLocalTempFile,iii,1); 324 topLayout->addWidget(mLocalTempFile,iii,1);
323 ++iii; 325 ++iii;
324 326
325 KPrefsDialogWidBool *wb = 327 KPrefsDialogWidBool *wb =
326 addWidBool(i18n("Write back synced file"), 328 addWidBool(i18n("Write back synced file"),
327 &(KOPrefs::instance()->mWriteBackFile),topFrame); 329 &(KOPrefs::instance()->mWriteBackFile),topFrame);
328 topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); 330 topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1);
329 ++iii; 331 ++iii;
330 wb = 332 wb =
331 addWidBool(i18n("Write back existing entries only"), 333 addWidBool(i18n("Write back existing entries only"),
332 &(KOPrefs::instance()->mWriteBackExistingOnly),topFrame); 334 &(KOPrefs::instance()->mWriteBackExistingOnly),topFrame);
333 topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); 335 topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1);
334 ++iii; 336 ++iii;
335 337
336#endif 338#endif
337} 339}
338 340
339void KOPrefsDialog::setupMainTab() 341void KOPrefsDialog::setupMainTab()
340{ 342{
341 QFrame *topFrame = addPage(i18n("General"),0,0); 343 QFrame *topFrame = addPage(i18n("General"),0,0);
342 // DesktopIcon("identity",KIcon::SizeMedium)); 344 // DesktopIcon("identity",KIcon::SizeMedium));
343 345
344 QGridLayout *topLayout = new QGridLayout(topFrame,5,2); 346 QGridLayout *topLayout = new QGridLayout(topFrame,5,2);
345 topLayout->setSpacing(mSpacingHint); 347 topLayout->setSpacing(mSpacingHint);
346 topLayout->setMargin(mMarginHint); 348 topLayout->setMargin(mMarginHint);
347 349
348 // KPrefsDialogWidBool *emailControlCenter = 350 // KPrefsDialogWidBool *emailControlCenter =
349// addWidBool(i18n("&Use email settings from Control Center"), 351// addWidBool(i18n("&Use email settings from Control Center"),
350// &(KOPrefs::instance()->mEmailControlCenter),topFrame); 352// &(KOPrefs::instance()->mEmailControlCenter),topFrame);
351// topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1); 353// topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1);
352 // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)), 354 // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)),
353 // SLOT(toggleEmailSettings(bool))); 355 // SLOT(toggleEmailSettings(bool)));
354 356
355 mNameEdit = new QLineEdit(topFrame); 357 mNameEdit = new QLineEdit(topFrame);
356 mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); 358 mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame);
357 topLayout->addWidget(mNameLabel,0,0); 359 topLayout->addWidget(mNameLabel,0,0);
358 topLayout->addWidget(mNameEdit,0,1); 360 topLayout->addWidget(mNameEdit,0,1);
359 361
360 mEmailEdit = new QLineEdit(topFrame); 362 mEmailEdit = new QLineEdit(topFrame);
361 mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); 363 mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame);
362 topLayout->addWidget(mEmailLabel,1,0); 364 topLayout->addWidget(mEmailLabel,1,0);
363 topLayout->addWidget(mEmailEdit,1,1); 365 topLayout->addWidget(mEmailEdit,1,1);
364 KPrefsDialogWidBool *wb; 366 KPrefsDialogWidBool *wb;
365 367
366 368
367 369
368 KPrefsDialogWidBool *widbool = addWidBool(i18n("Full menu bar(nr)"), 370 KPrefsDialogWidBool *widbool = addWidBool(i18n("Full menu bar(nr)"),
369 &(KOPrefs::instance()->mShowFullMenu),topFrame); 371 &(KOPrefs::instance()->mShowFullMenu),topFrame);
370 topLayout->addMultiCellWidget( widbool->checkBox(), 2,2,0,1); 372 topLayout->addMultiCellWidget( widbool->checkBox(), 2,2,0,1);
371 373
372 374
373 widbool = addWidBool(i18n("Mini icons in toolbar(nr)"), 375 widbool = addWidBool(i18n("Mini icons in toolbar(nr)"),
374 &(KOPrefs::instance()->mToolBarMiniIcons),topFrame); 376 &(KOPrefs::instance()->mToolBarMiniIcons),topFrame);
375 topLayout->addMultiCellWidget( widbool->checkBox(), 3,3,0,1); 377 topLayout->addMultiCellWidget( widbool->checkBox(), 3,3,0,1);
376 378
377 379
378 KPrefsDialogWidBool *verticalScreen = 380 KPrefsDialogWidBool *verticalScreen =
379 addWidBool(i18n("Show vertical screen (Needs restart)"), 381 addWidBool(i18n("Show vertical screen (Needs restart)"),
380 &(KOPrefs::instance()->mVerticalScreen),topFrame); 382 &(KOPrefs::instance()->mVerticalScreen),topFrame);
381 //topLayout->addWidget(verticalScreen->checkBox(),ii++,0); 383 //topLayout->addWidget(verticalScreen->checkBox(),ii++,0);
382 topLayout->addMultiCellWidget(verticalScreen->checkBox(),4,4,0,1); 384 topLayout->addMultiCellWidget(verticalScreen->checkBox(),4,4,0,1);
383 385
384 386
385 int iii = 5; 387 int iii = 5;
386 widbool = addWidBool(i18n("Block popup until mouse button release"), 388 widbool = addWidBool(i18n("Block popup until mouse button release"),
387 &(KOPrefs::instance()->mBlockPopupMenu),topFrame); 389 &(KOPrefs::instance()->mBlockPopupMenu),topFrame);
388 topLayout->addMultiCellWidget( widbool->checkBox(), iii,iii,0,1); 390 topLayout->addMultiCellWidget( widbool->checkBox(), iii,iii,0,1);
389 ++iii; 391 ++iii;
390 QHBox *dummy = new QHBox(topFrame); 392 QHBox *dummy = new QHBox(topFrame);
391 new QLabel(i18n("Days in Next-X-Days:"),dummy); 393 new QLabel(i18n("Days in Next-X-Days:"),dummy);
392 mNextXDaysSpin = new QSpinBox(2,14,1,dummy); 394 mNextXDaysSpin = new QSpinBox(2,14,1,dummy);
393 395
394 topLayout->addMultiCellWidget(dummy,iii,iii,0,1); 396 topLayout->addMultiCellWidget(dummy,iii,iii,0,1);
395 397
396 ++iii; 398 ++iii;
397 399
398 400
399 // KPrefsDialogWidBool *bcc = 401 // KPrefsDialogWidBool *bcc =
400// addWidBool(i18n("Send copy to owner when mailing events"), 402// addWidBool(i18n("Send copy to owner when mailing events"),
401// &(KOPrefs::instance()->mBcc),topFrame); 403// &(KOPrefs::instance()->mBcc),topFrame);
402// topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1); 404// topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1);
403 405
404 406
405 // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame); 407 // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame);
406 //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1); 408 //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1);
407 409
408 // addWidBool(i18n("Enable automatic saving of calendar"), 410 // addWidBool(i18n("Enable automatic saving of calendar"),
409 // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); 411 // &(KOPrefs::instance()->mAutoSave),autoSaveGroup);
410 412
411 QHBox *intervalBox = new QHBox(topFrame); 413 QHBox *intervalBox = new QHBox(topFrame);
412 // intervalBox->setSpacing(mSpacingHint); 414 // intervalBox->setSpacing(mSpacingHint);
413 topLayout->addMultiCellWidget(intervalBox,iii,iii,0,1); 415 topLayout->addMultiCellWidget(intervalBox,iii,iii,0,1);
414 ++iii; 416 ++iii;
415 QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox); 417 QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox);
416 mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox); 418 mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox);
417 autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin); 419 autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin);
418 /* 420 /*
419 QHBox * agendasize = new QHBox ( topFrame ); 421 QHBox * agendasize = new QHBox ( topFrame );
420 422
421 new QLabel (i18n("AllDayAgenda Height:"), agendasize ); 423 new QLabel (i18n("AllDayAgenda Height:"), agendasize );
422 424
423 425
424 mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize); 426 mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize);
425 topLayout->addMultiCellWidget(agendasize,7,7,0,1); 427 topLayout->addMultiCellWidget(agendasize,7,7,0,1);
426 */ 428 */
427 429
428 430
429 KPrefsDialogWidBool *ask = 431 KPrefsDialogWidBool *ask =
430 addWidBool(i18n("Ask for quit when closing KO/Pi"), 432 addWidBool(i18n("Ask for quit when closing KO/Pi"),
431 &(KOPrefs::instance()->mAskForQuit),topFrame); 433 &(KOPrefs::instance()->mAskForQuit),topFrame);
432 topLayout->addMultiCellWidget(ask->checkBox(),iii,iii,0,1); 434 topLayout->addMultiCellWidget(ask->checkBox(),iii,iii,0,1);
433 ++iii; 435 ++iii;
434 436
435 437
@@ -1269,481 +1271,485 @@ void KOPrefsDialog::setupColorsTab()
1269 1271
1270 // agenda view background color 1272 // agenda view background color
1271 KPrefsDialogWidColor *agendaBgColor = 1273 KPrefsDialogWidColor *agendaBgColor =
1272 addWidColor(i18n("Agenda view background color:"), 1274 addWidColor(i18n("Agenda view background color:"),
1273 &(KOPrefs::instance()->mAgendaBgColor),topFrame); 1275 &(KOPrefs::instance()->mAgendaBgColor),topFrame);
1274 topLayout->addWidget(agendaBgColor->label(),ii,0); 1276 topLayout->addWidget(agendaBgColor->label(),ii,0);
1275 topLayout->addWidget(agendaBgColor->button(),ii++,1); 1277 topLayout->addWidget(agendaBgColor->button(),ii++,1);
1276 1278
1277 // working hours color 1279 // working hours color
1278 KPrefsDialogWidColor *workingHoursColor = 1280 KPrefsDialogWidColor *workingHoursColor =
1279 addWidColor(i18n("Working hours color:"), 1281 addWidColor(i18n("Working hours color:"),
1280 &(KOPrefs::instance()->mWorkingHoursColor),topFrame); 1282 &(KOPrefs::instance()->mWorkingHoursColor),topFrame);
1281 topLayout->addWidget(workingHoursColor->label(),ii,0); 1283 topLayout->addWidget(workingHoursColor->label(),ii,0);
1282 topLayout->addWidget(workingHoursColor->button(),ii++,1); 1284 topLayout->addWidget(workingHoursColor->button(),ii++,1);
1283 1285
1284 KPrefsDialogWidBool *sb = 1286 KPrefsDialogWidBool *sb =
1285 addWidBool(i18n("Use colors for application:"), 1287 addWidBool(i18n("Use colors for application:"),
1286 &(KOPrefs::instance()->mUseAppColors),topFrame); 1288 &(KOPrefs::instance()->mUseAppColors),topFrame);
1287 topLayout->addMultiCellWidget(sb->checkBox(), ii, ii, 0,1 ); 1289 topLayout->addMultiCellWidget(sb->checkBox(), ii, ii, 0,1 );
1288 1290
1289 ii++; 1291 ii++;
1290 KPrefsDialogWidColor * workingHoursColor1 = 1292 KPrefsDialogWidColor * workingHoursColor1 =
1291 addWidColor(i18n("Buttons, menus, etc.:"), 1293 addWidColor(i18n("Buttons, menus, etc.:"),
1292 &(KOPrefs::instance()->mAppColor1),topFrame); 1294 &(KOPrefs::instance()->mAppColor1),topFrame);
1293 topLayout->addWidget(workingHoursColor1->label(),ii,0); 1295 topLayout->addWidget(workingHoursColor1->label(),ii,0);
1294 topLayout->addWidget(workingHoursColor1->button(),ii++,1); 1296 topLayout->addWidget(workingHoursColor1->button(),ii++,1);
1295 1297
1296 KPrefsDialogWidColor * workingHoursColor2 = 1298 KPrefsDialogWidColor * workingHoursColor2 =
1297 addWidColor(i18n("Frames, labels, etc.:"), 1299 addWidColor(i18n("Frames, labels, etc.:"),
1298 &(KOPrefs::instance()->mAppColor2),topFrame); 1300 &(KOPrefs::instance()->mAppColor2),topFrame);
1299 topLayout->addWidget(workingHoursColor2->label(),ii,0); 1301 topLayout->addWidget(workingHoursColor2->label(),ii,0);
1300 topLayout->addWidget(workingHoursColor2->button(),ii++,1); 1302 topLayout->addWidget(workingHoursColor2->button(),ii++,1);
1301 1303
1302 1304
1303 1305
1304} 1306}
1305 1307
1306void KOPrefsDialog::setCategoryColor() 1308void KOPrefsDialog::setCategoryColor()
1307{ 1309{
1308 mCategoryDict.replace(mCategoryCombo->currentText(), new QColor(mCategoryButton->color())); 1310 mCategoryDict.replace(mCategoryCombo->currentText(), new QColor(mCategoryButton->color()));
1309} 1311}
1310 1312
1311void KOPrefsDialog::updateCategoryColor() 1313void KOPrefsDialog::updateCategoryColor()
1312{ 1314{
1313 QString cat = mCategoryCombo->currentText(); 1315 QString cat = mCategoryCombo->currentText();
1314 QColor *color = mCategoryDict.find(cat); 1316 QColor *color = mCategoryDict.find(cat);
1315 if (!color) { 1317 if (!color) {
1316 color = KOPrefs::instance()->categoryColor(cat); 1318 color = KOPrefs::instance()->categoryColor(cat);
1317 } 1319 }
1318 if (color) { 1320 if (color) {
1319 mCategoryButton->setColor(*color); 1321 mCategoryButton->setColor(*color);
1320 } 1322 }
1321} 1323}
1322 1324
1323void KOPrefsDialog::setupPrinterTab() 1325void KOPrefsDialog::setupPrinterTab()
1324{ 1326{
1325 mPrinterTab = addPage(i18n("Printing"),0, 1327 mPrinterTab = addPage(i18n("Printing"),0,
1326 DesktopIcon("fileprint",KIcon::SizeMedium)); 1328 DesktopIcon("fileprint",KIcon::SizeMedium));
1327 1329
1328 QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2); 1330 QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2);
1329 topLayout->setSpacing(mSpacingHint); 1331 topLayout->setSpacing(mSpacingHint);
1330 topLayout->setMargin(mMarginHint); 1332 topLayout->setMargin(mMarginHint);
1331 1333
1332 topLayout->setRowStretch(4,1); 1334 topLayout->setRowStretch(4,1);
1333} 1335}
1334 1336
1335void KOPrefsDialog::setupGroupSchedulingTab() 1337void KOPrefsDialog::setupGroupSchedulingTab()
1336{ 1338{
1337#if 0 1339#if 0
1338 QFrame *topFrame = addPage(i18n("Group Scheduling"),0, 1340 QFrame *topFrame = addPage(i18n("Group Scheduling"),0,
1339 DesktopIcon("personal",KIcon::SizeMedium)); 1341 DesktopIcon("personal",KIcon::SizeMedium));
1340 1342
1341 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 1343 QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
1342 topLayout->setSpacing(mSpacingHint); 1344 topLayout->setSpacing(mSpacingHint);
1343 topLayout->setMargin(mMarginHint); 1345 topLayout->setMargin(mMarginHint);
1344 1346
1345#if 0 1347#if 0
1346 KPrefsDialogWidRadios *schedulerGroup = 1348 KPrefsDialogWidRadios *schedulerGroup =
1347 addWidRadios(i18n("Scheduler Mail Client"),&(KOPrefs::instance()->mIMIPScheduler), 1349 addWidRadios(i18n("Scheduler Mail Client"),&(KOPrefs::instance()->mIMIPScheduler),
1348 topFrame); 1350 topFrame);
1349 schedulerGroup->addRadio("Dummy"); // Only for debugging 1351 schedulerGroup->addRadio("Dummy"); // Only for debugging
1350 schedulerGroup->addRadio(i18n("Mail client")); 1352 schedulerGroup->addRadio(i18n("Mail client"));
1351 1353
1352 topLayout->addMultiCellWidget(schedulerGroup->groupBox(),0,0,0,1); 1354 topLayout->addMultiCellWidget(schedulerGroup->groupBox(),0,0,0,1);
1353#endif 1355#endif
1354 1356
1355 KPrefsDialogWidRadios *sendGroup = 1357 KPrefsDialogWidRadios *sendGroup =
1356 addWidRadios(i18n("Scheduler Mails Should Be"),&(KOPrefs::instance()->mIMIPSend), 1358 addWidRadios(i18n("Scheduler Mails Should Be"),&(KOPrefs::instance()->mIMIPSend),
1357 topFrame); 1359 topFrame);
1358 sendGroup->addRadio(i18n("Send to outbox")); 1360 sendGroup->addRadio(i18n("Send to outbox"));
1359 sendGroup->addRadio(i18n("Send directly")); 1361 sendGroup->addRadio(i18n("Send directly"));
1360 1362
1361 topLayout->addMultiCellWidget(sendGroup->groupBox(),1,1,0,1); 1363 topLayout->addMultiCellWidget(sendGroup->groupBox(),1,1,0,1);
1362 1364
1363 topLayout->addMultiCellWidget(new QLabel(i18n("Additional email addresses:"),topFrame),2,2,0,1); 1365 topLayout->addMultiCellWidget(new QLabel(i18n("Additional email addresses:"),topFrame),2,2,0,1);
1364 mAMails = new QListView(topFrame); 1366 mAMails = new QListView(topFrame);
1365 mAMails->addColumn(i18n("Email"),300); 1367 mAMails->addColumn(i18n("Email"),300);
1366 topLayout->addMultiCellWidget(mAMails,3,3,0,1); 1368 topLayout->addMultiCellWidget(mAMails,3,3,0,1);
1367 1369
1368 topLayout->addWidget(new QLabel(i18n("Additional email address:"),topFrame),4,0); 1370 topLayout->addWidget(new QLabel(i18n("Additional email address:"),topFrame),4,0);
1369 aEmailsEdit = new QLineEdit(topFrame); 1371 aEmailsEdit = new QLineEdit(topFrame);
1370 aEmailsEdit->setEnabled(false); 1372 aEmailsEdit->setEnabled(false);
1371 topLayout->addWidget(aEmailsEdit,4,1); 1373 topLayout->addWidget(aEmailsEdit,4,1);
1372 1374
1373 QPushButton *add = new QPushButton(i18n("New"),topFrame,"new"); 1375 QPushButton *add = new QPushButton(i18n("New"),topFrame,"new");
1374 topLayout->addWidget(add,5,0); 1376 topLayout->addWidget(add,5,0);
1375 QPushButton *del = new QPushButton(i18n("Remove"),topFrame,"remove"); 1377 QPushButton *del = new QPushButton(i18n("Remove"),topFrame,"remove");
1376 topLayout->addWidget(del,5,1); 1378 topLayout->addWidget(del,5,1);
1377 1379
1378 //topLayout->setRowStretch(2,1); 1380 //topLayout->setRowStretch(2,1);
1379 connect(add, SIGNAL( clicked() ), this, SLOT(addItem()) ); 1381 connect(add, SIGNAL( clicked() ), this, SLOT(addItem()) );
1380 connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) ); 1382 connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) );
1381 connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem())); 1383 connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem()));
1382 connect(mAMails,SIGNAL(selectionChanged(QListViewItem *)),SLOT(updateInput())); 1384 connect(mAMails,SIGNAL(selectionChanged(QListViewItem *)),SLOT(updateInput()));
1383#endif 1385#endif
1384} 1386}
1385 1387
1386void KOPrefsDialog::setupGroupAutomationTab() 1388void KOPrefsDialog::setupGroupAutomationTab()
1387{ 1389{
1388 return; 1390 return;
1389 QFrame *topFrame = addPage(i18n("Group Automation"),0, 1391 QFrame *topFrame = addPage(i18n("Group Automation"),0,
1390 DesktopIcon("personal",KIcon::SizeMedium)); 1392 DesktopIcon("personal",KIcon::SizeMedium));
1391 1393
1392 QGridLayout *topLayout = new QGridLayout(topFrame,5,1); 1394 QGridLayout *topLayout = new QGridLayout(topFrame,5,1);
1393 topLayout->setSpacing(mSpacingHint); 1395 topLayout->setSpacing(mSpacingHint);
1394 topLayout->setMargin(mMarginHint); 1396 topLayout->setMargin(mMarginHint);
1395 1397
1396 KPrefsDialogWidRadios *autoRefreshGroup = 1398 KPrefsDialogWidRadios *autoRefreshGroup =
1397 addWidRadios(i18n("Auto Send Refresh"), 1399 addWidRadios(i18n("Auto Send Refresh"),
1398 &(KOPrefs::instance()->mIMIPAutoRefresh),topFrame); 1400 &(KOPrefs::instance()->mIMIPAutoRefresh),topFrame);
1399 autoRefreshGroup->addRadio(i18n("Never")); 1401 autoRefreshGroup->addRadio(i18n("Never"));
1400 autoRefreshGroup->addRadio(i18n("If attendee is in addressbook")); 1402 autoRefreshGroup->addRadio(i18n("If attendee is in addressbook"));
1401 //autoRefreshGroup->addRadio(i18n("selected emails")); 1403 //autoRefreshGroup->addRadio(i18n("selected emails"));
1402 topLayout->addMultiCellWidget(autoRefreshGroup->groupBox(),0,0,0,0); 1404 topLayout->addMultiCellWidget(autoRefreshGroup->groupBox(),0,0,0,0);
1403 1405
1404 KPrefsDialogWidRadios *autoInsertGroup = 1406 KPrefsDialogWidRadios *autoInsertGroup =
1405 addWidRadios(i18n("Auto Insert IMIP Replies"), 1407 addWidRadios(i18n("Auto Insert IMIP Replies"),
1406 &(KOPrefs::instance()->mIMIPAutoInsertReply),topFrame); 1408 &(KOPrefs::instance()->mIMIPAutoInsertReply),topFrame);
1407 autoInsertGroup->addRadio(i18n("Never")); 1409 autoInsertGroup->addRadio(i18n("Never"));
1408 autoInsertGroup->addRadio(i18n("If attendee is in addressbook")); 1410 autoInsertGroup->addRadio(i18n("If attendee is in addressbook"));
1409 //autoInsertGroup->addRadio(i18n("selected emails")); 1411 //autoInsertGroup->addRadio(i18n("selected emails"));
1410 topLayout->addMultiCellWidget(autoInsertGroup->groupBox(),1,1,0,0); 1412 topLayout->addMultiCellWidget(autoInsertGroup->groupBox(),1,1,0,0);
1411 1413
1412 KPrefsDialogWidRadios *autoRequestGroup = 1414 KPrefsDialogWidRadios *autoRequestGroup =
1413 addWidRadios(i18n("Auto Insert IMIP Requests"), 1415 addWidRadios(i18n("Auto Insert IMIP Requests"),
1414 &(KOPrefs::instance()->mIMIPAutoInsertRequest),topFrame); 1416 &(KOPrefs::instance()->mIMIPAutoInsertRequest),topFrame);
1415 autoRequestGroup->addRadio(i18n("Never")); 1417 autoRequestGroup->addRadio(i18n("Never"));
1416 autoRequestGroup->addRadio(i18n("If organizer is in addressbook")); 1418 autoRequestGroup->addRadio(i18n("If organizer is in addressbook"));
1417 //autoInsertGroup->addRadio(i18n("selected emails")); 1419 //autoInsertGroup->addRadio(i18n("selected emails"));
1418 topLayout->addMultiCellWidget(autoRequestGroup->groupBox(),2,2,0,0); 1420 topLayout->addMultiCellWidget(autoRequestGroup->groupBox(),2,2,0,0);
1419 1421
1420 KPrefsDialogWidRadios *autoFreeBusyGroup = 1422 KPrefsDialogWidRadios *autoFreeBusyGroup =
1421 addWidRadios(i18n("Auto Send FreeBusy Information"), 1423 addWidRadios(i18n("Auto Send FreeBusy Information"),
1422 &(KOPrefs::instance()->mIMIPAutoFreeBusy),topFrame); 1424 &(KOPrefs::instance()->mIMIPAutoFreeBusy),topFrame);
1423 autoFreeBusyGroup->addRadio(i18n("Never")); 1425 autoFreeBusyGroup->addRadio(i18n("Never"));
1424 autoFreeBusyGroup->addRadio(i18n("If requested from an email in addressbook")); 1426 autoFreeBusyGroup->addRadio(i18n("If requested from an email in addressbook"));
1425 //autoFreeBusyGroup->addRadio(i18n("selected emails")); 1427 //autoFreeBusyGroup->addRadio(i18n("selected emails"));
1426 topLayout->addMultiCellWidget(autoFreeBusyGroup->groupBox(),3,3,0,0); 1428 topLayout->addMultiCellWidget(autoFreeBusyGroup->groupBox(),3,3,0,0);
1427 1429
1428 KPrefsDialogWidRadios *autoFreeBusyReplyGroup = 1430 KPrefsDialogWidRadios *autoFreeBusyReplyGroup =
1429 addWidRadios(i18n("Auto Save FreeBusy Replies"), 1431 addWidRadios(i18n("Auto Save FreeBusy Replies"),
1430 &(KOPrefs::instance()->mIMIPAutoFreeBusyReply),topFrame); 1432 &(KOPrefs::instance()->mIMIPAutoFreeBusyReply),topFrame);
1431 autoFreeBusyReplyGroup->addRadio(i18n("Never")); 1433 autoFreeBusyReplyGroup->addRadio(i18n("Never"));
1432 autoFreeBusyReplyGroup->addRadio(i18n("If attendee is in addressbook")); 1434 autoFreeBusyReplyGroup->addRadio(i18n("If attendee is in addressbook"));
1433 //autoFreeBusyGroup->addRadio(i18n("selected emails")); 1435 //autoFreeBusyGroup->addRadio(i18n("selected emails"));
1434 topLayout->addMultiCellWidget(autoFreeBusyReplyGroup->groupBox(),4,4,0,0); 1436 topLayout->addMultiCellWidget(autoFreeBusyReplyGroup->groupBox(),4,4,0,0);
1435} 1437}
1436 1438
1437void KOPrefsDialog::showPrinterTab() 1439void KOPrefsDialog::showPrinterTab()
1438{ 1440{
1439 showPage(pageIndex(mPrinterTab)); 1441 showPage(pageIndex(mPrinterTab));
1440} 1442}
1441 1443
1442 1444
1443void KOPrefsDialog::setCombo(QComboBox *combo, const QString & text, 1445void KOPrefsDialog::setCombo(QComboBox *combo, const QString & text,
1444 const QStringList *tags) 1446 const QStringList *tags)
1445{ 1447{
1446 if (tags) { 1448 if (tags) {
1447 int i = tags->findIndex(text); 1449 int i = tags->findIndex(text);
1448 if (i > 0) combo->setCurrentItem(i); 1450 if (i > 0) combo->setCurrentItem(i);
1449 } else { 1451 } else {
1450 for(int i=0;i<combo->count();++i) { 1452 for(int i=0;i<combo->count();++i) {
1451 if (combo->text(i) == text) { 1453 if (combo->text(i) == text) {
1452 combo->setCurrentItem(i); 1454 combo->setCurrentItem(i);
1453 break; 1455 break;
1454 } 1456 }
1455 } 1457 }
1456 } 1458 }
1457} 1459}
1458 1460
1459void KOPrefsDialog::usrReadConfig() 1461void KOPrefsDialog::usrReadConfig()
1460{ 1462{
1461 kdelibcfg->readConfig(); 1463 if ( kdelibcfg )
1464 kdelibcfg->readConfig();
1465 else {
1462 mNameEdit->setText(KOPrefs::instance()->fullName()); 1466 mNameEdit->setText(KOPrefs::instance()->fullName());
1463 mEmailEdit->setText(KOPrefs::instance()->email()); 1467 mEmailEdit->setText(KOPrefs::instance()->email());
1464 1468
1465 mAutoSaveIntervalSpin->setValue(KOPrefs::instance()->mAutoSaveInterval); 1469 mAutoSaveIntervalSpin->setValue(KOPrefs::instance()->mAutoSaveInterval);
1466 // QDate current ( 2001, 1,1); 1470 // QDate current ( 2001, 1,1);
1467 //mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); 1471 //mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1));
1468 //mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); 1472 //mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1));
1469 //setCombo(mTimeZoneCombo,i18n(KOPrefs::instance()->mTimeZoneId)); 1473 //setCombo(mTimeZoneCombo,i18n(KOPrefs::instance()->mTimeZoneId));
1470 //mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset); 1474 //mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset);
1471 mStartTimeSpin->setValue(KOPrefs::instance()->mStartTime); 1475 mStartTimeSpin->setValue(KOPrefs::instance()->mStartTime);
1472 mDefaultDurationSpin->setValue(KOPrefs::instance()->mDefaultDuration); 1476 mDefaultDurationSpin->setValue(KOPrefs::instance()->mDefaultDuration);
1473 mAlarmTimeCombo->setCurrentItem(KOPrefs::instance()->mAlarmTime); 1477 mAlarmTimeCombo->setCurrentItem(KOPrefs::instance()->mAlarmTime);
1474 // if (KOPrefs::instance()->mAllDaySize > 47 ) 1478 // if (KOPrefs::instance()->mAllDaySize > 47 )
1475 // KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize/2; 1479 // KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize/2;
1476 //mHourSizeSlider->setValue(KOPrefs::instance()->mAllDaySize); 1480 //mHourSizeSlider->setValue(KOPrefs::instance()->mAllDaySize);
1477 1481
1478 mNextXDaysSpin->setValue(KOPrefs::instance()->mNextXDays); 1482 mNextXDaysSpin->setValue(KOPrefs::instance()->mNextXDays);
1479 mWhatsNextSpin->setValue(KOPrefs::instance()->mWhatsNextDays); 1483 mWhatsNextSpin->setValue(KOPrefs::instance()->mWhatsNextDays);
1480 mPrioSpin->setValue(KOPrefs::instance()->mWhatsNextPrios); 1484 mPrioSpin->setValue(KOPrefs::instance()->mWhatsNextPrios);
1481 // mAMails->clear(); 1485 // mAMails->clear();
1482 // for ( QStringList::Iterator it = KOPrefs::instance()->mAdditionalMails.begin(); 1486 // for ( QStringList::Iterator it = KOPrefs::instance()->mAdditionalMails.begin();
1483// it != KOPrefs::instance()->mAdditionalMails.end(); ++it ) { 1487// it != KOPrefs::instance()->mAdditionalMails.end(); ++it ) {
1484// QListViewItem *item = new QListViewItem(mAMails); 1488// QListViewItem *item = new QListViewItem(mAMails);
1485// item->setText(0,*it); 1489// item->setText(0,*it);
1486// mAMails->insertItem(item); 1490// mAMails->insertItem(item);
1487// } 1491// }
1488 1492
1489 // mRemoteIPEdit->setText(KOPrefs::instance()->mRemoteIP); 1493 // mRemoteIPEdit->setText(KOPrefs::instance()->mRemoteIP);
1490 //mRemoteUser->setText(KOPrefs::instance()->mRemoteUser); 1494 //mRemoteUser->setText(KOPrefs::instance()->mRemoteUser);
1491 //mRemotePassWd->setText(KOPrefs::instance()->mRemotePassWd); 1495 //mRemotePassWd->setText(KOPrefs::instance()->mRemotePassWd);
1492 //mRemoteFile->setText(KOPrefs::instance()->mRemoteFile); 1496 //mRemoteFile->setText(KOPrefs::instance()->mRemoteFile);
1493 1497
1494 //that soundmLocalTempFile->setText(KOPrefs::instance()->mLocalTempFile); 1498 //that soundmLocalTempFile->setText(KOPrefs::instance()->mLocalTempFile);
1495 mDefaultAlarmFile->setText(KOPrefs::instance()->mDefaultAlarmFile); 1499 mDefaultAlarmFile->setText(KOPrefs::instance()->mDefaultAlarmFile);
1496 //QString dummy = KOPrefs::instance()->mUserDateFormatLong; 1500 //QString dummy = KOPrefs::instance()->mUserDateFormatLong;
1497 //mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") )); 1501 //mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") ));
1498 //dummy = KOPrefs::instance()->mUserDateFormatShort; 1502 //dummy = KOPrefs::instance()->mUserDateFormatShort;
1499 //mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") )); 1503 //mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") ));
1500 updateCategories(); 1504 updateCategories();
1501 mAlarmPlayBeeps->setValue(KOPrefs::instance()->mAlarmPlayBeeps ); 1505 mAlarmPlayBeeps->setValue(KOPrefs::instance()->mAlarmPlayBeeps );
1502 mAlarmSuspendTime->setValue(KOPrefs::instance()->mAlarmSuspendTime ); 1506 mAlarmSuspendTime->setValue(KOPrefs::instance()->mAlarmSuspendTime );
1503 mAlarmSuspendCount->setValue(KOPrefs::instance()->mAlarmSuspendCount ); 1507 mAlarmSuspendCount->setValue(KOPrefs::instance()->mAlarmSuspendCount );
1504 mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval ); 1508 mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval );
1509 }
1505} 1510}
1506 1511
1507 1512
1508void KOPrefsDialog::usrWriteConfig() 1513void KOPrefsDialog::usrWriteConfig()
1509{ 1514{
1510 1515 if ( kdelibcfg )
1511 kdelibcfg->writeConfig(); 1516 kdelibcfg->writeConfig();
1517 else {
1512 // KOPrefs::instance()->mRemoteIP = mRemoteIPEdit->text(); 1518 // KOPrefs::instance()->mRemoteIP = mRemoteIPEdit->text();
1513 //KOPrefs::instance()->mRemoteUser = mRemoteUser->text(); 1519 //KOPrefs::instance()->mRemoteUser = mRemoteUser->text();
1514 //KOPrefs::instance()->mRemotePassWd = mRemotePassWd->text(); 1520 //KOPrefs::instance()->mRemotePassWd = mRemotePassWd->text();
1515 //KOPrefs::instance()->mRemoteFile= mRemoteFile->text(); 1521 //KOPrefs::instance()->mRemoteFile= mRemoteFile->text();
1516 //KOPrefs::instance()->mLocalTempFile =mLocalTempFile->text(); 1522 //KOPrefs::instance()->mLocalTempFile =mLocalTempFile->text();
1517 KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text(); 1523 KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text();
1518 1524
1519 //KOPrefs::instance()->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") ); 1525 //KOPrefs::instance()->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") );
1520 //KOPrefs::instance()->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") ); 1526 //KOPrefs::instance()->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") );
1521 KOPrefs::instance()->setFullName(mNameEdit->text()); 1527 KOPrefs::instance()->setFullName(mNameEdit->text());
1522 KOPrefs::instance()->setEmail(mEmailEdit->text()); 1528 KOPrefs::instance()->setEmail(mEmailEdit->text());
1523 1529
1524 KOPrefs::instance()->mAutoSaveInterval = mAutoSaveIntervalSpin->value(); 1530 KOPrefs::instance()->mAutoSaveInterval = mAutoSaveIntervalSpin->value();
1525 1531
1526 // KOPrefs::instance()->mTimeZoneId = mTimeZoneCombo->currentText(); 1532 // KOPrefs::instance()->mTimeZoneId = mTimeZoneCombo->currentText();
1527 //QDate date; 1533 //QDate date;
1528 //date = mStartDateSavingEdit->date(); 1534 //date = mStartDateSavingEdit->date();
1529 //int sub = 0; 1535 //int sub = 0;
1530 //if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) 1536 //if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 )
1531 // sub = 1; 1537 // sub = 1;
1532// KOPrefs::instance()->mDaylightsavingStart = date.dayOfYear()-sub; 1538// KOPrefs::instance()->mDaylightsavingStart = date.dayOfYear()-sub;
1533// date = mEndDateSavingEdit->date(); 1539// date = mEndDateSavingEdit->date();
1534// if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) 1540// if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 )
1535// sub = 1; 1541// sub = 1;
1536// else 1542// else
1537// sub = 0; 1543// sub = 0;
1538// KOPrefs::instance()->mDaylightsavingEnd = date.dayOfYear()-sub; 1544// KOPrefs::instance()->mDaylightsavingEnd = date.dayOfYear()-sub;
1539// // KOPrefs::instance()->mTimeZoneOffset = mTimezoneOffsetSpin->value(); 1545// // KOPrefs::instance()->mTimeZoneOffset = mTimezoneOffsetSpin->value();
1540 1546
1541 KOPrefs::instance()->mStartTime = mStartTimeSpin->value(); 1547 KOPrefs::instance()->mStartTime = mStartTimeSpin->value();
1542 KOPrefs::instance()->mDefaultDuration = mDefaultDurationSpin->value(); 1548 KOPrefs::instance()->mDefaultDuration = mDefaultDurationSpin->value();
1543 KOPrefs::instance()->mAlarmTime = mAlarmTimeCombo->currentItem(); 1549 KOPrefs::instance()->mAlarmTime = mAlarmTimeCombo->currentItem();
1544 1550
1545 //KOPrefs::instance()->mAllDaySize = mHourSizeSlider->value(); 1551 //KOPrefs::instance()->mAllDaySize = mHourSizeSlider->value();
1546 1552
1547 QDictIterator<QColor> it(mCategoryDict); 1553 QDictIterator<QColor> it(mCategoryDict);
1548 while (it.current()) { 1554 while (it.current()) {
1549 KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current()); 1555 KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current());
1550 ++it; 1556 ++it;
1551 } 1557 }
1552 1558
1553 KOPrefs::instance()->mNextXDays = mNextXDaysSpin->value(); 1559 KOPrefs::instance()->mNextXDays = mNextXDaysSpin->value();
1554 KOPrefs::instance()->mWhatsNextDays = mWhatsNextSpin->value(); 1560 KOPrefs::instance()->mWhatsNextDays = mWhatsNextSpin->value();
1555 KOPrefs::instance()->mWhatsNextPrios = mPrioSpin->value(); 1561 KOPrefs::instance()->mWhatsNextPrios = mPrioSpin->value();
1556 1562
1557 KOPrefs::instance()->mAdditionalMails.clear(); 1563 KOPrefs::instance()->mAdditionalMails.clear();
1558 // QListViewItem *item; 1564 // QListViewItem *item;
1559 // item = mAMails->firstChild(); 1565 // item = mAMails->firstChild();
1560 // while (item) 1566 // while (item)
1561 // { 1567 // {
1562 // KOPrefs::instance()->mAdditionalMails.append( item->text(0) ); 1568 // KOPrefs::instance()->mAdditionalMails.append( item->text(0) );
1563 // item = item->nextSibling(); 1569 // item = item->nextSibling();
1564 // } 1570 // }
1565 KOPrefs::instance()->mAlarmPlayBeeps = mAlarmPlayBeeps->value(); 1571 KOPrefs::instance()->mAlarmPlayBeeps = mAlarmPlayBeeps->value();
1566 KOPrefs::instance()->mAlarmSuspendTime = mAlarmSuspendTime->value() ; 1572 KOPrefs::instance()->mAlarmSuspendTime = mAlarmSuspendTime->value() ;
1567 KOPrefs::instance()->mAlarmSuspendCount= mAlarmSuspendCount->value() ; 1573 KOPrefs::instance()->mAlarmSuspendCount= mAlarmSuspendCount->value() ;
1568 KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ; 1574 KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ;
1569 1575 }
1570} 1576}
1571 1577
1572void KOPrefsDialog::updateCategories() 1578void KOPrefsDialog::updateCategories()
1573{ 1579{
1574 mCategoryCombo->clear(); 1580 mCategoryCombo->clear();
1575 mCategoryDict.clear(); 1581 mCategoryDict.clear();
1576 mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); 1582 mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories);
1577 updateCategoryColor(); 1583 updateCategoryColor();
1578} 1584}
1579 1585
1580void KOPrefsDialog::warningGroupScheduling() 1586void KOPrefsDialog::warningGroupScheduling()
1581{ 1587{
1582 warningExperimental(mEnableGroupScheduling->checkBox()->isChecked()); 1588 warningExperimental(mEnableGroupScheduling->checkBox()->isChecked());
1583} 1589}
1584 1590
1585void KOPrefsDialog::warningProjectView() 1591void KOPrefsDialog::warningProjectView()
1586{ 1592{
1587 warningExperimental(mEnableProjectView->checkBox()->isChecked()); 1593 warningExperimental(mEnableProjectView->checkBox()->isChecked());
1588} 1594}
1589 1595
1590void KOPrefsDialog::warningExperimental(bool on) 1596void KOPrefsDialog::warningExperimental(bool on)
1591{ 1597{
1592 if (on) { 1598 if (on) {
1593 KMessageBox::information(this,i18n("This is an experimental feature. " 1599 KMessageBox::information(this,i18n("This is an experimental feature. "
1594 "It may not work, it may do nothing useful and it may cause data loss. " 1600 "It may not work, it may do nothing useful and it may cause data loss. "
1595 "Use with care.\n" 1601 "Use with care.\n"
1596 "You have to restart KOrganizer for this setting to take effect.")); 1602 "You have to restart KOrganizer for this setting to take effect."));
1597 } else { 1603 } else {
1598 KMessageBox::information(this, 1604 KMessageBox::information(this,
1599 i18n("You have to restart KOrganizer for this setting to take effect.")); 1605 i18n("You have to restart KOrganizer for this setting to take effect."));
1600 } 1606 }
1601} 1607}
1602 1608
1603void KOPrefsDialog::toggleEmailSettings(bool on) 1609void KOPrefsDialog::toggleEmailSettings(bool on)
1604{ 1610{
1605 if (on) { 1611 if (on) {
1606 mEmailEdit->setEnabled(false); 1612 mEmailEdit->setEnabled(false);
1607 mNameEdit->setEnabled(false); 1613 mNameEdit->setEnabled(false);
1608 mEmailLabel->setEnabled(false); 1614 mEmailLabel->setEnabled(false);
1609 mNameLabel->setEnabled(false); 1615 mNameLabel->setEnabled(false);
1610 1616
1611 KEMailSettings settings; 1617 KEMailSettings settings;
1612 mNameEdit->setText(settings.getSetting(KEMailSettings::RealName)); 1618 mNameEdit->setText(settings.getSetting(KEMailSettings::RealName));
1613 mEmailEdit->setText(settings.getSetting(KEMailSettings::EmailAddress)); 1619 mEmailEdit->setText(settings.getSetting(KEMailSettings::EmailAddress));
1614 } else { 1620 } else {
1615 mEmailEdit->setEnabled(true); 1621 mEmailEdit->setEnabled(true);
1616 mNameEdit->setEnabled(true); 1622 mNameEdit->setEnabled(true);
1617 mEmailLabel->setEnabled(true); 1623 mEmailLabel->setEnabled(true);
1618 mNameLabel->setEnabled(true); 1624 mNameLabel->setEnabled(true);
1619 } 1625 }
1620} 1626}
1621 1627
1622void KOPrefsDialog::addItem() 1628void KOPrefsDialog::addItem()
1623{ 1629{
1624 // aEmailsEdit->setEnabled(true); 1630 // aEmailsEdit->setEnabled(true);
1625// QListViewItem *item = new QListViewItem(mAMails); 1631// QListViewItem *item = new QListViewItem(mAMails);
1626// mAMails->insertItem(item); 1632// mAMails->insertItem(item);
1627// mAMails->setSelected(item,true); 1633// mAMails->setSelected(item,true);
1628// aEmailsEdit->setText(i18n("(EmptyEmail)")); 1634// aEmailsEdit->setText(i18n("(EmptyEmail)"));
1629} 1635}
1630 1636
1631void KOPrefsDialog::removeItem() 1637void KOPrefsDialog::removeItem()
1632{ 1638{
1633// QListViewItem *item; 1639// QListViewItem *item;
1634// item = mAMails->selectedItem(); 1640// item = mAMails->selectedItem();
1635// if (!item) return; 1641// if (!item) return;
1636// mAMails->takeItem(item); 1642// mAMails->takeItem(item);
1637// item = mAMails->selectedItem(); 1643// item = mAMails->selectedItem();
1638// if (!item) { 1644// if (!item) {
1639// aEmailsEdit->setText(""); 1645// aEmailsEdit->setText("");
1640// aEmailsEdit->setEnabled(false); 1646// aEmailsEdit->setEnabled(false);
1641// } 1647// }
1642// if (mAMails->childCount() == 0) { 1648// if (mAMails->childCount() == 0) {
1643// aEmailsEdit->setEnabled(false); 1649// aEmailsEdit->setEnabled(false);
1644// } 1650// }
1645} 1651}
1646 1652
1647void KOPrefsDialog::updateItem() 1653void KOPrefsDialog::updateItem()
1648{ 1654{
1649 // QListViewItem *item; 1655 // QListViewItem *item;
1650// item = mAMails->selectedItem(); 1656// item = mAMails->selectedItem();
1651// if (!item) return; 1657// if (!item) return;
1652// item->setText(0,aEmailsEdit->text()); 1658// item->setText(0,aEmailsEdit->text());
1653} 1659}
1654 1660
1655void KOPrefsDialog::updateInput() 1661void KOPrefsDialog::updateInput()
1656{ 1662{
1657// QListViewItem *item; 1663// QListViewItem *item;
1658// item = mAMails->selectedItem(); 1664// item = mAMails->selectedItem();
1659// if (!item) return; 1665// if (!item) return;
1660// aEmailsEdit->setEnabled(true); 1666// aEmailsEdit->setEnabled(true);
1661// aEmailsEdit->setText(item->text(0)); 1667// aEmailsEdit->setText(item->text(0));
1662} 1668}
1663void KOPrefsDialog::updateTimezoneOffset( int index ) 1669void KOPrefsDialog::updateTimezoneOffset( int index )
1664{ 1670{
1665 /* 1671 /*
1666 qDebug("updateTimezoneOffset %d ", index); 1672 qDebug("updateTimezoneOffset %d ", index);
1667 if ( index < 24 ) { 1673 if ( index < 24 ) {
1668 mTimezoneOffsetSpin->setEnabled ( false ); 1674 mTimezoneOffsetSpin->setEnabled ( false );
1669 mTimezoneOffsetSpin->setValue( ( index-11 ) * 60 ); 1675 mTimezoneOffsetSpin->setValue( ( index-11 ) * 60 );
1670 1676
1671 1677
1672 } else { 1678 } else {
1673 if ( index == 24 ) { 1679 if ( index == 24 ) {
1674 mTimezoneOffsetSpin->setEnabled ( true ); 1680 mTimezoneOffsetSpin->setEnabled ( true );
1675 mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset); 1681 mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset);
1676 1682
1677 } else { 1683 } else {
1678 mTimezoneOffsetSpin->setEnabled ( false ); 1684 mTimezoneOffsetSpin->setEnabled ( false );
1679 mTimezoneOffsetSpin->setValue( 0 ); 1685 mTimezoneOffsetSpin->setValue( 0 );
1680 } 1686 }
1681 } 1687 }
1682 */ 1688 */
1683} 1689}
1684 1690
1685void KOPrefsDialog::setupTimeZoneTab() 1691void KOPrefsDialog::setupTimeZoneTab()
1686{ 1692{
1687#if 0 1693#if 0
1688 QFrame *topFrame = addPage(i18n("Time Zone"),0,0); 1694 QFrame *topFrame = addPage(i18n("Time Zone"),0,0);
1689 // DesktopIcon("clock",KIcon::SizeMedium)); 1695 // DesktopIcon("clock",KIcon::SizeMedium));
1690 1696
1691 QGridLayout *topLayout = new QGridLayout(topFrame,5,2); 1697 QGridLayout *topLayout = new QGridLayout(topFrame,5,2);
1692 topLayout->setSpacing(mSpacingHint); 1698 topLayout->setSpacing(mSpacingHint);
1693 topLayout->setMargin(mMarginHint); 1699 topLayout->setMargin(mMarginHint);
1694 1700
1695 QHBox *timeZoneBox = new QHBox( topFrame ); 1701 QHBox *timeZoneBox = new QHBox( topFrame );
1696 topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); 1702 topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 );
1697 1703
1698 new QLabel( i18n("Timezone:"), timeZoneBox ); 1704 new QLabel( i18n("Timezone:"), timeZoneBox );
1699 mTimeZoneCombo = new QComboBox( timeZoneBox ); 1705 mTimeZoneCombo = new QComboBox( timeZoneBox );
1700 if ( QApplication::desktop()->width() < 300 ) { 1706 if ( QApplication::desktop()->width() < 300 ) {
1701 mTimeZoneCombo->setMaximumWidth(150); 1707 mTimeZoneCombo->setMaximumWidth(150);
1702 } 1708 }
1703 1709
1704 QStringList list; 1710 QStringList list;
1705 list = KGlobal::locale()->timeZoneList(); 1711 list = KGlobal::locale()->timeZoneList();
1706 mTimeZoneCombo->insertStringList(list); 1712 mTimeZoneCombo->insertStringList(list);
1707 1713
1708 // find the currently set time zone and select it 1714 // find the currently set time zone and select it
1709 QString sCurrentlySet = KOPrefs::instance()->mTimeZoneId; 1715 QString sCurrentlySet = KOPrefs::instance()->mTimeZoneId;
1710 int nCurrentlySet = 11; 1716 int nCurrentlySet = 11;
1711 for (int i = 0; i < mTimeZoneCombo->count(); i++) 1717 for (int i = 0; i < mTimeZoneCombo->count(); i++)
1712 { 1718 {
1713 if (mTimeZoneCombo->text(i) == sCurrentlySet) 1719 if (mTimeZoneCombo->text(i) == sCurrentlySet)
1714 { 1720 {
1715 nCurrentlySet = i; 1721 nCurrentlySet = i;
1716 break; 1722 break;
1717 } 1723 }
1718 } 1724 }
1719 mTimeZoneCombo->setCurrentItem(nCurrentlySet); 1725 mTimeZoneCombo->setCurrentItem(nCurrentlySet);
1720 int iii = 1; 1726 int iii = 1;
1721 KPrefsDialogWidBool *sb = 1727 KPrefsDialogWidBool *sb =
1722 addWidBool(i18n("Timezone has daylight saving"), 1728 addWidBool(i18n("Timezone has daylight saving"),
1723 &(KOPrefs::instance()->mUseDaylightsaving),topFrame); 1729 &(KOPrefs::instance()->mUseDaylightsaving),topFrame);
1724 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 1730 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
1725 ++iii; 1731 ++iii;
1726 QLabel* lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame ); 1732 QLabel* lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame );
1727 topLayout->addMultiCellWidget(lab, iii,iii,0,1); 1733 topLayout->addMultiCellWidget(lab, iii,iii,0,1);
1728 ++iii; 1734 ++iii;
1729 lab = new QLabel( i18n("The year in the date is ignored."), topFrame ); 1735 lab = new QLabel( i18n("The year in the date is ignored."), topFrame );
1730 topLayout->addMultiCellWidget(lab, iii,iii,0,1); 1736 topLayout->addMultiCellWidget(lab, iii,iii,0,1);
1731 ++iii; 1737 ++iii;
1732 lab = new QLabel( i18n("Daylight start:"), topFrame ); 1738 lab = new QLabel( i18n("Daylight start:"), topFrame );
1733 topLayout->addWidget(lab, iii,0); 1739 topLayout->addWidget(lab, iii,0);
1734 mStartDateSavingEdit = new KDateEdit(topFrame); 1740 mStartDateSavingEdit = new KDateEdit(topFrame);
1735 topLayout->addWidget(mStartDateSavingEdit, iii,1); 1741 topLayout->addWidget(mStartDateSavingEdit, iii,1);
1736 ++iii; 1742 ++iii;
1737 1743
1738 lab = new QLabel( i18n("Daylight end:"), topFrame ); 1744 lab = new QLabel( i18n("Daylight end:"), topFrame );
1739 topLayout->addWidget(lab, iii,0); 1745 topLayout->addWidget(lab, iii,0);
1740 mEndDateSavingEdit = new KDateEdit(topFrame); 1746 mEndDateSavingEdit = new KDateEdit(topFrame);
1741 topLayout->addWidget(mEndDateSavingEdit, iii,1); 1747 topLayout->addWidget(mEndDateSavingEdit, iii,1);
1742 ++iii; 1748 ++iii;
1743 QDate current ( 2001, 1,1); 1749 QDate current ( 2001, 1,1);
1744 mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); 1750 mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1));
1745 mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); 1751 mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1));
1746#endif 1752#endif
1747 1753
1748} 1754}
1749 1755
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 25e76ee..2c04852 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -535,388 +535,393 @@ void MainWindow::recieve( const QCString& cmsg, const QByteArray& data )
535 allmsg = allmsg.mid( nextC, allmsg.length()-nextC ); 535 allmsg = allmsg.mid( nextC, allmsg.length()-nextC );
536 } 536 }
537 //qDebug("msg: %s all: %s ", msg.latin1(), allmsg.latin1() ); 537 //qDebug("msg: %s all: %s ", msg.latin1(), allmsg.latin1() );
538 if ( msg == "-newEvent" ) { 538 if ( msg == "-newEvent" ) {
539 mView->newEvent(); 539 mView->newEvent();
540 } 540 }
541 if ( msg == "-newTodo" ) { 541 if ( msg == "-newTodo" ) {
542 mView->newTodo(); 542 mView->newTodo();
543 543
544 } 544 }
545 if ( msg == "-showWN" ) { 545 if ( msg == "-showWN" ) {
546 mView->viewManager()->showWhatsNextView(); 546 mView->viewManager()->showWhatsNextView();
547 } 547 }
548 if ( msg == "-showTodo" ) { 548 if ( msg == "-showTodo" ) {
549 mView->viewManager()->showTodoView(); 549 mView->viewManager()->showTodoView();
550 } 550 }
551 if ( msg == "-showList" ) { 551 if ( msg == "-showList" ) {
552 mView->viewManager()->showListView(); 552 mView->viewManager()->showListView();
553 } 553 }
554 else if ( msg == "-showDay" ) { 554 else if ( msg == "-showDay" ) {
555 mView->viewManager()->showDayView(); 555 mView->viewManager()->showDayView();
556 } 556 }
557 else if ( msg == "-showWWeek" ) { 557 else if ( msg == "-showWWeek" ) {
558 mView->viewManager()->showWorkWeekView(); 558 mView->viewManager()->showWorkWeekView();
559 } 559 }
560 else if ( msg == "-ringSync" ) { 560 else if ( msg == "-ringSync" ) {
561 mSyncManager->multiSync( false ); 561 mSyncManager->multiSync( false );
562 } 562 }
563 else if ( msg == "-showWeek" ) { 563 else if ( msg == "-showWeek" ) {
564 mView->viewManager()->showWeekView(); 564 mView->viewManager()->showWeekView();
565 } 565 }
566 else if ( msg == "-showTodo" ) { 566 else if ( msg == "-showTodo" ) {
567 mView->viewManager()->showTodoView(); 567 mView->viewManager()->showTodoView();
568 } 568 }
569 else if ( msg == "-showJournal" ) { 569 else if ( msg == "-showJournal" ) {
570 mView->dateNavigator()->selectDates( 1 ); 570 mView->dateNavigator()->selectDates( 1 );
571 mView->dateNavigator()->selectToday(); 571 mView->dateNavigator()->selectToday();
572 mView->viewManager()->showJournalView(); 572 mView->viewManager()->showJournalView();
573 } 573 }
574 else if ( msg == "-showKO" ) { 574 else if ( msg == "-showKO" ) {
575 mView->viewManager()->showNextXView(); 575 mView->viewManager()->showNextXView();
576 } 576 }
577 else if ( msg == "-showWNext" ) { 577 else if ( msg == "-showWNext" ) {
578 mView->viewManager()->showWhatsNextView(); 578 mView->viewManager()->showWhatsNextView();
579 } 579 }
580 else if ( msg == "nextView()" ) { 580 else if ( msg == "nextView()" ) {
581 mView->viewManager()->showNextView(); 581 mView->viewManager()->showNextView();
582 } 582 }
583 else if ( msg == "-showNextXView" ) { 583 else if ( msg == "-showNextXView" ) {
584 mView->viewManager()->showNextXView(); 584 mView->viewManager()->showNextXView();
585 } 585 }
586 586
587 587
588 } 588 }
589 589
590 showMaximized(); 590 showMaximized();
591 raise(); 591 raise();
592} 592}
593 593
594QPixmap MainWindow::loadPixmap( QString name ) 594QPixmap MainWindow::loadPixmap( QString name )
595{ 595{
596 return SmallIcon( name ); 596 return SmallIcon( name );
597 597
598} 598}
599void MainWindow::setUsesBigPixmaps ( bool b ) 599void MainWindow::setUsesBigPixmaps ( bool b )
600{ 600{
601 qDebug("KO: MainWindow::setUsesBigPixmaps %d called", b); 601 qDebug("KO: MainWindow::setUsesBigPixmaps %d called", b);
602 if ( b ) 602 if ( b )
603 qDebug("KO: BigPixmaps are not supported "); 603 qDebug("KO: BigPixmaps are not supported ");
604} 604}
605void MainWindow::initActions() 605void MainWindow::initActions()
606{ 606{
607 //KOPrefs::instance()->mShowFullMenu 607 //KOPrefs::instance()->mShowFullMenu
608 iconToolBar->clear(); 608 iconToolBar->clear();
609 KOPrefs *p = KOPrefs::instance(); 609 KOPrefs *p = KOPrefs::instance();
610 //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar ); 610 //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar );
611 611
612 QPopupMenu *viewMenu = new QPopupMenu( this ); 612 QPopupMenu *viewMenu = new QPopupMenu( this );
613 QPopupMenu *actionMenu = new QPopupMenu( this ); 613 QPopupMenu *actionMenu = new QPopupMenu( this );
614 QPopupMenu *importMenu = new QPopupMenu( this ); 614 QPopupMenu *importMenu = new QPopupMenu( this );
615 QPopupMenu *importMenu_X = new QPopupMenu( this ); 615 QPopupMenu *importMenu_X = new QPopupMenu( this );
616 QPopupMenu *exportMenu_X = new QPopupMenu( this ); 616 QPopupMenu *exportMenu_X = new QPopupMenu( this );
617 QPopupMenu *beamMenu_X = new QPopupMenu( this ); 617 QPopupMenu *beamMenu_X = new QPopupMenu( this );
618 selectFilterMenu = new QPopupMenu( this ); 618 selectFilterMenu = new QPopupMenu( this );
619 selectFilterMenu->setCheckable( true ); 619 selectFilterMenu->setCheckable( true );
620 syncMenu = new QPopupMenu( this ); 620 syncMenu = new QPopupMenu( this );
621 configureAgendaMenu = new QPopupMenu( this ); 621 configureAgendaMenu = new QPopupMenu( this );
622 configureToolBarMenu = new QPopupMenu( this ); 622 configureToolBarMenu = new QPopupMenu( this );
623 QPopupMenu *helpMenu = new QPopupMenu( this ); 623 QPopupMenu *helpMenu = new QPopupMenu( this );
624 QIconSet icon; 624 QIconSet icon;
625 int pixWid = 22, pixHei = 22; 625 int pixWid = 22, pixHei = 22;
626 QString pathString = ""; 626 QString pathString = "";
627 if ( !p->mToolBarMiniIcons ) { 627 if ( !p->mToolBarMiniIcons ) {
628 if ( QApplication::desktop()->width() < 480 ) { 628 if ( QApplication::desktop()->width() < 480 ) {
629 pathString += "icons16/"; 629 pathString += "icons16/";
630 pixWid = 18; pixHei = 16; 630 pixWid = 18; pixHei = 16;
631 } 631 }
632 } else { 632 } else {
633 pathString += "iconsmini/"; 633 pathString += "iconsmini/";
634 pixWid = 18; pixHei = 16; 634 pixWid = 18; pixHei = 16;
635 } 635 }
636 if ( KOPrefs::instance()->mShowFullMenu ) { 636 if ( KOPrefs::instance()->mShowFullMenu ) {
637 QMenuBar *menuBar1; 637 QMenuBar *menuBar1;
638 menuBar1 = menuBar(); 638 menuBar1 = menuBar();
639 menuBar1->insertItem( i18n("File"), importMenu ); 639 menuBar1->insertItem( i18n("File"), importMenu );
640 menuBar1->insertItem( i18n("View"), viewMenu ); 640 menuBar1->insertItem( i18n("View"), viewMenu );
641 menuBar1->insertItem( i18n("Actions"), actionMenu ); 641 menuBar1->insertItem( i18n("Actions"), actionMenu );
642#ifdef DESKTOP_VERSION 642#ifdef DESKTOP_VERSION
643 menuBar1->insertItem( i18n("Synchronize"), syncMenu ); 643 menuBar1->insertItem( i18n("Synchronize"), syncMenu );
644 menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu ); 644 menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu );
645#else 645#else
646 menuBar1->insertItem( i18n("Sync"), syncMenu ); 646 menuBar1->insertItem( i18n("Sync"), syncMenu );
647 menuBar1->insertItem( i18n("Agenda"),configureAgendaMenu ); 647 menuBar1->insertItem( i18n("Agenda"),configureAgendaMenu );
648#endif 648#endif
649 //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu ); 649 //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu );
650 menuBar1->insertItem( i18n("Filter"),selectFilterMenu ); 650 menuBar1->insertItem( i18n("Filter"),selectFilterMenu );
651 menuBar1->insertItem( i18n("Help"), helpMenu ); 651 menuBar1->insertItem( i18n("Help"), helpMenu );
652 } else { 652 } else {
653 QPEMenuBar *menuBar1; 653 QPEMenuBar *menuBar1;
654 menuBar1 = new QPEMenuBar( iconToolBar ); 654 menuBar1 = new QPEMenuBar( iconToolBar );
655 QPopupMenu *menuBar = new QPopupMenu( this ); 655 QPopupMenu *menuBar = new QPopupMenu( this );
656 icon = loadPixmap( pathString + "z_menu" ); 656 icon = loadPixmap( pathString + "z_menu" );
657 menuBar1->insertItem( icon.pixmap(), menuBar); 657 menuBar1->insertItem( icon.pixmap(), menuBar);
658 //menuBar1->insertItem( i18n("ME"), menuBar); 658 //menuBar1->insertItem( i18n("ME"), menuBar);
659 menuBar->insertItem( i18n("File"), importMenu ); 659 menuBar->insertItem( i18n("File"), importMenu );
660 menuBar->insertItem( i18n("View"), viewMenu ); 660 menuBar->insertItem( i18n("View"), viewMenu );
661 menuBar->insertItem( i18n("Actions"), actionMenu ); 661 menuBar->insertItem( i18n("Actions"), actionMenu );
662 menuBar->insertItem( i18n("Synchronize"), syncMenu ); 662 menuBar->insertItem( i18n("Synchronize"), syncMenu );
663 menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu ); 663 menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu );
664 menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); 664 menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu );
665 menuBar->insertItem( i18n("Filter"),selectFilterMenu ); 665 menuBar->insertItem( i18n("Filter"),selectFilterMenu );
666 menuBar->insertItem( i18n("Help"), helpMenu ); 666 menuBar->insertItem( i18n("Help"), helpMenu );
667 //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); 667 //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() );
668 menuBar1->setMaximumSize( menuBar1->sizeHint( )); 668 menuBar1->setMaximumSize( menuBar1->sizeHint( ));
669 } 669 }
670 connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); 670 connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) );
671 connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) ); 671 connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) );
672 672
673 673
674 mWeekBgColor = iconToolBar->backgroundColor(); 674 mWeekBgColor = iconToolBar->backgroundColor();
675 mWeekPixmap.resize( pixWid , pixHei ); 675 mWeekPixmap.resize( pixWid , pixHei );
676 mWeekPixmap.fill( mWeekBgColor ); 676 mWeekPixmap.fill( mWeekBgColor );
677 icon = mWeekPixmap; 677 icon = mWeekPixmap;
678 mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this ); 678 mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this );
679 if ( p-> mShowIconWeekNum ) 679 if ( p-> mShowIconWeekNum )
680 mWeekAction->addTo( iconToolBar ); 680 mWeekAction->addTo( iconToolBar );
681 mWeekFont = font(); 681 mWeekFont = font();
682 682
683 int fontPoint = mWeekFont.pointSize(); 683 int fontPoint = mWeekFont.pointSize();
684 QFontMetrics f( mWeekFont ); 684 QFontMetrics f( mWeekFont );
685 int fontWid = f.width( "30" ); 685 int fontWid = f.width( "30" );
686 while ( fontWid > pixWid ) { 686 while ( fontWid > pixWid ) {
687 --fontPoint; 687 --fontPoint;
688 mWeekFont.setPointSize( fontPoint ); 688 mWeekFont.setPointSize( fontPoint );
689 QFontMetrics f( mWeekFont ); 689 QFontMetrics f( mWeekFont );
690 fontWid = f.width( "30" ); 690 fontWid = f.width( "30" );
691 //qDebug("dec-- "); 691 //qDebug("dec-- ");
692 } 692 }
693 693
694 connect( mWeekAction, SIGNAL( activated() ), 694 connect( mWeekAction, SIGNAL( activated() ),
695 this, SLOT( weekAction() ) ); 695 this, SLOT( weekAction() ) );
696 696
697 connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) ); 697 connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) );
698 if ( p->mShowIconFilterview ) { 698 if ( p->mShowIconFilterview ) {
699 icon = loadPixmap( pathString + "filter" ); 699 icon = loadPixmap( pathString + "filter" );
700 actionFilterMenuTB = new QAction( i18n("Filter selector"), icon, i18n("Filter selector"), 0, this ); 700 actionFilterMenuTB = new QAction( i18n("Filter selector"), icon, i18n("Filter selector"), 0, this );
701 connect( actionFilterMenuTB, SIGNAL( activated() ), 701 connect( actionFilterMenuTB, SIGNAL( activated() ),
702 this, SLOT( fillFilterMenuTB() ) ); 702 this, SLOT( fillFilterMenuTB() ) );
703 actionFilterMenuTB->addTo( iconToolBar ); 703 actionFilterMenuTB->addTo( iconToolBar );
704 selectFilterMenuTB = new QPopupMenu( this ); 704 selectFilterMenuTB = new QPopupMenu( this );
705 selectFilterMenuTB->setCheckable( true ); 705 selectFilterMenuTB->setCheckable( true );
706 connect ( selectFilterMenuTB, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); 706 connect ( selectFilterMenuTB, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) );
707 } 707 }
708 708
709 //#endif 709 //#endif
710 // ****************** 710 // ******************
711 QAction *action; 711 QAction *action;
712 // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); 712 // QPopupMenu *configureMenu= new QPopupMenu( menuBar );
713 configureToolBarMenu->setCheckable( true ); 713 configureToolBarMenu->setCheckable( true );
714 714
715 715
716 configureAgendaMenu->setCheckable( true ); 716 configureAgendaMenu->setCheckable( true );
717 int iii ; 717 int iii ;
718 for ( iii = 1;iii<= 10 ;++iii ){ 718 for ( iii = 1;iii<= 10 ;++iii ){
719 configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 ); 719 configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 );
720 } 720 }
721 //configureMenu->insertItem( "AgendaSize",configureAgendaMenu ); 721 //configureMenu->insertItem( "AgendaSize",configureAgendaMenu );
722 722
723 connect( configureAgendaMenu, SIGNAL( aboutToShow()), 723 connect( configureAgendaMenu, SIGNAL( aboutToShow()),
724 this, SLOT( showConfigureAgenda( ) ) ); 724 this, SLOT( showConfigureAgenda( ) ) );
725 725
726 icon = loadPixmap( pathString + "configure" ); 726 icon = loadPixmap( pathString + "configure" );
727 action = new QAction( i18n("Configure"),icon, i18n("Configure..."), 0, this ); 727 action = new QAction( i18n("Configure"),icon, i18n("Configure KO/Pi..."), 0, this );
728 action->addTo( actionMenu ); 728 action->addTo( actionMenu );
729 connect( action, SIGNAL( activated() ), 729 connect( action, SIGNAL( activated() ),
730 mView, SLOT( edit_options() ) ); 730 mView, SLOT( edit_options() ) );
731 icon = loadPixmap( pathString + "configure" );
732 action = new QAction( i18n("Configure"),icon, i18n("Global Settings..."), 0, this );
733 action->addTo( actionMenu );
734 connect( action, SIGNAL( activated() ),
735 mView, SLOT( edit_global_options() ) );
731 actionMenu->insertSeparator(); 736 actionMenu->insertSeparator();
732 737
733 action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); 738 action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this );
734 action->addTo( actionMenu ); 739 action->addTo( actionMenu );
735 connect( action, SIGNAL( activated() ), 740 connect( action, SIGNAL( activated() ),
736 mView, SLOT( undo_delete() ) ); 741 mView, SLOT( undo_delete() ) );
737 actionMenu->insertSeparator(); 742 actionMenu->insertSeparator();
738 743
739 icon = loadPixmap( pathString + "newevent" ); 744 icon = loadPixmap( pathString + "newevent" );
740 configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); 745 configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 );
741 configureToolBarMenu->insertItem(i18n("Only one toolbar"), 6 ); 746 configureToolBarMenu->insertItem(i18n("Only one toolbar"), 6 );
742 configureToolBarMenu->insertSeparator(); 747 configureToolBarMenu->insertSeparator();
743 configureToolBarMenu->insertItem(i18n("Filtermenu"), 7 ); 748 configureToolBarMenu->insertItem(i18n("Filtermenu"), 7 );
744 configureToolBarMenu->insertSeparator(); 749 configureToolBarMenu->insertSeparator();
745 configureToolBarMenu->insertItem(i18n("Week Number"), 400); 750 configureToolBarMenu->insertItem(i18n("Week Number"), 400);
746 configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); 751 configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 );
747 QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); 752 QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this );
748 ne_action->addTo( actionMenu ); 753 ne_action->addTo( actionMenu );
749 connect( ne_action, SIGNAL( activated() ), 754 connect( ne_action, SIGNAL( activated() ),
750 mView, SLOT( newEvent() ) ); 755 mView, SLOT( newEvent() ) );
751 icon = loadPixmap( pathString + "newtodo" ); 756 icon = loadPixmap( pathString + "newtodo" );
752 configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); 757 configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 );
753 QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); 758 QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this );
754 nt_action->addTo( actionMenu ); 759 nt_action->addTo( actionMenu );
755 connect( nt_action, SIGNAL( activated() ), 760 connect( nt_action, SIGNAL( activated() ),
756 mView, SLOT( newTodo() ) ); 761 mView, SLOT( newTodo() ) );
757 762
758 icon = loadPixmap( pathString + "today" ); 763 icon = loadPixmap( pathString + "today" );
759 QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); 764 QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this );
760 today_action->addTo( viewMenu ); 765 today_action->addTo( viewMenu );
761 connect( today_action, SIGNAL( activated() ), 766 connect( today_action, SIGNAL( activated() ),
762 mView, SLOT( goToday() ) ); 767 mView, SLOT( goToday() ) );
763 viewMenu->insertSeparator(); 768 viewMenu->insertSeparator();
764 769
765 // *********************** 770 // ***********************
766 if ( KOPrefs::instance()->mVerticalScreen ) { 771 if ( KOPrefs::instance()->mVerticalScreen ) {
767 icon = SmallIcon( "1updownarrow" ); 772 icon = SmallIcon( "1updownarrow" );
768 } else { 773 } else {
769 icon = SmallIcon("1leftrightarrow" ); 774 icon = SmallIcon("1leftrightarrow" );
770 } 775 }
771 configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 ); 776 configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 );
772 QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this ); 777 QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this );
773 FSaction->addTo( viewMenu ); 778 FSaction->addTo( viewMenu );
774 connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() )); 779 connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() ));
775 780
776 icon = loadPixmap( pathString + "navi" ); 781 icon = loadPixmap( pathString + "navi" );
777 configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 ); 782 configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 );
778 action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); 783 action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this );
779 action->addTo( viewMenu ); 784 action->addTo( viewMenu );
780 connect( action, SIGNAL( activated() ), 785 connect( action, SIGNAL( activated() ),
781 mView, SLOT( toggleDateNavigatorWidget() ) ); 786 mView, SLOT( toggleDateNavigatorWidget() ) );
782 mToggleNav = action ; 787 mToggleNav = action ;
783 icon = loadPixmap( pathString + "filter" ); 788 icon = loadPixmap( pathString + "filter" );
784 configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 ); 789 configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 );
785 action = new QAction( i18n("Toggle FilterView"), icon, i18n("Toggle FilterView"), 0, this ); 790 action = new QAction( i18n("Toggle FilterView"), icon, i18n("Toggle FilterView"), 0, this );
786 action->addTo( viewMenu ); 791 action->addTo( viewMenu );
787 connect( action, SIGNAL( activated() ), 792 connect( action, SIGNAL( activated() ),
788 mView, SLOT( toggleFilter() ) ); 793 mView, SLOT( toggleFilter() ) );
789 mToggleFilter = action; 794 mToggleFilter = action;
790 icon = loadPixmap( pathString + "allday" ); 795 icon = loadPixmap( pathString + "allday" );
791 configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 ); 796 configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 );
792 action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); 797 action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this );
793 action->addTo( viewMenu ); 798 action->addTo( viewMenu );
794 connect( action, SIGNAL( activated() ), 799 connect( action, SIGNAL( activated() ),
795 mView, SLOT( toggleAllDaySize() ) ); 800 mView, SLOT( toggleAllDaySize() ) );
796 mToggleAllday = action; 801 mToggleAllday = action;
797 802
798 803
799 connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), 804 connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ),
800 mToggleNav, SLOT( setEnabled ( bool ) ) ); 805 mToggleNav, SLOT( setEnabled ( bool ) ) );
801 connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), 806 connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ),
802 mToggleFilter, SLOT( setEnabled ( bool ) ) ); 807 mToggleFilter, SLOT( setEnabled ( bool ) ) );
803 connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), 808 connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ),
804 mToggleAllday, SLOT( setEnabled ( bool ) ) ); 809 mToggleAllday, SLOT( setEnabled ( bool ) ) );
805 // connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), 810 // connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ),
806 // configureAgendaMenu, SLOT( setEnabled ( bool ) ) ); 811 // configureAgendaMenu, SLOT( setEnabled ( bool ) ) );
807 812
808 viewMenu->insertSeparator(); 813 viewMenu->insertSeparator();
809 icon = loadPixmap( pathString + "picker" ); 814 icon = loadPixmap( pathString + "picker" );
810 action = new QAction( i18n("Date Picker"), icon, i18n("Date Picker"), 0, this ); 815 action = new QAction( i18n("Date Picker"), icon, i18n("Date Picker"), 0, this );
811 action->addTo( viewMenu ); 816 action->addTo( viewMenu );
812 connect( action, SIGNAL( activated() ), 817 connect( action, SIGNAL( activated() ),
813 mView, SLOT( showDatePicker() ) ); 818 mView, SLOT( showDatePicker() ) );
814 action->addTo( iconToolBar ); 819 action->addTo( iconToolBar );
815 viewMenu->insertSeparator(); 820 viewMenu->insertSeparator();
816 821
817 if ( p-> mShowIconToggleFull ) 822 if ( p-> mShowIconToggleFull )
818 FSaction->addTo( iconToolBar ); 823 FSaction->addTo( iconToolBar );
819 if ( p->mShowIconNavigator ) mToggleNav ->addTo( iconToolBar ); 824 if ( p->mShowIconNavigator ) mToggleNav ->addTo( iconToolBar );
820 825
821 //******************** 826 //********************
822 if ( p->mShowIconAllday ) mToggleAllday->addTo( iconToolBar ); 827 if ( p->mShowIconAllday ) mToggleAllday->addTo( iconToolBar );
823 828
824 829
825 icon = loadPixmap( pathString + "whatsnext" ); 830 icon = loadPixmap( pathString + "whatsnext" );
826 configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 ); 831 configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 );
827 QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); 832 QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this );
828 whatsnext_action->addTo( viewMenu ); 833 whatsnext_action->addTo( viewMenu );
829 connect( whatsnext_action, SIGNAL( activated() ), 834 connect( whatsnext_action, SIGNAL( activated() ),
830 mView->viewManager(), SLOT( showWhatsNextView() ) ); 835 mView->viewManager(), SLOT( showWhatsNextView() ) );
831 836
832 icon = loadPixmap( pathString + "xdays" ); 837 icon = loadPixmap( pathString + "xdays" );
833 configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 ); 838 configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 );
834 QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); 839 QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this );
835 xdays_action->addTo( viewMenu ); 840 xdays_action->addTo( viewMenu );
836 connect( xdays_action, SIGNAL( activated() ), 841 connect( xdays_action, SIGNAL( activated() ),
837 mView->viewManager(), SLOT( showNextXView() ) ); 842 mView->viewManager(), SLOT( showNextXView() ) );
838 843
839 844
840 icon = loadPixmap( pathString + "journal" ); 845 icon = loadPixmap( pathString + "journal" );
841 configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); 846 configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 );
842 QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); 847 QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this );
843 viewjournal_action->addTo( viewMenu ); 848 viewjournal_action->addTo( viewMenu );
844 connect( viewjournal_action, SIGNAL( activated() ), 849 connect( viewjournal_action, SIGNAL( activated() ),
845 mView->viewManager(), SLOT( showJournalView() ) ); 850 mView->viewManager(), SLOT( showJournalView() ) );
846 851
847 852
848 icon = loadPixmap( pathString + "day" ); 853 icon = loadPixmap( pathString + "day" );
849 configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); 854 configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 );
850 QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this ); 855 QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this );
851 day1_action->addTo( viewMenu ); 856 day1_action->addTo( viewMenu );
852 // action->addTo( toolBar ); 857 // action->addTo( toolBar );
853 connect( day1_action, SIGNAL( activated() ), 858 connect( day1_action, SIGNAL( activated() ),
854 mView->viewManager(), SLOT( showDayView() ) ); 859 mView->viewManager(), SLOT( showDayView() ) );
855 860
856 icon = loadPixmap( pathString + "workweek" ); 861 icon = loadPixmap( pathString + "workweek" );
857 configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); 862 configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 );
858 QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); 863 QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this );
859 day5_action->addTo( viewMenu ); 864 day5_action->addTo( viewMenu );
860 connect( day5_action, SIGNAL( activated() ), 865 connect( day5_action, SIGNAL( activated() ),
861 mView->viewManager(), SLOT( showWorkWeekView() ) ); 866 mView->viewManager(), SLOT( showWorkWeekView() ) );
862 867
863 icon = loadPixmap( pathString + "week" ); 868 icon = loadPixmap( pathString + "week" );
864 configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); 869 configureToolBarMenu->insertItem(icon, i18n("Week"), 60 );
865 QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); 870 QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this );
866 day7_action->addTo( viewMenu ); 871 day7_action->addTo( viewMenu );
867 connect( day7_action, SIGNAL( activated() ), 872 connect( day7_action, SIGNAL( activated() ),
868 mView->viewManager(), SLOT( showWeekView() ) ); 873 mView->viewManager(), SLOT( showWeekView() ) );
869 874
870 icon = loadPixmap( pathString + "workweek2" ); 875 icon = loadPixmap( pathString + "workweek2" );
871 configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 ); 876 configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 );
872 QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this ); 877 QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this );
873 day6_action->addTo( viewMenu ); 878 day6_action->addTo( viewMenu );
874 connect( day6_action, SIGNAL( activated() ), 879 connect( day6_action, SIGNAL( activated() ),
875 mView->viewManager(), SLOT( showMonthViewWeek() ) ); 880 mView->viewManager(), SLOT( showMonthViewWeek() ) );
876 881
877 icon = loadPixmap( pathString + "month" ); 882 icon = loadPixmap( pathString + "month" );
878 configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); 883 configureToolBarMenu->insertItem(icon, i18n("Month"), 70 );
879 QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); 884 QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this );
880 month_action->addTo( viewMenu ); 885 month_action->addTo( viewMenu );
881 connect( month_action, SIGNAL( activated() ), 886 connect( month_action, SIGNAL( activated() ),
882 mView->viewManager(), SLOT( showMonthView() ) ); 887 mView->viewManager(), SLOT( showMonthView() ) );
883 888
884 icon = loadPixmap( pathString + "list" ); 889 icon = loadPixmap( pathString + "list" );
885 configureToolBarMenu->insertItem(icon, i18n("List View"), 30 ); 890 configureToolBarMenu->insertItem(icon, i18n("List View"), 30 );
886 QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this ); 891 QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this );
887 showlist_action->addTo( viewMenu ); 892 showlist_action->addTo( viewMenu );
888 connect( showlist_action, SIGNAL( activated() ), 893 connect( showlist_action, SIGNAL( activated() ),
889 mView->viewManager(), SLOT( showListView() ) ); 894 mView->viewManager(), SLOT( showListView() ) );
890 895
891 icon = loadPixmap( pathString + "todo" ); 896 icon = loadPixmap( pathString + "todo" );
892 configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); 897 configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 );
893 QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); 898 QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this );
894 todoview_action->addTo( viewMenu ); 899 todoview_action->addTo( viewMenu );
895 connect( todoview_action, SIGNAL( activated() ), 900 connect( todoview_action, SIGNAL( activated() ),
896 mView->viewManager(), SLOT( showTodoView() ) ); 901 mView->viewManager(), SLOT( showTodoView() ) );
897 902
898 903
899 904
900#if 0 905#if 0
901 action = new QAction( "view_timespan", "Time Span", 0, this ); 906 action = new QAction( "view_timespan", "Time Span", 0, this );
902 action->addTo( viewMenu ); 907 action->addTo( viewMenu );
903 connect( action, SIGNAL( activated() ), 908 connect( action, SIGNAL( activated() ),
904 mView->viewManager(), SLOT( showTimeSpanView() ) ); 909 mView->viewManager(), SLOT( showTimeSpanView() ) );
905#endif 910#endif
906 911
907 mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, 912 mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0,
908 this ); 913 this );
909 mNewSubTodoAction->addTo( actionMenu ); 914 mNewSubTodoAction->addTo( actionMenu );
910 connect( mNewSubTodoAction, SIGNAL( activated() ), 915 connect( mNewSubTodoAction, SIGNAL( activated() ),
911 mView, SLOT( newSubTodo() ) ); 916 mView, SLOT( newSubTodo() ) );
912 917
913 actionMenu->insertSeparator(); 918 actionMenu->insertSeparator();
914 919
915 mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this ); 920 mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this );
916 mShowAction->addTo( actionMenu ); 921 mShowAction->addTo( actionMenu );
917 connect( mShowAction, SIGNAL( activated() ), 922 connect( mShowAction, SIGNAL( activated() ),
918 mView, SLOT( showIncidence() ) ); 923 mView, SLOT( showIncidence() ) );
919 924
920 mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); 925 mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this );
921 mEditAction->addTo( actionMenu ); 926 mEditAction->addTo( actionMenu );
922 connect( mEditAction, SIGNAL( activated() ), 927 connect( mEditAction, SIGNAL( activated() ),