summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-02-05 14:31:01 (UTC)
committer zautrix <zautrix>2005-02-05 14:31:01 (UTC)
commit231a90376b096687770b2b029d4a3d2efa232b2e (patch) (unidiff)
tree609a9b8434fe28eab8ea9a1a7e4441a37be0b246
parent7be6218eaf6bd29d4bc09d0bb79bb0dec6da9ae5 (diff)
downloadkdepimpi-231a90376b096687770b2b029d4a3d2efa232b2e.zip
kdepimpi-231a90376b096687770b2b029d4a3d2efa232b2e.tar.gz
kdepimpi-231a90376b096687770b2b029d4a3d2efa232b2e.tar.bz2
many fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt5
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt6
-rw-r--r--korganizer/journalentry.cpp83
-rw-r--r--korganizer/journalentry.h2
-rw-r--r--korganizer/koeventeditor.cpp4
-rw-r--r--microkde/kfiledialog.cpp4
-rw-r--r--microkde/ktextedit.h1
7 files changed, 99 insertions, 6 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 4421e61..41c60ea 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,154 +1,159 @@
1Info about the changes in new versions of KDE-Pim/Pi 1Info about the changes in new versions of KDE-Pim/Pi
2 2
3********** VERSION 2.0.3 ************ 3********** VERSION 2.0.3 ************
4 4
5KO/Pi: 5KO/Pi:
6Added feature for changing alarm settings for many items at once: 6Added feature for changing alarm settings for many items at once:
7Open list view (or search dialog), select the desired items and choose in 7Open list view (or search dialog), select the desired items and choose in
8the popup menu: Set alarm for selected... 8the popup menu: Set alarm for selected...
9 9
10Added to the event/todo viewer the option to send an email to 10Added to the event/todo viewer the option to send an email to
11all attendees or all selected (with RSVP) attendees. 11all attendees or all selected (with RSVP) attendees.
12 12
13Made the week-month mode changing in month view faster. 13Made the week-month mode changing in month view faster.
14 14
15Made month view better useable with keyboard. 15Made month view better useable with keyboard.
16Now TAB key jumps to next cell with an event/todo. 16Now TAB key jumps to next cell with an event/todo.
17Scroll in cell with coursor keys, scroll in time (next week) with 17Scroll in cell with coursor keys, scroll in time (next week) with
18Shift/Control + coursorkeys. 18Shift/Control + coursorkeys.
19 19
20Fixed bug that the todo view flat mode was reset after first view update. 20Fixed bug that the todo view flat mode was reset after first view update.
21 21
22If a todo is displayed closed in the todo view, 22If a todo is displayed closed in the todo view,
23it is now displayed in overdue/due today color depending on the subtodos overdue/due today properties. 23it is now displayed in overdue/due today color depending on the subtodos overdue/due today properties.
24 24
25Added info about the numbers of years to the caption (title) information about a birthday event. 25Added info about the numbers of years to the caption (title) information about a birthday event.
26 26
27Made completion date in todo editor editable.
28
29Added possibility to save/load templates for journals.
30(Which is just a simple "save text to file" or "insert text from file".
31
27********** VERSION 2.0.2 ************ 32********** VERSION 2.0.2 ************
28 33
29KO/Pi: 34KO/Pi:
30Fixed the layout problem of the day label buttons 35Fixed the layout problem of the day label buttons
31of the agenda view introduced in version 2.0.1. 36of the agenda view introduced in version 2.0.1.
32 37
33Added WhatsThis support for the todo view and the list view. 38Added WhatsThis support for the todo view and the list view.
34 39
35Added a quite useful feature to the montview. 40Added a quite useful feature to the montview.
36Just click on the week numbers on the left. 41Just click on the week numbers on the left.
37And in the top right corner of month view/agenda view 42And in the top right corner of month view/agenda view
38there is now a "week number quick selector". 43there is now a "week number quick selector".
39(Click on the black triangle). 44(Click on the black triangle).
40 45
41Made the quite difficult timezone change in KO/Pi easy. 46Made the quite difficult timezone change in KO/Pi easy.
42 47
43OM/Pi: 48OM/Pi:
44Fixed too small icons on desktop. 49Fixed too small icons on desktop.
45Fixed non visible icons in mainwindow on Z with fastload enabled. 50Fixed non visible icons in mainwindow on Z with fastload enabled.
46Added signature file setting to smtp account config. 51Added signature file setting to smtp account config.
47And the signature can be edited and saved in the edit mail dialog. 52And the signature can be edited and saved in the edit mail dialog.
48That does mean: 53That does mean:
49Simply edit the signature for the selected smtp account in the 54Simply edit the signature for the selected smtp account in the
50edit new mail dialog and press the "save signature" button there. 55edit new mail dialog and press the "save signature" button there.
51Then the signature is saved to the file specified in the smtp account settings. 56Then the signature is saved to the file specified in the smtp account settings.
52If there is no file specified, it is saved automatically to the file 57If there is no file specified, it is saved automatically to the file
53kdepim/apps/kopiemail/<accountname>.sig. 58kdepim/apps/kopiemail/<accountname>.sig.
54 59
55 60
56 61
57********** VERSION 2.0.1 ************ 62********** VERSION 2.0.1 ************
58 63
59Oooops ... I forgot to test on the Zaurus 5500 ... 64Oooops ... I forgot to test on the Zaurus 5500 ...
60 65
61Fixed many problems of new (english) strings (and german translations) 66Fixed many problems of new (english) strings (and german translations)
62introduced in the latest versions, where the text was not fitting on the 67introduced in the latest versions, where the text was not fitting on the
63240x320 display of the Zaurus 5500. 68240x320 display of the Zaurus 5500.
64 69
65KO/Pi: 70KO/Pi:
66Added a popup menu ( press pen and hold to get popup ) to the agenda view 71Added a popup menu ( press pen and hold to get popup ) to the agenda view
67with many useful items (add event/todo, show next week, two weeks, month, journal). 72with many useful items (add event/todo, show next week, two weeks, month, journal).
68 73
69Added items to the todolist popup menu for: 74Added items to the todolist popup menu for:
70Display all opened, all closed or all todos flat. 75Display all opened, all closed or all todos flat.
71The "flat" view makes is possible to sort all todos after ,e.g., prio or date. 76The "flat" view makes is possible to sort all todos after ,e.g., prio or date.
72Made the reparenting of todos on the desktop possible via Drag&Drop. 77Made the reparenting of todos on the desktop possible via Drag&Drop.
73Fixed several bugs in setting the completed datetime for todos. 78Fixed several bugs in setting the completed datetime for todos.
74Added info about completed datetime of todos to the todo viewer. 79Added info about completed datetime of todos to the todo viewer.
75Now displaying a completed todo (with completed datetime set) in the agenda view 80Now displaying a completed todo (with completed datetime set) in the agenda view
76at the time of the completion. Such that now it is possible to see in the agenda view 81at the time of the completion. Such that now it is possible to see in the agenda view
77when what todo was completed. 82when what todo was completed.
78Fixed behaviour of automatic setting completion of todos with sub-todos/parent todos. 83Fixed behaviour of automatic setting completion of todos with sub-todos/parent todos.
79Now the behaviour is: 84Now the behaviour is:
80Setting a parent to complete sets all (sub)childs to complete. 85Setting a parent to complete sets all (sub)childs to complete.
81Setting a parent to uncomplete does not change the childs. 86Setting a parent to uncomplete does not change the childs.
82Setting a child to uncomplete sets all parent to uncomplete. 87Setting a child to uncomplete sets all parent to uncomplete.
83Setting a child to complete does not change the parents. 88Setting a child to complete does not change the parents.
84 89
85Smart updating and double buffering of the daymatrix. 90Smart updating and double buffering of the daymatrix.
86Showing holidays in the day matrix. 91Showing holidays in the day matrix.
87Many other small performance updates. 92Many other small performance updates.
88 93
89Made day labels in agenda clickable. By clicking a label, the day is displayed in single day mode. 94Made day labels in agenda clickable. By clicking a label, the day is displayed in single day mode.
90 95
91Now the translation file usertranslation.txt is supposed to be in utf8 format. 96Now the translation file usertranslation.txt is supposed to be in utf8 format.
92If you want to translate a language from western europe, just change the germantranslation.txt file. Please read the updated Usertranslation HowTo in KO/Pi Help menu. 97If you want to translate a language from western europe, just change the germantranslation.txt file. Please read the updated Usertranslation HowTo in KO/Pi Help menu.
93 98
94 99
95********** VERSION 2.0.0 ************ 100********** VERSION 2.0.0 ************
96 101
97Stable release 2.0.0! 102Stable release 2.0.0!
98 103
99KO/Pi: 104KO/Pi:
100Fixed problem in edit dialog recreation at startup. 105Fixed problem in edit dialog recreation at startup.
101Made "toggle view*" menu items enabled context sensitive. 106Made "toggle view*" menu items enabled context sensitive.
102Changed agenda size menu to items 1-10. 107Changed agenda size menu to items 1-10.
103Made it possible to change agenda size quickly by pressing mouse on timelabels in agenda view and move mouse up/down. 108Made it possible to change agenda size quickly by pressing mouse on timelabels in agenda view and move mouse up/down.
104Usebility enhancements in the KO/Pi menus. 109Usebility enhancements in the KO/Pi menus.
105Birthday import now adds year to summary. 110Birthday import now adds year to summary.
106What's Next view shows age in years for birthday. 111What's Next view shows age in years for birthday.
107 112
108OM/Pi: 113OM/Pi:
109Added three info lines to display subject, from and to of selected mails. 114Added three info lines to display subject, from and to of selected mails.
110 115
111KA/Pi: 116KA/Pi:
112Fixed jump bar behaviour on Zaurus. 117Fixed jump bar behaviour on Zaurus.
113Now KA/Pi search field supports searching for a range of starting characters. 118Now KA/Pi search field supports searching for a range of starting characters.
114E.g. to search for all contact beginning with b to n, type 119E.g. to search for all contact beginning with b to n, type
115b-n 120b-n
116in the search field. 121in the search field.
117 122
118********** VERSION 1.9.20 ************ 123********** VERSION 1.9.20 ************
119 124
120KO/Pi: 125KO/Pi:
121Added for the "dislplay one day" agenda mode 126Added for the "dislplay one day" agenda mode
122info in the caption and in the day lables: 127info in the caption and in the day lables:
123Now it is displayed, if the selected day is from "day before yesterday" 128Now it is displayed, if the selected day is from "day before yesterday"
124to "day after tomorrow". 129to "day after tomorrow".
125Made it possible to delete a Todo, which has sub-todos. 130Made it possible to delete a Todo, which has sub-todos.
126Fixed two small problems in the todo view. 131Fixed two small problems in the todo view.
127Added missing German translation for filter edit and print dialog. 132Added missing German translation for filter edit and print dialog.
128Made search dialog closeable by cancel key. 133Made search dialog closeable by cancel key.
129 134
130Made it possible to select in the date picker the (ligt grey ) 135Made it possible to select in the date picker the (ligt grey )
131dates of the prev./next month with the mouse. 136dates of the prev./next month with the mouse.
132 137
133OM/Pi: 138OM/Pi:
134"Delete mail" icon in main window now deletes all selected mails. 139"Delete mail" icon in main window now deletes all selected mails.
135Fixed the problem, that the state flag of imap mails was ignored. 140Fixed the problem, that the state flag of imap mails was ignored.
136Now mails with "FLAG_SEEN" on the imap server get no icon in the list view 141Now mails with "FLAG_SEEN" on the imap server get no icon in the list view
137to indecate that they are already seen. 142to indecate that they are already seen.
138Fixed the problem that the body of some mails was not displayed in the 143Fixed the problem that the body of some mails was not displayed in the
139mail viewer when fetching them from the imap server directly to read them. 144mail viewer when fetching them from the imap server directly to read them.
140Made it (configurable) possible to show the "To:" field in the list view. 145Made it (configurable) possible to show the "To:" field in the list view.
141Added to the mail viewer the option "View Source" to make it possible to see the raw mail data. 146Added to the mail viewer the option "View Source" to make it possible to see the raw mail data.
142Added a "Download Mail" button to the mail viewer to quickly download the viewed mail to the 147Added a "Download Mail" button to the mail viewer to quickly download the viewed mail to the
143local storage folder (specified in account settings) of the account of the mail. 148local storage folder (specified in account settings) of the account of the mail.
144Removed some memory leaks in OM/Pi. 149Removed some memory leaks in OM/Pi.
145 150
146 151
147********** VERSION 1.9.19 ************ 152********** VERSION 1.9.19 ************
148 153
149Added a lot of missing translations to KA/Pi, 154Added a lot of missing translations to KA/Pi,
150Added some missing translations to KO/Pi and OM/Pi. 155Added some missing translations to KO/Pi and OM/Pi.
151 156
152Fixed some minor problems in KA/Pi + KO/Pi. 157Fixed some minor problems in KA/Pi + KO/Pi.
153 158
154Fixed a crash when closing PwM/Pi. 159Fixed a crash when closing PwM/Pi.
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index b8080b5..5c18aaa 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1093,132 +1093,138 @@
1093{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, 1093{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" },
1094{ "Data storage path","Daten Speicherpfad" }, 1094{ "Data storage path","Daten Speicherpfad" },
1095{ "Language","Sprache" }, 1095{ "Language","Sprache" },
1096{ "Show time in agenda items","Zeige Zeit in Agenda Items" }, 1096{ "Show time in agenda items","Zeige Zeit in Agenda Items" },
1097{ "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, 1097{ "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" },
1098{ "Show events, that are done in \nWhat's Next view","Zeige abgelaufene Termine in\nWhat's Next Ansicht" }, 1098{ "Show events, that are done in \nWhat's Next view","Zeige abgelaufene Termine in\nWhat's Next Ansicht" },
1099{ "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" }, 1099{ "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" },
1100{ "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, 1100{ "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" },
1101{ "KO/Pi","KO/Pi" }, 1101{ "KO/Pi","KO/Pi" },
1102{ "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, 1102{ "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" },
1103{ "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, 1103{ "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." },
1104{ "Sound.Al.: ","Sound.Al.: " }, 1104{ "Sound.Al.: ","Sound.Al.: " },
1105{ "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, 1105{ "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" },
1106{ "Restore","Wiederherstellen" }, 1106{ "Restore","Wiederherstellen" },
1107{ "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" }, 1107{ "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" },
1108{ "% completed","% komplett" }, 1108{ "% completed","% komplett" },
1109{ "%d item(s) found.","%d Item(s) gefunden." }, 1109{ "%d item(s) found.","%d Item(s) gefunden." },
1110{ "Set complete","Setze auf erledigt" }, 1110{ "Set complete","Setze auf erledigt" },
1111{ "(cancelled)","(gecancelt)" }, 1111{ "(cancelled)","(gecancelt)" },
1112{ "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, 1112{ "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" },
1113{ " Local time "," Locale Zeit " }, 1113{ " Local time "," Locale Zeit " },
1114{ "Form2","Form2" }, 1114{ "Form2","Form2" },
1115{ "Filter enabled","Filter angeschaltet" }, 1115{ "Filter enabled","Filter angeschaltet" },
1116{ "Edit Filters","Ändere Filter" }, 1116{ "Edit Filters","Ändere Filter" },
1117{ "Print What's Next View...","Drucke What's Next Ansicht..." }, 1117{ "Print What's Next View...","Drucke What's Next Ansicht..." },
1118{ "Agenda","Agenda" }, 1118{ "Agenda","Agenda" },
1119{ " ("," (" }, 1119{ " ("," (" },
1120{ "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, 1120{ "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" },
1121{ "Print","Print" }, 1121{ "Print","Print" },
1122{ "&Setup Printer...","Drucker &Setup..." }, 1122{ "&Setup Printer...","Drucker &Setup..." },
1123{ "View Type","Zeige Typ" }, 1123{ "View Type","Zeige Typ" },
1124{ "Page &orientation:","Seiten Ausrichtung:" }, 1124{ "Page &orientation:","Seiten Ausrichtung:" },
1125{ "Use Default of Selected Style","Default des selektierten Stils" }, 1125{ "Use Default of Selected Style","Default des selektierten Stils" },
1126{ "Use Default Setting of Printer","Default Einstellung des Druckers" }, 1126{ "Use Default Setting of Printer","Default Einstellung des Druckers" },
1127{ "Portrait","Portrait" }, 1127{ "Portrait","Portrait" },
1128{ "Landscape","Landschaft" }, 1128{ "Landscape","Landschaft" },
1129{ "Print day","Drucke Tag" }, 1129{ "Print day","Drucke Tag" },
1130{ "CalPrintDay_Base","CalPrintDay_Base" }, 1130{ "CalPrintDay_Base","CalPrintDay_Base" },
1131{ "Date && Time Range","Datum && Zeitspanne" }, 1131{ "Date && Time Range","Datum && Zeitspanne" },
1132{ "&End date:","&Enddatum:" }, 1132{ "&End date:","&Enddatum:" },
1133{ "&Start date:","&Startdatum:" }, 1133{ "&Start date:","&Startdatum:" },
1134{ "Start &time:","Startzeit:" }, 1134{ "Start &time:","Startzeit:" },
1135{ "End ti&me:","Endzeit:" }, 1135{ "End ti&me:","Endzeit:" },
1136{ "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, 1136{ "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" },
1137{ "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, 1137{ "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" },
1138{ "Alt+D","Alt+D" }, 1138{ "Alt+D","Alt+D" },
1139{ "&Use colors","Nutze Farben" }, 1139{ "&Use colors","Nutze Farben" },
1140{ "Alt+U","Alt+U" }, 1140{ "Alt+U","Alt+U" },
1141{ "Print week","Drucke Woche" }, 1141{ "Print week","Drucke Woche" },
1142{ "CalPrintWeek_Base","CalPrintWeek_Base" }, 1142{ "CalPrintWeek_Base","CalPrintWeek_Base" },
1143{ "Use &colors","Nutze Farben" }, 1143{ "Use &colors","Nutze Farben" },
1144{ "Type of View","Typ der Ansicht" }, 1144{ "Type of View","Typ der Ansicht" },
1145{ "Print as &Filofax page","Drucke als &Filofax Seite" }, 1145{ "Print as &Filofax page","Drucke als &Filofax Seite" },
1146{ "Alt+F","Alt+F" }, 1146{ "Alt+F","Alt+F" },
1147{ "Print as &timetable view:","Drucke als Zeittabelle:" }, 1147{ "Print as &timetable view:","Drucke als Zeittabelle:" },
1148{ "Alt+T","Alt+T" }, 1148{ "Alt+T","Alt+T" },
1149{ "Print as split week view","Drucke als gesplittete Wochenansicht" }, 1149{ "Print as split week view","Drucke als gesplittete Wochenansicht" },
1150{ "Print month","Drucke Monat" }, 1150{ "Print month","Drucke Monat" },
1151{ "CalPrintMonth_Base","CalPrintMonth_Base" }, 1151{ "CalPrintMonth_Base","CalPrintMonth_Base" },
1152{ "&Start month:","&Startmonat:" }, 1152{ "&Start month:","&Startmonat:" },
1153{ "&End month:","&Endmonat:" }, 1153{ "&End month:","&Endmonat:" },
1154{ "Print week &numbers","Drucke Wochen Nummer(n)" }, 1154{ "Print week &numbers","Drucke Wochen Nummer(n)" },
1155{ "Print todos","Drucke Todos" }, 1155{ "Print todos","Drucke Todos" },
1156{ "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, 1156{ "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" },
1157{ "Include &description of the item","Inclusive Itembeschreibung" }, 1157{ "Include &description of the item","Inclusive Itembeschreibung" },
1158{ "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, 1158{ "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" },
1159{ "Include &priority of the item","Inclusive Priorität des Items" }, 1159{ "Include &priority of the item","Inclusive Priorität des Items" },
1160{ "Items to Print","Zu druckende Items" }, 1160{ "Items to Print","Zu druckende Items" },
1161{ "&From:","Von:" }, 1161{ "&From:","Von:" },
1162{ "&To:","Bis:" }, 1162{ "&To:","Bis:" },
1163{ "Print &all todo items","Drucke alle Todo Items" }, 1163{ "Print &all todo items","Drucke alle Todo Items" },
1164{ "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, 1164{ "Print only &uncompleted items","Drucke nur nicht erledigte Todos" },
1165{ "Only items due in the &range:","Nur Items in dem Zeitraum:" }, 1165{ "Only items due in the &range:","Nur Items in dem Zeitraum:" },
1166{ "Todo List","Todo Liste" }, 1166{ "Todo List","Todo Liste" },
1167{ "&Title:","&Titel:" }, 1167{ "&Title:","&Titel:" },
1168{ "Co&nnect subtodos with its parent","Verbinde Unter-Todos mit ihren Ober-Todos" }, 1168{ "Co&nnect subtodos with its parent","Verbinde Unter-Todos mit ihren Ober-Todos" },
1169{ "Todo list","Todo Liste" }, 1169{ "Todo list","Todo Liste" },
1170{ "&Print...","Drucke..." }, 1170{ "&Print...","Drucke..." },
1171{ "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, 1171{ "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" },
1172{ "[Unconfigured]","[Unkonfiguriert]" }, 1172{ "[Unconfigured]","[Unkonfiguriert]" },
1173{ "OK","OK" }, 1173{ "OK","OK" },
1174{ "FilterEditor","FilterEditor" }, 1174{ "FilterEditor","FilterEditor" },
1175{ "Include","Inclusive" }, 1175{ "Include","Inclusive" },
1176{ "Exclude","Exclusive" }, 1176{ "Exclude","Exclusive" },
1177{ "Edit Selection...","Editiere Auswahl" }, 1177{ "Edit Selection...","Editiere Auswahl" },
1178{ "recurring events","wiederholende Termine" }, 1178{ "recurring events","wiederholende Termine" },
1179{ "recurr. events","wiederh.Termine" }, 1179{ "recurr. events","wiederh.Termine" },
1180{ "completed to-dos","erledigte Todos" }, 1180{ "completed to-dos","erledigte Todos" },
1181{ "events","Termine" }, 1181{ "events","Termine" },
1182{ "todos","Todos" }, 1182{ "todos","Todos" },
1183{ "journals","Journale" }, 1183{ "journals","Journale" },
1184{ "public","öffentl." }, 1184{ "public","öffentl." },
1185{ "private","privat" }, 1185{ "private","privat" },
1186{ "confidential","vertraul." }, 1186{ "confidential","vertraul." },
1187{ "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" }, 1187{ "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" },
1188{ "Yesterday","Gestern" }, 1188{ "Yesterday","Gestern" },
1189{ "Day after tomorrow","Übermorgen" }, 1189{ "Day after tomorrow","Übermorgen" },
1190{ "Tomorrow","Morgen" }, 1190{ "Tomorrow","Morgen" },
1191{ "Day before yesterday","Vorgestern" }, 1191{ "Day before yesterday","Vorgestern" },
1192{ "Size %1","Größe %1" }, 1192{ "Size %1","Größe %1" },
1193{ "New Agendasize: %1","Neue Agendagröße: %1" }, 1193{ "New Agendasize: %1","Neue Agendagröße: %1" },
1194{ " (%1 y.)"," (%1 J.)" }, 1194{ " (%1 y.)"," (%1 J.)" },
1195{ "Allday:","Ganztägig:" }, 1195{ "Allday:","Ganztägig:" },
1196{ "compl.todos","erled.Todos" }, 1196{ "compl.todos","erled.Todos" },
1197{ "Day view","Tagesansicht" }, 1197{ "Day view","Tagesansicht" },
1198{ "Next days","Nächste Tage" }, 1198{ "Next days","Nächste Tage" },
1199{ "Next week","Nächste Woche" }, 1199{ "Next week","Nächste Woche" },
1200{ "Next two weeks","Nächste zwei Wochen" }, 1200{ "Next two weeks","Nächste zwei Wochen" },
1201{ "Next month","Nächster Monat" }, 1201{ "Next month","Nächster Monat" },
1202{ "Journal view","Journal" }, 1202{ "Journal view","Journal" },
1203{ "Display all opened","Zeige alle geöffnet" }, 1203{ "Display all opened","Zeige alle geöffnet" },
1204{ "Display all closed","Zeige alle geschlossen" }, 1204{ "Display all closed","Zeige alle geschlossen" },
1205{ "Display all flat","Zeige alle flach" }, 1205{ "Display all flat","Zeige alle flach" },
1206{ "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, 1206{ "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" },
1207{ "Default todo done color:","Standard Todo erledigt Farbe" }, 1207{ "Default todo done color:","Standard Todo erledigt Farbe" },
1208{ "Select week %1-%2","Selektiere Woche %1-%2" }, 1208{ "Select week %1-%2","Selektiere Woche %1-%2" },
1209{ "Select Week","Selektiere Woche" }, 1209{ "Select Week","Selektiere Woche" },
1210{ "Set alarm for selected...","Setze Alarm für Selekt..." }, 1210{ "Set alarm for selected...","Setze Alarm für Selekt..." },
1211{ "Set Alarm!","Setze Alarm!" }, 1211{ "Set Alarm!","Setze Alarm!" },
1212{ "Canged alarm for %1 items","Alarm für %1 Items geändert" }, 1212{ "Canged alarm for %1 items","Alarm für %1 Items geändert" },
1213{ " and "," und " }, 1213{ " and "," und " },
1214{ "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, 1214{ "<IMG src="%1"> only )","nur <IMG src="%1"> )" },
1215{ "Mail to selected","Mail an Ausgewählte" }, 1215{ "Mail to selected","Mail an Ausgewählte" },
1216{ "Mail to all","Mail an Alle" }, 1216{ "Mail to all","Mail an Alle" },
1217{ "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, 1217{ "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" },
1218{ "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, 1218{ "Set reminder ON with offset to:","Alarm AN mit Offset auf:" },
1219{ " on"," am" }, 1219{ " on"," am" },
1220{ " completed on "," erledigt am " }, 1220{ " completed on "," erledigt am " },
1221{ "Save as Event template","Speichere als Vorlage" },
1222{ "Load Event template","Lade Termin Vorlage" },
1223{ "Save as Journal template","Speichere als Journal Vorlage" },
1224{ "Insert Journal template","Füge Journal Vorlage ein" },
1225{ "","" },
1226{ "","" },
1221{ "","" }, 1227{ "","" },
1222{ "","" }, 1228{ "","" },
1223{ "","" }, 1229{ "","" },
1224{ "","" }, 1230{ "","" },
diff --git a/korganizer/journalentry.cpp b/korganizer/journalentry.cpp
index 7af5cf4..dca42e0 100644
--- a/korganizer/journalentry.cpp
+++ b/korganizer/journalentry.cpp
@@ -1,170 +1,249 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24// 24//
25// Journal Entry 25// Journal Entry
26 26
27#include <qlabel.h> 27#include <qlabel.h>
28#include <qlayout.h> 28#include <qlayout.h>
29#include <qvbox.h>
30#include <qfile.h>
31#include <qdir.h>
32#include <qtextstream.h>
33#include <qtextcodec.h>
34#include <qpixmap.h>
35#include <qpushbutton.h>
29 36
30#include <kdebug.h> 37#include <kdebug.h>
31#include <kglobal.h> 38#include <kglobal.h>
32#include <klocale.h> 39#include <klocale.h>
33#include <ktextedit.h> 40#include <ktextedit.h>
41#include <kfiledialog.h>
42#include <kmessagebox.h>
34#include "koprefs.h" 43#include "koprefs.h"
35 44
36#include <libkcal/journal.h> 45#include <libkcal/journal.h>
37#include <libkcal/calendarresources.h> 46#include <libkcal/calendarresources.h>
38#include <libkcal/resourcecalendar.h> 47#include <libkcal/resourcecalendar.h>
39#include <kresources/resourceselectdialog.h> 48#include <kresources/resourceselectdialog.h>
40 49
41#include "journalentry.h" 50#include "journalentry.h"
42//#include "journalentry.moc" 51//#include "journalentry.moc"
43#ifndef DESKTOP_VERSION 52#ifndef DESKTOP_VERSION
44#include <qpe/qpeapplication.h> 53#include <qpe/qpeapplication.h>
45#endif 54#endif
46JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) : 55JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) :
47 QFrame(parent) 56 QFrame(parent)
48{ 57{
49 mCalendar = calendar; 58 mCalendar = calendar;
50 mJournal = 0; 59 mJournal = 0;
51 mDirty = false; 60 mDirty = false;
52 61
53 mTitleLabel = new QLabel(i18n("Title"),this); 62 QHBox * vb = new QHBox ( this );
63 QPushButton * loadTemplate = new QPushButton( vb );
64 QPushButton * saveTemplate = new QPushButton( vb );
65 QIconSet icon;
66 if ( QApplication::desktop()->width() < 321 )
67 icon = SmallIcon("fileexport16");
68 else
69 icon = SmallIcon("fileexport");
70 saveTemplate->setIconSet (icon ) ;
71 int size = saveTemplate->sizeHint().height();
72 saveTemplate->setFixedSize( size, size );
73 if ( QApplication::desktop()->width() < 321 )
74 icon = SmallIcon("fileimport16");
75 else
76 icon = SmallIcon("fileimport");
77 loadTemplate->setIconSet (icon ) ;
78 loadTemplate->setFixedSize( size, size );
79
80 mTitleLabel = new QLabel(i18n("Title"),vb);
54 mTitleLabel->setMargin(2); 81 mTitleLabel->setMargin(2);
55 mTitleLabel->setAlignment(AlignCenter); 82 mTitleLabel->setAlignment(AlignCenter);
56 83
57 mEditor = new KTextEdit(this); 84 mEditor = new KTextEdit(this);
58 connect(mEditor,SIGNAL(textChanged()),SLOT(setDirty())); 85 connect(mEditor,SIGNAL(textChanged()),SLOT(setDirty()));
59#ifndef DESKTOP_VERSION 86#ifndef DESKTOP_VERSION
60 QPEApplication::setStylusOperation( mEditor, QPEApplication::RightOnHold ); 87 QPEApplication::setStylusOperation( mEditor, QPEApplication::RightOnHold );
61#endif 88#endif
62 mEditor->setWordWrap( KTextEdit::WidgetWidth ); 89 mEditor->setWordWrap( KTextEdit::WidgetWidth );
63 QBoxLayout *topLayout = new QVBoxLayout(this); 90 QBoxLayout *topLayout = new QVBoxLayout(this);
64 topLayout->addWidget(mTitleLabel); 91 topLayout->addWidget(vb);
65 topLayout->addWidget(mEditor); 92 topLayout->addWidget(mEditor);
66 mEditor->installEventFilter(this); 93 mEditor->installEventFilter(this);
94 connect( saveTemplate, SIGNAL( clicked() ), this , SLOT( slotSaveTemplate() ) );
95 connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( slotLoadTemplate() ) );
67} 96}
68 97
69JournalEntry::~JournalEntry() 98JournalEntry::~JournalEntry()
70{ 99{
71} 100}
72 101
102void JournalEntry::slotSaveTemplate()
103{
104 QString fileName =locateLocal( "templates", "journals" );
105 QDir t_dir;
106 if ( !t_dir.exists(fileName) )
107 t_dir.mkdir ( fileName );
108 fileName += "/journal";
109 fileName = KFileDialog::getSaveFileName( fileName , i18n("Save as Journal template"), this );
110 if ( fileName.length() == 0 )
111 return;
112
113 QFile fileIn( fileName );
114 if (!fileIn.open( IO_WriteOnly ) ) {
115 KMessageBox::error( this, i18n("Error saving template file\n '%1'.")
116 .arg( fileName ) );
117 return;
118 }
119 // QString text;
120 QTextStream tsIn( &fileIn );
121 tsIn.setCodec( QTextCodec::codecForName("utf8") );
122 tsIn << mEditor->text();
123 fileIn.close();
124}
125void JournalEntry::slotLoadTemplate()
126{
127 QString fileName =locateLocal( "templates", "journals" );
128 QDir t_dir;
129 if ( !t_dir.exists(fileName) )
130 t_dir.mkdir ( fileName );
131 fileName += "/journal";
132 fileName = KFileDialog::getOpenFileName( fileName , i18n("Insert Journal template"), this );
133 if ( fileName.length() == 0 )
134 return;
135 QFile fileIn( fileName );
136 if (!fileIn.open( IO_ReadOnly ) ) {
137 KMessageBox::error( this, i18n("Error loading template file\n '%1'.")
138 .arg( fileName ) );
139 return;
140 }
141 QTextStream tsIn( &fileIn );
142 tsIn.setCodec( QTextCodec::codecForName("utf8") );
143 QString text = tsIn.read();
144 fileIn.close();
145 int line, col;
146 mEditor->getCursorPosition (& line, & col );
147 mEditor-> insertAt ( text, line, col, true );
148 //mEditor->setIgnoreMark( true );
149 setDirty();
150}
73void JournalEntry::setDate(const QDate &date) 151void JournalEntry::setDate(const QDate &date)
74{ 152{
75 writeJournal(); 153 writeJournal();
76 154
77 mTitleLabel->setText(KGlobal::locale()->formatDate(date)); 155 mTitleLabel->setText(KGlobal::locale()->formatDate(date));
78 156
79 157
80 mDate = date; 158 mDate = date;
81} 159}
82 160
83void JournalEntry::setJournal(Journal *journal) 161void JournalEntry::setJournal(Journal *journal)
84{ 162{
85 writeJournal(); 163 writeJournal();
86 164
87 mJournal = journal; 165 mJournal = journal;
88 166
89 mEditor->setText(mJournal->description()); 167 mEditor->setText(mJournal->description());
90 168
91 mDirty = false; 169 mDirty = false;
92} 170}
93 171
94Journal *JournalEntry::journal() const 172Journal *JournalEntry::journal() const
95{ 173{
96 return mJournal; 174 return mJournal;
97} 175}
98 176
99void JournalEntry::setDirty() 177void JournalEntry::setDirty()
100{ 178{
101 mDirty = true; 179 mDirty = true;
102 180
103// kdDebug() << "JournalEntry::setDirty()" << endl; 181// kdDebug() << "JournalEntry::setDirty()" << endl;
104} 182}
105 183
106void JournalEntry::clear() 184void JournalEntry::clear()
107{ 185{
108 mJournal = 0; 186 mJournal = 0;
109 mEditor->setText(""); 187 mEditor->setText("");
110} 188}
111 189
112bool JournalEntry::eventFilter( QObject *o, QEvent *e ) 190bool JournalEntry::eventFilter( QObject *o, QEvent *e )
113{ 191{
114// kdDebug() << "JournalEntry::event received " << e->type() << endl; 192// kdDebug() << "JournalEntry::event received " << e->type() << endl;
115 193
116 if ( e->type() == QEvent::FocusOut ) { 194 if ( e->type() == QEvent::FocusOut ) {
117 writeJournal(); 195 writeJournal();
118 } 196 }
119 if ( e->type() == QEvent::KeyPress ) { 197 if ( e->type() == QEvent::KeyPress ) {
120 QKeyEvent * k = (QKeyEvent *) e; 198 QKeyEvent * k = (QKeyEvent *) e;
121 if ( k->state() == Qt::ControlButton ) { 199 if ( k->state() == Qt::ControlButton ) {
122 k->ignore(); 200 k->ignore();
123 //return true; 201 //return true;
124 } 202 }
125 } 203 }
126 204
127 return QFrame::eventFilter( o, e ); // standard event processing 205 return QFrame::eventFilter( o, e ); // standard event processing
128} 206}
129 207
130void JournalEntry::writeJournal() 208void JournalEntry::writeJournal()
131{ 209{
132// kdDebug() << "JournalEntry::writeJournal()" << endl; 210// kdDebug() << "JournalEntry::writeJournal()" << endl;
133 if (!mDirty) return; 211 if (!mDirty) return;
134 212
135 if (mEditor->text().isEmpty()) { 213 if (mEditor->text().isEmpty()) {
136 if ( mJournal ) { 214 if ( mJournal ) {
137 mDirty = false; 215 mDirty = false;
138 bool conf = KOPrefs::instance()->mConfirm; 216 bool conf = KOPrefs::instance()->mConfirm;
139 KOPrefs::instance()->mConfirm = false; 217 KOPrefs::instance()->mConfirm = false;
140 emit deleteJournal(mJournal); 218 emit deleteJournal(mJournal);
141 KOPrefs::instance()->mConfirm = conf; 219 KOPrefs::instance()->mConfirm = conf;
142 mJournal = 0; 220 mJournal = 0;
143 } 221 }
144 return; 222 return;
145 } 223 }
146 224
147// kdDebug() << "JournalEntry::writeJournal()..." << endl; 225// kdDebug() << "JournalEntry::writeJournal()..." << endl;
148 226
149 if (!mJournal) { 227 if (!mJournal) {
150 mJournal = new Journal; 228 mJournal = new Journal;
151 mJournal->setDtStart(QDateTime(mDate,QTime(0,0,0))); 229 mJournal->setDtStart(QDateTime(mDate,QTime(0,0,0)));
152 mCalendar->addJournal(mJournal); 230 mCalendar->addJournal(mJournal);
153 } 231 }
154 232
155 mJournal->setDescription(mEditor->text()); 233 mJournal->setDescription(mEditor->text());
234 //qDebug("tttt%s ", mEditor->text().latin1());
156 235
157 mDirty = false; 236 mDirty = false;
158} 237}
159 238
160void JournalEntry::flushEntry() 239void JournalEntry::flushEntry()
161{ 240{
162 if (!mDirty) return; 241 if (!mDirty) return;
163 242
164 writeJournal(); 243 writeJournal();
165} 244}
166void JournalEntry::keyPressEvent ( QKeyEvent * e ) 245void JournalEntry::keyPressEvent ( QKeyEvent * e )
167{ 246{
168 e->ignore(); 247 e->ignore();
169 248
170} 249}
diff --git a/korganizer/journalentry.h b/korganizer/journalentry.h
index 1f784f4..f1a1fef 100644
--- a/korganizer/journalentry.h
+++ b/korganizer/journalentry.h
@@ -1,73 +1,75 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23#ifndef JOURNALENTRY_H 23#ifndef JOURNALENTRY_H
24#define JOURNALENTRY_H 24#define JOURNALENTRY_H
25// 25//
26// Widget showing one Journal entry 26// Widget showing one Journal entry
27 27
28#include <qframe.h> 28#include <qframe.h>
29 29
30#include <libkcal/calendar.h> 30#include <libkcal/calendar.h>
31 31
32class QLabel; 32class QLabel;
33class KTextEdit; 33class KTextEdit;
34 34
35using namespace KCal; 35using namespace KCal;
36 36
37class JournalEntry : public QFrame { 37class JournalEntry : public QFrame {
38 Q_OBJECT 38 Q_OBJECT
39 public: 39 public:
40 JournalEntry(Calendar *,QWidget *parent); 40 JournalEntry(Calendar *,QWidget *parent);
41 virtual ~JournalEntry(); 41 virtual ~JournalEntry();
42 42
43 void setJournal(Journal *); 43 void setJournal(Journal *);
44 Journal *journal() const; 44 Journal *journal() const;
45 45
46 void setDate(const QDate &); 46 void setDate(const QDate &);
47 47
48 void clear(); 48 void clear();
49 49
50 void flushEntry(); 50 void flushEntry();
51 51
52 protected slots: 52 protected slots:
53 void slotSaveTemplate();
54 void slotLoadTemplate();
53 void setDirty(); 55 void setDirty();
54 signals: 56 signals:
55 void deleteJournal(Journal *); 57 void deleteJournal(Journal *);
56 58
57 protected: 59 protected:
58 bool eventFilter( QObject *o, QEvent *e ); 60 bool eventFilter( QObject *o, QEvent *e );
59 61
60 void writeJournal(); 62 void writeJournal();
61 63
62 private: 64 private:
63 Calendar *mCalendar; 65 Calendar *mCalendar;
64 Journal *mJournal; 66 Journal *mJournal;
65 QDate mDate; 67 QDate mDate;
66 void keyPressEvent ( QKeyEvent * ) ; 68 void keyPressEvent ( QKeyEvent * ) ;
67 QLabel *mTitleLabel; 69 QLabel *mTitleLabel;
68 KTextEdit *mEditor; 70 KTextEdit *mEditor;
69 71
70 bool mDirty; 72 bool mDirty;
71}; 73};
72 74
73#endif 75#endif
diff --git a/korganizer/koeventeditor.cpp b/korganizer/koeventeditor.cpp
index 0ff99a4..337db9b 100644
--- a/korganizer/koeventeditor.cpp
+++ b/korganizer/koeventeditor.cpp
@@ -210,168 +210,168 @@ void KOEventEditor::loadDefaults()
210 210
211 QDateTime from(QDate::currentDate(), QTime(fmt,0,0)); 211 QDateTime from(QDate::currentDate(), QTime(fmt,0,0));
212 QDateTime to(QDate::currentDate(), 212 QDateTime to(QDate::currentDate(),
213 QTime(fmt+KOPrefs::instance()->mDefaultDuration,0,0)); 213 QTime(fmt+KOPrefs::instance()->mDefaultDuration,0,0));
214 214
215 setDefaults(from,to,false); 215 setDefaults(from,to,false);
216} 216}
217 217
218bool KOEventEditor::processInput( bool emitTime ) 218bool KOEventEditor::processInput( bool emitTime )
219{ 219{
220 if (!validateInput()) return false; 220 if (!validateInput()) return false;
221 221
222 Event *event = 0; 222 Event *event = 0;
223 223
224 if (mEvent) event = mEvent; 224 if (mEvent) event = mEvent;
225 else { 225 else {
226 event = new Event; 226 event = new Event;
227 event->setOrganizer(KOPrefs::instance()->email()); 227 event->setOrganizer(KOPrefs::instance()->email());
228 } 228 }
229 229
230 writeEvent(event); 230 writeEvent(event);
231 if ( emitTime ) { 231 if ( emitTime ) {
232 globalFlagBlockAgenda = 1; 232 globalFlagBlockAgenda = 1;
233 emit showAgendaView( false ); 233 emit showAgendaView( false );
234 emit jumpToTime( event->dtStart().date() ); 234 emit jumpToTime( event->dtStart().date() );
235 globalFlagBlockAgenda = 2; 235 globalFlagBlockAgenda = 2;
236 236
237 } 237 }
238 if (mEvent) { 238 if (mEvent) {
239 event->setRevision(event->revision()+1); 239 event->setRevision(event->revision()+1);
240 emit eventChanged(event); 240 emit eventChanged(event);
241 } else { 241 } else {
242 mCalendar->addEvent(event); 242 mCalendar->addEvent(event);
243 mEvent = event; 243 mEvent = event;
244 emit eventAdded(event); 244 emit eventAdded(event);
245 } 245 }
246 246
247 return true; 247 return true;
248} 248}
249 249
250void KOEventEditor::deleteEvent() 250void KOEventEditor::deleteEvent()
251{ 251{
252 kdDebug() << "Delete event" << endl; 252 kdDebug() << "Delete event" << endl;
253 253
254 if (mEvent) { 254 if (mEvent) {
255 if (KOPrefs::instance()->mConfirm) { 255 if (KOPrefs::instance()->mConfirm) {
256 switch (msgItemDelete()) { 256 switch (msgItemDelete()) {
257 case KMessageBox::Continue: // OK 257 case KMessageBox::Continue: // OK
258 emit eventToBeDeleted(mEvent); 258 emit eventToBeDeleted(mEvent);
259 emit dialogClose(mEvent); 259 emit dialogClose(mEvent);
260 mCalendar->deleteEvent(mEvent); 260 mCalendar->deleteEvent(mEvent);
261 emit eventDeleted(); 261 emit eventDeleted();
262 reject(); 262 reject();
263 break; 263 break;
264 } 264 }
265 } 265 }
266 else { 266 else {
267 emit eventToBeDeleted(mEvent); 267 emit eventToBeDeleted(mEvent);
268 emit dialogClose(mEvent); 268 emit dialogClose(mEvent);
269 mCalendar->deleteEvent(mEvent); 269 mCalendar->deleteEvent(mEvent);
270 emit eventDeleted(); 270 emit eventDeleted();
271 reject(); 271 reject();
272 } 272 }
273 } else { 273 } else {
274 reject(); 274 reject();
275 } 275 }
276} 276}
277 277
278void KOEventEditor::setDefaults(QDateTime from, QDateTime to, bool allDay) 278void KOEventEditor::setDefaults(QDateTime from, QDateTime to, bool allDay)
279{ 279{
280 mGeneral->setDefaults(from,to,allDay); 280 mGeneral->setDefaults(from,to,allDay);
281 mDetails->setDefaults(); 281 mDetails->setDefaults();
282 mRecurrence->setDefaults(from,to,allDay); 282 mRecurrence->setDefaults(from,to,allDay);
283 showPage( 0 ); 283 showPage( 0 );
284 mGeneral->setFocusOn( 2 ); 284 mGeneral->setFocusOn( 2 );
285} 285}
286 286
287void KOEventEditor::readEvent( Event *event, bool tmpl ) 287void KOEventEditor::readEvent( Event *event, bool tmpl )
288{ 288{
289 mGeneral->readEvent( event, tmpl ); 289 mGeneral->readEvent( event, tmpl );
290 mDetails->readEvent( event ); 290 mDetails->readEvent( event );
291 mRecurrence->readEvent( event ); 291 mRecurrence->readEvent( event );
292 292
293 // categories 293 // categories
294 //mCategoryDialog->setSelected( event->categories() ); 294 //mCategoryDialog->setSelected( event->categories() );
295} 295}
296 296
297void KOEventEditor::writeEvent(Event *event) 297void KOEventEditor::writeEvent(Event *event)
298{ 298{
299 mGeneral->writeEvent( event ); 299 mGeneral->writeEvent( event );
300 mDetails->writeEvent( event ); 300 mDetails->writeEvent( event );
301 301
302 if ( event->organizer() == KOPrefs::instance()->email() ) { 302 if ( event->organizer() == KOPrefs::instance()->email() ) {
303 Event *ev = new Event( *event ); 303 Event *ev = new Event( *event );
304 ev->registerObserver(0); 304 ev->registerObserver(0);
305 mDetails->cancelAttendeeEvent( ev ); 305 mDetails->cancelAttendeeEvent( ev );
306 if ( ev->attendeeCount() > 0 ) { 306 if ( ev->attendeeCount() > 0 ) {
307 emit deleteAttendee( ev ); 307 emit deleteAttendee( ev );
308 } 308 }
309 delete(ev); 309 delete(ev);
310 } 310 }
311 311
312 mRecurrence->writeEvent(event); 312 mRecurrence->writeEvent(event);
313} 313}
314 314
315bool KOEventEditor::validateInput() 315bool KOEventEditor::validateInput()
316{ 316{
317 if (!mGeneral->validateInput()) return false; 317 if (!mGeneral->validateInput()) return false;
318 if (!mDetails->validateInput()) return false; 318 if (!mDetails->validateInput()) return false;
319 if (!mRecurrence->validateInput()) return false; 319 if (!mRecurrence->validateInput()) return false;
320 return true; 320 return true;
321} 321}
322 322
323int KOEventEditor::msgItemDelete() 323int KOEventEditor::msgItemDelete()
324{ 324{
325 return KMessageBox::warningContinueCancel(this, 325 return KMessageBox::warningContinueCancel(this,
326 i18n("This item will be permanently deleted."), 326 i18n("This item will be permanently deleted."),
327 i18n("KOrganizer Confirmation"),i18n("Delete")); 327 i18n("KOrganizer Confirmation"),i18n("Delete"));
328} 328}
329 329
330void KOEventEditor::slotLoadTemplate() 330void KOEventEditor::slotLoadTemplate()
331{ 331{
332 332
333 QString fileName =locateLocal( "templates", "events" ); 333 QString fileName =locateLocal( "templates", "events" );
334 QDir t_dir; 334 QDir t_dir;
335 if ( !t_dir.exists(fileName) ) 335 if ( !t_dir.exists(fileName) )
336 t_dir.mkdir ( fileName ); 336 t_dir.mkdir ( fileName );
337 fileName += "/event"; 337 fileName += "/event";
338 fileName = KFileDialog::getSaveFileName( fileName , "Load Event template", this ); 338 fileName = KFileDialog::getOpenFileName( fileName , i18n("Load Event template"), this );
339 if ( fileName.length() == 0 ) 339 if ( fileName.length() == 0 )
340 return; 340 return;
341 CalendarLocal cal; 341 CalendarLocal cal;
342 ICalFormat format; 342 ICalFormat format;
343 if ( !format.load( &cal, fileName ) ) { 343 if ( !format.load( &cal, fileName ) ) {
344 KMessageBox::error( this, i18n("Error loading template file\n '%1'.") 344 KMessageBox::error( this, i18n("Error loading template file\n '%1'.")
345 .arg( fileName ) ); 345 .arg( fileName ) );
346 return ; 346 return ;
347 } 347 }
348 QPtrList<Event> events = cal.events(); 348 QPtrList<Event> events = cal.events();
349 Event* event = events.first(); 349 Event* event = events.first();
350 if ( !event ) { 350 if ( !event ) {
351 KMessageBox::error( this, 351 KMessageBox::error( this,
352 i18n("Template does not contain\na valid Event.")); 352 i18n("Template does not contain\na valid Event."));
353 } else { 353 } else {
354 kdDebug() << "KOEventEditor::slotLoadTemplate(): readTemplate" << endl; 354 kdDebug() << "KOEventEditor::slotLoadTemplate(): readTemplate" << endl;
355 readEvent( event, true ); 355 readEvent( event, true );
356 } 356 }
357} 357}
358 358
359 359
360void KOEventEditor::slotSaveTemplate() 360void KOEventEditor::slotSaveTemplate()
361{ 361{
362 QString fileName =locateLocal( "templates", "events" ); 362 QString fileName =locateLocal( "templates", "events" );
363 QDir t_dir; 363 QDir t_dir;
364 if ( !t_dir.exists(fileName) ) 364 if ( !t_dir.exists(fileName) )
365 t_dir.mkdir ( fileName ); 365 t_dir.mkdir ( fileName );
366 fileName += "/event"; 366 fileName += "/event";
367 fileName = KFileDialog::getSaveFileName( fileName , "Save as Event template", this ); 367 fileName = KFileDialog::getSaveFileName( fileName , i18n("Save as Event template"), this );
368 if ( fileName.length() > 0 ) 368 if ( fileName.length() > 0 )
369 saveTemplate( fileName ); 369 saveTemplate( fileName );
370} 370}
371 371
372void KOEventEditor::saveTemplate( const QString &templateName ) 372void KOEventEditor::saveTemplate( const QString &templateName )
373{ 373{
374 Event *event = new Event; 374 Event *event = new Event;
375 writeEvent( event ); 375 writeEvent( event );
376 saveAsTemplate( event, templateName ); 376 saveAsTemplate( event, templateName );
377} 377}
diff --git a/microkde/kfiledialog.cpp b/microkde/kfiledialog.cpp
index 309f8dc..3f47425 100644
--- a/microkde/kfiledialog.cpp
+++ b/microkde/kfiledialog.cpp
@@ -1,76 +1,76 @@
1#include <kfiledialog.h> 1#include <kfiledialog.h>
2#include <qdialog.h> 2#include <qdialog.h>
3#include <qlayout.h> 3#include <qlayout.h>
4#include <qdir.h> 4#include <qdir.h>
5#include <qfileinfo.h> 5#include <qfileinfo.h>
6#include <qapplication.h> 6#include <qapplication.h>
7 7
8#ifndef DESKTOP_VERSION 8#ifndef DESKTOP_VERSION
9//US orig#include <ofileselector.h> 9//US orig#include <ofileselector.h>
10#include <ofileselector_p.h> 10#include <ofileselector_p.h>
11QString KFileDialog::getSaveFileName( const QString & fn, 11QString KFileDialog::getSaveFileName( const QString & fn,
12 const QString & cap , QWidget * par ) 12 const QString & cap , QWidget * par )
13{ 13{
14 QString retfile = ""; 14 QString retfile = "";
15 QDialog dia ( par, "input-dialog", true ); 15 QDialog dia ( par, "input-dialog", true );
16 QVBoxLayout lay( &dia ); 16 QVBoxLayout lay( &dia );
17 lay.setMargin(7); 17 lay.setMargin(7);
18 lay.setSpacing(7); 18 lay.setSpacing(7);
19 dia.setCaption( cap );
20 QString file = fn; 19 QString file = fn;
21 if ( file.isEmpty() ) 20 if ( file.isEmpty() )
22 file = QDir::homeDirPath()+"/*"; 21 file = QDir::homeDirPath()+"/*";
23 QFileInfo fi ( file ); 22 QFileInfo fi ( file );
24 OFileSelector o ( &dia,OFileSelector::FileSelector, OFileSelector::Save, fi.dirPath(true), fi.fileName() ); 23 OFileSelector o ( &dia,OFileSelector::FileSelector, OFileSelector::Save, fi.dirPath(true), fi.fileName() );
25 QObject::connect ( &o, SIGNAL( ok() ), &dia, SLOT ( accept () ) ); 24 QObject::connect ( &o, SIGNAL( ok() ), &dia, SLOT ( accept () ) );
26 lay.addWidget( &o); 25 lay.addWidget( &o);
27 // o.setNewVisible( true ); 26 // o.setNewVisible( true );
28 // o.setNameVisible( true ); 27 // o.setNameVisible( true );
29 dia.showMaximized(); 28 dia.showMaximized();
29 dia.setCaption( cap );
30 int res = dia.exec(); 30 int res = dia.exec();
31 if ( res ) 31 if ( res )
32 retfile = o.selectedName(); 32 retfile = o.selectedName();
33 return retfile; 33 return retfile;
34} 34}
35 35
36QString KFileDialog::getOpenFileName( const QString & fn, 36QString KFileDialog::getOpenFileName( const QString & fn,
37 const QString & cap, QWidget * par ) 37 const QString & cap, QWidget * par )
38{ 38{
39 QString retfile = ""; 39 QString retfile = "";
40 QDialog dia ( par, "input-dialog", true ); 40 QDialog dia ( par, "input-dialog", true );
41 // QLineEdit lab ( &dia ); 41 // QLineEdit lab ( &dia );
42 QVBoxLayout lay( &dia ); 42 QVBoxLayout lay( &dia );
43 lay.setMargin(7); 43 lay.setMargin(7);
44 lay.setSpacing(7); 44 lay.setSpacing(7);
45 dia.setCaption( cap );
46 QString file = fn; 45 QString file = fn;
47 if ( file.isEmpty() ) 46 if ( file.isEmpty() )
48 file = QDir::homeDirPath()+"/*";; 47 file = QDir::homeDirPath()+"/*";;
49 QFileInfo fi ( file ); 48 QFileInfo fi ( file );
50 OFileSelector o ( &dia,OFileSelector::FileSelector, OFileSelector::Open, fi.dirPath(true), fi.fileName() ); 49 OFileSelector o ( &dia,OFileSelector::FileSelector, OFileSelector::Open, fi.dirPath(true), fi.fileName() );
51 QObject::connect ( &o, SIGNAL( ok() ), &dia, SLOT ( accept () ) ); 50 QObject::connect ( &o, SIGNAL( ok() ), &dia, SLOT ( accept () ) );
52 lay.addWidget( &o); 51 lay.addWidget( &o);
53 dia.showMaximized(); 52 dia.showMaximized();
53 dia.setCaption( cap );
54 int res = dia.exec(); 54 int res = dia.exec();
55 if ( res ) 55 if ( res )
56 retfile = o.selectedName(); 56 retfile = o.selectedName();
57 return retfile; 57 return retfile;
58} 58}
59 59
60#else 60#else
61 61
62#include <qfiledialog.h> 62#include <qfiledialog.h>
63 63
64QString KFileDialog::getSaveFileName( const QString & fn, 64QString KFileDialog::getSaveFileName( const QString & fn,
65 const QString & cap , QWidget * par ) 65 const QString & cap , QWidget * par )
66{ 66{
67 return QFileDialog::getSaveFileName( fn, QString::null, par, "openfile", cap ); 67 return QFileDialog::getSaveFileName( fn, QString::null, par, "openfile", cap );
68} 68}
69QString KFileDialog::getOpenFileName( const QString & fn, 69QString KFileDialog::getOpenFileName( const QString & fn,
70 const QString & cap, QWidget * par ) 70 const QString & cap, QWidget * par )
71{ 71{
72 72
73 return QFileDialog::getOpenFileName( fn, QString::null, par, "openfile", cap ); 73 return QFileDialog::getOpenFileName( fn, QString::null, par, "openfile", cap );
74} 74}
75#endif 75#endif
76 76
diff --git a/microkde/ktextedit.h b/microkde/ktextedit.h
index c912f3b..87c0602 100644
--- a/microkde/ktextedit.h
+++ b/microkde/ktextedit.h
@@ -1,22 +1,23 @@
1#ifndef MICROKDE_KTEXTEDIT_H 1#ifndef MICROKDE_KTEXTEDIT_H
2#define MICROKDE_KTEXTEDIT_H 2#define MICROKDE_KTEXTEDIT_H
3 3
4#include <qmultilineedit.h> 4#include <qmultilineedit.h>
5 5
6class KTextEdit : public QMultiLineEdit 6class KTextEdit : public QMultiLineEdit
7{ 7{
8 public: 8 public:
9 KTextEdit( QWidget *parent ) ; 9 KTextEdit( QWidget *parent ) ;
10 void setIgnoreMark( bool b ) { mIgnoreMark = b; }
10 11
11 private: 12 private:
12 bool mAllowPopupMenu; 13 bool mAllowPopupMenu;
13 bool mMouseDown; 14 bool mMouseDown;
14 bool mIgnoreMark; 15 bool mIgnoreMark;
15 int mYMousePos; 16 int mYMousePos;
16 int mXMousePos; 17 int mXMousePos;
17 void mousePressEvent(QMouseEvent *e); 18 void mousePressEvent(QMouseEvent *e);
18 void mouseReleaseEvent(QMouseEvent *e); 19 void mouseReleaseEvent(QMouseEvent *e);
19 void mouseMoveEvent(QMouseEvent *e); 20 void mouseMoveEvent(QMouseEvent *e);
20}; 21};
21 22
22#endif 23#endif