summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt2
-rw-r--r--korganizer/koagenda.cpp5
-rw-r--r--korganizer/koprefs.cpp1
-rw-r--r--korganizer/koprefs.h2
-rw-r--r--korganizer/koprefsdialog.cpp16
-rw-r--r--korganizer/kotodoview.cpp9
6 files changed, 24 insertions, 11 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index 9476a89..a688eaf 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1156,202 +1156,202 @@
1156{ "Print &all todo items","Drucke alle Todo Items" }, 1156{ "Print &all todo items","Drucke alle Todo Items" },
1157{ "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, 1157{ "Print only &uncompleted items","Drucke nur nicht erledigte Todos" },
1158{ "Only items due in the &range:","Nur Items in dem Zeitraum:" }, 1158{ "Only items due in the &range:","Nur Items in dem Zeitraum:" },
1159{ "Todo List","Todo Liste" }, 1159{ "Todo List","Todo Liste" },
1160{ "&Title:","&Titel:" }, 1160{ "&Title:","&Titel:" },
1161{ "Co&nnect subtodos with its parent","Verbinde Untertodos mit ihren Ober-Todos" }, 1161{ "Co&nnect subtodos with its parent","Verbinde Untertodos mit ihren Ober-Todos" },
1162{ "Todo list","Todo Liste" }, 1162{ "Todo list","Todo Liste" },
1163{ "&Print...","Drucke..." }, 1163{ "&Print...","Drucke..." },
1164{ "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, 1164{ "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" },
1165{ "[Unconfigured]","[Unkonfiguriert]" }, 1165{ "[Unconfigured]","[Unkonfiguriert]" },
1166{ "OK","OK" }, 1166{ "OK","OK" },
1167{ "FilterEditor","FilterEditor" }, 1167{ "FilterEditor","FilterEditor" },
1168{ "Include","Inclusive" }, 1168{ "Include","Inclusive" },
1169{ "Exclude","Exclusive" }, 1169{ "Exclude","Exclusive" },
1170{ "Edit Selection...","Editiere Auswahl" }, 1170{ "Edit Selection...","Editiere Auswahl" },
1171{ "recurring events","wiederholende Termine" }, 1171{ "recurring events","wiederholende Termine" },
1172{ "recurr. events","wiederh.Termine" }, 1172{ "recurr. events","wiederh.Termine" },
1173{ "completed to-dos","erledigte Todos" }, 1173{ "completed to-dos","erledigte Todos" },
1174{ "events","Termine" }, 1174{ "events","Termine" },
1175{ "todos","Todos" }, 1175{ "todos","Todos" },
1176{ "journals","Journale" }, 1176{ "journals","Journale" },
1177{ "public","öffentl." }, 1177{ "public","öffentl." },
1178{ "private","privat" }, 1178{ "private","privat" },
1179{ "confidential","vertraul." }, 1179{ "confidential","vertraul." },
1180{ "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Untertodos.\nAlle erledigten Untertodos\nwerden auch gelöscht!" }, 1180{ "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Untertodos.\nAlle erledigten Untertodos\nwerden auch gelöscht!" },
1181{ "Yesterday","Gestern" }, 1181{ "Yesterday","Gestern" },
1182{ "Day after tomorrow","Übermorgen" }, 1182{ "Day after tomorrow","Übermorgen" },
1183{ "Tomorrow","Morgen" }, 1183{ "Tomorrow","Morgen" },
1184{ "Day before yesterday","Vorgestern" }, 1184{ "Day before yesterday","Vorgestern" },
1185{ "Size %1","Größe %1" }, 1185{ "Size %1","Größe %1" },
1186{ "New Agendasize: %1","Neue Agendagröße: %1" }, 1186{ "New Agendasize: %1","Neue Agendagröße: %1" },
1187{ " (%1 y.)"," (%1 J.)" }, 1187{ " (%1 y.)"," (%1 J.)" },
1188{ "Allday:","Ganztägig:" }, 1188{ "Allday:","Ganztägig:" },
1189{ "compl.todos","erled.Todos" }, 1189{ "compl.todos","erled.Todos" },
1190{ "Day view","Tagesansicht" }, 1190{ "Day view","Tagesansicht" },
1191{ "Next days","Nächste Tage" }, 1191{ "Next days","Nächste Tage" },
1192{ "Next week","Nächste Woche" }, 1192{ "Next week","Nächste Woche" },
1193{ "Next two weeks","Nächste zwei Wochen" }, 1193{ "Next two weeks","Nächste zwei Wochen" },
1194{ "This month","Dieser Monat" }, 1194{ "This month","Dieser Monat" },
1195{ "Journal view","Journal" }, 1195{ "Journal view","Journal" },
1196{ "Display all opened","Zeige alle geöffnet" }, 1196{ "Display all opened","Zeige alle geöffnet" },
1197{ "Display all closed","Zeige alle geschlossen" }, 1197{ "Display all closed","Zeige alle geschlossen" },
1198{ "Display all flat","Zeige alle flach" }, 1198{ "Display all flat","Zeige alle flach" },
1199{ "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, 1199{ "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" },
1200{ "Default todo done color:","Standard Todo erledigt Farbe" }, 1200{ "Default todo done color:","Standard Todo erledigt Farbe" },
1201{ "Select week %1-%2","Wähle Woche %1-%2" }, 1201{ "Select week %1-%2","Wähle Woche %1-%2" },
1202{ "Select Week","Wähle Woche" }, 1202{ "Select Week","Wähle Woche" },
1203{ "Set alarm for selected...","Setze Alarm für Selekt..." }, 1203{ "Set alarm for selected...","Setze Alarm für Selekt..." },
1204{ "Set Alarm!","Setze Alarm!" }, 1204{ "Set Alarm!","Setze Alarm!" },
1205{ "Canged alarm for %1 items","Alarm für %1 Items geändert" }, 1205{ "Canged alarm for %1 items","Alarm für %1 Items geändert" },
1206{ " and "," und " }, 1206{ " and "," und " },
1207{ "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, 1207{ "<IMG src="%1"> only )","nur <IMG src="%1"> )" },
1208{ "Mail to selected","Mail an Ausgewählte" }, 1208{ "Mail to selected","Mail an Ausgewählte" },
1209{ "Mail to all","Mail an Alle" }, 1209{ "Mail to all","Mail an Alle" },
1210{ "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, 1210{ "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" },
1211{ "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, 1211{ "Set reminder ON with offset to:","Alarm AN mit Offset auf:" },
1212{ " on"," am" }, 1212{ " on"," am" },
1213{ " completed on "," erledigt am " }, 1213{ " completed on "," erledigt am " },
1214{ "Save as Event template","Speichere als Vorlage" }, 1214{ "Save as Event template","Speichere als Vorlage" },
1215{ "Load Event template","Lade Termin Vorlage" }, 1215{ "Load Event template","Lade Termin Vorlage" },
1216{ "Save as Journal template","Speichere als Journal Vorlage" }, 1216{ "Save as Journal template","Speichere als Journal Vorlage" },
1217{ "Insert Journal template","Füge Journal Vorlage ein" }, 1217{ "Insert Journal template","Füge Journal Vorlage ein" },
1218{ "Sub todos:<br>","Unter Todos:<br>" }, 1218{ "Sub todos:<br>","Unter Todos:<br>" },
1219{ "Parent todo:<br>","Über Todo:<br>" }, 1219{ "Parent todo:<br>","Über Todo:<br>" },
1220{ "Set current as color category","Setze Gewählte als Farbkategorie" }, 1220{ "Set current as color category","Setze Gewählte als Farbkategorie" },
1221{ " completed"," erledigt" }, 1221{ " completed"," erledigt" },
1222{ "(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!","(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi basiert auf KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) und das KDE Team.\nKOrganizer/Pi ist lizensiert unter der GPL.\nKO/Pi kann kompiliert werden für\nLinux, Zaurus-PDA und Windows\nwww.pi-sync.info --- www.korganizer.org\nBesonderen Dank an Michael und Ben\nfür intensives Testen!" }, 1222{ "(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!","(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi basiert auf KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) und das KDE Team.\nKOrganizer/Pi ist lizensiert unter der GPL.\nKO/Pi kann kompiliert werden für\nLinux, Zaurus-PDA und Windows\nwww.pi-sync.info --- www.korganizer.org\nBesonderen Dank an Michael und Ben\nfür intensives Testen!" },
1223{ "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, 1223{ "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." },
1224{ "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, 1224{ "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." },
1225{ "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, 1225{ "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." },
1226{ "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?" }, 1226{ "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?" },
1227{ "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, 1227{ "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." },
1228{ "Error","Fehler" }, 1228{ "Error","Fehler" },
1229{ ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, 1229{ ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." },
1230{ "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, 1230{ "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." },
1231{ "Warning","Warnung" }, 1231{ "Warning","Warnung" },
1232{ "Select week number","Wähle Wochen Nummer" }, 1232{ "Select week number","Wähle Wochen Nummer" },
1233{ "Februar","Februar" }, 1233{ "Februar","Februar" },
1234{ "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, 1234{ "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" },
1235{ "W","W" }, 1235{ "W","W" },
1236{ "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, 1236{ "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" },
1237{ "T: %1","T: %1" }, 1237{ "T: %1","T: %1" },
1238{ "Start: ","Start: " }, 1238{ "Start: ","Start: " },
1239{ "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, 1239{ "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " },
1240{ "Password for remote access:","Passwort für fernen Zugriff:" }, 1240{ "Password for remote access:","Passwort für fernen Zugriff:" },
1241{ "Remote IP address:","Ferne IP Adresse:" }, 1241{ "Remote IP address:","Ferne IP Adresse:" },
1242{ "Remote port number:","Ferne Port Nummer:" }, 1242{ "Remote port number:","Ferne Port Nummer:" },
1243{ "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, 1243{ "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." },
1244{ "Remote from: ","Fern von: " }, 1244{ "Remote from: ","Fern von: " },
1245{ "Local from: ","Lokal von: " }, 1245{ "Local from: ","Lokal von: " },
1246{ "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" }, 1246{ "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" },
1247{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, 1247{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" },
1248{ "Write back","Schreibe zurück" }, 1248{ "Write back","Schreibe zurück" },
1249{ "KO/Pi Synchronization","KO/Pi Synchronisation" }, 1249{ "KO/Pi Synchronization","KO/Pi Synchronisation" },
1250{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, 1250{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" },
1251{ "Received sync request","Sync Anfrage erhalten" }, 1251{ "Received sync request","Sync Anfrage erhalten" },
1252{ "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." }, 1252{ "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." },
1253{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, 1253{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." },
1254{ "Data saved to temp file!","Daten in temp Datei gespeichert!" }, 1254{ "Data saved to temp file!","Daten in temp Datei gespeichert!" },
1255{ "Sending file...","Sende Datei..." }, 1255{ "Sending file...","Sende Datei..." },
1256{ "Waiting for synced file...","Warte auf gesyncte Daten..." }, 1256{ "Waiting for synced file...","Warte auf gesyncte Daten..." },
1257{ "Receiving synced file...","Gesyncte Daten erhalten..." }, 1257{ "Receiving synced file...","Gesyncte Daten erhalten..." },
1258{ "Received %1 bytes","%1 Bytes erhalten" }, 1258{ "Received %1 bytes","%1 Bytes erhalten" },
1259{ "Writing file to disk...","Speichere Datei..." }, 1259{ "Writing file to disk...","Speichere Datei..." },
1260{ "Pi-Sync successful!","Pi-Sync erfolgreich!" }, 1260{ "Pi-Sync successful!","Pi-Sync erfolgreich!" },
1261{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, 1261{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" },
1262{ "Synchronize!","Synchronisiere!" }, 1262{ "Synchronize!","Synchronisiere!" },
1263{ "High clock skew!","Großer Uhrzeitunterschied!" }, 1263{ "High clock skew!","Großer Uhrzeitunterschied!" },
1264{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, 1264{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" },
1265{ "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!" }, 1265{ "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!" },
1266{ "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, 1266{ "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." },
1267{ "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, 1267{ "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" },
1268{ "List week view","Listenwochenansicht" }, 1268{ "List week view","Listenwochenansicht" },
1269{ "List week","Listenwochenansicht" }, 1269{ "List week","Listenwochenansicht" },
1270{ "Next Week","Nächste Woche" }, 1270{ "Next Week","Nächste Woche" },
1271{ "Previous Week","Vorherige Woche" }, 1271{ "Previous Week","Vorherige Woche" },
1272{ "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." }, 1272{ "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." },
1273{ "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, 1273{ "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" },
1274{ "Details","Details" }, 1274{ "Details","Details" },
1275{ "Created time","Erstellt Zeit" }, 1275{ "Created time","Erstellt Zeit" },
1276{ "Last modified time","Geändert Zeit" }, 1276{ "Last modified time","Geändert Zeit" },
1277{ "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, 1277{ "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" },
1278{ "View Options","Anzeige Optionen" }, 1278{ "View Options","Anzeige Optionen" },
1279{ "<b>Created: ","<b>Erstellt am: " }, 1279{ "<b>Created: ","<b>Erstellt am: " },
1280{ "<b>Last modified: ","<b>Zuletzt geändert am: " }, 1280{ "<b>Last modified: ","<b>Zuletzt geändert am: " },
1281{ "Journal: ","Journal: " }, 1281{ "Journal: ","Journal: " },
1282{ "yearly","jährlich" }, 1282{ "yearly","jährlich" },
1283{ "(%1) ","%1-" }, 1283{ "(%1) ","%1-" },
1284{ "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, 1284{ "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" },
1285{ "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, 1285{ "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" },
1286{ "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, 1286{ "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" },
1287{ "Summary/Loc.","Titel/Ort" }, 1287{ "Summary/Loc.","Titel/Ort" },
1288{ "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, 1288{ "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." },
1289{ "Week Number","Wochennummer" }, 1289{ "Week Number","Wochennummer" },
1290{ "Import","Importiere" }, 1290{ "Import","Importiere" },
1291{ "Export","Exportiere" }, 1291{ "Export","Exportiere" },
1292{ "Beam","Beame" }, 1292{ "Beam","Beame" },
1293{ "Export selected","Exportiere Selektierte" }, 1293{ "Export selected","Exportiere Selektierte" },
1294{ "As iCal (ics) file...","Als iCal (ics) Datei..." }, 1294{ "As iCal (ics) file...","Als iCal (ics) Datei..." },
1295{ "As vCal (vcs) file...","Als vCal (vcs) Datei..." }, 1295{ "As vCal (vcs) file...","Als vCal (vcs) Datei..." },
1296{ "Journal/Details...","Journale/Details..." }, 1296{ "Journal/Details...","Journale/Details..." },
1297{ "Agenda View","Agenda Ansicht" }, 1297{ "Agenda View","Agenda Ansicht" },
1298{ "Show current time","Zeige aktuelle Zeit" }, 1298{ "Show current time","Zeige aktuelle Zeit" },
1299{ "Edit new item","Bearbeite neuen Eintrag" }, 1299{ "Edit new item","Bearbeite neuen Eintrag" },
1300{ "Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals","Bitte wählen Sie mindestens\neinen dieser Typen\num darin zu suchen:\n\nTermine\nTodos\nJournale" }, 1300{ "Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals","Bitte wählen Sie mindestens\neinen dieser Typen\num darin zu suchen:\n\nTermine\nTodos\nJournale" },
1301{ "There is no next alarm.","Es gibt keinen nächsten Alarm." }, 1301{ "There is no next alarm.","Es gibt keinen nächsten Alarm." },
1302{ "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" }, 1302{ "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" },
1303{ "The next alarm is in:\n","Der nächste Alarm ist in:\n" }, 1303{ "The next alarm is in:\n","Der nächste Alarm ist in:\n" },
1304{ "%1 days\n","%1 Tagen\n" }, 1304{ "%1 days\n","%1 Tagen\n" },
1305{ "1 day\n","1 Tag\n" }, 1305{ "1 day\n","1 Tag\n" },
1306{ "%1 hours\n","%1 Stunden\n" }, 1306{ "%1 hours\n","%1 Stunden\n" },
1307{ "1 hour\n","1 Stunde\n" }, 1307{ "1 hour\n","1 Stunde\n" },
1308{ "%1 minutes\n","%1 Minuten\n" }, 1308{ "%1 minutes\n","%1 Minuten\n" },
1309{ "1 minute\n","1 Minute\n" }, 1309{ "1 minute\n","1 Minute\n" },
1310{ "Only one toolbar","Nur eine Toolbar" }, 1310{ "Only one toolbar","Nur eine Toolbar" },
1311{ "Print","Drucke" }, 1311{ "Print","Drucke" },
1312{ "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." }, 1312{ "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." },
1313{ "There is nothing selected!","Es ist nichts ausgewählt!" }, 1313{ "There is nothing selected!","Es ist nichts ausgewählt!" },
1314{ "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " }, 1314{ "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " },
1315{ "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" }, 1315{ "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" },
1316{ "This prints the view as you see it.\n(With the complete content, of course.)\nYou may change the print layout by resizing the view.\nPrint unscaled may print several pages\ndepending on the amount of data.\nPrint scaled down will print all on one page.\nPrint scaled up/down will print all on one page,\nbut will scale up the text to page boundaries,\nif the text is smaller than the page.\nYou can select page geometry setup in the next dialog.\n","Dies druckt die Ansicht wie man sie sieht.\n(Mit dem kompletten Inhalt natürlich.)\nMan kann das Layout ändern durch ändern der Fenstergröße.\nDrucke unskaliert druckt ggf. mehrere Seiten\nabhängig von der Menge der Daten.\nDrucke runterskaliert um auf eine Seite zu passen\ndruckt alles auf eine Seite.\nDrucke hoch/runterskaliert um genau auf eine Seite zu passen\nvergrößert den Text gegebenenfalls.\nDas Seitenlayout kann im nächsten Dialog gewählt werden.\n" }, 1316{ "This prints the view as you see it.\n(With the complete content, of course.)\nYou may change the print layout by resizing the view.\nPrint unscaled may print several pages\ndepending on the amount of data.\nPrint scaled down will print all on one page.\nPrint scaled up/down will print all on one page,\nbut will scale up the text to page boundaries,\nif the text is smaller than the page.\nYou can select page geometry setup in the next dialog.\n","Dies druckt die Ansicht wie man sie sieht.\n(Mit dem kompletten Inhalt natürlich.)\nMan kann das Layout ändern durch ändern der Fenstergröße.\nDrucke unskaliert druckt ggf. mehrere Seiten\nabhängig von der Menge der Daten.\nDrucke runterskaliert um auf eine Seite zu passen\ndruckt alles auf eine Seite.\nDrucke hoch/runterskaliert um genau auf eine Seite zu passen\nvergrößert den Text gegebenenfalls.\nDas Seitenlayout kann im nächsten Dialog gewählt werden.\n" },
1317{ "KO/Pi Printout","KO/Pi Ausdruck" }, 1317{ "KO/Pi Printout","KO/Pi Ausdruck" },
1318{ "Print unscaled","Drucke unskaliert" }, 1318{ "Print unscaled","Drucke unskaliert" },
1319{ "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." }, 1319{ "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." },
1320{ "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." }, 1320{ "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." },
1321{ "Printout Mode","Druck Modus" }, 1321{ "Printout Mode","Druck Modus" },
1322{ "Filter menu icon","Filtermenu Icon" }, 1322{ "Filter menu icon","Filtermenu Icon" },
1323{ "<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n","<p><b>A+(shift oder ctrl)</b>: Zeige Zeit bis zum nächsten Alarm</p>\n" }, 1323{ "<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n","<p><b>A+(shift oder ctrl)</b>: Zeige Zeit bis zum nächsten Alarm</p>\n" },
1324{ "<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n","<p><b>N</b>: Wechsle zur nächsten Ansicht, die ein Icon in der Toolbar hat</p>\n" }, 1324{ "<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n","<p><b>N</b>: Wechsle zur nächsten Ansicht, die ein Icon in der Toolbar hat</p>\n" },
1325{ "%1d","%1t" }, 1325{ "%1d","%1t" },
1326{ "%1h","%1std" }, 1326{ "%1h","%1std" },
1327{ "%1min","%1min" }, 1327{ "%1min","%1min" },
1328{ "( %1 before )","( %1 vorher )" }, 1328{ "( %1 before )","( %1 vorher )" },
1329{ "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" }, 1329{ "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" },
1330{ "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" }, 1330{ "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" },
1331{ "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." }, 1331{ "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." },
1332{ "Show Sync Events in WN+Agenda","Zeige Sync-Ereignisse in WN+Agenda" }, 1332{ "Show Sync Events in WN+Agenda","Zeige Sync-Ereignisse in WN+Agenda" },
1333{ "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" }, 1333{ "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" },
1334{ "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" }, 1334{ "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" },
1335{ " on "," am " }, 1335{ " on "," am " },
1336{ "On: ","Am: " }, 1336{ "On: ","Am: " },
1337{ "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" }, 1337{ "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" },
1338{ "Start/Stop todo...","Starte/Stoppe Todo..." }, 1338{ "Start/Stop todo...","Starte/Stoppe Todo..." },
1339{ "Color for running todos:","Farbe für laufende Todos:" }, 1339{ "Color for running todos:","Farbe für laufende Todos:" },
1340{ "The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?","Das Todo\n%1\nist gestartet.\nWollen Sie es\nauf gestoppt setzen?" }, 1340{ "The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?","Das Todo\n%1\nist gestartet.\nWollen Sie es\nauf gestoppt setzen?" },
1341{ "Todo is started","Todo is gestarted" }, 1341{ "Todo is started","Todo is gestarted" },
1342{ "Stop todo","Stoppe Todo" }, 1342{ "Stop todo","Stoppe Todo" },
1343{ "Todo is stopped","Todo ist gestoppt" }, 1343{ "Todo is stopped","Todo ist gestoppt" },
1344{ "Start todo","Starte Todo" }, 1344{ "Start todo","Starte Todo" },
1345{ "The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?","Das Todo\n%1\nist gestoppt.\nWollen Sie es auf\ngestartet setzen?" }, 1345{ "The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?","Das Todo\n%1\nist gestoppt.\nWollen Sie es auf\ngestartet setzen?" },
1346{ "The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?","Das Todo\n%1\nwird geklont!\nEs hat Untertodos!\nMöchten Sie\nalle Untertodos auch klonen?" }, 1346{ "The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?","Das Todo\n%1\nwird geklont!\nEs hat Untertodos!\nMöchten Sie\nalle Untertodos auch klonen?" },
1347{ "Todo has subtodos","Todo hat Untertodos" }, 1347{ "Todo has subtodos","Todo hat Untertodos" },
1348{ "","" }, 1348{ "Block popup until mouse button release","Sperre Popup bis Mausknopf losgelassen" },
1349{ "","" }, 1349{ "","" },
1350{ "","" }, 1350{ "","" },
1351{ "","" }, 1351{ "","" },
1352{ "","" }, 1352{ "","" },
1353{ "","" }, 1353{ "","" },
1354{ "","" }, 1354{ "","" },
1355{ "","" }, 1355{ "","" },
1356{ "","" }, 1356{ "","" },
1357{ "","" }, 1357{ "","" },
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index 18c506e..114ed75 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -200,395 +200,396 @@ KOAgenda::KOAgenda(int columns,QWidget *parent,const char *name,WFlags f) :
200 mHolidayMask = 0; 200 mHolidayMask = 0;
201 init(); 201 init();
202} 202}
203 203
204 204
205KOAgenda::~KOAgenda() 205KOAgenda::~KOAgenda()
206{ 206{
207 if(mMarcusBains) delete mMarcusBains; 207 if(mMarcusBains) delete mMarcusBains;
208 208
209} 209}
210 210
211Incidence *KOAgenda::selectedIncidence() const 211Incidence *KOAgenda::selectedIncidence() const
212{ 212{
213 return (mSelectedItem ? mSelectedItem->incidence() : 0); 213 return (mSelectedItem ? mSelectedItem->incidence() : 0);
214} 214}
215 215
216 216
217QDate KOAgenda::selectedIncidenceDate() const 217QDate KOAgenda::selectedIncidenceDate() const
218{ 218{
219 return (mSelectedItem ? mSelectedItem->itemDate() : QDate()); 219 return (mSelectedItem ? mSelectedItem->itemDate() : QDate());
220} 220}
221 221
222 222
223void KOAgenda::init() 223void KOAgenda::init()
224{ 224{
225 mPopupTimer = new QTimer(this); 225 mPopupTimer = new QTimer(this);
226 connect(mPopupTimer , SIGNAL(timeout()), this, SLOT(popupMenu())); 226 connect(mPopupTimer , SIGNAL(timeout()), this, SLOT(popupMenu()));
227 227
228 mNewItemPopup = new QPopupMenu( this ); 228 mNewItemPopup = new QPopupMenu( this );
229 connect ( mNewItemPopup, SIGNAL (activated ( int ) ), this, SLOT ( newItem(int)) ); 229 connect ( mNewItemPopup, SIGNAL (activated ( int ) ), this, SLOT ( newItem(int)) );
230 QString pathString = ""; 230 QString pathString = "";
231 if ( !KOPrefs::instance()->mToolBarMiniIcons ) { 231 if ( !KOPrefs::instance()->mToolBarMiniIcons ) {
232 if ( QApplication::desktop()->width() < 480 ) 232 if ( QApplication::desktop()->width() < 480 )
233 pathString += "icons16/"; 233 pathString += "icons16/";
234 } else 234 } else
235 pathString += "iconsmini/"; 235 pathString += "iconsmini/";
236 236
237 mNewItemPopup->insertItem ( SmallIcon( pathString +"newevent" ), i18n("New Event..."), 1 ); 237 mNewItemPopup->insertItem ( SmallIcon( pathString +"newevent" ), i18n("New Event..."), 1 );
238 mNewItemPopup->insertItem ( SmallIcon( pathString +"newtodo" ), i18n("New Todo..."),2 ); 238 mNewItemPopup->insertItem ( SmallIcon( pathString +"newtodo" ), i18n("New Todo..."),2 );
239 mNewItemPopup->insertSeparator ( ); 239 mNewItemPopup->insertSeparator ( );
240 mNewItemPopup->insertItem ( SmallIcon( pathString +"day" ), i18n("Day view"),3 ); 240 mNewItemPopup->insertItem ( SmallIcon( pathString +"day" ), i18n("Day view"),3 );
241 mNewItemPopup->insertItem ( SmallIcon( pathString +"xdays" ), i18n("Next days"),8 ); 241 mNewItemPopup->insertItem ( SmallIcon( pathString +"xdays" ), i18n("Next days"),8 );
242 mNewItemPopup->insertItem ( SmallIcon( pathString +"week" ), i18n("Next week"),4 ); 242 mNewItemPopup->insertItem ( SmallIcon( pathString +"week" ), i18n("Next week"),4 );
243 mNewItemPopup->insertItem ( SmallIcon( pathString +"week" ), i18n("Next two weeks"),5 ); 243 mNewItemPopup->insertItem ( SmallIcon( pathString +"week" ), i18n("Next two weeks"),5 );
244 mNewItemPopup->insertItem ( SmallIcon( pathString +"month" ), i18n("This month"),6 ); 244 mNewItemPopup->insertItem ( SmallIcon( pathString +"month" ), i18n("This month"),6 );
245 mNewItemPopup->insertItem ( SmallIcon( pathString +"journal" ), i18n("Journal view"),7 ); 245 mNewItemPopup->insertItem ( SmallIcon( pathString +"journal" ), i18n("Journal view"),7 );
246#ifndef _WIN32_ 246#ifndef _WIN32_
247 int wflags = viewport()-> getWFlags() |WRepaintNoErase;//WResizeNoErase 247 int wflags = viewport()-> getWFlags() |WRepaintNoErase;//WResizeNoErase
248 viewport()->setWFlags ( wflags); 248 viewport()->setWFlags ( wflags);
249#endif 249#endif
250 mGridSpacingX = 80; 250 mGridSpacingX = 80;
251 mResizeBorderWidth = 8; 251 mResizeBorderWidth = 8;
252 mScrollBorderWidth = 8; 252 mScrollBorderWidth = 8;
253 mScrollDelay = 30; 253 mScrollDelay = 30;
254 mScrollOffset = 10; 254 mScrollOffset = 10;
255 mPaintPixmap.resize( 20,20); 255 mPaintPixmap.resize( 20,20);
256 //enableClipper(true); 256 //enableClipper(true);
257 257
258 // Grab key strokes for keyboard navigation of agenda. Seems to have no 258 // Grab key strokes for keyboard navigation of agenda. Seems to have no
259 // effect. Has to be fixed. 259 // effect. Has to be fixed.
260 setFocusPolicy(WheelFocus); 260 setFocusPolicy(WheelFocus);
261 261
262 connect(&mScrollUpTimer,SIGNAL(timeout()),SLOT(scrollUp())); 262 connect(&mScrollUpTimer,SIGNAL(timeout()),SLOT(scrollUp()));
263 connect(&mScrollDownTimer,SIGNAL(timeout()),SLOT(scrollDown())); 263 connect(&mScrollDownTimer,SIGNAL(timeout()),SLOT(scrollDown()));
264 connect(&mResizeTimer,SIGNAL(timeout()),SLOT(finishResize())); 264 connect(&mResizeTimer,SIGNAL(timeout()),SLOT(finishResize()));
265 265
266 mStartCellX = 0; 266 mStartCellX = 0;
267 mStartCellY = 0; 267 mStartCellY = 0;
268 mCurrentCellX = 0; 268 mCurrentCellX = 0;
269 mCurrentCellY = 0; 269 mCurrentCellY = 0;
270 270
271 mSelectionCellX = 0; 271 mSelectionCellX = 0;
272 mSelectionYTop = 0; 272 mSelectionYTop = 0;
273 mSelectionHeight = 0; 273 mSelectionHeight = 0;
274 274
275 mOldLowerScrollValue = -1; 275 mOldLowerScrollValue = -1;
276 mOldUpperScrollValue = -1; 276 mOldUpperScrollValue = -1;
277 277
278 mClickedItem = 0; 278 mClickedItem = 0;
279 279
280 mActionItem = 0; 280 mActionItem = 0;
281 mActionType = NOP; 281 mActionType = NOP;
282 mItemMoved = false; 282 mItemMoved = false;
283 283
284 mSelectedItem = 0; 284 mSelectedItem = 0;
285 285
286 // mItems.setAutoDelete(true); 286 // mItems.setAutoDelete(true);
287 287
288 resizeContents( mGridSpacingX * mColumns + 1 , mGridSpacingY * mRows + 1 ); 288 resizeContents( mGridSpacingX * mColumns + 1 , mGridSpacingY * mRows + 1 );
289 289
290 viewport()->update(); 290 viewport()->update();
291 291
292 setMinimumSize(30, 1); 292 setMinimumSize(30, 1);
293// setMaximumHeight(mGridSpacingY * mRows + 5); 293// setMaximumHeight(mGridSpacingY * mRows + 5);
294 294
295 // Disable horizontal scrollbar. This is a hack. The geometry should be 295 // Disable horizontal scrollbar. This is a hack. The geometry should be
296 // controlled in a way that the contents horizontally always fits. Then it is 296 // controlled in a way that the contents horizontally always fits. Then it is
297 // not necessary to turn off the scrollbar. 297 // not necessary to turn off the scrollbar.
298 setHScrollBarMode(AlwaysOff); 298 setHScrollBarMode(AlwaysOff);
299 if ( ! mAllDayMode ) 299 if ( ! mAllDayMode )
300 setVScrollBarMode(AlwaysOn); 300 setVScrollBarMode(AlwaysOn);
301 else 301 else
302 setVScrollBarMode(AlwaysOff); 302 setVScrollBarMode(AlwaysOff);
303 303
304 setStartHour(KOPrefs::instance()->mDayBegins); 304 setStartHour(KOPrefs::instance()->mDayBegins);
305 305
306 calculateWorkingHours(); 306 calculateWorkingHours();
307 307
308 connect(verticalScrollBar(),SIGNAL(valueChanged(int)), 308 connect(verticalScrollBar(),SIGNAL(valueChanged(int)),
309 SLOT(checkScrollBoundaries(int))); 309 SLOT(checkScrollBoundaries(int)));
310 310
311 // Create the Marcus Bains line. 311 // Create the Marcus Bains line.
312 if(mAllDayMode) 312 if(mAllDayMode)
313 mMarcusBains = 0; 313 mMarcusBains = 0;
314 else { 314 else {
315 mMarcusBains = new MarcusBains(this); 315 mMarcusBains = new MarcusBains(this);
316 addChild(mMarcusBains); 316 addChild(mMarcusBains);
317 } 317 }
318 mPopupKind = 0; 318 mPopupKind = 0;
319 mPopupItem = 0; 319 mPopupItem = 0;
320} 320}
321 321
322void KOAgenda::clear() 322void KOAgenda::clear()
323{ 323{
324 KOAgendaItem *item; 324 KOAgendaItem *item;
325 for ( item=mItems.first(); item != 0; item=mItems.next() ) { 325 for ( item=mItems.first(); item != 0; item=mItems.next() ) {
326 mUnusedItems.append( item ); 326 mUnusedItems.append( item );
327 //item->hide(); 327 //item->hide();
328 } 328 }
329 mItems.clear(); 329 mItems.clear();
330 mSelectedItem = 0; 330 mSelectedItem = 0;
331 clearSelection(); 331 clearSelection();
332} 332}
333 333
334void KOAgenda::clearSelection() 334void KOAgenda::clearSelection()
335{ 335{
336 mSelectionCellX = 0; 336 mSelectionCellX = 0;
337 mSelectionYTop = 0; 337 mSelectionYTop = 0;
338 mSelectionHeight = 0; 338 mSelectionHeight = 0;
339} 339}
340 340
341void KOAgenda::marcus_bains() 341void KOAgenda::marcus_bains()
342{ 342{
343 if(mMarcusBains) mMarcusBains->updateLocation(true); 343 if(mMarcusBains) mMarcusBains->updateLocation(true);
344} 344}
345 345
346 346
347void KOAgenda::changeColumns(int columns) 347void KOAgenda::changeColumns(int columns)
348{ 348{
349 if (columns == 0) { 349 if (columns == 0) {
350 qDebug("KOAgenda::changeColumns() called with argument 0 "); 350 qDebug("KOAgenda::changeColumns() called with argument 0 ");
351 return; 351 return;
352 } 352 }
353 clear(); 353 clear();
354 mColumns = columns; 354 mColumns = columns;
355 computeSizes(); 355 computeSizes();
356} 356}
357 357
358/* 358/*
359 This is the eventFilter function, which gets all events from the KOAgendaItems 359 This is the eventFilter function, which gets all events from the KOAgendaItems
360 contained in the agenda. It has to handle moving and resizing for all items. 360 contained in the agenda. It has to handle moving and resizing for all items.
361*/ 361*/
362bool KOAgenda::eventFilter ( QObject *object, QEvent *event ) 362bool KOAgenda::eventFilter ( QObject *object, QEvent *event )
363{ 363{
364 // kdDebug() << "KOAgenda::eventFilter" << endl; 364 // kdDebug() << "KOAgenda::eventFilter" << endl;
365 switch(event->type()) { 365 switch(event->type()) {
366 case QEvent::MouseButtonPress: 366 case QEvent::MouseButtonPress:
367 case QEvent::MouseButtonDblClick: 367 case QEvent::MouseButtonDblClick:
368 case QEvent::MouseButtonRelease: 368 case QEvent::MouseButtonRelease:
369 case QEvent::MouseMove: 369 case QEvent::MouseMove:
370 return eventFilter_mouse(object, static_cast<QMouseEvent *>(event)); 370 return eventFilter_mouse(object, static_cast<QMouseEvent *>(event));
371 371
372 case (QEvent::Leave): 372 case (QEvent::Leave):
373 if (!mActionItem) 373 if (!mActionItem)
374 setCursor(arrowCursor); 374 setCursor(arrowCursor);
375 return true; 375 return true;
376 376
377 default: 377 default:
378 return QScrollView::eventFilter(object,event); 378 return QScrollView::eventFilter(object,event);
379 } 379 }
380} 380}
381void KOAgenda::popupMenu() 381void KOAgenda::popupMenu()
382{ 382{
383 mPopupTimer->stop(); 383 mPopupTimer->stop();
384 if ( mPopupKind == 1 ) { 384 if ( mPopupKind == 1 ) {
385 if (mActionItem ) { 385 if (mActionItem ) {
386 endItemAction(); 386 endItemAction();
387 } 387 }
388 mLeftMouseDown = false; // no more leftMouse computation 388 mLeftMouseDown = false; // no more leftMouse computation
389 if (mPopupItem) { 389 if (mPopupItem) {
390 //mClickedItem = mPopupItem; 390 //mClickedItem = mPopupItem;
391 selectItem(mPopupItem); 391 selectItem(mPopupItem);
392 if ( mAllAgendaPopup ) 392 if ( mAllAgendaPopup && KOPrefs::instance()->mBlockPopupMenu )
393 mAllAgendaPopup->installEventFilter( this ); 393 mAllAgendaPopup->installEventFilter( this );
394 emit showIncidencePopupSignal(mPopupItem->incidence()); 394 emit showIncidencePopupSignal(mPopupItem->incidence());
395 395
396 } 396 }
397 } else if ( mPopupKind == 2 ) { 397 } else if ( mPopupKind == 2 ) {
398 if ( mLeftMouseDown ) { // we have a simulated right click - clear left mouse action 398 if ( mLeftMouseDown ) { // we have a simulated right click - clear left mouse action
399 endSelectAction( false ); // do not emit new event signal 399 endSelectAction( false ); // do not emit new event signal
400 mLeftMouseDown = false; // no more leftMouse computation 400 mLeftMouseDown = false; // no more leftMouse computation
401 } 401 }
402 mNewItemPopup->installEventFilter( this ); 402 if ( KOPrefs::instance()->mBlockPopupMenu )
403 mNewItemPopup->installEventFilter( this );
403 mNewItemPopup->popup( mPopupPos); 404 mNewItemPopup->popup( mPopupPos);
404 405
405 } 406 }
406 mLeftMouseDown = false; 407 mLeftMouseDown = false;
407 mPopupItem = 0; 408 mPopupItem = 0;
408 mPopupKind = 0; 409 mPopupKind = 0;
409} 410}
410 411
411bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) 412bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
412{ 413{
413 static int startX = 0; 414 static int startX = 0;
414 static int startY = 0; 415 static int startY = 0;
415 static int blockmoveDist = ( QApplication::desktop()->width() < 480 ? 15 : 20 ); 416 static int blockmoveDist = ( QApplication::desktop()->width() < 480 ? 15 : 20 );
416 static bool blockMoving = true; 417 static bool blockMoving = true;
417 418
418 //qDebug("KOAgenda::eventFilter_mous "); 419 //qDebug("KOAgenda::eventFilter_mous ");
419 if ( object == mNewItemPopup ) { 420 if ( object == mNewItemPopup ) {
420 //qDebug("mNewItemPopup "); 421 //qDebug("mNewItemPopup ");
421 if ( me->type() == QEvent::MouseButtonRelease ) { 422 if ( me->type() == QEvent::MouseButtonRelease ) {
422 mNewItemPopup->removeEventFilter( this ); 423 mNewItemPopup->removeEventFilter( this );
423 int dX = me->globalPos().x() - mPopupPos.x();; 424 int dX = me->globalPos().x() - mPopupPos.x();;
424 if ( dX < 0 ) 425 if ( dX < 0 )
425 dX = -dX; 426 dX = -dX;
426 int dY = me->globalPos().y() - mPopupPos.y(); 427 int dY = me->globalPos().y() - mPopupPos.y();
427 if ( dY < 0 ) 428 if ( dY < 0 )
428 dY = -dY; 429 dY = -dY;
429 if ( dX > blockmoveDist || dY > blockmoveDist ) { 430 if ( dX > blockmoveDist || dY > blockmoveDist ) {
430 mNewItemPopup->hide(); 431 mNewItemPopup->hide();
431 } 432 }
432 } 433 }
433 return true; 434 return true;
434 } 435 }
435 if ( object == mAllAgendaPopup ) { 436 if ( object == mAllAgendaPopup ) {
436 //qDebug(" mAllAgendaPopup "); 437 //qDebug(" mAllAgendaPopup ");
437 if ( me->type() == QEvent::MouseButtonRelease ) { 438 if ( me->type() == QEvent::MouseButtonRelease ) {
438 mAllAgendaPopup->removeEventFilter( this ); 439 mAllAgendaPopup->removeEventFilter( this );
439 int dX = me->globalPos().x() - mPopupPos.x();; 440 int dX = me->globalPos().x() - mPopupPos.x();;
440 if ( dX < 0 ) 441 if ( dX < 0 )
441 dX = -dX; 442 dX = -dX;
442 int dY = me->globalPos().y() - mPopupPos.y(); 443 int dY = me->globalPos().y() - mPopupPos.y();
443 if ( dY < 0 ) 444 if ( dY < 0 )
444 dY = -dY; 445 dY = -dY;
445 if ( dX > blockmoveDist || dY > blockmoveDist ) { 446 if ( dX > blockmoveDist || dY > blockmoveDist ) {
446 mAllAgendaPopup->hide(); 447 mAllAgendaPopup->hide();
447 } 448 }
448 } 449 }
449 return true; 450 return true;
450 } 451 }
451 QPoint viewportPos; 452 QPoint viewportPos;
452 if (object != viewport()) { 453 if (object != viewport()) {
453 viewportPos = ((QWidget *)object)->mapToParent(me->pos()); 454 viewportPos = ((QWidget *)object)->mapToParent(me->pos());
454 } else { 455 } else {
455 viewportPos = me->pos(); 456 viewportPos = me->pos();
456 } 457 }
457 458
458 switch (me->type()) { 459 switch (me->type()) {
459 case QEvent::MouseButtonPress: 460 case QEvent::MouseButtonPress:
460 if (me->button() == LeftButton) { 461 if (me->button() == LeftButton) {
461 mPopupTimer->start( 600 ); 462 mPopupTimer->start( 600 );
462 mLeftMouseDown = true; 463 mLeftMouseDown = true;
463 } 464 }
464 blockMoving = true; 465 blockMoving = true;
465 startX = viewportPos.x(); 466 startX = viewportPos.x();
466 startY = viewportPos.y(); 467 startY = viewportPos.y();
467 mPopupPos = me->globalPos(); 468 mPopupPos = me->globalPos();
468 if (object != viewport()) { 469 if (object != viewport()) {
469 mPopupItem = (KOAgendaItem *)object; 470 mPopupItem = (KOAgendaItem *)object;
470 mPopupKind = 1; 471 mPopupKind = 1;
471 if (me->button() == RightButton) { 472 if (me->button() == RightButton) {
472 popupMenu(); 473 popupMenu();
473 } else if (me->button() == LeftButton) { 474 } else if (me->button() == LeftButton) {
474 mActionItem = (KOAgendaItem *)object; 475 mActionItem = (KOAgendaItem *)object;
475 if (mActionItem) { 476 if (mActionItem) {
476 if ( mSelectionHeight > 0 ) { 477 if ( mSelectionHeight > 0 ) {
477 int selectionCellX = mSelectionCellX * mGridSpacingX; 478 int selectionCellX = mSelectionCellX * mGridSpacingX;
478 int selectionYTop = mSelectionYTop; 479 int selectionYTop = mSelectionYTop;
479 int gridSpacingX = mGridSpacingX; 480 int gridSpacingX = mGridSpacingX;
480 int selectionHeight = mSelectionHeight; 481 int selectionHeight = mSelectionHeight;
481 clearSelection(); 482 clearSelection();
482 repaintContents( selectionCellX, selectionYTop, 483 repaintContents( selectionCellX, selectionYTop,
483 gridSpacingX, selectionHeight,false ); 484 gridSpacingX, selectionHeight,false );
484 } 485 }
485 selectItem(mActionItem); 486 selectItem(mActionItem);
486 Incidence *incidence = mActionItem->incidence(); 487 Incidence *incidence = mActionItem->incidence();
487 if ( incidence->isReadOnly() /*|| incidence->recurrence()->doesRecur() */) { 488 if ( incidence->isReadOnly() /*|| incidence->recurrence()->doesRecur() */) {
488 mActionItem = 0; 489 mActionItem = 0;
489 } else { 490 } else {
490 startItemAction(viewportPos); 491 startItemAction(viewportPos);
491 } 492 }
492 } 493 }
493 } 494 }
494 } else { // ---------- viewport() 495 } else { // ---------- viewport()
495 mPopupItem = 0; 496 mPopupItem = 0;
496 mPopupKind = 2; 497 mPopupKind = 2;
497 selectItem(0); 498 selectItem(0);
498 mActionItem = 0; 499 mActionItem = 0;
499 if (me->button() == RightButton) { 500 if (me->button() == RightButton) {
500 int x,y; 501 int x,y;
501 viewportToContents(viewportPos.x(),viewportPos.y(),x,y); 502 viewportToContents(viewportPos.x(),viewportPos.y(),x,y);
502 int gx,gy; 503 int gx,gy;
503 contentsToGrid(x,y,gx,gy); 504 contentsToGrid(x,y,gx,gy);
504 mCurrentCellX = gx; 505 mCurrentCellX = gx;
505 mCurrentCellY = gy; 506 mCurrentCellY = gy;
506 mStartCellX = gx; 507 mStartCellX = gx;
507 mStartCellY = gy; 508 mStartCellY = gy;
508 popupMenu(); 509 popupMenu();
509 } else if (me->button() == LeftButton) { 510 } else if (me->button() == LeftButton) {
510 setCursor(arrowCursor); 511 setCursor(arrowCursor);
511 startSelectAction(viewportPos); 512 startSelectAction(viewportPos);
512 } 513 }
513 } 514 }
514 break; 515 break;
515 516
516 case QEvent::MouseButtonRelease: 517 case QEvent::MouseButtonRelease:
517 if (me->button() == LeftButton ) { 518 if (me->button() == LeftButton ) {
518 mPopupTimer->stop(); 519 mPopupTimer->stop();
519 } 520 }
520 if (object != viewport()) { 521 if (object != viewport()) {
521 if (me->button() == LeftButton && mLeftMouseDown) { 522 if (me->button() == LeftButton && mLeftMouseDown) {
522 if (mActionItem) { 523 if (mActionItem) {
523 QPoint clipperPos = clipper()->mapFromGlobal(viewport()->mapToGlobal(viewportPos)); 524 QPoint clipperPos = clipper()->mapFromGlobal(viewport()->mapToGlobal(viewportPos));
524 //qDebug(" %d %d %d ",clipperPos.y(),visibleHeight() , 9 ); 525 //qDebug(" %d %d %d ",clipperPos.y(),visibleHeight() , 9 );
525 if ( mActionType == MOVE && (clipperPos.y() > visibleHeight()-2 ||clipperPos.y() < 0 ) ) { 526 if ( mActionType == MOVE && (clipperPos.y() > visibleHeight()-2 ||clipperPos.y() < 0 ) ) {
526 mScrollUpTimer.stop(); 527 mScrollUpTimer.stop();
527 mScrollDownTimer.stop(); 528 mScrollDownTimer.stop();
528 mActionItem->resetMove(); 529 mActionItem->resetMove();
529 placeSubCells( mActionItem ); 530 placeSubCells( mActionItem );
530 // emit startDragSignal( mActionItem->incidence() ); 531 // emit startDragSignal( mActionItem->incidence() );
531 setCursor( arrowCursor ); 532 setCursor( arrowCursor );
532 mActionItem = 0; 533 mActionItem = 0;
533 mActionType = NOP; 534 mActionType = NOP;
534 mItemMoved = 0; 535 mItemMoved = 0;
535 mLeftMouseDown = false; 536 mLeftMouseDown = false;
536 return true; 537 return true;
537 } 538 }
538 endItemAction(); 539 endItemAction();
539 } 540 }
540 } 541 }
541 542
542 } else { // ---------- viewport() 543 } else { // ---------- viewport()
543 if (me->button() == LeftButton && mLeftMouseDown ) { //left click 544 if (me->button() == LeftButton && mLeftMouseDown ) { //left click
544 endSelectAction( true ); // emit new event signal 545 endSelectAction( true ); // emit new event signal
545 } 546 }
546 } 547 }
547 if (me->button() == LeftButton) 548 if (me->button() == LeftButton)
548 mLeftMouseDown = false; 549 mLeftMouseDown = false;
549 550
550 break; 551 break;
551 552
552 case QEvent::MouseMove: 553 case QEvent::MouseMove:
553 //qDebug("mm "); 554 //qDebug("mm ");
554 if ( !mLeftMouseDown ) 555 if ( !mLeftMouseDown )
555 return false; 556 return false;
556 if ( blockMoving ) { 557 if ( blockMoving ) {
557 int dX, dY; 558 int dX, dY;
558 dX = startX - viewportPos.x(); 559 dX = startX - viewportPos.x();
559 if ( dX < 0 ) 560 if ( dX < 0 )
560 dX = -dX; 561 dX = -dX;
561 dY = viewportPos.y() - startY; 562 dY = viewportPos.y() - startY;
562 if ( dY < 0 ) 563 if ( dY < 0 )
563 dY = -dY; 564 dY = -dY;
564 //qDebug("%d %d %d ", dX, dY , blockmoveDist ); 565 //qDebug("%d %d %d ", dX, dY , blockmoveDist );
565 if ( dX > blockmoveDist || dY > blockmoveDist ) { 566 if ( dX > blockmoveDist || dY > blockmoveDist ) {
566 blockMoving = false; 567 blockMoving = false;
567 } 568 }
568 } 569 }
569 if ( ! blockMoving ) 570 if ( ! blockMoving )
570 mPopupTimer->stop(); 571 mPopupTimer->stop();
571 if (object != viewport()) { 572 if (object != viewport()) {
572 KOAgendaItem *moveItem = (KOAgendaItem *)object; 573 KOAgendaItem *moveItem = (KOAgendaItem *)object;
573 if (!moveItem->incidence()->isReadOnly() ) { 574 if (!moveItem->incidence()->isReadOnly() ) {
574 if (!mActionItem) 575 if (!mActionItem)
575 setNoActionCursor(moveItem,viewportPos); 576 setNoActionCursor(moveItem,viewportPos);
576 else { 577 else {
577 if ( !blockMoving ) 578 if ( !blockMoving )
578 performItemAction(viewportPos); 579 performItemAction(viewportPos);
579 } 580 }
580 } 581 }
581 } else { // ---------- viewport() 582 } else { // ---------- viewport()
582 mPopupPos = viewport()->mapToGlobal( me->pos() ); 583 mPopupPos = viewport()->mapToGlobal( me->pos() );
583 if ( mActionType == SELECT ) { 584 if ( mActionType == SELECT ) {
584 performSelectAction( viewportPos ); 585 performSelectAction( viewportPos );
585 } 586 }
586 } 587 }
587 break; 588 break;
588 589
589 case QEvent::MouseButtonDblClick: 590 case QEvent::MouseButtonDblClick:
590 mPopupTimer->stop(); 591 mPopupTimer->stop();
591 if (object == viewport()) { 592 if (object == viewport()) {
592 selectItem(0); 593 selectItem(0);
593 int x,y; 594 int x,y;
594 viewportToContents(viewportPos.x(),viewportPos.y(),x,y); 595 viewportToContents(viewportPos.x(),viewportPos.y(),x,y);
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index e8c7c76..a571ed4 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -39,384 +39,385 @@
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 QColor defaultTodoRunColor = QColor(99,194,30); 65 QColor defaultTodoRunColor = QColor(99,194,30);
66 KPrefs::setCurrentGroup("General"); 66 KPrefs::setCurrentGroup("General");
67 addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); 67 addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false);
68 addItemBool("ShowIconNewTodo",&mShowIconNewTodo,true); 68 addItemBool("ShowIconNewTodo",&mShowIconNewTodo,true);
69 addItemBool("ShowIconNewEvent",&mShowIconNewEvent,true); 69 addItemBool("ShowIconNewEvent",&mShowIconNewEvent,true);
70 addItemBool("ShowIconSearch",&mShowIconSearch,true); 70 addItemBool("ShowIconSearch",&mShowIconSearch,true);
71 addItemBool("ShowIconList",&mShowIconList,true); 71 addItemBool("ShowIconList",&mShowIconList,true);
72 addItemBool("ShowIconDay1",&mShowIconDay1,true); 72 addItemBool("ShowIconDay1",&mShowIconDay1,true);
73 addItemBool("ShowIconDay5",&mShowIconDay5,true); 73 addItemBool("ShowIconDay5",&mShowIconDay5,true);
74 addItemBool("ShowIconDay6",&mShowIconDay6,true); 74 addItemBool("ShowIconDay6",&mShowIconDay6,true);
75 addItemBool("ShowIconDay7",&mShowIconDay7,true); 75 addItemBool("ShowIconDay7",&mShowIconDay7,true);
76 addItemBool("ShowIconMonth",&mShowIconMonth,true); 76 addItemBool("ShowIconMonth",&mShowIconMonth,true);
77 addItemBool("ShowIconTodoview",&mShowIconTodoview,true); 77 addItemBool("ShowIconTodoview",&mShowIconTodoview,true);
78 addItemBool("ShowIconBackFast",&mShowIconBackFast,true); 78 addItemBool("ShowIconBackFast",&mShowIconBackFast,true);
79 addItemBool("ShowIconBack",&mShowIconBack,true); 79 addItemBool("ShowIconBack",&mShowIconBack,true);
80 addItemBool("ShowIconToday",&mShowIconToday,true); 80 addItemBool("ShowIconToday",&mShowIconToday,true);
81 addItemBool("ShowIconForward",&mShowIconForward,true); 81 addItemBool("ShowIconForward",&mShowIconForward,true);
82 addItemBool("ShowIconForwardFast",&mShowIconForwardFast,true); 82 addItemBool("ShowIconForwardFast",&mShowIconForwardFast,true);
83 addItemBool("ShowIconWhatsThis",&mShowIconWhatsThis,true); 83 addItemBool("ShowIconWhatsThis",&mShowIconWhatsThis,true);
84 addItemBool("ShowIconWeekNum",&mShowIconWeekNum,true); 84 addItemBool("ShowIconWeekNum",&mShowIconWeekNum,true);
85 addItemBool("ShowIconNextDays",&mShowIconNextDays,true); 85 addItemBool("ShowIconNextDays",&mShowIconNextDays,true);
86 addItemBool("ShowIconNext",&mShowIconNext,true); 86 addItemBool("ShowIconNext",&mShowIconNext,true);
87 addItemBool("ShowIconJournal",&mShowIconJournal,true); 87 addItemBool("ShowIconJournal",&mShowIconJournal,true);
88 addItemBool("ShowIconStretch",&mShowIconStretch,true); 88 addItemBool("ShowIconStretch",&mShowIconStretch,true);
89 addItemBool("ShowIconFilter",&mShowIconFilter,false); 89 addItemBool("ShowIconFilter",&mShowIconFilter,false);
90 addItemBool("ShowIconOnetoolbar",&mShowIconOnetoolbar,true); 90 addItemBool("ShowIconOnetoolbar",&mShowIconOnetoolbar,true);
91 91
92 bool addIcons = false; 92 bool addIcons = false;
93#ifdef DESKTOP_VERSION 93#ifdef DESKTOP_VERSION
94 addIcons = true; 94 addIcons = true;
95#endif 95#endif
96 addItemBool("ShowIconNavigator",&mShowIconNavigator,addIcons); 96 addItemBool("ShowIconNavigator",&mShowIconNavigator,addIcons);
97 addItemBool("ShowIconAllday",&mShowIconAllday,addIcons); 97 addItemBool("ShowIconAllday",&mShowIconAllday,addIcons);
98 addItemBool("ShowIconFilterview",&mShowIconFilterview,addIcons); 98 addItemBool("ShowIconFilterview",&mShowIconFilterview,addIcons);
99 addItemBool("ShowIconToggleFull",&mShowIconToggleFull,addIcons); 99 addItemBool("ShowIconToggleFull",&mShowIconToggleFull,addIcons);
100 100
101 addItemInt("LastLoadedLanguage",&mOldLanguage,0); 101 addItemInt("LastLoadedLanguage",&mOldLanguage,0);
102 102
103 addItemBool("AskForQuit",&mAskForQuit,false); 103 addItemBool("AskForQuit",&mAskForQuit,false);
104 104
105#ifndef DESKTOP_VERSION 105#ifndef DESKTOP_VERSION
106 addItemBool("ShowFullMenu",&mShowFullMenu,false); 106 addItemBool("ShowFullMenu",&mShowFullMenu,false);
107#else 107#else
108 addItemBool("ShowFullMenu",&mShowFullMenu,true); 108 addItemBool("ShowFullMenu",&mShowFullMenu,true);
109#endif 109#endif
110 addItemBool("ToolBarHor",&mToolBarHor, true ); 110 addItemBool("ToolBarHor",&mToolBarHor, true );
111 addItemBool("ToolBarUp",&mToolBarUp, false ); 111 addItemBool("ToolBarUp",&mToolBarUp, false );
112 addItemBool("ToolBarHorV",&mToolBarHorV, true ); 112 addItemBool("ToolBarHorV",&mToolBarHorV, true );
113 addItemBool("ToolBarUpV",&mToolBarUpV, false ); 113 addItemBool("ToolBarUpV",&mToolBarUpV, false );
114 addItemBool("ToolBarHorN",&mToolBarHorN, true ); 114 addItemBool("ToolBarHorN",&mToolBarHorN, true );
115 addItemBool("ToolBarUpN",&mToolBarUpN, false ); 115 addItemBool("ToolBarUpN",&mToolBarUpN, false );
116 addItemBool("ToolBarHorF",&mToolBarHorF, true ); 116 addItemBool("ToolBarHorF",&mToolBarHorF, true );
117 addItemBool("ToolBarUpF",&mToolBarUpF, false ); 117 addItemBool("ToolBarUpF",&mToolBarUpF, false );
118 addItemBool("ToolBarMiniIcons",&mToolBarMiniIcons, false ); 118 addItemBool("ToolBarMiniIcons",&mToolBarMiniIcons, false );
119 addItemInt("Whats Next Days",&mWhatsNextDays,3); 119 addItemInt("Whats Next Days",&mWhatsNextDays,3);
120 addItemInt("Whats Next Prios",&mWhatsNextPrios,1); 120 addItemInt("Whats Next Prios",&mWhatsNextPrios,1);
121 121
122 addItemBool("ShowTodoInAgenda",&mShowTodoInAgenda,true); 122 addItemBool("ShowTodoInAgenda",&mShowTodoInAgenda,true);
123 addItemBool("ShowTimeInAgenda",&mShowTimeInAgenda,true); 123 addItemBool("ShowTimeInAgenda",&mShowTimeInAgenda,true);
124 addItemBool("HideNonStartedTodos",&mHideNonStartedTodos,false); 124 addItemBool("HideNonStartedTodos",&mHideNonStartedTodos,false);
125 addItemBool("ShowCompletedTodo",&mShowCompletedTodo,true); 125 addItemBool("ShowCompletedTodo",&mShowCompletedTodo,true);
126 addItemInt("AllDay Size",&mAllDaySize,28); 126 addItemInt("AllDay Size",&mAllDaySize,28);
127 QString defAlarm = KGlobal::iconLoader()->iconPath()+"koalarm.wav"; 127 QString defAlarm = KGlobal::iconLoader()->iconPath()+"koalarm.wav";
128 addItemString("DefaultAlarmFile",&mDefaultAlarmFile,defAlarm ); 128 addItemString("DefaultAlarmFile",&mDefaultAlarmFile,defAlarm );
129 129
130 addItemStringList("LocationDefaults",&mLocationDefaults ); 130 addItemStringList("LocationDefaults",&mLocationDefaults );
131 addItemStringList("EventSummary User",&mEventSummaryUser); 131 addItemStringList("EventSummary User",&mEventSummaryUser);
132 addItemStringList("TodoSummary User",&mTodoSummaryUser); 132 addItemStringList("TodoSummary User",&mTodoSummaryUser);
133 133
134 addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); 134 addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false);
135 addItemBool("Enable Project View",&mEnableProjectView,false); 135 addItemBool("Enable Project View",&mEnableProjectView,false);
136 addItemBool("Auto Save",&mAutoSave,false); 136 addItemBool("Auto Save",&mAutoSave,false);
137 addItemInt("Auto Save Interval",&mAutoSaveInterval,3); 137 addItemInt("Auto Save Interval",&mAutoSaveInterval,3);
138 addItemBool("Confirm Deletes",&mConfirm,true); 138 addItemBool("Confirm Deletes",&mConfirm,true);
139 addItemString("Archive File",&mArchiveFile); 139 addItemString("Archive File",&mArchiveFile);
140 addItemString("Html Export File",&mHtmlExportFile, 140 addItemString("Html Export File",&mHtmlExportFile,
141 QDir::homeDirPath() + "/" + i18n("Default export file", "calendar.html")); 141 QDir::homeDirPath() + "/" + i18n("Default export file", "calendar.html"));
142 addItemBool("Html With Save",&mHtmlWithSave,false); 142 addItemBool("Html With Save",&mHtmlWithSave,false);
143 143
144 KPrefs::setCurrentGroup("Personal Settings"); 144 KPrefs::setCurrentGroup("Personal Settings");
145 145
146 addItemInt("Mail Client",&mMailClient,MailClientKMail); 146 addItemInt("Mail Client",&mMailClient,MailClientKMail);
147 addItemBool("Use Control Center Email",&mEmailControlCenter,false); 147 addItemBool("Use Control Center Email",&mEmailControlCenter,false);
148 addItemBool("Bcc",&mBcc,false); 148 addItemBool("Bcc",&mBcc,false);
149 149
150 KPrefs::setCurrentGroup("Time & Date"); 150 KPrefs::setCurrentGroup("Time & Date");
151 151
152 152
153 addItemInt("Default Start Time",&mStartTime,10); 153 addItemInt("Default Start Time",&mStartTime,10);
154 addItemInt("Default Duration",&mDefaultDuration,2); 154 addItemInt("Default Duration",&mDefaultDuration,2);
155 addItemInt("Default Alarm Time",&mAlarmTime,3); 155 addItemInt("Default Alarm Time",&mAlarmTime,3);
156 KPrefs::setCurrentGroup("AlarmSettings"); 156 KPrefs::setCurrentGroup("AlarmSettings");
157 addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20); 157 addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20);
158 addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7); 158 addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7);
159 addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5); 159 addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5);
160 addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3); 160 addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3);
161 161
162 162
163 KPrefs::setCurrentGroup("Calendar"); 163 KPrefs::setCurrentGroup("Calendar");
164 164
165 addItemInt("Default Calendar Format",&mDefaultFormat,FormatICalendar); 165 addItemInt("Default Calendar Format",&mDefaultFormat,FormatICalendar);
166 166
167 KPrefs::setCurrentGroup("Fonts"); 167 KPrefs::setCurrentGroup("Fonts");
168 // qDebug(" KPrefs::setCurrentGroup(Fonts); "); 168 // qDebug(" KPrefs::setCurrentGroup(Fonts); ");
169 QFont fon = KGlobalSettings::generalFont(); 169 QFont fon = KGlobalSettings::generalFont();
170 addItemFont("TimeBar Font",&mTimeBarFont,fon ); 170 addItemFont("TimeBar Font",&mTimeBarFont,fon );
171 addItemFont("MonthView Font",&mMonthViewFont,fon); 171 addItemFont("MonthView Font",&mMonthViewFont,fon);
172 addItemFont("AgendaView Font",&mAgendaViewFont,fon); 172 addItemFont("AgendaView Font",&mAgendaViewFont,fon);
173 addItemFont("MarcusBains Font",&mMarcusBainsFont,fon); 173 addItemFont("MarcusBains Font",&mMarcusBainsFont,fon);
174 addItemFont("TimeLabels Font",&mTimeLabelsFont,fon); 174 addItemFont("TimeLabels Font",&mTimeLabelsFont,fon);
175 addItemFont("TodoView Font",&mTodoViewFont,fon); 175 addItemFont("TodoView Font",&mTodoViewFont,fon);
176 addItemFont("ListView Font",&mListViewFont,fon); 176 addItemFont("ListView Font",&mListViewFont,fon);
177 addItemFont("DateNavigator Font",&mDateNavigatorFont,fon); 177 addItemFont("DateNavigator Font",&mDateNavigatorFont,fon);
178 addItemFont("EditBox Font",&mEditBoxFont,fon); 178 addItemFont("EditBox Font",&mEditBoxFont,fon);
179 addItemFont("JournalView Font",&mJornalViewFont,fon); 179 addItemFont("JournalView Font",&mJornalViewFont,fon);
180 addItemFont("WhatsNextView Font",&mWhatsNextFont,fon); 180 addItemFont("WhatsNextView Font",&mWhatsNextFont,fon);
181 addItemFont("EventView Font",&mEventViewFont,fon); 181 addItemFont("EventView Font",&mEventViewFont,fon);
182 182
183 KPrefs::setCurrentGroup("RemoteSyncing"); 183 KPrefs::setCurrentGroup("RemoteSyncing");
184 addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" ); 184 addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" );
185 addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" ); 185 addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" );
186 addItemBool("ShowSyncEvents",&mShowSyncEvents,false); 186 addItemBool("ShowSyncEvents",&mShowSyncEvents,false);
187 addItemInt("LastSyncTime",&mLastSyncTime,0); 187 addItemInt("LastSyncTime",&mLastSyncTime,0);
188 188
189#ifdef _WIN32_ 189#ifdef _WIN32_
190 QString hdp= locateLocal("data","korganizer")+"\\\\"; 190 QString hdp= locateLocal("data","korganizer")+"\\\\";
191#else 191#else
192 QString hdp= locateLocal("data","korganizer")+"/"; 192 QString hdp= locateLocal("data","korganizer")+"/";
193#endif 193#endif
194 194
195 KPrefs::setCurrentGroup("LoadSaveFileNames"); 195 KPrefs::setCurrentGroup("LoadSaveFileNames");
196 196
197 addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" ); 197 addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" );
198 addItemString("LastVcalFile", &mLastVcalFile ,hdp +"export.vcs" ); 198 addItemString("LastVcalFile", &mLastVcalFile ,hdp +"export.vcs" );
199 addItemString("LastSaveFile", &mLastSaveFile ,hdp +"mybackup.ics" ); 199 addItemString("LastSaveFile", &mLastSaveFile ,hdp +"mybackup.ics" );
200 addItemString("LastLoadFile", &mLastLoadFile ,hdp +"mybackup.ics" ); 200 addItemString("LastLoadFile", &mLastLoadFile ,hdp +"mybackup.ics" );
201 201
202 202
203 KPrefs::setCurrentGroup("Locale"); 203 KPrefs::setCurrentGroup("Locale");
204 addItemBool("ShortDateInViewer",&mShortDateInViewer,false); 204 addItemBool("ShortDateInViewer",&mShortDateInViewer,false);
205 205
206 206
207 KPrefs::setCurrentGroup("Colors"); 207 KPrefs::setCurrentGroup("Colors");
208 addItemColor("Holiday Color",&mHolidayColor,defaultHolidayColor); 208 addItemColor("Holiday Color",&mHolidayColor,defaultHolidayColor);
209 addItemColor("Highlight Color",&mHighlightColor,defaultHighlightColor); 209 addItemColor("Highlight Color",&mHighlightColor,defaultHighlightColor);
210 addItemColor("Event Color",&mEventColor,mDefaultCategoryColor); 210 addItemColor("Event Color",&mEventColor,mDefaultCategoryColor);
211 addItemColor("Todo done Color",&mTodoDoneColor,QColor(111,255,115) ); 211 addItemColor("Todo done Color",&mTodoDoneColor,QColor(111,255,115) );
212 addItemColor("Agenda Background Color",&mAgendaBgColor,defaultAgendaBgColor); 212 addItemColor("Agenda Background Color",&mAgendaBgColor,defaultAgendaBgColor);
213 addItemColor("WorkingHours Color",&mWorkingHoursColor,defaultWorkingHoursColor); 213 addItemColor("WorkingHours Color",&mWorkingHoursColor,defaultWorkingHoursColor);
214 addItemColor("Todo due today Color",&mTodoDueTodayColor,defaultTodoDueTodayColor); 214 addItemColor("Todo due today Color",&mTodoDueTodayColor,defaultTodoDueTodayColor);
215 addItemColor("Todo overdue Color",&mTodoOverdueColor,defaultTodoOverdueColor); 215 addItemColor("Todo overdue Color",&mTodoOverdueColor,defaultTodoOverdueColor);
216 addItemColor("Todo running Color",&mTodoRunColor,defaultTodoRunColor); 216 addItemColor("Todo running Color",&mTodoRunColor,defaultTodoRunColor);
217 addItemColor("MonthViewEvenColor",&mMonthViewEvenColor,QColor( 160,160,255 )); 217 addItemColor("MonthViewEvenColor",&mMonthViewEvenColor,QColor( 160,160,255 ));
218 addItemColor("MonthViewOddColor",&mMonthViewOddColor,QColor( 160,255,160 )); 218 addItemColor("MonthViewOddColor",&mMonthViewOddColor,QColor( 160,255,160 ));
219 addItemColor("MonthViewHolidayColor",&mMonthViewHolidayColor,QColor( 255,160,160 )); 219 addItemColor("MonthViewHolidayColor",&mMonthViewHolidayColor,QColor( 255,160,160 ));
220 addItemBool("MonthViewUsesDayColors",&mMonthViewUsesDayColors,true); 220 addItemBool("MonthViewUsesDayColors",&mMonthViewUsesDayColors,true);
221 addItemBool("MonthViewSatSunTog",&mMonthViewSatSunTog,true); 221 addItemBool("MonthViewSatSunTog",&mMonthViewSatSunTog,true);
222 addItemBool("MonthViewWeek",&mMonthViewWeek,false); 222 addItemBool("MonthViewWeek",&mMonthViewWeek,false);
223 addItemBool("HightlightDateTimeEdit",&mHightlightDateTimeEdit,false); 223 addItemBool("HightlightDateTimeEdit",&mHightlightDateTimeEdit,false);
224 addItemColor("AppColor1",&mAppColor1,QColor( 130,170,255 )); 224 addItemColor("AppColor1",&mAppColor1,QColor( 130,170,255 ));
225 addItemColor("AppColor2",&mAppColor2,QColor( 174,216,255 )); 225 addItemColor("AppColor2",&mAppColor2,QColor( 174,216,255 ));
226 addItemBool("UseAppColors",&mUseAppColors,false); 226 addItemBool("UseAppColors",&mUseAppColors,false);
227 227
228 228
229 229
230 KPrefs::setCurrentGroup("Views"); 230 KPrefs::setCurrentGroup("Views");
231 addItemBool("Block Popup Menu",&mBlockPopupMenu,true);
231 addItemBool("Show Date Navigator",&mShowDateNavigator,true); 232 addItemBool("Show Date Navigator",&mShowDateNavigator,true);
232 addItemInt("Hour Size",&mHourSize,8); 233 addItemInt("Hour Size",&mHourSize,8);
233 addItemBool("Show Daily Recurrences",&mDailyRecur,true); 234 addItemBool("Show Daily Recurrences",&mDailyRecur,true);
234 addItemBool("Show Weekly Recurrences",&mWeeklyRecur,true); 235 addItemBool("Show Weekly Recurrences",&mWeeklyRecur,true);
235 addItemBool("Show Month Daily Recurrences",&mMonthDailyRecur,true); 236 addItemBool("Show Month Daily Recurrences",&mMonthDailyRecur,true);
236 addItemBool("Show Month Weekly Recurrences",&mMonthWeeklyRecur,true); 237 addItemBool("Show Month Weekly Recurrences",&mMonthWeeklyRecur,true);
237 addItemBool("ShowShortMonthName",&mMonthShowShort,false); 238 addItemBool("ShowShortMonthName",&mMonthShowShort,false);
238 addItemBool("ShowIconsInMonthCell",&mMonthShowIcons,true); 239 addItemBool("ShowIconsInMonthCell",&mMonthShowIcons,true);
239#ifdef DESKTOP_VERION 240#ifdef DESKTOP_VERION
240 addItemBool("Enable ToolTips",&mEnableToolTips,true); 241 addItemBool("Enable ToolTips",&mEnableToolTips,true);
241#else 242#else
242 addItemBool("Enable ToolTips",&mEnableToolTips,false); 243 addItemBool("Enable ToolTips",&mEnableToolTips,false);
243#endif 244#endif
244 addItemBool("Enable MonthView ScrollBars",&mEnableMonthScroll,false); 245 addItemBool("Enable MonthView ScrollBars",&mEnableMonthScroll,false);
245 addItemBool("Marcus Bains shows seconds",&mMarcusBainsShowSeconds,false); 246 addItemBool("Marcus Bains shows seconds",&mMarcusBainsShowSeconds,false);
246 addItemBool("Show Marcus Bains",&mMarcusBainsEnabled,true); 247 addItemBool("Show Marcus Bains",&mMarcusBainsEnabled,true);
247 addItemBool("EditOnDoubleClick",&mEditOnDoubleClick,true); 248 addItemBool("EditOnDoubleClick",&mEditOnDoubleClick,true);
248 addItemBool("ViewChangeHoldFullscreen",&mViewChangeHoldFullscreen,true); 249 addItemBool("ViewChangeHoldFullscreen",&mViewChangeHoldFullscreen,true);
249 addItemBool("ViewChangeHoldNonFullscreen",&mViewChangeHoldNonFullscreen,false); 250 addItemBool("ViewChangeHoldNonFullscreen",&mViewChangeHoldNonFullscreen,false);
250 addItemBool("CenterOnCurrentTime",&mCenterOnCurrentTime,false); 251 addItemBool("CenterOnCurrentTime",&mCenterOnCurrentTime,false);
251 addItemBool("SetTimeToDayStartAt",&mSetTimeToDayStartAt,true); 252 addItemBool("SetTimeToDayStartAt",&mSetTimeToDayStartAt,true);
252 addItemBool("HighlightCurrentDay",&mHighlightCurrentDay,true); 253 addItemBool("HighlightCurrentDay",&mHighlightCurrentDay,true);
253 addItemBool("WNViewShowsParents",&mWNViewShowsParents,true);; 254 addItemBool("WNViewShowsParents",&mWNViewShowsParents,true);;
254 addItemBool("WNViewShowsPast",&mWNViewShowsPast,true); 255 addItemBool("WNViewShowsPast",&mWNViewShowsPast,true);
255 addItemBool("WNViewShowLocation",&mWNViewShowLocation,false); 256 addItemBool("WNViewShowLocation",&mWNViewShowLocation,false);
256 addItemBool("UseHighlightLightColor",&mUseHighlightLightColor,false); 257 addItemBool("UseHighlightLightColor",&mUseHighlightLightColor,false);
257 addItemBool("ListViewMonthTimespan",&mListViewMonthTimespan,true); 258 addItemBool("ListViewMonthTimespan",&mListViewMonthTimespan,true);
258 addItemBool("TodoViewUsesCatColors",&mTodoViewUsesCatColors,false); 259 addItemBool("TodoViewUsesCatColors",&mTodoViewUsesCatColors,false);
259 addItemBool("TodoViewShowsPercentage",&mTodoViewShowsPercentage,false); 260 addItemBool("TodoViewShowsPercentage",&mTodoViewShowsPercentage,false);
260 addItemBool("TodoViewUsesSmallFont",&mTodoViewUsesSmallFont,true); 261 addItemBool("TodoViewUsesSmallFont",&mTodoViewUsesSmallFont,true);
261 addItemBool("MonthViewUsesBigFont",&mMonthViewUsesBigFont,true); 262 addItemBool("MonthViewUsesBigFont",&mMonthViewUsesBigFont,true);
262 addItemBool("TodoViewUsesForegroundColor",&mTodoViewUsesForegroundColor,false); 263 addItemBool("TodoViewUsesForegroundColor",&mTodoViewUsesForegroundColor,false);
263 addItemBool("MonthViewUsesForegroundColor",&mMonthViewUsesForegroundColor,false); 264 addItemBool("MonthViewUsesForegroundColor",&mMonthViewUsesForegroundColor,false);
264#ifdef DESKTOP_VERSION 265#ifdef DESKTOP_VERSION
265 addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,true); 266 addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,true);
266#else 267#else
267 addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,false); 268 addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,false);
268#endif 269#endif
269 addItemInt("Day Begins",&mDayBegins,7); 270 addItemInt("Day Begins",&mDayBegins,7);
270 addItemInt("Working Hours Start",&mWorkingHoursStart,8); 271 addItemInt("Working Hours Start",&mWorkingHoursStart,8);
271 addItemInt("Working Hours End",&mWorkingHoursEnd,17); 272 addItemInt("Working Hours End",&mWorkingHoursEnd,17);
272 addItemBool("Exclude Holidays",&mExcludeHolidays,true); 273 addItemBool("Exclude Holidays",&mExcludeHolidays,true);
273 addItemBool("Exclude Saturdays",&mExcludeSaturdays,true); 274 addItemBool("Exclude Saturdays",&mExcludeSaturdays,true);
274 275
275 addItemBool("Month View Uses Category Color",&mMonthViewUsesCategoryColor,false); 276 addItemBool("Month View Uses Category Color",&mMonthViewUsesCategoryColor,false);
276 addItemBool("Full View Month",&mFullViewMonth,true); 277 addItemBool("Full View Month",&mFullViewMonth,true);
277 addItemBool("Full View Todo",&mFullViewTodo,true); 278 addItemBool("Full View Todo",&mFullViewTodo,true);
278 addItemBool("Quick Todo",&mEnableQuickTodo,false); 279 addItemBool("Quick Todo",&mEnableQuickTodo,false);
279 280
280 addItemInt("Next X Days",&mNextXDays,3); 281 addItemInt("Next X Days",&mNextXDays,3);
281 282
282 KPrefs::setCurrentGroup("Printer"); 283 KPrefs::setCurrentGroup("Printer");
283 284
284 KPrefs::setCurrentGroup("Layout"); 285 KPrefs::setCurrentGroup("Layout");
285 286
286 addItemBool("CompactDialogs",&mCompactDialogs,false); 287 addItemBool("CompactDialogs",&mCompactDialogs,false);
287 addItemBool("VerticalScreen",&mVerticalScreen,true); 288 addItemBool("VerticalScreen",&mVerticalScreen,true);
288 289
289 KPrefs::setCurrentGroup("KOrganizer Plugins"); 290 KPrefs::setCurrentGroup("KOrganizer Plugins");
290 291
291 addItemStringList("SelectedPlugins",&mSelectedPlugins,"holidays"); 292 addItemStringList("SelectedPlugins",&mSelectedPlugins,"holidays");
292 293
293 KPrefs::setCurrentGroup("Group Scheduling"); 294 KPrefs::setCurrentGroup("Group Scheduling");
294 295
295 addItemInt("IMIPScheduler",&mIMIPScheduler,IMIPKMail); 296 addItemInt("IMIPScheduler",&mIMIPScheduler,IMIPKMail);
296 addItemInt("IMIPSend",&mIMIPSend,IMIPdirectsend); 297 addItemInt("IMIPSend",&mIMIPSend,IMIPdirectsend);
297 addItemStringList("AdditionalMails",&mAdditionalMails,""); 298 addItemStringList("AdditionalMails",&mAdditionalMails,"");
298 addItemInt("IMIP auto refresh",&mIMIPAutoRefresh,neverAuto); 299 addItemInt("IMIP auto refresh",&mIMIPAutoRefresh,neverAuto);
299 addItemInt("IMIP auto insert request",&mIMIPAutoInsertRequest,neverAuto); 300 addItemInt("IMIP auto insert request",&mIMIPAutoInsertRequest,neverAuto);
300 addItemInt("IMIP auto insert reply",&mIMIPAutoInsertReply,neverAuto); 301 addItemInt("IMIP auto insert reply",&mIMIPAutoInsertReply,neverAuto);
301 addItemInt("IMIP auto FreeBusy",&mIMIPAutoFreeBusy,neverAuto); 302 addItemInt("IMIP auto FreeBusy",&mIMIPAutoFreeBusy,neverAuto);
302 addItemInt("IMIP auto save FreeBusy",&mIMIPAutoFreeBusyReply,neverAuto); 303 addItemInt("IMIP auto save FreeBusy",&mIMIPAutoFreeBusyReply,neverAuto);
303 304
304 KPrefs::setCurrentGroup( "Editors" ); 305 KPrefs::setCurrentGroup( "Editors" );
305 306
306 addItemStringList( "EventTemplates", &mEventTemplates ); 307 addItemStringList( "EventTemplates", &mEventTemplates );
307 addItemStringList( "TodoTemplates", &mTodoTemplates ); 308 addItemStringList( "TodoTemplates", &mTodoTemplates );
308 309
309 addItemInt("DestinationPolicy",&mDestination,standardDestination); 310 addItemInt("DestinationPolicy",&mDestination,standardDestination);
310 311
311 KPrefs::setCurrentGroup( "ViewOptions" ); 312 KPrefs::setCurrentGroup( "ViewOptions" );
312 addItemBool("EVshowDetails",&mEVshowDetails,true); 313 addItemBool("EVshowDetails",&mEVshowDetails,true);
313 addItemBool("EVshowCreated",&mEVshowCreated,true); 314 addItemBool("EVshowCreated",&mEVshowCreated,true);
314 addItemBool("EVshowChanged",&mEVshowChanged,true); 315 addItemBool("EVshowChanged",&mEVshowChanged,true);
315 addItemBool("WTshowDetails",&mWTshowDetails,false); 316 addItemBool("WTshowDetails",&mWTshowDetails,false);
316 addItemBool("WTshowCreated",&mWTshowCreated,false); 317 addItemBool("WTshowCreated",&mWTshowCreated,false);
317 addItemBool("WTshowChanged",&mWTshowChanged,false); 318 addItemBool("WTshowChanged",&mWTshowChanged,false);
318 319
319} 320}
320 321
321 322
322KOPrefs::~KOPrefs() 323KOPrefs::~KOPrefs()
323{ 324{
324 if (mInstance == this) 325 if (mInstance == this)
325 mInstance = insd.setObject(0); 326 mInstance = insd.setObject(0);
326 327
327 //qDebug("KOPrefs::~KOPrefs() "); 328 //qDebug("KOPrefs::~KOPrefs() ");
328} 329}
329 330
330 331
331KOPrefs *KOPrefs::instance() 332KOPrefs *KOPrefs::instance()
332{ 333{
333 if (!mInstance) { 334 if (!mInstance) {
334 mInstance = insd.setObject(new KOPrefs()); 335 mInstance = insd.setObject(new KOPrefs());
335 mInstance->readConfig(); 336 mInstance->readConfig();
336 } 337 }
337 338
338 return mInstance; 339 return mInstance;
339} 340}
340 341
341void KOPrefs::usrSetDefaults() 342void KOPrefs::usrSetDefaults()
342{ 343{
343 344
344} 345}
345 346
346void KOPrefs::fillMailDefaults() 347void KOPrefs::fillMailDefaults()
347{ 348{
348 if (mName.isEmpty()) mName = i18n("Anonymous"); 349 if (mName.isEmpty()) mName = i18n("Anonymous");
349 if (mEmail.isEmpty()) mEmail = i18n("nobody@nowhere"); 350 if (mEmail.isEmpty()) mEmail = i18n("nobody@nowhere");
350} 351}
351 352
352void KOPrefs::setTimeZoneIdDefault() 353void KOPrefs::setTimeZoneIdDefault()
353{ 354{
354 ; 355 ;
355} 356}
356 357
357void KOPrefs::setAllDefaults() 358void KOPrefs::setAllDefaults()
358{ 359{
359 setCategoryDefaults(); 360 setCategoryDefaults();
360 mEventSummaryUser = getDefaultList() ; 361 mEventSummaryUser = getDefaultList() ;
361 mTodoSummaryUser = getDefaultList() ; 362 mTodoSummaryUser = getDefaultList() ;
362 mLocationDefaults = getLocationDefaultList(); 363 mLocationDefaults = getLocationDefaultList();
363} 364}
364 365
365void KOPrefs::setCategoryDefaults() 366void KOPrefs::setCategoryDefaults()
366{ 367{
367 mCustomCategories.clear(); 368 mCustomCategories.clear();
368 mCustomCategories = getDefaultList(); 369 mCustomCategories = getDefaultList();
369 370
370 QStringList::Iterator it; 371 QStringList::Iterator it;
371 for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { 372 for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) {
372 setCategoryColor(*it,mDefaultCategoryColor); 373 setCategoryColor(*it,mDefaultCategoryColor);
373 } 374 }
374} 375}
375QStringList KOPrefs::getLocationDefaultList() 376QStringList KOPrefs::getLocationDefaultList()
376{ 377{
377 QStringList retval ; 378 QStringList retval ;
378 retval << i18n("Home") << i18n("Office") << i18n("Library") << i18n("School") << i18n("Doctor") << i18n("Beach") 379 retval << i18n("Home") << i18n("Office") << i18n("Library") << i18n("School") << i18n("Doctor") << i18n("Beach")
379 << i18n("University") << i18n("Restaurant") << i18n("Bar") << i18n("Conference room") 380 << i18n("University") << i18n("Restaurant") << i18n("Bar") << i18n("Conference room")
380 << i18n("Cinema") << i18n("Lake") << i18n("Kindergarten") 381 << i18n("Cinema") << i18n("Lake") << i18n("Kindergarten")
381 << i18n("Germany") << i18n("Sweden") << i18n("Forest") << i18n("Desert") << i18n("Kitchen") ; 382 << i18n("Germany") << i18n("Sweden") << i18n("Forest") << i18n("Desert") << i18n("Kitchen") ;
382 // << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") 383 // << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("")
383 384
384 retval.sort(); 385 retval.sort();
385 return retval; 386 return retval;
386} 387}
387QStringList KOPrefs::getDefaultList() 388QStringList KOPrefs::getDefaultList()
388{ 389{
389 QStringList retval ; 390 QStringList retval ;
390 retval << i18n("Anniversary") << i18n("Appointment") << i18n("Birthday") << i18n("Business") << i18n("Business Travel") << i18n("Cinema") << i18n("Customer") 391 retval << i18n("Anniversary") << i18n("Appointment") << i18n("Birthday") << i18n("Business") << i18n("Business Travel") << i18n("Cinema") << i18n("Customer")
391 << i18n("Break")<< i18n("Breakfast")<< i18n("Competition")<< i18n("Dinner") 392 << i18n("Break")<< i18n("Breakfast")<< i18n("Competition")<< i18n("Dinner")
392 << i18n("Education")<< i18n("Family") << i18n("Favorites") << i18n("Festival")<< i18n("Fishing")<< i18n("Flight") << i18n("Gifts") 393 << i18n("Education")<< i18n("Family") << i18n("Favorites") << i18n("Festival")<< i18n("Fishing")<< i18n("Flight") << i18n("Gifts")
393 << i18n("Holiday") << i18n("Holiday Cards")<< i18n("Hot Contacts") << i18n("Hiking") << i18n("Hunting") << i18n("Key Customer") << i18n("Kids") 394 << i18n("Holiday") << i18n("Holiday Cards")<< i18n("Hot Contacts") << i18n("Hiking") << i18n("Hunting") << i18n("Key Customer") << i18n("Kids")
394 << i18n("Lunch") << i18n("Meeting") << i18n("Miscellaneous") << i18n("Partner")<< i18n("Party") << i18n("Personal") << i18n("Personal Travel") 395 << i18n("Lunch") << i18n("Meeting") << i18n("Miscellaneous") << i18n("Partner")<< i18n("Party") << i18n("Personal") << i18n("Personal Travel")
395 << i18n("PHB") << i18n("Phone Calls") << i18n("Projects") << i18n("Recurring") << i18n("School") << i18n("Shopping") 396 << i18n("PHB") << i18n("Phone Calls") << i18n("Projects") << i18n("Recurring") << i18n("School") << i18n("Shopping")
396 << i18n("Speach") << i18n("Special Occasion") << i18n("Sports") << i18n("Talk") << i18n("Travel") << i18n("TV")<< i18n("University") 397 << i18n("Speach") << i18n("Special Occasion") << i18n("Sports") << i18n("Talk") << i18n("Travel") << i18n("TV")<< i18n("University")
397 << i18n("Vacation") << i18n("VIP") << i18n("SyncEvent") ; 398 << i18n("Vacation") << i18n("VIP") << i18n("SyncEvent") ;
398 retval.sort(); 399 retval.sort();
399 //qDebug("cat %s ", retval.join("-").latin1()); 400 //qDebug("cat %s ", retval.join("-").latin1());
400 return retval; 401 return retval;
401} 402}
402 403
403void KOPrefs::usrReadConfig() 404void KOPrefs::usrReadConfig()
404{ 405{
405 config()->setGroup("General"); 406 config()->setGroup("General");
406 407
407 //qDebug("KOPrefs::usrReadConfig() "); 408 //qDebug("KOPrefs::usrReadConfig() ");
408 mCustomCategories = config()->readListEntry("Custom Categories"); 409 mCustomCategories = config()->readListEntry("Custom Categories");
409 mOldLoadedLanguage = mOldLanguage ; 410 mOldLoadedLanguage = mOldLanguage ;
410 mOldLanguage = KPimGlobalPrefs::instance()->mPreferredLanguage; 411 mOldLanguage = KPimGlobalPrefs::instance()->mPreferredLanguage;
411 if (mLocationDefaults.isEmpty()) { 412 if (mLocationDefaults.isEmpty()) {
412 mLocationDefaults = getLocationDefaultList(); 413 mLocationDefaults = getLocationDefaultList();
413 } 414 }
414 415
415 if (mEventSummaryUser.isEmpty()) { 416 if (mEventSummaryUser.isEmpty()) {
416 mEventSummaryUser = getDefaultList() ; 417 mEventSummaryUser = getDefaultList() ;
417 } 418 }
418 if (mTodoSummaryUser.isEmpty()) { 419 if (mTodoSummaryUser.isEmpty()) {
419 mTodoSummaryUser = getDefaultList() ; 420 mTodoSummaryUser = getDefaultList() ;
420 } 421 }
421 422
422 if (mCustomCategories.isEmpty()) setCategoryDefaults(); 423 if (mCustomCategories.isEmpty()) setCategoryDefaults();
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h
index d511faa..2a0ee64 100644
--- a/korganizer/koprefs.h
+++ b/korganizer/koprefs.h
@@ -32,286 +32,288 @@ class QFont;
32class QColor; 32class QColor;
33class QStringList; 33class QStringList;
34 34
35#define VIEW_WN_VIEW 1 35#define VIEW_WN_VIEW 1
36#define VIEW_NX_VIEW 2 36#define VIEW_NX_VIEW 2
37#define VIEW_J_VIEW 3 37#define VIEW_J_VIEW 3
38#define VIEW_A_VIEW 4 38#define VIEW_A_VIEW 4
39#define VIEW_ML_VIEW 5 39#define VIEW_ML_VIEW 5
40#define VIEW_M_VIEW 6 40#define VIEW_M_VIEW 6
41#define VIEW_L_VIEW 7 41#define VIEW_L_VIEW 7
42#define VIEW_T_VIEW 8 42#define VIEW_T_VIEW 8
43 43
44class KOPrefs : public KPimPrefs 44class KOPrefs : public KPimPrefs
45{ 45{
46 public: 46 public:
47 enum { FormatVCalendar, FormatICalendar }; 47 enum { FormatVCalendar, FormatICalendar };
48 enum { MailClientKMail, MailClientSendmail }; 48 enum { MailClientKMail, MailClientSendmail };
49 enum { IMIPDummy, IMIPKMail }; 49 enum { IMIPDummy, IMIPKMail };
50 enum { IMIPOutbox, IMIPdirectsend }; 50 enum { IMIPOutbox, IMIPdirectsend };
51 enum { neverAuto, addressbookAuto, selectedAuto }; 51 enum { neverAuto, addressbookAuto, selectedAuto };
52 enum { standardDestination, askDestination }; 52 enum { standardDestination, askDestination };
53 53
54 virtual ~KOPrefs(); 54 virtual ~KOPrefs();
55 55
56 /** Get instance of KOPrefs. It is made sure that there is only one 56 /** Get instance of KOPrefs. It is made sure that there is only one
57 instance. */ 57 instance. */
58 static KOPrefs *instance(); 58 static KOPrefs *instance();
59 59
60 /** Set preferences to default values */ 60 /** Set preferences to default values */
61 void usrSetDefaults(); 61 void usrSetDefaults();
62 62
63 /** Read preferences from config file */ 63 /** Read preferences from config file */
64 void usrReadConfig(); 64 void usrReadConfig();
65 65
66 /** Write preferences to config file */ 66 /** Write preferences to config file */
67 void usrWriteConfig(); 67 void usrWriteConfig();
68 void setCategoryDefaults(); 68 void setCategoryDefaults();
69 void setAllDefaults(); 69 void setAllDefaults();
70 70
71 protected: 71 protected:
72 void setTimeZoneIdDefault(); 72 void setTimeZoneIdDefault();
73 73
74 /** Fill empty mail fields with default values. */ 74 /** Fill empty mail fields with default values. */
75 void fillMailDefaults(); 75 void fillMailDefaults();
76 76
77 private: 77 private:
78 /** Constructor disabled for public. Use instance() to create a KOPrefs 78 /** Constructor disabled for public. Use instance() to create a KOPrefs
79 object. */ 79 object. */
80 KOPrefs(); 80 KOPrefs();
81 81
82 static KOPrefs *mInstance; 82 static KOPrefs *mInstance;
83 QStringList getDefaultList(); 83 QStringList getDefaultList();
84 QStringList getLocationDefaultList(); 84 QStringList getLocationDefaultList();
85 public: 85 public:
86 // preferences data 86 // preferences data
87 KConfig* getConfig(); 87 KConfig* getConfig();
88 void setFullName(const QString &); 88 void setFullName(const QString &);
89 QString fullName(); 89 QString fullName();
90 void setEmail(const QString &); 90 void setEmail(const QString &);
91 QString email(); 91 QString email();
92 92
93 QString mAdditional; 93 QString mAdditional;
94 94
95 bool mEmailControlCenter; 95 bool mEmailControlCenter;
96 96
97 bool mBcc; 97 bool mBcc;
98 bool mAutoSave; 98 bool mAutoSave;
99 int mAutoSaveInterval; 99 int mAutoSaveInterval;
100 bool mConfirm; 100 bool mConfirm;
101 101
102 bool mEnableGroupScheduling; 102 bool mEnableGroupScheduling;
103 bool mEnableProjectView; 103 bool mEnableProjectView;
104 104
105 int mDefaultFormat; 105 int mDefaultFormat;
106 int mMailClient; 106 int mMailClient;
107 107
108 int mStartTime; 108 int mStartTime;
109 int mDefaultDuration; 109 int mDefaultDuration;
110 int mAlarmTime; 110 int mAlarmTime;
111 111
112 int mWorkingHoursStart; 112 int mWorkingHoursStart;
113 int mWorkingHoursEnd; 113 int mWorkingHoursEnd;
114 bool mExcludeHolidays; 114 bool mExcludeHolidays;
115 bool mExcludeSaturdays; 115 bool mExcludeSaturdays;
116 bool mMarcusBainsShowSeconds; 116 bool mMarcusBainsShowSeconds;
117 117
118 QFont mTimeBarFont; 118 QFont mTimeBarFont;
119 QFont mMonthViewFont; 119 QFont mMonthViewFont;
120 QFont mAgendaViewFont; 120 QFont mAgendaViewFont;
121 QFont mMarcusBainsFont; 121 QFont mMarcusBainsFont;
122 QFont mTimeLabelsFont; 122 QFont mTimeLabelsFont;
123 QFont mTodoViewFont; 123 QFont mTodoViewFont;
124 QFont mListViewFont; 124 QFont mListViewFont;
125 QFont mDateNavigatorFont; 125 QFont mDateNavigatorFont;
126 QFont mEditBoxFont; 126 QFont mEditBoxFont;
127 QFont mJornalViewFont; 127 QFont mJornalViewFont;
128 QFont mWhatsNextFont; 128 QFont mWhatsNextFont;
129 QFont mEventViewFont; 129 QFont mEventViewFont;
130 130
131 131
132 132
133 133
134 QColor mHolidayColor; 134 QColor mHolidayColor;
135 QColor mHighlightColor; 135 QColor mHighlightColor;
136 QColor mEventColor; 136 QColor mEventColor;
137 QColor mTodoDoneColor; 137 QColor mTodoDoneColor;
138 QColor mAgendaBgColor; 138 QColor mAgendaBgColor;
139 QColor mWorkingHoursColor; 139 QColor mWorkingHoursColor;
140 QColor mTodoDueTodayColor; 140 QColor mTodoDueTodayColor;
141 QColor mTodoOverdueColor; 141 QColor mTodoOverdueColor;
142 QColor mTodoRunColor; 142 QColor mTodoRunColor;
143 QColor mMonthViewEvenColor; 143 QColor mMonthViewEvenColor;
144 QColor mMonthViewOddColor; 144 QColor mMonthViewOddColor;
145 QColor mMonthViewHolidayColor; 145 QColor mMonthViewHolidayColor;
146 bool mMonthViewUsesDayColors; 146 bool mMonthViewUsesDayColors;
147 bool mMonthViewSatSunTog; 147 bool mMonthViewSatSunTog;
148 bool mMonthViewWeek; 148 bool mMonthViewWeek;
149 QColor mAppColor1; 149 QColor mAppColor1;
150 QColor mAppColor2; 150 QColor mAppColor2;
151 bool mUseAppColors; 151 bool mUseAppColors;
152 152
153 int mDayBegins; 153 int mDayBegins;
154 int mHourSize; 154 int mHourSize;
155 int mAllDaySize; 155 int mAllDaySize;
156 bool mShowFullMenu; 156 bool mShowFullMenu;
157 bool mDailyRecur; 157 bool mDailyRecur;
158 bool mWeeklyRecur; 158 bool mWeeklyRecur;
159 bool mMonthDailyRecur; 159 bool mMonthDailyRecur;
160 bool mMonthWeeklyRecur; 160 bool mMonthWeeklyRecur;
161 bool mMonthShowIcons; 161 bool mMonthShowIcons;
162 bool mMonthShowShort; 162 bool mMonthShowShort;
163 bool mEnableToolTips; 163 bool mEnableToolTips;
164 bool mEnableMonthScroll; 164 bool mEnableMonthScroll;
165 bool mFullViewMonth; 165 bool mFullViewMonth;
166 bool mMonthViewUsesCategoryColor; 166 bool mMonthViewUsesCategoryColor;
167 bool mFullViewTodo; 167 bool mFullViewTodo;
168 bool mShowCompletedTodo; 168 bool mShowCompletedTodo;
169 bool mMarcusBainsEnabled; 169 bool mMarcusBainsEnabled;
170 int mNextXDays; 170 int mNextXDays;
171 int mWhatsNextDays; 171 int mWhatsNextDays;
172 int mWhatsNextPrios; 172 int mWhatsNextPrios;
173 bool mEnableQuickTodo; 173 bool mEnableQuickTodo;
174 174
175 bool mCompactDialogs; 175 bool mCompactDialogs;
176 bool mVerticalScreen; 176 bool mVerticalScreen;
177 177
178 bool mShowIconNewTodo; 178 bool mShowIconNewTodo;
179 bool mShowIconNewEvent; 179 bool mShowIconNewEvent;
180 bool mShowIconSearch; 180 bool mShowIconSearch;
181 bool mShowIconList; 181 bool mShowIconList;
182 bool mShowIconDay1; 182 bool mShowIconDay1;
183 bool mShowIconDay5; 183 bool mShowIconDay5;
184 bool mShowIconDay6; 184 bool mShowIconDay6;
185 bool mShowIconDay7; 185 bool mShowIconDay7;
186 bool mShowIconMonth; 186 bool mShowIconMonth;
187 bool mShowIconTodoview; 187 bool mShowIconTodoview;
188 bool mShowIconBackFast; 188 bool mShowIconBackFast;
189 bool mShowIconBack; 189 bool mShowIconBack;
190 bool mShowIconToday; 190 bool mShowIconToday;
191 bool mShowIconForward; 191 bool mShowIconForward;
192 bool mShowIconForwardFast; 192 bool mShowIconForwardFast;
193 bool mShowIconWhatsThis; 193 bool mShowIconWhatsThis;
194 bool mShowIconWeekNum; 194 bool mShowIconWeekNum;
195 bool mShowIconNextDays; 195 bool mShowIconNextDays;
196 bool mShowIconNext; 196 bool mShowIconNext;
197 bool mShowIconJournal; 197 bool mShowIconJournal;
198 bool mShowIconFilter; 198 bool mShowIconFilter;
199 bool mShowIconOnetoolbar; 199 bool mShowIconOnetoolbar;
200 bool mShowIconNavigator; 200 bool mShowIconNavigator;
201 bool mShowIconAllday; 201 bool mShowIconAllday;
202 bool mShowIconFilterview; 202 bool mShowIconFilterview;
203 bool mShowIconToggleFull; 203 bool mShowIconToggleFull;
204 204
205 bool mShowIconStretch; 205 bool mShowIconStretch;
206 206
207 bool mToolBarHor; 207 bool mToolBarHor;
208 bool mToolBarUp; 208 bool mToolBarUp;
209 bool mToolBarHorV; 209 bool mToolBarHorV;
210 bool mToolBarUpV; 210 bool mToolBarUpV;
211 bool mToolBarHorN; 211 bool mToolBarHorN;
212 bool mToolBarUpN; 212 bool mToolBarUpN;
213 bool mToolBarHorF; 213 bool mToolBarHorF;
214 bool mToolBarUpF; 214 bool mToolBarUpF;
215 bool mToolBarMiniIcons; 215 bool mToolBarMiniIcons;
216 216
217 bool mAskForQuit; 217 bool mAskForQuit;
218 bool mUsePassWd; 218 bool mUsePassWd;
219 bool mShowSyncEvents; 219 bool mShowSyncEvents;
220 bool mShowTodoInAgenda; 220 bool mShowTodoInAgenda;
221 bool mShowTimeInAgenda; 221 bool mShowTimeInAgenda;
222 bool mHideNonStartedTodos; 222 bool mHideNonStartedTodos;
223 223
224 bool mBlockPopupMenu;
225
224 int mLastSyncTime; 226 int mLastSyncTime;
225 void setCategoryColor(QString cat,const QColor & color); 227 void setCategoryColor(QString cat,const QColor & color);
226 QColor *categoryColor(QString cat); 228 QColor *categoryColor(QString cat);
227 229
228 QString mArchiveFile; 230 QString mArchiveFile;
229 QString mHtmlExportFile; 231 QString mHtmlExportFile;
230 bool mHtmlWithSave; 232 bool mHtmlWithSave;
231 233
232 QStringList mSelectedPlugins; 234 QStringList mSelectedPlugins;
233 235
234 QString mLastImportFile; 236 QString mLastImportFile;
235 QString mLastVcalFile; 237 QString mLastVcalFile;
236 QString mLastSaveFile; 238 QString mLastSaveFile;
237 QString mLastLoadFile; 239 QString mLastLoadFile;
238 240
239 241
240 QString mDefaultAlarmFile; 242 QString mDefaultAlarmFile;
241 int mIMIPScheduler; 243 int mIMIPScheduler;
242 int mIMIPSend; 244 int mIMIPSend;
243 QStringList mAdditionalMails; 245 QStringList mAdditionalMails;
244 int mIMIPAutoRefresh; 246 int mIMIPAutoRefresh;
245 int mIMIPAutoInsertReply; 247 int mIMIPAutoInsertReply;
246 int mIMIPAutoInsertRequest; 248 int mIMIPAutoInsertRequest;
247 int mIMIPAutoFreeBusy; 249 int mIMIPAutoFreeBusy;
248 int mIMIPAutoFreeBusyReply; 250 int mIMIPAutoFreeBusyReply;
249 251
250 QStringList mTodoTemplates; 252 QStringList mTodoTemplates;
251 QStringList mEventTemplates; 253 QStringList mEventTemplates;
252 254
253 int mDestination; 255 int mDestination;
254 256
255 257
256 bool mEditOnDoubleClick; 258 bool mEditOnDoubleClick;
257 bool mViewChangeHoldFullscreen; 259 bool mViewChangeHoldFullscreen;
258 bool mViewChangeHoldNonFullscreen; 260 bool mViewChangeHoldNonFullscreen;
259 bool mCenterOnCurrentTime; 261 bool mCenterOnCurrentTime;
260 bool mSetTimeToDayStartAt; 262 bool mSetTimeToDayStartAt;
261 bool mHighlightCurrentDay; 263 bool mHighlightCurrentDay;
262 bool mUseHighlightLightColor; 264 bool mUseHighlightLightColor;
263 bool mListViewMonthTimespan; 265 bool mListViewMonthTimespan;
264 bool mWNViewShowsParents; 266 bool mWNViewShowsParents;
265 bool mWNViewShowsPast; 267 bool mWNViewShowsPast;
266 bool mWNViewShowLocation; 268 bool mWNViewShowLocation;
267 bool mTodoViewShowsPercentage; 269 bool mTodoViewShowsPercentage;
268 bool mTodoViewUsesCatColors; 270 bool mTodoViewUsesCatColors;
269 bool mMonthViewUsesBigFont; 271 bool mMonthViewUsesBigFont;
270 bool mTodoViewUsesSmallFont; 272 bool mTodoViewUsesSmallFont;
271 bool mTodoViewUsesForegroundColor; 273 bool mTodoViewUsesForegroundColor;
272 bool mMonthViewUsesForegroundColor; 274 bool mMonthViewUsesForegroundColor;
273 275
274 bool mHightlightDateTimeEdit; 276 bool mHightlightDateTimeEdit;
275 bool mShortDateInViewer; 277 bool mShortDateInViewer;
276 278
277 bool mShowDateNavigator; 279 bool mShowDateNavigator;
278 280
279 QStringList mLocationDefaults; 281 QStringList mLocationDefaults;
280 QStringList mEventSummaryUser; 282 QStringList mEventSummaryUser;
281 QStringList mTodoSummaryUser; 283 QStringList mTodoSummaryUser;
282 284
283 bool mUseInternalAlarmNotification; 285 bool mUseInternalAlarmNotification;
284 int mAlarmPlayBeeps; 286 int mAlarmPlayBeeps;
285 int mAlarmSuspendTime; 287 int mAlarmSuspendTime;
286 int mAlarmSuspendCount; 288 int mAlarmSuspendCount;
287 int mAlarmBeepInterval; 289 int mAlarmBeepInterval;
288 int mOldLanguage; 290 int mOldLanguage;
289 int mOldLoadedLanguage; 291 int mOldLoadedLanguage;
290 292
291 293
292 QString mActiveSyncPort; 294 QString mActiveSyncPort;
293 QString mActiveSyncIP; 295 QString mActiveSyncIP;
294 296
295 // settings for eventviewer 297 // settings for eventviewer
296 bool mEVshowDetails; 298 bool mEVshowDetails;
297 bool mEVshowCreated; 299 bool mEVshowCreated;
298 bool mEVshowChanged; 300 bool mEVshowChanged;
299 bool mWTshowDetails; 301 bool mWTshowDetails;
300 bool mWTshowCreated; 302 bool mWTshowCreated;
301 bool mWTshowChanged; 303 bool mWTshowChanged;
302 304
303 int mCurrentDisplayedView; 305 int mCurrentDisplayedView;
304 306
305 private: 307 private:
306 QDict<QColor> mCategoryColors; 308 QDict<QColor> mCategoryColors;
307 QColor mDefaultCategoryColor; 309 QColor mDefaultCategoryColor;
308 310
309 QFont mDefaultTimeBarFont; 311 QFont mDefaultTimeBarFont;
310 QFont mDefaultViewFont; 312 QFont mDefaultViewFont;
311 QFont mDefaultMonthViewFont; 313 QFont mDefaultMonthViewFont;
312 314
313 QString mName; 315 QString mName;
314 QString mEmail; 316 QString mEmail;
315}; 317};
316 318
317#endif 319#endif
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index a8943de..ad3c61c 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -192,426 +192,434 @@ void KOPrefsDialog::setupLocaleTab()
192 ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); 192 ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical);
193 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 193 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
194 ++iii; 194 ++iii;
195 195
196 syncPrefsGroup = 196 syncPrefsGroup =
197 addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame); 197 addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame);
198 if ( QApplication::desktop()->width() > 300 ) 198 if ( QApplication::desktop()->width() > 300 )
199 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); 199 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical);
200 syncPrefsGroup->addRadio(i18n("24:00")); 200 syncPrefsGroup->addRadio(i18n("24:00"));
201 syncPrefsGroup->addRadio(i18n("12:00am")); 201 syncPrefsGroup->addRadio(i18n("12:00am"));
202 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); 202 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical);
203 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 203 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
204 ++iii; 204 ++iii;
205 KPrefsDialogWidBool *sb; 205 KPrefsDialogWidBool *sb;
206 if ( QApplication::desktop()->width() < 300 ) { 206 if ( QApplication::desktop()->width() < 300 ) {
207 sb = 207 sb =
208 addWidBool(i18n("Week starts on Sunday"), 208 addWidBool(i18n("Week starts on Sunday"),
209 &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame); 209 &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame);
210 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 210 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
211 ++iii; 211 ++iii;
212 sb = 212 sb =
213 addWidBool(i18n("Use short date in (WN/E) view"), 213 addWidBool(i18n("Use short date in (WN/E) view"),
214 &(KOPrefs::instance()->mShortDateInViewer),topFrame); 214 &(KOPrefs::instance()->mShortDateInViewer),topFrame);
215 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 215 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
216 } 216 }
217 else { 217 else {
218 QWidget * hb = new QWidget( topFrame ); 218 QWidget * hb = new QWidget( topFrame );
219 QHBoxLayout *hbLayout = new QHBoxLayout(hb); 219 QHBoxLayout *hbLayout = new QHBoxLayout(hb);
220 sb = 220 sb =
221 addWidBool(i18n("Week starts on Sunday"), 221 addWidBool(i18n("Week starts on Sunday"),
222 &(KOPrefs::instance()->mWeekStartsOnSunday),hb); 222 &(KOPrefs::instance()->mWeekStartsOnSunday),hb);
223 hbLayout->addWidget(sb->checkBox() ); 223 hbLayout->addWidget(sb->checkBox() );
224 sb = 224 sb =
225 addWidBool(i18n("Use short date in (WN/E) view"), 225 addWidBool(i18n("Use short date in (WN/E) view"),
226 &(KOPrefs::instance()->mShortDateInViewer),hb); 226 &(KOPrefs::instance()->mShortDateInViewer),hb);
227 hbLayout->addWidget(sb->checkBox() ); 227 hbLayout->addWidget(sb->checkBox() );
228 topLayout->addMultiCellWidget(hb, iii,iii,0,1); 228 topLayout->addMultiCellWidget(hb, iii,iii,0,1);
229 229
230 } 230 }
231 // KPrefsDialogWidBool *sb; //#ifndef DESKTOP_VERSION 231 // KPrefsDialogWidBool *sb; //#ifndef DESKTOP_VERSION
232#if 0 232#if 0
233 ++iii; 233 ++iii;
234 sb = 234 sb =
235 addWidBool(i18n("Quick load/save (w/o Unicode)"), 235 addWidBool(i18n("Quick load/save (w/o Unicode)"),
236 &(KOPrefs::instance()->mUseQuicksave),topFrame); 236 &(KOPrefs::instance()->mUseQuicksave),topFrame);
237 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 237 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
238#endif 238#endif
239#endif 239#endif
240} 240}
241void KOPrefsDialog::showSyncPage() 241void KOPrefsDialog::showSyncPage()
242{ 242{
243 showPage ( 0 ) ; 243 showPage ( 0 ) ;
244 kdelibcfg->showTimeZoneTab() ; 244 kdelibcfg->showTimeZoneTab() ;
245 245
246} 246}
247void KOPrefsDialog::setupSyncAlgTab() 247void KOPrefsDialog::setupSyncAlgTab()
248{ 248{
249#if 0 249#if 0
250 QLabel * lab; 250 QLabel * lab;
251 QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0); 251 QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0);
252 mSetupSyncAlgTab = topFrame; 252 mSetupSyncAlgTab = topFrame;
253 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 253 QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
254 topLayout->setSpacing(mSpacingHint); 254 topLayout->setSpacing(mSpacingHint);
255 topLayout->setMargin(mMarginHint); 255 topLayout->setMargin(mMarginHint);
256 int iii = 0; 256 int iii = 0;
257 257
258 KPrefsDialogWidBool *sb = 258 KPrefsDialogWidBool *sb =
259 addWidBool(i18n("Ask for preferences before syncing"), 259 addWidBool(i18n("Ask for preferences before syncing"),
260 &(KOPrefs::instance()->mAskForPreferences),topFrame); 260 &(KOPrefs::instance()->mAskForPreferences),topFrame);
261 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 261 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
262 262
263 ++iii; 263 ++iii;
264 264
265 KPrefsDialogWidRadios *syncPrefsGroup = 265 KPrefsDialogWidRadios *syncPrefsGroup =
266 addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs), 266 addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs),
267 topFrame); 267 topFrame);
268 syncPrefsGroup->addRadio(i18n("Take local entry on conflict")); 268 syncPrefsGroup->addRadio(i18n("Take local entry on conflict"));
269 syncPrefsGroup->addRadio(i18n("Take remote entry on conflict")); 269 syncPrefsGroup->addRadio(i18n("Take remote entry on conflict"));
270 syncPrefsGroup->addRadio(i18n("Take newest entry on conflict")); 270 syncPrefsGroup->addRadio(i18n("Take newest entry on conflict"));
271 syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict")); 271 syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict"));
272 syncPrefsGroup->addRadio(i18n("Force take local entry always")); 272 syncPrefsGroup->addRadio(i18n("Force take local entry always"));
273 syncPrefsGroup->addRadio(i18n("Force take remote entry always")); 273 syncPrefsGroup->addRadio(i18n("Force take remote entry always"));
274 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 274 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
275 ++iii; 275 ++iii;
276 sb = 276 sb =
277 addWidBool(i18n("Show summary after syncing"), 277 addWidBool(i18n("Show summary after syncing"),
278 &(KOPrefs::instance()->mShowSyncSummary),topFrame); 278 &(KOPrefs::instance()->mShowSyncSummary),topFrame);
279 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 279 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
280 280
281 ++iii; 281 ++iii;
282#endif 282#endif
283 283
284 284
285 285
286} 286}
287 287
288 288
289void KOPrefsDialog::setupSyncTab() 289void KOPrefsDialog::setupSyncTab()
290{ 290{
291#if 0 291#if 0
292 QLabel * lab; 292 QLabel * lab;
293 QFrame *topFrame = addPage(i18n("Sync Network"),0,0); 293 QFrame *topFrame = addPage(i18n("Sync Network"),0,0);
294 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 294 QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
295 topLayout->setSpacing(mSpacingHint); 295 topLayout->setSpacing(mSpacingHint);
296 topLayout->setMargin(mMarginHint); 296 topLayout->setMargin(mMarginHint);
297 lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame); 297 lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame);
298 int iii = 0; 298 int iii = 0;
299 topLayout->addMultiCellWidget(lab , iii,iii,0,1); 299 topLayout->addMultiCellWidget(lab , iii,iii,0,1);
300 ++iii; 300 ++iii;
301 301
302 mRemoteIPEdit = new QLineEdit(topFrame); 302 mRemoteIPEdit = new QLineEdit(topFrame);
303 lab = new QLabel(mRemoteIPEdit, i18n("Remote IP:"), topFrame); 303 lab = new QLabel(mRemoteIPEdit, i18n("Remote IP:"), topFrame);
304 topLayout->addWidget(lab ,iii,0); 304 topLayout->addWidget(lab ,iii,0);
305 topLayout->addWidget(mRemoteIPEdit,iii,1); 305 topLayout->addWidget(mRemoteIPEdit,iii,1);
306 ++iii; 306 ++iii;
307 mRemoteUser = new QLineEdit(topFrame); 307 mRemoteUser = new QLineEdit(topFrame);
308 lab = new QLabel(mRemoteUser, i18n("Remote user:"), topFrame); 308 lab = new QLabel(mRemoteUser, i18n("Remote user:"), topFrame);
309 topLayout->addWidget(lab ,iii,0); 309 topLayout->addWidget(lab ,iii,0);
310 topLayout->addWidget(mRemoteUser, iii,1); 310 topLayout->addWidget(mRemoteUser, iii,1);
311 ++iii; 311 ++iii;
312 312
313 mRemoteFile = new QLineEdit(topFrame); 313 mRemoteFile = new QLineEdit(topFrame);
314 lab = new QLabel(mRemoteFile, i18n("Remote file:"), topFrame); 314 lab = new QLabel(mRemoteFile, i18n("Remote file:"), topFrame);
315 topLayout->addWidget(lab ,iii,0); 315 topLayout->addWidget(lab ,iii,0);
316 topLayout->addWidget(mRemoteFile,iii,1); 316 topLayout->addWidget(mRemoteFile,iii,1);
317 ++iii; 317 ++iii;
318 318
319 mLocalTempFile = new QLineEdit(topFrame); 319 mLocalTempFile = new QLineEdit(topFrame);
320 lab = new QLabel(mLocalTempFile, i18n("Local temp file:"), topFrame); 320 lab = new QLabel(mLocalTempFile, i18n("Local temp file:"), topFrame);
321 topLayout->addWidget(lab ,iii,0); 321 topLayout->addWidget(lab ,iii,0);
322 topLayout->addWidget(mLocalTempFile,iii,1); 322 topLayout->addWidget(mLocalTempFile,iii,1);
323 ++iii; 323 ++iii;
324 324
325 KPrefsDialogWidBool *wb = 325 KPrefsDialogWidBool *wb =
326 addWidBool(i18n("Write back synced file"), 326 addWidBool(i18n("Write back synced file"),
327 &(KOPrefs::instance()->mWriteBackFile),topFrame); 327 &(KOPrefs::instance()->mWriteBackFile),topFrame);
328 topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); 328 topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1);
329 ++iii; 329 ++iii;
330 wb = 330 wb =
331 addWidBool(i18n("Write back existing entries only"), 331 addWidBool(i18n("Write back existing entries only"),
332 &(KOPrefs::instance()->mWriteBackExistingOnly),topFrame); 332 &(KOPrefs::instance()->mWriteBackExistingOnly),topFrame);
333 topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); 333 topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1);
334 ++iii; 334 ++iii;
335 335
336#endif 336#endif
337} 337}
338 338
339void KOPrefsDialog::setupMainTab() 339void KOPrefsDialog::setupMainTab()
340{ 340{
341 QFrame *topFrame = addPage(i18n("General"),0,0); 341 QFrame *topFrame = addPage(i18n("General"),0,0);
342 // DesktopIcon("identity",KIcon::SizeMedium)); 342 // DesktopIcon("identity",KIcon::SizeMedium));
343 343
344 QGridLayout *topLayout = new QGridLayout(topFrame,5,2); 344 QGridLayout *topLayout = new QGridLayout(topFrame,5,2);
345 topLayout->setSpacing(mSpacingHint); 345 topLayout->setSpacing(mSpacingHint);
346 topLayout->setMargin(mMarginHint); 346 topLayout->setMargin(mMarginHint);
347 347
348 // KPrefsDialogWidBool *emailControlCenter = 348 // KPrefsDialogWidBool *emailControlCenter =
349// addWidBool(i18n("&Use email settings from Control Center"), 349// addWidBool(i18n("&Use email settings from Control Center"),
350// &(KOPrefs::instance()->mEmailControlCenter),topFrame); 350// &(KOPrefs::instance()->mEmailControlCenter),topFrame);
351// topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1); 351// topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1);
352 // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)), 352 // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)),
353 // SLOT(toggleEmailSettings(bool))); 353 // SLOT(toggleEmailSettings(bool)));
354 354
355 mNameEdit = new QLineEdit(topFrame); 355 mNameEdit = new QLineEdit(topFrame);
356 mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); 356 mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame);
357 topLayout->addWidget(mNameLabel,0,0); 357 topLayout->addWidget(mNameLabel,0,0);
358 topLayout->addWidget(mNameEdit,0,1); 358 topLayout->addWidget(mNameEdit,0,1);
359 359
360 mEmailEdit = new QLineEdit(topFrame); 360 mEmailEdit = new QLineEdit(topFrame);
361 mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); 361 mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame);
362 topLayout->addWidget(mEmailLabel,1,0); 362 topLayout->addWidget(mEmailLabel,1,0);
363 topLayout->addWidget(mEmailEdit,1,1); 363 topLayout->addWidget(mEmailEdit,1,1);
364 KPrefsDialogWidBool *wb; 364 KPrefsDialogWidBool *wb;
365 365
366 366
367 367
368 KPrefsDialogWidBool *widbool = addWidBool(i18n("Full menu bar(nr)"), 368 KPrefsDialogWidBool *widbool = addWidBool(i18n("Full menu bar(nr)"),
369 &(KOPrefs::instance()->mShowFullMenu),topFrame); 369 &(KOPrefs::instance()->mShowFullMenu),topFrame);
370 topLayout->addMultiCellWidget( widbool->checkBox(), 2,2,0,1); 370 topLayout->addMultiCellWidget( widbool->checkBox(), 2,2,0,1);
371 371
372 372
373 widbool = addWidBool(i18n("Mini icons in toolbar(nr)"), 373 widbool = addWidBool(i18n("Mini icons in toolbar(nr)"),
374 &(KOPrefs::instance()->mToolBarMiniIcons),topFrame); 374 &(KOPrefs::instance()->mToolBarMiniIcons),topFrame);
375 topLayout->addMultiCellWidget( widbool->checkBox(), 3,3,0,1); 375 topLayout->addMultiCellWidget( widbool->checkBox(), 3,3,0,1);
376 376
377 377
378 KPrefsDialogWidBool *verticalScreen = 378 KPrefsDialogWidBool *verticalScreen =
379 addWidBool(i18n("Show vertical screen (Needs restart)"), 379 addWidBool(i18n("Show vertical screen (Needs restart)"),
380 &(KOPrefs::instance()->mVerticalScreen),topFrame); 380 &(KOPrefs::instance()->mVerticalScreen),topFrame);
381 //topLayout->addWidget(verticalScreen->checkBox(),ii++,0); 381 //topLayout->addWidget(verticalScreen->checkBox(),ii++,0);
382 topLayout->addMultiCellWidget(verticalScreen->checkBox(),4,4,0,1); 382 topLayout->addMultiCellWidget(verticalScreen->checkBox(),4,4,0,1);
383 383
384 384
385 int iii = 5;
386 widbool = addWidBool(i18n("Block popup until mouse button release"),
387 &(KOPrefs::instance()->mBlockPopupMenu),topFrame);
388 topLayout->addMultiCellWidget( widbool->checkBox(), iii,iii,0,1);
389 ++iii;
385 QHBox *dummy = new QHBox(topFrame); 390 QHBox *dummy = new QHBox(topFrame);
386 new QLabel(i18n("Days in Next-X-Days:"),dummy); 391 new QLabel(i18n("Days in Next-X-Days:"),dummy);
387 mNextXDaysSpin = new QSpinBox(2,14,1,dummy); 392 mNextXDaysSpin = new QSpinBox(2,14,1,dummy);
388 393
389 topLayout->addMultiCellWidget(dummy,5,5,0,1); 394 topLayout->addMultiCellWidget(dummy,iii,iii,0,1);
390 395
396 ++iii;
391 397
392 398
393 // KPrefsDialogWidBool *bcc = 399 // KPrefsDialogWidBool *bcc =
394// addWidBool(i18n("Send copy to owner when mailing events"), 400// addWidBool(i18n("Send copy to owner when mailing events"),
395// &(KOPrefs::instance()->mBcc),topFrame); 401// &(KOPrefs::instance()->mBcc),topFrame);
396// topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1); 402// topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1);
397 403
398 404
399 // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame); 405 // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame);
400 //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1); 406 //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1);
401 407
402 // addWidBool(i18n("Enable automatic saving of calendar"), 408 // addWidBool(i18n("Enable automatic saving of calendar"),
403 // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); 409 // &(KOPrefs::instance()->mAutoSave),autoSaveGroup);
404 410
405 QHBox *intervalBox = new QHBox(topFrame); 411 QHBox *intervalBox = new QHBox(topFrame);
406 // intervalBox->setSpacing(mSpacingHint); 412 // intervalBox->setSpacing(mSpacingHint);
407 topLayout->addMultiCellWidget(intervalBox,6,6,0,1); 413 topLayout->addMultiCellWidget(intervalBox,iii,iii,0,1);
414 ++iii;
408 QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox); 415 QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox);
409 mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox); 416 mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox);
410 autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin); 417 autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin);
411 /* 418 /*
412 QHBox * agendasize = new QHBox ( topFrame ); 419 QHBox * agendasize = new QHBox ( topFrame );
413 420
414 new QLabel (i18n("AllDayAgenda Height:"), agendasize ); 421 new QLabel (i18n("AllDayAgenda Height:"), agendasize );
415 422
416 423
417 mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize); 424 mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize);
418 topLayout->addMultiCellWidget(agendasize,7,7,0,1); 425 topLayout->addMultiCellWidget(agendasize,7,7,0,1);
419 */ 426 */
420 427
421 428
422 KPrefsDialogWidBool *ask = 429 KPrefsDialogWidBool *ask =
423 addWidBool(i18n("Ask for quit when closing KO/Pi"), 430 addWidBool(i18n("Ask for quit when closing KO/Pi"),
424 &(KOPrefs::instance()->mAskForQuit),topFrame); 431 &(KOPrefs::instance()->mAskForQuit),topFrame);
425 topLayout->addMultiCellWidget(ask->checkBox(),7,7,0,1); 432 topLayout->addMultiCellWidget(ask->checkBox(),iii,iii,0,1);
433 ++iii;
426 434
427 435
428 /* 436 /*
429 KPrefsDialogWidBool *confirmCheck = 437 KPrefsDialogWidBool *confirmCheck =
430 addWidBool(i18n("Confirm &deletes"),&(KOPrefs::instance()->mConfirm), 438 addWidBool(i18n("Confirm &deletes"),&(KOPrefs::instance()->mConfirm),
431 topFrame); 439 topFrame);
432 topLayout->addMultiCellWidget(confirmCheck->checkBox(),7,7,0,1); 440 topLayout->addMultiCellWidget(confirmCheck->checkBox(),7,7,0,1);
433 441
434 442
435 mEnableGroupScheduling = 443 mEnableGroupScheduling =
436 addWidBool(i18n("Enable group scheduling"), 444 addWidBool(i18n("Enable group scheduling"),
437 &(KOPrefs::instance()->mEnableGroupScheduling),topFrame); 445 &(KOPrefs::instance()->mEnableGroupScheduling),topFrame);
438 topLayout->addWidget(mEnableGroupScheduling->checkBox(),8,0); 446 topLayout->addWidget(mEnableGroupScheduling->checkBox(),8,0);
439 connect(mEnableGroupScheduling->checkBox(),SIGNAL(clicked()), 447 connect(mEnableGroupScheduling->checkBox(),SIGNAL(clicked()),
440 SLOT(warningGroupScheduling())); 448 SLOT(warningGroupScheduling()));
441 449
442 mEnableProjectView = 450 mEnableProjectView =
443 addWidBool(i18n("Enable project view"), 451 addWidBool(i18n("Enable project view"),
444 &(KOPrefs::instance()->mEnableProjectView),topFrame); 452 &(KOPrefs::instance()->mEnableProjectView),topFrame);
445 topLayout->addWidget(mEnableProjectView->checkBox(),9,0); 453 topLayout->addWidget(mEnableProjectView->checkBox(),9,0);
446 connect(mEnableProjectView->checkBox(),SIGNAL(clicked()), 454 connect(mEnableProjectView->checkBox(),SIGNAL(clicked()),
447 SLOT(warningProjectView())); 455 SLOT(warningProjectView()));
448 456
449 // Can't be disabled anymore 457 // Can't be disabled anymore
450 mEnableGroupScheduling->checkBox()->hide(); 458 mEnableGroupScheduling->checkBox()->hide();
451 459
452 // Disable setting, because this feature now becomes stable 460 // Disable setting, because this feature now becomes stable
453 mEnableProjectView->checkBox()->hide(); 461 mEnableProjectView->checkBox()->hide();
454 462
455 KPrefsDialogWidRadios *defaultFormatGroup = 463 KPrefsDialogWidRadios *defaultFormatGroup =
456 addWidRadios(i18n("Default Calendar Format"), 464 addWidRadios(i18n("Default Calendar Format"),
457 &(KOPrefs::instance()->mDefaultFormat),topFrame); 465 &(KOPrefs::instance()->mDefaultFormat),topFrame);
458 defaultFormatGroup->addRadio(i18n("vCalendar")); 466 defaultFormatGroup->addRadio(i18n("vCalendar"));
459 defaultFormatGroup->addRadio(i18n("iCalendar")); 467 defaultFormatGroup->addRadio(i18n("iCalendar"));
460 468
461 topLayout->addMultiCellWidget(defaultFormatGroup->groupBox(),10,10,0,1); 469 topLayout->addMultiCellWidget(defaultFormatGroup->groupBox(),10,10,0,1);
462 470
463 // Default format unconditionally is iCalendar 471 // Default format unconditionally is iCalendar
464 defaultFormatGroup->groupBox()->hide(); 472 defaultFormatGroup->groupBox()->hide();
465 473
466 KPrefsDialogWidRadios *mailClientGroup = 474 KPrefsDialogWidRadios *mailClientGroup =
467 addWidRadios(i18n("Mail Client"),&(KOPrefs::instance()->mMailClient), 475 addWidRadios(i18n("Mail Client"),&(KOPrefs::instance()->mMailClient),
468 topFrame); 476 topFrame);
469 mailClientGroup->addRadio(i18n("KMail")); 477 mailClientGroup->addRadio(i18n("KMail"));
470 mailClientGroup->addRadio(i18n("Sendmail")); 478 mailClientGroup->addRadio(i18n("Sendmail"));
471 topLayout->addMultiCellWidget(mailClientGroup->groupBox(),11,11,0,1); 479 topLayout->addMultiCellWidget(mailClientGroup->groupBox(),11,11,0,1);
472 480
473 KPrefsDialogWidBool *htmlsave = 481 KPrefsDialogWidBool *htmlsave =
474 addWidBool(i18n("Export to HTML with every save"),&(KOPrefs::instance()->mHtmlWithSave), 482 addWidBool(i18n("Export to HTML with every save"),&(KOPrefs::instance()->mHtmlWithSave),
475 topFrame); 483 topFrame);
476 topLayout->addMultiCellWidget(htmlsave->checkBox(),12,12,0,1); 484 topLayout->addMultiCellWidget(htmlsave->checkBox(),12,12,0,1);
477 485
478 KPrefsDialogWidRadios *destinationGroup = 486 KPrefsDialogWidRadios *destinationGroup =
479 addWidRadios(i18n("New Events/Todos should"),&(KOPrefs::instance()->mDestination), 487 addWidRadios(i18n("New Events/Todos should"),&(KOPrefs::instance()->mDestination),
480 topFrame); 488 topFrame);
481 destinationGroup->addRadio(i18n("be added to the standard resource")); 489 destinationGroup->addRadio(i18n("be added to the standard resource"));
482 destinationGroup->addRadio(i18n("be asked which resource to use")); 490 destinationGroup->addRadio(i18n("be asked which resource to use"));
483 topLayout->addMultiCellWidget(destinationGroup->groupBox(),13,13,0,1); 491 topLayout->addMultiCellWidget(destinationGroup->groupBox(),13,13,0,1);
484 492
485 topLayout->setRowStretch(14,1); 493 topLayout->setRowStretch(14,1);
486 */ 494 */
487} 495}
488 496
489 497
490void KOPrefsDialog::setupTimeTab() 498void KOPrefsDialog::setupTimeTab()
491{ 499{
492 QFrame *topFrame = addPage(i18n("Time"),0,0); 500 QFrame *topFrame = addPage(i18n("Time"),0,0);
493 // DesktopIcon("clock",KIcon::SizeMedium)); 501 // DesktopIcon("clock",KIcon::SizeMedium));
494 502
495 QGridLayout *topLayout = new QGridLayout(topFrame,4,2); 503 QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
496 topLayout->setSpacing(mSpacingHint); 504 topLayout->setSpacing(mSpacingHint);
497 topLayout->setMargin(mMarginHint); 505 topLayout->setMargin(mMarginHint);
498 506
499 QHBox *dummy = new QHBox(topFrame); 507 QHBox *dummy = new QHBox(topFrame);
500 KPrefsDialogWidTime *dayBegins = 508 KPrefsDialogWidTime *dayBegins =
501 addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), 509 addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins),
502 dummy); 510 dummy);
503 //topLayout->addWidget(dayBegins->label(),2,0); 511 //topLayout->addWidget(dayBegins->label(),2,0);
504 512
505 //topLayout->addWidget(dayBegins->spinBox(),2,1); 513 //topLayout->addWidget(dayBegins->spinBox(),2,1);
506 topLayout->addMultiCellWidget(dummy,0,0,0,1); 514 topLayout->addMultiCellWidget(dummy,0,0,0,1);
507 515
508 topLayout->addWidget(new QLabel(i18n("Default appointment time:"), 516 topLayout->addWidget(new QLabel(i18n("Default appointment time:"),
509 topFrame),1,0); 517 topFrame),1,0);
510 mStartTimeSpin = new QSpinBox(0,23,1,topFrame); 518 mStartTimeSpin = new QSpinBox(0,23,1,topFrame);
511 mStartTimeSpin->setSuffix(":00"); 519 mStartTimeSpin->setSuffix(":00");
512 topLayout->addWidget(mStartTimeSpin,1,1); 520 topLayout->addWidget(mStartTimeSpin,1,1);
513 521
514 topLayout->addWidget(new QLabel(i18n("Def. duration of new app.:"), 522 topLayout->addWidget(new QLabel(i18n("Def. duration of new app.:"),
515 topFrame),2,0); 523 topFrame),2,0);
516 mDefaultDurationSpin = new QSpinBox(0,23,1,topFrame); 524 mDefaultDurationSpin = new QSpinBox(0,23,1,topFrame);
517 mDefaultDurationSpin->setSuffix(":00"); 525 mDefaultDurationSpin->setSuffix(":00");
518 topLayout->addWidget(mDefaultDurationSpin,2,1); 526 topLayout->addWidget(mDefaultDurationSpin,2,1);
519 527
520 QStringList alarmList; 528 QStringList alarmList;
521 alarmList << i18n("1 minute") << i18n("5 minutes") << i18n("10 minutes") 529 alarmList << i18n("1 minute") << i18n("5 minutes") << i18n("10 minutes")
522 << i18n("15 minutes") << i18n("30 minutes")<< i18n("1 hour")<< i18n("3 hours") << i18n("24 hours") ; 530 << i18n("15 minutes") << i18n("30 minutes")<< i18n("1 hour")<< i18n("3 hours") << i18n("24 hours") ;
523 topLayout->addWidget(new QLabel(i18n("Default alarm time:"),topFrame), 531 topLayout->addWidget(new QLabel(i18n("Default alarm time:"),topFrame),
524 3,0); 532 3,0);
525 mAlarmTimeCombo = new QComboBox(topFrame); 533 mAlarmTimeCombo = new QComboBox(topFrame);
526 mAlarmTimeCombo->insertStringList(alarmList); 534 mAlarmTimeCombo->insertStringList(alarmList);
527 topLayout->addWidget(mAlarmTimeCombo,3,1); 535 topLayout->addWidget(mAlarmTimeCombo,3,1);
528 536
529 537
530 QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal, 538 QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal,
531 i18n("Working Hours"), 539 i18n("Working Hours"),
532 topFrame); 540 topFrame);
533 topLayout->addMultiCellWidget(workingHoursGroup,4,4,0,1); 541 topLayout->addMultiCellWidget(workingHoursGroup,4,4,0,1);
534 workingHoursGroup->layout()->setSpacing( 0 ); 542 workingHoursGroup->layout()->setSpacing( 0 );
535 workingHoursGroup->layout()->setMargin( 4 ); 543 workingHoursGroup->layout()->setMargin( 4 );
536 QHBox *workStartBox = new QHBox(workingHoursGroup); 544 QHBox *workStartBox = new QHBox(workingHoursGroup);
537 // workStartBox->setMargin( 0 ); 545 // workStartBox->setMargin( 0 );
538 addWidTime(i18n("Daily starting hour:"), 546 addWidTime(i18n("Daily starting hour:"),
539 &(KOPrefs::instance()->mWorkingHoursStart),workStartBox); 547 &(KOPrefs::instance()->mWorkingHoursStart),workStartBox);
540 548
541 QHBox *workEndBox = new QHBox(workingHoursGroup); 549 QHBox *workEndBox = new QHBox(workingHoursGroup);
542 //workEndBox->setMargin( 0 ); 550 //workEndBox->setMargin( 0 );
543 addWidTime(i18n("Daily ending hour:"), 551 addWidTime(i18n("Daily ending hour:"),
544 &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox); 552 &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox);
545 QVBox *excludeBox = new QVBox(workingHoursGroup); 553 QVBox *excludeBox = new QVBox(workingHoursGroup);
546 //excludeBox->setMargin( 0 ); 554 //excludeBox->setMargin( 0 );
547 addWidBool(i18n("Exclude holidays"), 555 addWidBool(i18n("Exclude holidays"),
548 &(KOPrefs::instance()->mExcludeHolidays),excludeBox); 556 &(KOPrefs::instance()->mExcludeHolidays),excludeBox);
549 557
550 addWidBool(i18n("Exclude Saturdays"), 558 addWidBool(i18n("Exclude Saturdays"),
551 &(KOPrefs::instance()->mExcludeSaturdays),excludeBox); 559 &(KOPrefs::instance()->mExcludeSaturdays),excludeBox);
552 560
553// KPrefsDialogWidBool *marcusBainsShowSeconds = addWidBool(i18n("Show seconds on Marcus Bains line"), 561// KPrefsDialogWidBool *marcusBainsShowSeconds = addWidBool(i18n("Show seconds on Marcus Bains line"),
554 // &(KOPrefs::instance()->mMarcusBainsShowSeconds), 562 // &(KOPrefs::instance()->mMarcusBainsShowSeconds),
555 // topFrame); 563 // topFrame);
556// topLayout->addWidget(marcusBainsShowSeconds->checkBox(),5,0); 564// topLayout->addWidget(marcusBainsShowSeconds->checkBox(),5,0);
557 565
558 // topLayout->setRowStretch(6,1); 566 // topLayout->setRowStretch(6,1);
559} 567}
560 568
561 569
562void KOPrefsDialog::setupViewsTab() 570void KOPrefsDialog::setupViewsTab()
563{ 571{
564 572
565 QFrame *topFrame = addPage(i18n("Views"),0,0); 573 QFrame *topFrame = addPage(i18n("Views"),0,0);
566 // DesktopIcon("viewmag",KIcon::SizeMedium)); 574 // DesktopIcon("viewmag",KIcon::SizeMedium));
567 575
568 QGridLayout *topLayout = new QGridLayout(topFrame,6,1); 576 QGridLayout *topLayout = new QGridLayout(topFrame,6,1);
569 topLayout->setSpacing(mSpacingHint); 577 topLayout->setSpacing(mSpacingHint);
570 topLayout->setMargin(mMarginHint); 578 topLayout->setMargin(mMarginHint);
571 579
572// QBoxLayout *dayBeginsLayout = new QHBoxLayout; 580// QBoxLayout *dayBeginsLayout = new QHBoxLayout;
573// topLayout->addLayout(dayBeginsLayout,0,0); 581// topLayout->addLayout(dayBeginsLayout,0,0);
574 582
575// KPrefsDialogWidTime *dayBegins = 583// KPrefsDialogWidTime *dayBegins =
576// addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), 584// addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins),
577// topFrame); 585// topFrame);
578// dayBeginsLayout->addWidget(dayBegins->label()); 586// dayBeginsLayout->addWidget(dayBegins->label());
579// dayBeginsLayout->addStretch(1); 587// dayBeginsLayout->addStretch(1);
580// dayBeginsLayout->addWidget(dayBegins->spinBox()); 588// dayBeginsLayout->addWidget(dayBegins->spinBox());
581 589
582// QBoxLayout *nextDaysLayout = new QHBoxLayout; 590// QBoxLayout *nextDaysLayout = new QHBoxLayout;
583// topLayout->addLayout(nextDaysLayout,1,0); 591// topLayout->addLayout(nextDaysLayout,1,0);
584// nextDaysLayout->addWidget(new QLabel(i18n("Days to show in Next-X-Days view:"),topFrame)); 592// nextDaysLayout->addWidget(new QLabel(i18n("Days to show in Next-X-Days view:"),topFrame));
585// mNextXDaysSpin = new QSpinBox(2,14,1,topFrame); 593// mNextXDaysSpin = new QSpinBox(2,14,1,topFrame);
586// nextDaysLayout->addStretch(1); 594// nextDaysLayout->addStretch(1);
587// nextDaysLayout->addWidget(mNextXDaysSpin); 595// nextDaysLayout->addWidget(mNextXDaysSpin);
588 596
589 597
590 int ii = 0; 598 int ii = 0;
591 KPrefsDialogWidBool *dummy = 599 KPrefsDialogWidBool *dummy =
592 addWidBool(i18n("Edit item on doubleclick (if not, show)"), 600 addWidBool(i18n("Edit item on doubleclick (if not, show)"),
593 &(KOPrefs::instance()->mEditOnDoubleClick),topFrame); 601 &(KOPrefs::instance()->mEditOnDoubleClick),topFrame);
594 topLayout->addWidget(dummy->checkBox(),ii++,0); 602 topLayout->addWidget(dummy->checkBox(),ii++,0);
595 603
596 604
597 605
598 606
599 607
600 608
601 // topLayout->addWidget(hourSizeGroup,ii++,0); 609 // topLayout->addWidget(hourSizeGroup,ii++,0);
602 // topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0); 610 // topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0);
603 //topLayout->setRowStretch(11,1); 611 //topLayout->setRowStretch(11,1);
604 612
605 613
606 614
607 615
608#if 0 616#if 0
609 617
610 topFrame = addPage(i18n("ViewChange"),0,0); 618 topFrame = addPage(i18n("ViewChange"),0,0);
611 // DesktopIcon("viewmag",KIcon::SizeMedium)); 619 // DesktopIcon("viewmag",KIcon::SizeMedium));
612 620
613 topLayout = new QGridLayout(topFrame,6,1); 621 topLayout = new QGridLayout(topFrame,6,1);
614 topLayout->setSpacing(mSpacingHint); 622 topLayout->setSpacing(mSpacingHint);
615 topLayout->setMargin(mMarginHint); 623 topLayout->setMargin(mMarginHint);
616 ii = 0; 624 ii = 0;
617 625
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index 9b5d4ce..7817a75 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -906,396 +906,397 @@ void KOTodoView::printPreview(CalPrinter *calPrinter, const QDate &fd,
906 const QDate &td) 906 const QDate &td)
907{ 907{
908#ifndef KORG_NOPRINTER 908#ifndef KORG_NOPRINTER
909 calPrinter->preview(CalPrinter::Todolist, fd, td); 909 calPrinter->preview(CalPrinter::Todolist, fd, td);
910#endif 910#endif
911} 911}
912 912
913void KOTodoView::editItem(QListViewItem *item ) 913void KOTodoView::editItem(QListViewItem *item )
914{ 914{
915 // qDebug("editItem(QListViewItem *item ) "); 915 // qDebug("editItem(QListViewItem *item ) ");
916 emit editTodoSignal(((KOTodoViewItem *)item)->todo()); 916 emit editTodoSignal(((KOTodoViewItem *)item)->todo());
917} 917}
918 918
919void KOTodoView::showItem(QListViewItem *item,const QPoint &,int) 919void KOTodoView::showItem(QListViewItem *item,const QPoint &,int)
920{ 920{
921 emit showTodoSignal(((KOTodoViewItem *)item)->todo()); 921 emit showTodoSignal(((KOTodoViewItem *)item)->todo());
922} 922}
923 923
924void KOTodoView::popupMenu(QListViewItem *item,const QPoint &p,int column) 924void KOTodoView::popupMenu(QListViewItem *item,const QPoint &p,int column)
925{ 925{
926 pendingSubtodo = 0; 926 pendingSubtodo = 0;
927 mActiveItem = (KOTodoViewItem *)item; 927 mActiveItem = (KOTodoViewItem *)item;
928 if (item) { 928 if (item) {
929 switch (column){ 929 switch (column){
930 case 1: 930 case 1:
931 mPriorityPopupMenu->popup(QCursor::pos ()); break; 931 mPriorityPopupMenu->popup(QCursor::pos ()); break;
932 case 2: 932 case 2:
933 mPercentageCompletedPopupMenu->popup(QCursor::pos ()); break; 933 mPercentageCompletedPopupMenu->popup(QCursor::pos ()); break;
934 case 3: 934 case 3:
935 moveTodo(); 935 moveTodo();
936 break; 936 break;
937 case 8: 937 case 8:
938 getCategoryPopupMenu((KOTodoViewItem *)item)->popup(QCursor::pos ()); break; 938 getCategoryPopupMenu((KOTodoViewItem *)item)->popup(QCursor::pos ()); break;
939 default: 939 default:
940 mItemPopupMenu->popup(QCursor::pos()); 940 mItemPopupMenu->popup(QCursor::pos());
941 } 941 }
942 } else mPopupMenu->popup(QCursor::pos()); 942 } else mPopupMenu->popup(QCursor::pos());
943} 943}
944void KOTodoView::newTodo() 944void KOTodoView::newTodo()
945{ 945{
946 emit newTodoSignal(); 946 emit newTodoSignal();
947} 947}
948 948
949void KOTodoView::newSubTodo() 949void KOTodoView::newSubTodo()
950{ 950{
951 if (mActiveItem) { 951 if (mActiveItem) {
952 emit newSubTodoSignal(mActiveItem->todo()); 952 emit newSubTodoSignal(mActiveItem->todo());
953 } 953 }
954} 954}
955void KOTodoView::unparentTodo() 955void KOTodoView::unparentTodo()
956{ 956{
957 if (mActiveItem) { 957 if (mActiveItem) {
958 emit unparentTodoSignal(mActiveItem->todo()); 958 emit unparentTodoSignal(mActiveItem->todo());
959 } 959 }
960} 960}
961 961
962void KOTodoView::reparentTodo() 962void KOTodoView::reparentTodo()
963{ 963{
964 if (mActiveItem) { 964 if (mActiveItem) {
965 qDebug("KOTodoView::reparentTodo() "); 965 qDebug("KOTodoView::reparentTodo() ");
966 topLevelWidget()->setCaption(i18n("Click on new parent item")); 966 topLevelWidget()->setCaption(i18n("Click on new parent item"));
967 pendingSubtodo = mActiveItem; 967 pendingSubtodo = mActiveItem;
968 } 968 }
969} 969}
970void KOTodoView::editTodo() 970void KOTodoView::editTodo()
971{ 971{
972 if (mActiveItem) { 972 if (mActiveItem) {
973 emit editTodoSignal(mActiveItem->todo()); 973 emit editTodoSignal(mActiveItem->todo());
974 } 974 }
975} 975}
976void KOTodoView::cloneTodo() 976void KOTodoView::cloneTodo()
977{ 977{
978 if (mActiveItem) { 978 if (mActiveItem) {
979 emit cloneTodoSignal((Incidence*)mActiveItem->todo()); 979 emit cloneTodoSignal((Incidence*)mActiveItem->todo());
980 } 980 }
981} 981}
982void KOTodoView::cancelTodo() 982void KOTodoView::cancelTodo()
983{ 983{
984 if (mActiveItem) { 984 if (mActiveItem) {
985 emit cancelTodoSignal((Incidence*)mActiveItem->todo()); 985 emit cancelTodoSignal((Incidence*)mActiveItem->todo());
986 } 986 }
987} 987}
988void KOTodoView::moveTodo() 988void KOTodoView::moveTodo()
989{ 989{
990 if (mActiveItem) { 990 if (mActiveItem) {
991 emit moveTodoSignal((Incidence*)mActiveItem->todo()); 991 emit moveTodoSignal((Incidence*)mActiveItem->todo());
992 } 992 }
993} 993}
994void KOTodoView::beamTodo() 994void KOTodoView::beamTodo()
995{ 995{
996 if (mActiveItem) { 996 if (mActiveItem) {
997 emit beamTodoSignal((Incidence*)mActiveItem->todo()); 997 emit beamTodoSignal((Incidence*)mActiveItem->todo());
998 } 998 }
999} 999}
1000 1000
1001 1001
1002void KOTodoView::showTodo() 1002void KOTodoView::showTodo()
1003{ 1003{
1004 if (mActiveItem) { 1004 if (mActiveItem) {
1005 emit showTodoSignal(mActiveItem->todo()); 1005 emit showTodoSignal(mActiveItem->todo());
1006 } 1006 }
1007} 1007}
1008 1008
1009void KOTodoView::deleteTodo() 1009void KOTodoView::deleteTodo()
1010{ 1010{
1011 if (mActiveItem) { 1011 if (mActiveItem) {
1012 emit deleteTodoSignal(mActiveItem->todo()); 1012 emit deleteTodoSignal(mActiveItem->todo());
1013 } 1013 }
1014} 1014}
1015 1015
1016void KOTodoView::setNewPriority(int index) 1016void KOTodoView::setNewPriority(int index)
1017{ 1017{
1018 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { 1018 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) {
1019 mActiveItem->todo()->setPriority(mPriority[index]); 1019 mActiveItem->todo()->setPriority(mPriority[index]);
1020 mActiveItem->construct(); 1020 mActiveItem->construct();
1021 todoModified (mActiveItem->todo(), KOGlobals::PRIORITY_MODIFIED); 1021 todoModified (mActiveItem->todo(), KOGlobals::PRIORITY_MODIFIED);
1022 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); 1022 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 );
1023 } 1023 }
1024} 1024}
1025 1025
1026void KOTodoView::setNewPercentage(int index) 1026void KOTodoView::setNewPercentage(int index)
1027{ 1027{
1028 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { 1028 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) {
1029 1029
1030 if ( mPercentage[index] == 100 && !mActiveItem->isOn() ) { 1030 if ( mPercentage[index] == 100 && !mActiveItem->isOn() ) {
1031 mActiveItem->setOn( true ); 1031 mActiveItem->setOn( true );
1032 return; 1032 return;
1033 } else if ( mPercentage[index] != 100 && mActiveItem->isOn() ) { 1033 } else if ( mPercentage[index] != 100 && mActiveItem->isOn() ) {
1034 KOTodoViewItem* par = (static_cast<KOTodoViewItem*>(mActiveItem->parent())); 1034 KOTodoViewItem* par = (static_cast<KOTodoViewItem*>(mActiveItem->parent()));
1035 if ( par && par->isOn() ) 1035 if ( par && par->isOn() )
1036 par->setOn( false ); 1036 par->setOn( false );
1037 } 1037 }
1038 if (mPercentage[index] == 100) { 1038 if (mPercentage[index] == 100) {
1039 mActiveItem->todo()->setCompleted(QDateTime::currentDateTime()); 1039 mActiveItem->todo()->setCompleted(QDateTime::currentDateTime());
1040 } else { 1040 } else {
1041 mActiveItem->todo()->setCompleted(false); 1041 mActiveItem->todo()->setCompleted(false);
1042 } 1042 }
1043 mActiveItem->todo()->setPercentComplete(mPercentage[index]); 1043 mActiveItem->todo()->setPercentComplete(mPercentage[index]);
1044 mActiveItem->construct(); 1044 mActiveItem->construct();
1045 todoModified (mActiveItem->todo (), KOGlobals::COMPLETION_MODIFIED); 1045 todoModified (mActiveItem->todo (), KOGlobals::COMPLETION_MODIFIED);
1046 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); 1046 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 );
1047 } 1047 }
1048} 1048}
1049 1049
1050 1050
1051QPopupMenu * KOTodoView::getCategoryPopupMenu (KOTodoViewItem *todoItem) 1051QPopupMenu * KOTodoView::getCategoryPopupMenu (KOTodoViewItem *todoItem)
1052{ 1052{
1053 QPopupMenu* tempMenu = new QPopupMenu (this); 1053 QPopupMenu* tempMenu = new QPopupMenu (this);
1054 QStringList checkedCategories = todoItem->todo()->categories (); 1054 QStringList checkedCategories = todoItem->todo()->categories ();
1055 1055
1056 tempMenu->setCheckable (true); 1056 tempMenu->setCheckable (true);
1057 for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin (); 1057 for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin ();
1058 it != KOPrefs::instance()->mCustomCategories.end (); 1058 it != KOPrefs::instance()->mCustomCategories.end ();
1059 ++it) { 1059 ++it) {
1060 int index = tempMenu->insertItem (*it); 1060 int index = tempMenu->insertItem (*it);
1061 mCategory[index] = *it; 1061 mCategory[index] = *it;
1062 if (checkedCategories.find (*it) != checkedCategories.end ()) tempMenu->setItemChecked (index, true); 1062 if (checkedCategories.find (*it) != checkedCategories.end ()) tempMenu->setItemChecked (index, true);
1063 } 1063 }
1064 1064
1065 connect (tempMenu, SIGNAL (activated (int)), SLOT (changedCategories (int))); 1065 connect (tempMenu, SIGNAL (activated (int)), SLOT (changedCategories (int)));
1066 return tempMenu; 1066 return tempMenu;
1067 1067
1068 1068
1069} 1069}
1070void KOTodoView::changedCategories(int index) 1070void KOTodoView::changedCategories(int index)
1071{ 1071{
1072 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { 1072 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) {
1073 QStringList categories = mActiveItem->todo()->categories (); 1073 QStringList categories = mActiveItem->todo()->categories ();
1074 QString colcat = categories.first(); 1074 QString colcat = categories.first();
1075 if (categories.find (mCategory[index]) != categories.end ()) 1075 if (categories.find (mCategory[index]) != categories.end ())
1076 categories.remove (mCategory[index]); 1076 categories.remove (mCategory[index]);
1077 else 1077 else
1078 categories.insert (categories.end(), mCategory[index]); 1078 categories.insert (categories.end(), mCategory[index]);
1079 categories.sort (); 1079 categories.sort ();
1080 if ( !colcat.isEmpty() ) { 1080 if ( !colcat.isEmpty() ) {
1081 if ( categories.find ( colcat ) != categories.end () ) { 1081 if ( categories.find ( colcat ) != categories.end () ) {
1082 categories.remove( colcat ); 1082 categories.remove( colcat );
1083 categories.prepend( colcat ); 1083 categories.prepend( colcat );
1084 } 1084 }
1085 } 1085 }
1086 mActiveItem->todo()->setCategories (categories); 1086 mActiveItem->todo()->setCategories (categories);
1087 mActiveItem->construct(); 1087 mActiveItem->construct();
1088 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); 1088 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 );
1089 todoModified (mActiveItem->todo (), KOGlobals::CATEGORY_MODIFIED); 1089 todoModified (mActiveItem->todo (), KOGlobals::CATEGORY_MODIFIED);
1090 } 1090 }
1091} 1091}
1092void KOTodoView::itemDoubleClicked(QListViewItem *item) 1092void KOTodoView::itemDoubleClicked(QListViewItem *item)
1093{ 1093{
1094 if ( pendingSubtodo != 0 ) { 1094 if ( pendingSubtodo != 0 ) {
1095 topLevelWidget()->setCaption(i18n("Reparenting aborted!")); 1095 topLevelWidget()->setCaption(i18n("Reparenting aborted!"));
1096 } 1096 }
1097 pendingSubtodo = 0; 1097 pendingSubtodo = 0;
1098 int row = mTodoListView->header()->sectionAt ( mTodoListView->header()->mapFromGlobal( QCursor::pos()).x() ); 1098 //int row = mTodoListView->header()->sectionAt ( mTodoListView->header()->mapFromGlobal( QCursor::pos()).x() );
1099 //qDebug("ROW %d ", row); 1099 int row = mTodoListView->header()->sectionAt ( mTodoListView->viewportToContents(mTodoListView->viewport()->mapFromGlobal( QCursor::pos())) .x() );
1100 qDebug("ROW %d ", row);
1100 if (!item) { 1101 if (!item) {
1101 newTodo(); 1102 newTodo();
1102 return; 1103 return;
1103 } else { 1104 } else {
1104 if ( row == 2 ) { 1105 if ( row == 2 || row == 1 ) {
1105 mActiveItem = (KOTodoViewItem *) item; 1106 mActiveItem = (KOTodoViewItem *) item;
1106 newSubTodo(); 1107 newSubTodo();
1107 return; 1108 return;
1108 } 1109 }
1109 if ( row == 1 ) { 1110 if ( row == 5 || row == 6 ) {
1110 mActiveItem = (KOTodoViewItem *) item; 1111 mActiveItem = (KOTodoViewItem *) item;
1111 toggleRunningItem(); 1112 toggleRunningItem();
1112 return; 1113 return;
1113 } 1114 }
1114 } 1115 }
1115 if ( KOPrefs::instance()->mEditOnDoubleClick ) 1116 if ( KOPrefs::instance()->mEditOnDoubleClick )
1116 editItem( item ); 1117 editItem( item );
1117 else 1118 else
1118 showItem( item , QPoint(), 0 ); 1119 showItem( item , QPoint(), 0 );
1119} 1120}
1120void KOTodoView::toggleRunningItem() 1121void KOTodoView::toggleRunningItem()
1121{ 1122{
1122 // qDebug("KOTodoView::toggleRunning() "); 1123 // qDebug("KOTodoView::toggleRunning() ");
1123 if ( ! mActiveItem ) 1124 if ( ! mActiveItem )
1124 return; 1125 return;
1125 Todo * t = mActiveItem->todo(); 1126 Todo * t = mActiveItem->todo();
1126 if ( t->isRunning() ) { 1127 if ( t->isRunning() ) {
1127 int result = KMessageBox::warningContinueCancel(this, 1128 int result = KMessageBox::warningContinueCancel(this,
1128 i18n("The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?").arg(mActiveItem->text(0).left( 25 ) ),i18n("Todo is started"),i18n("Stop todo"),i18n("Cancel"), true); 1129 i18n("The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?").arg(mActiveItem->text(0).left( 25 ) ),i18n("Todo is started"),i18n("Stop todo"),i18n("Cancel"), true);
1129 if (result != KMessageBox::Continue) return; 1130 if (result != KMessageBox::Continue) return;
1130 t->setRunning( false ); 1131 t->setRunning( false );
1131 mActiveItem->construct(); 1132 mActiveItem->construct();
1132 } else { 1133 } else {
1133 int result = KMessageBox::warningContinueCancel(this, 1134 int result = KMessageBox::warningContinueCancel(this,
1134 i18n("The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?").arg(mActiveItem->text(0).left( 25 ) ),i18n("Todo is stopped"),i18n("Start todo"),i18n("Cancel"), true); 1135 i18n("The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?").arg(mActiveItem->text(0).left( 25 ) ),i18n("Todo is stopped"),i18n("Start todo"),i18n("Cancel"), true);
1135 if (result != KMessageBox::Continue) return; 1136 if (result != KMessageBox::Continue) return;
1136 t->setRunning( true ); 1137 t->setRunning( true );
1137 mActiveItem->construct(); 1138 mActiveItem->construct();
1138 } 1139 }
1139} 1140}
1140 1141
1141void KOTodoView::itemClicked(QListViewItem *item) 1142void KOTodoView::itemClicked(QListViewItem *item)
1142{ 1143{
1143 //qDebug("KOTodoView::itemClicked %d", item); 1144 //qDebug("KOTodoView::itemClicked %d", item);
1144 if (!item) { 1145 if (!item) {
1145 if ( pendingSubtodo != 0 ) { 1146 if ( pendingSubtodo != 0 ) {
1146 topLevelWidget()->setCaption(i18n("Reparenting aborted!")); 1147 topLevelWidget()->setCaption(i18n("Reparenting aborted!"));
1147 } 1148 }
1148 pendingSubtodo = 0; 1149 pendingSubtodo = 0;
1149 return; 1150 return;
1150 } 1151 }
1151 KOTodoViewItem *todoItem = (KOTodoViewItem *)item; 1152 KOTodoViewItem *todoItem = (KOTodoViewItem *)item;
1152 if ( pendingSubtodo != 0 ) { 1153 if ( pendingSubtodo != 0 ) {
1153 bool allowReparent = true; 1154 bool allowReparent = true;
1154 QListViewItem *par = item; 1155 QListViewItem *par = item;
1155 while ( par ) { 1156 while ( par ) {
1156 if ( par == pendingSubtodo ) { 1157 if ( par == pendingSubtodo ) {
1157 allowReparent = false; 1158 allowReparent = false;
1158 break; 1159 break;
1159 } 1160 }
1160 par = par->parent(); 1161 par = par->parent();
1161 } 1162 }
1162 if ( !allowReparent ) { 1163 if ( !allowReparent ) {
1163 topLevelWidget()->setCaption(i18n("Recursive reparenting not possible!")); 1164 topLevelWidget()->setCaption(i18n("Recursive reparenting not possible!"));
1164 qDebug("Recursive reparenting not possible "); 1165 qDebug("Recursive reparenting not possible ");
1165 pendingSubtodo = 0; 1166 pendingSubtodo = 0;
1166 } else { 1167 } else {
1167 Todo* newParent = todoItem->todo(); 1168 Todo* newParent = todoItem->todo();
1168 Todo* newSub = pendingSubtodo->todo(); 1169 Todo* newSub = pendingSubtodo->todo();
1169 pendingSubtodo = 0; 1170 pendingSubtodo = 0;
1170 emit reparentTodoSignal( newParent,newSub ); 1171 emit reparentTodoSignal( newParent,newSub );
1171 return; 1172 return;
1172 } 1173 }
1173 } 1174 }
1174#if 0 1175#if 0
1175 // handled by the item itself 1176 // handled by the item itself
1176 bool completed = todoItem->todo()->isCompleted(); // Completed or not? 1177 bool completed = todoItem->todo()->isCompleted(); // Completed or not?
1177 qDebug("com %d ",completed ); 1178 qDebug("com %d ",completed );
1178 qDebug("itemclicked "); 1179 qDebug("itemclicked ");
1179 if (todoItem->isOn()) { 1180 if (todoItem->isOn()) {
1180 qDebug("on "); 1181 qDebug("on ");
1181 if (!completed) { 1182 if (!completed) {
1182 qDebug("set true "); 1183 qDebug("set true ");
1183 todoItem->todo()->setCompleted(QDateTime::currentDateTime()); 1184 todoItem->todo()->setCompleted(QDateTime::currentDateTime());
1184 } 1185 }
1185 } else { 1186 } else {
1186 qDebug("not on "); 1187 qDebug("not on ");
1187 if (completed) { 1188 if (completed) {
1188 qDebug("set false "); 1189 qDebug("set false ");
1189 todoItem->todo()->setCompleted(false); 1190 todoItem->todo()->setCompleted(false);
1190 } 1191 }
1191 } 1192 }
1192#endif 1193#endif
1193} 1194}
1194 1195
1195void KOTodoView::setDocumentId( const QString &id ) 1196void KOTodoView::setDocumentId( const QString &id )
1196{ 1197{
1197 kdDebug() << "KOTodoView::setDocumentId()" << endl; 1198 kdDebug() << "KOTodoView::setDocumentId()" << endl;
1198 1199
1199 mDocPrefs->setDoc( id ); 1200 mDocPrefs->setDoc( id );
1200} 1201}
1201 1202
1202void KOTodoView::itemStateChanged( QListViewItem *item ) 1203void KOTodoView::itemStateChanged( QListViewItem *item )
1203{ 1204{
1204 if (!item) return; 1205 if (!item) return;
1205 1206
1206 KOTodoViewItem *todoItem = (KOTodoViewItem *)item; 1207 KOTodoViewItem *todoItem = (KOTodoViewItem *)item;
1207 1208
1208// kdDebug() << "KOTodoView::itemStateChanged(): " << todoItem->todo()->summary() << endl; 1209// kdDebug() << "KOTodoView::itemStateChanged(): " << todoItem->todo()->summary() << endl;
1209 1210
1210 if( mDocPrefs ) mDocPrefs->writeEntry( todoItem->todo()->uid(), todoItem->isOpen() ); 1211 if( mDocPrefs ) mDocPrefs->writeEntry( todoItem->todo()->uid(), todoItem->isOpen() );
1211} 1212}
1212 1213
1213void KOTodoView::saveLayout(KConfig *config, const QString &group) const 1214void KOTodoView::saveLayout(KConfig *config, const QString &group) const
1214{ 1215{
1215 mTodoListView->saveLayout(config,group); 1216 mTodoListView->saveLayout(config,group);
1216} 1217}
1217 1218
1218void KOTodoView::restoreLayout(KConfig *config, const QString &group) 1219void KOTodoView::restoreLayout(KConfig *config, const QString &group)
1219{ 1220{
1220 mTodoListView->restoreLayout(config,group); 1221 mTodoListView->restoreLayout(config,group);
1221} 1222}
1222 1223
1223void KOTodoView::processSelectionChange() 1224void KOTodoView::processSelectionChange()
1224{ 1225{
1225// kdDebug() << "KOTodoView::processSelectionChange()" << endl; 1226// kdDebug() << "KOTodoView::processSelectionChange()" << endl;
1226 1227
1227 KOTodoViewItem *item = 1228 KOTodoViewItem *item =
1228 static_cast<KOTodoViewItem *>( mTodoListView->selectedItem() ); 1229 static_cast<KOTodoViewItem *>( mTodoListView->selectedItem() );
1229 1230
1230 if ( !item ) { 1231 if ( !item ) {
1231 emit incidenceSelected( 0 ); 1232 emit incidenceSelected( 0 );
1232 } else { 1233 } else {
1233 emit incidenceSelected( item->todo() ); 1234 emit incidenceSelected( item->todo() );
1234 } 1235 }
1235} 1236}
1236 1237
1237void KOTodoView::modified(bool b) 1238void KOTodoView::modified(bool b)
1238{ 1239{
1239 emit isModified(b); 1240 emit isModified(b);
1240} 1241}
1241void KOTodoView::setTodoModified( Todo* todo ) 1242void KOTodoView::setTodoModified( Todo* todo )
1242{ 1243{
1243 todoModified( todo, KOGlobals::UNKNOWN_MODIFIED ); 1244 todoModified( todo, KOGlobals::UNKNOWN_MODIFIED );
1244} 1245}
1245void KOTodoView::clearSelection() 1246void KOTodoView::clearSelection()
1246{ 1247{
1247 mTodoListView->selectAll( false ); 1248 mTodoListView->selectAll( false );
1248} 1249}
1249void KOTodoView::setAllOpen() 1250void KOTodoView::setAllOpen()
1250{ 1251{
1251 if ( isFlatDisplay ) { 1252 if ( isFlatDisplay ) {
1252 isFlatDisplay = false; 1253 isFlatDisplay = false;
1253 mPopupMenu->setItemChecked( 8,false ); 1254 mPopupMenu->setItemChecked( 8,false );
1254 updateView(); 1255 updateView();
1255 } else { 1256 } else {
1256 storeCurrentItem(); 1257 storeCurrentItem();
1257 } 1258 }
1258 setOpen(mTodoListView->firstChild(), true); 1259 setOpen(mTodoListView->firstChild(), true);
1259 resetCurrentItem(); 1260 resetCurrentItem();
1260} 1261}
1261void KOTodoView::setAllClose() 1262void KOTodoView::setAllClose()
1262{ 1263{
1263 if ( isFlatDisplay ) { 1264 if ( isFlatDisplay ) {
1264 isFlatDisplay = false; 1265 isFlatDisplay = false;
1265 mPopupMenu->setItemChecked( 8,false ); 1266 mPopupMenu->setItemChecked( 8,false );
1266 updateView(); 1267 updateView();
1267 } else { 1268 } else {
1268 storeCurrentItem(); 1269 storeCurrentItem();
1269 } 1270 }
1270 setOpen(mTodoListView->firstChild(), false); 1271 setOpen(mTodoListView->firstChild(), false);
1271 resetCurrentItem(); 1272 resetCurrentItem();
1272} 1273}
1273void KOTodoView::setOpen( QListViewItem* item, bool setOpenI) 1274void KOTodoView::setOpen( QListViewItem* item, bool setOpenI)
1274{ 1275{
1275 1276
1276 while ( item ) { 1277 while ( item ) {
1277 setOpen( item->firstChild(), setOpenI ); 1278 setOpen( item->firstChild(), setOpenI );
1278 item->setOpen( setOpenI ); 1279 item->setOpen( setOpenI );
1279 item = item->nextSibling(); 1280 item = item->nextSibling();
1280 } 1281 }
1281} 1282}
1282 1283
1283void KOTodoView::displayAllFlat() 1284void KOTodoView::displayAllFlat()
1284{ 1285{
1285 pendingSubtodo = 0; 1286 pendingSubtodo = 0;
1286 if ( mBlockUpdate ) { 1287 if ( mBlockUpdate ) {
1287 return; 1288 return;
1288 } 1289 }
1289 mPopupMenu->setItemChecked( 8,true ); 1290 mPopupMenu->setItemChecked( 8,true );
1290 isFlatDisplay = true; 1291 isFlatDisplay = true;
1291 QPtrList<Todo> todoList = calendar()->todos(); 1292 QPtrList<Todo> todoList = calendar()->todos();
1292 mTodoMap.clear(); 1293 mTodoMap.clear();
1293 mTodoListView->clear(); 1294 mTodoListView->clear();
1294 Todo *todo; 1295 Todo *todo;
1295 for(todo = todoList.first(); todo; todo = todoList.next()) { 1296 for(todo = todoList.first(); todo; todo = todoList.next()) {
1296 KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this); 1297 KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this);
1297 mTodoMap.insert(todo,todoItem); 1298 mTodoMap.insert(todo,todoItem);
1298 } 1299 }
1299 mTodoListView->setFocus(); 1300 mTodoListView->setFocus();
1300 processSelectionChange(); 1301 processSelectionChange();
1301} 1302}