author | zautrix <zautrix> | 2005-01-27 12:14:32 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-27 12:14:32 (UTC) |
commit | c8b484570a9cf8aacc070f92141c8bcfebbf3a93 (patch) (unidiff) | |
tree | af81a25ccc142582a60a5ed100dcd44956255b62 | |
parent | 9ff00e650e32d6f348a2333c9cf21da9c9a137ff (diff) | |
download | kdepimpi-c8b484570a9cf8aacc070f92141c8bcfebbf3a93.zip kdepimpi-c8b484570a9cf8aacc070f92141c8bcfebbf3a93.tar.gz kdepimpi-c8b484570a9cf8aacc070f92141c8bcfebbf3a93.tar.bz2 |
birthday fixes
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 3 | ||||
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 2 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 11 | ||||
-rw-r--r-- | korganizer/kowhatsnextview.cpp | 13 |
4 files changed, 24 insertions, 5 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 6c4cb7b..4c00770 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -1,108 +1,111 @@ | |||
1 | Info about the changes in new versions of KDE-Pim/Pi | 1 | Info about the changes in new versions of KDE-Pim/Pi |
2 | 2 | ||
3 | ********** VERSION 2.0.0 ************ | 3 | ********** VERSION 2.0.0 ************ |
4 | 4 | ||
5 | Stable release 2.0.0! | 5 | Stable release 2.0.0! |
6 | 6 | ||
7 | KO/Pi: | 7 | KO/Pi: |
8 | Fixed problem in edit dialog recreation at startup. | 8 | Fixed problem in edit dialog recreation at startup. |
9 | Made "toggle view*" menu items enabled context sensitive. | 9 | Made "toggle view*" menu items enabled context sensitive. |
10 | Changed agenda size menu to items 1-10. | 10 | Changed agenda size menu to items 1-10. |
11 | Made it possible to change agenda size quickly by pressing mouse on timelabels in agenda view and move mouse up/down. | 11 | Made it possible to change agenda size quickly by pressing mouse on timelabels in agenda view and move mouse up/down. |
12 | Usebility enhancements in the KO/Pi menus. | 12 | Usebility enhancements in the KO/Pi menus. |
13 | Birthday import now adds year to summary. | ||
14 | What's Next view shows age in years for birthday. | ||
15 | |||
13 | OM/Pi: | 16 | OM/Pi: |
14 | Added three info lines to display subject, from and to of selected mails. | 17 | Added three info lines to display subject, from and to of selected mails. |
15 | 18 | ||
16 | ********** VERSION 1.9.20 ************ | 19 | ********** VERSION 1.9.20 ************ |
17 | 20 | ||
18 | KO/Pi: | 21 | KO/Pi: |
19 | Added for the "dislplay one day" agenda mode | 22 | Added for the "dislplay one day" agenda mode |
20 | info in the caption and in the day lables: | 23 | info in the caption and in the day lables: |
21 | Now it is displayed, if the selected day is from "day before yesterday" | 24 | Now it is displayed, if the selected day is from "day before yesterday" |
22 | to "day after tomorrow". | 25 | to "day after tomorrow". |
23 | Made it possible to delete a Todo, which has sub-todos. | 26 | Made it possible to delete a Todo, which has sub-todos. |
24 | Fixed two small problems in the todo view. | 27 | Fixed two small problems in the todo view. |
25 | Added missing German translation for filter edit and print dialog. | 28 | Added missing German translation for filter edit and print dialog. |
26 | Made search dialog closeable by cancel key. | 29 | Made search dialog closeable by cancel key. |
27 | 30 | ||
28 | Made it possible to select in the date picker the (ligt grey ) | 31 | Made it possible to select in the date picker the (ligt grey ) |
29 | dates of the prev./next month with the mouse. | 32 | dates of the prev./next month with the mouse. |
30 | 33 | ||
31 | OM/Pi: | 34 | OM/Pi: |
32 | "Delete mail" icon in main window now deletes all selected mails. | 35 | "Delete mail" icon in main window now deletes all selected mails. |
33 | Fixed the problem, that the state flag of imap mails was ignored. | 36 | Fixed the problem, that the state flag of imap mails was ignored. |
34 | Now mails with "FLAG_SEEN" on the imap server get no icon in the list view | 37 | Now mails with "FLAG_SEEN" on the imap server get no icon in the list view |
35 | to indecate that they are already seen. | 38 | to indecate that they are already seen. |
36 | Fixed the problem that the body of some mails was not displayed in the | 39 | Fixed the problem that the body of some mails was not displayed in the |
37 | mail viewer when fetching them from the imap server directly to read them. | 40 | mail viewer when fetching them from the imap server directly to read them. |
38 | Made it (configurable) possible to show the "To:" field in the list view. | 41 | Made it (configurable) possible to show the "To:" field in the list view. |
39 | Added to the mail viewer the option "View Source" to make it possible to see the raw mail data. | 42 | Added to the mail viewer the option "View Source" to make it possible to see the raw mail data. |
40 | Added a "Download Mail" button to the mail viewer to quickly download the viewed mail to the | 43 | Added a "Download Mail" button to the mail viewer to quickly download the viewed mail to the |
41 | local storage folder (specified in account settings) of the account of the mail. | 44 | local storage folder (specified in account settings) of the account of the mail. |
42 | Removed some memory leaks in OM/Pi. | 45 | Removed some memory leaks in OM/Pi. |
43 | 46 | ||
44 | 47 | ||
45 | ********** VERSION 1.9.19 ************ | 48 | ********** VERSION 1.9.19 ************ |
46 | 49 | ||
47 | Added a lot of missing translations to KA/Pi, | 50 | Added a lot of missing translations to KA/Pi, |
48 | Added some missing translations to KO/Pi and OM/Pi. | 51 | Added some missing translations to KO/Pi and OM/Pi. |
49 | 52 | ||
50 | Fixed some minor problems in KA/Pi + KO/Pi. | 53 | Fixed some minor problems in KA/Pi + KO/Pi. |
51 | 54 | ||
52 | Fixed a crash when closing PwM/Pi. | 55 | Fixed a crash when closing PwM/Pi. |
53 | Added German translation for PwM/Pi. | 56 | Added German translation for PwM/Pi. |
54 | 57 | ||
55 | Made view change and Month View update faster in KO/Pi. | 58 | Made view change and Month View update faster in KO/Pi. |
56 | 59 | ||
57 | 60 | ||
58 | ********** VERSION 1.9.18 ************ | 61 | ********** VERSION 1.9.18 ************ |
59 | 62 | ||
60 | FYI: The VERSION 1.9.17 was a testing release only. | 63 | FYI: The VERSION 1.9.17 was a testing release only. |
61 | Please read the changelog of VERSION 1.9.17 as well. | 64 | Please read the changelog of VERSION 1.9.17 as well. |
62 | 65 | ||
63 | Cleaned up the syncing config dialog. | 66 | Cleaned up the syncing config dialog. |
64 | Added sync config options for date range for events. | 67 | Added sync config options for date range for events. |
65 | Added sync config options for filters on incoming data. | 68 | Added sync config options for filters on incoming data. |
66 | Added sync config options for filters on outgoing data. | 69 | Added sync config options for filters on outgoing data. |
67 | Please read the updated SyncHowTo about the new filter settings. | 70 | Please read the updated SyncHowTo about the new filter settings. |
68 | These filter settings make it now possible to sync with shared | 71 | These filter settings make it now possible to sync with shared |
69 | calendars without writing back private or confidential data | 72 | calendars without writing back private or confidential data |
70 | (via the outgoing filters). | 73 | (via the outgoing filters). |
71 | To sync only with particular parts of a shared calendar, | 74 | To sync only with particular parts of a shared calendar, |
72 | the incoming filter settings can be used. | 75 | the incoming filter settings can be used. |
73 | An example can be found in the SyncHowTo. | 76 | An example can be found in the SyncHowTo. |
74 | Same for shared addressbooks. | 77 | Same for shared addressbooks. |
75 | 78 | ||
76 | Added a setting for the global kdepim data storage. | 79 | Added a setting for the global kdepim data storage. |
77 | Usually the data is stored in (yourhomedir/kdepim). | 80 | Usually the data is stored in (yourhomedir/kdepim). |
78 | Now you can set in the Global config dialog TAB, subTAB "Data storage path" | 81 | Now you can set in the Global config dialog TAB, subTAB "Data storage path" |
79 | a directory where all the kdepim data is stored. | 82 | a directory where all the kdepim data is stored. |
80 | That makes it easy to save all kdepim data on a SD card on the Z, for example. | 83 | That makes it easy to save all kdepim data on a SD card on the Z, for example. |
81 | 84 | ||
82 | KO/Pi: | 85 | KO/Pi: |
83 | The timeedit input has a pulldown list for times. | 86 | The timeedit input has a pulldown list for times. |
84 | If opened, this pulldown list should now has the right time highlighted. | 87 | If opened, this pulldown list should now has the right time highlighted. |
85 | Added the possibility to exclude events/todos/journals in a filter. | 88 | Added the possibility to exclude events/todos/journals in a filter. |
86 | You should exclude journals, if you do not want them to sync with a public calendar. | 89 | You should exclude journals, if you do not want them to sync with a public calendar. |
87 | 90 | ||
88 | KA/Pi: | 91 | KA/Pi: |
89 | Added the possibility to in/exclude public/private/confidential contacts to a filter. | 92 | Added the possibility to in/exclude public/private/confidential contacts to a filter. |
90 | If you have already defined filterrules in KA/Pi you have to adjust them all by setting the "include public/private/confidential" property manually. Sorry for that ... | 93 | If you have already defined filterrules in KA/Pi you have to adjust them all by setting the "include public/private/confidential" property manually. Sorry for that ... |
91 | Added printing of card view and details view on desktop. | 94 | Added printing of card view and details view on desktop. |
92 | Printing of list view is not working... | 95 | Printing of list view is not working... |
93 | Added button for removing pictures in contact editor. | 96 | Added button for removing pictures in contact editor. |
94 | Parsing data fix of KA/Pi version 1.9.17. | 97 | Parsing data fix of KA/Pi version 1.9.17. |
95 | Fixed the "parse name automatically" problem of KA/Pi version 1.9.17. | 98 | Fixed the "parse name automatically" problem of KA/Pi version 1.9.17. |
96 | Fixed some syncing merging problems. | 99 | Fixed some syncing merging problems. |
97 | 100 | ||
98 | 101 | ||
99 | ********** VERSION 1.9.17 ************ | 102 | ********** VERSION 1.9.17 ************ |
100 | 103 | ||
101 | KO/Pi: | 104 | KO/Pi: |
102 | Fixed that tooltips were not updated after moving an item in agenda view. | 105 | Fixed that tooltips were not updated after moving an item in agenda view. |
103 | Fixed a bug in sorting start date for recurring events in list view. | 106 | Fixed a bug in sorting start date for recurring events in list view. |
104 | Changed the left button in todo viewer from "Agenda" to "Set completed". | 107 | Changed the left button in todo viewer from "Agenda" to "Set completed". |
105 | This makes it possible to change a todo in the What's Next View quickly to the completed state without leaving the What's Next View. | 108 | This makes it possible to change a todo in the What's Next View quickly to the completed state without leaving the What's Next View. |
106 | Added more info in the todo viewer: Startdate, parent/sub todos. | 109 | Added more info in the todo viewer: Startdate, parent/sub todos. |
107 | 110 | ||
108 | 111 | ||
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index e55d17e..dce95cd 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -1100,104 +1100,104 @@ | |||
1100 | { "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, | 1100 | { "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, |
1101 | { "Show events, that are done in \nWhat's Next view","Zeige abgelaufene Termine in\nWhat's Next Ansicht" }, | 1101 | { "Show events, that are done in \nWhat's Next view","Zeige abgelaufene Termine in\nWhat's Next Ansicht" }, |
1102 | { "Hide not running Todos in To-do view","Verstecke nicht laufende Todos in To-do Ansicht" }, | 1102 | { "Hide not running Todos in To-do view","Verstecke nicht laufende Todos in To-do Ansicht" }, |
1103 | { "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, | 1103 | { "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, |
1104 | { "KO/Pi","KO/Pi" }, | 1104 | { "KO/Pi","KO/Pi" }, |
1105 | { "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, | 1105 | { "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, |
1106 | { "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, | 1106 | { "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, |
1107 | { "Sound.Al.: ","Sound.Al.: " }, | 1107 | { "Sound.Al.: ","Sound.Al.: " }, |
1108 | { "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, | 1108 | { "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, |
1109 | { "Restore","Wiederherstellen" }, | 1109 | { "Restore","Wiederherstellen" }, |
1110 | { "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" }, | 1110 | { "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" }, |
1111 | { "% completed","% komplett" }, | 1111 | { "% completed","% komplett" }, |
1112 | { "%d item(s) found.","%d Item(s) gefunden." }, | 1112 | { "%d item(s) found.","%d Item(s) gefunden." }, |
1113 | { "Set complete","Setze auf erledigt" }, | 1113 | { "Set complete","Setze auf erledigt" }, |
1114 | { "(cancelled)","(gecancelt)" }, | 1114 | { "(cancelled)","(gecancelt)" }, |
1115 | { "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, | 1115 | { "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, |
1116 | { " Local time "," Locale Zeit " }, | 1116 | { " Local time "," Locale Zeit " }, |
1117 | { "Form2","Form2" }, | 1117 | { "Form2","Form2" }, |
1118 | { "Filter enabled","Filter angeschaltet" }, | 1118 | { "Filter enabled","Filter angeschaltet" }, |
1119 | { "Edit Filters","Ändere Filter" }, | 1119 | { "Edit Filters","Ändere Filter" }, |
1120 | { "Print What's Next View...","Drucke What's Next Ansicht..." }, | 1120 | { "Print What's Next View...","Drucke What's Next Ansicht..." }, |
1121 | { "Agenda","Agenda" }, | 1121 | { "Agenda","Agenda" }, |
1122 | { " ("," (" }, | 1122 | { " ("," (" }, |
1123 | { "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, | 1123 | { "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, |
1124 | { "Print","Print" }, | 1124 | { "Print","Print" }, |
1125 | { "&Setup Printer...","Drucker &Setup..." }, | 1125 | { "&Setup Printer...","Drucker &Setup..." }, |
1126 | { "View Type","Zeige Typ" }, | 1126 | { "View Type","Zeige Typ" }, |
1127 | { "Page &orientation:","Seiten Ausrichtung:" }, | 1127 | { "Page &orientation:","Seiten Ausrichtung:" }, |
1128 | { "Use Default of Selected Style","Default des selektierten Stils" }, | 1128 | { "Use Default of Selected Style","Default des selektierten Stils" }, |
1129 | { "Use Default Setting of Printer","Default Einstellung des Druckers" }, | 1129 | { "Use Default Setting of Printer","Default Einstellung des Druckers" }, |
1130 | { "Portrait","Portrait" }, | 1130 | { "Portrait","Portrait" }, |
1131 | { "Landscape","Landschaft" }, | 1131 | { "Landscape","Landschaft" }, |
1132 | { "Print day","Drucke Tag" }, | 1132 | { "Print day","Drucke Tag" }, |
1133 | { "CalPrintDay_Base","CalPrintDay_Base" }, | 1133 | { "CalPrintDay_Base","CalPrintDay_Base" }, |
1134 | { "Date && Time Range","Datum && Zeitspanne" }, | 1134 | { "Date && Time Range","Datum && Zeitspanne" }, |
1135 | { "&End date:","&Enddatum:" }, | 1135 | { "&End date:","&Enddatum:" }, |
1136 | { "&Start date:","&Startdatum:" }, | 1136 | { "&Start date:","&Startdatum:" }, |
1137 | { "Start &time:","Startzeit:" }, | 1137 | { "Start &time:","Startzeit:" }, |
1138 | { "End ti&me:","Endzeit:" }, | 1138 | { "End ti&me:","Endzeit:" }, |
1139 | { "E&xtend time range to include all events","Erweitere Zeitspanne um alle Ereignisse einzuschliessen" }, | 1139 | { "E&xtend time range to include all events","Erweitere Zeitspanne um alle Ereignisse einzuschliessen" }, |
1140 | { "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, | 1140 | { "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, |
1141 | { "Alt+D","Alt+D" }, | 1141 | { "Alt+D","Alt+D" }, |
1142 | { "&Use colors","Nutze Farben" }, | 1142 | { "&Use colors","Nutze Farben" }, |
1143 | { "Alt+U","Alt+U" }, | 1143 | { "Alt+U","Alt+U" }, |
1144 | { "Print week","Drucke Woche" }, | 1144 | { "Print week","Drucke Woche" }, |
1145 | { "CalPrintWeek_Base","CalPrintWeek_Base" }, | 1145 | { "CalPrintWeek_Base","CalPrintWeek_Base" }, |
1146 | { "Use &colors","Nutze Farben" }, | 1146 | { "Use &colors","Nutze Farben" }, |
1147 | { "Type of View","Typ der Ansicht" }, | 1147 | { "Type of View","Typ der Ansicht" }, |
1148 | { "Print as &Filofax page","Drucke als &Filofax Seite" }, | 1148 | { "Print as &Filofax page","Drucke als &Filofax Seite" }, |
1149 | { "Alt+F","Alt+F" }, | 1149 | { "Alt+F","Alt+F" }, |
1150 | { "Print as &timetable view:","Drucke als Zeittabelle:" }, | 1150 | { "Print as &timetable view:","Drucke als Zeittabelle:" }, |
1151 | { "Alt+T","Alt+T" }, | 1151 | { "Alt+T","Alt+T" }, |
1152 | { "Print as split week view","Drucke als gesplittete Wochenansicht" }, | 1152 | { "Print as split week view","Drucke als gesplittete Wochenansicht" }, |
1153 | { "Print month","Drucke Monat" }, | 1153 | { "Print month","Drucke Monat" }, |
1154 | { "CalPrintMonth_Base","CalPrintMonth_Base" }, | 1154 | { "CalPrintMonth_Base","CalPrintMonth_Base" }, |
1155 | { "&Start month:","&Startmonat:" }, | 1155 | { "&Start month:","&Startmonat:" }, |
1156 | { "&End month:","&Endmonat:" }, | 1156 | { "&End month:","&Endmonat:" }, |
1157 | { "Print week &numbers","Drucke Wochen Nummer(n)" }, | 1157 | { "Print week &numbers","Drucke Wochen Nummer(n)" }, |
1158 | { "Print todos","Drucke Todos" }, | 1158 | { "Print todos","Drucke Todos" }, |
1159 | { "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, | 1159 | { "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, |
1160 | { "Include &description of the item","Inclusive Itembeschreibung" }, | 1160 | { "Include &description of the item","Inclusive Itembeschreibung" }, |
1161 | { "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, | 1161 | { "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, |
1162 | { "Include &priority of the item","Inclusive Priorität des Items" }, | 1162 | { "Include &priority of the item","Inclusive Priorität des Items" }, |
1163 | { "Items to Print","Zu druckende Items" }, | 1163 | { "Items to Print","Zu druckende Items" }, |
1164 | { "&From:","Von:" }, | 1164 | { "&From:","Von:" }, |
1165 | { "&To:","Bis:" }, | 1165 | { "&To:","Bis:" }, |
1166 | { "Print &all todo items","Drucke alle Todo Items" }, | 1166 | { "Print &all todo items","Drucke alle Todo Items" }, |
1167 | { "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, | 1167 | { "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, |
1168 | { "Only items due in the &range:","Nur Items in dem Zeitraum:" }, | 1168 | { "Only items due in the &range:","Nur Items in dem Zeitraum:" }, |
1169 | { "Todo List","Todo Liste" }, | 1169 | { "Todo List","Todo Liste" }, |
1170 | { "&Title:","&Titel:" }, | 1170 | { "&Title:","&Titel:" }, |
1171 | { "Co&nnect subtodos with its parent","Verbinde Unter-Todos mit ihren Ober-Todos" }, | 1171 | { "Co&nnect subtodos with its parent","Verbinde Unter-Todos mit ihren Ober-Todos" }, |
1172 | { "Todo list","Todo Liste" }, | 1172 | { "Todo list","Todo Liste" }, |
1173 | { "&Print...","Drucke..." }, | 1173 | { "&Print...","Drucke..." }, |
1174 | { "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, | 1174 | { "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, |
1175 | { "[Unconfigured]","[Unkonfiguriert]" }, | 1175 | { "[Unconfigured]","[Unkonfiguriert]" }, |
1176 | { "OK","OK" }, | 1176 | { "OK","OK" }, |
1177 | { "FilterEditor","FilterEditor" }, | 1177 | { "FilterEditor","FilterEditor" }, |
1178 | { "Include","Inclusive" }, | 1178 | { "Include","Inclusive" }, |
1179 | { "Exclude","Exclusive" }, | 1179 | { "Exclude","Exclusive" }, |
1180 | { "Edit Selection...","Editiere Selektion..." }, | 1180 | { "Edit Selection...","Editiere Selektion..." }, |
1181 | { "recurring events","wiederholende Ereignisse" }, | 1181 | { "recurring events","wiederholende Ereignisse" }, |
1182 | { "completed to-dos","erledigte Todos" }, | 1182 | { "completed to-dos","erledigte Todos" }, |
1183 | { "events","Ereignisse" }, | 1183 | { "events","Ereignisse" }, |
1184 | { "todos","Todos" }, | 1184 | { "todos","Todos" }, |
1185 | { "journals","Journale" }, | 1185 | { "journals","Journale" }, |
1186 | { "public","öffentlich" }, | 1186 | { "public","öffentlich" }, |
1187 | { "private","privat" }, | 1187 | { "private","privat" }, |
1188 | { "confidential","vertraulich" }, | 1188 | { "confidential","vertraulich" }, |
1189 | { "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" }, | 1189 | { "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" }, |
1190 | { "Yesterday","Gestern" }, | 1190 | { "Yesterday","Gestern" }, |
1191 | { "Day after tomorrow","Übermorgen" }, | 1191 | { "Day after tomorrow","Übermorgen" }, |
1192 | { "Tomorrow","Morgen" }, | 1192 | { "Tomorrow","Morgen" }, |
1193 | { "Day before yesterday","Vorgestern" }, | 1193 | { "Day before yesterday","Vorgestern" }, |
1194 | { "Size %1","Größe %1" }, | 1194 | { "Size %1","Größe %1" }, |
1195 | { "New Agendasize: %1","Neue Agendagröße: %1" }, | 1195 | { "New Agendasize: %1","Neue Agendagröße: %1" }, |
1196 | { "","" }, | 1196 | { " (%1 y.)"," (%1 J.)" }, |
1197 | { "","" }, | 1197 | { "","" }, |
1198 | { "","" }, | 1198 | { "","" }, |
1199 | { "","" }, | 1199 | { "","" }, |
1200 | { "","" }, | 1200 | { "","" }, |
1201 | { "","" }, | 1201 | { "","" }, |
1202 | { "","" }, | 1202 | { "","" }, |
1203 | { "","" }, | 1203 | { "","" }, |
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 1d5a57e..257a4dd 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -1430,197 +1430,200 @@ bool CalendarView::importBday() | |||
1430 | #endif //DESKTOP_VERSION | 1430 | #endif //DESKTOP_VERSION |
1431 | 1431 | ||
1432 | #endif //KORG_NOKABC | 1432 | #endif //KORG_NOKABC |
1433 | 1433 | ||
1434 | 1434 | ||
1435 | return true; | 1435 | return true; |
1436 | } | 1436 | } |
1437 | 1437 | ||
1438 | // This method will be called from Ka/Pi as a response to requestBirthdayListFromKAPI | 1438 | // This method will be called from Ka/Pi as a response to requestBirthdayListFromKAPI |
1439 | void CalendarView::insertBirthdays(const QString& uid, const QStringList& birthdayList, | 1439 | void CalendarView::insertBirthdays(const QString& uid, const QStringList& birthdayList, |
1440 | const QStringList& anniversaryList, const QStringList& realNameList, | 1440 | const QStringList& anniversaryList, const QStringList& realNameList, |
1441 | const QStringList& emailList, const QStringList& assembledNameList, | 1441 | const QStringList& emailList, const QStringList& assembledNameList, |
1442 | const QStringList& uidList) | 1442 | const QStringList& uidList) |
1443 | { | 1443 | { |
1444 | //qDebug("KO::CalendarView::insertBirthdays"); | 1444 | //qDebug("KO::CalendarView::insertBirthdays"); |
1445 | if (uid == this->name()) | 1445 | if (uid == this->name()) |
1446 | { | 1446 | { |
1447 | int count = birthdayList.count(); | 1447 | int count = birthdayList.count(); |
1448 | int addCount = 0; | 1448 | int addCount = 0; |
1449 | KCal::Attendee* a = 0; | 1449 | KCal::Attendee* a = 0; |
1450 | 1450 | ||
1451 | //qDebug("CalView 1 %i", count); | 1451 | //qDebug("CalView 1 %i", count); |
1452 | 1452 | ||
1453 | QProgressBar bar(count,0 ); | 1453 | QProgressBar bar(count,0 ); |
1454 | int w = 300; | 1454 | int w = 300; |
1455 | if ( QApplication::desktop()->width() < 320 ) | 1455 | if ( QApplication::desktop()->width() < 320 ) |
1456 | w = 220; | 1456 | w = 220; |
1457 | int h = bar.sizeHint().height() ; | 1457 | int h = bar.sizeHint().height() ; |
1458 | int dw = QApplication::desktop()->width(); | 1458 | int dw = QApplication::desktop()->width(); |
1459 | int dh = QApplication::desktop()->height(); | 1459 | int dh = QApplication::desktop()->height(); |
1460 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 1460 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
1461 | bar.show(); | 1461 | bar.show(); |
1462 | bar.setCaption (i18n("inserting birthdays - close to abort!") ); | 1462 | bar.setCaption (i18n("inserting birthdays - close to abort!") ); |
1463 | qApp->processEvents(); | 1463 | qApp->processEvents(); |
1464 | 1464 | ||
1465 | QDate birthday; | 1465 | QDate birthday; |
1466 | QDate anniversary; | 1466 | QDate anniversary; |
1467 | QString realName; | 1467 | QString realName; |
1468 | QString email; | 1468 | QString email; |
1469 | QString assembledName; | 1469 | QString assembledName; |
1470 | QString uid; | 1470 | QString uid; |
1471 | bool ok = true; | 1471 | bool ok = true; |
1472 | for ( int i = 0; i < count; i++) | 1472 | for ( int i = 0; i < count; i++) |
1473 | { | 1473 | { |
1474 | if ( ! bar.isVisible() ) | 1474 | if ( ! bar.isVisible() ) |
1475 | return; | 1475 | return; |
1476 | bar.setProgress( i ); | 1476 | bar.setProgress( i ); |
1477 | qApp->processEvents(); | 1477 | qApp->processEvents(); |
1478 | 1478 | ||
1479 | birthday = KGlobal::locale()->readDate(birthdayList[i], KLocale::ISODate, &ok); | 1479 | birthday = KGlobal::locale()->readDate(birthdayList[i], KLocale::ISODate, &ok); |
1480 | if (!ok) { | 1480 | if (!ok) { |
1481 | ;//qDebug("CalendarView::insertBirthdays found invalid birthday: %s",birthdayList[i].latin1()); | 1481 | ;//qDebug("CalendarView::insertBirthdays found invalid birthday: %s",birthdayList[i].latin1()); |
1482 | } | 1482 | } |
1483 | 1483 | ||
1484 | anniversary = KGlobal::locale()->readDate(anniversaryList[i], KLocale::ISODate, &ok); | 1484 | anniversary = KGlobal::locale()->readDate(anniversaryList[i], KLocale::ISODate, &ok); |
1485 | if (!ok) { | 1485 | if (!ok) { |
1486 | ;//qDebug("CalendarView::insertBirthdays found invalid anniversary: %s",anniversaryList[i].latin1()); | 1486 | ;//qDebug("CalendarView::insertBirthdays found invalid anniversary: %s",anniversaryList[i].latin1()); |
1487 | } | 1487 | } |
1488 | realName = realNameList[i]; | 1488 | realName = realNameList[i]; |
1489 | email = emailList[i]; | 1489 | email = emailList[i]; |
1490 | assembledName = assembledNameList[i]; | 1490 | assembledName = assembledNameList[i]; |
1491 | uid = uidList[i]; | 1491 | uid = uidList[i]; |
1492 | //qDebug("insert birthday in KO/Pi: %s,%s,%s,%s: %s, %s", realName.latin1(), email.latin1(), assembledName.latin1(), uid.latin1(), birthdayList[i].latin1(), anniversaryList[i].latin1() ); | 1492 | //qDebug("insert birthday in KO/Pi: %s,%s,%s,%s: %s, %s", realName.latin1(), email.latin1(), assembledName.latin1(), uid.latin1(), birthdayList[i].latin1(), anniversaryList[i].latin1() ); |
1493 | 1493 | ||
1494 | if ( birthday.isValid() ){ | 1494 | if ( birthday.isValid() ){ |
1495 | a = new KCal::Attendee( realName, email,false,KCal::Attendee::NeedsAction, | 1495 | a = new KCal::Attendee( realName, email,false,KCal::Attendee::NeedsAction, |
1496 | KCal::Attendee::ReqParticipant,uid) ; | 1496 | KCal::Attendee::ReqParticipant,uid) ; |
1497 | if ( addAnniversary( birthday, assembledName, a, true ) ) | 1497 | if ( addAnniversary( birthday, assembledName, a, true ) ) |
1498 | ++addCount; | 1498 | ++addCount; |
1499 | } | 1499 | } |
1500 | 1500 | ||
1501 | if ( anniversary.isValid() ){ | 1501 | if ( anniversary.isValid() ){ |
1502 | a = new KCal::Attendee( realName, email,false,KCal::Attendee::NeedsAction, | 1502 | a = new KCal::Attendee( realName, email,false,KCal::Attendee::NeedsAction, |
1503 | KCal::Attendee::ReqParticipant,uid) ; | 1503 | KCal::Attendee::ReqParticipant,uid) ; |
1504 | if ( addAnniversary( anniversary, assembledName, a, false ) ) | 1504 | if ( addAnniversary( anniversary, assembledName, a, false ) ) |
1505 | ++addCount; | 1505 | ++addCount; |
1506 | } | 1506 | } |
1507 | } | 1507 | } |
1508 | 1508 | ||
1509 | updateView(); | 1509 | updateView(); |
1510 | topLevelWidget()->setCaption(QString::number( addCount )+ i18n(" birthdays/anniversaries added!")); | 1510 | topLevelWidget()->setCaption(QString::number( addCount )+ i18n(" birthdays/anniversaries added!")); |
1511 | 1511 | ||
1512 | } | 1512 | } |
1513 | 1513 | ||
1514 | } | 1514 | } |
1515 | 1515 | ||
1516 | 1516 | ||
1517 | 1517 | ||
1518 | bool CalendarView::addAnniversary( QDate date, QString name, KCal::Attendee* a, bool birthday) | 1518 | bool CalendarView::addAnniversary( QDate date, QString name, KCal::Attendee* a, bool birthday) |
1519 | { | 1519 | { |
1520 | //qDebug("addAnni "); | 1520 | //qDebug("addAnni "); |
1521 | Event * ev = new Event(); | 1521 | Event * ev = new Event(); |
1522 | if ( a ) { | 1522 | if ( a ) { |
1523 | ev->addAttendee( a ); | 1523 | ev->addAttendee( a ); |
1524 | } | 1524 | } |
1525 | QString kind; | 1525 | QString kind; |
1526 | if ( birthday ) | 1526 | if ( birthday ) { |
1527 | kind = i18n( "Birthday" ); | 1527 | kind = i18n( "Birthday" ); |
1528 | else | 1528 | ev->setSummary( name + " (" + QString::number(date.year()) +")"); |
1529 | } | ||
1530 | else { | ||
1529 | kind = i18n( "Anniversary" ); | 1531 | kind = i18n( "Anniversary" ); |
1530 | ev->setSummary( name + " - " + kind ); | 1532 | ev->setSummary( name + " (" + QString::number(date.year()) +") " + kind ); |
1533 | } | ||
1531 | ev->setOrganizer(a->email()); | 1534 | ev->setOrganizer(a->email()); |
1532 | ev->setCategories( kind ); | 1535 | ev->setCategories( kind ); |
1533 | ev->setDtStart( QDateTime(date) ); | 1536 | ev->setDtStart( QDateTime(date) ); |
1534 | ev->setDtEnd( QDateTime(date) ); | 1537 | ev->setDtEnd( QDateTime(date) ); |
1535 | ev->setFloats( true ); | 1538 | ev->setFloats( true ); |
1536 | Recurrence * rec = ev->recurrence(); | 1539 | Recurrence * rec = ev->recurrence(); |
1537 | rec->setYearly(Recurrence::rYearlyMonth,1,-1); | 1540 | rec->setYearly(Recurrence::rYearlyMonth,1,-1); |
1538 | rec->addYearlyNum( date.month() ); | 1541 | rec->addYearlyNum( date.month() ); |
1539 | if ( !mCalendar->addAnniversaryNoDup( ev ) ) { | 1542 | if ( !mCalendar->addAnniversaryNoDup( ev ) ) { |
1540 | delete ev; | 1543 | delete ev; |
1541 | return false; | 1544 | return false; |
1542 | } | 1545 | } |
1543 | return true; | 1546 | return true; |
1544 | 1547 | ||
1545 | } | 1548 | } |
1546 | bool CalendarView::importQtopia( const QString &categories, | 1549 | bool CalendarView::importQtopia( const QString &categories, |
1547 | const QString &datebook, | 1550 | const QString &datebook, |
1548 | const QString &todolist ) | 1551 | const QString &todolist ) |
1549 | { | 1552 | { |
1550 | 1553 | ||
1551 | QtopiaFormat qtopiaFormat; | 1554 | QtopiaFormat qtopiaFormat; |
1552 | qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories)); | 1555 | qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories)); |
1553 | if ( !categories.isEmpty() ) qtopiaFormat.load( mCalendar, categories ); | 1556 | if ( !categories.isEmpty() ) qtopiaFormat.load( mCalendar, categories ); |
1554 | if ( !datebook.isEmpty() ) qtopiaFormat.load( mCalendar, datebook ); | 1557 | if ( !datebook.isEmpty() ) qtopiaFormat.load( mCalendar, datebook ); |
1555 | if ( !todolist.isEmpty() ) qtopiaFormat.load( mCalendar, todolist ); | 1558 | if ( !todolist.isEmpty() ) qtopiaFormat.load( mCalendar, todolist ); |
1556 | 1559 | ||
1557 | updateView(); | 1560 | updateView(); |
1558 | return true; | 1561 | return true; |
1559 | 1562 | ||
1560 | #if 0 | 1563 | #if 0 |
1561 | mGlobalSyncMode = SYNC_MODE_QTOPIA; | 1564 | mGlobalSyncMode = SYNC_MODE_QTOPIA; |
1562 | mCurrentSyncDevice = "qtopia-XML"; | 1565 | mCurrentSyncDevice = "qtopia-XML"; |
1563 | if ( mSyncManager->mAskForPreferences ) | 1566 | if ( mSyncManager->mAskForPreferences ) |
1564 | edit_sync_options(); | 1567 | edit_sync_options(); |
1565 | qApp->processEvents(); | 1568 | qApp->processEvents(); |
1566 | CalendarLocal* calendar = new CalendarLocal(); | 1569 | CalendarLocal* calendar = new CalendarLocal(); |
1567 | calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); | 1570 | calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
1568 | bool syncOK = false; | 1571 | bool syncOK = false; |
1569 | QtopiaFormat qtopiaFormat; | 1572 | QtopiaFormat qtopiaFormat; |
1570 | qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories)); | 1573 | qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories)); |
1571 | bool loadOk = true; | 1574 | bool loadOk = true; |
1572 | if ( !categories.isEmpty() ) | 1575 | if ( !categories.isEmpty() ) |
1573 | loadOk = qtopiaFormat.load( calendar, categories ); | 1576 | loadOk = qtopiaFormat.load( calendar, categories ); |
1574 | if ( loadOk && !datebook.isEmpty() ) | 1577 | if ( loadOk && !datebook.isEmpty() ) |
1575 | loadOk = qtopiaFormat.load( calendar, datebook ); | 1578 | loadOk = qtopiaFormat.load( calendar, datebook ); |
1576 | if ( loadOk && !todolist.isEmpty() ) | 1579 | if ( loadOk && !todolist.isEmpty() ) |
1577 | loadOk = qtopiaFormat.load( calendar, todolist ); | 1580 | loadOk = qtopiaFormat.load( calendar, todolist ); |
1578 | 1581 | ||
1579 | if ( loadOk ) { | 1582 | if ( loadOk ) { |
1580 | getEventViewerDialog()->setSyncMode( true ); | 1583 | getEventViewerDialog()->setSyncMode( true ); |
1581 | syncOK = synchronizeCalendar( mCalendar, calendar, mSyncManager->mSyncAlgoPrefs ); | 1584 | syncOK = synchronizeCalendar( mCalendar, calendar, mSyncManager->mSyncAlgoPrefs ); |
1582 | getEventViewerDialog()->setSyncMode( false ); | 1585 | getEventViewerDialog()->setSyncMode( false ); |
1583 | qApp->processEvents(); | 1586 | qApp->processEvents(); |
1584 | if ( syncOK ) { | 1587 | if ( syncOK ) { |
1585 | if ( mSyncManager->mWriteBackFile ) | 1588 | if ( mSyncManager->mWriteBackFile ) |
1586 | { | 1589 | { |
1587 | // write back XML file | 1590 | // write back XML file |
1588 | 1591 | ||
1589 | } | 1592 | } |
1590 | setModified( true ); | 1593 | setModified( true ); |
1591 | } | 1594 | } |
1592 | } else { | 1595 | } else { |
1593 | QString question = i18n("Sorry, the file loading\ncommand failed!\n\nNothing synced!\n") ; | 1596 | QString question = i18n("Sorry, the file loading\ncommand failed!\n\nNothing synced!\n") ; |
1594 | QMessageBox::information( 0, i18n("KO/Pi Sync - ERROR"), | 1597 | QMessageBox::information( 0, i18n("KO/Pi Sync - ERROR"), |
1595 | question, i18n("Ok")) ; | 1598 | question, i18n("Ok")) ; |
1596 | } | 1599 | } |
1597 | delete calendar; | 1600 | delete calendar; |
1598 | updateView(); | 1601 | updateView(); |
1599 | return syncOK; | 1602 | return syncOK; |
1600 | 1603 | ||
1601 | 1604 | ||
1602 | #endif | 1605 | #endif |
1603 | 1606 | ||
1604 | } | 1607 | } |
1605 | 1608 | ||
1606 | void CalendarView::setSyncEventsReadOnly() | 1609 | void CalendarView::setSyncEventsReadOnly() |
1607 | { | 1610 | { |
1608 | Event * ev; | 1611 | Event * ev; |
1609 | QPtrList<Event> eL = mCalendar->rawEvents(); | 1612 | QPtrList<Event> eL = mCalendar->rawEvents(); |
1610 | ev = eL.first(); | 1613 | ev = eL.first(); |
1611 | while ( ev ) { | 1614 | while ( ev ) { |
1612 | if ( ev->uid().left(15) == QString("last-syncEvent-") ) | 1615 | if ( ev->uid().left(15) == QString("last-syncEvent-") ) |
1613 | ev->setReadOnly( true ); | 1616 | ev->setReadOnly( true ); |
1614 | ev = eL.next(); | 1617 | ev = eL.next(); |
1615 | } | 1618 | } |
1616 | } | 1619 | } |
1617 | bool CalendarView::openCalendar(QString filename, bool merge) | 1620 | bool CalendarView::openCalendar(QString filename, bool merge) |
1618 | { | 1621 | { |
1619 | 1622 | ||
1620 | if (filename.isEmpty()) { | 1623 | if (filename.isEmpty()) { |
1621 | return false; | 1624 | return false; |
1622 | } | 1625 | } |
1623 | 1626 | ||
1624 | if (!QFile::exists(filename)) { | 1627 | if (!QFile::exists(filename)) { |
1625 | KMessageBox::error(this,i18n("File does not exist:\n '%1'.").arg(filename)); | 1628 | KMessageBox::error(this,i18n("File does not exist:\n '%1'.").arg(filename)); |
1626 | return false; | 1629 | return false; |
@@ -2418,207 +2421,209 @@ void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel ) | |||
2418 | Incidence *in = incidence->clone(); | 2421 | Incidence *in = incidence->clone(); |
2419 | if ( ! in->summary().isEmpty() ) { | 2422 | if ( ! in->summary().isEmpty() ) { |
2420 | in->setDescription(""); | 2423 | in->setDescription(""); |
2421 | } else { | 2424 | } else { |
2422 | in->setSummary( in->description().left(20)); | 2425 | in->setSummary( in->description().left(20)); |
2423 | in->setDescription(""); | 2426 | in->setDescription(""); |
2424 | } | 2427 | } |
2425 | if ( addText ) | 2428 | if ( addText ) |
2426 | description += in->summary() + "\n"; | 2429 | description += in->summary() + "\n"; |
2427 | cal->addIncidence( in ); | 2430 | cal->addIncidence( in ); |
2428 | incidence = delSel.next(); | 2431 | incidence = delSel.next(); |
2429 | } | 2432 | } |
2430 | if ( beamDialog->beamVcal() ) { | 2433 | if ( beamDialog->beamVcal() ) { |
2431 | fn += ".vcs"; | 2434 | fn += ".vcs"; |
2432 | FileStorage storage( cal, fn, new VCalFormat ); | 2435 | FileStorage storage( cal, fn, new VCalFormat ); |
2433 | storage.save(); | 2436 | storage.save(); |
2434 | } else { | 2437 | } else { |
2435 | fn += ".ics"; | 2438 | fn += ".ics"; |
2436 | FileStorage storage( cal, fn, new ICalFormat( ) ); | 2439 | FileStorage storage( cal, fn, new ICalFormat( ) ); |
2437 | storage.save(); | 2440 | storage.save(); |
2438 | } | 2441 | } |
2439 | delete cal; | 2442 | delete cal; |
2440 | mes = i18n("KO/Pi: Ready for beaming"); | 2443 | mes = i18n("KO/Pi: Ready for beaming"); |
2441 | topLevelWidget()->setCaption(mes); | 2444 | topLevelWidget()->setCaption(mes); |
2442 | KApplication::convert2latin1( fn ); | 2445 | KApplication::convert2latin1( fn ); |
2443 | #ifndef DESKTOP_VERSION | 2446 | #ifndef DESKTOP_VERSION |
2444 | Ir *ir = new Ir( this ); | 2447 | Ir *ir = new Ir( this ); |
2445 | connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); | 2448 | connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); |
2446 | ir->send( fn, description, "text/x-vCalendar" ); | 2449 | ir->send( fn, description, "text/x-vCalendar" ); |
2447 | #endif | 2450 | #endif |
2448 | } | 2451 | } |
2449 | } | 2452 | } |
2450 | void CalendarView::beamDone( Ir *ir ) | 2453 | void CalendarView::beamDone( Ir *ir ) |
2451 | { | 2454 | { |
2452 | #ifndef DESKTOP_VERSION | 2455 | #ifndef DESKTOP_VERSION |
2453 | delete ir; | 2456 | delete ir; |
2454 | #endif | 2457 | #endif |
2455 | topLevelWidget()->setCaption( i18n("KO/Pi: Beaming done.") ); | 2458 | topLevelWidget()->setCaption( i18n("KO/Pi: Beaming done.") ); |
2456 | topLevelWidget()->raise(); | 2459 | topLevelWidget()->raise(); |
2457 | } | 2460 | } |
2458 | 2461 | ||
2459 | void CalendarView::moveIncidence(Incidence * inc ) | 2462 | void CalendarView::moveIncidence(Incidence * inc ) |
2460 | { | 2463 | { |
2461 | if ( !inc ) return; | 2464 | if ( !inc ) return; |
2462 | // qDebug("showDatePickerForIncidence( ) "); | 2465 | // qDebug("showDatePickerForIncidence( ) "); |
2463 | if ( mDateFrame->isVisible() ) | 2466 | if ( mDateFrame->isVisible() ) |
2464 | mDateFrame->hide(); | 2467 | mDateFrame->hide(); |
2465 | else { | 2468 | else { |
2466 | int w =mDatePicker->sizeHint().width()+2*mDateFrame->lineWidth() ; | 2469 | int w =mDatePicker->sizeHint().width()+2*mDateFrame->lineWidth() ; |
2467 | int h = mDatePicker->sizeHint().height()+2*mDateFrame->lineWidth() ; | 2470 | int h = mDatePicker->sizeHint().height()+2*mDateFrame->lineWidth() ; |
2468 | int dw = QApplication::desktop()->width(); | 2471 | int dw = QApplication::desktop()->width(); |
2469 | int dh = QApplication::desktop()->height(); | 2472 | int dh = QApplication::desktop()->height(); |
2470 | mDateFrame->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 2473 | mDateFrame->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
2471 | mDateFrame->show(); | 2474 | mDateFrame->show(); |
2472 | } | 2475 | } |
2473 | mDatePickerMode = 2; | 2476 | mDatePickerMode = 2; |
2474 | mMoveIncidence = inc ; | 2477 | mMoveIncidence = inc ; |
2475 | QDate da; | 2478 | QDate da; |
2476 | if ( mMoveIncidence->type() == "Todo" ) { | 2479 | if ( mMoveIncidence->type() == "Todo" ) { |
2477 | Todo * to = (Todo *) mMoveIncidence; | 2480 | Todo * to = (Todo *) mMoveIncidence; |
2478 | if ( to->hasDueDate() ) | 2481 | if ( to->hasDueDate() ) |
2479 | da = to->dtDue().date(); | 2482 | da = to->dtDue().date(); |
2480 | else | 2483 | else |
2481 | da = QDate::currentDate(); | 2484 | da = QDate::currentDate(); |
2482 | } else { | 2485 | } else { |
2483 | da = mMoveIncidence->dtStart().date(); | 2486 | da = mMoveIncidence->dtStart().date(); |
2484 | } | 2487 | } |
2485 | //PENDING set date for recurring incidence to date of recurrence | 2488 | //PENDING set date for recurring incidence to date of recurrence |
2486 | //mMoveIncidenceOldDate; | 2489 | //mMoveIncidenceOldDate; |
2487 | mDatePicker->setDate( da ); | 2490 | mDatePicker->setDate( da ); |
2488 | } | 2491 | } |
2489 | void CalendarView::showDatePicker( ) | 2492 | void CalendarView::showDatePicker( ) |
2490 | { | 2493 | { |
2491 | //qDebug("CalendarView::showDatePicker( ) "); | 2494 | //qDebug("CalendarView::showDatePicker( ) "); |
2492 | if ( mDateFrame->isVisible() ) | 2495 | if ( mDateFrame->isVisible() ) |
2493 | mDateFrame->hide(); | 2496 | mDateFrame->hide(); |
2494 | else { | 2497 | else { |
2495 | int w =mDatePicker->sizeHint().width() ; | 2498 | int w =mDatePicker->sizeHint().width() ; |
2496 | int h = mDatePicker->sizeHint().height() ; | 2499 | int h = mDatePicker->sizeHint().height() ; |
2497 | int dw = QApplication::desktop()->width(); | 2500 | int dw = QApplication::desktop()->width(); |
2498 | int dh = QApplication::desktop()->height(); | 2501 | int dh = QApplication::desktop()->height(); |
2499 | mDateFrame->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 2502 | mDateFrame->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
2500 | mDateFrame->show(); | 2503 | mDateFrame->show(); |
2501 | } | 2504 | } |
2502 | mDatePickerMode = 1; | 2505 | mDatePickerMode = 1; |
2503 | mDatePicker->setDate( mNavigator->selectedDates().first() ); | 2506 | mDatePicker->setDate( mNavigator->selectedDates().first() ); |
2504 | } | 2507 | } |
2505 | 2508 | ||
2506 | void CalendarView::showEventEditor() | 2509 | void CalendarView::showEventEditor() |
2507 | { | 2510 | { |
2508 | #ifdef DESKTOP_VERSION | 2511 | #ifdef DESKTOP_VERSION |
2509 | mEventEditor->show(); | 2512 | mEventEditor->show(); |
2510 | #else | 2513 | #else |
2511 | if ( mEventEditor->width() < QApplication::desktop()->width() -60 || mEventEditor->width() > QApplication::desktop()->width() ) { | 2514 | if ( mEventEditor->width() < QApplication::desktop()->width() -60 || mEventEditor->width() > QApplication::desktop()->width() ) { |
2512 | topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); | 2515 | topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); |
2513 | qDebug("KO: CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() ); | 2516 | qDebug("KO: CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() ); |
2517 | qApp->processEvents(); | ||
2514 | delete mEventEditor; | 2518 | delete mEventEditor; |
2515 | mEventEditor = mDialogManager->getEventEditor(); | 2519 | mEventEditor = mDialogManager->getEventEditor(); |
2516 | topLevelWidget()->setCaption( i18n("") ); | 2520 | topLevelWidget()->setCaption( i18n("") ); |
2517 | } | 2521 | } |
2518 | mEventEditor->showMaximized(); | 2522 | mEventEditor->showMaximized(); |
2519 | #endif | 2523 | #endif |
2520 | } | 2524 | } |
2521 | void CalendarView::showTodoEditor() | 2525 | void CalendarView::showTodoEditor() |
2522 | { | 2526 | { |
2523 | #ifdef DESKTOP_VERSION | 2527 | #ifdef DESKTOP_VERSION |
2524 | mTodoEditor->show(); | 2528 | mTodoEditor->show(); |
2525 | #else | 2529 | #else |
2526 | if ( mTodoEditor->width() < QApplication::desktop()->width() -60|| mTodoEditor->width() > QApplication::desktop()->width() ) { | 2530 | if ( mTodoEditor->width() < QApplication::desktop()->width() -60|| mTodoEditor->width() > QApplication::desktop()->width() ) { |
2527 | topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); | 2531 | topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); |
2528 | qDebug("KO: CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() ); | 2532 | qDebug("KO: CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() ); |
2533 | qApp->processEvents(); | ||
2529 | delete mTodoEditor; | 2534 | delete mTodoEditor; |
2530 | mTodoEditor = mDialogManager->getTodoEditor(); | 2535 | mTodoEditor = mDialogManager->getTodoEditor(); |
2531 | topLevelWidget()->setCaption( i18n("") ); | 2536 | topLevelWidget()->setCaption( i18n("") ); |
2532 | } | 2537 | } |
2533 | mTodoEditor->showMaximized(); | 2538 | mTodoEditor->showMaximized(); |
2534 | #endif | 2539 | #endif |
2535 | } | 2540 | } |
2536 | 2541 | ||
2537 | void CalendarView::cloneIncidence() | 2542 | void CalendarView::cloneIncidence() |
2538 | { | 2543 | { |
2539 | Incidence *incidence = currentSelection(); | 2544 | Incidence *incidence = currentSelection(); |
2540 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); | 2545 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); |
2541 | if ( incidence ) { | 2546 | if ( incidence ) { |
2542 | cloneIncidence(incidence); | 2547 | cloneIncidence(incidence); |
2543 | } | 2548 | } |
2544 | } | 2549 | } |
2545 | void CalendarView::moveIncidence() | 2550 | void CalendarView::moveIncidence() |
2546 | { | 2551 | { |
2547 | Incidence *incidence = currentSelection(); | 2552 | Incidence *incidence = currentSelection(); |
2548 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); | 2553 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); |
2549 | if ( incidence ) { | 2554 | if ( incidence ) { |
2550 | moveIncidence(incidence); | 2555 | moveIncidence(incidence); |
2551 | } | 2556 | } |
2552 | } | 2557 | } |
2553 | void CalendarView::beamIncidence() | 2558 | void CalendarView::beamIncidence() |
2554 | { | 2559 | { |
2555 | Incidence *incidence = currentSelection(); | 2560 | Incidence *incidence = currentSelection(); |
2556 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); | 2561 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); |
2557 | if ( incidence ) { | 2562 | if ( incidence ) { |
2558 | beamIncidence(incidence); | 2563 | beamIncidence(incidence); |
2559 | } | 2564 | } |
2560 | } | 2565 | } |
2561 | void CalendarView::toggleCancelIncidence() | 2566 | void CalendarView::toggleCancelIncidence() |
2562 | { | 2567 | { |
2563 | Incidence *incidence = currentSelection(); | 2568 | Incidence *incidence = currentSelection(); |
2564 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); | 2569 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); |
2565 | if ( incidence ) { | 2570 | if ( incidence ) { |
2566 | cancelIncidence(incidence); | 2571 | cancelIncidence(incidence); |
2567 | } | 2572 | } |
2568 | } | 2573 | } |
2569 | 2574 | ||
2570 | 2575 | ||
2571 | void CalendarView::cancelIncidence(Incidence * inc ) | 2576 | void CalendarView::cancelIncidence(Incidence * inc ) |
2572 | { | 2577 | { |
2573 | inc->setCancelled( ! inc->cancelled() ); | 2578 | inc->setCancelled( ! inc->cancelled() ); |
2574 | changeIncidenceDisplay( inc,KOGlobals::EVENTEDITED ); | 2579 | changeIncidenceDisplay( inc,KOGlobals::EVENTEDITED ); |
2575 | updateView(); | 2580 | updateView(); |
2576 | } | 2581 | } |
2577 | void CalendarView::cloneIncidence(Incidence * orgInc ) | 2582 | void CalendarView::cloneIncidence(Incidence * orgInc ) |
2578 | { | 2583 | { |
2579 | Incidence * newInc = orgInc->clone(); | 2584 | Incidence * newInc = orgInc->clone(); |
2580 | newInc->recreate(); | 2585 | newInc->recreate(); |
2581 | 2586 | ||
2582 | if ( newInc->type() == "Todo" ) { | 2587 | if ( newInc->type() == "Todo" ) { |
2583 | Todo* t = (Todo*) newInc; | 2588 | Todo* t = (Todo*) newInc; |
2584 | showTodoEditor(); | 2589 | showTodoEditor(); |
2585 | mTodoEditor->editTodo( t ); | 2590 | mTodoEditor->editTodo( t ); |
2586 | if ( mTodoEditor->exec() ) { | 2591 | if ( mTodoEditor->exec() ) { |
2587 | mCalendar->addTodo( t ); | 2592 | mCalendar->addTodo( t ); |
2588 | updateView(); | 2593 | updateView(); |
2589 | } else { | 2594 | } else { |
2590 | delete t; | 2595 | delete t; |
2591 | } | 2596 | } |
2592 | } | 2597 | } |
2593 | else { | 2598 | else { |
2594 | Event* e = (Event*) newInc; | 2599 | Event* e = (Event*) newInc; |
2595 | showEventEditor(); | 2600 | showEventEditor(); |
2596 | mEventEditor->editEvent( e ); | 2601 | mEventEditor->editEvent( e ); |
2597 | if ( mEventEditor->exec() ) { | 2602 | if ( mEventEditor->exec() ) { |
2598 | mCalendar->addEvent( e ); | 2603 | mCalendar->addEvent( e ); |
2599 | updateView(); | 2604 | updateView(); |
2600 | } else { | 2605 | } else { |
2601 | delete e; | 2606 | delete e; |
2602 | } | 2607 | } |
2603 | } | 2608 | } |
2604 | } | 2609 | } |
2605 | 2610 | ||
2606 | void CalendarView::newEvent() | 2611 | void CalendarView::newEvent() |
2607 | { | 2612 | { |
2608 | // TODO: Replace this code by a common eventDurationHint of KOBaseView. | 2613 | // TODO: Replace this code by a common eventDurationHint of KOBaseView. |
2609 | KOAgendaView *aView = mViewManager->agendaView(); | 2614 | KOAgendaView *aView = mViewManager->agendaView(); |
2610 | if (aView) { | 2615 | if (aView) { |
2611 | if (aView->selectionStart().isValid()) { | 2616 | if (aView->selectionStart().isValid()) { |
2612 | if (aView->selectedIsAllDay()) { | 2617 | if (aView->selectedIsAllDay()) { |
2613 | newEvent(aView->selectionStart(),aView->selectionEnd(),true); | 2618 | newEvent(aView->selectionStart(),aView->selectionEnd(),true); |
2614 | } else { | 2619 | } else { |
2615 | newEvent(aView->selectionStart(),aView->selectionEnd()); | 2620 | newEvent(aView->selectionStart(),aView->selectionEnd()); |
2616 | } | 2621 | } |
2617 | return; | 2622 | return; |
2618 | } | 2623 | } |
2619 | } | 2624 | } |
2620 | 2625 | ||
2621 | QDate date = mNavigator->selectedDates().first(); | 2626 | QDate date = mNavigator->selectedDates().first(); |
2622 | QDateTime current = QDateTime::currentDateTime(); | 2627 | QDateTime current = QDateTime::currentDateTime(); |
2623 | if ( date <= current.date() ) { | 2628 | if ( date <= current.date() ) { |
2624 | int hour = current.time().hour() +1; | 2629 | int hour = current.time().hour() +1; |
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp index 7166a01..4111c5d 100644 --- a/korganizer/kowhatsnextview.cpp +++ b/korganizer/kowhatsnextview.cpp | |||
@@ -507,235 +507,246 @@ bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool a | |||
507 | QString dateText; | 507 | QString dateText; |
508 | // qDebug("%s %s %s %s ", mEventDate.toString().latin1(),event->summary().latin1(), st .toString().latin1(),end.toString().latin1() ); | 508 | // qDebug("%s %s %s %s ", mEventDate.toString().latin1(),event->summary().latin1(), st .toString().latin1(),end.toString().latin1() ); |
509 | if ( st.date() < mEventDate ) | 509 | if ( st.date() < mEventDate ) |
510 | dateText = "++:++-"; | 510 | dateText = "++:++-"; |
511 | else | 511 | else |
512 | dateText = event->dtStartTimeStr() + "-"; | 512 | dateText = event->dtStartTimeStr() + "-"; |
513 | if ( end.date() > mEventDate ) | 513 | if ( end.date() > mEventDate ) |
514 | dateText += "++:++"; | 514 | dateText += "++:++"; |
515 | else | 515 | else |
516 | dateText += event->dtEndTimeStr(); | 516 | dateText += event->dtEndTimeStr(); |
517 | if ( notRed ) | 517 | if ( notRed ) |
518 | tempText += dateText; | 518 | tempText += dateText; |
519 | else { | 519 | else { |
520 | if ( end < cdt ) { | 520 | if ( end < cdt ) { |
521 | if ( !KOPrefs::instance()->mWNViewShowsPast ) | 521 | if ( !KOPrefs::instance()->mWNViewShowsPast ) |
522 | return false; | 522 | return false; |
523 | tempText += "<font color=\"#F00000\">" + dateText + "</font>"; | 523 | tempText += "<font color=\"#F00000\">" + dateText + "</font>"; |
524 | } | 524 | } |
525 | else if ( st < cdt ) | 525 | else if ( st < cdt ) |
526 | tempText += "<font color=\"#008000\">" + dateText + "</font>"; | 526 | tempText += "<font color=\"#008000\">" + dateText + "</font>"; |
527 | else | 527 | else |
528 | tempText += dateText; | 528 | tempText += dateText; |
529 | 529 | ||
530 | } | 530 | } |
531 | 531 | ||
532 | } else { | 532 | } else { |
533 | tempText += i18n("Allday:"); | 533 | tempText += i18n("Allday:"); |
534 | 534 | ||
535 | } | 535 | } |
536 | } | 536 | } |
537 | } else { | 537 | } else { |
538 | mTodos.append( ev ); | 538 | mTodos.append( ev ); |
539 | tempText += i18n("ToDo:"); | 539 | tempText += i18n("ToDo:"); |
540 | if (reply) { | 540 | if (reply) { |
541 | tempText += " "; | 541 | tempText += " "; |
542 | if ( noc != cdt ) { | 542 | if ( noc != cdt ) { |
543 | tempText += KGlobal::locale()->formatDate( noc.date() , KOPrefs::instance()->mShortDateInViewer) +": "; | 543 | tempText += KGlobal::locale()->formatDate( noc.date() , KOPrefs::instance()->mShortDateInViewer) +": "; |
544 | } | 544 | } |
545 | } else { | 545 | } else { |
546 | if ( ((Todo*)ev)->dtDue().date() < QDate::currentDate() ) { | 546 | if ( ((Todo*)ev)->dtDue().date() < QDate::currentDate() ) { |
547 | // tempText +="<font color=\"#F00000\">" + i18n("O-due!") + "</font>"; | 547 | // tempText +="<font color=\"#F00000\">" + i18n("O-due!") + "</font>"; |
548 | QString dfs = KGlobal::locale()->dateFormatShort(); | 548 | QString dfs = KGlobal::locale()->dateFormatShort(); |
549 | KGlobal::locale()->setDateFormatShort("%d.%b"); | 549 | KGlobal::locale()->setDateFormatShort("%d.%b"); |
550 | tempText +="<font color=\"#F00000\">" + KGlobal::locale()->formatDate(((Todo*)ev)->dtDue().date(), true, KLocale::Userdefined) + "</font>"; | 550 | tempText +="<font color=\"#F00000\">" + KGlobal::locale()->formatDate(((Todo*)ev)->dtDue().date(), true, KLocale::Userdefined) + "</font>"; |
551 | KGlobal::locale()->setDateFormatShort(dfs); | 551 | KGlobal::locale()->setDateFormatShort(dfs); |
552 | } else { | 552 | } else { |
553 | if (!ev->doesFloat() ) | 553 | if (!ev->doesFloat() ) |
554 | if( ( (Todo*)ev)->dtDue() < cdt ) { | 554 | if( ( (Todo*)ev)->dtDue() < cdt ) { |
555 | tempText +="<font color=\"#F00000\">" + ((Todo*)ev)->dtDueTimeStr() + "</font>"; | 555 | tempText +="<font color=\"#F00000\">" + ((Todo*)ev)->dtDueTimeStr() + "</font>"; |
556 | 556 | ||
557 | 557 | ||
558 | } else | 558 | } else |
559 | tempText +=((Todo*)ev)->dtDueTimeStr(); | 559 | tempText +=((Todo*)ev)->dtDueTimeStr(); |
560 | mTodos.append( ev ); | 560 | mTodos.append( ev ); |
561 | } | 561 | } |
562 | } | 562 | } |
563 | } | 563 | } |
564 | tempText += "</b></td><td>"; | 564 | tempText += "</b></td><td>"; |
565 | bool needClose = false; | 565 | bool needClose = false; |
566 | if ( ev->cancelled() ) { | 566 | if ( ev->cancelled() ) { |
567 | tempText += "<font color=\"#F00000\">[c"; | 567 | tempText += "<font color=\"#F00000\">[c"; |
568 | needClose =true; | 568 | needClose =true; |
569 | 569 | ||
570 | } | 570 | } |
571 | if ( ev->isAlarmEnabled() ) { | 571 | if ( ev->isAlarmEnabled() ) { |
572 | if ( !needClose) | 572 | if ( !needClose) |
573 | tempText +="["; | 573 | tempText +="["; |
574 | tempText += "a"; | 574 | tempText += "a"; |
575 | needClose =true; | 575 | needClose =true; |
576 | 576 | ||
577 | } | 577 | } |
578 | if ( ev->description().length() > 0 ) { | 578 | if ( ev->description().length() > 0 ) { |
579 | if ( !needClose) | 579 | if ( !needClose) |
580 | tempText +="["; | 580 | tempText +="["; |
581 | tempText += "i"; | 581 | tempText += "i"; |
582 | needClose =true; | 582 | needClose =true; |
583 | } | 583 | } |
584 | if ( ev->recurrence()->doesRecur() ) { | 584 | if ( ev->recurrence()->doesRecur() ) { |
585 | if ( !needClose) | 585 | if ( !needClose) |
586 | tempText +="["; | 586 | tempText +="["; |
587 | tempText += "r"; | 587 | tempText += "r"; |
588 | needClose =true; | 588 | needClose =true; |
589 | } | 589 | } |
590 | if ( needClose ) { | 590 | if ( needClose ) { |
591 | tempText += "] "; | 591 | tempText += "] "; |
592 | } | 592 | } |
593 | if ( ev->cancelled() ) | 593 | if ( ev->cancelled() ) |
594 | tempText += "</font>"; | 594 | tempText += "</font>"; |
595 | tempText += "<a "; | 595 | tempText += "<a "; |
596 | if (ev->type()=="Event") tempText += "href=\"event:"; | 596 | if (ev->type()=="Event") tempText += "href=\"event:"; |
597 | if (ev->type()=="Todo") tempText += "href=\"todo:"; | 597 | if (ev->type()=="Todo") tempText += "href=\"todo:"; |
598 | tempText += ev->uid() + "\">"; | 598 | tempText += ev->uid() + "\">"; |
599 | if ( ev->summary().length() > 0 ) | 599 | if ( ev->summary().length() > 0 ) |
600 | tempText += ev->summary(); | 600 | tempText += ev->summary(); |
601 | else | 601 | else |
602 | tempText += i18n("-no summary-"); | 602 | tempText += i18n("-no summary-"); |
603 | if ( ev->categories().contains( i18n("Birthday") ) || ev->categories().contains( i18n("Anniversary") ) ) { | ||
604 | noc = ev->getNextOccurence( cdt, &ok ); | ||
605 | if ( ok ) { | ||
606 | int years = noc.date().year() - ev->dtStart().date().year(); | ||
607 | tempText += i18n(" (%1 y.)"). arg( years ); | ||
608 | } | ||
609 | } | ||
610 | |||
603 | tempText += "</a>"; | 611 | tempText += "</a>"; |
604 | if ( KOPrefs::instance()->mWNViewShowLocation ) | 612 | if ( KOPrefs::instance()->mWNViewShowLocation ) |
605 | if ( !ev->location().isEmpty() ) | 613 | if ( !ev->location().isEmpty() ) |
606 | tempText += " ("+ev->location() +")"; | 614 | tempText += " ("+ev->location() +")"; |
607 | if ( ev->relatedTo() && KOPrefs::instance()->mWNViewShowsParents) | 615 | if ( ev->relatedTo() && KOPrefs::instance()->mWNViewShowsParents) |
608 | tempText += " ["+ev->relatedTo()->summary() +"]"; | 616 | tempText += " ["+ev->relatedTo()->summary() +"]"; |
609 | tempText += "</td></tr>\n"; | 617 | tempText += "</td></tr>\n"; |
610 | mText += tempText; | 618 | mText += tempText; |
611 | return true; | 619 | return true; |
612 | } | 620 | } |
613 | 621 | ||
614 | bool KOWhatsNextView::appendTodo(Incidence *ev, QString ind , bool isSub ) | 622 | bool KOWhatsNextView::appendTodo(Incidence *ev, QString ind , bool isSub ) |
615 | { | 623 | { |
616 | if ( mTodos.find( ev ) != mTodos.end() ) return false; | 624 | if ( mTodos.find( ev ) != mTodos.end() ) return false; |
617 | 625 | ||
618 | mTodos.append( ev ); | 626 | mTodos.append( ev ); |
619 | if ( !isSub ) | 627 | if ( !isSub ) |
620 | mText += "<p>"; | 628 | mText += "<p>"; |
621 | else | 629 | else |
622 | mText += "<li>"; | 630 | mText += "<li>"; |
623 | mText += "[" +QString::number(ev->priority()) + "/" + QString::number(((Todo*)ev)->percentComplete())+"%] "; | 631 | mText += "[" +QString::number(ev->priority()) + "/" + QString::number(((Todo*)ev)->percentComplete())+"%] "; |
624 | 632 | ||
625 | 633 | ||
626 | mText += ind; | 634 | mText += ind; |
627 | bool needClose = false; | 635 | bool needClose = false; |
628 | if ( ev->cancelled() ) { | 636 | if ( ev->cancelled() ) { |
629 | mText += "<font color=\"#F00000\">[c"; | 637 | mText += "<font color=\"#F00000\">[c"; |
630 | needClose =true; | 638 | needClose =true; |
631 | 639 | ||
632 | } | 640 | } |
633 | if ( ev->isAlarmEnabled() ) { | 641 | if ( ev->isAlarmEnabled() ) { |
634 | if ( !needClose) | 642 | if ( !needClose) |
635 | mText +="["; | 643 | mText +="["; |
636 | mText += "a"; | 644 | mText += "a"; |
637 | needClose =true; | 645 | needClose =true; |
638 | 646 | ||
639 | } | 647 | } |
640 | 648 | ||
641 | if ( ev->description().length() > 0 ) { | 649 | if ( ev->description().length() > 0 ) { |
642 | if ( !needClose) | 650 | if ( !needClose) |
643 | mText +="["; | 651 | mText +="["; |
644 | mText += "i"; | 652 | mText += "i"; |
645 | needClose =true; | 653 | needClose =true; |
646 | } | 654 | } |
647 | // if ( ev->recurrence()->doesRecur() ) { | 655 | // if ( ev->recurrence()->doesRecur() ) { |
648 | // if ( !needClose) | 656 | // if ( !needClose) |
649 | // mText +="("; | 657 | // mText +="("; |
650 | // mText += "r"; | 658 | // mText += "r"; |
651 | // needClose =true; | 659 | // needClose =true; |
652 | // } | 660 | // } |
653 | if ( needClose ) | 661 | if ( needClose ) |
654 | mText += "] "; | 662 | mText += "] "; |
655 | if ( ev->cancelled() ) | 663 | if ( ev->cancelled() ) |
656 | mText += "</font>"; | 664 | mText += "</font>"; |
657 | mText += "<a href=\"todo:" + ev->uid() + "\">"; | 665 | mText += "<a href=\"todo:" + ev->uid() + "\">"; |
658 | mText += ev->summary(); | 666 | if ( ev->summary().length() > 0 ) |
667 | mText += ev->summary(); | ||
668 | else | ||
669 | mText += i18n("-no summary-"); | ||
659 | mText += "</a>"; | 670 | mText += "</a>"; |
660 | if ( ((Todo*)ev)->hasDueDate () ) { | 671 | if ( ((Todo*)ev)->hasDueDate () ) { |
661 | QString year = ""; | 672 | QString year = ""; |
662 | int ye = ((Todo*)ev)->dtDue().date().year(); | 673 | int ye = ((Todo*)ev)->dtDue().date().year(); |
663 | if ( QDateTime::currentDateTime().date().year() != ye ) | 674 | if ( QDateTime::currentDateTime().date().year() != ye ) |
664 | year = QString::number( ye ); | 675 | year = QString::number( ye ); |
665 | QString dfs = KGlobal::locale()->dateFormatShort(); | 676 | QString dfs = KGlobal::locale()->dateFormatShort(); |
666 | KGlobal::locale()->setDateFormatShort("%d.%b"); | 677 | KGlobal::locale()->setDateFormatShort("%d.%b"); |
667 | mText +="<font color=\"#00A000\"> [" + KGlobal::locale()->formatDate(((Todo*)ev)->dtDue().date(), true, KLocale::Userdefined) + "."+ year +"]</font>"; | 678 | mText +="<font color=\"#00A000\"> [" + KGlobal::locale()->formatDate(((Todo*)ev)->dtDue().date(), true, KLocale::Userdefined) + "."+ year +"]</font>"; |
668 | KGlobal::locale()->setDateFormatShort(dfs); | 679 | KGlobal::locale()->setDateFormatShort(dfs); |
669 | } | 680 | } |
670 | if ( KOPrefs::instance()->mWNViewShowLocation ) | 681 | if ( KOPrefs::instance()->mWNViewShowLocation ) |
671 | if ( !ev->location().isEmpty() ) | 682 | if ( !ev->location().isEmpty() ) |
672 | mText += " ("+ev->location() +")"; | 683 | mText += " ("+ev->location() +")"; |
673 | if ( !isSub ) { | 684 | if ( !isSub ) { |
674 | if ( ((Todo*)ev)->relatedTo()&& KOPrefs::instance()->mWNViewShowsParents) | 685 | if ( ((Todo*)ev)->relatedTo()&& KOPrefs::instance()->mWNViewShowsParents) |
675 | mText += " ["+ev->relatedTo()->summary() +"]"; | 686 | mText += " ["+ev->relatedTo()->summary() +"]"; |
676 | mText += "</p>\n"; | 687 | mText += "</p>\n"; |
677 | } | 688 | } |
678 | else { | 689 | else { |
679 | ind += "-"; | 690 | ind += "-"; |
680 | mText += "</li>\n"; | 691 | mText += "</li>\n"; |
681 | } | 692 | } |
682 | QPtrList<Incidence> Relations = ev->relations(); | 693 | QPtrList<Incidence> Relations = ev->relations(); |
683 | Incidence *to; | 694 | Incidence *to; |
684 | for (to=Relations.first();to;to=Relations.next()) { | 695 | for (to=Relations.first();to;to=Relations.next()) { |
685 | if (!((Todo*)to)->isCompleted()) | 696 | if (!((Todo*)to)->isCompleted()) |
686 | appendTodo( to, ind , true ); | 697 | appendTodo( to, ind , true ); |
687 | } | 698 | } |
688 | 699 | ||
689 | return true; | 700 | return true; |
690 | } | 701 | } |
691 | 702 | ||
692 | /* | 703 | /* |
693 | void KOWhatsNextView::createEventViewer() | 704 | void KOWhatsNextView::createEventViewer() |
694 | { | 705 | { |
695 | if (!mEventViewer) { | 706 | if (!mEventViewer) { |
696 | 707 | ||
697 | mEventViewer = new KOEventViewerDialog(this); | 708 | mEventViewer = new KOEventViewerDialog(this); |
698 | } | 709 | } |
699 | } | 710 | } |
700 | */ | 711 | */ |
701 | void KOWhatsNextView::setEventViewer(KOEventViewerDialog* v ) | 712 | void KOWhatsNextView::setEventViewer(KOEventViewerDialog* v ) |
702 | { | 713 | { |
703 | mEventViewer = v; | 714 | mEventViewer = v; |
704 | } | 715 | } |
705 | 716 | ||
706 | // TODO: Create this function in CalendarView and remove it from here | 717 | // TODO: Create this function in CalendarView and remove it from here |
707 | void KOWhatsNextView::showIncidence(const QString &uid) | 718 | void KOWhatsNextView::showIncidence(const QString &uid) |
708 | { | 719 | { |
709 | 720 | ||
710 | if ( !mEventViewer ) { | 721 | if ( !mEventViewer ) { |
711 | qDebug("KOWhatsNextView::showIncidence::sorry, no event viewer set "); | 722 | qDebug("KOWhatsNextView::showIncidence::sorry, no event viewer set "); |
712 | return; | 723 | return; |
713 | } | 724 | } |
714 | //kdDebug() << "KOWhatsNextView::showIncidence(): " << uid << endl; | 725 | //kdDebug() << "KOWhatsNextView::showIncidence(): " << uid << endl; |
715 | //qDebug("KOWhatsNextView::showIncidence %s ", uid.latin1()); | 726 | //qDebug("KOWhatsNextView::showIncidence %s ", uid.latin1()); |
716 | if (uid.startsWith("event:")) { | 727 | if (uid.startsWith("event:")) { |
717 | #ifdef DESKTOP_VERSION | 728 | #ifdef DESKTOP_VERSION |
718 | Event *event = calendar()->event(uid.mid(8)); | 729 | Event *event = calendar()->event(uid.mid(8)); |
719 | #else | 730 | #else |
720 | Event *event = calendar()->event(uid.mid(6)); | 731 | Event *event = calendar()->event(uid.mid(6)); |
721 | #endif | 732 | #endif |
722 | //qDebug("event %d uid %s ", event, uid.mid(6).latin1()); | 733 | //qDebug("event %d uid %s ", event, uid.mid(6).latin1()); |
723 | if (!event) return; | 734 | if (!event) return; |
724 | //createEventViewer(); | 735 | //createEventViewer(); |
725 | mEventViewer->setEvent(event); | 736 | mEventViewer->setEvent(event); |
726 | } else if (uid.startsWith("todo:")) { | 737 | } else if (uid.startsWith("todo:")) { |
727 | #ifdef DESKTOP_VERSION | 738 | #ifdef DESKTOP_VERSION |
728 | Todo *todo = calendar()->todo(uid.mid(7)); | 739 | Todo *todo = calendar()->todo(uid.mid(7)); |
729 | #else | 740 | #else |
730 | Todo *todo = calendar()->todo(uid.mid(5)); | 741 | Todo *todo = calendar()->todo(uid.mid(5)); |
731 | #endif | 742 | #endif |
732 | if (!todo) return; | 743 | if (!todo) return; |
733 | //createEventViewer(); | 744 | //createEventViewer(); |
734 | mEventViewer->setTodo(todo); | 745 | mEventViewer->setTodo(todo); |
735 | } else { | 746 | } else { |
736 | return; | 747 | return; |
737 | 748 | ||
738 | } | 749 | } |
739 | mEventViewer->showMe(); | 750 | mEventViewer->showMe(); |
740 | mEventViewer->raise(); | 751 | mEventViewer->raise(); |
741 | } | 752 | } |