summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-02-22 01:14:35 (UTC)
committer zautrix <zautrix>2005-02-22 01:14:35 (UTC)
commitdf40d77f7407326221ba2848163c4f61b7bb1d2f (patch) (unidiff)
tree1b46bf666f7371189ba421080f4dcd66dc9037f2
parentce261d6197d319d67f7b275813449f36ce42a730 (diff)
downloadkdepimpi-df40d77f7407326221ba2848163c4f61b7bb1d2f.zip
kdepimpi-df40d77f7407326221ba2848163c4f61b7bb1d2f.tar.gz
kdepimpi-df40d77f7407326221ba2848163c4f61b7bb1d2f.tar.bz2
next
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt10
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt2
-rw-r--r--bin/kdepim/korganizer/icons16/workweek2.pngbin579 -> 609 bytes
-rw-r--r--bin/kdepim/korganizer/workweek2.pngbin907 -> 929 bytes
-rw-r--r--korganizer/koprefs.cpp1
-rw-r--r--korganizer/koprefs.h1
-rw-r--r--korganizer/mainwindow.cpp26
-rw-r--r--korganizer/searchdialog.cpp72
-rw-r--r--korganizer/searchdialog.h7
9 files changed, 69 insertions, 50 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 7c81b3a..d3a8bc1 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,98 +1,108 @@
1Info about the changes in new versions of KDE-Pim/Pi 1Info about the changes in new versions of KDE-Pim/Pi
2 2
3********** VERSION 2.0.10 ************
4
5KO/Pi:
6In the desktop versions the context menu in the search dialog was broken after introducing the What'sThis info for the list view.
7This is fixed.
8Changed the search dialog a bit to make it more user friendly.
9(E.g.: Removed message box about "no items found" and set key focus to search line edit after search).
10
11Added config option to hide the week number in KO/Pi toolbar.
12
3********** VERSION 2.0.9 ************ 13********** VERSION 2.0.9 ************
4 14
5Made month view icons for multiday events a bit nicer. 15Made month view icons for multiday events a bit nicer.
6Some minor fixes in KO/Pi 16Some minor fixes in KO/Pi
7(e.g. go to today did not work for new week view properly). 17(e.g. go to today did not work for new week view properly).
8 18
9 19
10********** VERSION 2.0.8 ************ 20********** VERSION 2.0.8 ************
11 21
12Fixed a problem in dependency info in the ipk files for the Zaurus. 22Fixed a problem in dependency info in the ipk files for the Zaurus.
13 23
14Added icon for the stealth new week view and made navigation more user friendly in monthview by adding a prev/next week button to the navigator bar. 24Added icon for the stealth new week view and made navigation more user friendly in monthview by adding a prev/next week button to the navigator bar.
15 25
16Added a "go today" button to the datepicker. 26Added a "go today" button to the datepicker.
17 27
18Added "created" and "last modified" to event/todo viewer (and What'sThis viewer) 28Added "created" and "last modified" to event/todo viewer (and What'sThis viewer)
19and made it configureable to show these values. 29and made it configureable to show these values.
20 30
21Fixed a problem for events (from external iCal files) that do have a duration but no end date. 31Fixed a problem for events (from external iCal files) that do have a duration but no end date.
22 32
23 33
24********** VERSION 2.0.7 ************ 34********** VERSION 2.0.7 ************
25 35
26Added global application font settings 36Added global application font settings
27(for all KDE-Pim/Pi apps) to the general settings. 37(for all KDE-Pim/Pi apps) to the general settings.
28 38
29Fixed a problem in OM/Pi when trying to login to some IMAP servers 39Fixed a problem in OM/Pi when trying to login to some IMAP servers
30(like the IMAP server of Apple: mail.mac.com ) 40(like the IMAP server of Apple: mail.mac.com )
31 41
32Added recurring todos to KO/Pi. 42Added recurring todos to KO/Pi.
33 43
34 44
35********** VERSION 2.0.6 ************ 45********** VERSION 2.0.6 ************
36 46
37Some bugfixes in the pi-sync mode. 47Some bugfixes in the pi-sync mode.
38Added German translation for pi-sync mode. 48Added German translation for pi-sync mode.
39 49
40KO/Pi: 50KO/Pi:
41Made the todolist using alternate background. 51Made the todolist using alternate background.
42 52
43Other minor fixes in KO/Pi. 53Other minor fixes in KO/Pi.
44 54
45 55
46********** VERSION 2.0.5 ************ 56********** VERSION 2.0.5 ************
47 57
48Bugfixes in KO/Pi. 58Bugfixes in KO/Pi.
49 59
50********** VERSION 2.0.4 ************ 60********** VERSION 2.0.4 ************
51 61
52KO/Pi: 62KO/Pi:
53Fixed problem loading translations for summary/location edit boxes in event/todo editor. 63Fixed problem loading translations for summary/location edit boxes in event/todo editor.
54 64
55Added a general "select week number" to the toolbar. 65Added a general "select week number" to the toolbar.
56 66
57Fixed some small problem of the new features introduced in version 2.0.3. 67Fixed some small problem of the new features introduced in version 2.0.3.
58 68
59Made it possible to specify one specific category as category color, 69Made it possible to specify one specific category as category color,
60if more than one categories are selected. 70if more than one categories are selected.
61 71
62Fixed a bug in saving colors for categories with non-ascii characters. 72Fixed a bug in saving colors for categories with non-ascii characters.
63(Like, e.g. German Umlauts). 73(Like, e.g. German Umlauts).
64Propably you have to set your colors again for those categories. 74Propably you have to set your colors again for those categories.
65 75
66 76
67********** VERSION 2.0.3 ************ 77********** VERSION 2.0.3 ************
68 78
69KO/Pi: 79KO/Pi:
70Added feature for changing alarm settings for many items at once: 80Added feature for changing alarm settings for many items at once:
71Open list view (or search dialog), select the desired items and choose in 81Open list view (or search dialog), select the desired items and choose in
72the popup menu: Set alarm for selected... 82the popup menu: Set alarm for selected...
73 83
74Added to the event/todo viewer the option to send an email to 84Added to the event/todo viewer the option to send an email to
75all attendees or all selected (with RSVP) attendees. 85all attendees or all selected (with RSVP) attendees.
76 86
77Made the week-month mode changing in month view faster. 87Made the week-month mode changing in month view faster.
78 88
79Made month view better useable with keyboard. 89Made month view better useable with keyboard.
80Now TAB key jumps to next cell with an event/todo. 90Now TAB key jumps to next cell with an event/todo.
81Scroll in cell with coursor keys, scroll in time (next week) with 91Scroll in cell with coursor keys, scroll in time (next week) with
82Shift/Control + coursorkeys. 92Shift/Control + coursorkeys.
83 93
84Fixed bug that the todo view flat mode was reset after first view update. 94Fixed bug that the todo view flat mode was reset after first view update.
85 95
86If a todo is displayed closed in the todo view, 96If a todo is displayed closed in the todo view,
87it is now displayed in overdue/due today color depending on the subtodos overdue/due today properties. 97it is now displayed in overdue/due today color depending on the subtodos overdue/due today properties.
88 98
89Added info about the numbers of years to the caption (title) information about a birthday event. 99Added info about the numbers of years to the caption (title) information about a birthday event.
90 100
91Made completion date in todo editor editable. 101Made completion date in todo editor editable.
92 102
93Added possibility to save/load templates for journals. 103Added possibility to save/load templates for journals.
94(Which is just a simple "save text to file" or "insert text from file". 104(Which is just a simple "save text to file" or "insert text from file".
95 105
96********** VERSION 2.0.2 ************ 106********** VERSION 2.0.2 ************
97 107
98KO/Pi: 108KO/Pi:
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index 1073fe7..b526df9 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1199,108 +1199,108 @@
1199{ "Next two weeks","Nächste zwei Wochen" }, 1199{ "Next two weeks","Nächste zwei Wochen" },
1200{ "Next month","Nächster Monat" }, 1200{ "Next month","Nächster Monat" },
1201{ "Journal view","Journal" }, 1201{ "Journal view","Journal" },
1202{ "Display all opened","Zeige alle geöffnet" }, 1202{ "Display all opened","Zeige alle geöffnet" },
1203{ "Display all closed","Zeige alle geschlossen" }, 1203{ "Display all closed","Zeige alle geschlossen" },
1204{ "Display all flat","Zeige alle flach" }, 1204{ "Display all flat","Zeige alle flach" },
1205{ "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, 1205{ "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" },
1206{ "Default todo done color:","Standard Todo erledigt Farbe" }, 1206{ "Default todo done color:","Standard Todo erledigt Farbe" },
1207{ "Select week %1-%2","Wähle Woche %1-%2" }, 1207{ "Select week %1-%2","Wähle Woche %1-%2" },
1208{ "Select Week","Wähle Woche" }, 1208{ "Select Week","Wähle Woche" },
1209{ "Set alarm for selected...","Setze Alarm für Selekt..." }, 1209{ "Set alarm for selected...","Setze Alarm für Selekt..." },
1210{ "Set Alarm!","Setze Alarm!" }, 1210{ "Set Alarm!","Setze Alarm!" },
1211{ "Canged alarm for %1 items","Alarm für %1 Items geändert" }, 1211{ "Canged alarm for %1 items","Alarm für %1 Items geändert" },
1212{ " and "," und " }, 1212{ " and "," und " },
1213{ "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, 1213{ "<IMG src="%1"> only )","nur <IMG src="%1"> )" },
1214{ "Mail to selected","Mail an Ausgewählte" }, 1214{ "Mail to selected","Mail an Ausgewählte" },
1215{ "Mail to all","Mail an Alle" }, 1215{ "Mail to all","Mail an Alle" },
1216{ "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, 1216{ "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" },
1217{ "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, 1217{ "Set reminder ON with offset to:","Alarm AN mit Offset auf:" },
1218{ " on"," am" }, 1218{ " on"," am" },
1219{ " completed on "," erledigt am " }, 1219{ " completed on "," erledigt am " },
1220{ "Save as Event template","Speichere als Vorlage" }, 1220{ "Save as Event template","Speichere als Vorlage" },
1221{ "Load Event template","Lade Termin Vorlage" }, 1221{ "Load Event template","Lade Termin Vorlage" },
1222{ "Save as Journal template","Speichere als Journal Vorlage" }, 1222{ "Save as Journal template","Speichere als Journal Vorlage" },
1223{ "Insert Journal template","Füge Journal Vorlage ein" }, 1223{ "Insert Journal template","Füge Journal Vorlage ein" },
1224{ "Sub todos:<br>","Unter Todos:<br>" }, 1224{ "Sub todos:<br>","Unter Todos:<br>" },
1225{ "Parent todo:<br>","Über Todo:<br>" }, 1225{ "Parent todo:<br>","Über Todo:<br>" },
1226{ "Set current as color category","Setze Gewählte als Farbkategorie" }, 1226{ "Set current as color category","Setze Gewählte als Farbkategorie" },
1227{ " completed"," erledigt" }, 1227{ " completed"," erledigt" },
1228{ "(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.net --- 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.net --- www.korganizer.org\nBesonderen Dank an Michael und Ben\nfür intensives Testen!" }, 1228{ "(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.net --- 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.net --- www.korganizer.org\nBesonderen Dank an Michael und Ben\nfür intensives Testen!" },
1229{ "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, 1229{ "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." },
1230{ "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, 1230{ "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." },
1231{ "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, 1231{ "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." },
1232{ "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?" }, 1232{ "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?" },
1233{ "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, 1233{ "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." },
1234{ "Error","Fehler" }, 1234{ "Error","Fehler" },
1235{ ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, 1235{ ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." },
1236{ "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, 1236{ "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." },
1237{ "Warning","Warnung" }, 1237{ "Warning","Warnung" },
1238{ "Select week number","Wähle Wochen Nummer" }, 1238{ "Select week number","Wähle Wochen Nummer" },
1239{ "Februar","Februar" }, 1239{ "Februar","Februar" },
1240{ "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, 1240{ "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" },
1241{ "W","W" }, 1241{ "W","W" },
1242{ "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, 1242{ "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" },
1243{ "T: %1","T: %1" }, 1243{ "T: %1","T: %1" },
1244{ "Start: ","Start: " }, 1244{ "Start: ","Start: " },
1245{ "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, 1245{ "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " },
1246{ "Password for remote access:","Passwort für fernen Zugriff:" }, 1246{ "Password for remote access:","Passwort für fernen Zugriff:" },
1247{ "Remote IP address:","Ferne IP Adresse:" }, 1247{ "Remote IP address:","Ferne IP Adresse:" },
1248{ "Remote port number:","Ferne Port Nummer:" }, 1248{ "Remote port number:","Ferne Port Nummer:" },
1249{ "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, 1249{ "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." },
1250{ "Remote from: ","Fern von: " }, 1250{ "Remote from: ","Fern von: " },
1251{ "Local from: ","Lokal von: " }, 1251{ "Local from: ","Lokal von: " },
1252{ "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" }, 1252{ "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" },
1253{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, 1253{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" },
1254{ "Write back","Schreibe zurück" }, 1254{ "Write back","Schreibe zurück" },
1255{ "KO/Pi Synchronization","KO/Pi Synchronisation" }, 1255{ "KO/Pi Synchronization","KO/Pi Synchronisation" },
1256{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, 1256{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" },
1257{ "Received sync request","Sync Anfrage erhalten" }, 1257{ "Received sync request","Sync Anfrage erhalten" },
1258{ "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." }, 1258{ "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." },
1259{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, 1259{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." },
1260{ "Data saved to temp file!","Daten in temp Datei gespeichert!" }, 1260{ "Data saved to temp file!","Daten in temp Datei gespeichert!" },
1261{ "Sending file...","Sende Datei..." }, 1261{ "Sending file...","Sende Datei..." },
1262{ "Waiting for synced file...","Warte auf gesyncte Daten..." }, 1262{ "Waiting for synced file...","Warte auf gesyncte Daten..." },
1263{ "Receiving synced file...","Gesyncte Daten erhalten..." }, 1263{ "Receiving synced file...","Gesyncte Daten erhalten..." },
1264{ "Received %1 bytes","%1 Bytes erhalten" }, 1264{ "Received %1 bytes","%1 Bytes erhalten" },
1265{ "Writing file to disk...","Speichere Datei..." }, 1265{ "Writing file to disk...","Speichere Datei..." },
1266{ "Pi-Sync successful!","Pi-Sync erfolgreich!" }, 1266{ "Pi-Sync successful!","Pi-Sync erfolgreich!" },
1267{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, 1267{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" },
1268{ "Synchronize!","Synchronisiere!" }, 1268{ "Synchronize!","Synchronisiere!" },
1269{ "High clock skew!","Großer Uhrzeitunterschied!" }, 1269{ "High clock skew!","Großer Uhrzeitunterschied!" },
1270{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, 1270{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" },
1271{ "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!" }, 1271{ "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!" },
1272{ "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, 1272{ "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." },
1273{ "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, 1273{ "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" },
1274{ "List week view","Listenwochenansicht" }, 1274{ "List week view","Listenwochenansicht" },
1275{ "List week","Listenwochenansicht" }, 1275{ "List week","Listenwochenansicht" },
1276{ "Next Week","Nächste Woche" }, 1276{ "Next Week","Nächste Woche" },
1277{ "Previous Week","Vorherige Woche" }, 1277{ "Previous Week","Vorherige Woche" },
1278{ "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." }, 1278{ "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." },
1279{ "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, 1279{ "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" },
1280{ "Details","Details" }, 1280{ "Details","Details" },
1281{ "Created time","Erstellt Zeit" }, 1281{ "Created time","Erstellt Zeit" },
1282{ "Last modified time","Geändert Zeit" }, 1282{ "Last modified time","Geändert Zeit" },
1283{ "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, 1283{ "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" },
1284{ "View Options","Anzeige Optionen" }, 1284{ "View Options","Anzeige Optionen" },
1285{ "<b>Created: ","<b>Erstellt am: " }, 1285{ "<b>Created: ","<b>Erstellt am: " },
1286{ "<b>Last modified: ","<b>Zuletzt geändert am: " }, 1286{ "<b>Last modified: ","<b>Zuletzt geändert am: " },
1287{ "Journal: ","Journal: " }, 1287{ "Journal: ","Journal: " },
1288{ "yearly","jährlich" }, 1288{ "yearly","jährlich" },
1289{ "(%1) ","%1-" }, 1289{ "(%1) ","%1-" },
1290{ "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, 1290{ "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" },
1291{ "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, 1291{ "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" },
1292{ "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, 1292{ "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" },
1293{ "Summary/Loc.","Titel/Ort" }, 1293{ "Summary/Loc.","Titel/Ort" },
1294{ "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, 1294{ "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." },
1295{ "","" }, 1295{ "Week Number","Wochennummer" },
1296{ "","" }, 1296{ "","" },
1297{ "","" }, 1297{ "","" },
1298{ "","" }, 1298{ "","" },
1299{ "","" }, 1299{ "","" },
1300{ "","" }, 1300{ "","" },
1301{ "","" }, 1301{ "","" },
1302{ "","" }, 1302{ "","" },
1303{ "","" }, 1303{ "","" },
1304{ "","" }, 1304{ "","" },
1305{ "","" }, 1305{ "","" },
1306 1306
diff --git a/bin/kdepim/korganizer/icons16/workweek2.png b/bin/kdepim/korganizer/icons16/workweek2.png
index e0e1fde..d3033d4 100644
--- a/bin/kdepim/korganizer/icons16/workweek2.png
+++ b/bin/kdepim/korganizer/icons16/workweek2.png
Binary files differ
diff --git a/bin/kdepim/korganizer/workweek2.png b/bin/kdepim/korganizer/workweek2.png
index 76cb86c..9538d53 100644
--- a/bin/kdepim/korganizer/workweek2.png
+++ b/bin/kdepim/korganizer/workweek2.png
Binary files differ
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index a91074f..7e3deff 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -1,183 +1,184 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 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 <time.h> 24#include <time.h>
25#ifndef _WIN32_ 25#ifndef _WIN32_
26#include <unistd.h> 26#include <unistd.h>
27#endif 27#endif
28#include <qdir.h> 28#include <qdir.h>
29#include <qtextstream.h> 29#include <qtextstream.h>
30#include <qtextcodec.h> 30#include <qtextcodec.h>
31#include <qstring.h> 31#include <qstring.h>
32#include <qregexp.h> 32#include <qregexp.h>
33#include <qfont.h> 33#include <qfont.h>
34#include <qcolor.h> 34#include <qcolor.h>
35#include <qstringlist.h> 35#include <qstringlist.h>
36#include <stdlib.h> 36#include <stdlib.h>
37 37
38#include <kglobal.h> 38#include <kglobal.h>
39#include <kglobalsettings.h> 39#include <kglobalsettings.h>
40#include <kconfig.h> 40#include <kconfig.h>
41#include <klocale.h> 41#include <klocale.h>
42#include <kdebug.h> 42#include <kdebug.h>
43#include <kemailsettings.h> 43#include <kemailsettings.h>
44#include <kstaticdeleter.h> 44#include <kstaticdeleter.h>
45#include <libkdepim/kpimglobalprefs.h> 45#include <libkdepim/kpimglobalprefs.h>
46 46
47#include "koprefs.h" 47#include "koprefs.h"
48#include "mainwindow.h" 48#include "mainwindow.h"
49 49
50KOPrefs *KOPrefs::mInstance = 0; 50KOPrefs *KOPrefs::mInstance = 0;
51static KStaticDeleter<KOPrefs> insd; 51static KStaticDeleter<KOPrefs> insd;
52 52
53KOPrefs::KOPrefs() : 53KOPrefs::KOPrefs() :
54 KPimPrefs("korganizerrc") 54 KPimPrefs("korganizerrc")
55{ 55{
56 mCategoryColors.setAutoDelete(true); 56 mCategoryColors.setAutoDelete(true);
57 fillMailDefaults(); 57 fillMailDefaults();
58 mDefaultCategoryColor = QColor(175,210,255);//196,196,196); 58 mDefaultCategoryColor = QColor(175,210,255);//196,196,196);
59 QColor defaultHolidayColor = QColor(255,0,0); 59 QColor defaultHolidayColor = QColor(255,0,0);
60 QColor defaultHighlightColor = QColor(129,112,255);//64,64,255); 60 QColor defaultHighlightColor = QColor(129,112,255);//64,64,255);
61 QColor defaultAgendaBgColor = QColor(239,241,169);//128,128,128); 61 QColor defaultAgendaBgColor = QColor(239,241,169);//128,128,128);
62 QColor defaultWorkingHoursColor = QColor(170,223,150);//160,160,160); 62 QColor defaultWorkingHoursColor = QColor(170,223,150);//160,160,160);
63 QColor defaultTodoDueTodayColor = QColor(255,220,100); 63 QColor defaultTodoDueTodayColor = QColor(255,220,100);
64 QColor defaultTodoOverdueColor = QColor(255,153,125); 64 QColor defaultTodoOverdueColor = QColor(255,153,125);
65 65
66 66
67 KPrefs::setCurrentGroup("General"); 67 KPrefs::setCurrentGroup("General");
68 68
69 69
70 addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); 70 addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false);
71 71
72 addItemBool("ShowIconNewTodo",&mShowIconNewTodo,true); 72 addItemBool("ShowIconNewTodo",&mShowIconNewTodo,true);
73 addItemBool("ShowIconNewEvent",&mShowIconNewEvent,true); 73 addItemBool("ShowIconNewEvent",&mShowIconNewEvent,true);
74 addItemBool("ShowIconSearch",&mShowIconSearch,true); 74 addItemBool("ShowIconSearch",&mShowIconSearch,true);
75 addItemBool("ShowIconList",&mShowIconList,true); 75 addItemBool("ShowIconList",&mShowIconList,true);
76 addItemBool("ShowIconDay1",&mShowIconDay1,true); 76 addItemBool("ShowIconDay1",&mShowIconDay1,true);
77 addItemBool("ShowIconDay5",&mShowIconDay5,true); 77 addItemBool("ShowIconDay5",&mShowIconDay5,true);
78 addItemBool("ShowIconDay6",&mShowIconDay6,true); 78 addItemBool("ShowIconDay6",&mShowIconDay6,true);
79 addItemBool("ShowIconDay7",&mShowIconDay7,true); 79 addItemBool("ShowIconDay7",&mShowIconDay7,true);
80 addItemBool("ShowIconMonth",&mShowIconMonth,true); 80 addItemBool("ShowIconMonth",&mShowIconMonth,true);
81 addItemBool("ShowIconTodoview",&mShowIconTodoview,true); 81 addItemBool("ShowIconTodoview",&mShowIconTodoview,true);
82 addItemBool("ShowIconBackFast",&mShowIconBackFast,true); 82 addItemBool("ShowIconBackFast",&mShowIconBackFast,true);
83 addItemBool("ShowIconBack",&mShowIconBack,true); 83 addItemBool("ShowIconBack",&mShowIconBack,true);
84 addItemBool("ShowIconToday",&mShowIconToday,true); 84 addItemBool("ShowIconToday",&mShowIconToday,true);
85 addItemBool("ShowIconForward",&mShowIconForward,true); 85 addItemBool("ShowIconForward",&mShowIconForward,true);
86 addItemBool("ShowIconForwardFast",&mShowIconForwardFast,true); 86 addItemBool("ShowIconForwardFast",&mShowIconForwardFast,true);
87 addItemBool("ShowIconWhatsThis",&mShowIconWhatsThis,true); 87 addItemBool("ShowIconWhatsThis",&mShowIconWhatsThis,true);
88 addItemBool("ShowIconWeekNum",&mShowIconWeekNum,true);
88 addItemBool("ShowIconNextDays",&mShowIconNextDays,true); 89 addItemBool("ShowIconNextDays",&mShowIconNextDays,true);
89 addItemBool("ShowIconNext",&mShowIconNext,true); 90 addItemBool("ShowIconNext",&mShowIconNext,true);
90 addItemBool("ShowIconJournal",&mShowIconJournal,true); 91 addItemBool("ShowIconJournal",&mShowIconJournal,true);
91 addItemBool("ShowIconStretch",&mShowIconStretch,true); 92 addItemBool("ShowIconStretch",&mShowIconStretch,true);
92 addItemInt("LastLoadedLanguage",&mOldLanguage,0); 93 addItemInt("LastLoadedLanguage",&mOldLanguage,0);
93 94
94 addItemBool("AskForQuit",&mAskForQuit,false); 95 addItemBool("AskForQuit",&mAskForQuit,false);
95 96
96#ifndef DESKTOP_VERSION 97#ifndef DESKTOP_VERSION
97 addItemBool("ShowFullMenu",&mShowFullMenu,false); 98 addItemBool("ShowFullMenu",&mShowFullMenu,false);
98#else 99#else
99 addItemBool("ShowFullMenu",&mShowFullMenu,true); 100 addItemBool("ShowFullMenu",&mShowFullMenu,true);
100#endif 101#endif
101 addItemBool("ToolBarHor",&mToolBarHor, true ); 102 addItemBool("ToolBarHor",&mToolBarHor, true );
102 addItemBool("ToolBarUp",&mToolBarUp, false ); 103 addItemBool("ToolBarUp",&mToolBarUp, false );
103 addItemBool("ToolBarMiniIcons",&mToolBarMiniIcons, false ); 104 addItemBool("ToolBarMiniIcons",&mToolBarMiniIcons, false );
104 addItemInt("Whats Next Days",&mWhatsNextDays,3); 105 addItemInt("Whats Next Days",&mWhatsNextDays,3);
105 addItemInt("Whats Next Prios",&mWhatsNextPrios,1); 106 addItemInt("Whats Next Prios",&mWhatsNextPrios,1);
106 107
107 addItemBool("ShowTodoInAgenda",&mShowTodoInAgenda,true); 108 addItemBool("ShowTodoInAgenda",&mShowTodoInAgenda,true);
108 addItemBool("ShowTimeInAgenda",&mShowTimeInAgenda,true); 109 addItemBool("ShowTimeInAgenda",&mShowTimeInAgenda,true);
109 addItemBool("HideNonStartedTodos",&mHideNonStartedTodos,false); 110 addItemBool("HideNonStartedTodos",&mHideNonStartedTodos,false);
110 addItemBool("ShowCompletedTodo",&mShowCompletedTodo,true); 111 addItemBool("ShowCompletedTodo",&mShowCompletedTodo,true);
111 addItemInt("AllDay Size",&mAllDaySize,28); 112 addItemInt("AllDay Size",&mAllDaySize,28);
112 QString defAlarm = KGlobal::iconLoader()->iconPath()+"koalarm.wav"; 113 QString defAlarm = KGlobal::iconLoader()->iconPath()+"koalarm.wav";
113 addItemString("DefaultAlarmFile",&mDefaultAlarmFile,defAlarm ); 114 addItemString("DefaultAlarmFile",&mDefaultAlarmFile,defAlarm );
114 115
115 addItemStringList("LocationDefaults",&mLocationDefaults ); 116 addItemStringList("LocationDefaults",&mLocationDefaults );
116 addItemStringList("EventSummary User",&mEventSummaryUser); 117 addItemStringList("EventSummary User",&mEventSummaryUser);
117 addItemStringList("TodoSummary User",&mTodoSummaryUser); 118 addItemStringList("TodoSummary User",&mTodoSummaryUser);
118 119
119 addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); 120 addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false);
120 addItemBool("Enable Project View",&mEnableProjectView,false); 121 addItemBool("Enable Project View",&mEnableProjectView,false);
121 addItemBool("Auto Save",&mAutoSave,false); 122 addItemBool("Auto Save",&mAutoSave,false);
122 addItemInt("Auto Save Interval",&mAutoSaveInterval,3); 123 addItemInt("Auto Save Interval",&mAutoSaveInterval,3);
123 addItemBool("Confirm Deletes",&mConfirm,true); 124 addItemBool("Confirm Deletes",&mConfirm,true);
124 addItemString("Archive File",&mArchiveFile); 125 addItemString("Archive File",&mArchiveFile);
125 addItemString("Html Export File",&mHtmlExportFile, 126 addItemString("Html Export File",&mHtmlExportFile,
126 QDir::homeDirPath() + "/" + i18n("Default export file", "calendar.html")); 127 QDir::homeDirPath() + "/" + i18n("Default export file", "calendar.html"));
127 addItemBool("Html With Save",&mHtmlWithSave,false); 128 addItemBool("Html With Save",&mHtmlWithSave,false);
128 129
129 KPrefs::setCurrentGroup("Personal Settings"); 130 KPrefs::setCurrentGroup("Personal Settings");
130 131
131 addItemInt("Mail Client",&mMailClient,MailClientKMail); 132 addItemInt("Mail Client",&mMailClient,MailClientKMail);
132 addItemBool("Use Control Center Email",&mEmailControlCenter,false); 133 addItemBool("Use Control Center Email",&mEmailControlCenter,false);
133 addItemBool("Bcc",&mBcc,false); 134 addItemBool("Bcc",&mBcc,false);
134 135
135 KPrefs::setCurrentGroup("Time & Date"); 136 KPrefs::setCurrentGroup("Time & Date");
136 137
137 138
138 addItemInt("Default Start Time",&mStartTime,10); 139 addItemInt("Default Start Time",&mStartTime,10);
139 addItemInt("Default Duration",&mDefaultDuration,2); 140 addItemInt("Default Duration",&mDefaultDuration,2);
140 addItemInt("Default Alarm Time",&mAlarmTime,3); 141 addItemInt("Default Alarm Time",&mAlarmTime,3);
141 KPrefs::setCurrentGroup("AlarmSettings"); 142 KPrefs::setCurrentGroup("AlarmSettings");
142 addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20); 143 addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20);
143 addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7); 144 addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7);
144 addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5); 145 addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5);
145 addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3); 146 addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3);
146 147
147 148
148 KPrefs::setCurrentGroup("Calendar"); 149 KPrefs::setCurrentGroup("Calendar");
149 150
150 addItemInt("Default Calendar Format",&mDefaultFormat,FormatICalendar); 151 addItemInt("Default Calendar Format",&mDefaultFormat,FormatICalendar);
151 152
152 KPrefs::setCurrentGroup("Fonts"); 153 KPrefs::setCurrentGroup("Fonts");
153 // qDebug(" KPrefs::setCurrentGroup(Fonts); "); 154 // qDebug(" KPrefs::setCurrentGroup(Fonts); ");
154 addItemFont("TimeBar Font",&mTimeBarFont,KGlobalSettings::generalFont() ); 155 addItemFont("TimeBar Font",&mTimeBarFont,KGlobalSettings::generalFont() );
155 addItemFont("MonthView Font",&mMonthViewFont,KGlobalSettings::generalFont()); 156 addItemFont("MonthView Font",&mMonthViewFont,KGlobalSettings::generalFont());
156 addItemFont("AgendaView Font",&mAgendaViewFont,KGlobalSettings::generalFont()); 157 addItemFont("AgendaView Font",&mAgendaViewFont,KGlobalSettings::generalFont());
157 addItemFont("MarcusBains Font",&mMarcusBainsFont,KGlobalSettings::generalFont()); 158 addItemFont("MarcusBains Font",&mMarcusBainsFont,KGlobalSettings::generalFont());
158 addItemFont("TimeLabels Font",&mTimeLabelsFont,KGlobalSettings::generalFont()); 159 addItemFont("TimeLabels Font",&mTimeLabelsFont,KGlobalSettings::generalFont());
159 addItemFont("TodoView Font",&mTodoViewFont,KGlobalSettings::generalFont()); 160 addItemFont("TodoView Font",&mTodoViewFont,KGlobalSettings::generalFont());
160 addItemFont("ListView Font",&mListViewFont,KGlobalSettings::generalFont()); 161 addItemFont("ListView Font",&mListViewFont,KGlobalSettings::generalFont());
161 addItemFont("DateNavigator Font",&mDateNavigatorFont,KGlobalSettings::generalFont()); 162 addItemFont("DateNavigator Font",&mDateNavigatorFont,KGlobalSettings::generalFont());
162 addItemFont("EditBox Font",&mEditBoxFont,KGlobalSettings::generalFont()); 163 addItemFont("EditBox Font",&mEditBoxFont,KGlobalSettings::generalFont());
163 addItemFont("JournalView Font",&mJornalViewFont,KGlobalSettings::generalFont()); 164 addItemFont("JournalView Font",&mJornalViewFont,KGlobalSettings::generalFont());
164 addItemFont("WhatsNextView Font",&mWhatsNextFont,KGlobalSettings::generalFont()); 165 addItemFont("WhatsNextView Font",&mWhatsNextFont,KGlobalSettings::generalFont());
165 addItemFont("EventView Font",&mEventViewFont,KGlobalSettings::generalFont()); 166 addItemFont("EventView Font",&mEventViewFont,KGlobalSettings::generalFont());
166 167
167 KPrefs::setCurrentGroup("RemoteSyncing"); 168 KPrefs::setCurrentGroup("RemoteSyncing");
168 addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" ); 169 addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" );
169 addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" ); 170 addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" );
170 addItemBool("ShowSyncEvents",&mShowSyncEvents,false); 171 addItemBool("ShowSyncEvents",&mShowSyncEvents,false);
171 addItemInt("LastSyncTime",&mLastSyncTime,0); 172 addItemInt("LastSyncTime",&mLastSyncTime,0);
172 173
173#ifdef _WIN32_ 174#ifdef _WIN32_
174 QString hdp= locateLocal("data","korganizer")+"\\\\"; 175 QString hdp= locateLocal("data","korganizer")+"\\\\";
175#else 176#else
176 QString hdp= locateLocal("data","korganizer")+"/"; 177 QString hdp= locateLocal("data","korganizer")+"/";
177#endif 178#endif
178 179
179 KPrefs::setCurrentGroup("LoadSaveFileNames"); 180 KPrefs::setCurrentGroup("LoadSaveFileNames");
180 181
181 addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" ); 182 addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" );
182 addItemString("LastVcalFile", &mLastVcalFile ,hdp +"export.vcs" ); 183 addItemString("LastVcalFile", &mLastVcalFile ,hdp +"export.vcs" );
183 addItemString("LastSaveFile", &mLastSaveFile ,hdp +"mybackup.ics" ); 184 addItemString("LastSaveFile", &mLastSaveFile ,hdp +"mybackup.ics" );
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h
index e4e3dd7..09a0dce 100644
--- a/korganizer/koprefs.h
+++ b/korganizer/koprefs.h
@@ -88,192 +88,193 @@ class KOPrefs : public KPimPrefs
88 bool mBcc; 88 bool mBcc;
89 bool mAutoSave; 89 bool mAutoSave;
90 int mAutoSaveInterval; 90 int mAutoSaveInterval;
91 bool mConfirm; 91 bool mConfirm;
92 92
93 bool mEnableGroupScheduling; 93 bool mEnableGroupScheduling;
94 bool mEnableProjectView; 94 bool mEnableProjectView;
95 95
96 int mDefaultFormat; 96 int mDefaultFormat;
97 int mMailClient; 97 int mMailClient;
98 98
99 int mStartTime; 99 int mStartTime;
100 int mDefaultDuration; 100 int mDefaultDuration;
101 int mAlarmTime; 101 int mAlarmTime;
102 102
103 int mWorkingHoursStart; 103 int mWorkingHoursStart;
104 int mWorkingHoursEnd; 104 int mWorkingHoursEnd;
105 bool mExcludeHolidays; 105 bool mExcludeHolidays;
106 bool mExcludeSaturdays; 106 bool mExcludeSaturdays;
107 bool mMarcusBainsShowSeconds; 107 bool mMarcusBainsShowSeconds;
108 108
109 QFont mTimeBarFont; 109 QFont mTimeBarFont;
110 QFont mMonthViewFont; 110 QFont mMonthViewFont;
111 QFont mAgendaViewFont; 111 QFont mAgendaViewFont;
112 QFont mMarcusBainsFont; 112 QFont mMarcusBainsFont;
113 QFont mTimeLabelsFont; 113 QFont mTimeLabelsFont;
114 QFont mTodoViewFont; 114 QFont mTodoViewFont;
115 QFont mListViewFont; 115 QFont mListViewFont;
116 QFont mDateNavigatorFont; 116 QFont mDateNavigatorFont;
117 QFont mEditBoxFont; 117 QFont mEditBoxFont;
118 QFont mJornalViewFont; 118 QFont mJornalViewFont;
119 QFont mWhatsNextFont; 119 QFont mWhatsNextFont;
120 QFont mEventViewFont; 120 QFont mEventViewFont;
121 121
122 122
123 123
124 124
125 QColor mHolidayColor; 125 QColor mHolidayColor;
126 QColor mHighlightColor; 126 QColor mHighlightColor;
127 QColor mEventColor; 127 QColor mEventColor;
128 QColor mTodoDoneColor; 128 QColor mTodoDoneColor;
129 QColor mAgendaBgColor; 129 QColor mAgendaBgColor;
130 QColor mWorkingHoursColor; 130 QColor mWorkingHoursColor;
131 QColor mTodoDueTodayColor; 131 QColor mTodoDueTodayColor;
132 QColor mTodoOverdueColor; 132 QColor mTodoOverdueColor;
133 QColor mMonthViewEvenColor; 133 QColor mMonthViewEvenColor;
134 QColor mMonthViewOddColor; 134 QColor mMonthViewOddColor;
135 QColor mMonthViewHolidayColor; 135 QColor mMonthViewHolidayColor;
136 bool mMonthViewUsesDayColors; 136 bool mMonthViewUsesDayColors;
137 bool mMonthViewSatSunTog; 137 bool mMonthViewSatSunTog;
138 bool mMonthViewWeek; 138 bool mMonthViewWeek;
139 QColor mAppColor1; 139 QColor mAppColor1;
140 QColor mAppColor2; 140 QColor mAppColor2;
141 bool mUseAppColors; 141 bool mUseAppColors;
142 142
143 int mDayBegins; 143 int mDayBegins;
144 int mHourSize; 144 int mHourSize;
145 int mAllDaySize; 145 int mAllDaySize;
146 bool mShowFullMenu; 146 bool mShowFullMenu;
147 bool mDailyRecur; 147 bool mDailyRecur;
148 bool mWeeklyRecur; 148 bool mWeeklyRecur;
149 bool mMonthDailyRecur; 149 bool mMonthDailyRecur;
150 bool mMonthWeeklyRecur; 150 bool mMonthWeeklyRecur;
151 bool mMonthShowIcons; 151 bool mMonthShowIcons;
152 bool mMonthShowShort; 152 bool mMonthShowShort;
153 bool mEnableToolTips; 153 bool mEnableToolTips;
154 bool mEnableMonthScroll; 154 bool mEnableMonthScroll;
155 bool mFullViewMonth; 155 bool mFullViewMonth;
156 bool mMonthViewUsesCategoryColor; 156 bool mMonthViewUsesCategoryColor;
157 bool mFullViewTodo; 157 bool mFullViewTodo;
158 bool mShowCompletedTodo; 158 bool mShowCompletedTodo;
159 bool mMarcusBainsEnabled; 159 bool mMarcusBainsEnabled;
160 int mNextXDays; 160 int mNextXDays;
161 int mWhatsNextDays; 161 int mWhatsNextDays;
162 int mWhatsNextPrios; 162 int mWhatsNextPrios;
163 bool mEnableQuickTodo; 163 bool mEnableQuickTodo;
164 164
165 bool mCompactDialogs; 165 bool mCompactDialogs;
166 bool mVerticalScreen; 166 bool mVerticalScreen;
167 167
168 bool mShowIconNewTodo; 168 bool mShowIconNewTodo;
169 bool mShowIconNewEvent; 169 bool mShowIconNewEvent;
170 bool mShowIconSearch; 170 bool mShowIconSearch;
171 bool mShowIconList; 171 bool mShowIconList;
172 bool mShowIconDay1; 172 bool mShowIconDay1;
173 bool mShowIconDay5; 173 bool mShowIconDay5;
174 bool mShowIconDay6; 174 bool mShowIconDay6;
175 bool mShowIconDay7; 175 bool mShowIconDay7;
176 bool mShowIconMonth; 176 bool mShowIconMonth;
177 bool mShowIconTodoview; 177 bool mShowIconTodoview;
178 bool mShowIconBackFast; 178 bool mShowIconBackFast;
179 bool mShowIconBack; 179 bool mShowIconBack;
180 bool mShowIconToday; 180 bool mShowIconToday;
181 bool mShowIconForward; 181 bool mShowIconForward;
182 bool mShowIconForwardFast; 182 bool mShowIconForwardFast;
183 bool mShowIconWhatsThis; 183 bool mShowIconWhatsThis;
184 bool mShowIconWeekNum;
184 bool mShowIconNextDays; 185 bool mShowIconNextDays;
185 bool mShowIconNext; 186 bool mShowIconNext;
186 bool mShowIconJournal; 187 bool mShowIconJournal;
187 188
188 bool mShowIconStretch; 189 bool mShowIconStretch;
189 190
190 bool mToolBarHor; 191 bool mToolBarHor;
191 bool mToolBarUp; 192 bool mToolBarUp;
192 bool mToolBarMiniIcons; 193 bool mToolBarMiniIcons;
193 194
194 bool mAskForQuit; 195 bool mAskForQuit;
195 bool mUsePassWd; 196 bool mUsePassWd;
196 bool mShowSyncEvents; 197 bool mShowSyncEvents;
197 bool mShowTodoInAgenda; 198 bool mShowTodoInAgenda;
198 bool mShowTimeInAgenda; 199 bool mShowTimeInAgenda;
199 bool mHideNonStartedTodos; 200 bool mHideNonStartedTodos;
200 201
201 int mLastSyncTime; 202 int mLastSyncTime;
202 void setCategoryColor(QString cat,const QColor & color); 203 void setCategoryColor(QString cat,const QColor & color);
203 QColor *categoryColor(QString cat); 204 QColor *categoryColor(QString cat);
204 205
205 QString mArchiveFile; 206 QString mArchiveFile;
206 QString mHtmlExportFile; 207 QString mHtmlExportFile;
207 bool mHtmlWithSave; 208 bool mHtmlWithSave;
208 209
209 QStringList mSelectedPlugins; 210 QStringList mSelectedPlugins;
210 211
211 QString mLastImportFile; 212 QString mLastImportFile;
212 QString mLastVcalFile; 213 QString mLastVcalFile;
213 QString mLastSaveFile; 214 QString mLastSaveFile;
214 QString mLastLoadFile; 215 QString mLastLoadFile;
215 216
216 217
217 QString mDefaultAlarmFile; 218 QString mDefaultAlarmFile;
218 int mIMIPScheduler; 219 int mIMIPScheduler;
219 int mIMIPSend; 220 int mIMIPSend;
220 QStringList mAdditionalMails; 221 QStringList mAdditionalMails;
221 int mIMIPAutoRefresh; 222 int mIMIPAutoRefresh;
222 int mIMIPAutoInsertReply; 223 int mIMIPAutoInsertReply;
223 int mIMIPAutoInsertRequest; 224 int mIMIPAutoInsertRequest;
224 int mIMIPAutoFreeBusy; 225 int mIMIPAutoFreeBusy;
225 int mIMIPAutoFreeBusyReply; 226 int mIMIPAutoFreeBusyReply;
226 227
227 QStringList mTodoTemplates; 228 QStringList mTodoTemplates;
228 QStringList mEventTemplates; 229 QStringList mEventTemplates;
229 230
230 int mDestination; 231 int mDestination;
231 232
232 233
233 bool mEditOnDoubleClick; 234 bool mEditOnDoubleClick;
234 bool mViewChangeHoldFullscreen; 235 bool mViewChangeHoldFullscreen;
235 bool mViewChangeHoldNonFullscreen; 236 bool mViewChangeHoldNonFullscreen;
236 bool mCenterOnCurrentTime; 237 bool mCenterOnCurrentTime;
237 bool mSetTimeToDayStartAt; 238 bool mSetTimeToDayStartAt;
238 bool mHighlightCurrentDay; 239 bool mHighlightCurrentDay;
239 bool mUseHighlightLightColor; 240 bool mUseHighlightLightColor;
240 bool mListViewMonthTimespan; 241 bool mListViewMonthTimespan;
241 bool mWNViewShowsParents; 242 bool mWNViewShowsParents;
242 bool mWNViewShowsPast; 243 bool mWNViewShowsPast;
243 bool mWNViewShowLocation; 244 bool mWNViewShowLocation;
244 bool mTodoViewShowsPercentage; 245 bool mTodoViewShowsPercentage;
245 bool mTodoViewUsesCatColors; 246 bool mTodoViewUsesCatColors;
246 bool mMonthViewUsesBigFont; 247 bool mMonthViewUsesBigFont;
247 bool mTodoViewUsesSmallFont; 248 bool mTodoViewUsesSmallFont;
248 bool mTodoViewUsesForegroundColor; 249 bool mTodoViewUsesForegroundColor;
249 bool mMonthViewUsesForegroundColor; 250 bool mMonthViewUsesForegroundColor;
250 251
251 bool mHightlightDateTimeEdit; 252 bool mHightlightDateTimeEdit;
252 bool mShortDateInViewer; 253 bool mShortDateInViewer;
253 254
254 bool mShowDateNavigator; 255 bool mShowDateNavigator;
255 256
256 QStringList mLocationDefaults; 257 QStringList mLocationDefaults;
257 QStringList mEventSummaryUser; 258 QStringList mEventSummaryUser;
258 QStringList mTodoSummaryUser; 259 QStringList mTodoSummaryUser;
259 260
260 bool mUseInternalAlarmNotification; 261 bool mUseInternalAlarmNotification;
261 int mAlarmPlayBeeps; 262 int mAlarmPlayBeeps;
262 int mAlarmSuspendTime; 263 int mAlarmSuspendTime;
263 int mAlarmSuspendCount; 264 int mAlarmSuspendCount;
264 int mAlarmBeepInterval; 265 int mAlarmBeepInterval;
265 int mOldLanguage; 266 int mOldLanguage;
266 int mOldLoadedLanguage; 267 int mOldLoadedLanguage;
267 268
268 269
269 QString mActiveSyncPort; 270 QString mActiveSyncPort;
270 QString mActiveSyncIP; 271 QString mActiveSyncIP;
271 272
272 // settings for eventviewer 273 // settings for eventviewer
273 bool mEVshowDetails; 274 bool mEVshowDetails;
274 bool mEVshowCreated; 275 bool mEVshowCreated;
275 bool mEVshowChanged; 276 bool mEVshowChanged;
276 bool mWTshowDetails; 277 bool mWTshowDetails;
277 bool mWTshowCreated; 278 bool mWTshowCreated;
278 bool mWTshowChanged; 279 bool mWTshowChanged;
279 280
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index a164fa4..4f2cccf 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -478,342 +478,344 @@ void MainWindow::recieve( const QCString& cmsg, const QByteArray& data )
478 mView->viewManager()->showTodoView(); 478 mView->viewManager()->showTodoView();
479 } 479 }
480 else if ( msg == "-showJournal" ) { 480 else if ( msg == "-showJournal" ) {
481 mView->dateNavigator()->selectDates( 1 ); 481 mView->dateNavigator()->selectDates( 1 );
482 mView->dateNavigator()->selectToday(); 482 mView->dateNavigator()->selectToday();
483 mView->viewManager()->showJournalView(); 483 mView->viewManager()->showJournalView();
484 } 484 }
485 else if ( msg == "-showKO" ) { 485 else if ( msg == "-showKO" ) {
486 mView->viewManager()->showNextXView(); 486 mView->viewManager()->showNextXView();
487 } 487 }
488 else if ( msg == "-showWNext" || msg == "nextView()" ) { 488 else if ( msg == "-showWNext" || msg == "nextView()" ) {
489 mView->viewManager()->showWhatsNextView(); 489 mView->viewManager()->showWhatsNextView();
490 } 490 }
491 else if ( msg == "-showNextXView" ) { 491 else if ( msg == "-showNextXView" ) {
492 mView->viewManager()->showNextXView(); 492 mView->viewManager()->showNextXView();
493 } 493 }
494 494
495 495
496 } 496 }
497 497
498 showMaximized(); 498 showMaximized();
499 raise(); 499 raise();
500} 500}
501 501
502QPixmap MainWindow::loadPixmap( QString name ) 502QPixmap MainWindow::loadPixmap( QString name )
503{ 503{
504 return SmallIcon( name ); 504 return SmallIcon( name );
505 505
506} 506}
507void MainWindow::initActions() 507void MainWindow::initActions()
508{ 508{
509 //KOPrefs::instance()->mShowFullMenu 509 //KOPrefs::instance()->mShowFullMenu
510 iconToolBar->clear(); 510 iconToolBar->clear();
511 KOPrefs *p = KOPrefs::instance(); 511 KOPrefs *p = KOPrefs::instance();
512 //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar ); 512 //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar );
513 513
514 QPopupMenu *viewMenu = new QPopupMenu( this ); 514 QPopupMenu *viewMenu = new QPopupMenu( this );
515 QPopupMenu *actionMenu = new QPopupMenu( this ); 515 QPopupMenu *actionMenu = new QPopupMenu( this );
516 QPopupMenu *importMenu = new QPopupMenu( this ); 516 QPopupMenu *importMenu = new QPopupMenu( this );
517 selectFilterMenu = new QPopupMenu( this ); 517 selectFilterMenu = new QPopupMenu( this );
518 selectFilterMenu->setCheckable( true ); 518 selectFilterMenu->setCheckable( true );
519 syncMenu = new QPopupMenu( this ); 519 syncMenu = new QPopupMenu( this );
520 configureAgendaMenu = new QPopupMenu( this ); 520 configureAgendaMenu = new QPopupMenu( this );
521 configureToolBarMenu = new QPopupMenu( this ); 521 configureToolBarMenu = new QPopupMenu( this );
522 QPopupMenu *helpMenu = new QPopupMenu( this ); 522 QPopupMenu *helpMenu = new QPopupMenu( this );
523 if ( KOPrefs::instance()->mShowFullMenu ) { 523 if ( KOPrefs::instance()->mShowFullMenu ) {
524 QMenuBar *menuBar1; 524 QMenuBar *menuBar1;
525 menuBar1 = menuBar(); 525 menuBar1 = menuBar();
526 menuBar1->insertItem( i18n("File"), importMenu ); 526 menuBar1->insertItem( i18n("File"), importMenu );
527 menuBar1->insertItem( i18n("View"), viewMenu ); 527 menuBar1->insertItem( i18n("View"), viewMenu );
528 menuBar1->insertItem( i18n("Actions"), actionMenu ); 528 menuBar1->insertItem( i18n("Actions"), actionMenu );
529#ifdef DESKTOP_VERSION 529#ifdef DESKTOP_VERSION
530 menuBar1->insertItem( i18n("Synchronize"), syncMenu ); 530 menuBar1->insertItem( i18n("Synchronize"), syncMenu );
531 menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu ); 531 menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu );
532#else 532#else
533 menuBar1->insertItem( i18n("Sync"), syncMenu ); 533 menuBar1->insertItem( i18n("Sync"), syncMenu );
534 menuBar1->insertItem( i18n("Agenda"),configureAgendaMenu ); 534 menuBar1->insertItem( i18n("Agenda"),configureAgendaMenu );
535#endif 535#endif
536 //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu ); 536 //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu );
537 menuBar1->insertItem( i18n("Filter"),selectFilterMenu ); 537 menuBar1->insertItem( i18n("Filter"),selectFilterMenu );
538 menuBar1->insertItem( i18n("Help"), helpMenu ); 538 menuBar1->insertItem( i18n("Help"), helpMenu );
539 } else { 539 } else {
540 QPEMenuBar *menuBar1; 540 QPEMenuBar *menuBar1;
541 menuBar1 = new QPEMenuBar( iconToolBar ); 541 menuBar1 = new QPEMenuBar( iconToolBar );
542 QPopupMenu *menuBar = new QPopupMenu( this ); 542 QPopupMenu *menuBar = new QPopupMenu( this );
543 menuBar1->insertItem( i18n("ME"), menuBar); 543 menuBar1->insertItem( i18n("ME"), menuBar);
544 menuBar->insertItem( i18n("File"), importMenu ); 544 menuBar->insertItem( i18n("File"), importMenu );
545 menuBar->insertItem( i18n("View"), viewMenu ); 545 menuBar->insertItem( i18n("View"), viewMenu );
546 menuBar->insertItem( i18n("Actions"), actionMenu ); 546 menuBar->insertItem( i18n("Actions"), actionMenu );
547 menuBar->insertItem( i18n("Synchronize"), syncMenu ); 547 menuBar->insertItem( i18n("Synchronize"), syncMenu );
548 menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu ); 548 menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu );
549 menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); 549 menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu );
550 menuBar->insertItem( i18n("Filter"),selectFilterMenu ); 550 menuBar->insertItem( i18n("Filter"),selectFilterMenu );
551 menuBar->insertItem( i18n("Help"), helpMenu ); 551 menuBar->insertItem( i18n("Help"), helpMenu );
552 //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); 552 //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() );
553 menuBar1->setMaximumSize( menuBar1->sizeHint( )); 553 menuBar1->setMaximumSize( menuBar1->sizeHint( ));
554 } 554 }
555 connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); 555 connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) );
556 connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) ); 556 connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) );
557 QIconSet icon; 557 QIconSet icon;
558 int pixWid = 22, pixHei = 22; 558 int pixWid = 22, pixHei = 22;
559 QString pathString = ""; 559 QString pathString = "";
560 if ( !p->mToolBarMiniIcons ) { 560 if ( !p->mToolBarMiniIcons ) {
561 if ( QApplication::desktop()->width() < 480 ) { 561 if ( QApplication::desktop()->width() < 480 ) {
562 pathString += "icons16/"; 562 pathString += "icons16/";
563 pixWid = 18; pixHei = 16; 563 pixWid = 18; pixHei = 16;
564 } 564 }
565 } else { 565 } else {
566 pathString += "iconsmini/"; 566 pathString += "iconsmini/";
567 pixWid = 18; pixHei = 16; 567 pixWid = 18; pixHei = 16;
568 } 568 }
569 mWeekBgColor = iconToolBar->backgroundColor(); 569 mWeekBgColor = iconToolBar->backgroundColor();
570 mWeekPixmap.resize( pixWid , pixHei ); 570 mWeekPixmap.resize( pixWid , pixHei );
571 mWeekPixmap.fill( mWeekBgColor ); 571 mWeekPixmap.fill( mWeekBgColor );
572 icon = mWeekPixmap; 572 icon = mWeekPixmap;
573 mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this ); 573 mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this );
574 mWeekAction->addTo( iconToolBar ); 574 if ( p-> mShowIconWeekNum )
575 mWeekAction->addTo( iconToolBar );
575 mWeekFont = font(); 576 mWeekFont = font();
576 577
577 int fontPoint = mWeekFont.pointSize(); 578 int fontPoint = mWeekFont.pointSize();
578 QFontMetrics f( mWeekFont ); 579 QFontMetrics f( mWeekFont );
579 int fontWid = f.width( "30" ); 580 int fontWid = f.width( "30" );
580 while ( fontWid > pixWid ) { 581 while ( fontWid > pixWid ) {
581 --fontPoint; 582 --fontPoint;
582 mWeekFont.setPointSize( fontPoint ); 583 mWeekFont.setPointSize( fontPoint );
583 QFontMetrics f( mWeekFont ); 584 QFontMetrics f( mWeekFont );
584 fontWid = f.width( "30" ); 585 fontWid = f.width( "30" );
585 qDebug("dec-- "); 586 qDebug("dec-- ");
586 } 587 }
587 588
588 connect( mWeekAction, SIGNAL( activated() ), 589 connect( mWeekAction, SIGNAL( activated() ),
589 this, SLOT( weekAction() ) ); 590 this, SLOT( weekAction() ) );
590 591
591 connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) ); 592 connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) );
592 593
593 //#endif 594 //#endif
594 // ****************** 595 // ******************
595 QAction *action; 596 QAction *action;
596 // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); 597 // QPopupMenu *configureMenu= new QPopupMenu( menuBar );
597 configureToolBarMenu->setCheckable( true ); 598 configureToolBarMenu->setCheckable( true );
598 599
599 600
600 configureAgendaMenu->setCheckable( true ); 601 configureAgendaMenu->setCheckable( true );
601 int iii ; 602 int iii ;
602 for ( iii = 1;iii<= 10 ;++iii ){ 603 for ( iii = 1;iii<= 10 ;++iii ){
603 configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 ); 604 configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 );
604 } 605 }
605 //configureMenu->insertItem( "AgendaSize",configureAgendaMenu ); 606 //configureMenu->insertItem( "AgendaSize",configureAgendaMenu );
606 607
607 connect( configureAgendaMenu, SIGNAL( aboutToShow()), 608 connect( configureAgendaMenu, SIGNAL( aboutToShow()),
608 this, SLOT( showConfigureAgenda( ) ) ); 609 this, SLOT( showConfigureAgenda( ) ) );
609 610
610 icon = loadPixmap( pathString + "configure" ); 611 icon = loadPixmap( pathString + "configure" );
611 action = new QAction( i18n("Configure"),icon, i18n("Configure..."), 0, this ); 612 action = new QAction( i18n("Configure"),icon, i18n("Configure..."), 0, this );
612 action->addTo( actionMenu ); 613 action->addTo( actionMenu );
613 connect( action, SIGNAL( activated() ), 614 connect( action, SIGNAL( activated() ),
614 mView, SLOT( edit_options() ) ); 615 mView, SLOT( edit_options() ) );
615 actionMenu->insertSeparator(); 616 actionMenu->insertSeparator();
616 617
617 action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); 618 action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this );
618 action->addTo( actionMenu ); 619 action->addTo( actionMenu );
619 connect( action, SIGNAL( activated() ), 620 connect( action, SIGNAL( activated() ),
620 mView, SLOT( undo_delete() ) ); 621 mView, SLOT( undo_delete() ) );
621 actionMenu->insertSeparator(); 622 actionMenu->insertSeparator();
622 623
623 icon = loadPixmap( pathString + "newevent" ); 624 icon = loadPixmap( pathString + "newevent" );
624 configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); 625 configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 );
625 configureToolBarMenu->insertSeparator(); 626 configureToolBarMenu->insertSeparator();
627 configureToolBarMenu->insertItem(i18n("Week Number"), 400);
626 configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); 628 configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 );
627 QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); 629 QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this );
628 ne_action->addTo( actionMenu ); 630 ne_action->addTo( actionMenu );
629 connect( ne_action, SIGNAL( activated() ), 631 connect( ne_action, SIGNAL( activated() ),
630 mView, SLOT( newEvent() ) ); 632 mView, SLOT( newEvent() ) );
631 icon = loadPixmap( pathString + "newtodo" ); 633 icon = loadPixmap( pathString + "newtodo" );
632 configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); 634 configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 );
633 QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); 635 QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this );
634 nt_action->addTo( actionMenu ); 636 nt_action->addTo( actionMenu );
635 connect( nt_action, SIGNAL( activated() ), 637 connect( nt_action, SIGNAL( activated() ),
636 mView, SLOT( newTodo() ) ); 638 mView, SLOT( newTodo() ) );
637 639
638 icon = loadPixmap( pathString + "today" ); 640 icon = loadPixmap( pathString + "today" );
639 QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); 641 QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this );
640 today_action->addTo( viewMenu ); 642 today_action->addTo( viewMenu );
641 connect( today_action, SIGNAL( activated() ), 643 connect( today_action, SIGNAL( activated() ),
642 mView, SLOT( goToday() ) ); 644 mView, SLOT( goToday() ) );
643 viewMenu->insertSeparator(); 645 viewMenu->insertSeparator();
644 646
645 icon = loadPixmap( pathString + "navi" ); 647 icon = loadPixmap( pathString + "navi" );
646 action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); 648 action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this );
647 action->addTo( viewMenu ); 649 action->addTo( viewMenu );
648 connect( action, SIGNAL( activated() ), 650 connect( action, SIGNAL( activated() ),
649 mView, SLOT( toggleDateNavigatorWidget() ) ); 651 mView, SLOT( toggleDateNavigatorWidget() ) );
650 mToggleNav = action ; 652 mToggleNav = action ;
651 icon = loadPixmap( pathString + "filter" ); 653 icon = loadPixmap( pathString + "filter" );
652 action = new QAction( i18n("Toggle FilterView"), icon, i18n("Toggle FilterView"), 0, this ); 654 action = new QAction( i18n("Toggle FilterView"), icon, i18n("Toggle FilterView"), 0, this );
653 action->addTo( viewMenu ); 655 action->addTo( viewMenu );
654 connect( action, SIGNAL( activated() ), 656 connect( action, SIGNAL( activated() ),
655 mView, SLOT( toggleFilter() ) ); 657 mView, SLOT( toggleFilter() ) );
656 mToggleFilter = action; 658 mToggleFilter = action;
657 icon = loadPixmap( pathString + "allday" ); 659 icon = loadPixmap( pathString + "allday" );
658 action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); 660 action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this );
659 action->addTo( viewMenu ); 661 action->addTo( viewMenu );
660 connect( action, SIGNAL( activated() ), 662 connect( action, SIGNAL( activated() ),
661 mView, SLOT( toggleAllDaySize() ) ); 663 mView, SLOT( toggleAllDaySize() ) );
662 mToggleAllday = action; 664 mToggleAllday = action;
663 665
664 666
665 connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), 667 connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ),
666 mToggleNav, SLOT( setEnabled ( bool ) ) ); 668 mToggleNav, SLOT( setEnabled ( bool ) ) );
667 connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), 669 connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ),
668 mToggleFilter, SLOT( setEnabled ( bool ) ) ); 670 mToggleFilter, SLOT( setEnabled ( bool ) ) );
669 connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), 671 connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ),
670 mToggleAllday, SLOT( setEnabled ( bool ) ) ); 672 mToggleAllday, SLOT( setEnabled ( bool ) ) );
671 673
672 viewMenu->insertSeparator(); 674 viewMenu->insertSeparator();
673 icon = loadPixmap( pathString + "picker" ); 675 icon = loadPixmap( pathString + "picker" );
674 action = new QAction( i18n("Date Picker"), icon, i18n("Date Picker"), 0, this ); 676 action = new QAction( i18n("Date Picker"), icon, i18n("Date Picker"), 0, this );
675 action->addTo( viewMenu ); 677 action->addTo( viewMenu );
676 connect( action, SIGNAL( activated() ), 678 connect( action, SIGNAL( activated() ),
677 mView, SLOT( showDatePicker() ) ); 679 mView, SLOT( showDatePicker() ) );
678 action->addTo( iconToolBar ); 680 action->addTo( iconToolBar );
679 viewMenu->insertSeparator(); 681 viewMenu->insertSeparator();
680 icon = loadPixmap( pathString + "list" ); 682 icon = loadPixmap( pathString + "list" );
681 configureToolBarMenu->insertItem(icon, i18n("List View"), 30 ); 683 configureToolBarMenu->insertItem(icon, i18n("List View"), 30 );
682 QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this ); 684 QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this );
683 showlist_action->addTo( viewMenu ); 685 showlist_action->addTo( viewMenu );
684 connect( showlist_action, SIGNAL( activated() ), 686 connect( showlist_action, SIGNAL( activated() ),
685 mView->viewManager(), SLOT( showListView() ) ); 687 mView->viewManager(), SLOT( showListView() ) );
686 688
687 689
688 icon = loadPixmap( pathString + "day" ); 690 icon = loadPixmap( pathString + "day" );
689 configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); 691 configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 );
690 QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this ); 692 QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this );
691 day1_action->addTo( viewMenu ); 693 day1_action->addTo( viewMenu );
692 // action->addTo( toolBar ); 694 // action->addTo( toolBar );
693 connect( day1_action, SIGNAL( activated() ), 695 connect( day1_action, SIGNAL( activated() ),
694 mView->viewManager(), SLOT( showDayView() ) ); 696 mView->viewManager(), SLOT( showDayView() ) );
695 697
696 icon = loadPixmap( pathString + "workweek" ); 698 icon = loadPixmap( pathString + "workweek" );
697 configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); 699 configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 );
698 QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); 700 QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this );
699 day5_action->addTo( viewMenu ); 701 day5_action->addTo( viewMenu );
700 connect( day5_action, SIGNAL( activated() ), 702 connect( day5_action, SIGNAL( activated() ),
701 mView->viewManager(), SLOT( showWorkWeekView() ) ); 703 mView->viewManager(), SLOT( showWorkWeekView() ) );
702 704
703 icon = loadPixmap( pathString + "week" ); 705 icon = loadPixmap( pathString + "week" );
704 configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); 706 configureToolBarMenu->insertItem(icon, i18n("Week"), 60 );
705 QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); 707 QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this );
706 day7_action->addTo( viewMenu ); 708 day7_action->addTo( viewMenu );
707 connect( day7_action, SIGNAL( activated() ), 709 connect( day7_action, SIGNAL( activated() ),
708 mView->viewManager(), SLOT( showWeekView() ) ); 710 mView->viewManager(), SLOT( showWeekView() ) );
711
712 icon = loadPixmap( pathString + "workweek2" );
713 configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 );
714 QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this );
715 day6_action->addTo( viewMenu );
716 connect( day6_action, SIGNAL( activated() ),
717 mView->viewManager(), SLOT( showMonthViewWeek() ) );
709 718
710 icon = loadPixmap( pathString + "month" ); 719 icon = loadPixmap( pathString + "month" );
711 configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); 720 configureToolBarMenu->insertItem(icon, i18n("Month"), 70 );
712 QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); 721 QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this );
713 month_action->addTo( viewMenu ); 722 month_action->addTo( viewMenu );
714 connect( month_action, SIGNAL( activated() ), 723 connect( month_action, SIGNAL( activated() ),
715 mView->viewManager(), SLOT( showMonthView() ) ); 724 mView->viewManager(), SLOT( showMonthView() ) );
716 725
717 icon = loadPixmap( pathString + "workweek2" );
718 configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 );
719 QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this );
720 day6_action->addTo( viewMenu );
721 connect( day6_action, SIGNAL( activated() ),
722 mView->viewManager(), SLOT( showMonthViewWeek() ) );
723
724 icon = loadPixmap( pathString + "todo" ); 726 icon = loadPixmap( pathString + "todo" );
725 configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); 727 configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 );
726 QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); 728 QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this );
727 todoview_action->addTo( viewMenu ); 729 todoview_action->addTo( viewMenu );
728 connect( todoview_action, SIGNAL( activated() ), 730 connect( todoview_action, SIGNAL( activated() ),
729 mView->viewManager(), SLOT( showTodoView() ) ); 731 mView->viewManager(), SLOT( showTodoView() ) );
730 732
731 icon = loadPixmap( pathString + "journal" ); 733 icon = loadPixmap( pathString + "journal" );
732 configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); 734 configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 );
733 QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); 735 QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this );
734 viewjournal_action->addTo( viewMenu ); 736 viewjournal_action->addTo( viewMenu );
735 connect( viewjournal_action, SIGNAL( activated() ), 737 connect( viewjournal_action, SIGNAL( activated() ),
736 mView->viewManager(), SLOT( showJournalView() ) ); 738 mView->viewManager(), SLOT( showJournalView() ) );
737 739
738 icon = loadPixmap( pathString + "xdays" ); 740 icon = loadPixmap( pathString + "xdays" );
739 configureToolBarMenu->insertItem(icon, i18n("Next days"), 100,4 ); 741 configureToolBarMenu->insertItem(icon, i18n("Next days"), 100,4 );
740 QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); 742 QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this );
741 xdays_action->addTo( viewMenu ); 743 xdays_action->addTo( viewMenu );
742 connect( xdays_action, SIGNAL( activated() ), 744 connect( xdays_action, SIGNAL( activated() ),
743 mView->viewManager(), SLOT( showNextXView() ) ); 745 mView->viewManager(), SLOT( showNextXView() ) );
744 746
745 icon = loadPixmap( pathString + "whatsnext" ); 747 icon = loadPixmap( pathString + "whatsnext" );
746 configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110, 4 ); 748 configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110, 4 );
747 QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); 749 QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this );
748 whatsnext_action->addTo( viewMenu ); 750 whatsnext_action->addTo( viewMenu );
749 connect( whatsnext_action, SIGNAL( activated() ), 751 connect( whatsnext_action, SIGNAL( activated() ),
750 mView->viewManager(), SLOT( showWhatsNextView() ) ); 752 mView->viewManager(), SLOT( showWhatsNextView() ) );
751 753
752#if 0 754#if 0
753 action = new QAction( "view_timespan", "Time Span", 0, this ); 755 action = new QAction( "view_timespan", "Time Span", 0, this );
754 action->addTo( viewMenu ); 756 action->addTo( viewMenu );
755 connect( action, SIGNAL( activated() ), 757 connect( action, SIGNAL( activated() ),
756 mView->viewManager(), SLOT( showTimeSpanView() ) ); 758 mView->viewManager(), SLOT( showTimeSpanView() ) );
757#endif 759#endif
758 760
759 mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, 761 mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0,
760 this ); 762 this );
761 mNewSubTodoAction->addTo( actionMenu ); 763 mNewSubTodoAction->addTo( actionMenu );
762 connect( mNewSubTodoAction, SIGNAL( activated() ), 764 connect( mNewSubTodoAction, SIGNAL( activated() ),
763 mView, SLOT( newSubTodo() ) ); 765 mView, SLOT( newSubTodo() ) );
764 766
765 actionMenu->insertSeparator(); 767 actionMenu->insertSeparator();
766 768
767 mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this ); 769 mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this );
768 mShowAction->addTo( actionMenu ); 770 mShowAction->addTo( actionMenu );
769 connect( mShowAction, SIGNAL( activated() ), 771 connect( mShowAction, SIGNAL( activated() ),
770 mView, SLOT( showIncidence() ) ); 772 mView, SLOT( showIncidence() ) );
771 773
772 mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); 774 mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this );
773 mEditAction->addTo( actionMenu ); 775 mEditAction->addTo( actionMenu );
774 connect( mEditAction, SIGNAL( activated() ), 776 connect( mEditAction, SIGNAL( activated() ),
775 mView, SLOT( editIncidence() ) ); 777 mView, SLOT( editIncidence() ) );
776 778
777 mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); 779 mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this );
778 mDeleteAction->addTo( actionMenu ); 780 mDeleteAction->addTo( actionMenu );
779 connect( mDeleteAction, SIGNAL( activated() ), 781 connect( mDeleteAction, SIGNAL( activated() ),
780 mView, SLOT( deleteIncidence() ) ); 782 mView, SLOT( deleteIncidence() ) );
781 783
782 784
783 mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this ); 785 mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this );
784 mCloneAction->addTo( actionMenu ); 786 mCloneAction->addTo( actionMenu );
785 connect( mCloneAction, SIGNAL( activated() ), 787 connect( mCloneAction, SIGNAL( activated() ),
786 mView, SLOT( cloneIncidence() ) ); 788 mView, SLOT( cloneIncidence() ) );
787 mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this ); 789 mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this );
788 mMoveAction->addTo( actionMenu ); 790 mMoveAction->addTo( actionMenu );
789 connect( mMoveAction, SIGNAL( activated() ), 791 connect( mMoveAction, SIGNAL( activated() ),
790 mView, SLOT( moveIncidence() ) ); 792 mView, SLOT( moveIncidence() ) );
791 mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this ); 793 mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this );
792 mBeamAction->addTo( actionMenu ); 794 mBeamAction->addTo( actionMenu );
793 connect( mBeamAction, SIGNAL( activated() ), 795 connect( mBeamAction, SIGNAL( activated() ),
794 mView, SLOT( beamIncidence() ) ); 796 mView, SLOT( beamIncidence() ) );
795 mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); 797 mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this );
796 mCancelAction->addTo( actionMenu ); 798 mCancelAction->addTo( actionMenu );
797 connect( mCancelAction, SIGNAL( activated() ), 799 connect( mCancelAction, SIGNAL( activated() ),
798 mView, SLOT( toggleCancelIncidence() ) ); 800 mView, SLOT( toggleCancelIncidence() ) );
799 801
800 actionMenu->insertSeparator(); 802 actionMenu->insertSeparator();
801 803
802 action = new QAction( "purge_completed", i18n("Purge Completed"), 0, 804 action = new QAction( "purge_completed", i18n("Purge Completed"), 0,
803 this ); 805 this );
804 action->addTo( actionMenu ); 806 action->addTo( actionMenu );
805 connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); 807 connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) );
806 808
807 icon = loadPixmap( pathString + "search" ); 809 icon = loadPixmap( pathString + "search" );
808 QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); 810 QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this );
809 configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 4); 811 configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 4);
810 search_action->addTo( actionMenu ); 812 search_action->addTo( actionMenu );
811 connect( search_action, SIGNAL( activated() ), 813 connect( search_action, SIGNAL( activated() ),
812 mView->dialogManager(), SLOT( showSearchDialog() ) ); 814 mView->dialogManager(), SLOT( showSearchDialog() ) );
813 815
814 816
815 817
816 if ( KOPrefs::instance()->mShowFullMenu ) { 818 if ( KOPrefs::instance()->mShowFullMenu ) {
817 actionMenu->insertSeparator(); 819 actionMenu->insertSeparator();
818 actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu ); 820 actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu );
819 821
@@ -908,279 +910,280 @@ void MainWindow::initActions()
908 connect( action, SIGNAL( activated() ), 910 connect( action, SIGNAL( activated() ),
909 this, SLOT( printSel() ) ); 911 this, SLOT( printSel() ) );
910 action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this ); 912 action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this );
911 action->addTo( importMenu ); 913 action->addTo( importMenu );
912 connect( action, SIGNAL( activated() ), 914 connect( action, SIGNAL( activated() ),
913 mView->viewManager(), SIGNAL( printWNV() ) ); 915 mView->viewManager(), SIGNAL( printWNV() ) );
914#endif 916#endif
915 importMenu->insertSeparator(); 917 importMenu->insertSeparator();
916 action = new QAction( "beam all", i18n("Save"), 0, 918 action = new QAction( "beam all", i18n("Save"), 0,
917 this ); 919 this );
918 action->addTo( importMenu ); 920 action->addTo( importMenu );
919 connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); 921 connect( action, SIGNAL( activated() ), this, SLOT( save() ) );
920 action = new QAction( "beam all", i18n("Exit (+save)"), 0, 922 action = new QAction( "beam all", i18n("Exit (+save)"), 0,
921 this ); 923 this );
922 action->addTo( importMenu ); 924 action->addTo( importMenu );
923 connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); 925 connect( action, SIGNAL( activated() ), this, SLOT( close() ) );
924 926
925 //menuBar->insertItem( "Configure",configureMenu ); 927 //menuBar->insertItem( "Configure",configureMenu );
926 //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); 928 //configureMenu->insertItem( "Toolbar",configureToolBarMenu );
927 icon = loadPixmap( "korganizer/korganizer" ); 929 icon = loadPixmap( "korganizer/korganizer" );
928 930
929 action = new QAction( "Whats New", i18n("What's new?"), 0,this ); 931 action = new QAction( "Whats New", i18n("What's new?"), 0,this );
930 action->addTo( helpMenu ); 932 action->addTo( helpMenu );
931 connect( action, SIGNAL( activated() ), 933 connect( action, SIGNAL( activated() ),
932 SLOT( whatsNew() ) ); 934 SLOT( whatsNew() ) );
933 action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); 935 action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this );
934 action->addTo( helpMenu ); 936 action->addTo( helpMenu );
935 connect( action, SIGNAL( activated() ), 937 connect( action, SIGNAL( activated() ),
936 SLOT( features() ) ); 938 SLOT( features() ) );
937 action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); 939 action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this );
938 action->addTo( helpMenu ); 940 action->addTo( helpMenu );
939 connect( action, SIGNAL( activated() ), 941 connect( action, SIGNAL( activated() ),
940 SLOT( keyBindings() ) ); 942 SLOT( keyBindings() ) );
941 action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); 943 action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this );
942 action->addTo( helpMenu ); 944 action->addTo( helpMenu );
943 connect( action, SIGNAL( activated() ), 945 connect( action, SIGNAL( activated() ),
944 SLOT( synchowto() ) ); 946 SLOT( synchowto() ) );
945 action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this ); 947 action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this );
946 action->addTo( helpMenu ); 948 action->addTo( helpMenu );
947 connect( action, SIGNAL( activated() ), 949 connect( action, SIGNAL( activated() ),
948 SLOT( kdesynchowto() ) ); 950 SLOT( kdesynchowto() ) );
949 action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this ); 951 action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this );
950 action->addTo( helpMenu ); 952 action->addTo( helpMenu );
951 connect( action, SIGNAL( activated() ), 953 connect( action, SIGNAL( activated() ),
952 SLOT( multisynchowto() ) ); 954 SLOT( multisynchowto() ) );
953 action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); 955 action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this );
954 action->addTo( helpMenu ); 956 action->addTo( helpMenu );
955 connect( action, SIGNAL( activated() ), 957 connect( action, SIGNAL( activated() ),
956 SLOT( aboutAutoSaving() ) ); 958 SLOT( aboutAutoSaving() ) );
957 action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); 959 action = new QAction( "Problemd", i18n("Known Problems..."), 0,this );
958 action->addTo( helpMenu ); 960 action->addTo( helpMenu );
959 connect( action, SIGNAL( activated() ), 961 connect( action, SIGNAL( activated() ),
960 SLOT( aboutKnownBugs() ) ); 962 SLOT( aboutKnownBugs() ) );
961 action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); 963 action = new QAction( "Translate Howto", i18n("User translation..."), 0,this );
962 action->addTo( helpMenu ); 964 action->addTo( helpMenu );
963 connect( action, SIGNAL( activated() ), 965 connect( action, SIGNAL( activated() ),
964 SLOT( usertrans() ) ); 966 SLOT( usertrans() ) );
965 action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); 967 action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this );
966 action->addTo( helpMenu ); 968 action->addTo( helpMenu );
967 connect( action, SIGNAL( activated() ), 969 connect( action, SIGNAL( activated() ),
968 SLOT( faq() ) ); 970 SLOT( faq() ) );
969 action = new QAction( "licence", i18n("Licence..."), 0, this ); 971 action = new QAction( "licence", i18n("Licence..."), 0, this );
970 action->addTo( helpMenu ); 972 action->addTo( helpMenu );
971 connect( action, SIGNAL( activated() ), 973 connect( action, SIGNAL( activated() ),
972 SLOT( licence() ) ); 974 SLOT( licence() ) );
973 action = new QAction( "about", i18n("About..."), 0, this ); 975 action = new QAction( "about", i18n("About..."), 0, this );
974 action->addTo( helpMenu ); 976 action->addTo( helpMenu );
975 connect( action, SIGNAL( activated() ), 977 connect( action, SIGNAL( activated() ),
976 SLOT( about() ) ); 978 SLOT( about() ) );
977 //menuBar->insertSeparator(); 979 //menuBar->insertSeparator();
978 980
979 // ****************************************************** 981 // ******************************************************
980 // menubar icons 982 // menubar icons
981 983
982 984
983 iconToolBar->setHorizontalStretchable (true ); 985 iconToolBar->setHorizontalStretchable (true );
984 //menuBar->insertItem( iconToolBar ); 986 //menuBar->insertItem( iconToolBar );
985 //xdays_action 987 //xdays_action
986 if (p-> mShowIconNewEvent) 988 if (p-> mShowIconNewEvent)
987 ne_action->addTo( iconToolBar ); 989 ne_action->addTo( iconToolBar );
988 if (p->mShowIconNewTodo ) 990 if (p->mShowIconNewTodo )
989 nt_action->addTo( iconToolBar ); 991 nt_action->addTo( iconToolBar );
990 if (p-> mShowIconSearch) 992 if (p-> mShowIconSearch)
991 search_action->addTo( iconToolBar ); 993 search_action->addTo( iconToolBar );
992 if (p-> mShowIconNext) 994 if (p-> mShowIconNext)
993 whatsnext_action->addTo( iconToolBar ); 995 whatsnext_action->addTo( iconToolBar );
994 if (p-> mShowIconNextDays) 996 if (p-> mShowIconNextDays)
995 xdays_action->addTo( iconToolBar ); 997 xdays_action->addTo( iconToolBar );
996 if (p-> mShowIconList) 998 if (p-> mShowIconList)
997 showlist_action->addTo( iconToolBar ); 999 showlist_action->addTo( iconToolBar );
998 if (p-> mShowIconDay1) 1000 if (p-> mShowIconDay1)
999 day1_action->addTo( iconToolBar ); 1001 day1_action->addTo( iconToolBar );
1000 if (p-> mShowIconDay5) 1002 if (p-> mShowIconDay5)
1001 day5_action->addTo( iconToolBar ); 1003 day5_action->addTo( iconToolBar );
1002 if (p-> mShowIconDay7) 1004 if (p-> mShowIconDay7)
1003 day7_action->addTo( iconToolBar ); 1005 day7_action->addTo( iconToolBar );
1004 if (p-> mShowIconMonth)
1005 month_action->addTo( iconToolBar );
1006 if (p-> mShowIconDay6) 1006 if (p-> mShowIconDay6)
1007 day6_action->addTo( iconToolBar ); 1007 day6_action->addTo( iconToolBar );
1008 if (p-> mShowIconMonth)
1009 month_action->addTo( iconToolBar );
1008 if (p-> mShowIconTodoview) 1010 if (p-> mShowIconTodoview)
1009 todoview_action->addTo( iconToolBar ); 1011 todoview_action->addTo( iconToolBar );
1010 if (p-> mShowIconJournal) 1012 if (p-> mShowIconJournal)
1011 viewjournal_action->addTo( iconToolBar ); 1013 viewjournal_action->addTo( iconToolBar );
1012 icon = loadPixmap( pathString + "2leftarrowB" ); 1014 icon = loadPixmap( pathString + "2leftarrowB" );
1013 configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200, 14); 1015 configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200, 14);
1014 if (p-> mShowIconBackFast) { 1016 if (p-> mShowIconBackFast) {
1015 action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); 1017 action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this );
1016 connect( action, SIGNAL( activated() ), 1018 connect( action, SIGNAL( activated() ),
1017 mView, SLOT( goPreviousMonth() ) ); 1019 mView, SLOT( goPreviousMonth() ) );
1018 action->addTo( iconToolBar ); 1020 action->addTo( iconToolBar );
1019 } 1021 }
1020 icon = loadPixmap( pathString + "1leftarrowB" ); 1022 icon = loadPixmap( pathString + "1leftarrowB" );
1021 configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210,15); 1023 configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210,15);
1022 if (p-> mShowIconBack) { 1024 if (p-> mShowIconBack) {
1023 action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); 1025 action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this );
1024 connect( action, SIGNAL( activated() ), 1026 connect( action, SIGNAL( activated() ),
1025 mView, SLOT( goPrevious() ) ); 1027 mView, SLOT( goPrevious() ) );
1026 action->addTo( iconToolBar ); 1028 action->addTo( iconToolBar );
1027 } 1029 }
1028 icon = loadPixmap( pathString + "today" ); 1030 icon = loadPixmap( pathString + "today" );
1029 configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130); 1031 configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130);
1030 if (p-> mShowIconToday) 1032 if (p-> mShowIconToday)
1031 today_action->addTo( iconToolBar ); 1033 today_action->addTo( iconToolBar );
1032 icon = loadPixmap( pathString + "1rightarrowB" ); 1034 icon = loadPixmap( pathString + "1rightarrowB" );
1033 configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); 1035 configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220);
1034 if (p-> mShowIconForward) { 1036 if (p-> mShowIconForward) {
1035 action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); 1037 action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this );
1036 connect( action, SIGNAL( activated() ), 1038 connect( action, SIGNAL( activated() ),
1037 mView, SLOT( goNext() ) ); 1039 mView, SLOT( goNext() ) );
1038 action->addTo( iconToolBar ); 1040 action->addTo( iconToolBar );
1039 } 1041 }
1040 icon = loadPixmap( pathString + "2rightarrowB" ); 1042 icon = loadPixmap( pathString + "2rightarrowB" );
1041 configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); 1043 configureToolBarMenu->insertItem(icon, i18n("Next month"), 230);
1042 if (p-> mShowIconForwardFast) { 1044 if (p-> mShowIconForwardFast) {
1043 action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this ); 1045 action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this );
1044 connect( action, SIGNAL( activated() ), 1046 connect( action, SIGNAL( activated() ),
1045 mView, SLOT( goNextMonth() ) ); 1047 mView, SLOT( goNextMonth() ) );
1046 action->addTo( iconToolBar ); 1048 action->addTo( iconToolBar );
1047 } 1049 }
1048 1050
1049 1051
1050 configureToolBarMenu->insertItem(i18n("What's This?"), 300); 1052 configureToolBarMenu->insertItem(i18n("What's This?"), 300);
1051 1053
1052 if (p-> mShowIconNewEvent) 1054 if (p-> mShowIconNewEvent)
1053 configureToolBarMenu->setItemChecked( 10, true ); 1055 configureToolBarMenu->setItemChecked( 10, true );
1054 if (p->mShowIconNewTodo ) 1056 if (p->mShowIconNewTodo )
1055 configureToolBarMenu->setItemChecked( 20, true ); 1057 configureToolBarMenu->setItemChecked( 20, true );
1056 if (p-> mShowIconSearch) 1058 if (p-> mShowIconSearch)
1057 configureToolBarMenu->setItemChecked( 120, true ); 1059 configureToolBarMenu->setItemChecked( 120, true );
1058 if (p-> mShowIconList) 1060 if (p-> mShowIconList)
1059 configureToolBarMenu->setItemChecked( 30, true ); 1061 configureToolBarMenu->setItemChecked( 30, true );
1060 if (p-> mShowIconDay1) 1062 if (p-> mShowIconDay1)
1061 configureToolBarMenu->setItemChecked( 40, true ); 1063 configureToolBarMenu->setItemChecked( 40, true );
1062 if (p-> mShowIconDay5) 1064 if (p-> mShowIconDay5)
1063 configureToolBarMenu->setItemChecked( 50, true ); 1065 configureToolBarMenu->setItemChecked( 50, true );
1064 if (p-> mShowIconDay6) 1066 if (p-> mShowIconDay6)
1065 configureToolBarMenu->setItemChecked( 75, true ); 1067 configureToolBarMenu->setItemChecked( 75, true );
1066 if (p-> mShowIconDay7) 1068 if (p-> mShowIconDay7)
1067 configureToolBarMenu->setItemChecked( 60, true ); 1069 configureToolBarMenu->setItemChecked( 60, true );
1068 if (p-> mShowIconMonth) 1070 if (p-> mShowIconMonth)
1069 configureToolBarMenu->setItemChecked( 70, true ); 1071 configureToolBarMenu->setItemChecked( 70, true );
1070 if (p-> mShowIconTodoview) 1072 if (p-> mShowIconTodoview)
1071 configureToolBarMenu->setItemChecked( 80, true ); 1073 configureToolBarMenu->setItemChecked( 80, true );
1072 if (p-> mShowIconBackFast) 1074 if (p-> mShowIconBackFast)
1073 configureToolBarMenu->setItemChecked( 200, true ); 1075 configureToolBarMenu->setItemChecked( 200, true );
1074 if (p-> mShowIconBack) 1076 if (p-> mShowIconBack)
1075 configureToolBarMenu->setItemChecked( 210, true ); 1077 configureToolBarMenu->setItemChecked( 210, true );
1076 if (p-> mShowIconToday) 1078 if (p-> mShowIconToday)
1077 configureToolBarMenu->setItemChecked( 130, true ); 1079 configureToolBarMenu->setItemChecked( 130, true );
1078 if (p-> mShowIconForward) 1080 if (p-> mShowIconForward)
1079 configureToolBarMenu->setItemChecked( 220, true ); 1081 configureToolBarMenu->setItemChecked( 220, true );
1080 if (p-> mShowIconForwardFast) 1082 if (p-> mShowIconForwardFast)
1081 configureToolBarMenu->setItemChecked( 230, true ); 1083 configureToolBarMenu->setItemChecked( 230, true );
1082 if (p-> mShowIconNextDays) 1084 if (p-> mShowIconNextDays)
1083 configureToolBarMenu->setItemChecked( 100, true ); 1085 configureToolBarMenu->setItemChecked( 100, true );
1084 if (p-> mShowIconNext) 1086 if (p-> mShowIconNext)
1085 configureToolBarMenu->setItemChecked( 110, true ); 1087 configureToolBarMenu->setItemChecked( 110, true );
1086 if (p-> mShowIconJournal) 1088 if (p-> mShowIconJournal)
1087 configureToolBarMenu->setItemChecked( 90, true ); 1089 configureToolBarMenu->setItemChecked( 90, true );
1088 if (p-> mShowIconWhatsThis) 1090 if (p-> mShowIconWhatsThis)
1089 configureToolBarMenu->setItemChecked( 300, true ); 1091 configureToolBarMenu->setItemChecked( 300, true );
1090 1092 if (p-> mShowIconWeekNum)
1093 configureToolBarMenu->setItemChecked( 400, true );
1091 QLabel* dummy = new QLabel( iconToolBar ); 1094 QLabel* dummy = new QLabel( iconToolBar );
1092 dummy->setBackgroundColor( iconToolBar->backgroundColor() ); 1095 dummy->setBackgroundColor( iconToolBar->backgroundColor() );
1093 if (!p-> mShowIconStretch) 1096 if (!p-> mShowIconStretch)
1094 iconToolBar->setStretchableWidget ( dummy ) ; 1097 iconToolBar->setStretchableWidget ( dummy ) ;
1095 else 1098 else
1096 configureToolBarMenu->setItemChecked( 5, true ); 1099 configureToolBarMenu->setItemChecked( 5, true );
1097 if (p-> mShowIconWhatsThis) 1100 if (p-> mShowIconWhatsThis)
1098 QWhatsThis::whatsThisButton ( iconToolBar ); 1101 QWhatsThis::whatsThisButton ( iconToolBar );
1099 connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); 1102 connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) );
1100 configureAgenda( p->mHourSize ); 1103 configureAgenda( p->mHourSize );
1101 connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) ); 1104 connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) );
1102} 1105}
1103 1106
1104void MainWindow::exportToPhone( int mode ) 1107void MainWindow::exportToPhone( int mode )
1105{ 1108{
1106 1109
1107 //ex2phone->insertItem(i18n("Complete calendar..."), 1 ); 1110 //ex2phone->insertItem(i18n("Complete calendar..."), 1 );
1108 //ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); 1111 //ex2phone->insertItem(i18n("Filtered calendar..."), 2 );
1109 KOex2phonePrefs ex2phone; 1112 KOex2phonePrefs ex2phone;
1110 1113
1111 ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); 1114 ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection );
1112 ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); 1115 ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice );
1113 ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); 1116 ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel );
1114 if ( mode == 1 ) 1117 if ( mode == 1 )
1115 ex2phone.setCaption(i18n("Export complete calendar")); 1118 ex2phone.setCaption(i18n("Export complete calendar"));
1116 if ( mode == 2 ) 1119 if ( mode == 2 )
1117 ex2phone.setCaption(i18n("Export filtered calendar")); 1120 ex2phone.setCaption(i18n("Export filtered calendar"));
1118 1121
1119 if ( !ex2phone.exec() ) { 1122 if ( !ex2phone.exec() ) {
1120 return; 1123 return;
1121 } 1124 }
1122 KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); 1125 KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text();
1123 KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); 1126 KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text();
1124 KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); 1127 KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text();
1125 1128
1126 int inFuture = 0; 1129 int inFuture = 0;
1127 if ( ex2phone.mWriteBackFuture->isChecked() ) 1130 if ( ex2phone.mWriteBackFuture->isChecked() )
1128 inFuture = ex2phone.mWriteBackFutureWeeks->value(); 1131 inFuture = ex2phone.mWriteBackFutureWeeks->value();
1129 QPtrList<Incidence> delSel; 1132 QPtrList<Incidence> delSel;
1130 if ( mode == 1 ) 1133 if ( mode == 1 )
1131 delSel = mCalendar->rawIncidences(); 1134 delSel = mCalendar->rawIncidences();
1132 if ( mode == 2 ) 1135 if ( mode == 2 )
1133 delSel = mCalendar->incidences(); 1136 delSel = mCalendar->incidences();
1134 CalendarLocal* cal = new CalendarLocal(); 1137 CalendarLocal* cal = new CalendarLocal();
1135 cal->setLocalTime(); 1138 cal->setLocalTime();
1136 Incidence *incidence = delSel.first(); 1139 Incidence *incidence = delSel.first();
1137 QDateTime cur = QDateTime::currentDateTime().addDays( -7 ); 1140 QDateTime cur = QDateTime::currentDateTime().addDays( -7 );
1138 QDateTime end = cur.addDays( ( inFuture +1 ) *7 ); 1141 QDateTime end = cur.addDays( ( inFuture +1 ) *7 );
1139 while ( incidence ) { 1142 while ( incidence ) {
1140 if ( incidence->type() != "Journal" ) { 1143 if ( incidence->type() != "Journal" ) {
1141 bool add = true; 1144 bool add = true;
1142 if ( inFuture ) { 1145 if ( inFuture ) {
1143 QDateTime dt; 1146 QDateTime dt;
1144 if ( incidence->type() == "Todo" ) { 1147 if ( incidence->type() == "Todo" ) {
1145 Todo * t = (Todo*)incidence; 1148 Todo * t = (Todo*)incidence;
1146 if ( t->hasDueDate() ) 1149 if ( t->hasDueDate() )
1147 dt = t->dtDue(); 1150 dt = t->dtDue();
1148 else 1151 else
1149 dt = cur.addSecs( 62 ); 1152 dt = cur.addSecs( 62 );
1150 } 1153 }
1151 else { 1154 else {
1152 bool ok; 1155 bool ok;
1153 dt = incidence->getNextOccurence( cur, &ok ); 1156 dt = incidence->getNextOccurence( cur, &ok );
1154 if ( !ok ) 1157 if ( !ok )
1155 dt = cur.addSecs( -62 ); 1158 dt = cur.addSecs( -62 );
1156 } 1159 }
1157 if ( dt < cur || dt > end ) { 1160 if ( dt < cur || dt > end ) {
1158 add = false; 1161 add = false;
1159 } 1162 }
1160 } 1163 }
1161 if ( add ) { 1164 if ( add ) {
1162 Incidence *in = incidence->clone(); 1165 Incidence *in = incidence->clone();
1163 cal->addIncidence( in ); 1166 cal->addIncidence( in );
1164 } 1167 }
1165 } 1168 }
1166 incidence = delSel.next(); 1169 incidence = delSel.next();
1167 } 1170 }
1168 PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, 1171 PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice,
1169 KPimGlobalPrefs::instance()->mEx2PhoneConnection, 1172 KPimGlobalPrefs::instance()->mEx2PhoneConnection,
1170 KPimGlobalPrefs::instance()->mEx2PhoneModel ); 1173 KPimGlobalPrefs::instance()->mEx2PhoneModel );
1171 1174
1172 setCaption( i18n("Writing to phone...")); 1175 setCaption( i18n("Writing to phone..."));
1173 if ( PhoneFormat::writeToPhone( cal ) ) 1176 if ( PhoneFormat::writeToPhone( cal ) )
1174 setCaption( i18n("Export to phone successful!")); 1177 setCaption( i18n("Export to phone successful!"));
1175 else 1178 else
1176 setCaption( i18n("Error exporting to phone!")); 1179 setCaption( i18n("Error exporting to phone!"));
1177 delete cal; 1180 delete cal;
1178} 1181}
1179 1182
1180 1183
1181void MainWindow::setDefaultPreferences() 1184void MainWindow::setDefaultPreferences()
1182{ 1185{
1183 KOPrefs *p = KOPrefs::instance(); 1186 KOPrefs *p = KOPrefs::instance();
1184 1187
1185 p->mCompactDialogs = true; 1188 p->mCompactDialogs = true;
1186 p->mConfirm = true; 1189 p->mConfirm = true;
@@ -1735,192 +1738,193 @@ void MainWindow::keyPressEvent ( QKeyEvent * e )
1735 mView->editIncidenceDescription();; 1738 mView->editIncidenceDescription();;
1736 break; 1739 break;
1737 // case Qt::Key_Return: 1740 // case Qt::Key_Return:
1738 case Qt::Key_E: 1741 case Qt::Key_E:
1739 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) 1742 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
1740 mView->newEvent(); 1743 mView->newEvent();
1741 else 1744 else
1742 mView->editIncidence(); 1745 mView->editIncidence();
1743 break; 1746 break;
1744 case Qt::Key_Plus: 1747 case Qt::Key_Plus:
1745 size = p->mHourSize +2; 1748 size = p->mHourSize +2;
1746 if ( size <= 22 ) 1749 if ( size <= 22 )
1747 configureAgenda( size ); 1750 configureAgenda( size );
1748 break; 1751 break;
1749 case Qt::Key_Minus: 1752 case Qt::Key_Minus:
1750 size = p->mHourSize - 2; 1753 size = p->mHourSize - 2;
1751 if ( size >= 4 ) 1754 if ( size >= 4 )
1752 configureAgenda( size ); 1755 configureAgenda( size );
1753 break; 1756 break;
1754 1757
1755 1758
1756 default: 1759 default:
1757 e->ignore(); 1760 e->ignore();
1758 } 1761 }
1759 if ( pro > 0 ) { 1762 if ( pro > 0 ) {
1760 mView->selectFilter( pro-1 ); 1763 mView->selectFilter( pro-1 );
1761 } 1764 }
1762 if ( showSelectedDates ) { 1765 if ( showSelectedDates ) {
1763 ;// setCaptionToDates(); 1766 ;// setCaptionToDates();
1764 } 1767 }
1765 1768
1766} 1769}
1767 1770
1768void MainWindow::fillFilterMenu() 1771void MainWindow::fillFilterMenu()
1769{ 1772{
1770 selectFilterMenu->clear(); 1773 selectFilterMenu->clear();
1771 bool disable = false; 1774 bool disable = false;
1772 selectFilterMenu->insertItem(i18n ( "Edit Filters" ), 0 ); 1775 selectFilterMenu->insertItem(i18n ( "Edit Filters" ), 0 );
1773 selectFilterMenu->insertSeparator(); 1776 selectFilterMenu->insertSeparator();
1774 if ( mView->filterView()->filtersEnabled() ) { 1777 if ( mView->filterView()->filtersEnabled() ) {
1775 selectFilterMenu->insertItem(i18n ( "Turn filter off" ), 1 ); 1778 selectFilterMenu->insertItem(i18n ( "Turn filter off" ), 1 );
1776 } 1779 }
1777 else { 1780 else {
1778 selectFilterMenu->insertItem(i18n ( "Turn filter on" ), 1 ); 1781 selectFilterMenu->insertItem(i18n ( "Turn filter on" ), 1 );
1779 disable = true; 1782 disable = true;
1780 } 1783 }
1781 selectFilterMenu->insertSeparator(); 1784 selectFilterMenu->insertSeparator();
1782 QPtrList<CalFilter> fili = mView->filters(); 1785 QPtrList<CalFilter> fili = mView->filters();
1783 CalFilter *curfilter = mView->filterView()->selectedFilter(); 1786 CalFilter *curfilter = mView->filterView()->selectedFilter();
1784 CalFilter *filter = fili.first(); 1787 CalFilter *filter = fili.first();
1785 int iii = 2; 1788 int iii = 2;
1786 while(filter) { 1789 while(filter) {
1787 selectFilterMenu->insertItem( filter->name(), iii ); 1790 selectFilterMenu->insertItem( filter->name(), iii );
1788 if ( filter == curfilter) 1791 if ( filter == curfilter)
1789 selectFilterMenu->setItemChecked( iii, true ); 1792 selectFilterMenu->setItemChecked( iii, true );
1790 if ( disable ) 1793 if ( disable )
1791 selectFilterMenu->setItemEnabled( iii, false ); 1794 selectFilterMenu->setItemEnabled( iii, false );
1792 filter = fili.next(); 1795 filter = fili.next();
1793 ++iii; 1796 ++iii;
1794 } 1797 }
1795} 1798}
1796void MainWindow::selectFilter( int fil ) 1799void MainWindow::selectFilter( int fil )
1797{ 1800{
1798 if ( fil == 0 ) { 1801 if ( fil == 0 ) {
1799 mView->editFilters( ); 1802 mView->editFilters( );
1800 } else if ( fil == 1 ){ 1803 } else if ( fil == 1 ){
1801 mView->toggleFilerEnabled( ); 1804 mView->toggleFilerEnabled( );
1802 } else { 1805 } else {
1803 mView->selectFilter( fil-2 ); 1806 mView->selectFilter( fil-2 );
1804 } 1807 }
1805} 1808}
1806void MainWindow::configureToolBar( int item ) 1809void MainWindow::configureToolBar( int item )
1807{ 1810{
1808 1811
1809 configureToolBarMenu->setItemChecked( item, !configureToolBarMenu-> isItemChecked ( item ) ); 1812 configureToolBarMenu->setItemChecked( item, !configureToolBarMenu-> isItemChecked ( item ) );
1810 KOPrefs *p = KOPrefs::instance(); 1813 KOPrefs *p = KOPrefs::instance();
1811 p-> mShowIconStretch= configureToolBarMenu->isItemChecked( 5 ); 1814 p-> mShowIconStretch= configureToolBarMenu->isItemChecked( 5 );
1812 p-> mShowIconNewEvent= configureToolBarMenu->isItemChecked( 10 ); 1815 p-> mShowIconNewEvent= configureToolBarMenu->isItemChecked( 10 );
1813 p->mShowIconNewTodo = configureToolBarMenu->isItemChecked( 20 ); 1816 p->mShowIconNewTodo = configureToolBarMenu->isItemChecked( 20 );
1814 p-> mShowIconSearch= configureToolBarMenu->isItemChecked( 120 ); 1817 p-> mShowIconSearch= configureToolBarMenu->isItemChecked( 120 );
1815 p-> mShowIconList= configureToolBarMenu->isItemChecked( 30 ); 1818 p-> mShowIconList= configureToolBarMenu->isItemChecked( 30 );
1816 p-> mShowIconDay1= configureToolBarMenu->isItemChecked( 40 ); 1819 p-> mShowIconDay1= configureToolBarMenu->isItemChecked( 40 );
1817 p-> mShowIconDay5= configureToolBarMenu->isItemChecked( 50 ); 1820 p-> mShowIconDay5= configureToolBarMenu->isItemChecked( 50 );
1818 p-> mShowIconDay6= configureToolBarMenu->isItemChecked( 75 ); 1821 p-> mShowIconDay6= configureToolBarMenu->isItemChecked( 75 );
1819 p-> mShowIconDay7= configureToolBarMenu->isItemChecked( 60 ); 1822 p-> mShowIconDay7= configureToolBarMenu->isItemChecked( 60 );
1820 p-> mShowIconMonth= configureToolBarMenu->isItemChecked( 70 ); 1823 p-> mShowIconMonth= configureToolBarMenu->isItemChecked( 70 );
1821 p-> mShowIconTodoview= configureToolBarMenu->isItemChecked( 80 ); 1824 p-> mShowIconTodoview= configureToolBarMenu->isItemChecked( 80 );
1822 p-> mShowIconBackFast= configureToolBarMenu->isItemChecked( 200 ); 1825 p-> mShowIconBackFast= configureToolBarMenu->isItemChecked( 200 );
1823 p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 ); 1826 p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 );
1824 p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 ); 1827 p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 );
1825 p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 ); 1828 p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 );
1826 p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 ); 1829 p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 );
1827 p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 ); 1830 p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 );
1828 p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 ); 1831 p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 );
1829 p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 ); 1832 p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 );
1830 p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 ); 1833 p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 );
1834 p-> mShowIconWeekNum= configureToolBarMenu->isItemChecked( 400 );
1831 // initActions(); 1835 // initActions();
1832} 1836}
1833 1837
1834void MainWindow::setCaptionToDates() 1838void MainWindow::setCaptionToDates()
1835{ 1839{
1836 QString selDates; 1840 QString selDates;
1837 selDates = KGlobal::locale()->formatDate(mView->startDate(), true); 1841 selDates = KGlobal::locale()->formatDate(mView->startDate(), true);
1838 if (mView->startDate() < mView->endDate() ) 1842 if (mView->startDate() < mView->endDate() )
1839 selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true); 1843 selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true);
1840 else { 1844 else {
1841 QString addString; 1845 QString addString;
1842 if ( mView->startDate() == QDateTime::currentDateTime().date() ) 1846 if ( mView->startDate() == QDateTime::currentDateTime().date() )
1843 addString = i18n("Today"); 1847 addString = i18n("Today");
1844 else if ( mView->startDate() == QDateTime::currentDateTime().date().addDays(1) ) 1848 else if ( mView->startDate() == QDateTime::currentDateTime().date().addDays(1) )
1845 addString = i18n("Tomorrow"); 1849 addString = i18n("Tomorrow");
1846 if ( !addString.isEmpty() ) 1850 if ( !addString.isEmpty() )
1847 selDates = addString+", "+selDates ; 1851 selDates = addString+", "+selDates ;
1848 } 1852 }
1849 setCaption( i18n("Dates: ") + selDates ); 1853 setCaption( i18n("Dates: ") + selDates );
1850 1854
1851} 1855}
1852void MainWindow::showConfigureAgenda( ) 1856void MainWindow::showConfigureAgenda( )
1853{ 1857{
1854 int iii; 1858 int iii;
1855 for ( iii = 1;iii<= 10 ;++iii ){ 1859 for ( iii = 1;iii<= 10 ;++iii ){
1856 configureAgendaMenu->setItemChecked( (iii+1)*2, false ); 1860 configureAgendaMenu->setItemChecked( (iii+1)*2, false );
1857 } 1861 }
1858 configureAgendaMenu->setItemChecked( (KOPrefs::instance()->mHourSize/2)*2, true ); 1862 configureAgendaMenu->setItemChecked( (KOPrefs::instance()->mHourSize/2)*2, true );
1859} 1863}
1860void MainWindow::configureAgenda( int item ) 1864void MainWindow::configureAgenda( int item )
1861{ 1865{
1862 if ( KOPrefs::instance()->mHourSize == item ) 1866 if ( KOPrefs::instance()->mHourSize == item )
1863 return; 1867 return;
1864 KOPrefs::instance()->mHourSize=item; 1868 KOPrefs::instance()->mHourSize=item;
1865 mView->viewManager()->agendaView()->updateConfig(); 1869 mView->viewManager()->agendaView()->updateConfig();
1866} 1870}
1867 1871
1868void MainWindow::saveCalendar() 1872void MainWindow::saveCalendar()
1869{ 1873{
1870 QString fn = KOPrefs::instance()->mLastSaveFile; 1874 QString fn = KOPrefs::instance()->mLastSaveFile;
1871 fn = KFileDialog::getSaveFileName( fn, i18n("Save backup filename"), this ); 1875 fn = KFileDialog::getSaveFileName( fn, i18n("Save backup filename"), this );
1872 1876
1873 if ( fn == "" ) 1877 if ( fn == "" )
1874 return; 1878 return;
1875 QFileInfo info; 1879 QFileInfo info;
1876 info.setFile( fn ); 1880 info.setFile( fn );
1877 QString mes; 1881 QString mes;
1878 bool createbup = true; 1882 bool createbup = true;
1879 if ( info. exists() ) { 1883 if ( info. exists() ) {
1880 mes = i18n("Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )) ; 1884 mes = i18n("Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )) ;
1881 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, 1885 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes,
1882 i18n("Overwrite!"), i18n("Cancel"), 0, 1886 i18n("Overwrite!"), i18n("Cancel"), 0,
1883 0, 1 ); 1887 0, 1 );
1884 if ( result != 0 ) { 1888 if ( result != 0 ) {
1885 createbup = false; 1889 createbup = false;
1886 } 1890 }
1887 } 1891 }
1888 if ( createbup ) { 1892 if ( createbup ) {
1889 mView->saveCalendar( fn ); 1893 mView->saveCalendar( fn );
1890 mes = i18n("KO/Pi:Saved %1").arg(fn); 1894 mes = i18n("KO/Pi:Saved %1").arg(fn);
1891 KOPrefs::instance()->mLastSaveFile = fn; 1895 KOPrefs::instance()->mLastSaveFile = fn;
1892 setCaption(mes); 1896 setCaption(mes);
1893 } 1897 }
1894} 1898}
1895void MainWindow::loadCalendar() 1899void MainWindow::loadCalendar()
1896{ 1900{
1897 1901
1898 QString fn = KOPrefs::instance()->mLastLoadFile; 1902 QString fn = KOPrefs::instance()->mLastLoadFile;
1899 fn = KFileDialog::getOpenFileName( fn, i18n("Load backup filename"), this ); 1903 fn = KFileDialog::getOpenFileName( fn, i18n("Load backup filename"), this );
1900 1904
1901 if ( fn == "" ) 1905 if ( fn == "" )
1902 return; 1906 return;
1903 QFileInfo info; 1907 QFileInfo info;
1904 info.setFile( fn ); 1908 info.setFile( fn );
1905 QString mess; 1909 QString mess;
1906 bool loadbup = true; 1910 bool loadbup = true;
1907 if ( info. exists() ) { 1911 if ( info. exists() ) {
1908 mess = i18n("Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )); 1912 mess = i18n("Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false ));
1909 int result = QMessageBox::warning( this, "KO/Pi: Warning!", 1913 int result = QMessageBox::warning( this, "KO/Pi: Warning!",
1910 mess, 1914 mess,
1911 i18n("Load!"), i18n("Cancel"), 0, 1915 i18n("Load!"), i18n("Cancel"), 0,
1912 0, 1 ); 1916 0, 1 );
1913 if ( result != 0 ) { 1917 if ( result != 0 ) {
1914 loadbup = false; 1918 loadbup = false;
1915 } 1919 }
1916 } else { 1920 } else {
1917 QMessageBox::warning( this, i18n("KO/Pi: Warning!"), 1921 QMessageBox::warning( this, i18n("KO/Pi: Warning!"),
1918 i18n("Backup file\ndoes not exist!\nNothing loaded!"), 0, 0, 1922 i18n("Backup file\ndoes not exist!\nNothing loaded!"), 0, 0,
1919 0, 1 ); 1923 0, 1 );
1920 1924
1921 return; 1925 return;
1922 } 1926 }
1923 if ( loadbup ) { 1927 if ( loadbup ) {
1924 mView->openCalendar( fn ); 1928 mView->openCalendar( fn );
1925 KOPrefs::instance()->mLastLoadFile = fn; 1929 KOPrefs::instance()->mLastLoadFile = fn;
1926 mess = i18n("KO/Pi:Loaded %1").arg(fn) ; 1930 mess = i18n("KO/Pi:Loaded %1").arg(fn) ;
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp
index 3fd9740..aa1b244 100644
--- a/korganizer/searchdialog.cpp
+++ b/korganizer/searchdialog.cpp
@@ -1,257 +1,246 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 1998 Preston Brown 3 Copyright (c) 1998 Preston Brown
4 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> 4 Copyright (c) 2000,2001 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 24
25#include <qlayout.h> 25#include <qlayout.h>
26#include <qcheckbox.h> 26#include <qcheckbox.h>
27#include <qgroupbox.h> 27#include <qgroupbox.h>
28#include <qlabel.h> 28#include <qlabel.h>
29#include <qwhatsthis.h>
29#include <qlineedit.h> 30#include <qlineedit.h>
30#include <qpushbutton.h> 31#include <qpushbutton.h>
31 32
32#include <klocale.h> 33#include <klocale.h>
33#include <kmessagebox.h> 34#include <kmessagebox.h>
34 35
35#include <libkdepim/kdateedit.h> 36#include <libkdepim/kdateedit.h>
36 37
37#include "koglobals.h" 38#include "koglobals.h"
38#include "koprefs.h" 39#include "koprefs.h"
39 40
40#include "calendarview.h" 41#include "calendarview.h"
41#include "koviewmanager.h" 42#include "koviewmanager.h"
42#include "searchdialog.h" 43#include "searchdialog.h"
43 44
44SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) 45SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent)
45 : KDialogBase(Plain,i18n("KO/Pi Find "),User1|Close,User1,parent,0,false,false, 46 : QVBox( 0 )
46 i18n("&Find")) 47
47{ 48{
48 mCalendar = calendar; 49 mCalendar = calendar;
49 QFrame *topFrame = plainPage(); 50 QFrame *topFrame = new QFrame( this ) ;//plainPage();
50 QVBoxLayout *layout = new QVBoxLayout(topFrame,0,spacingHint()); 51 QVBoxLayout *layout = new QVBoxLayout(topFrame,KDialog::marginHint(),KDialog::spacingHint());
51 52
52 // Search expression 53 // Search expression
53 QHBoxLayout *subLayout = new QHBoxLayout(); 54 QHBoxLayout *subLayout = new QHBoxLayout();
54 layout->addLayout(subLayout); 55 layout->addLayout(subLayout);
55
56 searchLabel = new QLabel(topFrame); 56 searchLabel = new QLabel(topFrame);
57 searchLabel->setText(i18n("Search for:")); 57 searchLabel->setText(i18n("Search for:"));
58 subLayout->addWidget(searchLabel); 58 subLayout->addWidget(searchLabel);
59 59
60 searchEdit = new QLineEdit(topFrame); 60 searchEdit = new QLineEdit(topFrame);
61 subLayout->addWidget(searchEdit); 61 subLayout->addWidget(searchEdit);
62 QPushButton *OkButton = new QPushButton( i18n("&Find"), topFrame );
63 //OkButton->setDefault( true );
64 connect(OkButton,SIGNAL(clicked()),SLOT(doSearch()));
65 subLayout->addWidget(OkButton);
62 searchEdit->setText("*"); // Find all events by default 66 searchEdit->setText("*"); // Find all events by default
63 searchEdit->setFocus(); 67 searchEdit->setFocus();
64 connect(searchEdit, SIGNAL(textChanged ( const QString & )),this,SLOT(searchTextChanged( const QString & ))); 68 connect(searchEdit, SIGNAL(textChanged ( const QString & )),this,SLOT(searchTextChanged( const QString & )));
65 connect(searchEdit, SIGNAL( returnPressed () ),this,SLOT(doSearch())); 69 connect(searchEdit, SIGNAL( returnPressed () ),this,SLOT(doSearch()));
66 // Subjects to search 70 // Subjects to search
67 // QGroupBox *subjectGroup = new QGroupBox(1,Vertical,i18n("Search In"), 71 // QGroupBox *subjectGroup = new QGroupBox(1,Vertical,i18n("Search In"),
68 // topFrame); 72 // topFrame);
69 73
70
71
72 QHBox *incidenceGroup = new QHBox( topFrame ); 74 QHBox *incidenceGroup = new QHBox( topFrame );
73 layout->addWidget(incidenceGroup); 75 layout->addWidget(incidenceGroup);
74 76
75 mSearchEvent = new QCheckBox(i18n("Events"),incidenceGroup); 77 mSearchEvent = new QCheckBox(i18n("Events"),incidenceGroup);
76 mSearchEvent->setChecked(true); 78 mSearchEvent->setChecked(true);
77 mSearchTodo = new QCheckBox(i18n("Todos"),incidenceGroup); 79 mSearchTodo = new QCheckBox(i18n("Todos"),incidenceGroup);
78 mSearchJournal = new QCheckBox(i18n("Journals"),incidenceGroup); 80 mSearchJournal = new QCheckBox(i18n("Journals"),incidenceGroup);
79 81
80 QHBox *subjectGroup = new QHBox( topFrame ); 82 QHBox *subjectGroup = new QHBox( topFrame );
81 layout->addWidget(subjectGroup); 83 layout->addWidget(subjectGroup);
82 84
83 mSummaryCheck = new QCheckBox(i18n("Summary/Loc."),subjectGroup); 85 mSummaryCheck = new QCheckBox(i18n("Summary/Loc."),subjectGroup);
84 mSummaryCheck->setChecked(true); 86 mSummaryCheck->setChecked(true);
85 mDescriptionCheck = new QCheckBox(i18n("Descriptions"),subjectGroup); 87 mDescriptionCheck = new QCheckBox(i18n("Descriptions"),subjectGroup);
86 mCategoryCheck = new QCheckBox(i18n("Categories"),subjectGroup); 88 mCategoryCheck = new QCheckBox(i18n("Categories"),subjectGroup);
87 89
88 QHBox *attendeeGroup = new QHBox( topFrame ); 90 QHBox *attendeeGroup = new QHBox( topFrame );
89 layout->addWidget(attendeeGroup ); 91 layout->addWidget(attendeeGroup );
90 new QLabel( i18n("Attendee:"),attendeeGroup ); 92 new QLabel( i18n("Attendee:"),attendeeGroup );
91 mSearchAName = new QCheckBox(i18n("Name"),attendeeGroup ); 93 mSearchAName = new QCheckBox(i18n("Name"),attendeeGroup );
92 mSearchAEmail = new QCheckBox(i18n("Email"), attendeeGroup ); 94 mSearchAEmail = new QCheckBox(i18n("Email"), attendeeGroup );
93 // Date range 95 // Date range
94 // QGroupBox *rangeGroup = new QGroupBox(1,Horizontal,i18n("Date Range"), 96 // QGroupBox *rangeGroup = new QGroupBox(1,Horizontal,i18n("Date Range"),
95 // topFrame); 97 // topFrame);
96 // layout->addWidget(rangeGroup); 98 // layout->addWidget(rangeGroup);
97 99
98 QWidget *rangeWidget = new QWidget(topFrame); 100 QWidget *rangeWidget = new QWidget(topFrame);
99 QHBoxLayout *rangeLayout = new QHBoxLayout(rangeWidget,0,spacingHint()); 101 QHBoxLayout *rangeLayout = new QHBoxLayout(rangeWidget,0,KDialog::spacingHint());
100
101 rangeLayout->addWidget(new QLabel(i18n("From:"),rangeWidget)); 102 rangeLayout->addWidget(new QLabel(i18n("From:"),rangeWidget));
102 mStartDate = new KDateEdit(rangeWidget); 103 mStartDate = new KDateEdit(rangeWidget);
103 rangeLayout->addWidget(mStartDate); 104 rangeLayout->addWidget(mStartDate);
104 rangeLayout->addWidget(new QLabel(i18n("To:"),rangeWidget)); 105 rangeLayout->addWidget(new QLabel(i18n("To:"),rangeWidget));
105 mEndDate = new KDateEdit(rangeWidget); 106 mEndDate = new KDateEdit(rangeWidget);
106 mEndDate->setDate(QDate::currentDate().addDays(365)); 107 mEndDate->setDate(QDate::currentDate().addDays(365));
107 rangeLayout->addWidget(mEndDate); 108 rangeLayout->addWidget(mEndDate);
108 109 QToolButton *wt = QWhatsThis::whatsThisButton ( rangeWidget );
109 // mInclusiveCheck = new QCheckBox(i18n("Events have to be completely included"), topFrame); 110 rangeLayout->addWidget( (QWidget*)wt );
110 //mInclusiveCheck->setChecked(false);
111 layout->addWidget(rangeWidget); 111 layout->addWidget(rangeWidget);
112 //layout->addWidget(mInclusiveCheck);
113 // Subjects to search
114
115
116 // Results list view 112 // Results list view
117 listView = new KOListView(mCalendar,topFrame); 113 listView = new KOListView(mCalendar,topFrame);
118 //listView->showDates();
119
120
121 layout->addWidget(listView); 114 layout->addWidget(listView);
122 115
123 // if ( KOPrefs::instance()->mCompactDialogs ) {
124 // KOGlobals::fitDialogToScreen( this, true );
125 // }
126
127 listView->readSettings(KOGlobals::config(),"SearchListView Layout"); 116 listView->readSettings(KOGlobals::config(),"SearchListView Layout");
128 connect(this,SIGNAL(user1Clicked()),SLOT(doSearch()));
129 QPushButton *CloseButton = findButton( Close );
130 //connect(CloseButton,SIGNAL(clicked()),listView, SLOT(clear()));
131 117
132#ifndef DESKTOP_VERSION 118 setCaption( i18n("KO/Pi Find: "));
133 setCaption(i18n("Click OK to search ->")); 119#ifdef DESKTOP_VERSION
134 hideButtons(); 120 OkButton = new QPushButton( i18n("Close"), this );
121 connect(OkButton,SIGNAL(clicked()),SLOT(hide()));
135#endif 122#endif
136} 123}
137 124
138SearchDialog::~SearchDialog() 125SearchDialog::~SearchDialog()
139{ 126{
140 127
141} 128}
142void SearchDialog::accept() 129void SearchDialog::accept()
143{ 130{
144 doSearch(); 131 doSearch();
145} 132}
146void SearchDialog::updateList() 133void SearchDialog::updateList()
147{ 134{
148 //listView->updateList(); 135 //listView->updateList();
149 if ( isVisible() ) { 136 if ( isVisible() ) {
150 updateView(); 137 updateView();
151 //qDebug("SearchDialog::updated "); 138 //qDebug("SearchDialog::updated ");
152 } 139 }
153 else { 140 else {
154 listView->clear(); 141 listView->clear();
155 //qDebug("SearchDialog::cleared "); 142 //qDebug("SearchDialog::cleared ");
156 143
157 } 144 }
158} 145}
159void SearchDialog::searchTextChanged( const QString &_text ) 146void SearchDialog::searchTextChanged( const QString &_text )
160{ 147{
148#if 0
161 enableButton( KDialogBase::User1, !_text.isEmpty() ); 149 enableButton( KDialogBase::User1, !_text.isEmpty() );
150#endif
162} 151}
163 152
164void SearchDialog::doSearch() 153void SearchDialog::doSearch()
165{ 154{
166 QRegExp re; 155 QRegExp re;
167 156
168 re.setWildcard(true); // most people understand these better. 157 re.setWildcard(true); // most people understand these better.
169 re.setCaseSensitive(false); 158 re.setCaseSensitive(false);
170 re.setPattern(searchEdit->text()); 159 re.setPattern(searchEdit->text());
171 if (!re.isValid() ) { 160 if (!re.isValid() ) {
172 KMessageBox::sorry(this, 161 KMessageBox::sorry(this,
173 i18n("Invalid search expression,\ncannot perform " 162 i18n("Invalid search expression,\ncannot perform "
174 "the search.\nPlease enter a search expression\n" 163 "the search.\nPlease enter a search expression\n"
175 "using the wildcard characters\n '*' and '?'" 164 "using the wildcard characters\n '*' and '?'"
176 "where needed.")); 165 "where needed."));
177 return; 166 return;
178 } 167 }
179 168
180 search(re); 169 search(re);
181 170
182 listView->setStartDate( mStartDate->date() ); 171 listView->setStartDate( mStartDate->date() );
183 listView->showEvents(mMatchedEvents); 172 listView->showEvents(mMatchedEvents);
184 listView->addTodos(mMatchedTodos); 173 listView->addTodos(mMatchedTodos);
185 listView->addJournals(mMatchedJournals); 174 listView->addJournals(mMatchedJournals);
186 175
187 if (mMatchedEvents.count() + mMatchedJournals.count() + mMatchedTodos.count() == 0) { 176 if (mMatchedEvents.count() + mMatchedJournals.count() + mMatchedTodos.count() == 0) {
188 setCaption(i18n("No items found. Use '*' and '?' where needed.")); 177 setCaption(i18n("No items found. Use '*' and '?' where needed."));
189 } else { 178 } else {
190 QString mess; 179 QString mess;
191 mess = mess.sprintf( i18n("%d item(s) found."), mMatchedEvents.count()+ mMatchedJournals.count() + mMatchedTodos.count() ); 180 mess = mess.sprintf( i18n("%d item(s) found."), mMatchedEvents.count()+ mMatchedJournals.count() + mMatchedTodos.count() );
192 setCaption( i18n("KO/Pi Find: ") + mess); 181 setCaption( i18n("KO/Pi Find: ") + mess);
193 182
194 } 183 }
195 searchEdit->setFocus(); 184 searchEdit->setFocus();
196} 185}
197void SearchDialog::updateConfig() 186void SearchDialog::updateConfig()
198{ 187{
199 listView->updateConfig(); 188 listView->updateConfig();
200} 189}
201void SearchDialog::updateView() 190void SearchDialog::updateView()
202{ 191{
203 192
204 QRegExp re; 193 QRegExp re;
205 re.setWildcard(true); // most people understand these better. 194 re.setWildcard(true); // most people understand these better.
206 re.setCaseSensitive(false); 195 re.setCaseSensitive(false);
207 re.setPattern(searchEdit->text()); 196 re.setPattern(searchEdit->text());
208 if (re.isValid()) { 197 if (re.isValid()) {
209 search(re); 198 search(re);
210 } else { 199 } else {
211 mMatchedEvents.clear(); 200 mMatchedEvents.clear();
212 mMatchedTodos.clear(); 201 mMatchedTodos.clear();
213 mMatchedJournals.clear(); 202 mMatchedJournals.clear();
214 } 203 }
215 listView->setStartDate( mStartDate->date() ); 204 listView->setStartDate( mStartDate->date() );
216 listView->showEvents(mMatchedEvents); 205 listView->showEvents(mMatchedEvents);
217 listView->addTodos(mMatchedTodos); 206 listView->addTodos(mMatchedTodos);
218 listView->addJournals(mMatchedJournals); 207 listView->addJournals(mMatchedJournals);
219} 208}
220 209
221void SearchDialog::search(const QRegExp &re) 210void SearchDialog::search(const QRegExp &re)
222{ 211{
223 QPtrList<Event> events = mCalendar->events( mStartDate->date(), 212 QPtrList<Event> events = mCalendar->events( mStartDate->date(),
224 mEndDate->date(), 213 mEndDate->date(),
225 false /*mInclusiveCheck->isChecked()*/ ); 214 false /*mInclusiveCheck->isChecked()*/ );
226 215
227 mMatchedEvents.clear(); 216 mMatchedEvents.clear();
228 if ( mSearchEvent->isChecked() ) { 217 if ( mSearchEvent->isChecked() ) {
229 Event *ev; 218 Event *ev;
230 for(ev=events.first();ev;ev=events.next()) { 219 for(ev=events.first();ev;ev=events.next()) {
231 if (mSummaryCheck->isChecked()) { 220 if (mSummaryCheck->isChecked()) {
232#if QT_VERSION >= 0x030000 221#if QT_VERSION >= 0x030000
233 if (re.search(ev->summary()) != -1) 222 if (re.search(ev->summary()) != -1)
234#else 223#else
235 if (re.match(ev->summary()) != -1) 224 if (re.match(ev->summary()) != -1)
236#endif 225#endif
237 { 226 {
238 mMatchedEvents.append(ev); 227 mMatchedEvents.append(ev);
239 continue; 228 continue;
240 } 229 }
241#if QT_VERSION >= 0x030000 230#if QT_VERSION >= 0x030000
242 if (re.search(ev->location()) != -1) 231 if (re.search(ev->location()) != -1)
243#else 232#else
244 if (re.match(ev->location()) != -1) 233 if (re.match(ev->location()) != -1)
245#endif 234#endif
246 { 235 {
247 mMatchedEvents.append(ev); 236 mMatchedEvents.append(ev);
248 continue; 237 continue;
249 } 238 }
250 } 239 }
251 if (mDescriptionCheck->isChecked()) { 240 if (mDescriptionCheck->isChecked()) {
252#if QT_VERSION >= 0x030000 241#if QT_VERSION >= 0x030000
253 if (re.search(ev->description()) != -1) 242 if (re.search(ev->description()) != -1)
254#else 243#else
255 if (re.match(ev->description()) != -1) 244 if (re.match(ev->description()) != -1)
256#endif 245#endif
257 { 246 {
@@ -297,105 +286,120 @@ void SearchDialog::search(const QRegExp &re)
297 } 286 }
298 } 287 }
299 } 288 }
300 } 289 }
301 } 290 }
302 } 291 }
303 QPtrList<Todo> todos = mCalendar->todos( ); 292 QPtrList<Todo> todos = mCalendar->todos( );
304 mMatchedTodos.clear(); 293 mMatchedTodos.clear();
305 if ( mSearchTodo->isChecked() ) { 294 if ( mSearchTodo->isChecked() ) {
306 Todo *tod; 295 Todo *tod;
307 for(tod=todos.first();tod;tod=todos.next()) { 296 for(tod=todos.first();tod;tod=todos.next()) {
308 if (mSummaryCheck->isChecked()) { 297 if (mSummaryCheck->isChecked()) {
309#if QT_VERSION >= 0x030000 298#if QT_VERSION >= 0x030000
310 if (re.search(tod->summary()) != -1) 299 if (re.search(tod->summary()) != -1)
311#else 300#else
312 if (re.match(tod->summary()) != -1) 301 if (re.match(tod->summary()) != -1)
313#endif 302#endif
314 { 303 {
315 mMatchedTodos.append(tod); 304 mMatchedTodos.append(tod);
316 continue; 305 continue;
317 } 306 }
318 } 307 }
319 if (mDescriptionCheck->isChecked()) { 308 if (mDescriptionCheck->isChecked()) {
320#if QT_VERSION >= 0x030000 309#if QT_VERSION >= 0x030000
321 if (re.search(tod->description()) != -1) 310 if (re.search(tod->description()) != -1)
322#else 311#else
323 if (re.match(tod->description()) != -1) 312 if (re.match(tod->description()) != -1)
324#endif 313#endif
325 { 314 {
326 mMatchedTodos.append(tod); 315 mMatchedTodos.append(tod);
327 continue; 316 continue;
328 } 317 }
329 } 318 }
330 if (mCategoryCheck->isChecked()) { 319 if (mCategoryCheck->isChecked()) {
331#if QT_VERSION >= 0x030000 320#if QT_VERSION >= 0x030000
332 if (re.search(tod->categoriesStr()) != -1) 321 if (re.search(tod->categoriesStr()) != -1)
333#else 322#else
334 if (re.match(tod->categoriesStr()) != -1) 323 if (re.match(tod->categoriesStr()) != -1)
335#endif 324#endif
336 { 325 {
337 mMatchedTodos.append(tod); 326 mMatchedTodos.append(tod);
338 continue; 327 continue;
339 } 328 }
340 } 329 }
341 if ( mSearchAName->isChecked() || mSearchAEmail->isChecked() ) { 330 if ( mSearchAName->isChecked() || mSearchAEmail->isChecked() ) {
342 QPtrList<Attendee> tmpAList = tod->attendees(); 331 QPtrList<Attendee> tmpAList = tod->attendees();
343 Attendee *a; 332 Attendee *a;
344 for (a = tmpAList.first(); a; a = tmpAList.next()) { 333 for (a = tmpAList.first(); a; a = tmpAList.next()) {
345 if (mSearchAName->isChecked()) { 334 if (mSearchAName->isChecked()) {
346#if QT_VERSION >= 0x030000 335#if QT_VERSION >= 0x030000
347 if (re.search(a->name()) != -1) 336 if (re.search(a->name()) != -1)
348#else 337#else
349 if (re.match(a->name()) != -1) 338 if (re.match(a->name()) != -1)
350#endif 339#endif
351 { 340 {
352 mMatchedTodos.append(tod); 341 mMatchedTodos.append(tod);
353 break; 342 break;
354 } 343 }
355 } 344 }
356 if (mSearchAEmail->isChecked()) { 345 if (mSearchAEmail->isChecked()) {
357#if QT_VERSION >= 0x030000 346#if QT_VERSION >= 0x030000
358 if (re.search(a->email()) != -1) 347 if (re.search(a->email()) != -1)
359#else 348#else
360 if (re.match(a->email()) != -1) 349 if (re.match(a->email()) != -1)
361#endif 350#endif
362 { 351 {
363 mMatchedTodos.append(tod); 352 mMatchedTodos.append(tod);
364 break; 353 break;
365 } 354 }
366 } 355 }
367 } 356 }
368 } 357 }
369 } 358 }
370 } 359 }
371 mMatchedJournals.clear(); 360 mMatchedJournals.clear();
372 if (mSearchJournal->isChecked() ) { 361 if (mSearchJournal->isChecked() ) {
373 QPtrList<Journal> journals = mCalendar->journals( ); 362 QPtrList<Journal> journals = mCalendar->journals( );
374 Journal* journ; 363 Journal* journ;
375 364
376 for(journ=journals.first();journ;journ=journals.next()) { 365 for(journ=journals.first();journ;journ=journals.next()) {
377 if ( journ->dtStart().date() <= mEndDate->date() 366 if ( journ->dtStart().date() <= mEndDate->date()
378 &&journ->dtStart().date() >= mStartDate->date()) { 367 &&journ->dtStart().date() >= mStartDate->date()) {
379#if QT_VERSION >= 0x030000 368#if QT_VERSION >= 0x030000
380 if (re.search(journ->description()) != -1) 369 if (re.search(journ->description()) != -1)
381#else 370#else
382 if (re.match(journ->description()) != -1) 371 if (re.match(journ->description()) != -1)
383#endif 372#endif
384 { 373 {
385 mMatchedJournals.append(journ); 374 mMatchedJournals.append(journ);
386 continue; 375 continue;
387 } 376 }
388 } 377 }
389 } 378 }
390 } 379 }
391 380
392} 381}
393/* 382
394void SearchDialog::keyPressEvent ( QKeyEvent *e) 383void SearchDialog::keyPressEvent ( QKeyEvent *e)
395{ 384{
396 385 switch ( e->key() ) {
397 e->ignore(); 386 case Qt::Key_Escape:
398 387 hide();
388 break;
389 case Qt::Key_F:
390 if ( e->state() == Qt::ControlButton ) {
391 qDebug("full ");
392
393 }
394 break;
395 case Qt::Key_Return:
396 case Qt::Key_Enter:
397 doSearch();
398 break;
399
400 default:
401 e->ignore();
402 }
399} 403}
400*/ 404
401//mMatchedJournals; 405//mMatchedJournals;
diff --git a/korganizer/searchdialog.h b/korganizer/searchdialog.h
index ebcff7a..f4aad9e 100644
--- a/korganizer/searchdialog.h
+++ b/korganizer/searchdialog.h
@@ -1,93 +1,92 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 1998 Preston Brown 3 Copyright (c) 1998 Preston Brown
4 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> 4 Copyright (c) 2000,2001 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 SEARCHDIALOG_H 24#ifndef SEARCHDIALOG_H
25#define SEARCHDIALOG_H 25#define SEARCHDIALOG_H
26 26
27#include <qregexp.h> 27#include <qregexp.h>
28 28
29#include <kdialogbase.h> 29#include <kdialogbase.h>
30#include <qvbox.h>
30 31
31#include <libkcal/calendar.h> 32#include <libkcal/calendar.h>
32 33
33#include "kolistview.h" 34#include "kolistview.h"
34 35
35class KDateEdit; 36class KDateEdit;
36class QCheckBox; 37class QCheckBox;
37class QLineEdit; 38class QLineEdit;
38class QLabel; 39class QLabel;
39class CalendarView; 40class CalendarView;
40 41
41using namespace KCal; 42using namespace KCal;
42 43class SearchDialog : public QVBox
43class SearchDialog : public KDialogBase
44{ 44{
45 Q_OBJECT 45 Q_OBJECT
46 public: 46 public:
47 SearchDialog(Calendar *calendar,CalendarView *parent=0); 47 SearchDialog(Calendar *calendar,CalendarView *parent=0);
48 virtual ~SearchDialog(); 48 virtual ~SearchDialog();
49 KOListView *listview(){ return listView;} 49 KOListView *listview(){ return listView;}
50 void updateView(); 50 void updateView();
51 51
52 public slots: 52 public slots:
53 void changeEventDisplay(Event *, int) { updateView(); } 53 void changeEventDisplay(Event *, int) { updateView(); }
54 void updateConfig(); 54 void updateConfig();
55 void updateList(); 55 void updateList();
56 protected slots: 56 protected slots:
57 void accept(); 57 void accept();
58 void doSearch(); 58 void doSearch();
59 void searchTextChanged( const QString &_text ); 59 void searchTextChanged( const QString &_text );
60 60
61 signals: 61 signals:
62 void showEventSignal(Event *); 62 void showEventSignal(Event *);
63 void editEventSignal(Event *); 63 void editEventSignal(Event *);
64 void deleteEventSignal(Event *); 64 void deleteEventSignal(Event *);
65 65
66 private: 66 private:
67 void search(const QRegExp &); 67 void search(const QRegExp &);
68 68
69 Calendar *mCalendar; 69 Calendar *mCalendar;
70 70
71 QPtrList<Event> mMatchedEvents; 71 QPtrList<Event> mMatchedEvents;
72 QPtrList<Todo> mMatchedTodos; 72 QPtrList<Todo> mMatchedTodos;
73 QPtrList<Journal> mMatchedJournals; 73 QPtrList<Journal> mMatchedJournals;
74 74
75 QLabel *searchLabel; 75 QLabel *searchLabel;
76 QLineEdit *searchEdit; 76 QLineEdit *searchEdit;
77 KOListView *listView; 77 KOListView *listView;
78 78
79 KDateEdit *mStartDate; 79 KDateEdit *mStartDate;
80 KDateEdit *mEndDate; 80 KDateEdit *mEndDate;
81 // QCheckBox *mInclusiveCheck;
82 QCheckBox *mSummaryCheck; 81 QCheckBox *mSummaryCheck;
83 QCheckBox *mDescriptionCheck; 82 QCheckBox *mDescriptionCheck;
84 QCheckBox *mCategoryCheck; 83 QCheckBox *mCategoryCheck;
85 QCheckBox *mSearchEvent; 84 QCheckBox *mSearchEvent;
86 QCheckBox *mSearchTodo; 85 QCheckBox *mSearchTodo;
87 QCheckBox *mSearchJournal; 86 QCheckBox *mSearchJournal;
88 QCheckBox *mSearchAName; 87 QCheckBox *mSearchAName;
89 QCheckBox *mSearchAEmail; 88 QCheckBox *mSearchAEmail;
90 //void keyPressEvent ( QKeyEvent *e) ; 89 void keyPressEvent ( QKeyEvent *e) ;
91}; 90};
92 91
93#endif 92#endif