author | zautrix <zautrix> | 2005-04-21 17:43:18 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-21 17:43:18 (UTC) |
commit | fd38343ef53c9b2a48208f747100579703cc1814 (patch) (unidiff) | |
tree | 2aeabdf01986d59d72044615b952a65b4d8ba292 | |
parent | 0a13a3490ec3bf4735e3435f80f58fa7d50b4448 (diff) | |
download | kdepimpi-fd38343ef53c9b2a48208f747100579703cc1814.zip kdepimpi-fd38343ef53c9b2a48208f747100579703cc1814.tar.gz kdepimpi-fd38343ef53c9b2a48208f747100579703cc1814.tar.bz2 |
backup impl
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 13 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 30 | ||||
-rw-r--r-- | libkdepim/kcmconfigs/kdepimconfigwidget.cpp | 28 | ||||
-rw-r--r-- | libkdepim/kpimglobalprefs.cpp | 6 | ||||
-rw-r--r-- | libkdepim/kpimprefs.cpp | 3 | ||||
-rw-r--r-- | libkdepim/kpimprefs.h | 1 | ||||
-rw-r--r-- | microkde/kapplication.cpp | 120 | ||||
-rw-r--r-- | microkde/kapplication.h | 1 |
8 files changed, 196 insertions, 6 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index fa18304..9e9a1a1 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -972,389 +972,402 @@ | |||
972 | { "KDE-Pim Sync","KDE-Pim Sync" }, | 972 | { "KDE-Pim Sync","KDE-Pim Sync" }, |
973 | { "Multiple profiles","Multi-Sync Profile" }, | 973 | { "Multiple profiles","Multi-Sync Profile" }, |
974 | { "Device: ","Gerät: " }, | 974 | { "Device: ","Gerät: " }, |
975 | { "Multiple sync started.","Multi-Sync gestartet." }, | 975 | { "Multiple sync started.","Multi-Sync gestartet." }, |
976 | { "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" }, | 976 | { "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" }, |
977 | { "Turn filter on","Schalte Filter an" }, | 977 | { "Turn filter on","Schalte Filter an" }, |
978 | { "Turn filter off","Schalte Filter aus" }, | 978 | { "Turn filter off","Schalte Filter aus" }, |
979 | { "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" }, | 979 | { "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" }, |
980 | { "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" }, | 980 | { "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" }, |
981 | { "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" }, | 981 | { "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" }, |
982 | { "<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n","<p><b>Schwarz</b>: Termin/Todo mit Teilnehmern. Sie sind der Organisator!</p>\n" }, | 982 | { "<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n","<p><b>Schwarz</b>: Termin/Todo mit Teilnehmern. Sie sind der Organisator!</p>\n" }, |
983 | { "<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n","<p><b>Dunkelgrün</b>: Information(Beschreibung) verfügbar.([i] in WN Ansicht)</p>\n" }, | 983 | { "<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n","<p><b>Dunkelgrün</b>: Information(Beschreibung) verfügbar.([i] in WN Ansicht)</p>\n" }, |
984 | { "<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n","<p><b>Blau</b>: Wiederholender Termin.([r] in Whats'Next Ansicht)</p>\n" }, | 984 | { "<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n","<p><b>Blau</b>: Wiederholender Termin.([r] in Whats'Next Ansicht)</p>\n" }, |
985 | { "<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n","<p><b>Rot</b>: Alarm gesetzt.([a] in Whats'Next Ansicht)</p>\n" }, | 985 | { "<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n","<p><b>Rot</b>: Alarm gesetzt.([a] in Whats'Next Ansicht)</p>\n" }, |
986 | { "<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n","<p><b>Kreuz</b>: Eintrag gecancelt.([c] in Whats'Next Ansicht)</p>\n" }, | 986 | { "<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n","<p><b>Kreuz</b>: Eintrag gecancelt.([c] in Whats'Next Ansicht)</p>\n" }, |
987 | { "<p><b>(for square icons in agenda and month view)</b></p>\n","<p><b>(für quadratische Icons in Agenda und Monats Ansicht)</b></p>\n" }, | 987 | { "<p><b>(for square icons in agenda and month view)</b></p>\n","<p><b>(für quadratische Icons in Agenda und Monats Ansicht)</b></p>\n" }, |
988 | { "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" }, | 988 | { "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" }, |
989 | { "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" }, | 989 | { "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" }, |
990 | { "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" }, | 990 | { "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" }, |
991 | { "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" }, | 991 | { "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" }, |
992 | { "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" }, | 992 | { "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" }, |
993 | { "<p><b>shift+up/down</b>: Goto first/last item</p>\n","<p><b>shift+up/down</b>: Gehe zum ersten/letzten Eintrag</p>\n" }, | 993 | { "<p><b>shift+up/down</b>: Goto first/last item</p>\n","<p><b>shift+up/down</b>: Gehe zum ersten/letzten Eintrag</p>\n" }, |
994 | { "<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n","<p><b>ctrl+up/down</b>: Gehe hoch/runter 20% aller Einträge</p>\n" }, | 994 | { "<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n","<p><b>ctrl+up/down</b>: Gehe hoch/runter 20% aller Einträge</p>\n" }, |
995 | { "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" }, | 995 | { "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" }, |
996 | { "<p><b>return+shift</b>: Deselect item+one step down</p>\n","<p><b>return+shift</b>: Deselektiere Item+Cursor einen Eintrag runter</p>\n" }, | 996 | { "<p><b>return+shift</b>: Deselect item+one step down</p>\n","<p><b>return+shift</b>: Deselektiere Item+Cursor einen Eintrag runter</p>\n" }, |
997 | { "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" }, | 997 | { "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" }, |
998 | { "<p><b>I</b>: Show info of current item+one step down.</p>\n","<p><b>I</b>: Zeige Detail-Ansicht vom sel.Eintrag+Cursor einen Eintrag runter.</p>\n" }, | 998 | { "<p><b>I</b>: Show info of current item+one step down.</p>\n","<p><b>I</b>: Zeige Detail-Ansicht vom sel.Eintrag+Cursor einen Eintrag runter.</p>\n" }, |
999 | { "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" }, | 999 | { "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" }, |
1000 | { "<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n","<p><b>return+shift</b>: Markiere Todo als nicht erledigt+Cursor einen Eintrag runter</p>\n" }, | 1000 | { "<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n","<p><b>return+shift</b>: Markiere Todo als nicht erledigt+Cursor einen Eintrag runter</p>\n" }, |
1001 | { "<p><b>return</b>: Mark item as completed+one step down.</p>\n","<p><b>return</b>: Markiere Todo als erledigt+Cursor einen Eintrag runter.</p>\n" }, | 1001 | { "<p><b>return</b>: Mark item as completed+one step down.</p>\n","<p><b>return</b>: Markiere Todo als erledigt+Cursor einen Eintrag runter.</p>\n" }, |
1002 | { "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" }, | 1002 | { "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" }, |
1003 | { "<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n","<p><b>shift+P</b>: Mache Todo zum neuen <b>P</b>arent Todo für das Todo, welches mit shift+Sselektiert wurde.</p>\n" }, | 1003 | { "<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n","<p><b>shift+P</b>: Mache Todo zum neuen <b>P</b>arent Todo für das Todo, welches mit shift+Sselektiert wurde.</p>\n" }, |
1004 | { "<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n","<p><b>shift+S</b>: Mache Todo zum <b>S</b>ubtodo</p>\n" }, | 1004 | { "<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n","<p><b>shift+S</b>: Mache Todo zum <b>S</b>ubtodo</p>\n" }, |
1005 | { "<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n","<p><b>shift+U</b>: <b>U</b>nparent Todo (Mache Sub-Todo zum Toplevel Todo)</p>\n" }, | 1005 | { "<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n","<p><b>shift+U</b>: <b>U</b>nparent Todo (Mache Sub-Todo zum Toplevel Todo)</p>\n" }, |
1006 | { "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" }, | 1006 | { "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" }, |
1007 | { "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" }, | 1007 | { "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" }, |
1008 | { "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" }, | 1008 | { "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" }, |
1009 | { "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" }, | 1009 | { "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" }, |
1010 | { "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" }, | 1010 | { "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" }, |
1011 | { "<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n","<p><b>left</b>: Vorh. Woche | <b>left+ctrl</b>: Vorh. Monat</p>\n" }, | 1011 | { "<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n","<p><b>left</b>: Vorh. Woche | <b>left+ctrl</b>: Vorh. Monat</p>\n" }, |
1012 | { "<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n","<p><b>right</b>: Nächste Woche | <b>right+ctrl</b>: Nächste Woche</p>\n" }, | 1012 | { "<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n","<p><b>right</b>: Nächste Woche | <b>right+ctrl</b>: Nächste Woche</p>\n" }, |
1013 | { "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" }, | 1013 | { "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" }, |
1014 | { "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" }, | 1014 | { "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" }, |
1015 | { "<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n","<p><b>+,-</b> : Zoom rein/raus Agenda | <b>A</b>: Wechsle Ganztag Agenda Höhe</p>\n" }, | 1015 | { "<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n","<p><b>+,-</b> : Zoom rein/raus Agenda | <b>A</b>: Wechsle Ganztag Agenda Höhe</p>\n" }, |
1016 | { "<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n","<p><b>S+ctrl</b>: Füge Sub-Todo hinzu | <b>X+ctrl</b>: Zeige/verstecke Datumsnavigator</p>\n" }, | 1016 | { "<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n","<p><b>S+ctrl</b>: Füge Sub-Todo hinzu | <b>X+ctrl</b>: Zeige/verstecke Datumsnavigator</p>\n" }, |
1017 | { "<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n","<p><b>T</b>: Gehe zu Heute | <b>T+ctrl</b>: Neues Todo</p>\n" }, | 1017 | { "<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n","<p><b>T</b>: Gehe zu Heute | <b>T+ctrl</b>: Neues Todo</p>\n" }, |
1018 | { "<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n","<p><b>E</b>: Editiere selektiertes Item |<b> E+ctrl</b>: Neuer Termin</p>\n" }, | 1018 | { "<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n","<p><b>E</b>: Editiere selektiertes Item |<b> E+ctrl</b>: Neuer Termin</p>\n" }, |
1019 | { "<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n","<p><b>D</b>: Ein-Tages Ansicht | <b>M</b>: Monatsansicht</p>\n" }, | 1019 | { "<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n","<p><b>D</b>: Ein-Tages Ansicht | <b>M</b>: Monatsansicht</p>\n" }, |
1020 | { "<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n","<p><b>Z,Y</b>: Arbeitswochenansicht | <b>U</b>: Wochenansicht</p>\n" }, | 1020 | { "<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n","<p><b>Z,Y</b>: Arbeitswochenansicht | <b>U</b>: Wochenansicht</p>\n" }, |
1021 | { "<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n","<p><b>V</b>: Todo Ansicht | <b>L</b>: Termin Listen Ansicht</p>\n" }, | 1021 | { "<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n","<p><b>V</b>: Todo Ansicht | <b>L</b>: Termin Listen Ansicht</p>\n" }, |
1022 | { "<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ","<p><b>X</b>: Nächste-X-Tage Ansicht | <b>W</b>: What's Next Ansicht\n " }, | 1022 | { "<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ","<p><b>X</b>: Nächste-X-Tage Ansicht | <b>W</b>: What's Next Ansicht\n " }, |
1023 | { "<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n","<p><b>1-0</b> (+<b>ctrl</b>): Selektiere Filter 1-10 (11-20)</p>\n" }, | 1023 | { "<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n","<p><b>1-0</b> (+<b>ctrl</b>): Selektiere Filter 1-10 (11-20)</p>\n" }, |
1024 | { "<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n","<p><b>O</b>: Filter An/Aus | <b>J</b>: Journal Ansicht</p>\n" }, | 1024 | { "<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n","<p><b>O</b>: Filter An/Aus | <b>J</b>: Journal Ansicht</p>\n" }, |
1025 | { "<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n","<p><b>F</b>: Zeige/verstecke Filter Ansicht |<b>F+ctrl</b>: Editiere Filter </p>\n" }, | 1025 | { "<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n","<p><b>F</b>: Zeige/verstecke Filter Ansicht |<b>F+ctrl</b>: Editiere Filter </p>\n" }, |
1026 | { "<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n","<p><b>Space</b>: Zeige fullscreen | <b>P</b>: Datums Picker</p>\n" }, | 1026 | { "<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n","<p><b>Space</b>: Zeige fullscreen | <b>P</b>: Datums Picker</p>\n" }, |
1027 | { "<p><b>I</b>: Show info for selected event/todo</p>\n","<p><b>I</b>: Zeige Info (Details) für selektiertes Item</p>\n" }, | 1027 | { "<p><b>I</b>: Show info for selected event/todo</p>\n","<p><b>I</b>: Zeige Info (Details) für selektiertes Item</p>\n" }, |
1028 | { "<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n","<p><b>H</b>: Dieser Hilfe Dialog | <b>S</b>: Such Dialog</p>\n" }, | 1028 | { "<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n","<p><b>H</b>: Dieser Hilfe Dialog | <b>S</b>: Such Dialog</p>\n" }, |
1029 | { "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" }, | 1029 | { "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" }, |
1030 | { "After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n","Nachdem etwas geändert wurde, werden die\nDaten automatisch in die Datei abgespeichert\n~/kdepim/apps/korganizer/mycalendar.ics\nnach (konfigurierbar) drei Minuten.\nAus Sicherheitsgründen wird noch einmal\nnach 10 Min. abgespeichert, wenn keine\nÄnderungen vorgenommen wurden. Die \nDaten werden automatisch gespeichert,\nwenn KO/Pi beendet wird.\nSie können eine Backup-Datei erstellen im\nMenu: Datei - Speichere Kalender Backup\n" }, | 1030 | { "After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n","Nachdem etwas geändert wurde, werden die\nDaten automatisch in die Datei abgespeichert\n~/kdepim/apps/korganizer/mycalendar.ics\nnach (konfigurierbar) drei Minuten.\nAus Sicherheitsgründen wird noch einmal\nnach 10 Min. abgespeichert, wenn keine\nÄnderungen vorgenommen wurden. Die \nDaten werden automatisch gespeichert,\nwenn KO/Pi beendet wird.\nSie können eine Backup-Datei erstellen im\nMenu: Datei - Speichere Kalender Backup\n" }, |
1031 | { "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" }, | 1031 | { "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" }, |
1032 | { "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" }, | 1032 | { "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" }, |
1033 | { "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" }, | 1033 | { "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" }, |
1034 | { "\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.info\n" }, | 1034 | { "\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.info\n" }, |
1035 | { "2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n","2) Ein Audio Alarm Daemon\nfür den Zaurus ist verfügbar\nals zusätzliche Anwendung\n" }, | 1035 | { "2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n","2) Ein Audio Alarm Daemon\nfür den Zaurus ist verfügbar\nals zusätzliche Anwendung\n" }, |
1036 | { "1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n","1) Importieren von *.vcs oder *.ics Dateien von\nanderen Anwendungen kann möglicherweise\n nicht richtig funktionieren,\nwenn die Termine Eigenschaften haben,\ndie KO/Pi nicht unterstützt.\n" }, | 1036 | { "1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n","1) Importieren von *.vcs oder *.ics Dateien von\nanderen Anwendungen kann möglicherweise\n nicht richtig funktionieren,\nwenn die Termine Eigenschaften haben,\ndie KO/Pi nicht unterstützt.\n" }, |
1037 | { "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" }, | 1037 | { "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" }, |
1038 | { "KO/Pi FAQ","KO/Pi FAQ" }, | 1038 | { "KO/Pi FAQ","KO/Pi FAQ" }, |
1039 | { "PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n","PDA-Edition\nfür: Zaurus 5x00/7x0/860/3000/6000\n" }, | 1039 | { "PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n","PDA-Edition\nfür: Zaurus 5x00/7x0/860/3000/6000\n" }, |
1040 | { "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" }, | 1040 | { "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" }, |
1041 | { "About KOrganizer/Pi","Über KOrganizer/Pi" }, | 1041 | { "About KOrganizer/Pi","Über KOrganizer/Pi" }, |
1042 | { "From: ","Von: " }, | 1042 | { "From: ","Von: " }, |
1043 | { "Remove sync info","Entferne Sync Info" }, | 1043 | { "Remove sync info","Entferne Sync Info" }, |
1044 | { "For all profiles","Für alle Profile" }, | 1044 | { "For all profiles","Für alle Profile" }, |
1045 | { "Hide not Running","Verstecke nicht Laufende" }, | 1045 | { "Hide not Running","Verstecke nicht Laufende" }, |
1046 | { "ME","ME" }, | 1046 | { "ME","ME" }, |
1047 | { "Toolbar","Toolbar" }, | 1047 | { "Toolbar","Toolbar" }, |
1048 | { "Undo Delete...","Löschen rückgängig machen..." }, | 1048 | { "Undo Delete...","Löschen rückgängig machen..." }, |
1049 | { "Undo Delete","Löschen rückgängig machen" }, | 1049 | { "Undo Delete","Löschen rückgängig machen" }, |
1050 | { "KDE Sync HowTo...","KDE Sync HowTo..." }, | 1050 | { "KDE Sync HowTo...","KDE Sync HowTo..." }, |
1051 | { "Multi Sync HowTo...","Multi Sync HowTo..." }, | 1051 | { "Multi Sync HowTo...","Multi Sync HowTo..." }, |
1052 | { "Januar","Januar" }, | 1052 | { "Januar","Januar" }, |
1053 | { "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" }, | 1053 | { "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" }, |
1054 | { "No Filter","Kein Filter" }, | 1054 | { "No Filter","Kein Filter" }, |
1055 | { "Multiple Sync options","Multi Sync Optionen" }, | 1055 | { "Multiple Sync options","Multi Sync Optionen" }, |
1056 | { "Sync algo options","Sync Ablauf Optionen" }, | 1056 | { "Sync algo options","Sync Ablauf Optionen" }, |
1057 | { "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, | 1057 | { "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, |
1058 | { "Incoming calendar filter:","Eingehender Kalender Filter:" }, | 1058 | { "Incoming calendar filter:","Eingehender Kalender Filter:" }, |
1059 | { "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, | 1059 | { "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, |
1060 | { "Write back options","Optionen zum Zurückschreiben" }, | 1060 | { "Write back options","Optionen zum Zurückschreiben" }, |
1061 | { "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, | 1061 | { "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, |
1062 | { "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, | 1062 | { "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, |
1063 | { "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, | 1063 | { "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, |
1064 | { "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, | 1064 | { "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, |
1065 | { "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, | 1065 | { "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, |
1066 | { "Time period","Zeitspanne" }, | 1066 | { "Time period","Zeitspanne" }, |
1067 | { "From ","Von " }, | 1067 | { "From ","Von " }, |
1068 | { " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, | 1068 | { " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, |
1069 | { " weeks in the future "," Wochen in der Zukunft " }, | 1069 | { " weeks in the future "," Wochen in der Zukunft " }, |
1070 | { "Profile kind specific settings","Profil Art abhängige Einstellungen" }, | 1070 | { "Profile kind specific settings","Profil Art abhängige Einstellungen" }, |
1071 | { "Local temp file:","Lokale temp Datei:" }, | 1071 | { "Local temp file:","Lokale temp Datei:" }, |
1072 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, | 1072 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, |
1073 | { "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, | 1073 | { "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, |
1074 | { "Language","Sprache" }, | 1074 | { "Language","Sprache" }, |
1075 | { "Time Format","Zeit Format" }, | 1075 | { "Time Format","Zeit Format" }, |
1076 | { "Time Zone","Zeit Zone" }, | 1076 | { "Time Zone","Zeit Zone" }, |
1077 | { "%1 groups subscribed","%1 Guppen abboniert" }, | 1077 | { "%1 groups subscribed","%1 Guppen abboniert" }, |
1078 | { "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" }, | 1078 | { "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" }, |
1079 | { "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, | 1079 | { "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, |
1080 | { "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, | 1080 | { "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, |
1081 | { "Save settings","Speichere Einstellungen" }, | 1081 | { "Save settings","Speichere Einstellungen" }, |
1082 | { "Save standard","Speichere Standard" }, | 1082 | { "Save standard","Speichere Standard" }, |
1083 | { "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, | 1083 | { "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, |
1084 | { "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, | 1084 | { "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, |
1085 | { "Data storage path","Daten Speicherpfad" }, | 1085 | { "Data storage path","Daten Speicherpfad" }, |
1086 | { "Language","Sprache" }, | 1086 | { "Language","Sprache" }, |
1087 | { "Show time in agenda items","Zeige Zeit in Agenda Items" }, | 1087 | { "Show time in agenda items","Zeige Zeit in Agenda Items" }, |
1088 | { "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, | 1088 | { "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, |
1089 | { "Show events, that are done","Zeige abgelaufene Termine" }, | 1089 | { "Show events, that are done","Zeige abgelaufene Termine" }, |
1090 | { "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" }, | 1090 | { "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" }, |
1091 | { "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, | 1091 | { "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, |
1092 | { "KO/Pi","KO/Pi" }, | 1092 | { "KO/Pi","KO/Pi" }, |
1093 | { "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, | 1093 | { "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, |
1094 | { "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, | 1094 | { "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, |
1095 | { "Sound.Al.: ","Sound.Al.: " }, | 1095 | { "Sound.Al.: ","Sound.Al.: " }, |
1096 | { "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, | 1096 | { "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, |
1097 | { "Restore","Wiederherstellen" }, | 1097 | { "Restore","Wiederherstellen" }, |
1098 | { "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" }, | 1098 | { "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" }, |
1099 | { "% completed","% erledigt" }, | 1099 | { "% completed","% erledigt" }, |
1100 | { "%d item(s) found.","%d Item(s) gefunden." }, | 1100 | { "%d item(s) found.","%d Item(s) gefunden." }, |
1101 | { "Set complete","Setze auf erledigt" }, | 1101 | { "Set complete","Setze auf erledigt" }, |
1102 | { "(cancelled)","(gecancelt)" }, | 1102 | { "(cancelled)","(gecancelt)" }, |
1103 | { "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, | 1103 | { "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, |
1104 | { " Local time "," Locale Zeit " }, | 1104 | { " Local time "," Locale Zeit " }, |
1105 | { "Form2","Form2" }, | 1105 | { "Form2","Form2" }, |
1106 | { "Filter enabled","Filter angeschaltet" }, | 1106 | { "Filter enabled","Filter angeschaltet" }, |
1107 | { "Edit Filters","Ändere Filter" }, | 1107 | { "Edit Filters","Ändere Filter" }, |
1108 | { "Print What's Next View...","Drucke What's Next Ansicht..." }, | 1108 | { "Print What's Next View...","Drucke What's Next Ansicht..." }, |
1109 | { "Agenda","Agenda" }, | 1109 | { "Agenda","Agenda" }, |
1110 | { " ("," (" }, | 1110 | { " ("," (" }, |
1111 | { "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, | 1111 | { "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, |
1112 | { "Print","Print" }, | 1112 | { "Print","Print" }, |
1113 | { "&Setup Printer...","Drucker &Setup..." }, | 1113 | { "&Setup Printer...","Drucker &Setup..." }, |
1114 | { "View Type","Zeige Typ" }, | 1114 | { "View Type","Zeige Typ" }, |
1115 | { "Page &orientation:","Seiten Ausrichtung:" }, | 1115 | { "Page &orientation:","Seiten Ausrichtung:" }, |
1116 | { "Use Default of Selected Style","Default des selektierten Stils" }, | 1116 | { "Use Default of Selected Style","Default des selektierten Stils" }, |
1117 | { "Use Default Setting of Printer","Default Einstellung des Druckers" }, | 1117 | { "Use Default Setting of Printer","Default Einstellung des Druckers" }, |
1118 | { "Portrait","Portrait" }, | 1118 | { "Portrait","Portrait" }, |
1119 | { "Landscape","Landschaft" }, | 1119 | { "Landscape","Landschaft" }, |
1120 | { "Print day","Drucke Tag" }, | 1120 | { "Print day","Drucke Tag" }, |
1121 | { "CalPrintDay_Base","CalPrintDay_Base" }, | 1121 | { "CalPrintDay_Base","CalPrintDay_Base" }, |
1122 | { "Date && Time Range","Datum && Zeitspanne" }, | 1122 | { "Date && Time Range","Datum && Zeitspanne" }, |
1123 | { "&End date:","&Enddatum:" }, | 1123 | { "&End date:","&Enddatum:" }, |
1124 | { "&Start date:","&Startdatum:" }, | 1124 | { "&Start date:","&Startdatum:" }, |
1125 | { "Start &time:","Startzeit:" }, | 1125 | { "Start &time:","Startzeit:" }, |
1126 | { "End ti&me:","Endzeit:" }, | 1126 | { "End ti&me:","Endzeit:" }, |
1127 | { "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, | 1127 | { "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, |
1128 | { "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, | 1128 | { "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, |
1129 | { "Alt+D","Alt+D" }, | 1129 | { "Alt+D","Alt+D" }, |
1130 | { "&Use colors","Nutze Farben" }, | 1130 | { "&Use colors","Nutze Farben" }, |
1131 | { "Alt+U","Alt+U" }, | 1131 | { "Alt+U","Alt+U" }, |
1132 | { "Print week","Drucke Woche" }, | 1132 | { "Print week","Drucke Woche" }, |
1133 | { "CalPrintWeek_Base","CalPrintWeek_Base" }, | 1133 | { "CalPrintWeek_Base","CalPrintWeek_Base" }, |
1134 | { "Use &colors","Nutze Farben" }, | 1134 | { "Use &colors","Nutze Farben" }, |
1135 | { "Type of View","Typ der Ansicht" }, | 1135 | { "Type of View","Typ der Ansicht" }, |
1136 | { "Print as &Filofax page","Drucke als &Filofax Seite" }, | 1136 | { "Print as &Filofax page","Drucke als &Filofax Seite" }, |
1137 | { "Alt+F","Alt+F" }, | 1137 | { "Alt+F","Alt+F" }, |
1138 | { "Print as &timetable view:","Drucke als Zeittabelle:" }, | 1138 | { "Print as &timetable view:","Drucke als Zeittabelle:" }, |
1139 | { "Alt+T","Alt+T" }, | 1139 | { "Alt+T","Alt+T" }, |
1140 | { "Print as split week view","Drucke als gesplittete Wochenansicht" }, | 1140 | { "Print as split week view","Drucke als gesplittete Wochenansicht" }, |
1141 | { "Print month","Drucke Monat" }, | 1141 | { "Print month","Drucke Monat" }, |
1142 | { "CalPrintMonth_Base","CalPrintMonth_Base" }, | 1142 | { "CalPrintMonth_Base","CalPrintMonth_Base" }, |
1143 | { "&Start month:","&Startmonat:" }, | 1143 | { "&Start month:","&Startmonat:" }, |
1144 | { "&End month:","&Endmonat:" }, | 1144 | { "&End month:","&Endmonat:" }, |
1145 | { "Print week &numbers","Drucke Wochen Nummer(n)" }, | 1145 | { "Print week &numbers","Drucke Wochen Nummer(n)" }, |
1146 | { "Print todos","Drucke Todos" }, | 1146 | { "Print todos","Drucke Todos" }, |
1147 | { "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, | 1147 | { "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, |
1148 | { "Include &description of the item","Inclusive Itembeschreibung" }, | 1148 | { "Include &description of the item","Inclusive Itembeschreibung" }, |
1149 | { "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, | 1149 | { "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, |
1150 | { "Include &priority of the item","Inclusive Priorität des Items" }, | 1150 | { "Include &priority of the item","Inclusive Priorität des Items" }, |
1151 | { "Items to Print","Zu druckende Items" }, | 1151 | { "Items to Print","Zu druckende Items" }, |
1152 | { "&From:","Von:" }, | 1152 | { "&From:","Von:" }, |
1153 | { "&To:","Bis:" }, | 1153 | { "&To:","Bis:" }, |
1154 | { "Print &all todo items","Drucke alle Todo Items" }, | 1154 | { "Print &all todo items","Drucke alle Todo Items" }, |
1155 | { "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, | 1155 | { "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, |
1156 | { "Only items due in the &range:","Nur Items in dem Zeitraum:" }, | 1156 | { "Only items due in the &range:","Nur Items in dem Zeitraum:" }, |
1157 | { "Todo List","Todo Liste" }, | 1157 | { "Todo List","Todo Liste" }, |
1158 | { "&Title:","&Titel:" }, | 1158 | { "&Title:","&Titel:" }, |
1159 | { "Co&nnect subtodos with its parent","Verbinde Untertodos mit ihren Ober-Todos" }, | 1159 | { "Co&nnect subtodos with its parent","Verbinde Untertodos mit ihren Ober-Todos" }, |
1160 | { "Todo list","Todo Liste" }, | 1160 | { "Todo list","Todo Liste" }, |
1161 | { "&Print...","Drucke..." }, | 1161 | { "&Print...","Drucke..." }, |
1162 | { "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, | 1162 | { "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, |
1163 | { "[Unconfigured]","[Unkonfiguriert]" }, | 1163 | { "[Unconfigured]","[Unkonfiguriert]" }, |
1164 | { "OK","OK" }, | 1164 | { "OK","OK" }, |
1165 | { "FilterEditor","FilterEditor" }, | 1165 | { "FilterEditor","FilterEditor" }, |
1166 | { "Include","Inclusive" }, | 1166 | { "Include","Inclusive" }, |
1167 | { "Exclude","Exclusive" }, | 1167 | { "Exclude","Exclusive" }, |
1168 | { "Edit Selection...","Editiere Auswahl" }, | 1168 | { "Edit Selection...","Editiere Auswahl" }, |
1169 | { "recurring events","wiederholende Termine" }, | 1169 | { "recurring events","wiederholende Termine" }, |
1170 | { "recurr. events","wiederh.Termine" }, | 1170 | { "recurr. events","wiederh.Termine" }, |
1171 | { "completed to-dos","erledigte Todos" }, | 1171 | { "completed to-dos","erledigte Todos" }, |
1172 | { "events","Termine" }, | 1172 | { "events","Termine" }, |
1173 | { "todos","Todos" }, | 1173 | { "todos","Todos" }, |
1174 | { "journals","Journale" }, | 1174 | { "journals","Journale" }, |
1175 | { "public","öffentl." }, | 1175 | { "public","öffentl." }, |
1176 | { "private","privat" }, | 1176 | { "private","privat" }, |
1177 | { "confidential","vertraul." }, | 1177 | { "confidential","vertraul." }, |
1178 | { "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Untertodos.\nAlle erledigten Untertodos\nwerden auch gelöscht!" }, | 1178 | { "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Untertodos.\nAlle erledigten Untertodos\nwerden auch gelöscht!" }, |
1179 | { "Yesterday","Gestern" }, | 1179 | { "Yesterday","Gestern" }, |
1180 | { "Day after tomorrow","Übermorgen" }, | 1180 | { "Day after tomorrow","Übermorgen" }, |
1181 | { "Tomorrow","Morgen" }, | 1181 | { "Tomorrow","Morgen" }, |
1182 | { "Day before yesterday","Vorgestern" }, | 1182 | { "Day before yesterday","Vorgestern" }, |
1183 | { "Size %1","Größe %1" }, | 1183 | { "Size %1","Größe %1" }, |
1184 | { "New Agendasize: %1","Neue Agendagröße: %1" }, | 1184 | { "New Agendasize: %1","Neue Agendagröße: %1" }, |
1185 | { " (%1 y.)"," (%1 J.)" }, | 1185 | { " (%1 y.)"," (%1 J.)" }, |
1186 | { "Allday:","Ganztägig:" }, | 1186 | { "Allday:","Ganztägig:" }, |
1187 | { "compl.todos","erled.Todos" }, | 1187 | { "compl.todos","erled.Todos" }, |
1188 | { "Day view","Tagesansicht" }, | 1188 | { "Day view","Tagesansicht" }, |
1189 | { "Next days","Nächste Tage" }, | 1189 | { "Next days","Nächste Tage" }, |
1190 | { "Next week","Nächste Woche" }, | 1190 | { "Next week","Nächste Woche" }, |
1191 | { "Next two weeks","Nächste zwei Wochen" }, | 1191 | { "Next two weeks","Nächste zwei Wochen" }, |
1192 | { "This month","Dieser Monat" }, | 1192 | { "This month","Dieser Monat" }, |
1193 | { "Journal view","Journal" }, | 1193 | { "Journal view","Journal" }, |
1194 | { "Display all opened","Zeige alle geöffnet" }, | 1194 | { "Display all opened","Zeige alle geöffnet" }, |
1195 | { "Display all closed","Zeige alle geschlossen" }, | 1195 | { "Display all closed","Zeige alle geschlossen" }, |
1196 | { "Display all flat","Zeige alle flach" }, | 1196 | { "Display all flat","Zeige alle flach" }, |
1197 | { "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, | 1197 | { "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, |
1198 | { "Default todo done color:","Standard Todo erledigt Farbe" }, | 1198 | { "Default todo done color:","Standard Todo erledigt Farbe" }, |
1199 | { "Select week %1-%2","Wähle Woche %1-%2" }, | 1199 | { "Select week %1-%2","Wähle Woche %1-%2" }, |
1200 | { "Select Week","Wähle Woche" }, | 1200 | { "Select Week","Wähle Woche" }, |
1201 | { "Set alarm for selected...","Setze Alarm für Selekt..." }, | 1201 | { "Set alarm for selected...","Setze Alarm für Selekt..." }, |
1202 | { "Set Alarm!","Setze Alarm!" }, | 1202 | { "Set Alarm!","Setze Alarm!" }, |
1203 | { "Canged alarm for %1 items","Alarm für %1 Items geändert" }, | 1203 | { "Canged alarm for %1 items","Alarm für %1 Items geändert" }, |
1204 | { " and "," und " }, | 1204 | { " and "," und " }, |
1205 | { "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, | 1205 | { "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, |
1206 | { "Mail to selected","Mail an Ausgewählte" }, | 1206 | { "Mail to selected","Mail an Ausgewählte" }, |
1207 | { "Mail to all","Mail an Alle" }, | 1207 | { "Mail to all","Mail an Alle" }, |
1208 | { "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, | 1208 | { "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, |
1209 | { "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, | 1209 | { "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, |
1210 | { " on"," am" }, | 1210 | { " on"," am" }, |
1211 | { " completed on "," erledigt am " }, | 1211 | { " completed on "," erledigt am " }, |
1212 | { "Save as Event template","Speichere als Vorlage" }, | 1212 | { "Save as Event template","Speichere als Vorlage" }, |
1213 | { "Load Event template","Lade Termin Vorlage" }, | 1213 | { "Load Event template","Lade Termin Vorlage" }, |
1214 | { "Save as Journal template","Speichere als Journal Vorlage" }, | 1214 | { "Save as Journal template","Speichere als Journal Vorlage" }, |
1215 | { "Insert Journal template","Füge Journal Vorlage ein" }, | 1215 | { "Insert Journal template","Füge Journal Vorlage ein" }, |
1216 | { "Sub todos:<br>","Unter Todos:<br>" }, | 1216 | { "Sub todos:<br>","Unter Todos:<br>" }, |
1217 | { "Parent todo:<br>","Über Todo:<br>" }, | 1217 | { "Parent todo:<br>","Über Todo:<br>" }, |
1218 | { "Set current as color category","Setze Gewählte als Farbkategorie" }, | 1218 | { "Set current as color category","Setze Gewählte als Farbkategorie" }, |
1219 | { " completed"," erledigt" }, | 1219 | { " completed"," erledigt" }, |
1220 | { "(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!","(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi basiert auf KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) und das KDE Team.\nKOrganizer/Pi ist lizensiert unter der GPL.\nKO/Pi kann kompiliert werden für\nLinux, Zaurus-PDA und Windows\nwww.pi-sync.info --- www.korganizer.org\nBesonderen Dank an Michael und Ben\nfür intensives Testen!" }, | 1220 | { "(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!","(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi basiert auf KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) und das KDE Team.\nKOrganizer/Pi ist lizensiert unter der GPL.\nKO/Pi kann kompiliert werden für\nLinux, Zaurus-PDA und Windows\nwww.pi-sync.info --- www.korganizer.org\nBesonderen Dank an Michael und Ben\nfür intensives Testen!" }, |
1221 | { "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, | 1221 | { "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, |
1222 | { "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, | 1222 | { "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, |
1223 | { "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, | 1223 | { "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, |
1224 | { "Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?","Verbindungsversuch wegen\nZeitüberschreitung gescheitert!\nWurde vergessen Pi-Sync auf\nder Gegenstelle anzuschalten?" }, | 1224 | { "Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?","Verbindungsversuch wegen\nZeitüberschreitung gescheitert!\nWurde vergessen Pi-Sync auf\nder Gegenstelle anzuschalten?" }, |
1225 | { "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, | 1225 | { "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, |
1226 | { "Error","Fehler" }, | 1226 | { "Error","Fehler" }, |
1227 | { ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, | 1227 | { ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, |
1228 | { "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, | 1228 | { "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, |
1229 | { "Warning","Warnung" }, | 1229 | { "Warning","Warnung" }, |
1230 | { "Select week number","Wähle Wochen Nummer" }, | 1230 | { "Select week number","Wähle Wochen Nummer" }, |
1231 | { "Februar","Februar" }, | 1231 | { "Februar","Februar" }, |
1232 | { "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, | 1232 | { "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, |
1233 | { "W","W" }, | 1233 | { "W","W" }, |
1234 | { "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, | 1234 | { "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, |
1235 | { "T: %1","T: %1" }, | 1235 | { "T: %1","T: %1" }, |
1236 | { "Start: ","Start: " }, | 1236 | { "Start: ","Start: " }, |
1237 | { "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, | 1237 | { "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, |
1238 | { "Password for remote access:","Passwort für fernen Zugriff:" }, | 1238 | { "Password for remote access:","Passwort für fernen Zugriff:" }, |
1239 | { "Remote IP address:","Ferne IP Adresse:" }, | 1239 | { "Remote IP address:","Ferne IP Adresse:" }, |
1240 | { "Remote port number:","Ferne Port Nummer:" }, | 1240 | { "Remote port number:","Ferne Port Nummer:" }, |
1241 | { "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, | 1241 | { "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, |
1242 | { "Remote from: ","Fern von: " }, | 1242 | { "Remote from: ","Fern von: " }, |
1243 | { "Local from: ","Lokal von: " }, | 1243 | { "Local from: ","Lokal von: " }, |
1244 | { "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n","Synchronisationsübersicht:\n\n %d lokal hinzugefügt\n %d fern hinzugefügt\n %d lokal geändert\n %d fern geändert\n %d lokal gelöscht\n %d fern gelöscht\n %d eingehende ausgefiltert\n %d ausgehende ausgefiltert\n" }, | 1244 | { "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n","Synchronisationsübersicht:\n\n %d lokal hinzugefügt\n %d fern hinzugefügt\n %d lokal geändert\n %d fern geändert\n %d lokal gelöscht\n %d fern gelöscht\n %d eingehende ausgefiltert\n %d ausgehende ausgefiltert\n" }, |
1245 | { "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, | 1245 | { "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, |
1246 | { "Write back","Schreibe zurück" }, | 1246 | { "Write back","Schreibe zurück" }, |
1247 | { "KO/Pi Synchronization","KO/Pi Synchronisation" }, | 1247 | { "KO/Pi Synchronization","KO/Pi Synchronisation" }, |
1248 | { "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, | 1248 | { "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, |
1249 | { "Received sync request","Sync Anfrage erhalten" }, | 1249 | { "Received sync request","Sync Anfrage erhalten" }, |
1250 | { "Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog.","Ferne Synchronisation ...\n\nBenutze diese Anwendung nicht!\n\nWenn das Syncen fehlschlägt kann\ndieser Dialog geschlossen werden." }, | 1250 | { "Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog.","Ferne Synchronisation ...\n\nBenutze diese Anwendung nicht!\n\nWenn das Syncen fehlschlägt kann\ndieser Dialog geschlossen werden." }, |
1251 | { "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, | 1251 | { "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, |
1252 | { "Data saved to temp file!","Daten in temp Datei gespeichert!" }, | 1252 | { "Data saved to temp file!","Daten in temp Datei gespeichert!" }, |
1253 | { "Sending file...","Sende Datei..." }, | 1253 | { "Sending file...","Sende Datei..." }, |
1254 | { "Waiting for synced file...","Warte auf gesyncte Daten..." }, | 1254 | { "Waiting for synced file...","Warte auf gesyncte Daten..." }, |
1255 | { "Receiving synced file...","Gesyncte Daten erhalten..." }, | 1255 | { "Receiving synced file...","Gesyncte Daten erhalten..." }, |
1256 | { "Received %1 bytes","%1 Bytes erhalten" }, | 1256 | { "Received %1 bytes","%1 Bytes erhalten" }, |
1257 | { "Writing file to disk...","Speichere Datei..." }, | 1257 | { "Writing file to disk...","Speichere Datei..." }, |
1258 | { "Pi-Sync successful!","Pi-Sync erfolgreich!" }, | 1258 | { "Pi-Sync successful!","Pi-Sync erfolgreich!" }, |
1259 | { "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, | 1259 | { "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, |
1260 | { "Synchronize!","Synchronisiere!" }, | 1260 | { "Synchronize!","Synchronisiere!" }, |
1261 | { "High clock skew!","Großer Uhrzeitunterschied!" }, | 1261 | { "High clock skew!","Großer Uhrzeitunterschied!" }, |
1262 | { "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, | 1262 | { "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, |
1263 | { "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" }, | 1263 | { "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" }, |
1264 | { "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, | 1264 | { "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, |
1265 | { "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, | 1265 | { "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, |
1266 | { "List week view","Listenwochenansicht" }, | 1266 | { "List week view","Listenwochenansicht" }, |
1267 | { "List week","Listenwochenansicht" }, | 1267 | { "List week","Listenwochenansicht" }, |
1268 | { "Next Week","Nächste Woche" }, | 1268 | { "Next Week","Nächste Woche" }, |
1269 | { "Previous Week","Vorherige Woche" }, | 1269 | { "Previous Week","Vorherige Woche" }, |
1270 | { "No items were found matching\nyour search expression.\nUse the wildcard characters\n'*' and '?' where needed.","Keine Einträge gefunden die\ndem Suchausdruck entsprechen.\nBenutze Platzhalter Zeichen\n'*' und '?' wo benötigt." }, | 1270 | { "No items were found matching\nyour search expression.\nUse the wildcard characters\n'*' and '?' where needed.","Keine Einträge gefunden die\ndem Suchausdruck entsprechen.\nBenutze Platzhalter Zeichen\n'*' und '?' wo benötigt." }, |
1271 | { "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, | 1271 | { "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, |
1272 | { "Details","Details" }, | 1272 | { "Details","Details" }, |
1273 | { "Created time","Erstellt Zeit" }, | 1273 | { "Created time","Erstellt Zeit" }, |
1274 | { "Last modified time","Geändert Zeit" }, | 1274 | { "Last modified time","Geändert Zeit" }, |
1275 | { "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, | 1275 | { "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, |
1276 | { "View Options","Anzeige Optionen" }, | 1276 | { "View Options","Anzeige Optionen" }, |
1277 | { "<b>Created: ","<b>Erstellt am: " }, | 1277 | { "<b>Created: ","<b>Erstellt am: " }, |
1278 | { "<b>Last modified: ","<b>Zuletzt geändert am: " }, | 1278 | { "<b>Last modified: ","<b>Zuletzt geändert am: " }, |
1279 | { "Journal: ","Journal: " }, | 1279 | { "Journal: ","Journal: " }, |
1280 | { "yearly","jährlich" }, | 1280 | { "yearly","jährlich" }, |
1281 | { "(%1) ","%1-" }, | 1281 | { "(%1) ","%1-" }, |
1282 | { "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, | 1282 | { "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, |
1283 | { "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, | 1283 | { "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, |
1284 | { "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, | 1284 | { "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, |
1285 | { "Summary/Loc.","Titel/Ort" }, | 1285 | { "Summary/Loc.","Titel/Ort" }, |
1286 | { "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, | 1286 | { "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, |
1287 | { "Week Number","Wochennummer" }, | 1287 | { "Week Number","Wochennummer" }, |
1288 | { "Import","Importiere" }, | 1288 | { "Import","Importiere" }, |
1289 | { "Export","Exportiere" }, | 1289 | { "Export","Exportiere" }, |
1290 | { "Beam","Beame" }, | 1290 | { "Beam","Beame" }, |
1291 | { "Export selected","Exportiere Selektierte" }, | 1291 | { "Export selected","Exportiere Selektierte" }, |
1292 | { "As iCal (ics) file...","Als iCal (ics) Datei..." }, | 1292 | { "As iCal (ics) file...","Als iCal (ics) Datei..." }, |
1293 | { "As vCal (vcs) file...","Als vCal (vcs) Datei..." }, | 1293 | { "As vCal (vcs) file...","Als vCal (vcs) Datei..." }, |
1294 | { "Journal/Details...","Journale/Details..." }, | 1294 | { "Journal/Details...","Journale/Details..." }, |
1295 | { "Agenda View","Agenda Ansicht" }, | 1295 | { "Agenda View","Agenda Ansicht" }, |
1296 | { "Show current time","Zeige aktuelle Zeit" }, | 1296 | { "Show current time","Zeige aktuelle Zeit" }, |
1297 | { "Edit new item","Bearbeite neuen Eintrag" }, | 1297 | { "Edit new item","Bearbeite neuen Eintrag" }, |
1298 | { "Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals","Bitte wählen Sie mindestens\neinen dieser Typen\num darin zu suchen:\n\nTermine\nTodos\nJournale" }, | 1298 | { "Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals","Bitte wählen Sie mindestens\neinen dieser Typen\num darin zu suchen:\n\nTermine\nTodos\nJournale" }, |
1299 | { "There is no next alarm.","Es gibt keinen nächsten Alarm." }, | 1299 | { "There is no next alarm.","Es gibt keinen nächsten Alarm." }, |
1300 | { "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" }, | 1300 | { "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" }, |
1301 | { "The next alarm is in:\n","Der nächste Alarm ist in:\n" }, | 1301 | { "The next alarm is in:\n","Der nächste Alarm ist in:\n" }, |
1302 | { "%1 days\n","%1 Tagen\n" }, | 1302 | { "%1 days\n","%1 Tagen\n" }, |
1303 | { "1 day\n","1 Tag\n" }, | 1303 | { "1 day\n","1 Tag\n" }, |
1304 | { "%1 hours\n","%1 Stunden\n" }, | 1304 | { "%1 hours\n","%1 Stunden\n" }, |
1305 | { "1 hour\n","1 Stunde\n" }, | 1305 | { "1 hour\n","1 Stunde\n" }, |
1306 | { "%1 minutes\n","%1 Minuten\n" }, | 1306 | { "%1 minutes\n","%1 Minuten\n" }, |
1307 | { "1 minute\n","1 Minute\n" }, | 1307 | { "1 minute\n","1 Minute\n" }, |
1308 | { "Only one toolbar","Nur eine Toolbar" }, | 1308 | { "Only one toolbar","Nur eine Toolbar" }, |
1309 | { "Print","Drucke" }, | 1309 | { "Print","Drucke" }, |
1310 | { "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." }, | 1310 | { "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." }, |
1311 | { "There is nothing selected!","Es ist nichts ausgewählt!" }, | 1311 | { "There is nothing selected!","Es ist nichts ausgewählt!" }, |
1312 | { "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " }, | 1312 | { "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " }, |
1313 | { "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" }, | 1313 | { "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" }, |
1314 | { "This prints the view as you see it.\n(With the complete content, of course.)\nYou may change the print layout by resizing the view.\nPrint unscaled may print several pages\ndepending on the amount of data.\nPrint scaled down will print all on one page.\nPrint scaled up/down will print all on one page,\nbut will scale up the text to page boundaries,\nif the text is smaller than the page.\nYou can select page geometry setup in the next dialog.\n","Dies druckt die Ansicht wie man sie sieht.\n(Mit dem kompletten Inhalt natürlich.)\nMan kann das Layout ändern durch ändern der Fenstergröße.\nDrucke unskaliert druckt ggf. mehrere Seiten\nabhängig von der Menge der Daten.\nDrucke runterskaliert um auf eine Seite zu passen\ndruckt alles auf eine Seite.\nDrucke hoch/runterskaliert um genau auf eine Seite zu passen\nvergrößert den Text gegebenenfalls.\nDas Seitenlayout kann im nächsten Dialog gewählt werden.\n" }, | 1314 | { "This prints the view as you see it.\n(With the complete content, of course.)\nYou may change the print layout by resizing the view.\nPrint unscaled may print several pages\ndepending on the amount of data.\nPrint scaled down will print all on one page.\nPrint scaled up/down will print all on one page,\nbut will scale up the text to page boundaries,\nif the text is smaller than the page.\nYou can select page geometry setup in the next dialog.\n","Dies druckt die Ansicht wie man sie sieht.\n(Mit dem kompletten Inhalt natürlich.)\nMan kann das Layout ändern durch ändern der Fenstergröße.\nDrucke unskaliert druckt ggf. mehrere Seiten\nabhängig von der Menge der Daten.\nDrucke runterskaliert um auf eine Seite zu passen\ndruckt alles auf eine Seite.\nDrucke hoch/runterskaliert um genau auf eine Seite zu passen\nvergrößert den Text gegebenenfalls.\nDas Seitenlayout kann im nächsten Dialog gewählt werden.\n" }, |
1315 | { "KO/Pi Printout","KO/Pi Ausdruck" }, | 1315 | { "KO/Pi Printout","KO/Pi Ausdruck" }, |
1316 | { "Print unscaled","Drucke unskaliert" }, | 1316 | { "Print unscaled","Drucke unskaliert" }, |
1317 | { "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." }, | 1317 | { "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." }, |
1318 | { "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." }, | 1318 | { "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." }, |
1319 | { "Printout Mode","Druck Modus" }, | 1319 | { "Printout Mode","Druck Modus" }, |
1320 | { "Filter menu icon","Filtermenu Icon" }, | 1320 | { "Filter menu icon","Filtermenu Icon" }, |
1321 | { "<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n","<p><b>A+(shift oder ctrl)</b>: Zeige Zeit bis zum nächsten Alarm</p>\n" }, | 1321 | { "<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n","<p><b>A+(shift oder ctrl)</b>: Zeige Zeit bis zum nächsten Alarm</p>\n" }, |
1322 | { "<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n","<p><b>N</b>: Wechsle zur nächsten Ansicht, die ein Icon in der Toolbar hat</p>\n" }, | 1322 | { "<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n","<p><b>N</b>: Wechsle zur nächsten Ansicht, die ein Icon in der Toolbar hat</p>\n" }, |
1323 | { "%1d","%1t" }, | 1323 | { "%1d","%1t" }, |
1324 | { "%1h","%1std" }, | 1324 | { "%1h","%1std" }, |
1325 | { "%1min","%1min" }, | 1325 | { "%1min","%1min" }, |
1326 | { "( %1 before )","( %1 vorher )" }, | 1326 | { "( %1 before )","( %1 vorher )" }, |
1327 | { "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" }, | 1327 | { "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" }, |
1328 | { "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" }, | 1328 | { "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" }, |
1329 | { "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." }, | 1329 | { "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." }, |
1330 | { "Show Sync Events","Zeige Sync-Ereignisse" }, | 1330 | { "Show Sync Events","Zeige Sync-Ereignisse" }, |
1331 | { "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" }, | 1331 | { "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" }, |
1332 | { "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" }, | 1332 | { "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" }, |
1333 | { " on "," am " }, | 1333 | { " on "," am " }, |
1334 | { "On: ","Am: " }, | 1334 | { "On: ","Am: " }, |
1335 | { "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" }, | 1335 | { "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" }, |
1336 | { "Start/Stop todo...","Starte/Stoppe Todo..." }, | 1336 | { "Start/Stop todo...","Starte/Stoppe Todo..." }, |
1337 | { "Color for running todos:","Farbe für laufende Todos:" }, | 1337 | { "Color for running todos:","Farbe für laufende Todos:" }, |
1338 | { "The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?","Das Todo\n%1\nist gestartet.\nWollen Sie es\nauf gestoppt setzen?" }, | 1338 | { "The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?","Das Todo\n%1\nist gestartet.\nWollen Sie es\nauf gestoppt setzen?" }, |
1339 | { "Todo is started","Todo is gestarted" }, | 1339 | { "Todo is started","Todo is gestarted" }, |
1340 | { "Stop todo","Stoppe Todo" }, | 1340 | { "Stop todo","Stoppe Todo" }, |
1341 | { "Todo is stopped","Todo ist gestoppt" }, | 1341 | { "Todo is stopped","Todo ist gestoppt" }, |
1342 | { "Start todo","Starte Todo" }, | 1342 | { "Start todo","Starte Todo" }, |
1343 | { "The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?","Das Todo\n%1\nist gestoppt.\nWollen Sie es auf\ngestartet setzen?" }, | 1343 | { "The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?","Das Todo\n%1\nist gestoppt.\nWollen Sie es auf\ngestartet setzen?" }, |
1344 | { "The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?","Das Todo\n%1\nwird geklont!\nEs hat Untertodos!\nMöchten Sie alle\nUntertodos auch klonen?" }, | 1344 | { "The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?","Das Todo\n%1\nwird geklont!\nEs hat Untertodos!\nMöchten Sie alle\nUntertodos auch klonen?" }, |
1345 | { "Todo has subtodos","Todo hat Untertodos" }, | 1345 | { "Todo has subtodos","Todo hat Untertodos" }, |
1346 | { "Block popup until mouse button release","Sperre Popup bis Mausknopf losgelassen" }, | 1346 | { "Block popup until mouse button release","Sperre Popup bis Mausknopf losgelassen" }, |
1347 | { "Colors","Farben" }, | 1347 | { "Colors","Farben" }, |
1348 | { "Click on new parent item","Klicke auf neues Übertodo" }, | 1348 | { "Click on new parent item","Klicke auf neues Übertodo" }, |
1349 | { "Reparenting aborted!","Übertodo setzen abgebrochen" }, | 1349 | { "Reparenting aborted!","Übertodo setzen abgebrochen" }, |
1350 | { "Cannot move Todo to itself\nor a child of itself","Kann nicht Todo auf\nsich selbst oder\nein Untertodo verschieben" }, | 1350 | { "Cannot move Todo to itself\nor a child of itself","Kann nicht Todo auf\nsich selbst oder\nein Untertodo verschieben" }, |
1351 | { "Recursive reparenting not possible!","Rekursives Verschieben nicht möglich" }, | 1351 | { "Recursive reparenting not possible!","Rekursives Verschieben nicht möglich" }, |
1352 | { "Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)","Entferne alle erledigten Todos?\n(Erledigte wiederholende Todos\nwerden nicht gelöscht!)" }, | 1352 | { "Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)","Entferne alle erledigten Todos?\n(Erledigte wiederholende Todos\nwerden nicht gelöscht!)" }, |
1353 | { "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, | 1353 | { "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, |
1354 | { "times","Zeiten" }, | 1354 | { "times","Zeiten" }, |
1355 | { "The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?","Das Todo\n%1\nhat Untertodos!\nMöchten Sie die Kategorien\nauch für alle Untertodos setzen?" }, | 1355 | { "The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?","Das Todo\n%1\nhat Untertodos!\nMöchten Sie die Kategorien\nauch für alle Untertodos setzen?" }, |
1356 | { "Backup enabled","Backup angeschaltet" }, | ||
1357 | { "Use standard backup dir","Standard Backupverzeichnis" }, | ||
1358 | { "Number of Backups:","Anzahl der Backups" }, | ||
1359 | { "Make backup every ","Mache ein Backup alle " }, | ||
1360 | { " days"," Tage" }, | ||
1361 | { "","" }, | ||
1362 | { "","" }, | ||
1363 | { "","" }, | ||
1364 | { "","" }, | ||
1365 | { "","" }, | ||
1366 | { "","" }, | ||
1367 | { "","" }, | ||
1368 | { "","" }, | ||
1356 | { "","" }, | 1369 | { "","" }, |
1357 | { "","" }, | 1370 | { "","" }, |
1358 | { "","" }, | 1371 | { "","" }, |
1359 | { "","" }, | 1372 | { "","" }, |
1360 | { "","" }, | 1373 | { "","" }, |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 68e5e5a..9ad0694 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -1,447 +1,448 @@ | |||
1 | #include <stdlib.h> | 1 | #include <stdlib.h> |
2 | 2 | ||
3 | #include <qaction.h> | 3 | #include <qaction.h> |
4 | #include <qpopupmenu.h> | 4 | #include <qpopupmenu.h> |
5 | #include <qpainter.h> | 5 | #include <qpainter.h> |
6 | #include <qwhatsthis.h> | 6 | #include <qwhatsthis.h> |
7 | #include <qpushbutton.h> | 7 | #include <qpushbutton.h> |
8 | #include <qmessagebox.h> | 8 | #include <qmessagebox.h> |
9 | #include <qlineedit.h> | 9 | #include <qlineedit.h> |
10 | #include <qtextcodec.h> | 10 | #include <qtextcodec.h> |
11 | #include <qfile.h> | 11 | #include <qfile.h> |
12 | #include <qdir.h> | 12 | #include <qdir.h> |
13 | #include <qapp.h> | 13 | #include <qapp.h> |
14 | #include <qfileinfo.h> | 14 | #include <qfileinfo.h> |
15 | #include <qlabel.h> | 15 | #include <qlabel.h> |
16 | #include <qspinbox.h> | 16 | #include <qspinbox.h> |
17 | #include <qcheckbox.h> | 17 | #include <qcheckbox.h> |
18 | #include <qmap.h> | 18 | #include <qmap.h> |
19 | #include <qwmatrix.h> | 19 | #include <qwmatrix.h> |
20 | #include <qtextbrowser.h> | 20 | #include <qtextbrowser.h> |
21 | #include <qtextstream.h> | 21 | #include <qtextstream.h> |
22 | #ifndef DESKTOP_VERSION | 22 | #ifndef DESKTOP_VERSION |
23 | #include <qpe/global.h> | 23 | #include <qpe/global.h> |
24 | #include <qpe/qpemenubar.h> | 24 | #include <qpe/qpemenubar.h> |
25 | #include <qpe/qpetoolbar.h> | 25 | #include <qpe/qpetoolbar.h> |
26 | #include <qpe/resource.h> | 26 | #include <qpe/resource.h> |
27 | #include <qpe/qpeapplication.h> | 27 | #include <qpe/qpeapplication.h> |
28 | #include <qtopia/alarmserver.h> | 28 | #include <qtopia/alarmserver.h> |
29 | #include <qtopia/qcopenvelope_qws.h> | 29 | #include <qtopia/qcopenvelope_qws.h> |
30 | #include <unistd.h> // for sleep | 30 | #include <unistd.h> // for sleep |
31 | #else | 31 | #else |
32 | #include <qmenubar.h> | 32 | #include <qmenubar.h> |
33 | #include <qtoolbar.h> | 33 | #include <qtoolbar.h> |
34 | #include <qapplication.h> | 34 | #include <qapplication.h> |
35 | //#include <resource.h> | 35 | //#include <resource.h> |
36 | 36 | ||
37 | #endif | 37 | #endif |
38 | #include <libkcal/calendarlocal.h> | 38 | #include <libkcal/calendarlocal.h> |
39 | #include <libkcal/todo.h> | 39 | #include <libkcal/todo.h> |
40 | #include <libkcal/phoneformat.h> | 40 | #include <libkcal/phoneformat.h> |
41 | #include <libkdepim/ksyncprofile.h> | 41 | #include <libkdepim/ksyncprofile.h> |
42 | #include <libkdepim/phoneaccess.h> | 42 | #include <libkdepim/phoneaccess.h> |
43 | #include <libkcal/kincidenceformatter.h> | 43 | #include <libkcal/kincidenceformatter.h> |
44 | #include <libkdepim/kpimglobalprefs.h> | 44 | #include <libkdepim/kpimglobalprefs.h> |
45 | 45 | ||
46 | #include "calendarview.h" | 46 | #include "calendarview.h" |
47 | #include "koviewmanager.h" | 47 | #include "koviewmanager.h" |
48 | #include "datenavigator.h" | 48 | #include "datenavigator.h" |
49 | #include "koagendaview.h" | 49 | #include "koagendaview.h" |
50 | #include "koagenda.h" | 50 | #include "koagenda.h" |
51 | #include "kodialogmanager.h" | 51 | #include "kodialogmanager.h" |
52 | #include "kdialogbase.h" | 52 | #include "kdialogbase.h" |
53 | #include "kapplication.h" | 53 | #include "kapplication.h" |
54 | #include "kofilterview.h" | 54 | #include "kofilterview.h" |
55 | #include "kstandarddirs.h" | 55 | #include "kstandarddirs.h" |
56 | #include "koprefs.h" | 56 | #include "koprefs.h" |
57 | #include "kfiledialog.h" | 57 | #include "kfiledialog.h" |
58 | #include "koglobals.h" | 58 | #include "koglobals.h" |
59 | #include "kglobal.h" | 59 | #include "kglobal.h" |
60 | #include "ktoolbar.h" | 60 | #include "ktoolbar.h" |
61 | #include "klocale.h" | 61 | #include "klocale.h" |
62 | #include "kconfig.h" | 62 | #include "kconfig.h" |
63 | #include "externalapphandler.h" | 63 | #include "externalapphandler.h" |
64 | #include <kglobalsettings.h> | ||
64 | 65 | ||
65 | using namespace KCal; | 66 | using namespace KCal; |
66 | #ifndef _WIN32_ | 67 | #ifndef _WIN32_ |
67 | #include <unistd.h> | 68 | #include <unistd.h> |
68 | #else | 69 | #else |
69 | #ifdef _OL_IMPORT_ | 70 | #ifdef _OL_IMPORT_ |
70 | #include "koimportoldialog.h" | 71 | #include "koimportoldialog.h" |
71 | #endif | 72 | #endif |
72 | #endif | 73 | #endif |
73 | #include "mainwindow.h" | 74 | #include "mainwindow.h" |
74 | 75 | ||
75 | 76 | ||
76 | class KOex2phonePrefs : public QDialog | 77 | class KOex2phonePrefs : public QDialog |
77 | { | 78 | { |
78 | public: | 79 | public: |
79 | KOex2phonePrefs( QWidget *parent=0, const char *name=0 ) : | 80 | KOex2phonePrefs( QWidget *parent=0, const char *name=0 ) : |
80 | QDialog( parent, name, true ) | 81 | QDialog( parent, name, true ) |
81 | { | 82 | { |
82 | setCaption( i18n("Export to phone options") ); | 83 | setCaption( i18n("Export to phone options") ); |
83 | QVBoxLayout* lay = new QVBoxLayout( this ); | 84 | QVBoxLayout* lay = new QVBoxLayout( this ); |
84 | lay->setSpacing( 3 ); | 85 | lay->setSpacing( 3 ); |
85 | lay->setMargin( 3 ); | 86 | lay->setMargin( 3 ); |
86 | QLabel *lab; | 87 | QLabel *lab; |
87 | lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) ); | 88 | lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) ); |
88 | lab->setAlignment (AlignHCenter ); | 89 | lab->setAlignment (AlignHCenter ); |
89 | QHBox* temphb; | 90 | QHBox* temphb; |
90 | temphb = new QHBox( this ); | 91 | temphb = new QHBox( this ); |
91 | new QLabel( i18n("I/O device: "), temphb ); | 92 | new QLabel( i18n("I/O device: "), temphb ); |
92 | mPhoneDevice = new QLineEdit( temphb); | 93 | mPhoneDevice = new QLineEdit( temphb); |
93 | lay->addWidget( temphb ); | 94 | lay->addWidget( temphb ); |
94 | temphb = new QHBox( this ); | 95 | temphb = new QHBox( this ); |
95 | new QLabel( i18n("Connection: "), temphb ); | 96 | new QLabel( i18n("Connection: "), temphb ); |
96 | mPhoneConnection = new QLineEdit( temphb); | 97 | mPhoneConnection = new QLineEdit( temphb); |
97 | lay->addWidget( temphb ); | 98 | lay->addWidget( temphb ); |
98 | temphb = new QHBox( this ); | 99 | temphb = new QHBox( this ); |
99 | new QLabel( i18n("Model(opt.): "), temphb ); | 100 | new QLabel( i18n("Model(opt.): "), temphb ); |
100 | mPhoneModel = new QLineEdit( temphb); | 101 | mPhoneModel = new QLineEdit( temphb); |
101 | lay->addWidget( temphb ); | 102 | lay->addWidget( temphb ); |
102 | mWriteBackFuture= new QCheckBox( i18n("Write back events in future only"), this ); | 103 | mWriteBackFuture= new QCheckBox( i18n("Write back events in future only"), this ); |
103 | mWriteBackFuture->setChecked( true ); | 104 | mWriteBackFuture->setChecked( true ); |
104 | lay->addWidget( mWriteBackFuture ); | 105 | lay->addWidget( mWriteBackFuture ); |
105 | temphb = new QHBox( this ); | 106 | temphb = new QHBox( this ); |
106 | new QLabel( i18n("Max. weeks in future: ") , temphb ); | 107 | new QLabel( i18n("Max. weeks in future: ") , temphb ); |
107 | mWriteBackFutureWeeks= new QSpinBox(1,104, 1, temphb); | 108 | mWriteBackFutureWeeks= new QSpinBox(1,104, 1, temphb); |
108 | mWriteBackFutureWeeks->setValue( 8 ); | 109 | mWriteBackFutureWeeks->setValue( 8 ); |
109 | lay->addWidget( temphb ); | 110 | lay->addWidget( temphb ); |
110 | lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ntodo/calendar data on phone!"), this ) ); | 111 | lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ntodo/calendar data on phone!"), this ) ); |
111 | lab->setAlignment (AlignHCenter ); | 112 | lab->setAlignment (AlignHCenter ); |
112 | QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); | 113 | QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); |
113 | lay->addWidget( ok ); | 114 | lay->addWidget( ok ); |
114 | QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); | 115 | QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); |
115 | lay->addWidget( cancel ); | 116 | lay->addWidget( cancel ); |
116 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); | 117 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); |
117 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); | 118 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); |
118 | resize( 220, 240 ); | 119 | resize( 220, 240 ); |
119 | qApp->processEvents(); | 120 | qApp->processEvents(); |
120 | int dw = QApplication::desktop()->width(); | 121 | int dw = QApplication::desktop()->width(); |
121 | int dh = QApplication::desktop()->height(); | 122 | int dh = QApplication::desktop()->height(); |
122 | move( (dw-width())/2, (dh - height() )/2 ); | 123 | move( (dw-width())/2, (dh - height() )/2 ); |
123 | } | 124 | } |
124 | 125 | ||
125 | public: | 126 | public: |
126 | QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel; | 127 | QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel; |
127 | QCheckBox* mWriteBackFuture; | 128 | QCheckBox* mWriteBackFuture; |
128 | QSpinBox* mWriteBackFutureWeeks; | 129 | QSpinBox* mWriteBackFutureWeeks; |
129 | }; | 130 | }; |
130 | 131 | ||
131 | int globalFlagBlockStartup; | 132 | int globalFlagBlockStartup; |
132 | MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : | 133 | MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : |
133 | QMainWindow( parent, name ) | 134 | QMainWindow( parent, name ) |
134 | { | 135 | { |
135 | 136 | ||
136 | mClosed = false; | 137 | mClosed = false; |
137 | //QString confFile = KStandardDirs::appDir() + "config/korganizerrc"; | 138 | //QString confFile = KStandardDirs::appDir() + "config/korganizerrc"; |
138 | QString confFile = locateLocal("config","korganizerrc"); | 139 | QString confFile = locateLocal("config","korganizerrc"); |
139 | QFileInfo finf ( confFile ); | 140 | QFileInfo finf ( confFile ); |
140 | bool showWarning = !finf.exists(); | 141 | bool showWarning = !finf.exists(); |
141 | setIcon(SmallIcon( "ko24" ) ); | 142 | setIcon(SmallIcon( "ko24" ) ); |
142 | mBlockAtStartup = true; | 143 | mBlockAtStartup = true; |
143 | mFlagKeyPressed = false; | 144 | mFlagKeyPressed = false; |
144 | setCaption("KO/Pi"); | 145 | setCaption("KO/Pi"); |
145 | KOPrefs *p = KOPrefs::instance(); | 146 | KOPrefs *p = KOPrefs::instance(); |
146 | KPimGlobalPrefs::instance()->setGlobalConfig(); | 147 | KPimGlobalPrefs::instance()->setGlobalConfig(); |
147 | p->mCurrentDisplayedView = 0; | 148 | p->mCurrentDisplayedView = 0; |
148 | if ( p->mHourSize > 22 ) | 149 | if ( p->mHourSize > 22 ) |
149 | p->mHourSize = 22; | 150 | p->mHourSize = 22; |
150 | QMainWindow::ToolBarDock tbd; | 151 | QMainWindow::ToolBarDock tbd; |
151 | if ( p->mToolBarHor ) { | 152 | if ( p->mToolBarHor ) { |
152 | if ( p->mToolBarUp ) | 153 | if ( p->mToolBarUp ) |
153 | tbd = Bottom; | 154 | tbd = Bottom; |
154 | else | 155 | else |
155 | tbd = Top; | 156 | tbd = Top; |
156 | } | 157 | } |
157 | else { | 158 | else { |
158 | if ( p->mToolBarUp ) | 159 | if ( p->mToolBarUp ) |
159 | tbd = Right; | 160 | tbd = Right; |
160 | else | 161 | else |
161 | tbd = Left; | 162 | tbd = Left; |
162 | } | 163 | } |
163 | if ( KOPrefs::instance()->mUseAppColors ) | 164 | if ( KOPrefs::instance()->mUseAppColors ) |
164 | QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); | 165 | QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); |
165 | globalFlagBlockStartup = 1; | 166 | globalFlagBlockStartup = 1; |
166 | iconToolBar = new QPEToolBar( this ); | 167 | iconToolBar = new QPEToolBar( this ); |
167 | addToolBar (iconToolBar , tbd ); | 168 | addToolBar (iconToolBar , tbd ); |
168 | 169 | ||
169 | #ifdef DESKTOP_VERSION | 170 | #ifdef DESKTOP_VERSION |
170 | if ( KOPrefs::instance()->mShowIconFilter ) | 171 | if ( KOPrefs::instance()->mShowIconFilter ) |
171 | #else | 172 | #else |
172 | if ( KOPrefs::instance()->mShowIconFilter || !p->mShowIconOnetoolbar ) | 173 | if ( KOPrefs::instance()->mShowIconFilter || !p->mShowIconOnetoolbar ) |
173 | #endif | 174 | #endif |
174 | 175 | ||
175 | { | 176 | { |
176 | if ( p->mToolBarHorF ) { | 177 | if ( p->mToolBarHorF ) { |
177 | if ( p->mToolBarUpF ) | 178 | if ( p->mToolBarUpF ) |
178 | tbd = Bottom; | 179 | tbd = Bottom; |
179 | else | 180 | else |
180 | tbd = Top; | 181 | tbd = Top; |
181 | } | 182 | } |
182 | else { | 183 | else { |
183 | if ( p->mToolBarUpF ) | 184 | if ( p->mToolBarUpF ) |
184 | tbd = Right; | 185 | tbd = Right; |
185 | else | 186 | else |
186 | tbd = Left; | 187 | tbd = Left; |
187 | } | 188 | } |
188 | filterToolBar = new QPEToolBar ( this ); | 189 | filterToolBar = new QPEToolBar ( this ); |
189 | filterMenubar = new QMenuBar( filterToolBar ); | 190 | filterMenubar = new QMenuBar( filterToolBar ); |
190 | QFontMetrics fm ( filterMenubar->font() ); | 191 | QFontMetrics fm ( filterMenubar->font() ); |
191 | 192 | ||
192 | filterPopupMenu = new QPopupMenu( this ); | 193 | filterPopupMenu = new QPopupMenu( this ); |
193 | filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 ); | 194 | filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 ); |
194 | QString addTest = "A"; | 195 | QString addTest = "A"; |
195 | filterMenubar->setMinimumWidth( fm.width( i18n("No Filter")+addTest ) ); | 196 | filterMenubar->setMinimumWidth( fm.width( i18n("No Filter")+addTest ) ); |
196 | #ifdef DESKTOP_VERSION | 197 | #ifdef DESKTOP_VERSION |
197 | addTest = "AAABBBCCCx"; | 198 | addTest = "AAABBBCCCx"; |
198 | #else | 199 | #else |
199 | addTest = "AAx"; | 200 | addTest = "AAx"; |
200 | #endif | 201 | #endif |
201 | filterMenubar->setMaximumWidth( fm.width( i18n("No Filter")+addTest ) ); | 202 | filterMenubar->setMaximumWidth( fm.width( i18n("No Filter")+addTest ) ); |
202 | addToolBar (filterToolBar , tbd ); | 203 | addToolBar (filterToolBar , tbd ); |
203 | connect ( filterPopupMenu , SIGNAL( activated ( int ) ), this, SLOT (selectFilterPopup( int ) ) ); | 204 | connect ( filterPopupMenu , SIGNAL( activated ( int ) ), this, SLOT (selectFilterPopup( int ) ) ); |
204 | connect ( filterPopupMenu , SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenuPopup() ) ); | 205 | connect ( filterPopupMenu , SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenuPopup() ) ); |
205 | if ( !KOPrefs::instance()->mShowIconFilter && !p->mShowIconOnetoolbar ) | 206 | if ( !KOPrefs::instance()->mShowIconFilter && !p->mShowIconOnetoolbar ) |
206 | filterToolBar->hide(); | 207 | filterToolBar->hide(); |
207 | } else { | 208 | } else { |
208 | filterToolBar = 0; | 209 | filterToolBar = 0; |
209 | filterMenubar = 0; | 210 | filterMenubar = 0; |
210 | filterPopupMenu = 0; | 211 | filterPopupMenu = 0; |
211 | } | 212 | } |
212 | if ( p->mShowIconOnetoolbar ) { | 213 | if ( p->mShowIconOnetoolbar ) { |
213 | viewToolBar = iconToolBar ; | 214 | viewToolBar = iconToolBar ; |
214 | navigatorToolBar = iconToolBar ; | 215 | navigatorToolBar = iconToolBar ; |
215 | } else { | 216 | } else { |
216 | #ifndef DESKTOP_VERSION | 217 | #ifndef DESKTOP_VERSION |
217 | setToolBarsMovable( false ); | 218 | setToolBarsMovable( false ); |
218 | #endif | 219 | #endif |
219 | if ( p->mToolBarHorV ) { | 220 | if ( p->mToolBarHorV ) { |
220 | if ( p->mToolBarUpV ) | 221 | if ( p->mToolBarUpV ) |
221 | tbd = Bottom; | 222 | tbd = Bottom; |
222 | else | 223 | else |
223 | tbd = Top; | 224 | tbd = Top; |
224 | } | 225 | } |
225 | else { | 226 | else { |
226 | if ( p->mToolBarUpV ) | 227 | if ( p->mToolBarUpV ) |
227 | tbd = Right; | 228 | tbd = Right; |
228 | else | 229 | else |
229 | tbd = Left; | 230 | tbd = Left; |
230 | } | 231 | } |
231 | viewToolBar = new QPEToolBar( this ); | 232 | viewToolBar = new QPEToolBar( this ); |
232 | addToolBar (viewToolBar , tbd ); | 233 | addToolBar (viewToolBar , tbd ); |
233 | if ( p->mToolBarHorN ) { | 234 | if ( p->mToolBarHorN ) { |
234 | if ( p->mToolBarUpN ) | 235 | if ( p->mToolBarUpN ) |
235 | tbd = Bottom; | 236 | tbd = Bottom; |
236 | else | 237 | else |
237 | tbd = Top; | 238 | tbd = Top; |
238 | } | 239 | } |
239 | else { | 240 | else { |
240 | if ( p->mToolBarUpN ) | 241 | if ( p->mToolBarUpN ) |
241 | tbd = Right; | 242 | tbd = Right; |
242 | else | 243 | else |
243 | tbd = Left; | 244 | tbd = Left; |
244 | } | 245 | } |
245 | navigatorToolBar = new QPEToolBar( this ); | 246 | navigatorToolBar = new QPEToolBar( this ); |
246 | addToolBar (navigatorToolBar , tbd ); | 247 | addToolBar (navigatorToolBar , tbd ); |
247 | } | 248 | } |
248 | 249 | ||
249 | 250 | ||
250 | 251 | ||
251 | mCalendarModifiedFlag = false; | 252 | mCalendarModifiedFlag = false; |
252 | QLabel* splash = new QLabel(i18n("KO/Pi is starting ... "), this ); | 253 | QLabel* splash = new QLabel(i18n("KO/Pi is starting ... "), this ); |
253 | splash->setAlignment ( AlignCenter ); | 254 | splash->setAlignment ( AlignCenter ); |
254 | setCentralWidget( splash ); | 255 | setCentralWidget( splash ); |
255 | #ifndef DESKTOP_VERSION | 256 | #ifndef DESKTOP_VERSION |
256 | showMaximized(); | 257 | showMaximized(); |
257 | #endif | 258 | #endif |
258 | 259 | ||
259 | //qDebug("Mainwidget x %d y %d w %d h %d", x(), y(), width(), height ()); | 260 | //qDebug("Mainwidget x %d y %d w %d h %d", x(), y(), width(), height ()); |
260 | setDefaultPreferences(); | 261 | setDefaultPreferences(); |
261 | mCalendar = new CalendarLocal(); | 262 | mCalendar = new CalendarLocal(); |
262 | mView = new CalendarView( mCalendar, this,"mCalendar " ); | 263 | mView = new CalendarView( mCalendar, this,"mCalendar " ); |
263 | mView->hide(); | 264 | mView->hide(); |
264 | //mView->resize(splash->size() ); | 265 | //mView->resize(splash->size() ); |
265 | initActions(); | 266 | initActions(); |
266 | mSyncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)mView, KSyncManager::KOPI, KOPrefs::instance(), syncMenu); | 267 | mSyncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)mView, KSyncManager::KOPI, KOPrefs::instance(), syncMenu); |
267 | mSyncManager->setBlockSave(false); | 268 | mSyncManager->setBlockSave(false); |
268 | mView->setSyncManager(mSyncManager); | 269 | mView->setSyncManager(mSyncManager); |
269 | #ifndef DESKTOP_VERSION | 270 | #ifndef DESKTOP_VERSION |
270 | iconToolBar->show(); | 271 | iconToolBar->show(); |
271 | qApp->processEvents(); | 272 | qApp->processEvents(); |
272 | #endif | 273 | #endif |
273 | //qDebug("Splashwidget x %d y %d w %d h %d", splash-> x(), splash->y(), splash->width(),splash-> height ()); | 274 | //qDebug("Splashwidget x %d y %d w %d h %d", splash-> x(), splash->y(), splash->width(),splash-> height ()); |
274 | int vh = height() ; | 275 | int vh = height() ; |
275 | int vw = width(); | 276 | int vw = width(); |
276 | //qDebug("Toolbar hei %d ",iconToolBar->height() ); | 277 | //qDebug("Toolbar hei %d ",iconToolBar->height() ); |
277 | if ( iconToolBar->orientation () == Qt:: Horizontal ) { | 278 | if ( iconToolBar->orientation () == Qt:: Horizontal ) { |
278 | vh -= iconToolBar->height(); | 279 | vh -= iconToolBar->height(); |
279 | } else { | 280 | } else { |
280 | vw -= iconToolBar->height(); | 281 | vw -= iconToolBar->height(); |
281 | } | 282 | } |
282 | //mView->setMaximumSize( splash->size() ); | 283 | //mView->setMaximumSize( splash->size() ); |
283 | //mView->resize( splash->size() ); | 284 | //mView->resize( splash->size() ); |
284 | //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); | 285 | //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); |
285 | mView->readSettings(); | 286 | mView->readSettings(); |
286 | bool newFile = false; | 287 | bool newFile = false; |
287 | if( !QFile::exists( defaultFileName() ) ) { | 288 | if( !QFile::exists( defaultFileName() ) ) { |
288 | QFileInfo finfo ( defaultFileName() ); | 289 | QFileInfo finfo ( defaultFileName() ); |
289 | QString oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/Applications/korganizer/mycalendar.ics"); | 290 | QString oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/Applications/korganizer/mycalendar.ics"); |
290 | QString message = "You are starting KO/Pi for the\nfirst time after updating to a\nversion >= 1.9.1. The location of the\ndefault calendar file has changed.\nA mycalendar.ics file was detected\nat the old location.\nThis file will be loaded now\nand stored at the new location!\n(Config file location has changed, too!)\nPlease read menu Help-What's New!\n"; | 291 | QString message = "You are starting KO/Pi for the\nfirst time after updating to a\nversion >= 1.9.1. The location of the\ndefault calendar file has changed.\nA mycalendar.ics file was detected\nat the old location.\nThis file will be loaded now\nand stored at the new location!\n(Config file location has changed, too!)\nPlease read menu Help-What's New!\n"; |
291 | finfo.setFile( oldFile ); | 292 | finfo.setFile( oldFile ); |
292 | if (finfo.exists() ) { | 293 | if (finfo.exists() ) { |
293 | KMessageBox::information( this, message); | 294 | KMessageBox::information( this, message); |
294 | mView->openCalendar( oldFile ); | 295 | mView->openCalendar( oldFile ); |
295 | qApp->processEvents(); | 296 | qApp->processEvents(); |
296 | } else { | 297 | } else { |
297 | oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/korganizer/mycalendar.ics"); | 298 | oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/korganizer/mycalendar.ics"); |
298 | finfo.setFile( oldFile ); | 299 | finfo.setFile( oldFile ); |
299 | if (finfo.exists() ) { | 300 | if (finfo.exists() ) { |
300 | KMessageBox::information( this, message); | 301 | KMessageBox::information( this, message); |
301 | mView->openCalendar( oldFile ); | 302 | mView->openCalendar( oldFile ); |
302 | qApp->processEvents(); | 303 | qApp->processEvents(); |
303 | } | 304 | } |
304 | } | 305 | } |
305 | mView->saveCalendar( defaultFileName() ); | 306 | mView->saveCalendar( defaultFileName() ); |
306 | newFile = true; | 307 | newFile = true; |
307 | } | 308 | } |
308 | 309 | ||
309 | QTime neededSaveTime = QDateTime::currentDateTime().time(); | 310 | QTime neededSaveTime = QDateTime::currentDateTime().time(); |
310 | mView->openCalendar( defaultFileName() ); | 311 | mView->openCalendar( defaultFileName() ); |
311 | int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); | 312 | int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); |
312 | qDebug("KO: Calendar loading time: %d ms",msNeeded ); | 313 | qDebug("KO: Calendar loading time: %d ms",msNeeded ); |
313 | 314 | ||
314 | if ( KPimGlobalPrefs::instance()->mPreferredLanguage != KOPrefs::instance()->mOldLoadedLanguage ) { | 315 | if ( KPimGlobalPrefs::instance()->mPreferredLanguage != KOPrefs::instance()->mOldLoadedLanguage ) { |
315 | KOPrefs::instance()->setAllDefaults(); | 316 | KOPrefs::instance()->setAllDefaults(); |
316 | int count = mView->addCategories(); | 317 | int count = mView->addCategories(); |
317 | } | 318 | } |
318 | processIncidenceSelection( 0 ); | 319 | processIncidenceSelection( 0 ); |
319 | connect( mView, SIGNAL( incidenceSelected( Incidence * ) ), | 320 | connect( mView, SIGNAL( incidenceSelected( Incidence * ) ), |
320 | SLOT( processIncidenceSelection( Incidence * ) ) ); | 321 | SLOT( processIncidenceSelection( Incidence * ) ) ); |
321 | connect( mView, SIGNAL( modifiedChanged( bool ) ), | 322 | connect( mView, SIGNAL( modifiedChanged( bool ) ), |
322 | SLOT( slotModifiedChanged( bool ) ) ); | 323 | SLOT( slotModifiedChanged( bool ) ) ); |
323 | 324 | ||
324 | 325 | ||
325 | connect( mView, SIGNAL( tempDisableBR(bool) ), | 326 | connect( mView, SIGNAL( tempDisableBR(bool) ), |
326 | SLOT( disableBR(bool) ) ); | 327 | SLOT( disableBR(bool) ) ); |
327 | connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) ); | 328 | connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) ); |
328 | mView->setModified( false ); | 329 | mView->setModified( false ); |
329 | mBlockAtStartup = false; | 330 | mBlockAtStartup = false; |
330 | mView->setModified( false ); | 331 | mView->setModified( false ); |
331 | setCentralWidget( mView ); | 332 | setCentralWidget( mView ); |
332 | globalFlagBlockStartup = 0; | 333 | globalFlagBlockStartup = 0; |
333 | mView->show(); | 334 | mView->show(); |
334 | delete splash; | 335 | delete splash; |
335 | if ( newFile ) | 336 | if ( newFile ) |
336 | mView->updateConfig(); | 337 | mView->updateConfig(); |
337 | // qApp->processEvents(); | 338 | // qApp->processEvents(); |
338 | //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); | 339 | //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); |
339 | //fillSyncMenu(); | 340 | //fillSyncMenu(); |
340 | 341 | ||
341 | 342 | ||
342 | connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) ); | 343 | connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) ); |
343 | connect(mView , SIGNAL( save() ), this, SLOT( save() ) ); | 344 | connect(mView , SIGNAL( save() ), this, SLOT( save() ) ); |
344 | connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) ); | 345 | connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) ); |
345 | connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); | 346 | connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); |
346 | connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); | 347 | connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); |
347 | mSyncManager->setDefaultFileName( sentSyncFile()); | 348 | mSyncManager->setDefaultFileName( sentSyncFile()); |
348 | connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) ); | 349 | connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) ); |
349 | mSyncManager->fillSyncMenu(); | 350 | mSyncManager->fillSyncMenu(); |
350 | 351 | ||
351 | 352 | ||
352 | 353 | ||
353 | mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins ); | 354 | mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins ); |
354 | if ( showWarning ) { | 355 | if ( showWarning ) { |
355 | KMessageBox::information( this, | 356 | KMessageBox::information( this, |
356 | "You are starting KO/Pi for the first time.\nPlease read menu: Help-What's New,\nif you did an update!\nPlease choose your timezone in the \nConfigure Dialog TAB Time Zone!\nPlease choose your language\nin the TAB Locale!\nYou get the Configure Dialog\nvia Menu: Actions - Configure....\nClick OK to show the Configure Dialog!\n", "KO/Pi information"); | 357 | "You are starting KO/Pi for the first time.\nPlease read menu: Help-What's New,\nif you did an update!\nPlease choose your timezone in the \nConfigure Dialog TAB Time Zone!\nPlease choose your language\nin the TAB Locale!\nYou get the Configure Dialog\nvia Menu: Actions - Configure....\nClick OK to show the Configure Dialog!\n", "KO/Pi information"); |
357 | qApp->processEvents(); | 358 | qApp->processEvents(); |
358 | mView->dialogManager()->showSyncOptions(); | 359 | mView->dialogManager()->showSyncOptions(); |
359 | } | 360 | } |
360 | 361 | ||
361 | //US listen for result adressed from Ka/Pi | 362 | //US listen for result adressed from Ka/Pi |
362 | #ifndef DESKTOP_VERSION | 363 | #ifndef DESKTOP_VERSION |
363 | connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); | 364 | connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); |
364 | #endif | 365 | #endif |
365 | #ifndef DESKTOP_VERSION | 366 | #ifndef DESKTOP_VERSION |
366 | infrared = 0; | 367 | infrared = 0; |
367 | #endif | 368 | #endif |
368 | updateFilterToolbar(); | 369 | updateFilterToolbar(); |
369 | updateWeek( mView->startDate() ); | 370 | updateWeek( mView->startDate() ); |
370 | connect( mView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ), | 371 | connect( mView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ), |
371 | SLOT( updateWeekNum( const KCal::DateList & ) ) ); | 372 | SLOT( updateWeekNum( const KCal::DateList & ) ) ); |
372 | mBRdisabled = false; | 373 | mBRdisabled = false; |
373 | //toggleBeamReceive(); | 374 | //toggleBeamReceive(); |
374 | } | 375 | } |
375 | MainWindow::~MainWindow() | 376 | MainWindow::~MainWindow() |
376 | { | 377 | { |
377 | //qDebug("MainWindow::~MainWindow() "); | 378 | //qDebug("MainWindow::~MainWindow() "); |
378 | //save toolbar location | 379 | //save toolbar location |
379 | delete mCalendar; | 380 | delete mCalendar; |
380 | delete mSyncManager; | 381 | delete mSyncManager; |
381 | #ifndef DESKTOP_VERSION | 382 | #ifndef DESKTOP_VERSION |
382 | if ( infrared ) | 383 | if ( infrared ) |
383 | delete infrared; | 384 | delete infrared; |
384 | #endif | 385 | #endif |
385 | 386 | ||
386 | 387 | ||
387 | } | 388 | } |
388 | 389 | ||
389 | void MainWindow::disableBR(bool b) | 390 | void MainWindow::disableBR(bool b) |
390 | { | 391 | { |
391 | #ifndef DESKTOP_VERSION | 392 | #ifndef DESKTOP_VERSION |
392 | if ( b ) { | 393 | if ( b ) { |
393 | if ( infrared ) { | 394 | if ( infrared ) { |
394 | toggleBeamReceive(); | 395 | toggleBeamReceive(); |
395 | mBRdisabled = true; | 396 | mBRdisabled = true; |
396 | } | 397 | } |
397 | mBRdisabled = true; | 398 | mBRdisabled = true; |
398 | } else { | 399 | } else { |
399 | if ( mBRdisabled ) { | 400 | if ( mBRdisabled ) { |
400 | mBRdisabled = false; | 401 | mBRdisabled = false; |
401 | //makes no sense,because other cal ap is probably running | 402 | //makes no sense,because other cal ap is probably running |
402 | // toggleBeamReceive(); | 403 | // toggleBeamReceive(); |
403 | } | 404 | } |
404 | } | 405 | } |
405 | #endif | 406 | #endif |
406 | 407 | ||
407 | } | 408 | } |
408 | bool MainWindow::beamReceiveEnabled() | 409 | bool MainWindow::beamReceiveEnabled() |
409 | { | 410 | { |
410 | #ifndef DESKTOP_VERSION | 411 | #ifndef DESKTOP_VERSION |
411 | return ( infrared != 0 ); | 412 | return ( infrared != 0 ); |
412 | #endif | 413 | #endif |
413 | return false; | 414 | return false; |
414 | } | 415 | } |
415 | 416 | ||
416 | void MainWindow::toggleBeamReceive() | 417 | void MainWindow::toggleBeamReceive() |
417 | { | 418 | { |
418 | if ( mBRdisabled ) | 419 | if ( mBRdisabled ) |
419 | return; | 420 | return; |
420 | #ifndef DESKTOP_VERSION | 421 | #ifndef DESKTOP_VERSION |
421 | if ( infrared ) { | 422 | if ( infrared ) { |
422 | qDebug("KO: Disable BeamReceive "); | 423 | qDebug("KO: Disable BeamReceive "); |
423 | delete infrared; | 424 | delete infrared; |
424 | infrared = 0; | 425 | infrared = 0; |
425 | brAction->setOn(false); | 426 | brAction->setOn(false); |
426 | return; | 427 | return; |
427 | } | 428 | } |
428 | qDebug("KO: Enable BeamReceive "); | 429 | qDebug("KO: Enable BeamReceive "); |
429 | brAction->setOn(true); | 430 | brAction->setOn(true); |
430 | infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ; | 431 | infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ; |
431 | QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& ))); | 432 | QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& ))); |
432 | #endif | 433 | #endif |
433 | } | 434 | } |
434 | void MainWindow::showMaximized () | 435 | void MainWindow::showMaximized () |
435 | { | 436 | { |
436 | #ifndef DESKTOP_VERSION | 437 | #ifndef DESKTOP_VERSION |
437 | if ( ! globalFlagBlockStartup ) | 438 | if ( ! globalFlagBlockStartup ) |
438 | if ( mClosed ) | 439 | if ( mClosed ) |
439 | mView->goToday(); | 440 | mView->goToday(); |
440 | #endif | 441 | #endif |
441 | QWidget::showMaximized () ; | 442 | QWidget::showMaximized () ; |
442 | mClosed = false; | 443 | mClosed = false; |
443 | } | 444 | } |
444 | void MainWindow::closeEvent( QCloseEvent* ce ) | 445 | void MainWindow::closeEvent( QCloseEvent* ce ) |
445 | { | 446 | { |
446 | 447 | ||
447 | 448 | ||
@@ -1420,768 +1421,797 @@ void MainWindow::kdesynchowto() | |||
1420 | { | 1421 | { |
1421 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); | 1422 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); |
1422 | } | 1423 | } |
1423 | void MainWindow::multisynchowto() | 1424 | void MainWindow::multisynchowto() |
1424 | { | 1425 | { |
1425 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); | 1426 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); |
1426 | } | 1427 | } |
1427 | void MainWindow::synchowto() | 1428 | void MainWindow::synchowto() |
1428 | { | 1429 | { |
1429 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); | 1430 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); |
1430 | } | 1431 | } |
1431 | void MainWindow::faq() | 1432 | void MainWindow::faq() |
1432 | { | 1433 | { |
1433 | KApplication::showFile( i18n("KO/Pi FAQ"), "kdepim/korganizer/kopiFAQ.txt" ); | 1434 | KApplication::showFile( i18n("KO/Pi FAQ"), "kdepim/korganizer/kopiFAQ.txt" ); |
1434 | 1435 | ||
1435 | } | 1436 | } |
1436 | void MainWindow::whatsNew() | 1437 | void MainWindow::whatsNew() |
1437 | { | 1438 | { |
1438 | KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); | 1439 | KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); |
1439 | 1440 | ||
1440 | } | 1441 | } |
1441 | void MainWindow::licence() | 1442 | void MainWindow::licence() |
1442 | { | 1443 | { |
1443 | KApplication::showLicence(); | 1444 | KApplication::showLicence(); |
1444 | 1445 | ||
1445 | } | 1446 | } |
1446 | void MainWindow::about() | 1447 | void MainWindow::about() |
1447 | { | 1448 | { |
1448 | QString version; | 1449 | QString version; |
1449 | #include <../version> | 1450 | #include <../version> |
1450 | QMessageBox::about( this, i18n("About KOrganizer/Pi"), | 1451 | QMessageBox::about( this, i18n("About KOrganizer/Pi"), |
1451 | i18n("KOrganizer/Platform-independent\n") + | 1452 | i18n("KOrganizer/Platform-independent\n") + |
1452 | "(KO/Pi) " + version + " - " + | 1453 | "(KO/Pi) " + version + " - " + |
1453 | 1454 | ||
1454 | #ifdef DESKTOP_VERSION | 1455 | #ifdef DESKTOP_VERSION |
1455 | i18n("Desktop Edition\n") + | 1456 | i18n("Desktop Edition\n") + |
1456 | #else | 1457 | #else |
1457 | i18n("PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n") + | 1458 | i18n("PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n") + |
1458 | #endif | 1459 | #endif |
1459 | i18n("(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!") ); | 1460 | i18n("(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!") ); |
1460 | } | 1461 | } |
1461 | void MainWindow::keyBindings() | 1462 | void MainWindow::keyBindings() |
1462 | { | 1463 | { |
1463 | QString cap = i18n("KO/Pi Keys + Colors"); | 1464 | QString cap = i18n("KO/Pi Keys + Colors"); |
1464 | QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + | 1465 | QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + |
1465 | i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ | 1466 | i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ |
1466 | i18n("<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n") + | 1467 | i18n("<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n") + |
1467 | i18n("<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n") + | 1468 | i18n("<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n") + |
1468 | i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + | 1469 | i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + |
1469 | i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ | 1470 | i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ |
1470 | i18n("<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n")+ | 1471 | i18n("<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n")+ |
1471 | i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ | 1472 | i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ |
1472 | i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ | 1473 | i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ |
1473 | i18n("<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ")+ | 1474 | i18n("<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ")+ |
1474 | i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ | 1475 | i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ |
1475 | i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ | 1476 | i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ |
1476 | i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ | 1477 | i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ |
1477 | i18n("<p><b>K</b>: Week view in Month view syle</p>\n")+ | 1478 | i18n("<p><b>K</b>: Week view in Month view syle</p>\n")+ |
1478 | i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ | 1479 | i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ |
1479 | i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+ | 1480 | i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+ |
1480 | i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n")+ | 1481 | i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n")+ |
1481 | i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+ | 1482 | i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+ |
1482 | i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+ | 1483 | i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+ |
1483 | i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+ | 1484 | i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+ |
1484 | i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+ | 1485 | i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+ |
1485 | i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+ | 1486 | i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+ |
1486 | i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+ | 1487 | i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+ |
1487 | i18n("<p><h3>In agenda view:</h3></p>\n") + | 1488 | i18n("<p><h3>In agenda view:</h3></p>\n") + |
1488 | i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+ | 1489 | i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+ |
1489 | i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+ | 1490 | i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+ |
1490 | i18n("<p><h3>In todo view:</h3></p>\n") + | 1491 | i18n("<p><h3>In todo view:</h3></p>\n") + |
1491 | i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+ | 1492 | i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+ |
1492 | i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+ | 1493 | i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+ |
1493 | i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+ | 1494 | i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+ |
1494 | i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+ | 1495 | i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+ |
1495 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ | 1496 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ |
1496 | i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+ | 1497 | i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+ |
1497 | i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+ | 1498 | i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+ |
1498 | i18n("<p><h3>In list view:</h3></p>\n") + | 1499 | i18n("<p><h3>In list view:</h3></p>\n") + |
1499 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ | 1500 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ |
1500 | i18n("<p><b>return</b>: Select item+one step down</p>\n")+ | 1501 | i18n("<p><b>return</b>: Select item+one step down</p>\n")+ |
1501 | i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+ | 1502 | i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+ |
1502 | i18n("<p><b>up/down</b>: Next/prev item</p>\n")+ | 1503 | i18n("<p><b>up/down</b>: Next/prev item</p>\n")+ |
1503 | i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+ | 1504 | i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+ |
1504 | i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+ | 1505 | i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+ |
1505 | i18n("<p><h3>In event/todo viewer:</h3></p>\n") + | 1506 | i18n("<p><h3>In event/todo viewer:</h3></p>\n") + |
1506 | i18n("<p><b>I,C</b>: Close dialog.</p>\n")+ | 1507 | i18n("<p><b>I,C</b>: Close dialog.</p>\n")+ |
1507 | i18n("<p><b>A</b>: Show agenda view.</p>\n")+ | 1508 | i18n("<p><b>A</b>: Show agenda view.</p>\n")+ |
1508 | i18n("<p><b>E</b>: Edit item</p>\n") + | 1509 | i18n("<p><b>E</b>: Edit item</p>\n") + |
1509 | i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") + | 1510 | i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") + |
1510 | i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") + | 1511 | i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") + |
1511 | i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+ | 1512 | i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+ |
1512 | i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+ | 1513 | i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+ |
1513 | i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+ | 1514 | i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+ |
1514 | i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+ | 1515 | i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+ |
1515 | i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+ | 1516 | i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+ |
1516 | i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") + | 1517 | i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") + |
1517 | i18n("<p><b>White</b>: Item readonly</p>\n"); | 1518 | i18n("<p><b>White</b>: Item readonly</p>\n"); |
1518 | displayText( text, cap); | 1519 | displayText( text, cap); |
1519 | } | 1520 | } |
1520 | void MainWindow::aboutAutoSaving() | 1521 | void MainWindow::aboutAutoSaving() |
1521 | { | 1522 | { |
1522 | QString text = i18n("After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n"); | 1523 | QString text = i18n("After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n"); |
1523 | 1524 | ||
1524 | KApplication::showText( i18n("Auto Saving in KOrganizer/Pi"), text); | 1525 | KApplication::showText( i18n("Auto Saving in KOrganizer/Pi"), text); |
1525 | 1526 | ||
1526 | } | 1527 | } |
1527 | void MainWindow::aboutKnownBugs() | 1528 | void MainWindow::aboutKnownBugs() |
1528 | { | 1529 | { |
1529 | QMessageBox* msg; | 1530 | QMessageBox* msg; |
1530 | msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"), | 1531 | msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"), |
1531 | i18n("1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n")+ | 1532 | i18n("1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n")+ |
1532 | i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+ | 1533 | i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+ |
1533 | i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n") + | 1534 | i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n") + |
1534 | i18n("\nor report them in the bugtracker on\n") + | 1535 | i18n("\nor report them in the bugtracker on\n") + |
1535 | i18n("\nhttp://sourceforge.net/projects/kdepimpi\n"), | 1536 | i18n("\nhttp://sourceforge.net/projects/kdepimpi\n"), |
1536 | QMessageBox::NoIcon, | 1537 | QMessageBox::NoIcon, |
1537 | QMessageBox::Ok, | 1538 | QMessageBox::Ok, |
1538 | QMessageBox::NoButton, | 1539 | QMessageBox::NoButton, |
1539 | QMessageBox::NoButton); | 1540 | QMessageBox::NoButton); |
1540 | msg->exec(); | 1541 | msg->exec(); |
1541 | delete msg; | 1542 | delete msg; |
1542 | 1543 | ||
1543 | } | 1544 | } |
1544 | 1545 | ||
1545 | QString MainWindow::defaultFileName() | 1546 | QString MainWindow::defaultFileName() |
1546 | { | 1547 | { |
1547 | return locateLocal( "data", "korganizer/mycalendar.ics" ); | 1548 | return locateLocal( "data", "korganizer/mycalendar.ics" ); |
1548 | } | 1549 | } |
1549 | QString MainWindow::syncFileName() | 1550 | QString MainWindow::syncFileName() |
1550 | { | 1551 | { |
1551 | #ifdef DESKTOP_VERSION | 1552 | #ifdef DESKTOP_VERSION |
1552 | return locateLocal( "tmp", "synccalendar.ics" ); | 1553 | return locateLocal( "tmp", "synccalendar.ics" ); |
1553 | #else | 1554 | #else |
1554 | return QString( "/tmp/synccalendar.ics" ); | 1555 | return QString( "/tmp/synccalendar.ics" ); |
1555 | #endif | 1556 | #endif |
1556 | } | 1557 | } |
1557 | #include "koglobals.h" | 1558 | #include "koglobals.h" |
1558 | #include <kcalendarsystem.h> | 1559 | #include <kcalendarsystem.h> |
1559 | void MainWindow::updateWeek(QDate seda) | 1560 | void MainWindow::updateWeek(QDate seda) |
1560 | { | 1561 | { |
1561 | int weekNum = KGlobal::locale()->weekNum ( seda ); | 1562 | int weekNum = KGlobal::locale()->weekNum ( seda ); |
1562 | mWeekPixmap.fill( mWeekBgColor ); | 1563 | mWeekPixmap.fill( mWeekBgColor ); |
1563 | QPainter p ( &mWeekPixmap ); | 1564 | QPainter p ( &mWeekPixmap ); |
1564 | p.setFont( mWeekFont ); | 1565 | p.setFont( mWeekFont ); |
1565 | p.drawText( 0,0,mWeekPixmap.width(), mWeekPixmap.height(),AlignCenter, QString::number( weekNum) ); | 1566 | p.drawText( 0,0,mWeekPixmap.width(), mWeekPixmap.height(),AlignCenter, QString::number( weekNum) ); |
1566 | p.end(); | 1567 | p.end(); |
1567 | QIconSet icon3 ( mWeekPixmap ); | 1568 | QIconSet icon3 ( mWeekPixmap ); |
1568 | mWeekAction->setIconSet ( icon3 ); | 1569 | mWeekAction->setIconSet ( icon3 ); |
1569 | 1570 | ||
1570 | } | 1571 | } |
1571 | void MainWindow::updateWeekNum(const DateList &selectedDates) | 1572 | void MainWindow::updateWeekNum(const DateList &selectedDates) |
1572 | { | 1573 | { |
1573 | updateWeek( selectedDates.first() ); | 1574 | updateWeek( selectedDates.first() ); |
1574 | } | 1575 | } |
1575 | void MainWindow::processIncidenceSelection( Incidence *incidence ) | 1576 | void MainWindow::processIncidenceSelection( Incidence *incidence ) |
1576 | { | 1577 | { |
1577 | 1578 | ||
1578 | if ( !incidence ) { | 1579 | if ( !incidence ) { |
1579 | enableIncidenceActions( false ); | 1580 | enableIncidenceActions( false ); |
1580 | 1581 | ||
1581 | mNewSubTodoAction->setEnabled( false ); | 1582 | mNewSubTodoAction->setEnabled( false ); |
1582 | setCaptionToDates(); | 1583 | setCaptionToDates(); |
1583 | return; | 1584 | return; |
1584 | 1585 | ||
1585 | } | 1586 | } |
1586 | 1587 | ||
1587 | //KGlobal::locale()->formatDateTime(nextA, true); | 1588 | //KGlobal::locale()->formatDateTime(nextA, true); |
1588 | QString startString = ""; | 1589 | QString startString = ""; |
1589 | if ( incidence->type() != "Todo" ) { | 1590 | if ( incidence->type() != "Todo" ) { |
1590 | if ( incidence->dtStart().date() < incidence->dtEnd().date() ) { | 1591 | if ( incidence->dtStart().date() < incidence->dtEnd().date() ) { |
1591 | if ( incidence->doesFloat() ) { | 1592 | if ( incidence->doesFloat() ) { |
1592 | startString += ": "+incidence->dtStartDateStr( true ); | 1593 | startString += ": "+incidence->dtStartDateStr( true ); |
1593 | startString += " --- "+((Event*)incidence)->dtEndDateStr( true ); | 1594 | startString += " --- "+((Event*)incidence)->dtEndDateStr( true ); |
1594 | 1595 | ||
1595 | } else { | 1596 | } else { |
1596 | startString = ": "+incidence->dtStartStr(true); | 1597 | startString = ": "+incidence->dtStartStr(true); |
1597 | startString += " --- "+((Event*)incidence)->dtEndStr(true); | 1598 | startString += " --- "+((Event*)incidence)->dtEndStr(true); |
1598 | 1599 | ||
1599 | } | 1600 | } |
1600 | 1601 | ||
1601 | } else { | 1602 | } else { |
1602 | if ( incidence->dtStart().time() != incidence->dtEnd().time() ) | 1603 | if ( incidence->dtStart().time() != incidence->dtEnd().time() ) |
1603 | startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+ | 1604 | startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+ |
1604 | "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time()); | 1605 | "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time()); |
1605 | 1606 | ||
1606 | if ( incidence->isBirthday() || incidence->isAnniversary() ) { | 1607 | if ( incidence->isBirthday() || incidence->isAnniversary() ) { |
1607 | bool ok; | 1608 | bool ok; |
1608 | QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok ); | 1609 | QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok ); |
1609 | if ( ok ) { | 1610 | if ( ok ) { |
1610 | int years = noc.date().year() - incidence->dtStart().date().year(); | 1611 | int years = noc.date().year() - incidence->dtStart().date().year(); |
1611 | startString += i18n(" (%1 y.)"). arg( years ); | 1612 | startString += i18n(" (%1 y.)"). arg( years ); |
1612 | } | 1613 | } |
1613 | } | 1614 | } |
1614 | else | 1615 | else |
1615 | startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true); | 1616 | startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true); |
1616 | } | 1617 | } |
1617 | 1618 | ||
1618 | } | 1619 | } |
1619 | else | 1620 | else |
1620 | startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed"); | 1621 | startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed"); |
1621 | if ( !incidence->location().isEmpty() ) | 1622 | if ( !incidence->location().isEmpty() ) |
1622 | startString += " (" +incidence->location()+")"; | 1623 | startString += " (" +incidence->location()+")"; |
1623 | setCaption( incidence->summary()+startString); | 1624 | setCaption( incidence->summary()+startString); |
1624 | 1625 | ||
1625 | enableIncidenceActions( true ); | 1626 | enableIncidenceActions( true ); |
1626 | 1627 | ||
1627 | if ( incidence->type() == "Event" ) { | 1628 | if ( incidence->type() == "Event" ) { |
1628 | mShowAction->setText( i18n("Show Event...") ); | 1629 | mShowAction->setText( i18n("Show Event...") ); |
1629 | mEditAction->setText( i18n("Edit Event...") ); | 1630 | mEditAction->setText( i18n("Edit Event...") ); |
1630 | mDeleteAction->setText( i18n("Delete Event...") ); | 1631 | mDeleteAction->setText( i18n("Delete Event...") ); |
1631 | 1632 | ||
1632 | mNewSubTodoAction->setEnabled( false ); | 1633 | mNewSubTodoAction->setEnabled( false ); |
1633 | } else if ( incidence->type() == "Todo" ) { | 1634 | } else if ( incidence->type() == "Todo" ) { |
1634 | mShowAction->setText( i18n("Show Todo...") ); | 1635 | mShowAction->setText( i18n("Show Todo...") ); |
1635 | mEditAction->setText( i18n("Edit Todo...") ); | 1636 | mEditAction->setText( i18n("Edit Todo...") ); |
1636 | mDeleteAction->setText( i18n("Delete Todo...") ); | 1637 | mDeleteAction->setText( i18n("Delete Todo...") ); |
1637 | 1638 | ||
1638 | mNewSubTodoAction->setEnabled( true ); | 1639 | mNewSubTodoAction->setEnabled( true ); |
1639 | } else { | 1640 | } else { |
1640 | mShowAction->setText( i18n("Show...") ); | 1641 | mShowAction->setText( i18n("Show...") ); |
1641 | mShowAction->setText( i18n("Edit...") ); | 1642 | mShowAction->setText( i18n("Edit...") ); |
1642 | mShowAction->setText( i18n("Delete...") ); | 1643 | mShowAction->setText( i18n("Delete...") ); |
1643 | 1644 | ||
1644 | mNewSubTodoAction->setEnabled( false ); | 1645 | mNewSubTodoAction->setEnabled( false ); |
1645 | } | 1646 | } |
1646 | } | 1647 | } |
1647 | 1648 | ||
1648 | void MainWindow::enableIncidenceActions( bool enabled ) | 1649 | void MainWindow::enableIncidenceActions( bool enabled ) |
1649 | { | 1650 | { |
1650 | mShowAction->setEnabled( enabled ); | 1651 | mShowAction->setEnabled( enabled ); |
1651 | mEditAction->setEnabled( enabled ); | 1652 | mEditAction->setEnabled( enabled ); |
1652 | mDeleteAction->setEnabled( enabled ); | 1653 | mDeleteAction->setEnabled( enabled ); |
1653 | 1654 | ||
1654 | mCloneAction->setEnabled( enabled ); | 1655 | mCloneAction->setEnabled( enabled ); |
1655 | mMoveAction->setEnabled( enabled ); | 1656 | mMoveAction->setEnabled( enabled ); |
1656 | mBeamAction->setEnabled( enabled ); | 1657 | mBeamAction->setEnabled( enabled ); |
1657 | mCancelAction->setEnabled( enabled ); | 1658 | mCancelAction->setEnabled( enabled ); |
1658 | } | 1659 | } |
1659 | 1660 | ||
1660 | void MainWindow::importOL() | 1661 | void MainWindow::importOL() |
1661 | { | 1662 | { |
1662 | #ifdef _OL_IMPORT_ | 1663 | #ifdef _OL_IMPORT_ |
1663 | KOImportOLdialog *id = new KOImportOLdialog("Import from OL - select folder!" , mView->calendar(),this ); | 1664 | KOImportOLdialog *id = new KOImportOLdialog("Import from OL - select folder!" , mView->calendar(),this ); |
1664 | id->exec(); | 1665 | id->exec(); |
1665 | delete id; | 1666 | delete id; |
1666 | mView->updateView(); | 1667 | mView->updateView(); |
1667 | #endif | 1668 | #endif |
1668 | } | 1669 | } |
1669 | void MainWindow::importBday() | 1670 | void MainWindow::importBday() |
1670 | { | 1671 | { |
1671 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), | 1672 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), |
1672 | i18n("When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n"), | 1673 | i18n("When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n"), |
1673 | i18n("Import!"), i18n("Cancel"), 0, | 1674 | i18n("Import!"), i18n("Cancel"), 0, |
1674 | 0, 1 ); | 1675 | 0, 1 ); |
1675 | if ( result == 0 ) { | 1676 | if ( result == 0 ) { |
1676 | mView->importBday(); | 1677 | mView->importBday(); |
1677 | 1678 | ||
1678 | } | 1679 | } |
1679 | 1680 | ||
1680 | 1681 | ||
1681 | } | 1682 | } |
1682 | void MainWindow::importQtopia() | 1683 | void MainWindow::importQtopia() |
1683 | { | 1684 | { |
1684 | //#ifndef DESKTOP_VERSION | 1685 | //#ifndef DESKTOP_VERSION |
1685 | QString mess = i18n("When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing"); | 1686 | QString mess = i18n("When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing"); |
1686 | #ifdef DESKTOP_VERSION | 1687 | #ifdef DESKTOP_VERSION |
1687 | mess += i18n("The content of the following files will be\nimported (located in your home directory (hd)):\n(hd)/Applications/datebook/datebook.xml\n(hd)/Applications/todolist/todolist.xml\nThe following category file will be used:\n(hd)/Settings/Categories.xml"); | 1688 | mess += i18n("The content of the following files will be\nimported (located in your home directory (hd)):\n(hd)/Applications/datebook/datebook.xml\n(hd)/Applications/todolist/todolist.xml\nThe following category file will be used:\n(hd)/Settings/Categories.xml"); |
1688 | #endif | 1689 | #endif |
1689 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mess, | 1690 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mess, |
1690 | i18n("Import!"), i18n("Cancel"), 0, | 1691 | i18n("Import!"), i18n("Cancel"), 0, |
1691 | 0, 1 ); | 1692 | 0, 1 ); |
1692 | if ( result == 0 ) { | 1693 | if ( result == 0 ) { |
1693 | #ifndef DESKTOP_VERSION | 1694 | #ifndef DESKTOP_VERSION |
1694 | QString datebook = Global::applicationFileName( "datebook", "datebook.xml"); | 1695 | QString datebook = Global::applicationFileName( "datebook", "datebook.xml"); |
1695 | QString todolist = Global::applicationFileName( "todolist", "todolist.xml"); | 1696 | QString todolist = Global::applicationFileName( "todolist", "todolist.xml"); |
1696 | QString categories = QString( getenv( "HOME" ) ) + "/Settings/Categories.xml"; | 1697 | QString categories = QString( getenv( "HOME" ) ) + "/Settings/Categories.xml"; |
1697 | #else | 1698 | #else |
1698 | QString datebook = QDir::homeDirPath()+ "/Applications/datebook/datebook.xml"; | 1699 | QString datebook = QDir::homeDirPath()+ "/Applications/datebook/datebook.xml"; |
1699 | QString todolist = QDir::homeDirPath()+ "/Applications/todolist/todolist.xml"; | 1700 | QString todolist = QDir::homeDirPath()+ "/Applications/todolist/todolist.xml"; |
1700 | QString categories = QDir::homeDirPath()+ "/Settings/Categories.xml"; | 1701 | QString categories = QDir::homeDirPath()+ "/Settings/Categories.xml"; |
1701 | #endif | 1702 | #endif |
1702 | mView->importQtopia( categories, datebook, todolist ); | 1703 | mView->importQtopia( categories, datebook, todolist ); |
1703 | } | 1704 | } |
1704 | #if 0 | 1705 | #if 0 |
1705 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), | 1706 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), |
1706 | i18n("Not supported \non desktop!\n"), | 1707 | i18n("Not supported \non desktop!\n"), |
1707 | i18n("Ok"), i18n("Cancel"), 0, | 1708 | i18n("Ok"), i18n("Cancel"), 0, |
1708 | 0, 1 ); | 1709 | 0, 1 ); |
1709 | 1710 | ||
1710 | #endif | 1711 | #endif |
1711 | } | 1712 | } |
1712 | 1713 | ||
1713 | void MainWindow::saveOnClose() | 1714 | void MainWindow::saveOnClose() |
1714 | { | 1715 | { |
1715 | KOPrefs *p = KOPrefs::instance(); | 1716 | KOPrefs *p = KOPrefs::instance(); |
1716 | p->mToolBarHor = ( iconToolBar->orientation () == Qt:: Horizontal ); | 1717 | p->mToolBarHor = ( iconToolBar->orientation () == Qt:: Horizontal ); |
1717 | p->mToolBarHorV = ( viewToolBar->orientation () == Qt:: Horizontal ); | 1718 | p->mToolBarHorV = ( viewToolBar->orientation () == Qt:: Horizontal ); |
1718 | p->mToolBarHorN = ( navigatorToolBar->orientation () == Qt:: Horizontal ); | 1719 | p->mToolBarHorN = ( navigatorToolBar->orientation () == Qt:: Horizontal ); |
1719 | if ( filterToolBar ) { | 1720 | if ( filterToolBar ) { |
1720 | p->mToolBarHorF = ( filterToolBar->orientation () == Qt:: Horizontal ); | 1721 | p->mToolBarHorF = ( filterToolBar->orientation () == Qt:: Horizontal ); |
1721 | } | 1722 | } |
1722 | #ifdef DESKTOP_VERSION | 1723 | #ifdef DESKTOP_VERSION |
1723 | 1724 | ||
1724 | QPoint myP; | 1725 | QPoint myP; |
1725 | myP = mapFromGlobal( iconToolBar->mapToGlobal( QPoint( 0,0) ) ); | 1726 | myP = mapFromGlobal( iconToolBar->mapToGlobal( QPoint( 0,0) ) ); |
1726 | if ( p->mToolBarHor ) | 1727 | if ( p->mToolBarHor ) |
1727 | p->mToolBarUp = myP.y() > height()/2; | 1728 | p->mToolBarUp = myP.y() > height()/2; |
1728 | else | 1729 | else |
1729 | p->mToolBarUp = myP.x() > width()/2; | 1730 | p->mToolBarUp = myP.x() > width()/2; |
1730 | myP = mapFromGlobal( viewToolBar->mapToGlobal( QPoint( 0,0) ) ); | 1731 | myP = mapFromGlobal( viewToolBar->mapToGlobal( QPoint( 0,0) ) ); |
1731 | if ( p->mToolBarHorV ) | 1732 | if ( p->mToolBarHorV ) |
1732 | p->mToolBarUpV = myP.y() > height()/2; | 1733 | p->mToolBarUpV = myP.y() > height()/2; |
1733 | else | 1734 | else |
1734 | p->mToolBarUpV = myP.x() > width()/2 ; | 1735 | p->mToolBarUpV = myP.x() > width()/2 ; |
1735 | myP = mapFromGlobal( navigatorToolBar->mapToGlobal( QPoint( 0,0) ) ); | 1736 | myP = mapFromGlobal( navigatorToolBar->mapToGlobal( QPoint( 0,0) ) ); |
1736 | if ( p->mToolBarHorN ) | 1737 | if ( p->mToolBarHorN ) |
1737 | p->mToolBarUpN = myP.y() > height()/2; | 1738 | p->mToolBarUpN = myP.y() > height()/2; |
1738 | else | 1739 | else |
1739 | p->mToolBarUpN = myP.x() > width()/2 ; | 1740 | p->mToolBarUpN = myP.x() > width()/2 ; |
1740 | if ( filterToolBar ) { | 1741 | if ( filterToolBar ) { |
1741 | myP = mapFromGlobal( filterToolBar->mapToGlobal( QPoint( 0,0) ) ); | 1742 | myP = mapFromGlobal( filterToolBar->mapToGlobal( QPoint( 0,0) ) ); |
1742 | if ( p->mToolBarHorF ) | 1743 | if ( p->mToolBarHorF ) |
1743 | p->mToolBarUpF = myP.y() > height()/2; | 1744 | p->mToolBarUpF = myP.y() > height()/2; |
1744 | else | 1745 | else |
1745 | p->mToolBarUpF = myP.x() > width()/2 ; | 1746 | p->mToolBarUpF = myP.x() > width()/2 ; |
1746 | } | 1747 | } |
1747 | #else | 1748 | #else |
1748 | if ( p->mToolBarHor ) | 1749 | if ( p->mToolBarHor ) |
1749 | p->mToolBarUp = iconToolBar->y() > height()/2; | 1750 | p->mToolBarUp = iconToolBar->y() > height()/2; |
1750 | else | 1751 | else |
1751 | p->mToolBarUp = iconToolBar->x() > width()/2; | 1752 | p->mToolBarUp = iconToolBar->x() > width()/2; |
1752 | if ( p->mToolBarHorV ) | 1753 | if ( p->mToolBarHorV ) |
1753 | p->mToolBarUpV = viewToolBar->y() > height()/2; | 1754 | p->mToolBarUpV = viewToolBar->y() > height()/2; |
1754 | else | 1755 | else |
1755 | p->mToolBarUpV = viewToolBar->x() > width()/2 ; | 1756 | p->mToolBarUpV = viewToolBar->x() > width()/2 ; |
1756 | 1757 | ||
1757 | if ( p->mToolBarHorN ) | 1758 | if ( p->mToolBarHorN ) |
1758 | p->mToolBarUpN = navigatorToolBar->y() > height()/2; | 1759 | p->mToolBarUpN = navigatorToolBar->y() > height()/2; |
1759 | else | 1760 | else |
1760 | p->mToolBarUpN = navigatorToolBar->x() > width()/2 ; | 1761 | p->mToolBarUpN = navigatorToolBar->x() > width()/2 ; |
1761 | if ( filterToolBar ) { | 1762 | if ( filterToolBar ) { |
1762 | if ( p->mToolBarHorF ) | 1763 | if ( p->mToolBarHorF ) |
1763 | p->mToolBarUpF = filterToolBar->y() > height()/2; | 1764 | p->mToolBarUpF = filterToolBar->y() > height()/2; |
1764 | else | 1765 | else |
1765 | p->mToolBarUpF = filterToolBar->x() > width()/2 ; | 1766 | p->mToolBarUpF = filterToolBar->x() > width()/2 ; |
1766 | } | 1767 | } |
1767 | #endif | 1768 | #endif |
1768 | 1769 | ||
1769 | 1770 | ||
1770 | mView->writeSettings(); | 1771 | mView->writeSettings(); |
1771 | if ( mCalendarModifiedFlag || mView->checkFileChanged( defaultFileName())) | 1772 | if ( mCalendarModifiedFlag || mView->checkFileChanged( defaultFileName())) |
1772 | save(); | 1773 | save(); |
1773 | } | 1774 | } |
1774 | void MainWindow::slotModifiedChanged( bool changed ) | 1775 | void MainWindow::slotModifiedChanged( bool changed ) |
1775 | { | 1776 | { |
1776 | if ( mBlockAtStartup ) | 1777 | if ( mBlockAtStartup ) |
1777 | return; | 1778 | return; |
1778 | 1779 | ||
1779 | int msec; | 1780 | int msec; |
1780 | // we store the changes after 1 minute, | 1781 | // we store the changes after 1 minute, |
1781 | // and for safety reasons after 10 minutes again | 1782 | // and for safety reasons after 10 minutes again |
1782 | if ( !mSyncManager->blockSave() ) | 1783 | if ( !mSyncManager->blockSave() ) |
1783 | msec = (1000 * 60*KOPrefs::instance()->mAutoSaveInterval) +1000; | 1784 | msec = (1000 * 60*KOPrefs::instance()->mAutoSaveInterval) +1000; |
1784 | else | 1785 | else |
1785 | msec = 1000 * 600; | 1786 | msec = 1000 * 600; |
1786 | mSaveTimer.start( msec, true ); // 1 minute | 1787 | mSaveTimer.start( msec, true ); // 1 minute |
1787 | qDebug("KO: Saving File in %d secs!", msec/1000); | 1788 | qDebug("KO: Saving File in %d secs!", msec/1000); |
1788 | mCalendarModifiedFlag = true; | 1789 | mCalendarModifiedFlag = true; |
1789 | } | 1790 | } |
1790 | void MainWindow::saveStopTimer() | 1791 | void MainWindow::saveStopTimer() |
1791 | { | 1792 | { |
1792 | mSaveTimer.stop(); | 1793 | mSaveTimer.stop(); |
1793 | } | 1794 | } |
1794 | void MainWindow::save() | 1795 | void MainWindow::save() |
1795 | { | 1796 | { |
1796 | if ( !mCalendarModifiedFlag ) { | 1797 | if ( !mCalendarModifiedFlag ) { |
1797 | qDebug("KO: Calendar not modified. Nothing saved."); | 1798 | qDebug("KO: Calendar not modified. Nothing saved."); |
1798 | return; | 1799 | return; |
1799 | } | 1800 | } |
1800 | if ( mSyncManager->blockSave() ) | 1801 | if ( mSyncManager->blockSave() ) |
1801 | return; | 1802 | return; |
1802 | mSyncManager->setBlockSave(true); | 1803 | mSyncManager->setBlockSave(true); |
1803 | if ( mView->checkFileVersion( defaultFileName()) ) { | 1804 | if ( mView->checkFileVersion( defaultFileName()) ) { |
1805 | if ( KPimGlobalPrefs::instance()->mBackupEnabled ){ | ||
1806 | QDate reference ( 2000,1,1); | ||
1807 | int daysTo = reference.daysTo ( QDate::currentDate() ); | ||
1808 | if ( daysTo - KPimGlobalPrefs::instance()->mBackupDayCount >= KOPrefs::instance()->mLastBackupDate ) { | ||
1809 | setCaption(i18n("KO/Pi:Creating backup ... please wait ..." )); | ||
1810 | qDebug("KO: Last backup was %d days ago ", daysTo - KOPrefs::instance()->mLastBackupDate); | ||
1811 | // we need the file path, the backup dir and the number of bups as param | ||
1812 | QString bupDir = KPimGlobalPrefs::instance()->mBackupDatadir; | ||
1813 | if ( KPimGlobalPrefs::instance()->mBackupUseDefaultDir) | ||
1814 | bupDir = KGlobalSettings::backupDataDir(); | ||
1815 | int retval = KApplication::createBackup( defaultFileName(), bupDir, KPimGlobalPrefs::instance()->mBackupNumbers );//55;//call backup | ||
1816 | if ( retval == 0 ) { | ||
1817 | qDebug("KO: Backup cancelled. Will try again tomorrow "); | ||
1818 | // retval == 0 : backup skipped for today, try again tomorrow | ||
1819 | KOPrefs::instance()->mLastBackupDate = daysTo- KPimGlobalPrefs::instance()->mBackupDayCount+1; | ||
1820 | } else if ( retval == 1 ){ | ||
1821 | qDebug("KO: Backup created."); | ||
1822 | // backup ok | ||
1823 | KOPrefs::instance()->mLastBackupDate = daysTo; | ||
1824 | |||
1825 | } else if ( retval == 2 ){ | ||
1826 | qDebug("KO: Backup globally cancelled."); | ||
1827 | // backup globally cancelled | ||
1828 | KPimGlobalPrefs::instance()->mBackupEnabled = false; | ||
1829 | } | ||
1830 | // retval == 3: do nothing, try again later | ||
1831 | } | ||
1832 | ; // KPimGlobalPrefs::instance()->mLastBackupDate | ||
1833 | } | ||
1804 | QTime neededSaveTime = QDateTime::currentDateTime().time(); | 1834 | QTime neededSaveTime = QDateTime::currentDateTime().time(); |
1805 | setCaption(i18n("KO/Pi:Saving Data to File ..." )); | 1835 | setCaption(i18n("KO/Pi:Saving Data to File ..." )); |
1806 | qDebug("KO: Start saving data to file!"); | 1836 | qDebug("KO: Start saving data to file!"); |
1807 | mView->saveCalendar( defaultFileName() ); | 1837 | mView->saveCalendar( defaultFileName() ); |
1808 | mCalendarModifiedFlag = false; | 1838 | mCalendarModifiedFlag = false; |
1809 | int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); | 1839 | int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); |
1810 | qDebug("KO: Needed %d ms for saving.",msNeeded ); | 1840 | qDebug("KO: Needed %d ms for saving.",msNeeded ); |
1811 | QString savemes; | 1841 | QString savemes; |
1812 | savemes.sprintf(i18n("KO/Pi:File Saved. Needed %d sec, %d ms"),(msNeeded/1000)%100,msNeeded%1000 ); | 1842 | savemes.sprintf(i18n("KO/Pi:File Saved. Needed %d sec, %d ms"),(msNeeded/1000)%100,msNeeded%1000 ); |
1813 | setCaption(savemes); | 1843 | setCaption(savemes); |
1814 | } else | 1844 | } else |
1815 | setCaption(i18n("Saving cancelled!")); | 1845 | setCaption(i18n("Saving cancelled!")); |
1816 | mSyncManager->setBlockSave( false ); | 1846 | mSyncManager->setBlockSave( false ); |
1817 | } | 1847 | } |
1818 | 1848 | ||
1819 | void MainWindow::keyReleaseEvent ( QKeyEvent * e) | 1849 | void MainWindow::keyReleaseEvent ( QKeyEvent * e) |
1820 | { | 1850 | { |
1821 | if ( !e->isAutoRepeat() ) { | 1851 | if ( !e->isAutoRepeat() ) { |
1822 | mFlagKeyPressed = false; | 1852 | mFlagKeyPressed = false; |
1823 | } | 1853 | } |
1824 | } | 1854 | } |
1825 | void MainWindow::keyPressEvent ( QKeyEvent * e ) | 1855 | void MainWindow::keyPressEvent ( QKeyEvent * e ) |
1826 | { | 1856 | { |
1827 | qApp->processEvents(); | 1857 | qApp->processEvents(); |
1828 | if ( e->isAutoRepeat() && !mFlagKeyPressed ) { | 1858 | if ( e->isAutoRepeat() && !mFlagKeyPressed ) { |
1829 | e->ignore(); | 1859 | e->ignore(); |
1830 | // qDebug(" ignore %d",e->isAutoRepeat() ); | 1860 | // qDebug(" ignore %d",e->isAutoRepeat() ); |
1831 | return; | 1861 | return; |
1832 | } | 1862 | } |
1833 | if (! e->isAutoRepeat() ) | 1863 | if (! e->isAutoRepeat() ) |
1834 | mFlagKeyPressed = true; | 1864 | mFlagKeyPressed = true; |
1835 | KOPrefs *p = KOPrefs::instance(); | 1865 | KOPrefs *p = KOPrefs::instance(); |
1836 | bool showSelectedDates = false; | 1866 | bool showSelectedDates = false; |
1837 | int size; | 1867 | int size; |
1838 | int pro = 0; | 1868 | int pro = 0; |
1839 | //qDebug("MainWindow::keyPressEvent "); | 1869 | //qDebug("MainWindow::keyPressEvent "); |
1840 | switch ( e->key() ) { | 1870 | switch ( e->key() ) { |
1841 | case Qt::Key_Right: | 1871 | case Qt::Key_Right: |
1842 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) | 1872 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) |
1843 | mView->goNextMonth(); | 1873 | mView->goNextMonth(); |
1844 | else | 1874 | else |
1845 | mView->goNext(); | 1875 | mView->goNext(); |
1846 | showSelectedDates = true; | 1876 | showSelectedDates = true; |
1847 | break; | 1877 | break; |
1848 | case Qt::Key_Left: | 1878 | case Qt::Key_Left: |
1849 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) | 1879 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) |
1850 | mView->goPreviousMonth(); | 1880 | mView->goPreviousMonth(); |
1851 | else | 1881 | else |
1852 | mView->goPrevious(); | 1882 | mView->goPrevious(); |
1853 | showSelectedDates = true; | 1883 | showSelectedDates = true; |
1854 | break; | 1884 | break; |
1855 | case Qt::Key_Down: | 1885 | case Qt::Key_Down: |
1856 | mView->viewManager()->agendaView()->scrollOneHourDown(); | 1886 | mView->viewManager()->agendaView()->scrollOneHourDown(); |
1857 | break; | 1887 | break; |
1858 | case Qt::Key_Up: | 1888 | case Qt::Key_Up: |
1859 | mView->viewManager()->agendaView()->scrollOneHourUp(); | 1889 | mView->viewManager()->agendaView()->scrollOneHourUp(); |
1860 | break; | 1890 | break; |
1861 | case Qt::Key_K: | 1891 | case Qt::Key_K: |
1862 | mView->viewManager()->showMonthViewWeek(); | 1892 | mView->viewManager()->showMonthViewWeek(); |
1863 | break; | 1893 | break; |
1864 | case Qt::Key_I: | 1894 | case Qt::Key_I: |
1865 | mView->showIncidence(); | 1895 | mView->showIncidence(); |
1866 | break; | 1896 | break; |
1867 | case Qt::Key_Delete: | 1897 | case Qt::Key_Delete: |
1868 | case Qt::Key_Backspace: | 1898 | case Qt::Key_Backspace: |
1869 | mView->deleteIncidence(); | 1899 | mView->deleteIncidence(); |
1870 | break; | 1900 | break; |
1871 | case Qt::Key_D: | 1901 | case Qt::Key_D: |
1872 | mView->viewManager()->showDayView(); | 1902 | mView->viewManager()->showDayView(); |
1873 | showSelectedDates = true; | 1903 | showSelectedDates = true; |
1874 | break; | 1904 | break; |
1875 | case Qt::Key_O: | 1905 | case Qt::Key_O: |
1876 | mView->toggleFilerEnabled( ); | 1906 | mView->toggleFilerEnabled( ); |
1877 | break; | 1907 | break; |
1878 | case Qt::Key_0: | 1908 | case Qt::Key_0: |
1879 | case Qt::Key_1: | 1909 | case Qt::Key_1: |
1880 | case Qt::Key_2: | 1910 | case Qt::Key_2: |
1881 | case Qt::Key_3: | 1911 | case Qt::Key_3: |
1882 | case Qt::Key_4: | 1912 | case Qt::Key_4: |
1883 | case Qt::Key_5: | 1913 | case Qt::Key_5: |
1884 | case Qt::Key_6: | 1914 | case Qt::Key_6: |
1885 | case Qt::Key_7: | 1915 | case Qt::Key_7: |
1886 | case Qt::Key_8: | 1916 | case Qt::Key_8: |
1887 | case Qt::Key_9: | 1917 | case Qt::Key_9: |
1888 | pro = e->key()-48; | 1918 | pro = e->key()-48; |
1889 | if ( pro == 0 ) | 1919 | if ( pro == 0 ) |
1890 | pro = 10; | 1920 | pro = 10; |
1891 | if ( e->state() == Qt::ControlButton) | 1921 | if ( e->state() == Qt::ControlButton) |
1892 | pro += 10; | 1922 | pro += 10; |
1893 | break; | 1923 | break; |
1894 | case Qt::Key_M: | 1924 | case Qt::Key_M: |
1895 | mView->viewManager()->showMonthView(); | 1925 | mView->viewManager()->showMonthView(); |
1896 | showSelectedDates = true; | 1926 | showSelectedDates = true; |
1897 | break; | 1927 | break; |
1898 | case Qt::Key_Insert: | 1928 | case Qt::Key_Insert: |
1899 | mView->newEvent(); | 1929 | mView->newEvent(); |
1900 | break; | 1930 | break; |
1901 | case Qt::Key_S : | 1931 | case Qt::Key_S : |
1902 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) | 1932 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) |
1903 | mView->newSubTodo(); | 1933 | mView->newSubTodo(); |
1904 | else | 1934 | else |
1905 | mView->dialogManager()->showSearchDialog(); | 1935 | mView->dialogManager()->showSearchDialog(); |
1906 | break; | 1936 | break; |
1907 | case Qt::Key_Y : | 1937 | case Qt::Key_Y : |
1908 | case Qt::Key_Z : | 1938 | case Qt::Key_Z : |
1909 | mView->viewManager()->showWorkWeekView(); | 1939 | mView->viewManager()->showWorkWeekView(); |
1910 | showSelectedDates = true; | 1940 | showSelectedDates = true; |
1911 | break; | 1941 | break; |
1912 | case Qt::Key_U : | 1942 | case Qt::Key_U : |
1913 | mView->viewManager()->showWeekView(); | 1943 | mView->viewManager()->showWeekView(); |
1914 | showSelectedDates = true; | 1944 | showSelectedDates = true; |
1915 | break; | 1945 | break; |
1916 | case Qt::Key_H : | 1946 | case Qt::Key_H : |
1917 | keyBindings(); | 1947 | keyBindings(); |
1918 | break; | 1948 | break; |
1919 | case Qt::Key_W: | 1949 | case Qt::Key_W: |
1920 | mView->viewManager()->showWhatsNextView(); | 1950 | mView->viewManager()->showWhatsNextView(); |
1921 | break; | 1951 | break; |
1922 | case Qt::Key_L: | 1952 | case Qt::Key_L: |
1923 | mView->viewManager()->showListView(); | 1953 | mView->viewManager()->showListView(); |
1924 | break; | 1954 | break; |
1925 | case Qt::Key_N: | 1955 | case Qt::Key_N: |
1926 | mView->viewManager()->showNextView(); | 1956 | mView->viewManager()->showNextView(); |
1927 | break; | 1957 | break; |
1928 | case Qt::Key_V: | 1958 | case Qt::Key_V: |
1929 | mView->viewManager()->showTodoView(); | 1959 | mView->viewManager()->showTodoView(); |
1930 | break; | 1960 | break; |
1931 | case Qt::Key_C: | 1961 | case Qt::Key_C: |
1932 | mView->viewManager()->agendaView()->setStartHour( QTime::currentTime ().hour() ); | 1962 | mView->viewManager()->agendaView()->setStartHour( QTime::currentTime ().hour() ); |
1933 | break; | 1963 | break; |
1934 | case Qt::Key_P: | 1964 | case Qt::Key_P: |
1935 | mView->showDatePicker( ); | 1965 | mView->showDatePicker( ); |
1936 | break; | 1966 | break; |
1937 | case Qt::Key_F: | 1967 | case Qt::Key_F: |
1938 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) | 1968 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) |
1939 | mView->editFilters(); | 1969 | mView->editFilters(); |
1940 | else | 1970 | else |
1941 | mView->toggleFilter(); | 1971 | mView->toggleFilter(); |
1942 | break; | 1972 | break; |
1943 | case Qt::Key_X: | 1973 | case Qt::Key_X: |
1944 | if ( e->state() == Qt::ControlButton ) | 1974 | if ( e->state() == Qt::ControlButton ) |
1945 | mView->toggleDateNavigatorWidget(); | 1975 | mView->toggleDateNavigatorWidget(); |
1946 | else { | 1976 | else { |
1947 | mView->viewManager()->showNextXView(); | 1977 | mView->viewManager()->showNextXView(); |
1948 | showSelectedDates = true; | 1978 | showSelectedDates = true; |
1949 | } | 1979 | } |
1950 | break; | 1980 | break; |
1951 | case Qt::Key_Space: | 1981 | case Qt::Key_Space: |
1952 | mView->toggleExpand(); | 1982 | mView->toggleExpand(); |
1953 | break; | 1983 | break; |
1954 | case Qt::Key_A: | 1984 | case Qt::Key_A: |
1955 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton ) | 1985 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton ) |
1956 | mView->showNextAlarms(); | 1986 | mView->showNextAlarms(); |
1957 | else | 1987 | else |
1958 | mView->toggleAllDaySize(); | 1988 | mView->toggleAllDaySize(); |
1959 | break; | 1989 | break; |
1960 | case Qt::Key_T: | 1990 | case Qt::Key_T: |
1961 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) | 1991 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) |
1962 | mView->newTodo(); | 1992 | mView->newTodo(); |
1963 | else { | 1993 | else { |
1964 | mView->goToday(); | 1994 | mView->goToday(); |
1965 | showSelectedDates = true; | 1995 | showSelectedDates = true; |
1966 | } | 1996 | } |
1967 | break; | 1997 | break; |
1968 | case Qt::Key_J: | 1998 | case Qt::Key_J: |
1969 | mView->viewManager()->showJournalView(); | 1999 | mView->viewManager()->showJournalView(); |
1970 | break; | 2000 | break; |
1971 | case Qt::Key_B: | 2001 | case Qt::Key_B: |
1972 | mView->editIncidenceDescription();; | 2002 | mView->editIncidenceDescription();; |
1973 | break; | 2003 | break; |
1974 | // case Qt::Key_Return: | 2004 | // case Qt::Key_Return: |
1975 | case Qt::Key_E: | 2005 | case Qt::Key_E: |
1976 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) | 2006 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) |
1977 | mView->newEvent(); | 2007 | mView->newEvent(); |
1978 | else | 2008 | else |
1979 | mView->editIncidence(); | 2009 | mView->editIncidence(); |
1980 | break; | 2010 | break; |
1981 | case Qt::Key_Plus: | 2011 | case Qt::Key_Plus: |
1982 | size = p->mHourSize +2; | 2012 | size = p->mHourSize +2; |
1983 | if ( size <= 22 ) | 2013 | if ( size <= 22 ) |
1984 | configureAgenda( size ); | 2014 | configureAgenda( size ); |
1985 | break; | 2015 | break; |
1986 | case Qt::Key_Minus: | 2016 | case Qt::Key_Minus: |
1987 | size = p->mHourSize - 2; | 2017 | size = p->mHourSize - 2; |
1988 | if ( size >= 4 ) | 2018 | if ( size >= 4 ) |
1989 | configureAgenda( size ); | 2019 | configureAgenda( size ); |
1990 | break; | 2020 | break; |
1991 | 2021 | ||
1992 | 2022 | ||
1993 | default: | 2023 | default: |
1994 | e->ignore(); | 2024 | e->ignore(); |
1995 | } | 2025 | } |
1996 | if ( pro > 0 ) { | 2026 | if ( pro > 0 ) { |
1997 | mView->selectFilter( pro-1 ); | 2027 | mView->selectFilter( pro-1 ); |
1998 | } | 2028 | } |
1999 | if ( showSelectedDates ) { | 2029 | if ( showSelectedDates ) { |
2000 | ;// setCaptionToDates(); | 2030 | ;// setCaptionToDates(); |
2001 | } | 2031 | } |
2002 | 2032 | ||
2003 | } | 2033 | } |
2004 | void MainWindow::fillFilterMenuTB() | 2034 | void MainWindow::fillFilterMenuTB() |
2005 | { | 2035 | { |
2006 | selectFilterMenuTB->clear(); | 2036 | selectFilterMenuTB->clear(); |
2007 | selectFilterMenuTB->insertItem(i18n ( "Edit Filters" ), 0 ); | 2037 | selectFilterMenuTB->insertItem(i18n ( "Edit Filters" ), 0 ); |
2008 | selectFilterMenuTB->insertSeparator(); | 2038 | selectFilterMenuTB->insertSeparator(); |
2009 | selectFilterMenuTB->insertItem(i18n ( "No Filter" ), 1 ); | 2039 | selectFilterMenuTB->insertItem(i18n ( "No Filter" ), 1 ); |
2010 | 2040 | ||
2011 | selectFilterMenuTB->insertSeparator(); | 2041 | selectFilterMenuTB->insertSeparator(); |
2012 | QPtrList<CalFilter> fili = mView->filters(); | 2042 | QPtrList<CalFilter> fili = mView->filters(); |
2013 | CalFilter *curfilter = mView->filterView()->selectedFilter(); | 2043 | CalFilter *curfilter = mView->filterView()->selectedFilter(); |
2014 | CalFilter *filter = fili.first(); | 2044 | CalFilter *filter = fili.first(); |
2015 | int iii = 2; | 2045 | int iii = 2; |
2016 | bool checkitem = mView->filterView()->filtersEnabled(); | 2046 | bool checkitem = mView->filterView()->filtersEnabled(); |
2017 | while(filter) { | 2047 | while(filter) { |
2018 | selectFilterMenuTB->insertItem( filter->name(), iii ); | 2048 | selectFilterMenuTB->insertItem( filter->name(), iii ); |
2019 | if ( filter == curfilter) | 2049 | if ( filter == curfilter) |
2020 | selectFilterMenuTB->setItemChecked( iii, checkitem ); | 2050 | selectFilterMenuTB->setItemChecked( iii, checkitem ); |
2021 | filter = fili.next(); | 2051 | filter = fili.next(); |
2022 | ++iii; | 2052 | ++iii; |
2023 | } | 2053 | } |
2024 | if ( !checkitem ) | 2054 | if ( !checkitem ) |
2025 | selectFilterMenuTB->setItemChecked( 1, true ); | 2055 | selectFilterMenuTB->setItemChecked( 1, true ); |
2026 | 2056 | ||
2027 | int x = 0; | 2057 | int x = 0; |
2028 | int y = iconToolBar->height(); | 2058 | int y = iconToolBar->height(); |
2029 | int dX = 0; | 2059 | int dX = 0; |
2030 | int dY = 0; | 2060 | int dY = 0; |
2031 | if ( iconToolBar->orientation () == Qt:: Horizontal ) { | 2061 | if ( iconToolBar->orientation () == Qt:: Horizontal ) { |
2032 | if ( iconToolBar->y() > height()/2 ) { | 2062 | if ( iconToolBar->y() > height()/2 ) { |
2033 | dY = selectFilterMenuTB->sizeHint().height()+8; | 2063 | dY = selectFilterMenuTB->sizeHint().height()+8; |
2034 | y = 0; | 2064 | y = 0; |
2035 | } | 2065 | } |
2036 | } else { | 2066 | } else { |
2037 | if ( iconToolBar->x() > width()/2 ) { // right side | 2067 | if ( iconToolBar->x() > width()/2 ) { // right side |
2038 | x=0; | 2068 | x=0; |
2039 | dX= selectFilterMenuTB->sizeHint().width()+8; | 2069 | dX= selectFilterMenuTB->sizeHint().width()+8; |
2040 | y = 0; | 2070 | y = 0; |
2041 | } else { | 2071 | } else { |
2042 | x= iconToolBar->width(); | 2072 | x= iconToolBar->width(); |
2043 | y = 0; | 2073 | y = 0; |
2044 | } | 2074 | } |
2045 | } | 2075 | } |
2046 | //qDebug("dax %d dy %d %d %d ", dX, dY, iconToolBar->x(), iconToolBar->y() ); | 2076 | //qDebug("dax %d dy %d %d %d ", dX, dY, iconToolBar->x(), iconToolBar->y() ); |
2047 | selectFilterMenuTB->popup(iconToolBar->mapToGlobal(QPoint(x,y)-QPoint( dX,dY))); | 2077 | selectFilterMenuTB->popup(iconToolBar->mapToGlobal(QPoint(x,y)-QPoint( dX,dY))); |
2048 | } | 2078 | } |
2049 | void MainWindow::fillFilterMenu() | 2079 | void MainWindow::fillFilterMenu() |
2050 | { | 2080 | { |
2051 | selectFilterMenu->clear(); | 2081 | selectFilterMenu->clear(); |
2052 | selectFilterMenu->insertItem(i18n ( "Edit Filters" ), 0 ); | 2082 | selectFilterMenu->insertItem(i18n ( "Edit Filters" ), 0 ); |
2053 | selectFilterMenu->insertSeparator(); | 2083 | selectFilterMenu->insertSeparator(); |
2054 | selectFilterMenu->insertItem(i18n ( "No Filter" ), 1 ); | 2084 | selectFilterMenu->insertItem(i18n ( "No Filter" ), 1 ); |
2055 | 2085 | ||
2056 | selectFilterMenu->insertSeparator(); | 2086 | selectFilterMenu->insertSeparator(); |
2057 | QPtrList<CalFilter> fili = mView->filters(); | 2087 | QPtrList<CalFilter> fili = mView->filters(); |
2058 | CalFilter *curfilter = mView->filterView()->selectedFilter(); | 2088 | CalFilter *curfilter = mView->filterView()->selectedFilter(); |
2059 | CalFilter *filter = fili.first(); | 2089 | CalFilter *filter = fili.first(); |
2060 | int iii = 2; | 2090 | int iii = 2; |
2061 | bool checkitem = mView->filterView()->filtersEnabled(); | 2091 | bool checkitem = mView->filterView()->filtersEnabled(); |
2062 | while(filter) { | 2092 | while(filter) { |
2063 | selectFilterMenu->insertItem( filter->name(), iii ); | 2093 | selectFilterMenu->insertItem( filter->name(), iii ); |
2064 | if ( filter == curfilter) | 2094 | if ( filter == curfilter) |
2065 | selectFilterMenu->setItemChecked( iii, checkitem ); | 2095 | selectFilterMenu->setItemChecked( iii, checkitem ); |
2066 | filter = fili.next(); | 2096 | filter = fili.next(); |
2067 | ++iii; | 2097 | ++iii; |
2068 | } | 2098 | } |
2069 | if ( !checkitem ) | 2099 | if ( !checkitem ) |
2070 | selectFilterMenu->setItemChecked( 1, true ); | 2100 | selectFilterMenu->setItemChecked( 1, true ); |
2071 | } | 2101 | } |
2072 | void MainWindow::fillFilterMenuPopup() | 2102 | void MainWindow::fillFilterMenuPopup() |
2073 | { | 2103 | { |
2074 | filterPopupMenu->clear(); | 2104 | filterPopupMenu->clear(); |
2075 | filterPopupMenu->insertItem(i18n ( "No Filter" ), 0 ); | 2105 | filterPopupMenu->insertItem(i18n ( "No Filter" ), 0 ); |
2076 | 2106 | ||
2077 | filterPopupMenu->insertSeparator(); | 2107 | filterPopupMenu->insertSeparator(); |
2078 | QPtrList<CalFilter> fili = mView->filters(); | 2108 | QPtrList<CalFilter> fili = mView->filters(); |
2079 | CalFilter *curfilter = mView->filterView()->selectedFilter(); | 2109 | CalFilter *curfilter = mView->filterView()->selectedFilter(); |
2080 | CalFilter *filter = fili.first(); | 2110 | CalFilter *filter = fili.first(); |
2081 | int iii = 1; | 2111 | int iii = 1; |
2082 | bool checkitem = mView->filterView()->filtersEnabled(); | 2112 | bool checkitem = mView->filterView()->filtersEnabled(); |
2083 | while(filter) { | 2113 | while(filter) { |
2084 | filterPopupMenu->insertItem( filter->name(), iii ); | 2114 | filterPopupMenu->insertItem( filter->name(), iii ); |
2085 | if ( filter == curfilter) | 2115 | if ( filter == curfilter) |
2086 | filterPopupMenu->setItemChecked( iii, checkitem ); | 2116 | filterPopupMenu->setItemChecked( iii, checkitem ); |
2087 | filter = fili.next(); | 2117 | filter = fili.next(); |
2088 | ++iii; | 2118 | ++iii; |
2089 | } | 2119 | } |
2090 | if ( !checkitem ) | 2120 | if ( !checkitem ) |
2091 | filterPopupMenu->setItemChecked( 0, true ); | 2121 | filterPopupMenu->setItemChecked( 0, true ); |
2092 | } | 2122 | } |
2093 | void MainWindow::selectFilter( int fil ) | 2123 | void MainWindow::selectFilter( int fil ) |
2094 | { | 2124 | { |
2095 | 2125 | ||
2096 | if ( fil == 0 ) { | 2126 | if ( fil == 0 ) { |
2097 | mView->editFilters( ); | 2127 | mView->editFilters( ); |
2098 | } else if ( fil == 1 ){ | 2128 | } else if ( fil == 1 ){ |
2099 | if ( mView->filterView()->filtersEnabled() ) | 2129 | if ( mView->filterView()->filtersEnabled() ) |
2100 | mView->toggleFilerEnabled( ); | 2130 | mView->toggleFilerEnabled( ); |
2101 | } else { | 2131 | } else { |
2102 | if ( !mView->filterView()->filtersEnabled() ) { | 2132 | if ( !mView->filterView()->filtersEnabled() ) { |
2103 | mView->filterView()->blockSignals( true ); | 2133 | mView->filterView()->blockSignals( true ); |
2104 | mView->toggleFilerEnabled( ); | 2134 | mView->toggleFilerEnabled( ); |
2105 | mView->filterView()->blockSignals( false ); | 2135 | mView->filterView()->blockSignals( false ); |
2106 | } | 2136 | } |
2107 | mView->selectFilter( fil-2 ); | 2137 | mView->selectFilter( fil-2 ); |
2108 | } | 2138 | } |
2109 | } | 2139 | } |
2110 | void MainWindow::updateFilterToolbar() | 2140 | void MainWindow::updateFilterToolbar() |
2111 | { | 2141 | { |
2112 | if ( filterMenubar ) { | 2142 | if ( filterMenubar ) { |
2113 | if ( !mView->filterView()->filtersEnabled() ) { | 2143 | if ( !mView->filterView()->filtersEnabled() ) { |
2114 | filterMenubar->changeItem( 0, i18n("No Filter") ); | 2144 | filterMenubar->changeItem( 0, i18n("No Filter") ); |
2115 | } else { | 2145 | } else { |
2116 | CalFilter *curfilter = mView->filterView()->selectedFilter(); | 2146 | CalFilter *curfilter = mView->filterView()->selectedFilter(); |
2117 | if ( curfilter ) { | 2147 | if ( curfilter ) { |
2118 | filterMenubar->changeItem( 0, curfilter->name() ); | 2148 | filterMenubar->changeItem( 0, curfilter->name() ); |
2119 | } | 2149 | } |
2120 | } | 2150 | } |
2121 | } | 2151 | } |
2122 | } | 2152 | } |
2123 | void MainWindow::selectFilterPopup( int fil ) | 2153 | void MainWindow::selectFilterPopup( int fil ) |
2124 | { | 2154 | { |
2125 | selectFilter( fil + 1 ); | 2155 | selectFilter( fil + 1 ); |
2126 | 2156 | ||
2127 | } | 2157 | } |
2128 | void MainWindow::configureToolBar( int item ) | 2158 | void MainWindow::configureToolBar( int item ) |
2129 | { | 2159 | { |
2130 | 2160 | ||
2131 | configureToolBarMenu->setItemChecked( item, !configureToolBarMenu-> isItemChecked ( item ) ); | 2161 | configureToolBarMenu->setItemChecked( item, !configureToolBarMenu-> isItemChecked ( item ) ); |
2132 | KOPrefs *p = KOPrefs::instance(); | 2162 | KOPrefs *p = KOPrefs::instance(); |
2133 | p-> mShowIconStretch= configureToolBarMenu->isItemChecked( 5 ); | 2163 | p-> mShowIconStretch= configureToolBarMenu->isItemChecked( 5 ); |
2134 | p-> mShowIconOnetoolbar = configureToolBarMenu->isItemChecked( 6 ); | 2164 | p-> mShowIconOnetoolbar = configureToolBarMenu->isItemChecked( 6 ); |
2135 | p-> mShowIconFilter = configureToolBarMenu->isItemChecked( 7 ); | 2165 | p-> mShowIconFilter = configureToolBarMenu->isItemChecked( 7 ); |
2136 | p-> mShowIconNewEvent= configureToolBarMenu->isItemChecked( 10 ); | 2166 | p-> mShowIconNewEvent= configureToolBarMenu->isItemChecked( 10 ); |
2137 | p->mShowIconNewTodo = configureToolBarMenu->isItemChecked( 20 ); | 2167 | p->mShowIconNewTodo = configureToolBarMenu->isItemChecked( 20 ); |
2138 | p->mShowIconNavigator = configureToolBarMenu->isItemChecked( 22 ); | 2168 | p->mShowIconNavigator = configureToolBarMenu->isItemChecked( 22 ); |
2139 | p->mShowIconAllday = configureToolBarMenu->isItemChecked( 24 ); | 2169 | p->mShowIconAllday = configureToolBarMenu->isItemChecked( 24 ); |
2140 | p->mShowIconFilterview = configureToolBarMenu->isItemChecked( 26 ); | 2170 | p->mShowIconFilterview = configureToolBarMenu->isItemChecked( 26 ); |
2141 | p->mShowIconToggleFull = configureToolBarMenu->isItemChecked( 28 ); | 2171 | p->mShowIconToggleFull = configureToolBarMenu->isItemChecked( 28 ); |
2142 | p-> mShowIconSearch= configureToolBarMenu->isItemChecked( 120 ); | 2172 | p-> mShowIconSearch= configureToolBarMenu->isItemChecked( 120 ); |
2143 | p-> mShowIconList= configureToolBarMenu->isItemChecked( 30 ); | 2173 | p-> mShowIconList= configureToolBarMenu->isItemChecked( 30 ); |
2144 | p-> mShowIconDay1= configureToolBarMenu->isItemChecked( 40 ); | 2174 | p-> mShowIconDay1= configureToolBarMenu->isItemChecked( 40 ); |
2145 | p-> mShowIconDay5= configureToolBarMenu->isItemChecked( 50 ); | 2175 | p-> mShowIconDay5= configureToolBarMenu->isItemChecked( 50 ); |
2146 | p-> mShowIconDay6= configureToolBarMenu->isItemChecked( 75 ); | 2176 | p-> mShowIconDay6= configureToolBarMenu->isItemChecked( 75 ); |
2147 | p-> mShowIconDay7= configureToolBarMenu->isItemChecked( 60 ); | 2177 | p-> mShowIconDay7= configureToolBarMenu->isItemChecked( 60 ); |
2148 | p-> mShowIconMonth= configureToolBarMenu->isItemChecked( 70 ); | 2178 | p-> mShowIconMonth= configureToolBarMenu->isItemChecked( 70 ); |
2149 | p-> mShowIconTodoview= configureToolBarMenu->isItemChecked( 80 ); | 2179 | p-> mShowIconTodoview= configureToolBarMenu->isItemChecked( 80 ); |
2150 | p-> mShowIconBackFast= configureToolBarMenu->isItemChecked( 200 ); | 2180 | p-> mShowIconBackFast= configureToolBarMenu->isItemChecked( 200 ); |
2151 | p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 ); | 2181 | p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 ); |
2152 | p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 ); | 2182 | p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 ); |
2153 | p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 ); | 2183 | p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 ); |
2154 | p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 ); | 2184 | p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 ); |
2155 | p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 ); | 2185 | p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 ); |
2156 | p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 ); | 2186 | p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 ); |
2157 | p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 ); | 2187 | p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 ); |
2158 | p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 ); | 2188 | p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 ); |
2159 | p-> mShowIconWeekNum= configureToolBarMenu->isItemChecked( 400 ); | 2189 | p-> mShowIconWeekNum= configureToolBarMenu->isItemChecked( 400 ); |
2160 | // initActions(); | 2190 | // initActions(); |
2161 | } | 2191 | } |
2162 | void MainWindow::setCaption ( const QString & c ) | 2192 | void MainWindow::setCaption ( const QString & c ) |
2163 | { | 2193 | { |
2164 | QString cap = c; | 2194 | QString cap = c; |
2165 | cap.replace( QRegExp("\n"), " " ); | 2195 | cap.replace( QRegExp("\n"), " " ); |
2166 | cap = cap.stripWhiteSpace(); | 2196 | cap = cap.stripWhiteSpace(); |
2167 | if ( cap.isEmpty() ) | 2197 | if ( cap.isEmpty() ) |
2168 | cap = "KO/Pi"; | 2198 | cap = "KO/Pi"; |
2169 | QWidget::setCaption( cap ); | 2199 | QWidget::setCaption( cap ); |
2170 | } | 2200 | } |
2171 | void MainWindow::setCaptionToDates() | 2201 | void MainWindow::setCaptionToDates() |
2172 | { | 2202 | { |
2173 | QString selDates; | 2203 | QString selDates; |
2174 | QDate date = mView->startDate(); | 2204 | QDate date = mView->startDate(); |
2175 | if ( ! date.isValid() ) { | 2205 | if ( ! date.isValid() ) { |
2176 | setCaption(""); | 2206 | setCaption(""); |
2177 | return; | 2207 | return; |
2178 | } | 2208 | } |
2179 | selDates = KGlobal::locale()->formatDate( date, true); | 2209 | selDates = KGlobal::locale()->formatDate( date, true); |
2180 | if (mView->startDate() < mView->endDate() ) | 2210 | if (mView->startDate() < mView->endDate() ) |
2181 | selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true); | 2211 | selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true); |
2182 | else { | 2212 | else { |
2183 | QString addString; | 2213 | QString addString; |
2184 | if ( date == QDateTime::currentDateTime().date() ) | 2214 | if ( date == QDateTime::currentDateTime().date() ) |
2185 | addString = i18n("Today"); | 2215 | addString = i18n("Today"); |
2186 | else if ( date == QDateTime::currentDateTime().date().addDays(1) ) | 2216 | else if ( date == QDateTime::currentDateTime().date().addDays(1) ) |
2187 | addString = i18n("Tomorrow"); | 2217 | addString = i18n("Tomorrow"); |
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp index fbfbc45..93538ec 100644 --- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp +++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp | |||
@@ -1,947 +1,963 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KdePim/Pi. | 2 | This file is part of KdePim/Pi. |
3 | Copyright (c) 2004 Ulf Schenk | 3 | Copyright (c) 2004 Ulf Schenk |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | /* | 24 | /* |
25 | Enhanced Version of the file for platform independent KDE tools. | 25 | Enhanced Version of the file for platform independent KDE tools. |
26 | Copyright (c) 2004 Ulf Schenk | 26 | Copyright (c) 2004 Ulf Schenk |
27 | 27 | ||
28 | $Id$ | 28 | $Id$ |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <qlayout.h> | 31 | #include <qlayout.h> |
32 | #include <qtabwidget.h> | 32 | #include <qtabwidget.h> |
33 | #include <qcombobox.h> | 33 | #include <qcombobox.h> |
34 | #include <qgroupbox.h> | 34 | #include <qgroupbox.h> |
35 | #include <qlabel.h> | 35 | #include <qlabel.h> |
36 | #include <qlineedit.h> | 36 | #include <qlineedit.h> |
37 | #include <qbuttongroup.h> | 37 | #include <qbuttongroup.h> |
38 | #include <qcheckbox.h> | 38 | #include <qcheckbox.h> |
39 | #include <qfile.h> | 39 | #include <qfile.h> |
40 | #include <qvbox.h> | 40 | #include <qvbox.h> |
41 | #include <qdir.h> | 41 | #include <qdir.h> |
42 | #include <qregexp.h> | 42 | #include <qregexp.h> |
43 | #include <qspinbox.h> | 43 | #include <qspinbox.h> |
44 | 44 | ||
45 | #include <kdialog.h> | 45 | #include <kdialog.h> |
46 | #include <kprefsdialog.h> | 46 | #include <kprefsdialog.h> |
47 | #include <klocale.h> | 47 | #include <klocale.h> |
48 | #include <kglobalsettings.h> | 48 | #include <kglobalsettings.h> |
49 | #include <kdateedit.h> | 49 | #include <kdateedit.h> |
50 | #include <kglobal.h> | 50 | #include <kglobal.h> |
51 | #include <stdlib.h> | 51 | #include <stdlib.h> |
52 | 52 | ||
53 | /*US | 53 | /*US |
54 | #include <qcheckbox.h> | 54 | #include <qcheckbox.h> |
55 | #include <qframe.h> | 55 | #include <qframe.h> |
56 | #include <qpushbutton.h> | 56 | #include <qpushbutton.h> |
57 | #include <qcombobox.h> | 57 | #include <qcombobox.h> |
58 | #include <qlineedit.h> | 58 | #include <qlineedit.h> |
59 | #include <qlabel.h> | 59 | #include <qlabel.h> |
60 | #include <qfile.h> | 60 | #include <qfile.h> |
61 | 61 | ||
62 | #include <kconfig.h> | 62 | #include <kconfig.h> |
63 | #include <kdebug.h> | 63 | #include <kdebug.h> |
64 | #include <kdialog.h> | 64 | #include <kdialog.h> |
65 | #include <klistview.h> | 65 | #include <klistview.h> |
66 | #include <klocale.h> | 66 | #include <klocale.h> |
67 | #include <kglobal.h> | 67 | #include <kglobal.h> |
68 | #include <kmessagebox.h> | 68 | #include <kmessagebox.h> |
69 | #include <kstandarddirs.h> | 69 | #include <kstandarddirs.h> |
70 | 70 | ||
71 | #ifndef KAB_EMBEDDED | 71 | #ifndef KAB_EMBEDDED |
72 | #include <ktrader.h> | 72 | #include <ktrader.h> |
73 | #else // KAB_EMBEDDED | 73 | #else // KAB_EMBEDDED |
74 | #include <mergewidget.h> | 74 | #include <mergewidget.h> |
75 | #include <distributionlistwidget.h> | 75 | #include <distributionlistwidget.h> |
76 | #endif // KAB_EMBEDDED | 76 | #endif // KAB_EMBEDDED |
77 | 77 | ||
78 | #include "addresseewidget.h" | 78 | #include "addresseewidget.h" |
79 | #include "extensionconfigdialog.h" | 79 | #include "extensionconfigdialog.h" |
80 | #include "extensionwidget.h" | 80 | #include "extensionwidget.h" |
81 | */ | 81 | */ |
82 | 82 | ||
83 | #include "qapplication.h" | 83 | #include "qapplication.h" |
84 | 84 | ||
85 | #include "kpimglobalprefs.h" | 85 | #include "kpimglobalprefs.h" |
86 | 86 | ||
87 | #include "kdepimconfigwidget.h" | 87 | #include "kdepimconfigwidget.h" |
88 | #include <kprefs.h> | 88 | #include <kprefs.h> |
89 | #include <kmessagebox.h> | 89 | #include <kmessagebox.h> |
90 | 90 | ||
91 | 91 | ||
92 | KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, const char *name ) | 92 | KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, const char *name ) |
93 | : KPrefsWidget(prefs, parent, name ) | 93 | : KPrefsWidget(prefs, parent, name ) |
94 | { | 94 | { |
95 | mExternalAppsMap.insert(ExternalAppHandler::EMAIL, i18n("Email")); | 95 | mExternalAppsMap.insert(ExternalAppHandler::EMAIL, i18n("Email")); |
96 | mExternalAppsMap.insert(ExternalAppHandler::PHONE, i18n("Phone")); | 96 | mExternalAppsMap.insert(ExternalAppHandler::PHONE, i18n("Phone")); |
97 | mExternalAppsMap.insert(ExternalAppHandler::SMS, i18n("SMS")); | 97 | mExternalAppsMap.insert(ExternalAppHandler::SMS, i18n("SMS")); |
98 | mExternalAppsMap.insert(ExternalAppHandler::FAX, i18n("Fax")); | 98 | mExternalAppsMap.insert(ExternalAppHandler::FAX, i18n("Fax")); |
99 | mExternalAppsMap.insert(ExternalAppHandler::PAGER, i18n("Pager")); | 99 | mExternalAppsMap.insert(ExternalAppHandler::PAGER, i18n("Pager")); |
100 | mExternalAppsMap.insert(ExternalAppHandler::SIP, i18n("SIP")); | 100 | mExternalAppsMap.insert(ExternalAppHandler::SIP, i18n("SIP")); |
101 | 101 | ||
102 | 102 | ||
103 | QVBoxLayout *topLayout = new QVBoxLayout( this, 0, | 103 | QVBoxLayout *topLayout = new QVBoxLayout( this, 0, |
104 | KDialog::spacingHint() ); | 104 | KDialog::spacingHint() ); |
105 | 105 | ||
106 | tabWidget = new QTabWidget( this ); | 106 | tabWidget = new QTabWidget( this ); |
107 | topLayout->addWidget( tabWidget ); | 107 | topLayout->addWidget( tabWidget ); |
108 | 108 | ||
109 | 109 | ||
110 | setupLocaleTab(); | 110 | setupLocaleTab(); |
111 | setupLocaleDateTab(); | 111 | setupLocaleDateTab(); |
112 | setupTimeZoneTab(); | 112 | setupTimeZoneTab(); |
113 | setupExternalAppTab(); | 113 | setupExternalAppTab(); |
114 | setupStoreTab(); | 114 | setupStoreTab(); |
115 | setupBackupTab(); | 115 | setupBackupTab(); |
116 | } | 116 | } |
117 | void KDEPIMConfigWidget::showTimeZoneTab() | 117 | void KDEPIMConfigWidget::showTimeZoneTab() |
118 | { | 118 | { |
119 | tabWidget->setCurrentPage ( 3 ) ; | 119 | tabWidget->setCurrentPage ( 3 ) ; |
120 | } | 120 | } |
121 | void KDEPIMConfigWidget::setupBackupTab() | 121 | void KDEPIMConfigWidget::setupBackupTab() |
122 | { | 122 | { |
123 | QVBox *colorPage = new QVBox( this ); | 123 | QVBox *colorPage = new QVBox( this ); |
124 | tabWidget->addTab( colorPage, i18n( "Backup" ) ); | 124 | tabWidget->addTab( colorPage, i18n( "Backup" ) ); |
125 | QWidget* topFrame = new QWidget( colorPage ); | 125 | QWidget* topFrame = new QWidget( colorPage ); |
126 | QVBoxLayout *topLayout = new QVBoxLayout(topFrame); | 126 | QVBoxLayout *topLayout = new QVBoxLayout(topFrame); |
127 | KPrefsWidBool *sb = addWidBool(i18n("Backup enabled"), | 127 | KPrefsWidBool *sb = addWidBool(i18n("Backup enabled"), |
128 | &(KPimGlobalPrefs::instance()->mBackupEnabled),topFrame); | 128 | &(KPimGlobalPrefs::instance()->mBackupEnabled),topFrame); |
129 | topLayout->addWidget((QWidget*)sb->checkBox()); | 129 | topLayout->addWidget((QWidget*)sb->checkBox()); |
130 | QWidget* bupFrame = new QWidget( topFrame ); | 130 | QWidget* bupFrame = new QWidget( topFrame ); |
131 | topLayout->addWidget((bupFrame)); | 131 | topLayout->addWidget((bupFrame)); |
132 | QObject::connect ( sb->checkBox(), SIGNAL (toggled ( bool ) ), bupFrame, SLOT ( setEnabled( bool ) ) ); | 132 | QObject::connect ( sb->checkBox(), SIGNAL (toggled ( bool ) ), bupFrame, SLOT ( setEnabled( bool ) ) ); |
133 | QVBoxLayout *bupLayout = new QVBoxLayout(bupFrame); | 133 | QVBoxLayout *bupLayout = new QVBoxLayout(bupFrame); |
134 | sb = addWidBool(i18n("Use standard backup dir"), | 134 | sb = addWidBool(i18n("Use standard backup dir"), |
135 | &(KPimGlobalPrefs::instance()->mBackupEnabled),bupFrame); | 135 | &(KPimGlobalPrefs::instance()->mBackupUseDefaultDir),bupFrame); |
136 | bupLayout->addWidget((QWidget*)sb->checkBox()); | 136 | bupLayout->addWidget((QWidget*)sb->checkBox()); |
137 | mBackupUrl = new KURLRequester( bupFrame ); | 137 | mBackupUrl = new KURLRequester( bupFrame ); |
138 | mBackupUrl->setURL( KGlobalSettings::backupDataDir() ); | 138 | mBackupUrl->setURL( KGlobalSettings::backupDataDir() ); |
139 | QObject::connect ( sb->checkBox(), SIGNAL (toggled ( bool ) ), mBackupUrl ,SLOT ( setDisabled( bool ) ) ); | 139 | QObject::connect ( sb->checkBox(), SIGNAL (toggled ( bool ) ), mBackupUrl ,SLOT ( setDisabled( bool ) ) ); |
140 | bupLayout->addWidget( mBackupUrl ); | 140 | bupLayout->addWidget( mBackupUrl ); |
141 | 141 | ||
142 | 142 | mBackupUrl->setEnabled( !KPimGlobalPrefs::instance()->mBackupUseDefaultDir ); | |
143 | bupFrame->setEnabled( KPimGlobalPrefs::instance()->mBackupEnabled ); | ||
143 | QHBox *dummy = new QHBox(bupFrame); | 144 | QHBox *dummy = new QHBox(bupFrame); |
144 | new QLabel(i18n("Number of Backups:"),dummy); | 145 | new QLabel(i18n("Number of Backups:"),dummy); |
145 | mBackupNumbersSpin = new QSpinBox(1,21,1,dummy); | 146 | mBackupNumbersSpin = new QSpinBox(1,21,1,dummy); |
146 | new QLabel(i18n(" "),dummy); | 147 | new QLabel(i18n(" "),dummy); |
147 | bupLayout->addWidget( dummy ); | 148 | bupLayout->addWidget( dummy ); |
148 | 149 | ||
149 | dummy = new QHBox(bupFrame); | 150 | dummy = new QHBox(bupFrame); |
150 | new QLabel(i18n("Make backup every "),dummy); | 151 | new QLabel(i18n("Make backup every "),dummy); |
151 | mBackupDayCountSpin = new QSpinBox(1,28,1,dummy); | 152 | mBackupDayCountSpin = new QSpinBox(1,28,1,dummy); |
152 | new QLabel(i18n(" days"),dummy); | 153 | new QLabel(i18n(" days"),dummy); |
153 | new QLabel(i18n(" "),dummy); | 154 | new QLabel(i18n(" "),dummy); |
154 | bupLayout->addWidget( dummy ); | 155 | bupLayout->addWidget( dummy ); |
156 | QString localKdeDir; | ||
157 | localKdeDir = readEnvPath("LOCALMICROKDEHOME"); | ||
158 | if ( ! localKdeDir.isEmpty() ) { | ||
159 | sb->checkBox()->setEnabled( false ); | ||
160 | sb->checkBox()->setChecked( true ); | ||
161 | mBackupUrl->setEnabled( false ); | ||
162 | KPimGlobalPrefs::instance()->mBackupUseDefaultDir = true; | ||
163 | } | ||
155 | 164 | ||
156 | } | 165 | } |
157 | void KDEPIMConfigWidget::setupStoreTab() | 166 | void KDEPIMConfigWidget::setupStoreTab() |
158 | { | 167 | { |
159 | QVBox *colorPage = new QVBox( this ); | 168 | QVBox *colorPage = new QVBox( this ); |
160 | tabWidget->addTab( colorPage, i18n( "Colors" ) ); | 169 | tabWidget->addTab( colorPage, i18n( "Colors" ) ); |
161 | QWidget* cw = new QWidget( colorPage ); | 170 | QWidget* cw = new QWidget( colorPage ); |
162 | KPrefsWidColor *holidayColor = | 171 | KPrefsWidColor *holidayColor = |
163 | addWidColor(i18n("Alternating background of list views"), | 172 | addWidColor(i18n("Alternating background of list views"), |
164 | &(KPimGlobalPrefs::instance()->mAlternateColor),cw); | 173 | &(KPimGlobalPrefs::instance()->mAlternateColor),cw); |
165 | QHBoxLayout *topLayout = new QHBoxLayout(cw); | 174 | QHBoxLayout *topLayout = new QHBoxLayout(cw); |
166 | topLayout->addWidget(holidayColor->label()); | 175 | topLayout->addWidget(holidayColor->label()); |
167 | topLayout->addWidget( (QWidget* )holidayColor->button()); | 176 | topLayout->addWidget( (QWidget* )holidayColor->button()); |
168 | 177 | ||
169 | 178 | ||
170 | QVBox *storePage = new QVBox( this ); | 179 | QVBox *storePage = new QVBox( this ); |
171 | new QLabel( i18n("Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail").arg(KGlobal::dirs()->localkdedir()), storePage ); | 180 | new QLabel( i18n("Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail").arg(KGlobal::dirs()->localkdedir()), storePage ); |
172 | new QLabel( i18n("<b>New data storage dir:</b>"), storePage ); | 181 | new QLabel( i18n("<b>New data storage dir:</b>"), storePage ); |
173 | mStoreUrl = new KURLRequester( storePage ); | 182 | mStoreUrl = new KURLRequester( storePage ); |
174 | mStoreUrl->setURL( KGlobal::dirs()->localkdedir() ); | 183 | mStoreUrl->setURL( KGlobal::dirs()->localkdedir() ); |
175 | #ifdef DESKTOP_VERSION | 184 | #ifdef DESKTOP_VERSION |
176 | QString confFile = qApp->applicationDirPath ()+ "/.microkdehome" ; | 185 | QString confFile = qApp->applicationDirPath ()+ "/.microkdehome" ; |
177 | QFileInfo fi ( confFile ); | 186 | QFileInfo fi ( confFile ); |
178 | if ( fi.exists() ) { | 187 | if ( fi.exists() ) { |
179 | KConfig cfg ( confFile ); | 188 | KConfig cfg ( confFile ); |
180 | cfg.setGroup("Global"); | 189 | cfg.setGroup("Global"); |
181 | QString localKdeDir = cfg.readEntry( "MICROKDEHOME", "x_x_x" ); | 190 | QString localKdeDir = cfg.readEntry( "MICROKDEHOME", "x_x_x" ); |
182 | if ( localKdeDir != "x_x_x" ) { | 191 | if ( localKdeDir != "x_x_x" ) { |
183 | mStoreUrl->setURL( localKdeDir ); | 192 | mStoreUrl->setURL( localKdeDir ); |
184 | qDebug("Reading config from %s ", confFile.latin1()); | 193 | qDebug("Reading config from %s ", confFile.latin1()); |
185 | } | 194 | } |
186 | } | 195 | } |
187 | 196 | ||
188 | #endif | 197 | #endif |
189 | new QLabel( i18n("New dirs are created automatically"), storePage ); | 198 | new QLabel( i18n("New dirs are created automatically"), storePage ); |
190 | QHBox *bb = new QHBox( storePage ); | 199 | QHBox *bb = new QHBox( storePage ); |
191 | QPushButton * pb; | 200 | QPushButton * pb; |
192 | if ( QApplication::desktop()->width() < 640 ) | 201 | if ( QApplication::desktop()->width() < 640 ) |
193 | pb = new QPushButton ( i18n("Save"), bb ); | 202 | pb = new QPushButton ( i18n("Save"), bb ); |
194 | else | 203 | else |
195 | pb = new QPushButton ( i18n("Save settings"), bb ); | 204 | pb = new QPushButton ( i18n("Save settings"), bb ); |
196 | connect(pb, SIGNAL( clicked() ), this, SLOT ( saveStoreSettings() ) ); | 205 | connect(pb, SIGNAL( clicked() ), this, SLOT ( saveStoreSettings() ) ); |
197 | pb = new QPushButton ( i18n("Save standard"), bb ); | 206 | pb = new QPushButton ( i18n("Save standard"), bb ); |
198 | connect(pb, SIGNAL( clicked() ), this, SLOT ( setStandardStore() ) ); | 207 | connect(pb, SIGNAL( clicked() ), this, SLOT ( setStandardStore() ) ); |
199 | #ifdef DESKTOP_VERSION | 208 | #ifdef DESKTOP_VERSION |
200 | pb = new QPushButton ( i18n("Save using LOCAL storage"), bb ); | 209 | pb = new QPushButton ( i18n("Save using LOCAL storage"), bb ); |
201 | connect(pb, SIGNAL( clicked() ), this, SLOT ( setLocalStore() ) ); | 210 | connect(pb, SIGNAL( clicked() ), this, SLOT ( setLocalStore() ) ); |
202 | #endif | 211 | #endif |
203 | new QLabel( i18n("<b>New settings are used\nafter a restart</b>"), storePage ); | 212 | new QLabel( i18n("<b>New settings are used\nafter a restart</b>"), storePage ); |
204 | new QLabel( i18n("Settings are stored in\n%1").arg(QDir::homeDirPath() + "/.microkdehome" ), storePage ); | 213 | new QLabel( i18n("Settings are stored in\n%1").arg(QDir::homeDirPath() + "/.microkdehome" ), storePage ); |
205 | tabWidget->addTab( storePage, i18n( "Data storage path" ) ); | 214 | tabWidget->addTab( storePage, i18n( "Data storage path" ) ); |
206 | } | 215 | } |
207 | void KDEPIMConfigWidget::setLocalStore() | 216 | void KDEPIMConfigWidget::setLocalStore() |
208 | { | 217 | { |
209 | mStoreUrl->setURL( "LOCAL:kdepimpi" ); | 218 | mStoreUrl->setURL( "LOCAL:kdepimpi" ); |
210 | saveStoreSettings(); | 219 | saveStoreSettings(); |
211 | QString message = i18n("'LOCAL' mode makes is possible to run\nKA/Pi and KO/Pi from a USB memory stick.\nIn LOCAL mode the data is stored\nin a path relative to the executable.\nNote, that in LOCAL mode only addressbook\nresource files in\n <path of the executable>/<dirname after LOCAL:>/apps/kabc/*.vcf\n are supported.\nIf you use the standard addressbook settings\nyou do not have to reconfigure any path,\njust restart the application and import\nyour addressbook and calendar data."); | 220 | QString message = i18n("'LOCAL' mode makes is possible to run\nKA/Pi and KO/Pi from a USB memory stick.\nIn LOCAL mode the data is stored\nin a path relative to the executable.\nNote, that in LOCAL mode only addressbook\nresource files in\n <path of the executable>/<dirname after LOCAL:>/apps/kabc/*.vcf\n are supported.\nIf you use the standard addressbook settings\nyou do not have to reconfigure any path,\njust restart the application and import\nyour addressbook and calendar data."); |
212 | KMessageBox::information( this, message); | 221 | KMessageBox::information( this, message); |
213 | } | 222 | } |
214 | void KDEPIMConfigWidget::setStandardStore() | 223 | void KDEPIMConfigWidget::setStandardStore() |
215 | { | 224 | { |
216 | mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" ); | 225 | mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" ); |
217 | saveStoreSettings(); | 226 | saveStoreSettings(); |
218 | } | 227 | } |
219 | void KDEPIMConfigWidget::saveStoreSettings() | 228 | void KDEPIMConfigWidget::saveStoreSettings() |
220 | { | 229 | { |
221 | if ( !mStoreUrl->url().isEmpty() ) { | 230 | if ( !mStoreUrl->url().isEmpty() ) { |
222 | QString path = QDir::homeDirPath(); | 231 | QString path = QDir::homeDirPath(); |
223 | QString url = mStoreUrl->url(); | 232 | QString url = mStoreUrl->url(); |
224 | #ifdef DESKTOP_VERSION | 233 | #ifdef DESKTOP_VERSION |
225 | if ( url.startsWith( "LOCAL:" ) ) { | 234 | if ( url.startsWith( "LOCAL:" ) ) { |
226 | path = qApp->applicationDirPath () ; | 235 | path = qApp->applicationDirPath () ; |
227 | } | 236 | } |
228 | #endif | 237 | #endif |
229 | KConfig cfg ( path + "/.microkdehome" ); | 238 | KConfig cfg ( path + "/.microkdehome" ); |
230 | cfg.setGroup("Global"); | 239 | cfg.setGroup("Global"); |
231 | cfg.writeEntry( "MICROKDEHOME", url ); | 240 | cfg.writeEntry( "MICROKDEHOME", url ); |
232 | qDebug("cfg.writeEntry( MICROKDEHOME, %s ", url.latin1()); | 241 | qDebug("cfg.writeEntry( MICROKDEHOME, %s ", url.latin1()); |
233 | cfg.sync(); | 242 | cfg.sync(); |
234 | } else { | 243 | } else { |
235 | mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" ); | 244 | mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" ); |
236 | saveStoreSettings(); | 245 | saveStoreSettings(); |
237 | } | 246 | } |
238 | } | 247 | } |
239 | void KDEPIMConfigWidget::setupExternalAppTab() | 248 | void KDEPIMConfigWidget::setupExternalAppTab() |
240 | { | 249 | { |
241 | QWidget *externalAppsPage = new QWidget( this ); | 250 | QWidget *externalAppsPage = new QWidget( this ); |
242 | QVBoxLayout* layout = new QVBoxLayout( externalAppsPage, KDialog::marginHintSmall(), | 251 | QVBoxLayout* layout = new QVBoxLayout( externalAppsPage, KDialog::marginHintSmall(), |
243 | KDialog::spacingHintSmall() ); | 252 | KDialog::spacingHintSmall() ); |
244 | 253 | ||
245 | mExternalApps = new QComboBox( externalAppsPage ); | 254 | mExternalApps = new QComboBox( externalAppsPage ); |
246 | 255 | ||
247 | QMap<ExternalAppHandler::Types, QString>::Iterator it; | 256 | QMap<ExternalAppHandler::Types, QString>::Iterator it; |
248 | for( it = mExternalAppsMap.begin(); it != mExternalAppsMap.end(); ++it ) | 257 | for( it = mExternalAppsMap.begin(); it != mExternalAppsMap.end(); ++it ) |
249 | mExternalApps->insertItem( it.data(), it.key() ); | 258 | mExternalApps->insertItem( it.data(), it.key() ); |
250 | 259 | ||
251 | layout->addWidget( mExternalApps ); | 260 | layout->addWidget( mExternalApps ); |
252 | 261 | ||
253 | connect( mExternalApps, SIGNAL( activated( int ) ), | 262 | connect( mExternalApps, SIGNAL( activated( int ) ), |
254 | this, SLOT (externalapp_changed( int ) ) ); | 263 | this, SLOT (externalapp_changed( int ) ) ); |
255 | 264 | ||
256 | 265 | ||
257 | mExternalAppGroupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Used Mail Client" ), externalAppsPage ); | 266 | mExternalAppGroupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Used Mail Client" ), externalAppsPage ); |
258 | QGridLayout *boxLayout = new QGridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" ); | 267 | QGridLayout *boxLayout = new QGridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" ); |
259 | mExternalAppGroupBox->layout()->setMargin(4); | 268 | mExternalAppGroupBox->layout()->setMargin(4); |
260 | 269 | ||
261 | mClient = new QComboBox( mExternalAppGroupBox ); | 270 | mClient = new QComboBox( mExternalAppGroupBox ); |
262 | boxLayout->addMultiCellWidget( mClient, 0, 0, 0, 1 ); | 271 | boxLayout->addMultiCellWidget( mClient, 0, 0, 0, 1 ); |
263 | 272 | ||
264 | connect( mClient, SIGNAL( activated( int ) ), | 273 | connect( mClient, SIGNAL( activated( int ) ), |
265 | this, SLOT (client_changed( int ) ) ); | 274 | this, SLOT (client_changed( int ) ) ); |
266 | 275 | ||
267 | QLabel* lab = new QLabel( i18n("Channel:"), mExternalAppGroupBox); | 276 | QLabel* lab = new QLabel( i18n("Channel:"), mExternalAppGroupBox); |
268 | boxLayout->addWidget( lab, 1, 0 ); | 277 | boxLayout->addWidget( lab, 1, 0 ); |
269 | mChannel = new QLineEdit(mExternalAppGroupBox); | 278 | mChannel = new QLineEdit(mExternalAppGroupBox); |
270 | mChannel->setReadOnly(true); | 279 | mChannel->setReadOnly(true); |
271 | boxLayout->addMultiCellWidget( mChannel, 2 , 2, 0, 1 ); | 280 | boxLayout->addMultiCellWidget( mChannel, 2 , 2, 0, 1 ); |
272 | 281 | ||
273 | lab = new QLabel( i18n("Message:"), mExternalAppGroupBox); | 282 | lab = new QLabel( i18n("Message:"), mExternalAppGroupBox); |
274 | boxLayout->addWidget( lab, 3, 0 ); | 283 | boxLayout->addWidget( lab, 3, 0 ); |
275 | mMessage = new QLineEdit(mExternalAppGroupBox); | 284 | mMessage = new QLineEdit(mExternalAppGroupBox); |
276 | mMessage->setReadOnly(true); | 285 | mMessage->setReadOnly(true); |
277 | boxLayout->addWidget( mMessage , 4, 0); | 286 | boxLayout->addWidget( mMessage , 4, 0); |
278 | 287 | ||
279 | lab = new QLabel( i18n("Parameters:"), mExternalAppGroupBox); | 288 | lab = new QLabel( i18n("Parameters:"), mExternalAppGroupBox); |
280 | boxLayout->addWidget( lab, 3, 1 ); | 289 | boxLayout->addWidget( lab, 3, 1 ); |
281 | mParameters = new QLineEdit(mExternalAppGroupBox); | 290 | mParameters = new QLineEdit(mExternalAppGroupBox); |
282 | mParameters->setReadOnly(true); | 291 | mParameters->setReadOnly(true); |
283 | boxLayout->addWidget( mParameters, 4, 1 ); | 292 | boxLayout->addWidget( mParameters, 4, 1 ); |
284 | 293 | ||
285 | lab = new QLabel( i18n("HINT: Delimiter=; Name=%1,Email=%2"), mExternalAppGroupBox); | 294 | lab = new QLabel( i18n("HINT: Delimiter=; Name=%1,Email=%2"), mExternalAppGroupBox); |
286 | boxLayout->addMultiCellWidget( lab, 5, 5, 0, 1 ); | 295 | boxLayout->addMultiCellWidget( lab, 5, 5, 0, 1 ); |
287 | 296 | ||
288 | 297 | ||
289 | lab = new QLabel( i18n("extra Message:"), mExternalAppGroupBox); | 298 | lab = new QLabel( i18n("extra Message:"), mExternalAppGroupBox); |
290 | boxLayout->addWidget( lab, 6, 0 ); | 299 | boxLayout->addWidget( lab, 6, 0 ); |
291 | mMessage2 = new QLineEdit(mExternalAppGroupBox); | 300 | mMessage2 = new QLineEdit(mExternalAppGroupBox); |
292 | mMessage2->setReadOnly(true); | 301 | mMessage2->setReadOnly(true); |
293 | boxLayout->addWidget( mMessage2 , 7, 0); | 302 | boxLayout->addWidget( mMessage2 , 7, 0); |
294 | 303 | ||
295 | lab = new QLabel( i18n("extra Parameters:"), mExternalAppGroupBox); | 304 | lab = new QLabel( i18n("extra Parameters:"), mExternalAppGroupBox); |
296 | boxLayout->addWidget( lab, 6, 1 ); | 305 | boxLayout->addWidget( lab, 6, 1 ); |
297 | mParameters2 = new QLineEdit(mExternalAppGroupBox); | 306 | mParameters2 = new QLineEdit(mExternalAppGroupBox); |
298 | mParameters2->setReadOnly(true); | 307 | mParameters2->setReadOnly(true); |
299 | boxLayout->addWidget( mParameters2, 7, 1 ); | 308 | boxLayout->addWidget( mParameters2, 7, 1 ); |
300 | 309 | ||
301 | lab = new QLabel( i18n("HINT: Emails=%1,Attachments=%2"), mExternalAppGroupBox); | 310 | lab = new QLabel( i18n("HINT: Emails=%1,Attachments=%2"), mExternalAppGroupBox); |
302 | boxLayout->addMultiCellWidget( lab, 8, 8, 0, 1 ); | 311 | boxLayout->addMultiCellWidget( lab, 8, 8, 0, 1 ); |
303 | 312 | ||
304 | 313 | ||
305 | connect( mChannel, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 314 | connect( mChannel, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
306 | connect( mMessage, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 315 | connect( mMessage, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
307 | connect( mParameters, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 316 | connect( mParameters, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
308 | connect( mMessage2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 317 | connect( mMessage2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
309 | connect( mParameters2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 318 | connect( mParameters2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
310 | 319 | ||
311 | 320 | ||
312 | layout->addWidget( mExternalAppGroupBox ); | 321 | layout->addWidget( mExternalAppGroupBox ); |
313 | tabWidget->addTab( externalAppsPage, i18n( "External Apps." ) ); | 322 | tabWidget->addTab( externalAppsPage, i18n( "External Apps." ) ); |
314 | 323 | ||
315 | } | 324 | } |
316 | 325 | ||
317 | 326 | ||
318 | void KDEPIMConfigWidget::setupLocaleDateTab() | 327 | void KDEPIMConfigWidget::setupLocaleDateTab() |
319 | { | 328 | { |
320 | QWidget *topFrame = new QWidget( this ); | 329 | QWidget *topFrame = new QWidget( this ); |
321 | QGridLayout *topLayout = new QGridLayout( topFrame, 3, 2); | 330 | QGridLayout *topLayout = new QGridLayout( topFrame, 3, 2); |
322 | 331 | ||
323 | topLayout->setSpacing(KDialog::spacingHintSmall()); | 332 | topLayout->setSpacing(KDialog::spacingHintSmall()); |
324 | topLayout->setMargin(KDialog::marginHintSmall()); | 333 | topLayout->setMargin(KDialog::marginHintSmall()); |
325 | int iii = 0; | 334 | int iii = 0; |
326 | 335 | ||
327 | 336 | ||
328 | KPrefsWidRadios *syncPrefsGroup = | 337 | KPrefsWidRadios *syncPrefsGroup = |
329 | addWidRadios(i18n("Date Format:"),&(KPimGlobalPrefs::instance()->mPreferredDate),topFrame); | 338 | addWidRadios(i18n("Date Format:"),&(KPimGlobalPrefs::instance()->mPreferredDate),topFrame); |
330 | QString format; | 339 | QString format; |
331 | if ( QApplication::desktop()->width() < 480 ) | 340 | if ( QApplication::desktop()->width() < 480 ) |
332 | format = "(%d.%m.%Y)"; | 341 | format = "(%d.%m.%Y)"; |
333 | else | 342 | else |
334 | format = "(%d.%m.%Y|%A %d %B %Y)"; | 343 | format = "(%d.%m.%Y|%A %d %B %Y)"; |
335 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); | 344 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); |
336 | if ( QApplication::desktop()->width() < 480 ) | 345 | if ( QApplication::desktop()->width() < 480 ) |
337 | format = "(%m.%d.%Y)"; | 346 | format = "(%m.%d.%Y)"; |
338 | else | 347 | else |
339 | format = "(%m.%d.%Y|%A %B %d %Y)"; | 348 | format = "(%m.%d.%Y|%A %B %d %Y)"; |
340 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); | 349 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); |
341 | if ( QApplication::desktop()->width() < 480 ) | 350 | if ( QApplication::desktop()->width() < 480 ) |
342 | format = "(%Y-%m-%d)"; | 351 | format = "(%Y-%m-%d)"; |
343 | else | 352 | else |
344 | format = "(%Y-%m-%d|%A %Y %B %d)"; | 353 | format = "(%Y-%m-%d|%A %Y %B %d)"; |
345 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); | 354 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); |
346 | syncPrefsGroup->addRadio(i18n("User defined")); | 355 | syncPrefsGroup->addRadio(i18n("User defined")); |
347 | if ( QApplication::desktop()->width() < 480 ) { | 356 | if ( QApplication::desktop()->width() < 480 ) { |
348 | syncPrefsGroup->groupBox()->layout()->setMargin( 5 ); | 357 | syncPrefsGroup->groupBox()->layout()->setMargin( 5 ); |
349 | syncPrefsGroup->groupBox()->layout()->setSpacing( 0 ); | 358 | syncPrefsGroup->groupBox()->layout()->setSpacing( 0 ); |
350 | } | 359 | } |
351 | topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); | 360 | topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); |
352 | ++iii; | 361 | ++iii; |
353 | ++iii; | 362 | ++iii; |
354 | QLabel * lab; | 363 | QLabel * lab; |
355 | mUserDateFormatLong = new QLineEdit(topFrame); | 364 | mUserDateFormatLong = new QLineEdit(topFrame); |
356 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); | 365 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); |
357 | topLayout->addWidget(lab ,iii,0); | 366 | topLayout->addWidget(lab ,iii,0); |
358 | topLayout->addWidget(mUserDateFormatLong,iii,1); | 367 | topLayout->addWidget(mUserDateFormatLong,iii,1); |
359 | ++iii; | 368 | ++iii; |
360 | mUserDateFormatShort = new QLineEdit(topFrame); | 369 | mUserDateFormatShort = new QLineEdit(topFrame); |
361 | lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); | 370 | lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); |
362 | topLayout->addWidget(lab ,iii,0); | 371 | topLayout->addWidget(lab ,iii,0); |
363 | topLayout->addWidget(mUserDateFormatShort,iii,1); | 372 | topLayout->addWidget(mUserDateFormatShort,iii,1); |
364 | ++iii; | 373 | ++iii; |
365 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); | 374 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); |
366 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 375 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
367 | ++iii; | 376 | ++iii; |
368 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); | 377 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); |
369 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 378 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
370 | ++iii; | 379 | ++iii; |
371 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); | 380 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); |
372 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 381 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
373 | ++iii; | 382 | ++iii; |
374 | 383 | ||
375 | connect( mUserDateFormatLong, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 384 | connect( mUserDateFormatLong, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
376 | connect( mUserDateFormatShort, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 385 | connect( mUserDateFormatShort, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
377 | 386 | ||
378 | 387 | ||
379 | tabWidget->addTab( topFrame, i18n( "Date Format" ) ); | 388 | tabWidget->addTab( topFrame, i18n( "Date Format" ) ); |
380 | } | 389 | } |
381 | 390 | ||
382 | void KDEPIMConfigWidget::setupLocaleTab() | 391 | void KDEPIMConfigWidget::setupLocaleTab() |
383 | { | 392 | { |
384 | 393 | ||
385 | QWidget *topFrame = new QWidget( this ); | 394 | QWidget *topFrame = new QWidget( this ); |
386 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 395 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); |
387 | 396 | ||
388 | topLayout->setSpacing(KDialog::spacingHint()); | 397 | topLayout->setSpacing(KDialog::spacingHint()); |
389 | topLayout->setMargin(KDialog::marginHint()); | 398 | topLayout->setMargin(KDialog::marginHint()); |
390 | int iii = 0; | 399 | int iii = 0; |
391 | KPrefsWidRadios *syncPrefsGroup = | 400 | KPrefsWidRadios *syncPrefsGroup = |
392 | addWidRadios(i18n("Language:(needs restart)"),&(KPimGlobalPrefs::instance()->mPreferredLanguage),topFrame); | 401 | addWidRadios(i18n("Language:(needs restart)"),&(KPimGlobalPrefs::instance()->mPreferredLanguage),topFrame); |
393 | syncPrefsGroup->addRadio(i18n("English")); | 402 | syncPrefsGroup->addRadio(i18n("English")); |
394 | syncPrefsGroup->addRadio(i18n("German")); | 403 | syncPrefsGroup->addRadio(i18n("German")); |
395 | syncPrefsGroup->addRadio(i18n("French")); | 404 | syncPrefsGroup->addRadio(i18n("French")); |
396 | syncPrefsGroup->addRadio(i18n("Italian")); | 405 | syncPrefsGroup->addRadio(i18n("Italian")); |
397 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); | 406 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); |
398 | if ( QApplication::desktop()->width() < 300 ) { | 407 | if ( QApplication::desktop()->width() < 300 ) { |
399 | syncPrefsGroup->groupBox()->layout()->setMargin( 5 ); | 408 | syncPrefsGroup->groupBox()->layout()->setMargin( 5 ); |
400 | syncPrefsGroup->groupBox()->layout()->setSpacing( 0 ); | 409 | syncPrefsGroup->groupBox()->layout()->setSpacing( 0 ); |
401 | } | 410 | } |
402 | topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); | 411 | topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); |
403 | ++iii; | 412 | ++iii; |
404 | 413 | ||
405 | 414 | ||
406 | tabWidget->addTab( topFrame, i18n( "Language" ) ); | 415 | tabWidget->addTab( topFrame, i18n( "Language" ) ); |
407 | topFrame = new QWidget( this ); | 416 | topFrame = new QWidget( this ); |
408 | topLayout = new QGridLayout(topFrame,4,2); | 417 | topLayout = new QGridLayout(topFrame,4,2); |
409 | 418 | ||
410 | topLayout->setSpacing(KDialog::spacingHint()); | 419 | topLayout->setSpacing(KDialog::spacingHint()); |
411 | topLayout->setMargin(KDialog::marginHint()); | 420 | topLayout->setMargin(KDialog::marginHint()); |
412 | iii = 0; | 421 | iii = 0; |
413 | syncPrefsGroup = | 422 | syncPrefsGroup = |
414 | addWidRadios(i18n("Time Format(nr):"),&(KPimGlobalPrefs::instance()->mPreferredTime),topFrame); | 423 | addWidRadios(i18n("Time Format(nr):"),&(KPimGlobalPrefs::instance()->mPreferredTime),topFrame); |
415 | if ( QApplication::desktop()->width() > 300 ) | 424 | if ( QApplication::desktop()->width() > 300 ) |
416 | syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical); | 425 | syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical); |
417 | syncPrefsGroup->addRadio(i18n("24:00")); | 426 | syncPrefsGroup->addRadio(i18n("24:00")); |
418 | syncPrefsGroup->addRadio(i18n("12:00am")); | 427 | syncPrefsGroup->addRadio(i18n("12:00am")); |
419 | syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical); | 428 | syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical); |
420 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 429 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
421 | ++iii; | 430 | ++iii; |
422 | 431 | ||
423 | KPrefsWidBool *sb = addWidBool(i18n("Week starts on Sunday"), | 432 | KPrefsWidBool *sb = addWidBool(i18n("Week starts on Sunday"), |
424 | &(KPimGlobalPrefs::instance()->mWeekStartsOnSunday),topFrame); | 433 | &(KPimGlobalPrefs::instance()->mWeekStartsOnSunday),topFrame); |
425 | topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); | 434 | topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); |
426 | ++iii; | 435 | ++iii; |
427 | 436 | ||
428 | 437 | ||
429 | tabWidget->addTab( topFrame, i18n( "Time Format" ) ); | 438 | tabWidget->addTab( topFrame, i18n( "Time Format" ) ); |
430 | 439 | ||
431 | } | 440 | } |
432 | 441 | ||
433 | 442 | ||
434 | void KDEPIMConfigWidget::setupTimeZoneTab() | 443 | void KDEPIMConfigWidget::setupTimeZoneTab() |
435 | { | 444 | { |
436 | QWidget *topFrame; | 445 | QWidget *topFrame; |
437 | QGridLayout *topLayout ; | 446 | QGridLayout *topLayout ; |
438 | 447 | ||
439 | 448 | ||
440 | 449 | ||
441 | 450 | ||
442 | 451 | ||
443 | 452 | ||
444 | topFrame = new QWidget( this ); | 453 | topFrame = new QWidget( this ); |
445 | topLayout = new QGridLayout( topFrame, 5, 2); | 454 | topLayout = new QGridLayout( topFrame, 5, 2); |
446 | topLayout->setSpacing(KDialog::spacingHintSmall()); | 455 | topLayout->setSpacing(KDialog::spacingHintSmall()); |
447 | topLayout->setMargin(KDialog::marginHintSmall()); | 456 | topLayout->setMargin(KDialog::marginHintSmall()); |
448 | 457 | ||
449 | QHBox *timeZoneBox = new QHBox( topFrame ); | 458 | QHBox *timeZoneBox = new QHBox( topFrame ); |
450 | topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); | 459 | topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); |
451 | 460 | ||
452 | new QLabel( i18n("Timezone:"), timeZoneBox ); | 461 | new QLabel( i18n("Timezone:"), timeZoneBox ); |
453 | mTimeZoneCombo = new QComboBox( timeZoneBox ); | 462 | mTimeZoneCombo = new QComboBox( timeZoneBox ); |
454 | if ( QApplication::desktop()->width() < 300 ) { | 463 | if ( QApplication::desktop()->width() < 300 ) { |
455 | mTimeZoneCombo->setMaximumWidth(150); | 464 | mTimeZoneCombo->setMaximumWidth(150); |
456 | } | 465 | } |
457 | 466 | ||
458 | QStringList list; | 467 | QStringList list; |
459 | list = KGlobal::locale()->timeZoneList(); | 468 | list = KGlobal::locale()->timeZoneList(); |
460 | mTimeZoneCombo->insertStringList(list); | 469 | mTimeZoneCombo->insertStringList(list); |
461 | 470 | ||
462 | // find the currently set time zone and select it | 471 | // find the currently set time zone and select it |
463 | QString sCurrentlySet = KPimGlobalPrefs::instance()->mTimeZoneId; | 472 | QString sCurrentlySet = KPimGlobalPrefs::instance()->mTimeZoneId; |
464 | int nCurrentlySet = 11; | 473 | int nCurrentlySet = 11; |
465 | for (int i = 0; i < mTimeZoneCombo->count(); i++) | 474 | for (int i = 0; i < mTimeZoneCombo->count(); i++) |
466 | { | 475 | { |
467 | if (mTimeZoneCombo->text(i) == sCurrentlySet) | 476 | if (mTimeZoneCombo->text(i) == sCurrentlySet) |
468 | { | 477 | { |
469 | nCurrentlySet = i; | 478 | nCurrentlySet = i; |
470 | break; | 479 | break; |
471 | } | 480 | } |
472 | } | 481 | } |
473 | mTimeZoneCombo->setCurrentItem(nCurrentlySet); | 482 | mTimeZoneCombo->setCurrentItem(nCurrentlySet); |
474 | int iii = 1; | 483 | int iii = 1; |
475 | KPrefsWidBool *sb = | 484 | KPrefsWidBool *sb = |
476 | addWidBool(i18n("Add 30 min to selected Timezone"), | 485 | addWidBool(i18n("Add 30 min to selected Timezone"), |
477 | &(KPimGlobalPrefs::instance()->mTimeZoneAdd30min),topFrame); | 486 | &(KPimGlobalPrefs::instance()->mTimeZoneAdd30min),topFrame); |
478 | topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); | 487 | topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); |
479 | ++iii; | 488 | ++iii; |
480 | sb = | 489 | sb = |
481 | addWidBool(i18n("Timezone has daylight saving"), | 490 | addWidBool(i18n("Timezone has daylight saving"), |
482 | &(KPimGlobalPrefs::instance()->mUseDaylightsaving),topFrame); | 491 | &(KPimGlobalPrefs::instance()->mUseDaylightsaving),topFrame); |
483 | topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); | 492 | topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); |
484 | ++iii; | 493 | ++iii; |
485 | QLabel* lab; | 494 | QLabel* lab; |
486 | 495 | ||
487 | lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame ); | 496 | lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame ); |
488 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); | 497 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); |
489 | ++iii; | 498 | ++iii; |
490 | 499 | ||
491 | lab = new QLabel( i18n("The year in the date is ignored."), topFrame ); | 500 | lab = new QLabel( i18n("The year in the date is ignored."), topFrame ); |
492 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); | 501 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); |
493 | ++iii; | 502 | ++iii; |
494 | lab = new QLabel( i18n("Daylight start:"), topFrame ); | 503 | lab = new QLabel( i18n("Daylight start:"), topFrame ); |
495 | topLayout->addWidget(lab, iii,0); | 504 | topLayout->addWidget(lab, iii,0); |
496 | mStartDateSavingEdit = new KDateEdit(topFrame); | 505 | mStartDateSavingEdit = new KDateEdit(topFrame); |
497 | topLayout->addWidget(mStartDateSavingEdit, iii,1); | 506 | topLayout->addWidget(mStartDateSavingEdit, iii,1); |
498 | ++iii; | 507 | ++iii; |
499 | 508 | ||
500 | lab = new QLabel( i18n("Daylight end:"), topFrame ); | 509 | lab = new QLabel( i18n("Daylight end:"), topFrame ); |
501 | topLayout->addWidget(lab, iii,0); | 510 | topLayout->addWidget(lab, iii,0); |
502 | mEndDateSavingEdit = new KDateEdit(topFrame); | 511 | mEndDateSavingEdit = new KDateEdit(topFrame); |
503 | topLayout->addWidget(mEndDateSavingEdit, iii,1); | 512 | topLayout->addWidget(mEndDateSavingEdit, iii,1); |
504 | ++iii; | 513 | ++iii; |
505 | QDate current ( 2001, 1,1); | 514 | QDate current ( 2001, 1,1); |
506 | mStartDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingStart-1)); | 515 | mStartDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingStart-1)); |
507 | mEndDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingEnd-1)); | 516 | mEndDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingEnd-1)); |
508 | 517 | ||
509 | connect( mStartDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) ); | 518 | connect( mStartDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) ); |
510 | connect( mEndDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) ); | 519 | connect( mEndDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) ); |
511 | connect( mTimeZoneCombo, SIGNAL( activated( int ) ), this, SLOT (modified() ) ); | 520 | connect( mTimeZoneCombo, SIGNAL( activated( int ) ), this, SLOT (modified() ) ); |
512 | tabWidget->addTab( topFrame, i18n( "Time Zone" ) ); | 521 | tabWidget->addTab( topFrame, i18n( "Time Zone" ) ); |
513 | 522 | ||
514 | 523 | ||
515 | topFrame = new QWidget( this ); | 524 | topFrame = new QWidget( this ); |
516 | topLayout = new QGridLayout( topFrame, 3, 2); | 525 | topLayout = new QGridLayout( topFrame, 3, 2); |
517 | topLayout->setSpacing(KDialog::spacingHintSmall()); | 526 | topLayout->setSpacing(KDialog::spacingHintSmall()); |
518 | topLayout->setMargin(KDialog::marginHintSmall()); | 527 | topLayout->setMargin(KDialog::marginHintSmall()); |
519 | tabWidget->addTab( topFrame, i18n( "Fonts" ) ); | 528 | tabWidget->addTab( topFrame, i18n( "Fonts" ) ); |
520 | 529 | ||
521 | QLabel* labb = new QLabel( i18n("Global application font for all apps:"), topFrame ); | 530 | QLabel* labb = new QLabel( i18n("Global application font for all apps:"), topFrame ); |
522 | topLayout->addMultiCellWidget(labb,0,0,0,2); | 531 | topLayout->addMultiCellWidget(labb,0,0,0,2); |
523 | int i = 1; | 532 | int i = 1; |
524 | KPrefsWidFont *timeLabelsFont = | 533 | KPrefsWidFont *timeLabelsFont = |
525 | addWidFont(i18n("Kx/Pi"),i18n("Application Font"), | 534 | addWidFont(i18n("Kx/Pi"),i18n("Application Font"), |
526 | &(KPimGlobalPrefs::instance()->mApplicationFont),topFrame); | 535 | &(KPimGlobalPrefs::instance()->mApplicationFont),topFrame); |
527 | topLayout->addWidget(timeLabelsFont->label(),i,0); | 536 | topLayout->addWidget(timeLabelsFont->label(),i,0); |
528 | topLayout->addWidget(timeLabelsFont->preview(),i,1); | 537 | topLayout->addWidget(timeLabelsFont->preview(),i,1); |
529 | topLayout->addWidget(timeLabelsFont->button(),i,2); | 538 | topLayout->addWidget(timeLabelsFont->button(),i,2); |
530 | } | 539 | } |
531 | 540 | ||
532 | void KDEPIMConfigWidget::externalapp_changed( int newApp ) | 541 | void KDEPIMConfigWidget::externalapp_changed( int newApp ) |
533 | { | 542 | { |
534 | // first store the current data | 543 | // first store the current data |
535 | saveEditFieldSettings(); | 544 | saveEditFieldSettings(); |
536 | 545 | ||
537 | // set mCurrentApp | 546 | // set mCurrentApp |
538 | mCurrentApp = (ExternalAppHandler::Types)newApp; | 547 | mCurrentApp = (ExternalAppHandler::Types)newApp; |
539 | 548 | ||
540 | // set mCurrentClient | 549 | // set mCurrentClient |
541 | switch(mCurrentApp) | 550 | switch(mCurrentApp) |
542 | { | 551 | { |
543 | case(ExternalAppHandler::EMAIL): | 552 | case(ExternalAppHandler::EMAIL): |
544 | mCurrentClient = mEmailClient; | 553 | mCurrentClient = mEmailClient; |
545 | break; | 554 | break; |
546 | case(ExternalAppHandler::PHONE): | 555 | case(ExternalAppHandler::PHONE): |
547 | mCurrentClient = mPhoneClient; | 556 | mCurrentClient = mPhoneClient; |
548 | break; | 557 | break; |
549 | case(ExternalAppHandler::SMS): | 558 | case(ExternalAppHandler::SMS): |
550 | mCurrentClient = mSMSClient; | 559 | mCurrentClient = mSMSClient; |
551 | break; | 560 | break; |
552 | case(ExternalAppHandler::FAX): | 561 | case(ExternalAppHandler::FAX): |
553 | mCurrentClient = mFaxClient; | 562 | mCurrentClient = mFaxClient; |
554 | break; | 563 | break; |
555 | case(ExternalAppHandler::PAGER): | 564 | case(ExternalAppHandler::PAGER): |
556 | mCurrentClient = mPagerClient; | 565 | mCurrentClient = mPagerClient; |
557 | break; | 566 | break; |
558 | case(ExternalAppHandler::SIP): | 567 | case(ExternalAppHandler::SIP): |
559 | mCurrentClient = mSipClient; | 568 | mCurrentClient = mSipClient; |
560 | break; | 569 | break; |
561 | default: | 570 | default: |
562 | return; | 571 | return; |
563 | } | 572 | } |
564 | 573 | ||
565 | // and at last update the widgets | 574 | // and at last update the widgets |
566 | updateClientWidgets(); | 575 | updateClientWidgets(); |
567 | } | 576 | } |
568 | 577 | ||
569 | 578 | ||
570 | 579 | ||
571 | void KDEPIMConfigWidget::client_changed( int newClient ) | 580 | void KDEPIMConfigWidget::client_changed( int newClient ) |
572 | { | 581 | { |
573 | if (newClient == mCurrentClient) | 582 | if (newClient == mCurrentClient) |
574 | return; | 583 | return; |
575 | 584 | ||
576 | // first store the current data | 585 | // first store the current data |
577 | saveEditFieldSettings(); | 586 | saveEditFieldSettings(); |
578 | 587 | ||
579 | 588 | ||
580 | //then reset the clientvariable | 589 | //then reset the clientvariable |
581 | mCurrentClient = newClient; | 590 | mCurrentClient = newClient; |
582 | 591 | ||
583 | // and at last update the widgets | 592 | // and at last update the widgets |
584 | updateClientWidgets(); | 593 | updateClientWidgets(); |
585 | 594 | ||
586 | KPrefsWidget::modified(); | 595 | KPrefsWidget::modified(); |
587 | } | 596 | } |
588 | 597 | ||
589 | void KDEPIMConfigWidget::saveEditFieldSettings() | 598 | void KDEPIMConfigWidget::saveEditFieldSettings() |
590 | { | 599 | { |
591 | 600 | ||
592 | switch(mCurrentApp) | 601 | switch(mCurrentApp) |
593 | { | 602 | { |
594 | case(ExternalAppHandler::EMAIL): | 603 | case(ExternalAppHandler::EMAIL): |
595 | mEmailClient = mClient->currentItem(); | 604 | mEmailClient = mClient->currentItem(); |
596 | break; | 605 | break; |
597 | case(ExternalAppHandler::PHONE): | 606 | case(ExternalAppHandler::PHONE): |
598 | mPhoneClient= mClient->currentItem(); | 607 | mPhoneClient= mClient->currentItem(); |
599 | break; | 608 | break; |
600 | case(ExternalAppHandler::SMS): | 609 | case(ExternalAppHandler::SMS): |
601 | mSMSClient = mClient->currentItem(); | 610 | mSMSClient = mClient->currentItem(); |
602 | break; | 611 | break; |
603 | case(ExternalAppHandler::FAX): | 612 | case(ExternalAppHandler::FAX): |
604 | mFaxClient = mClient->currentItem(); | 613 | mFaxClient = mClient->currentItem(); |
605 | break; | 614 | break; |
606 | case(ExternalAppHandler::PAGER): | 615 | case(ExternalAppHandler::PAGER): |
607 | mPagerClient = mClient->currentItem(); | 616 | mPagerClient = mClient->currentItem(); |
608 | break; | 617 | break; |
609 | case(ExternalAppHandler::SIP): | 618 | case(ExternalAppHandler::SIP): |
610 | mSipClient = mClient->currentItem(); | 619 | mSipClient = mClient->currentItem(); |
611 | break; | 620 | break; |
612 | default: | 621 | default: |
613 | return; | 622 | return; |
614 | } | 623 | } |
615 | 624 | ||
616 | //store the current data back to the apropriate membervariables if we had set it to "other" | 625 | //store the current data back to the apropriate membervariables if we had set it to "other" |
617 | if ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::OTHER_EMC)) | 626 | if ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::OTHER_EMC)) |
618 | { | 627 | { |
619 | mEmailOtherChannel = mChannel->text(); | 628 | mEmailOtherChannel = mChannel->text(); |
620 | mEmailOtherMessage = mMessage->text(); | 629 | mEmailOtherMessage = mMessage->text(); |
621 | mEmailOtherMessageParameters = mParameters->text(); | 630 | mEmailOtherMessageParameters = mParameters->text(); |
622 | mEmailOtherMessage2 = mMessage2->text(); | 631 | mEmailOtherMessage2 = mMessage2->text(); |
623 | mEmailOtherMessageParameters2 = mParameters2->text(); | 632 | mEmailOtherMessageParameters2 = mParameters2->text(); |
624 | } | 633 | } |
625 | else if ((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC)) | 634 | else if ((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC)) |
626 | { | 635 | { |
627 | mPhoneOtherChannel = mChannel->text(); | 636 | mPhoneOtherChannel = mChannel->text(); |
628 | mPhoneOtherMessage = mMessage->text(); | 637 | mPhoneOtherMessage = mMessage->text(); |
629 | mPhoneOtherMessageParameters = mParameters->text(); | 638 | mPhoneOtherMessageParameters = mParameters->text(); |
630 | } | 639 | } |
631 | else if ((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC)) | 640 | else if ((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC)) |
632 | { | 641 | { |
633 | mSMSOtherChannel = mChannel->text(); | 642 | mSMSOtherChannel = mChannel->text(); |
634 | mSMSOtherMessage = mMessage->text(); | 643 | mSMSOtherMessage = mMessage->text(); |
635 | mSMSOtherMessageParameters = mParameters->text(); | 644 | mSMSOtherMessageParameters = mParameters->text(); |
636 | } | 645 | } |
637 | else if ((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC)) | 646 | else if ((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC)) |
638 | { | 647 | { |
639 | mFaxOtherChannel = mChannel->text(); | 648 | mFaxOtherChannel = mChannel->text(); |
640 | mFaxOtherMessage = mMessage->text(); | 649 | mFaxOtherMessage = mMessage->text(); |
641 | mFaxOtherMessageParameters = mParameters->text(); | 650 | mFaxOtherMessageParameters = mParameters->text(); |
642 | } | 651 | } |
643 | else if ((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC)) | 652 | else if ((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC)) |
644 | { | 653 | { |
645 | mPagerOtherChannel = mChannel->text(); | 654 | mPagerOtherChannel = mChannel->text(); |
646 | mPagerOtherMessage = mMessage->text(); | 655 | mPagerOtherMessage = mMessage->text(); |
647 | mPagerOtherMessageParameters = mParameters->text(); | 656 | mPagerOtherMessageParameters = mParameters->text(); |
648 | } | 657 | } |
649 | else if ((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC)) | 658 | else if ((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC)) |
650 | { | 659 | { |
651 | mSipOtherChannel = mChannel->text(); | 660 | mSipOtherChannel = mChannel->text(); |
652 | mSipOtherMessage = mMessage->text(); | 661 | mSipOtherMessage = mMessage->text(); |
653 | mSipOtherMessageParameters = mParameters->text(); | 662 | mSipOtherMessageParameters = mParameters->text(); |
654 | } | 663 | } |
655 | 664 | ||
656 | 665 | ||
657 | } | 666 | } |
658 | 667 | ||
659 | void KDEPIMConfigWidget::updateClientWidgets() | 668 | void KDEPIMConfigWidget::updateClientWidgets() |
660 | { | 669 | { |
661 | bool blocked = signalsBlocked(); | 670 | bool blocked = signalsBlocked(); |
662 | blockSignals( true ); | 671 | blockSignals( true ); |
663 | 672 | ||
664 | // at this point we assume, that mCurrentApp and mCurrentClient are set to the values that we want to display | 673 | // at this point we assume, that mCurrentApp and mCurrentClient are set to the values that we want to display |
665 | QMap<ExternalAppHandler::Types, QString>::Iterator it = mExternalAppsMap.find ( mCurrentApp ); | 674 | QMap<ExternalAppHandler::Types, QString>::Iterator it = mExternalAppsMap.find ( mCurrentApp ); |
666 | if (it == mExternalAppsMap.end()) | 675 | if (it == mExternalAppsMap.end()) |
667 | return; | 676 | return; |
668 | 677 | ||
669 | // update group box | 678 | // update group box |
670 | mExternalAppGroupBox->setTitle(i18n( "Used %1 Client" ).arg(it.data())); | 679 | mExternalAppGroupBox->setTitle(i18n( "Used %1 Client" ).arg(it.data())); |
671 | 680 | ||
672 | //update the entries in the client combobox | 681 | //update the entries in the client combobox |
673 | mClient->clear(); | 682 | mClient->clear(); |
674 | 683 | ||
675 | QList<DefaultAppItem> items = ExternalAppHandler::instance()->getAvailableDefaultItems(mCurrentApp); | 684 | QList<DefaultAppItem> items = ExternalAppHandler::instance()->getAvailableDefaultItems(mCurrentApp); |
676 | DefaultAppItem* dai; | 685 | DefaultAppItem* dai; |
677 | for ( dai=items.first(); dai != 0; dai=items.next() ) | 686 | for ( dai=items.first(); dai != 0; dai=items.next() ) |
678 | { | 687 | { |
679 | mClient->insertItem( i18n(dai->_label), dai->_id ); | 688 | mClient->insertItem( i18n(dai->_label), dai->_id ); |
680 | 689 | ||
681 | if (dai->_id == mCurrentClient) | 690 | if (dai->_id == mCurrentClient) |
682 | { | 691 | { |
683 | //restore the edit fields with the data of the local membervariables if we had set it to "other". | 692 | //restore the edit fields with the data of the local membervariables if we had set it to "other". |
684 | //Otherwise take the default data from externalapphandler. | 693 | //Otherwise take the default data from externalapphandler. |
685 | mChannel->setText(dai->_channel); | 694 | mChannel->setText(dai->_channel); |
686 | mMessage->setText(dai->_message); | 695 | mMessage->setText(dai->_message); |
687 | mParameters->setText(dai->_parameters); | 696 | mParameters->setText(dai->_parameters); |
688 | mMessage2->setText(dai->_message2); | 697 | mMessage2->setText(dai->_message2); |
689 | mParameters2->setText(dai->_parameters2); | 698 | mParameters2->setText(dai->_parameters2); |
690 | 699 | ||
691 | 700 | ||
692 | if ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::OTHER_EMC)) | 701 | if ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::OTHER_EMC)) |
693 | { | 702 | { |
694 | mChannel->setText(mEmailOtherChannel); | 703 | mChannel->setText(mEmailOtherChannel); |
695 | mMessage->setText(mEmailOtherMessage); | 704 | mMessage->setText(mEmailOtherMessage); |
696 | mParameters->setText(mEmailOtherMessageParameters); | 705 | mParameters->setText(mEmailOtherMessageParameters); |
697 | mMessage2->setText(mEmailOtherMessage2); | 706 | mMessage2->setText(mEmailOtherMessage2); |
698 | mParameters2->setText(mEmailOtherMessageParameters2); | 707 | mParameters2->setText(mEmailOtherMessageParameters2); |
699 | } | 708 | } |
700 | else if ((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC)) | 709 | else if ((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC)) |
701 | { | 710 | { |
702 | mChannel->setText(mPhoneOtherChannel); | 711 | mChannel->setText(mPhoneOtherChannel); |
703 | mMessage->setText(mPhoneOtherMessage); | 712 | mMessage->setText(mPhoneOtherMessage); |
704 | mParameters->setText(mPhoneOtherMessageParameters); | 713 | mParameters->setText(mPhoneOtherMessageParameters); |
705 | } | 714 | } |
706 | else if ((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC)) | 715 | else if ((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC)) |
707 | { | 716 | { |
708 | mChannel->setText(mSMSOtherChannel); | 717 | mChannel->setText(mSMSOtherChannel); |
709 | mMessage->setText(mSMSOtherMessage); | 718 | mMessage->setText(mSMSOtherMessage); |
710 | mParameters->setText(mSMSOtherMessageParameters); | 719 | mParameters->setText(mSMSOtherMessageParameters); |
711 | } | 720 | } |
712 | else if ((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC)) | 721 | else if ((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC)) |
713 | { | 722 | { |
714 | mChannel->setText(mFaxOtherChannel); | 723 | mChannel->setText(mFaxOtherChannel); |
715 | mMessage->setText(mFaxOtherMessage); | 724 | mMessage->setText(mFaxOtherMessage); |
716 | mParameters->setText(mFaxOtherMessageParameters); | 725 | mParameters->setText(mFaxOtherMessageParameters); |
717 | } | 726 | } |
718 | else if ((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC)) | 727 | else if ((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC)) |
719 | { | 728 | { |
720 | mChannel->setText(mPagerOtherChannel); | 729 | mChannel->setText(mPagerOtherChannel); |
721 | mMessage->setText(mPagerOtherMessage); | 730 | mMessage->setText(mPagerOtherMessage); |
722 | mParameters->setText(mPagerOtherMessageParameters); | 731 | mParameters->setText(mPagerOtherMessageParameters); |
723 | } | 732 | } |
724 | else if ((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC)) | 733 | else if ((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC)) |
725 | { | 734 | { |
726 | mChannel->setText(mSipOtherChannel); | 735 | mChannel->setText(mSipOtherChannel); |
727 | mMessage->setText(mSipOtherMessage); | 736 | mMessage->setText(mSipOtherMessage); |
728 | mParameters->setText(mSipOtherMessageParameters); | 737 | mParameters->setText(mSipOtherMessageParameters); |
729 | } | 738 | } |
730 | } | 739 | } |
731 | 740 | ||
732 | } | 741 | } |
733 | 742 | ||
734 | bool readonly; | 743 | bool readonly; |
735 | bool enabled; | 744 | bool enabled; |
736 | if ( ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::OTHER_EMC)) | 745 | if ( ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::OTHER_EMC)) |
737 | ||((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC)) | 746 | ||((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC)) |
738 | ||((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC)) | 747 | ||((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC)) |
739 | ||((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC)) | 748 | ||((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC)) |
740 | ||((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC)) | 749 | ||((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC)) |
741 | ||((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC))) | 750 | ||((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC))) |
742 | { | 751 | { |
743 | readonly = false; | 752 | readonly = false; |
744 | } | 753 | } |
745 | else | 754 | else |
746 | { | 755 | { |
747 | readonly = true; | 756 | readonly = true; |
748 | } | 757 | } |
749 | 758 | ||
750 | if ( ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::NONE_EMC)) | 759 | if ( ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::NONE_EMC)) |
751 | ||((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::NONE_PHC)) | 760 | ||((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::NONE_PHC)) |
752 | ||((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::NONE_SMC)) | 761 | ||((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::NONE_SMC)) |
753 | ||((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::NONE_FAC)) | 762 | ||((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::NONE_FAC)) |
754 | ||((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::NONE_PAC)) | 763 | ||((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::NONE_PAC)) |
755 | ||((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::NONE_SIC))) | 764 | ||((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::NONE_SIC))) |
756 | { | 765 | { |
757 | enabled = false; | 766 | enabled = false; |
758 | } | 767 | } |
759 | else | 768 | else |
760 | { | 769 | { |
761 | enabled = true; | 770 | enabled = true; |
762 | } | 771 | } |
763 | 772 | ||
764 | 773 | ||
765 | mChannel->setReadOnly(readonly); | 774 | mChannel->setReadOnly(readonly); |
766 | mMessage->setReadOnly(readonly); | 775 | mMessage->setReadOnly(readonly); |
767 | mParameters->setReadOnly(readonly); | 776 | mParameters->setReadOnly(readonly); |
768 | mMessage2->setReadOnly(readonly); | 777 | mMessage2->setReadOnly(readonly); |
769 | mParameters2->setReadOnly(readonly); | 778 | mParameters2->setReadOnly(readonly); |
770 | 779 | ||
771 | mChannel->setEnabled(enabled); | 780 | mChannel->setEnabled(enabled); |
772 | mMessage->setEnabled(enabled); | 781 | mMessage->setEnabled(enabled); |
773 | mParameters->setEnabled(enabled); | 782 | mParameters->setEnabled(enabled); |
774 | mMessage2->setEnabled(enabled); | 783 | mMessage2->setEnabled(enabled); |
775 | mParameters2->setEnabled(enabled); | 784 | mParameters2->setEnabled(enabled); |
776 | 785 | ||
777 | 786 | ||
778 | 787 | ||
779 | mClient->setCurrentItem(mCurrentClient); | 788 | mClient->setCurrentItem(mCurrentClient); |
780 | 789 | ||
781 | 790 | ||
782 | // enable/disable the extra message/parameter field | 791 | // enable/disable the extra message/parameter field |
783 | if (mCurrentApp == ExternalAppHandler::EMAIL) | 792 | if (mCurrentApp == ExternalAppHandler::EMAIL) |
784 | { | 793 | { |
785 | } | 794 | } |
786 | else | 795 | else |
787 | { | 796 | { |
788 | mMessage2->setText( "" ); | 797 | mMessage2->setText( "" ); |
789 | mParameters2->setText( "" ); | 798 | mParameters2->setText( "" ); |
790 | } | 799 | } |
791 | 800 | ||
792 | if (enabled == true) { | 801 | if (enabled == true) { |
793 | mMessage2->setEnabled(mCurrentApp == ExternalAppHandler::EMAIL); | 802 | mMessage2->setEnabled(mCurrentApp == ExternalAppHandler::EMAIL); |
794 | mParameters2->setEnabled(mCurrentApp == ExternalAppHandler::EMAIL); | 803 | mParameters2->setEnabled(mCurrentApp == ExternalAppHandler::EMAIL); |
795 | } | 804 | } |
796 | 805 | ||
797 | 806 | ||
798 | blockSignals( blocked ); | 807 | blockSignals( blocked ); |
799 | 808 | ||
800 | } | 809 | } |
801 | 810 | ||
802 | void KDEPIMConfigWidget::usrReadConfig() | 811 | void KDEPIMConfigWidget::usrReadConfig() |
803 | { | 812 | { |
804 | KPimGlobalPrefs* prefs = KPimGlobalPrefs::instance(); | 813 | KPimGlobalPrefs* prefs = KPimGlobalPrefs::instance(); |
805 | 814 | ||
806 | bool blocked = signalsBlocked(); | 815 | bool blocked = signalsBlocked(); |
807 | blockSignals( true ); | 816 | blockSignals( true ); |
808 | 817 | ||
818 | if (KPimGlobalPrefs::instance()->mBackupUseDefaultDir ) | ||
819 | mBackupUrl->setURL( KGlobalSettings::backupDataDir() ); | ||
820 | else | ||
821 | mBackupUrl->setURL(prefs->mBackupDatadir); | ||
822 | mBackupNumbersSpin->setValue( prefs->mBackupNumbers ); | ||
823 | mBackupDayCountSpin->setValue( prefs->mBackupDayCount); | ||
824 | |||
809 | QString dummy = prefs->mUserDateFormatLong; | 825 | QString dummy = prefs->mUserDateFormatLong; |
810 | mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") )); | 826 | mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") )); |
811 | dummy = prefs->mUserDateFormatShort; | 827 | dummy = prefs->mUserDateFormatShort; |
812 | mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") )); | 828 | mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") )); |
813 | 829 | ||
814 | QDate current ( 2001, 1,1); | 830 | QDate current ( 2001, 1,1); |
815 | mStartDateSavingEdit->setDate(current.addDays(prefs->mDaylightsavingStart-1)); | 831 | mStartDateSavingEdit->setDate(current.addDays(prefs->mDaylightsavingStart-1)); |
816 | mEndDateSavingEdit->setDate(current.addDays(prefs->mDaylightsavingEnd-1)); | 832 | mEndDateSavingEdit->setDate(current.addDays(prefs->mDaylightsavingEnd-1)); |
817 | setCombo(mTimeZoneCombo,i18n(prefs->mTimeZoneId)); | 833 | setCombo(mTimeZoneCombo,i18n(prefs->mTimeZoneId)); |
818 | 834 | ||
819 | |||
820 | |||
821 | |||
822 | mEmailClient = prefs->mEmailClient; | 835 | mEmailClient = prefs->mEmailClient; |
823 | mEmailOtherChannel = prefs->mEmailOtherChannel; | 836 | mEmailOtherChannel = prefs->mEmailOtherChannel; |
824 | mEmailOtherMessage = prefs->mEmailOtherMessage; | 837 | mEmailOtherMessage = prefs->mEmailOtherMessage; |
825 | mEmailOtherMessageParameters = prefs->mEmailOtherMessageParameters; | 838 | mEmailOtherMessageParameters = prefs->mEmailOtherMessageParameters; |
826 | mEmailOtherMessage2 = prefs->mEmailOtherMessage2; | 839 | mEmailOtherMessage2 = prefs->mEmailOtherMessage2; |
827 | mEmailOtherMessageParameters2 = prefs->mEmailOtherMessageParameters2; | 840 | mEmailOtherMessageParameters2 = prefs->mEmailOtherMessageParameters2; |
828 | 841 | ||
829 | mPhoneClient = prefs->mPhoneClient; | 842 | mPhoneClient = prefs->mPhoneClient; |
830 | mPhoneOtherChannel = prefs->mPhoneOtherChannel; | 843 | mPhoneOtherChannel = prefs->mPhoneOtherChannel; |
831 | mPhoneOtherMessage = prefs->mPhoneOtherMessage; | 844 | mPhoneOtherMessage = prefs->mPhoneOtherMessage; |
832 | mPhoneOtherMessageParameters = prefs->mPhoneOtherMessageParameters; | 845 | mPhoneOtherMessageParameters = prefs->mPhoneOtherMessageParameters; |
833 | 846 | ||
834 | mFaxClient = prefs->mFaxClient; | 847 | mFaxClient = prefs->mFaxClient; |
835 | mFaxOtherChannel = prefs->mFaxOtherChannel; | 848 | mFaxOtherChannel = prefs->mFaxOtherChannel; |
836 | mFaxOtherMessage = prefs->mFaxOtherMessage; | 849 | mFaxOtherMessage = prefs->mFaxOtherMessage; |
837 | mFaxOtherMessageParameters = prefs->mFaxOtherMessageParameters; | 850 | mFaxOtherMessageParameters = prefs->mFaxOtherMessageParameters; |
838 | 851 | ||
839 | mSMSClient = prefs->mSMSClient; | 852 | mSMSClient = prefs->mSMSClient; |
840 | mSMSOtherChannel = prefs->mSMSOtherChannel; | 853 | mSMSOtherChannel = prefs->mSMSOtherChannel; |
841 | mSMSOtherMessage = prefs->mSMSOtherMessage; | 854 | mSMSOtherMessage = prefs->mSMSOtherMessage; |
842 | mSMSOtherMessageParameters = prefs->mSMSOtherMessageParameters; | 855 | mSMSOtherMessageParameters = prefs->mSMSOtherMessageParameters; |
843 | 856 | ||
844 | mPagerClient = prefs->mPagerClient; | 857 | mPagerClient = prefs->mPagerClient; |
845 | mPagerOtherChannel = prefs->mPagerOtherChannel; | 858 | mPagerOtherChannel = prefs->mPagerOtherChannel; |
846 | mPagerOtherMessage = prefs->mPagerOtherMessage; | 859 | mPagerOtherMessage = prefs->mPagerOtherMessage; |
847 | mPagerOtherMessageParameters = prefs->mPagerOtherMessageParameters; | 860 | mPagerOtherMessageParameters = prefs->mPagerOtherMessageParameters; |
848 | 861 | ||
849 | mSipClient = prefs->mSipClient; | 862 | mSipClient = prefs->mSipClient; |
850 | mSipOtherChannel = prefs->mSipOtherChannel; | 863 | mSipOtherChannel = prefs->mSipOtherChannel; |
851 | mSipOtherMessage = prefs->mSipOtherMessage; | 864 | mSipOtherMessage = prefs->mSipOtherMessage; |
852 | mSipOtherMessageParameters = prefs->mSipOtherMessageParameters; | 865 | mSipOtherMessageParameters = prefs->mSipOtherMessageParameters; |
853 | 866 | ||
854 | mCurrentApp = ExternalAppHandler::EMAIL; | 867 | mCurrentApp = ExternalAppHandler::EMAIL; |
855 | mCurrentClient = mEmailClient; | 868 | mCurrentClient = mEmailClient; |
856 | 869 | ||
857 | updateClientWidgets(); | 870 | updateClientWidgets(); |
858 | 871 | ||
859 | blockSignals( blocked ); | 872 | blockSignals( blocked ); |
860 | 873 | ||
861 | } | 874 | } |
862 | 875 | ||
863 | void KDEPIMConfigWidget::usrWriteConfig() | 876 | void KDEPIMConfigWidget::usrWriteConfig() |
864 | { | 877 | { |
865 | KPimGlobalPrefs* prefs = KPimGlobalPrefs::instance(); | 878 | KPimGlobalPrefs* prefs = KPimGlobalPrefs::instance(); |
866 | 879 | ||
867 | saveEditFieldSettings(); | 880 | saveEditFieldSettings(); |
868 | 881 | ||
882 | prefs->mBackupNumbers = mBackupNumbersSpin->value(); | ||
883 | prefs->mBackupDayCount = mBackupDayCountSpin->value(); | ||
884 | prefs->mBackupDatadir = mBackupUrl->url(); | ||
869 | 885 | ||
870 | prefs->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") ); | 886 | prefs->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") ); |
871 | prefs->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") ); | 887 | prefs->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") ); |
872 | 888 | ||
873 | prefs->mTimeZoneId = mTimeZoneCombo->currentText(); | 889 | prefs->mTimeZoneId = mTimeZoneCombo->currentText(); |
874 | QDate date; | 890 | QDate date; |
875 | date = mStartDateSavingEdit->date(); | 891 | date = mStartDateSavingEdit->date(); |
876 | int sub = 0; | 892 | int sub = 0; |
877 | if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) | 893 | if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) |
878 | sub = 1; | 894 | sub = 1; |
879 | prefs->mDaylightsavingStart = date.dayOfYear()-sub; | 895 | prefs->mDaylightsavingStart = date.dayOfYear()-sub; |
880 | date = mEndDateSavingEdit->date(); | 896 | date = mEndDateSavingEdit->date(); |
881 | if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) | 897 | if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) |
882 | sub = 1; | 898 | sub = 1; |
883 | else | 899 | else |
884 | sub = 0; | 900 | sub = 0; |
885 | prefs->mDaylightsavingEnd = date.dayOfYear()-sub; | 901 | prefs->mDaylightsavingEnd = date.dayOfYear()-sub; |
886 | 902 | ||
887 | 903 | ||
888 | prefs->mEmailClient = mEmailClient; | 904 | prefs->mEmailClient = mEmailClient; |
889 | prefs->mEmailOtherChannel = mEmailOtherChannel; | 905 | prefs->mEmailOtherChannel = mEmailOtherChannel; |
890 | prefs->mEmailOtherMessage = mEmailOtherMessage; | 906 | prefs->mEmailOtherMessage = mEmailOtherMessage; |
891 | prefs->mEmailOtherMessageParameters = mEmailOtherMessageParameters; | 907 | prefs->mEmailOtherMessageParameters = mEmailOtherMessageParameters; |
892 | prefs->mEmailOtherMessage2 = mEmailOtherMessage2; | 908 | prefs->mEmailOtherMessage2 = mEmailOtherMessage2; |
893 | prefs->mEmailOtherMessageParameters2 = mEmailOtherMessageParameters2; | 909 | prefs->mEmailOtherMessageParameters2 = mEmailOtherMessageParameters2; |
894 | 910 | ||
895 | prefs->mPhoneClient = mPhoneClient; | 911 | prefs->mPhoneClient = mPhoneClient; |
896 | prefs->mPhoneOtherChannel = mPhoneOtherChannel; | 912 | prefs->mPhoneOtherChannel = mPhoneOtherChannel; |
897 | prefs->mPhoneOtherMessage = mPhoneOtherMessage; | 913 | prefs->mPhoneOtherMessage = mPhoneOtherMessage; |
898 | prefs->mPhoneOtherMessageParameters = mPhoneOtherMessageParameters; | 914 | prefs->mPhoneOtherMessageParameters = mPhoneOtherMessageParameters; |
899 | 915 | ||
900 | prefs->mFaxClient = mFaxClient; | 916 | prefs->mFaxClient = mFaxClient; |
901 | prefs->mFaxOtherChannel = mFaxOtherChannel; | 917 | prefs->mFaxOtherChannel = mFaxOtherChannel; |
902 | prefs->mFaxOtherMessage = mFaxOtherMessage; | 918 | prefs->mFaxOtherMessage = mFaxOtherMessage; |
903 | prefs->mFaxOtherMessageParameters = mFaxOtherMessageParameters; | 919 | prefs->mFaxOtherMessageParameters = mFaxOtherMessageParameters; |
904 | 920 | ||
905 | prefs->mSMSClient = mSMSClient; | 921 | prefs->mSMSClient = mSMSClient; |
906 | prefs->mSMSOtherChannel = mSMSOtherChannel; | 922 | prefs->mSMSOtherChannel = mSMSOtherChannel; |
907 | prefs->mSMSOtherMessage = mSMSOtherMessage; | 923 | prefs->mSMSOtherMessage = mSMSOtherMessage; |
908 | prefs->mSMSOtherMessageParameters = mSMSOtherMessageParameters; | 924 | prefs->mSMSOtherMessageParameters = mSMSOtherMessageParameters; |
909 | 925 | ||
910 | prefs->mPagerClient = mPagerClient; | 926 | prefs->mPagerClient = mPagerClient; |
911 | prefs->mPagerOtherChannel = mPagerOtherChannel; | 927 | prefs->mPagerOtherChannel = mPagerOtherChannel; |
912 | prefs->mPagerOtherMessage = mPagerOtherMessage; | 928 | prefs->mPagerOtherMessage = mPagerOtherMessage; |
913 | prefs->mPagerOtherMessageParameters = mPagerOtherMessageParameters; | 929 | prefs->mPagerOtherMessageParameters = mPagerOtherMessageParameters; |
914 | 930 | ||
915 | 931 | ||
916 | prefs->mSipClient = mSipClient; | 932 | prefs->mSipClient = mSipClient; |
917 | prefs->mSipOtherChannel = mSipOtherChannel; | 933 | prefs->mSipOtherChannel = mSipOtherChannel; |
918 | prefs->mSipOtherMessage = mSipOtherMessage; | 934 | prefs->mSipOtherMessage = mSipOtherMessage; |
919 | prefs->mSipOtherMessageParameters = mSipOtherMessageParameters; | 935 | prefs->mSipOtherMessageParameters = mSipOtherMessageParameters; |
920 | 936 | ||
921 | //release the cache that other views can access the changed values instantanious | 937 | //release the cache that other views can access the changed values instantanious |
922 | ExternalAppHandler::instance()->loadConfig(); | 938 | ExternalAppHandler::instance()->loadConfig(); |
923 | KPimGlobalPrefs::instance()->setGlobalConfig(); | 939 | KPimGlobalPrefs::instance()->setGlobalConfig(); |
924 | } | 940 | } |
925 | 941 | ||
926 | 942 | ||
927 | void KDEPIMConfigWidget::setCombo(QComboBox *combo, const QString & text, | 943 | void KDEPIMConfigWidget::setCombo(QComboBox *combo, const QString & text, |
928 | const QStringList *tags) | 944 | const QStringList *tags) |
929 | { | 945 | { |
930 | if (tags) { | 946 | if (tags) { |
931 | int i = tags->findIndex(text); | 947 | int i = tags->findIndex(text); |
932 | if (i > 0) combo->setCurrentItem(i); | 948 | if (i > 0) combo->setCurrentItem(i); |
933 | } else { | 949 | } else { |
934 | for(int i=0;i<combo->count();++i) { | 950 | for(int i=0;i<combo->count();++i) { |
935 | if (combo->text(i) == text) { | 951 | if (combo->text(i) == text) { |
936 | combo->setCurrentItem(i); | 952 | combo->setCurrentItem(i); |
937 | break; | 953 | break; |
938 | } | 954 | } |
939 | } | 955 | } |
940 | } | 956 | } |
941 | } | 957 | } |
942 | 958 | ||
943 | 959 | ||
944 | void KDEPIMConfigWidget::textChanged( const QString& text ) | 960 | void KDEPIMConfigWidget::textChanged( const QString& text ) |
945 | { | 961 | { |
946 | emit changed( true ); | 962 | emit changed( true ); |
947 | } | 963 | } |
diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp index 90321b2..9c28425 100644 --- a/libkdepim/kpimglobalprefs.cpp +++ b/libkdepim/kpimglobalprefs.cpp | |||
@@ -1,223 +1,229 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of libkdepim. | 2 | This file is part of libkdepim. |
3 | Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | /* | 24 | /* |
25 | Enhanced Version of the file for platform independent KDE tools. | 25 | Enhanced Version of the file for platform independent KDE tools. |
26 | Copyright (c) 2004 Ulf Schenk | 26 | Copyright (c) 2004 Ulf Schenk |
27 | 27 | ||
28 | $Id$ | 28 | $Id$ |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <kglobal.h> | 31 | #include <kglobal.h> |
32 | #include <kconfig.h> | 32 | #include <kconfig.h> |
33 | #include <klocale.h> | 33 | #include <klocale.h> |
34 | #include <kdebug.h> | 34 | #include <kdebug.h> |
35 | #include <kglobalsettings.h> | 35 | #include <kglobalsettings.h> |
36 | #include <kstaticdeleter.h> | 36 | #include <kstaticdeleter.h> |
37 | 37 | ||
38 | #include <qregexp.h> | 38 | #include <qregexp.h> |
39 | #include <qfile.h> | 39 | #include <qfile.h> |
40 | #include <stdlib.h> | 40 | #include <stdlib.h> |
41 | #include <qtextstream.h> | 41 | #include <qtextstream.h> |
42 | #include <qapplication.h> | 42 | #include <qapplication.h> |
43 | #include "kpimglobalprefs.h" | 43 | #include "kpimglobalprefs.h" |
44 | 44 | ||
45 | KPimGlobalPrefs *KPimGlobalPrefs::sInstance = 0; | 45 | KPimGlobalPrefs *KPimGlobalPrefs::sInstance = 0; |
46 | static KStaticDeleter<KPimGlobalPrefs> staticDeleterGP; | 46 | static KStaticDeleter<KPimGlobalPrefs> staticDeleterGP; |
47 | 47 | ||
48 | 48 | ||
49 | KPimGlobalPrefs::KPimGlobalPrefs( const QString &name ) | 49 | KPimGlobalPrefs::KPimGlobalPrefs( const QString &name ) |
50 | : KPrefs("microkdeglobalrc") | 50 | : KPrefs("microkdeglobalrc") |
51 | { | 51 | { |
52 | mLocaleDict = 0; | 52 | mLocaleDict = 0; |
53 | KPrefs::setCurrentGroup("Fonts"); | 53 | KPrefs::setCurrentGroup("Fonts"); |
54 | addItemFont("ApplicationFont",&mApplicationFont,KGlobalSettings::generalFont() ); | 54 | addItemFont("ApplicationFont",&mApplicationFont,KGlobalSettings::generalFont() ); |
55 | KPrefs::setCurrentGroup("Locale"); | 55 | KPrefs::setCurrentGroup("Locale"); |
56 | addItemInt("PreferredLanguage",&mPreferredLanguage,0); | 56 | addItemInt("PreferredLanguage",&mPreferredLanguage,0); |
57 | addItemInt("PreferredTime",&mPreferredTime,0); | 57 | addItemInt("PreferredTime",&mPreferredTime,0); |
58 | addItemInt("PreferredDate",&mPreferredDate,0); | 58 | addItemInt("PreferredDate",&mPreferredDate,0); |
59 | addItemBool("WeekStartsOnSunday",&mWeekStartsOnSunday,false); | 59 | addItemBool("WeekStartsOnSunday",&mWeekStartsOnSunday,false); |
60 | addItemString("UserDateFormatLong", &mUserDateFormatLong, "%AK %d. %b %y"); | 60 | addItemString("UserDateFormatLong", &mUserDateFormatLong, "%AK %d. %b %y"); |
61 | addItemString("UserDateFormatShort", &mUserDateFormatShort, "%aK %d.%m.%y"); | 61 | addItemString("UserDateFormatShort", &mUserDateFormatShort, "%aK %d.%m.%y"); |
62 | 62 | ||
63 | KPrefs::setCurrentGroup("Colors"); | 63 | KPrefs::setCurrentGroup("Colors"); |
64 | addItemColor("AlternateBGcolor",&mAlternateColor,KGlobalSettings::alternateBackgroundColor()); | 64 | addItemColor("AlternateBGcolor",&mAlternateColor,KGlobalSettings::alternateBackgroundColor()); |
65 | 65 | ||
66 | 66 | ||
67 | KPrefs::setCurrentGroup("Time & Date"); | 67 | KPrefs::setCurrentGroup("Time & Date"); |
68 | 68 | ||
69 | addItemString("TimeZoneName",&mTimeZoneId, ("+01:00 Europe/Oslo(CET)") ); | 69 | addItemString("TimeZoneName",&mTimeZoneId, ("+01:00 Europe/Oslo(CET)") ); |
70 | addItemBool("UseDaylightsaving",&mUseDaylightsaving,true); | 70 | addItemBool("UseDaylightsaving",&mUseDaylightsaving,true); |
71 | addItemBool("TimeZoneAdd30min",&mTimeZoneAdd30min,false); | 71 | addItemBool("TimeZoneAdd30min",&mTimeZoneAdd30min,false); |
72 | addItemInt("DaylightsavingStart",&mDaylightsavingStart,90); | 72 | addItemInt("DaylightsavingStart",&mDaylightsavingStart,90); |
73 | addItemInt("DaylightsavingEnd",&mDaylightsavingEnd,304); | 73 | addItemInt("DaylightsavingEnd",&mDaylightsavingEnd,304); |
74 | 74 | ||
75 | KPrefs::setCurrentGroup( "ExternalApplications" ); | 75 | KPrefs::setCurrentGroup( "ExternalApplications" ); |
76 | 76 | ||
77 | addItemInt( "EmailChannelType", &mEmailClient, OMPI_EMC ); | 77 | addItemInt( "EmailChannelType", &mEmailClient, OMPI_EMC ); |
78 | addItemString( "EmailChannel", &mEmailOtherChannel, "" ); | 78 | addItemString( "EmailChannel", &mEmailOtherChannel, "" ); |
79 | addItemString( "EmailChannelMessage", &mEmailOtherMessage, "" ); | 79 | addItemString( "EmailChannelMessage", &mEmailOtherMessage, "" ); |
80 | addItemString( "EmailChannelParameters", &mEmailOtherMessageParameters, "" ); | 80 | addItemString( "EmailChannelParameters", &mEmailOtherMessageParameters, "" ); |
81 | addItemString( "EmailChannelMessage2", &mEmailOtherMessage2, "" ); | 81 | addItemString( "EmailChannelMessage2", &mEmailOtherMessage2, "" ); |
82 | addItemString( "EmailChannelParameters2", &mEmailOtherMessageParameters2, "" ); | 82 | addItemString( "EmailChannelParameters2", &mEmailOtherMessageParameters2, "" ); |
83 | 83 | ||
84 | addItemInt( "PhoneChannelType", &mPhoneClient, KPPI_PHC ); | 84 | addItemInt( "PhoneChannelType", &mPhoneClient, KPPI_PHC ); |
85 | addItemString( "PhoneChannel", &mPhoneOtherChannel, "" ); | 85 | addItemString( "PhoneChannel", &mPhoneOtherChannel, "" ); |
86 | addItemString( "PhoneChannelMessage", &mPhoneOtherMessage, "" ); | 86 | addItemString( "PhoneChannelMessage", &mPhoneOtherMessage, "" ); |
87 | addItemString( "PhoneChannelParameters", &mPhoneOtherMessageParameters, "" ); | 87 | addItemString( "PhoneChannelParameters", &mPhoneOtherMessageParameters, "" ); |
88 | 88 | ||
89 | addItemInt( "FaxChannelType", &mFaxClient, NONE_FAC ); | 89 | addItemInt( "FaxChannelType", &mFaxClient, NONE_FAC ); |
90 | addItemString( "FaxChannel", &mFaxOtherChannel, "" ); | 90 | addItemString( "FaxChannel", &mFaxOtherChannel, "" ); |
91 | addItemString( "FaxChannelMessage", &mFaxOtherMessage, "" ); | 91 | addItemString( "FaxChannelMessage", &mFaxOtherMessage, "" ); |
92 | addItemString( "FaxChannelParameters", &mFaxOtherMessageParameters, "" ); | 92 | addItemString( "FaxChannelParameters", &mFaxOtherMessageParameters, "" ); |
93 | 93 | ||
94 | addItemInt( "SMSChannelType", &mSMSClient, NONE_SMC ); | 94 | addItemInt( "SMSChannelType", &mSMSClient, NONE_SMC ); |
95 | addItemString( "SMSChannel", &mSMSOtherChannel, "" ); | 95 | addItemString( "SMSChannel", &mSMSOtherChannel, "" ); |
96 | addItemString( "SMSChannelMessage", &mSMSOtherMessage, "" ); | 96 | addItemString( "SMSChannelMessage", &mSMSOtherMessage, "" ); |
97 | addItemString( "SMSChannelParameters", &mSMSOtherMessageParameters, "" ); | 97 | addItemString( "SMSChannelParameters", &mSMSOtherMessageParameters, "" ); |
98 | 98 | ||
99 | addItemInt( "PagerChannelType", &mPagerClient, NONE_PAC ); | 99 | addItemInt( "PagerChannelType", &mPagerClient, NONE_PAC ); |
100 | addItemString( "PagerChannel", &mPagerOtherChannel, "" ); | 100 | addItemString( "PagerChannel", &mPagerOtherChannel, "" ); |
101 | addItemString( "PagerChannelMessage", &mPagerOtherMessage, "" ); | 101 | addItemString( "PagerChannelMessage", &mPagerOtherMessage, "" ); |
102 | addItemString( "PagerChannelParameters", &mPagerOtherMessageParameters, "" ); | 102 | addItemString( "PagerChannelParameters", &mPagerOtherMessageParameters, "" ); |
103 | 103 | ||
104 | addItemInt( "SIPChannelType", &mSipClient, KPPI_SIC ); | 104 | addItemInt( "SIPChannelType", &mSipClient, KPPI_SIC ); |
105 | addItemString( "SIPChannel", &mSipOtherChannel, "" ); | 105 | addItemString( "SIPChannel", &mSipOtherChannel, "" ); |
106 | addItemString( "SIPChannelMessage", &mSipOtherMessage, "" ); | 106 | addItemString( "SIPChannelMessage", &mSipOtherMessage, "" ); |
107 | addItemString( "SIPChannelParameters", &mSipOtherMessageParameters, "" ); | 107 | addItemString( "SIPChannelParameters", &mSipOtherMessageParameters, "" ); |
108 | 108 | ||
109 | KPrefs::setCurrentGroup( "PhoneAccess" ); | 109 | KPrefs::setCurrentGroup( "PhoneAccess" ); |
110 | addItemString("Ex2PhoneDevice",&mEx2PhoneDevice,"/dev/ircomm"); | 110 | addItemString("Ex2PhoneDevice",&mEx2PhoneDevice,"/dev/ircomm"); |
111 | addItemString("Ex2PhoneConnection",&mEx2PhoneConnection,"irda"); | 111 | addItemString("Ex2PhoneConnection",&mEx2PhoneConnection,"irda"); |
112 | addItemString("Ex2PhoneModel",&mEx2PhoneModel,"6310i"); | 112 | addItemString("Ex2PhoneModel",&mEx2PhoneModel,"6310i"); |
113 | 113 | ||
114 | KPrefs::setCurrentGroup( "BackupSettings" ); | 114 | KPrefs::setCurrentGroup( "BackupSettings" ); |
115 | addItemString("BackupDatadir",&mBackupDatadir,KGlobalSettings::backupDataDir()); | 115 | addItemString("BackupDatadir",&mBackupDatadir,KGlobalSettings::backupDataDir()); |
116 | addItemInt( "BackupNumbers", &mBackupNumbers, 3 ); | 116 | addItemInt( "BackupNumbers", &mBackupNumbers, 3 ); |
117 | addItemInt( "BackupDayCount", &mBackupDayCount, 2 ); | 117 | addItemInt( "BackupDayCount", &mBackupDayCount, 2 ); |
118 | addItemBool( "BackupUseDefaultDir",&mBackupUseDefaultDir, true ); | 118 | addItemBool( "BackupUseDefaultDir",&mBackupUseDefaultDir, true ); |
119 | addItemBool( "BackupEnabled",&mBackupEnabled, false ); | 119 | addItemBool( "BackupEnabled",&mBackupEnabled, false ); |
120 | 120 | ||
121 | } | 121 | } |
122 | 122 | ||
123 | void KPimGlobalPrefs::setGlobalConfig() | 123 | void KPimGlobalPrefs::setGlobalConfig() |
124 | { | 124 | { |
125 | if ( mLocaleDict == 0 ) { | 125 | if ( mLocaleDict == 0 ) { |
126 | QString fileName ; | 126 | QString fileName ; |
127 | QString name = KGlobal::getAppName() +"/"; | 127 | QString name = KGlobal::getAppName() +"/"; |
128 | #ifndef DESKTOP_VERSION | 128 | #ifndef DESKTOP_VERSION |
129 | fileName= QString(getenv("QPEDIR"))+"/pics/kdepim/"+name; | 129 | fileName= QString(getenv("QPEDIR"))+"/pics/kdepim/"+name; |
130 | #else | 130 | #else |
131 | fileName = qApp->applicationDirPath () + "/kdepim/"+ name; | 131 | fileName = qApp->applicationDirPath () + "/kdepim/"+ name; |
132 | #endif | 132 | #endif |
133 | mLocaleDict = 0; | 133 | mLocaleDict = 0; |
134 | if ( mPreferredLanguage > 0 && mPreferredLanguage < 5 ) { | 134 | if ( mPreferredLanguage > 0 && mPreferredLanguage < 5 ) { |
135 | 135 | ||
136 | if ( mPreferredLanguage == 1 ) | 136 | if ( mPreferredLanguage == 1 ) |
137 | fileName = fileName+"germantranslation.txt"; | 137 | fileName = fileName+"germantranslation.txt"; |
138 | else if ( mPreferredLanguage == 4 ) | 138 | else if ( mPreferredLanguage == 4 ) |
139 | fileName = fileName+"usertranslation.txt"; | 139 | fileName = fileName+"usertranslation.txt"; |
140 | else if ( mPreferredLanguage == 2 ) | 140 | else if ( mPreferredLanguage == 2 ) |
141 | fileName = fileName+"frenchtranslation.txt"; | 141 | fileName = fileName+"frenchtranslation.txt"; |
142 | else if ( mPreferredLanguage == 3 ) | 142 | else if ( mPreferredLanguage == 3 ) |
143 | fileName = fileName+"italiantranslation.txt"; | 143 | fileName = fileName+"italiantranslation.txt"; |
144 | QFile file( fileName ); | 144 | QFile file( fileName ); |
145 | if (file.open( IO_ReadOnly ) ) { | 145 | if (file.open( IO_ReadOnly ) ) { |
146 | QTextStream ts( &file ); | 146 | QTextStream ts( &file ); |
147 | ts.setEncoding( QTextStream::Latin1 ); | 147 | ts.setEncoding( QTextStream::Latin1 ); |
148 | //ts.setCodec( QTextCodec::latin1 ); | 148 | //ts.setCodec( QTextCodec::latin1 ); |
149 | QString text = ts.read(); | 149 | QString text = ts.read(); |
150 | file.close(); | 150 | file.close(); |
151 | text.replace( QRegExp("\\\\n"), "\n" ); | 151 | text.replace( QRegExp("\\\\n"), "\n" ); |
152 | QString line; | 152 | QString line; |
153 | QString we; | 153 | QString we; |
154 | QString wt; | 154 | QString wt; |
155 | int br = 0; | 155 | int br = 0; |
156 | int nbr; | 156 | int nbr; |
157 | nbr = text.find ( "},", br ); | 157 | nbr = text.find ( "},", br ); |
158 | line = text.mid( br, nbr - br ); | 158 | line = text.mid( br, nbr - br ); |
159 | br = nbr+1; | 159 | br = nbr+1; |
160 | int se, ee, st, et; | 160 | int se, ee, st, et; |
161 | mLocaleDict = new QDict<QString>; | 161 | mLocaleDict = new QDict<QString>; |
162 | mLocaleDict->setAutoDelete( true ); | 162 | mLocaleDict->setAutoDelete( true ); |
163 | QString end = "{ \"\",\"\" }"; | 163 | QString end = "{ \"\",\"\" }"; |
164 | while ( (line != end) && (br > 1) ) { | 164 | while ( (line != end) && (br > 1) ) { |
165 | //qDebug("%d *%s* ", br, line.latin1()); | 165 | //qDebug("%d *%s* ", br, line.latin1()); |
166 | se = line.find("\"")+1; | 166 | se = line.find("\"")+1; |
167 | et = line.findRev("\"",-1); | 167 | et = line.findRev("\"",-1); |
168 | ee = line.find("\",\""); | 168 | ee = line.find("\",\""); |
169 | st = ee+3; | 169 | st = ee+3; |
170 | we = line.mid( se, ee-se ); | 170 | we = line.mid( se, ee-se ); |
171 | if ( mPreferredLanguage == 4 ) | 171 | if ( mPreferredLanguage == 4 ) |
172 | wt = QString::fromUtf8(line.mid( st, et-st ).latin1()); | 172 | wt = QString::fromUtf8(line.mid( st, et-st ).latin1()); |
173 | else | 173 | else |
174 | wt = line.mid( st, et-st ); | 174 | wt = line.mid( st, et-st ); |
175 | //qDebug("*%s* *%s* ", we.latin1(), wt.latin1()); | 175 | //qDebug("*%s* *%s* ", we.latin1(), wt.latin1()); |
176 | mLocaleDict->insert( we, new QString (wt) ); | 176 | mLocaleDict->insert( we, new QString (wt) ); |
177 | nbr = text.find ( "}", br ); | 177 | nbr = text.find ( "}", br ); |
178 | line = text.mid( br, nbr - br ); | 178 | line = text.mid( br, nbr - br ); |
179 | br = nbr+1; | 179 | br = nbr+1; |
180 | } | 180 | } |
181 | //qDebug("end *%s* ", end.latin1()); | 181 | //qDebug("end *%s* ", end.latin1()); |
182 | 182 | ||
183 | setLocaleDict( mLocaleDict ); | 183 | setLocaleDict( mLocaleDict ); |
184 | } else { | 184 | } else { |
185 | qDebug("KO: Cannot find translation file %s",fileName.latin1() ); | 185 | qDebug("KO: Cannot find translation file %s",fileName.latin1() ); |
186 | } | 186 | } |
187 | } | 187 | } |
188 | } | 188 | } |
189 | 189 | ||
190 | KGlobal::locale()->setHore24Format( !mPreferredTime ); | 190 | KGlobal::locale()->setHore24Format( !mPreferredTime ); |
191 | KGlobal::locale()->setWeekStartMonday( !mWeekStartsOnSunday ); | 191 | KGlobal::locale()->setWeekStartMonday( !mWeekStartsOnSunday ); |
192 | KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)mPreferredDate ); | 192 | KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)mPreferredDate ); |
193 | KGlobal::locale()->setLanguage( mPreferredLanguage ); | 193 | KGlobal::locale()->setLanguage( mPreferredLanguage ); |
194 | QString dummy = mUserDateFormatLong; | 194 | QString dummy = mUserDateFormatLong; |
195 | KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") )); | 195 | KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") )); |
196 | dummy = mUserDateFormatShort; | 196 | dummy = mUserDateFormatShort; |
197 | KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") )); | 197 | KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") )); |
198 | KGlobal::locale()->setDaylightSaving( mUseDaylightsaving, | 198 | KGlobal::locale()->setDaylightSaving( mUseDaylightsaving, |
199 | mDaylightsavingStart, | 199 | mDaylightsavingStart, |
200 | mDaylightsavingEnd ); | 200 | mDaylightsavingEnd ); |
201 | KGlobal::locale()->setTimezone( mTimeZoneId, mTimeZoneAdd30min ); | 201 | KGlobal::locale()->setTimezone( mTimeZoneId, mTimeZoneAdd30min ); |
202 | KGlobalSettings::setAlternateBackgroundColor(mAlternateColor); | 202 | KGlobalSettings::setAlternateBackgroundColor(mAlternateColor); |
203 | QString localKdeDir; | ||
204 | localKdeDir = readEnvPath("LOCALMICROKDEHOME"); | ||
205 | if ( ! localKdeDir.isEmpty() ) { | ||
206 | mBackupUseDefaultDir = true; | ||
207 | mBackupDatadir = KGlobalSettings::backupDataDir(); | ||
208 | } | ||
203 | 209 | ||
204 | } | 210 | } |
205 | KPimGlobalPrefs::~KPimGlobalPrefs() | 211 | KPimGlobalPrefs::~KPimGlobalPrefs() |
206 | { | 212 | { |
207 | if (sInstance == this) | 213 | if (sInstance == this) |
208 | sInstance = staticDeleterGP.setObject(0); | 214 | sInstance = staticDeleterGP.setObject(0); |
209 | else | 215 | else |
210 | qDebug("Whats this? Error in KPimGlobalPrefs::~KPimGlobalPrefs() ?"); | 216 | qDebug("Whats this? Error in KPimGlobalPrefs::~KPimGlobalPrefs() ?"); |
211 | if ( mLocaleDict ) | 217 | if ( mLocaleDict ) |
212 | delete mLocaleDict; | 218 | delete mLocaleDict; |
213 | } | 219 | } |
214 | 220 | ||
215 | KPimGlobalPrefs *KPimGlobalPrefs::instance() | 221 | KPimGlobalPrefs *KPimGlobalPrefs::instance() |
216 | { | 222 | { |
217 | if ( !sInstance ) { | 223 | if ( !sInstance ) { |
218 | sInstance = staticDeleterGP.setObject( new KPimGlobalPrefs() ); | 224 | sInstance = staticDeleterGP.setObject( new KPimGlobalPrefs() ); |
219 | sInstance->readConfig(); | 225 | sInstance->readConfig(); |
220 | } | 226 | } |
221 | 227 | ||
222 | return sInstance; | 228 | return sInstance; |
223 | } | 229 | } |
diff --git a/libkdepim/kpimprefs.cpp b/libkdepim/kpimprefs.cpp index d68ccb6..714d1b7 100644 --- a/libkdepim/kpimprefs.cpp +++ b/libkdepim/kpimprefs.cpp | |||
@@ -1,82 +1,85 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of libkdepim. | 2 | This file is part of libkdepim. |
3 | Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | /* | 24 | /* |
25 | Enhanced Version of the file for platform independent KDE tools. | 25 | Enhanced Version of the file for platform independent KDE tools. |
26 | Copyright (c) 2004 Ulf Schenk | 26 | Copyright (c) 2004 Ulf Schenk |
27 | 27 | ||
28 | $Id$ | 28 | $Id$ |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <kglobal.h> | 31 | #include <kglobal.h> |
32 | #include <kconfig.h> | 32 | #include <kconfig.h> |
33 | #include <klocale.h> | 33 | #include <klocale.h> |
34 | #include <kdebug.h> | 34 | #include <kdebug.h> |
35 | 35 | ||
36 | #include "kpimprefs.h" | 36 | #include "kpimprefs.h" |
37 | 37 | ||
38 | KPimPrefs::KPimPrefs( const QString &name ) : | 38 | KPimPrefs::KPimPrefs( const QString &name ) : |
39 | KPrefs( name ) | 39 | KPrefs( name ) |
40 | { | 40 | { |
41 | #ifdef _WIN32_ | 41 | #ifdef _WIN32_ |
42 | QString hdp= locateLocal("data","korganizer")+"\\\\"; | 42 | QString hdp= locateLocal("data","korganizer")+"\\\\"; |
43 | #else | 43 | #else |
44 | QString hdp= locateLocal("data","korganizer")+"/"; | 44 | QString hdp= locateLocal("data","korganizer")+"/"; |
45 | #endif | 45 | #endif |
46 | setCurrentGroup("SyncOptions"); | 46 | setCurrentGroup("SyncOptions"); |
47 | addItemString("PassiveSyncPort",&mPassiveSyncPort,"9197" ); | 47 | addItemString("PassiveSyncPort",&mPassiveSyncPort,"9197" ); |
48 | addItemString("PassiveSyncPw",&mPassiveSyncPw,"abc" ); | 48 | addItemString("PassiveSyncPw",&mPassiveSyncPw,"abc" ); |
49 | addItemString("LastSyncedLocalFile", &mLastSyncedLocalFile ,hdp +"lastsync.ics" ); | 49 | addItemString("LastSyncedLocalFile", &mLastSyncedLocalFile ,hdp +"lastsync.ics" ); |
50 | addItemBool("PassiveSyncWithDesktop",&mPassiveSyncWithDesktop,false ); | 50 | addItemBool("PassiveSyncWithDesktop",&mPassiveSyncWithDesktop,false ); |
51 | addItemBool("PassiveSyncAutoStart",&mPassiveSyncAutoStart,false ); | 51 | addItemBool("PassiveSyncAutoStart",&mPassiveSyncAutoStart,false ); |
52 | addItemInt("RingSyncAlgoPrefs",&mRingSyncAlgoPrefs,3); | 52 | addItemInt("RingSyncAlgoPrefs",&mRingSyncAlgoPrefs,3); |
53 | |||
54 | setCurrentGroup("BackupDate"); | ||
55 | addItemInt("LastBackupDate",&mLastBackupDate,0); | ||
53 | } | 56 | } |
54 | 57 | ||
55 | KPimPrefs::~KPimPrefs() | 58 | KPimPrefs::~KPimPrefs() |
56 | { | 59 | { |
57 | } | 60 | } |
58 | 61 | ||
59 | void KPimPrefs::usrSetDefaults() | 62 | void KPimPrefs::usrSetDefaults() |
60 | { | 63 | { |
61 | setCategoryDefaults(); | 64 | setCategoryDefaults(); |
62 | } | 65 | } |
63 | 66 | ||
64 | void KPimPrefs::usrReadConfig() | 67 | void KPimPrefs::usrReadConfig() |
65 | { | 68 | { |
66 | config()->setGroup("General"); | 69 | config()->setGroup("General"); |
67 | mCustomCategories = config()->readListEntry("Custom Categories"); | 70 | mCustomCategories = config()->readListEntry("Custom Categories"); |
68 | if (mCustomCategories.isEmpty()) setCategoryDefaults(); | 71 | if (mCustomCategories.isEmpty()) setCategoryDefaults(); |
69 | } | 72 | } |
70 | 73 | ||
71 | 74 | ||
72 | void KPimPrefs::usrWriteConfig() | 75 | void KPimPrefs::usrWriteConfig() |
73 | { | 76 | { |
74 | config()->setGroup("General"); | 77 | config()->setGroup("General"); |
75 | config()->writeEntry("Custom Categories",mCustomCategories); | 78 | config()->writeEntry("Custom Categories",mCustomCategories); |
76 | } | 79 | } |
77 | 80 | ||
78 | void KPimPrefs::setCategoryDefaults() | 81 | void KPimPrefs::setCategoryDefaults() |
79 | { | 82 | { |
80 | // empty implementation | 83 | // empty implementation |
81 | } | 84 | } |
82 | 85 | ||
diff --git a/libkdepim/kpimprefs.h b/libkdepim/kpimprefs.h index c177bd6..bf80042 100644 --- a/libkdepim/kpimprefs.h +++ b/libkdepim/kpimprefs.h | |||
@@ -1,73 +1,74 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of libkdepim. | 2 | This file is part of libkdepim. |
3 | Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | /* | 24 | /* |
25 | Enhanced Version of the file for platform independent KDE tools. | 25 | Enhanced Version of the file for platform independent KDE tools. |
26 | Copyright (c) 2004 Ulf Schenk | 26 | Copyright (c) 2004 Ulf Schenk |
27 | 27 | ||
28 | $Id$ | 28 | $Id$ |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #ifndef KPIMPREFS_H | 31 | #ifndef KPIMPREFS_H |
32 | #define KPIMPREFS_H | 32 | #define KPIMPREFS_H |
33 | 33 | ||
34 | #include <qstringlist.h> | 34 | #include <qstringlist.h> |
35 | 35 | ||
36 | #include "kprefs.h" | 36 | #include "kprefs.h" |
37 | 37 | ||
38 | class KPimPrefs : public KPrefs | 38 | class KPimPrefs : public KPrefs |
39 | { | 39 | { |
40 | public: | 40 | public: |
41 | 41 | ||
42 | KPimPrefs( const QString &name = QString::null ); | 42 | KPimPrefs( const QString &name = QString::null ); |
43 | 43 | ||
44 | virtual ~KPimPrefs(); | 44 | virtual ~KPimPrefs(); |
45 | 45 | ||
46 | /** Set preferences to default values */ | 46 | /** Set preferences to default values */ |
47 | void usrSetDefaults(); | 47 | void usrSetDefaults(); |
48 | 48 | ||
49 | /** Read preferences from config file */ | 49 | /** Read preferences from config file */ |
50 | void usrReadConfig(); | 50 | void usrReadConfig(); |
51 | 51 | ||
52 | /** Write preferences to config file */ | 52 | /** Write preferences to config file */ |
53 | void usrWriteConfig(); | 53 | void usrWriteConfig(); |
54 | 54 | ||
55 | 55 | ||
56 | public: | 56 | public: |
57 | QStringList mCustomCategories; | 57 | QStringList mCustomCategories; |
58 | QString mPassiveSyncPort; | 58 | QString mPassiveSyncPort; |
59 | QString mPassiveSyncPw; | 59 | QString mPassiveSyncPw; |
60 | bool mPassiveSyncWithDesktop; | 60 | bool mPassiveSyncWithDesktop; |
61 | bool mPassiveSyncAutoStart; | 61 | bool mPassiveSyncAutoStart; |
62 | int mRingSyncAlgoPrefs; | 62 | int mRingSyncAlgoPrefs; |
63 | QString mLastSyncedLocalFile; | 63 | QString mLastSyncedLocalFile; |
64 | int mLastBackupDate; | ||
64 | 65 | ||
65 | 66 | ||
66 | protected: | 67 | protected: |
67 | virtual void setCategoryDefaults(); | 68 | virtual void setCategoryDefaults(); |
68 | 69 | ||
69 | 70 | ||
70 | 71 | ||
71 | }; | 72 | }; |
72 | 73 | ||
73 | #endif | 74 | #endif |
diff --git a/microkde/kapplication.cpp b/microkde/kapplication.cpp index 80a83e0..539397b 100644 --- a/microkde/kapplication.cpp +++ b/microkde/kapplication.cpp | |||
@@ -1,126 +1,246 @@ | |||
1 | #include <stdlib.h> | 1 | #include <stdlib.h> |
2 | #include <stdio.h> | 2 | #include <stdio.h> |
3 | 3 | ||
4 | #include "kapplication.h" | 4 | #include "kapplication.h" |
5 | #include "ktextedit.h" | 5 | #include "ktextedit.h" |
6 | #include <qapplication.h> | 6 | #include <qapplication.h> |
7 | #include <qstring.h> | 7 | #include <qstring.h> |
8 | #include <qfile.h> | 8 | #include <qfile.h> |
9 | #include <qtextstream.h> | 9 | #include <qtextstream.h> |
10 | #include <qdialog.h> | 10 | #include <qdialog.h> |
11 | #include <qlayout.h> | 11 | #include <qlayout.h> |
12 | #include <qtextbrowser.h> | 12 | #include <qtextbrowser.h> |
13 | 13 | ||
14 | int KApplication::random() | 14 | int KApplication::random() |
15 | { | 15 | { |
16 | return rand(); | 16 | return rand(); |
17 | } | 17 | } |
18 | 18 | ||
19 | //US | 19 | //US |
20 | QString KApplication::randomString(int length) | 20 | QString KApplication::randomString(int length) |
21 | { | 21 | { |
22 | if (length <=0 ) return QString::null; | 22 | if (length <=0 ) return QString::null; |
23 | 23 | ||
24 | QString str; | 24 | QString str; |
25 | while (length--) | 25 | while (length--) |
26 | { | 26 | { |
27 | int r=random() % 62; | 27 | int r=random() % 62; |
28 | r+=48; | 28 | r+=48; |
29 | if (r>57) r+=7; | 29 | if (r>57) r+=7; |
30 | if (r>90) r+=6; | 30 | if (r>90) r+=6; |
31 | str += char(r); | 31 | str += char(r); |
32 | // so what if I work backwards? | 32 | // so what if I work backwards? |
33 | } | 33 | } |
34 | return str; | 34 | return str; |
35 | } | 35 | } |
36 | int KApplication::execDialog( QDialog* d ) | 36 | int KApplication::execDialog( QDialog* d ) |
37 | { | 37 | { |
38 | if (QApplication::desktop()->width() <= 640 ) | 38 | if (QApplication::desktop()->width() <= 640 ) |
39 | d->showMaximized(); | 39 | d->showMaximized(); |
40 | else | 40 | else |
41 | ;//d->resize( 800, 600 ); | 41 | ;//d->resize( 800, 600 ); |
42 | return d->exec(); | 42 | return d->exec(); |
43 | } | 43 | } |
44 | void KApplication::showLicence() | 44 | void KApplication::showLicence() |
45 | { | 45 | { |
46 | KApplication::showFile( "KDE-Pim/Pi licence", "kdepim/licence.txt" ); | 46 | KApplication::showFile( "KDE-Pim/Pi licence", "kdepim/licence.txt" ); |
47 | } | 47 | } |
48 | 48 | ||
49 | void KApplication::testCoords( int* x, int* y, int* wid, int * hei ) | 49 | void KApplication::testCoords( int* x, int* y, int* wid, int * hei ) |
50 | { | 50 | { |
51 | int dWid = QApplication::desktop()->width() ; | 51 | int dWid = QApplication::desktop()->width() ; |
52 | int dHei = QApplication::desktop()->height(); | 52 | int dHei = QApplication::desktop()->height(); |
53 | if ( *x + *wid > dWid ) { | 53 | if ( *x + *wid > dWid ) { |
54 | *x = 0; | 54 | *x = 0; |
55 | if ( *wid > dWid ) | 55 | if ( *wid > dWid ) |
56 | *wid = dWid; | 56 | *wid = dWid; |
57 | } | 57 | } |
58 | if ( *y + *hei > dHei ) { | 58 | if ( *y + *hei > dHei ) { |
59 | *y = 0; | 59 | *y = 0; |
60 | if ( *hei > dHei ) | 60 | if ( *hei > dHei ) |
61 | *hei = dHei; | 61 | *hei = dHei; |
62 | } | 62 | } |
63 | } | 63 | } |
64 | void KApplication::showFile(QString caption, QString fn) | 64 | void KApplication::showFile(QString caption, QString fn) |
65 | { | 65 | { |
66 | QString text; | 66 | QString text; |
67 | QString fileName; | 67 | QString fileName; |
68 | #ifndef DESKTOP_VERSION | 68 | #ifndef DESKTOP_VERSION |
69 | fileName = getenv("QPEDIR"); | 69 | fileName = getenv("QPEDIR"); |
70 | fileName += "/pics/" + fn ; | 70 | fileName += "/pics/" + fn ; |
71 | #else | 71 | #else |
72 | fileName = qApp->applicationDirPath () + "/" + fn; | 72 | fileName = qApp->applicationDirPath () + "/" + fn; |
73 | #endif | 73 | #endif |
74 | QFile file( fileName ); | 74 | QFile file( fileName ); |
75 | if (!file.open( IO_ReadOnly ) ) { | 75 | if (!file.open( IO_ReadOnly ) ) { |
76 | return ; | 76 | return ; |
77 | } | 77 | } |
78 | QTextStream ts( &file ); | 78 | QTextStream ts( &file ); |
79 | text = ts.read(); | 79 | text = ts.read(); |
80 | file.close(); | 80 | file.close(); |
81 | KApplication::showText( caption, text ); | 81 | KApplication::showText( caption, text ); |
82 | 82 | ||
83 | } | 83 | } |
84 | 84 | ||
85 | bool KApplication::convert2latin1(QString fileName) | 85 | bool KApplication::convert2latin1(QString fileName) |
86 | { | 86 | { |
87 | QString text; | 87 | QString text; |
88 | QFile file( fileName ); | 88 | QFile file( fileName ); |
89 | if (!file.open( IO_ReadOnly ) ) { | 89 | if (!file.open( IO_ReadOnly ) ) { |
90 | return false; | 90 | return false; |
91 | 91 | ||
92 | } | 92 | } |
93 | QTextStream ts( &file ); | 93 | QTextStream ts( &file ); |
94 | ts.setEncoding( QTextStream::UnicodeUTF8 ); | 94 | ts.setEncoding( QTextStream::UnicodeUTF8 ); |
95 | text = ts.read(); | 95 | text = ts.read(); |
96 | file.close(); | 96 | file.close(); |
97 | if (!file.open( IO_WriteOnly ) ) { | 97 | if (!file.open( IO_WriteOnly ) ) { |
98 | return false; | 98 | return false; |
99 | } | 99 | } |
100 | QTextStream tsIn( &file ); | 100 | QTextStream tsIn( &file ); |
101 | tsIn.setEncoding( QTextStream::Latin1 ); | 101 | tsIn.setEncoding( QTextStream::Latin1 ); |
102 | tsIn << text.latin1(); | 102 | tsIn << text.latin1(); |
103 | file.close(); | 103 | file.close(); |
104 | return true; | 104 | return true; |
105 | 105 | ||
106 | 106 | ||
107 | } | 107 | } |
108 | void KApplication::showText(QString caption, QString text) | 108 | void KApplication::showText(QString caption, QString text) |
109 | { | 109 | { |
110 | QDialog dia( 0, "name", true ); ; | 110 | QDialog dia( 0, "name", true ); ; |
111 | dia.setCaption( caption ); | 111 | dia.setCaption( caption ); |
112 | QVBoxLayout* lay = new QVBoxLayout( &dia ); | 112 | QVBoxLayout* lay = new QVBoxLayout( &dia ); |
113 | lay->setSpacing( 3 ); | 113 | lay->setSpacing( 3 ); |
114 | lay->setMargin( 3 ); | 114 | lay->setMargin( 3 ); |
115 | KTextEdit tb ( &dia ); | 115 | KTextEdit tb ( &dia ); |
116 | tb.setWordWrap( QMultiLineEdit::WidgetWidth ); | 116 | tb.setWordWrap( QMultiLineEdit::WidgetWidth ); |
117 | lay->addWidget( &tb ); | 117 | lay->addWidget( &tb ); |
118 | tb.setText( text ); | 118 | tb.setText( text ); |
119 | #ifdef DESKTOP_VERSION | 119 | #ifdef DESKTOP_VERSION |
120 | dia.resize( 640, 480); | 120 | dia.resize( 640, 480); |
121 | #else | 121 | #else |
122 | dia.showMaximized(); | 122 | dia.showMaximized(); |
123 | #endif | 123 | #endif |
124 | dia.exec(); | 124 | dia.exec(); |
125 | 125 | ||
126 | } | 126 | } |
127 | |||
128 | #include <qlabel.h> | ||
129 | #include <qpushbutton.h> | ||
130 | #include <qlayout.h> | ||
131 | #include <qdir.h> | ||
132 | #include <qradiobutton.h> | ||
133 | #include <qbuttongroup.h> | ||
134 | #include "kglobal.h" | ||
135 | #include "klocale.h" | ||
136 | |||
137 | class KBackupPrefs : public QDialog | ||
138 | { | ||
139 | public: | ||
140 | KBackupPrefs( QString message , QWidget *parent=0, const char *name=0 ) : | ||
141 | QDialog( parent, name, true ) | ||
142 | { | ||
143 | setCaption( i18n("Backup Failed!") ); | ||
144 | QVBoxLayout* lay = new QVBoxLayout( this ); | ||
145 | lay->setSpacing( 3 ); | ||
146 | lay->setMargin( 3 ); | ||
147 | QLabel * lab = new QLabel( message, this ); | ||
148 | lay->addWidget( lab ); | ||
149 | QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("Choose action"), this ); | ||
150 | lay->addWidget( format ); | ||
151 | format->setExclusive ( true ) ; | ||
152 | vcal = new QRadioButton(i18n("Try again now"), format ); | ||
153 | tcal = new QRadioButton(i18n("Try again later"), format ); | ||
154 | ical = new QRadioButton(i18n("Try again tomorrow"), format ); | ||
155 | ocal = new QRadioButton(i18n("Disable backup"), format ); | ||
156 | vcal->setChecked( true ); | ||
157 | QPushButton * ok = new QPushButton( i18n("OK"), this ); | ||
158 | lay->addWidget(ok ); | ||
159 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); | ||
160 | } | ||
161 | |||
162 | bool again() { return vcal->isChecked(); } | ||
163 | bool later() { return tcal->isChecked(); } | ||
164 | bool againTomorrow() { return ical->isChecked(); } | ||
165 | private: | ||
166 | QRadioButton* vcal, *ical, *ocal, *tcal; | ||
167 | }; | ||
168 | int KApplication::createBackup( QString fn, QString dp, int numBup ) | ||
169 | { | ||
170 | if ( numBup < 1) return 3; | ||
171 | int ret = 3; | ||
172 | qDebug("KApplication::createBackup %s --- %s --- %d", fn.latin1(), dp.latin1(), numBup); | ||
173 | QDir bupDir ( dp ); | ||
174 | bool tryAgain = true; | ||
175 | while ( tryAgain ) { | ||
176 | if ( !bupDir.exists() ) { | ||
177 | KBackupPrefs noDir( i18n("<b>Backup directory does not exist: </b>") + dp.right(30)); | ||
178 | if ( !noDir.exec() ) return 3; | ||
179 | if ( noDir.againTomorrow() ) { | ||
180 | return 0; | ||
181 | } else if ( noDir.later() ) { | ||
182 | return 3; | ||
183 | } else if ( !noDir.again() ) { | ||
184 | return 2; | ||
185 | } | ||
186 | } else { | ||
187 | tryAgain = false; | ||
188 | } | ||
189 | } | ||
190 | // we have a valid dir! | ||
191 | QStringList allFileList = bupDir.entryList(QDir::Files); | ||
192 | QFileInfo fileInfo ( fn ); | ||
193 | QString fName = fileInfo.fileName (); | ||
194 | QStringList fileList; | ||
195 | |||
196 | int i; | ||
197 | for ( i = 0; i < allFileList.count(); ++i ) { | ||
198 | QString fi = allFileList[i]; | ||
199 | if ( fi. find( fName ) > -1 ) | ||
200 | fileList.append( fi ); | ||
201 | } | ||
202 | qDebug("%d backup files exist ", fileList.count()); | ||
203 | int count = fileList.count(); | ||
204 | fileList.sort(); | ||
205 | int remCount = 0; | ||
206 | while ( count >= numBup ) { | ||
207 | QString fnr = dp + "/"+fileList[remCount]; | ||
208 | QFile::remove( fnr ); | ||
209 | --count; | ||
210 | ++remCount; | ||
211 | } | ||
212 | QDateTime mRunStart = QDateTime::currentDateTime(); | ||
213 | QString file = "%1%2%3-%4%5%6-"; | ||
214 | file = file.arg( mRunStart.date().year(), 4).arg( mRunStart.date().month(),2 ).arg( mRunStart.date().day(), 2 ).arg( mRunStart.time().hour(),2 ).arg( mRunStart.time().minute(),2 ).arg( mRunStart.time().second(),2 ); | ||
215 | file.replace ( QRegExp (" "), "0" ); | ||
216 | file += fName ; | ||
217 | file = dp + "/"+file; | ||
218 | QString command; | ||
219 | int res = 0; | ||
220 | #ifdef _WIN32_ | ||
221 | command = "xcopy "+ fn+ " "+file; | ||
222 | command = QDir::convertSeparators( command ); | ||
223 | #else | ||
224 | command = "cp "+ fn+ " "+file; | ||
225 | #endif | ||
226 | qDebug("command %s ",command.latin1() ); | ||
227 | tryAgain = true; | ||
228 | while ( tryAgain ) { | ||
229 | res = system ( command.latin1() ); | ||
230 | qDebug("copy result %d ", res); | ||
231 | if ( res != 0 ) { | ||
232 | KBackupPrefs noDir( i18n("<b>The backup copy command failed!</b>")); | ||
233 | if ( !noDir.exec() ) return 3; | ||
234 | if ( noDir.againTomorrow() ) { | ||
235 | return 0; | ||
236 | } else if ( noDir.later() ) { | ||
237 | return 3; | ||
238 | } else if ( !noDir.again() ) { | ||
239 | return 2; | ||
240 | } | ||
241 | } else { | ||
242 | tryAgain = false; | ||
243 | } | ||
244 | } | ||
245 | return 1; | ||
246 | } | ||
diff --git a/microkde/kapplication.h b/microkde/kapplication.h index f7eb1ef..de5a084 100644 --- a/microkde/kapplication.h +++ b/microkde/kapplication.h | |||
@@ -1,31 +1,32 @@ | |||
1 | #ifndef MINIKDE_KAPPLICATION_H | 1 | #ifndef MINIKDE_KAPPLICATION_H |
2 | #define MINIKDE_KAPPLICATION_H | 2 | #define MINIKDE_KAPPLICATION_H |
3 | 3 | ||
4 | #include "qstring.h" | 4 | #include "qstring.h" |
5 | #include <qdialog.h> | 5 | #include <qdialog.h> |
6 | #ifdef QDialog | 6 | #ifdef QDialog |
7 | #undef QDialog | 7 | #undef QDialog |
8 | #endif | 8 | #endif |
9 | 9 | ||
10 | class KApplication | 10 | class KApplication |
11 | { | 11 | { |
12 | public: | 12 | public: |
13 | static int random(); | 13 | static int random(); |
14 | 14 | ||
15 | //US | 15 | //US |
16 | /** | 16 | /** |
17 | * Generates a random string. It operates in the range [A-Za-z0-9] | 17 | * Generates a random string. It operates in the range [A-Za-z0-9] |
18 | * @param length Generate a string of this length. | 18 | * @param length Generate a string of this length. |
19 | * @return the random string | 19 | * @return the random string |
20 | */ | 20 | */ |
21 | static QString randomString(int length); | 21 | static QString randomString(int length); |
22 | static int execDialog( QDialog* ); | 22 | static int execDialog( QDialog* ); |
23 | static void showLicence(); | 23 | static void showLicence(); |
24 | static void testCoords( int* x, int* y, int* wid, int * hei ); | 24 | static void testCoords( int* x, int* y, int* wid, int * hei ); |
25 | static void showFile(QString caption, QString file); | 25 | static void showFile(QString caption, QString file); |
26 | static void showText(QString caption, QString text); | 26 | static void showText(QString caption, QString text); |
27 | static bool convert2latin1(QString file); | 27 | static bool convert2latin1(QString file); |
28 | static int createBackup( QString fn, QString dp, int numBup ); | ||
28 | }; | 29 | }; |
29 | 30 | ||
30 | 31 | ||
31 | #endif | 32 | #endif |