summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt8
-rw-r--r--korganizer/koeditorgeneralevent.cpp31
-rw-r--r--korganizer/koeditorrecurrence.cpp6
-rw-r--r--korganizer/kotodoeditor.cpp1
-rw-r--r--korganizer/mainwindow.cpp3
5 files changed, 29 insertions, 20 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index 7e7f8b7..b4e26c2 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -114,97 +114,97 @@
114{ "Date && Time","Datum && Zeit" }, 114{ "Date && Time","Datum && Zeit" },
115{ "Day begins at:","Der Tag beginnt um:" }, 115{ "Day begins at:","Der Tag beginnt um:" },
116{ "Days in Next-X-Days:","Tage in Nächste-X-Tage:" }, 116{ "Days in Next-X-Days:","Tage in Nächste-X-Tage:" },
117{ "Days in What's Next:","Tage in What's Next:" }, 117{ "Days in What's Next:","Tage in What's Next:" },
118{ "day(s)","Tag(e)" }, 118{ "day(s)","Tag(e)" },
119{ "Days to show in Next-X-Days view:","Welche Tage in Nächste-X-Tagen anzeigen:" }, 119{ "Days to show in Next-X-Days view:","Welche Tage in Nächste-X-Tagen anzeigen:" },
120{ "day","Tag" }, 120{ "day","Tag" },
121{ "Dec","Dez" }, 121{ "Dec","Dez" },
122{ "December","Dezember" }, 122{ "December","Dezember" },
123{ "Default alarm time:","Standard Alarmzeit:" }, 123{ "Default alarm time:","Standard Alarmzeit:" },
124{ "Default appointment time:","Standard Termin Startzeit:" }, 124{ "Default appointment time:","Standard Termin Startzeit:" },
125{ "Default event color:","Standard Terminfarbe:" }, 125{ "Default event color:","Standard Terminfarbe:" },
126{ "Default","Standard" }, 126{ "Default","Standard" },
127{ "Def. duration of new app.:","Standard Termin Länge:" }, 127{ "Def. duration of new app.:","Standard Termin Länge:" },
128{ "Delete all completed To-Dos?","Alle bereits erledigten Todos löschen?" }, 128{ "Delete all completed To-Dos?","Alle bereits erledigten Todos löschen?" },
129{ "Delete All","Lösche alles" }, 129{ "Delete All","Lösche alles" },
130{ "Delete all selected","Lösche alle Selektierten" }, 130{ "Delete all selected","Lösche alle Selektierten" },
131{ "Delete Current","Aktuellen löschen" }, 131{ "Delete Current","Aktuellen löschen" },
132{ "Delete Event...","Lösche Termin..." }, 132{ "Delete Event...","Lösche Termin..." },
133{ "Delete Event","Lösche Termin" }, 133{ "Delete Event","Lösche Termin" },
134{ "&Delete","Löschen" }, 134{ "&Delete","Löschen" },
135{ "Delete...","Löschen..." }, 135{ "Delete...","Löschen..." },
136{ "Delete","Löschen" }, 136{ "Delete","Löschen" },
137{ "Delete Todo...","Lösche Todo..." }, 137{ "Delete Todo...","Lösche Todo..." },
138{ "Delete To-Do","Lösche Todo" }, 138{ "Delete To-Do","Lösche Todo" },
139{ "Deleting item %d ...","Lösche Eintrag %d..." }, 139{ "Deleting item %d ...","Lösche Eintrag %d..." },
140{ "Descriptions","Beschreibungen" }, 140{ "Descriptions","Beschreibungen" },
141{ "Deselect all","Deselektiere Alle" }, 141{ "Deselect all","Deselektiere Alle" },
142{ "Details","Details" }, 142{ "Details","Details" },
143{ "Dinner","Abendessen" }, 143{ "Dinner","Abendessen" },
144{ "Do you really want\nto close KO/Pi?","Möchten Sie wirklich\nKO/PI verlassen?" }, 144{ "Do you really want\nto close KO/Pi?","Möchten Sie wirklich\nKO/PI verlassen?" },
145{ "Due Date","Fällig am" }, 145{ "Due Date","Fällig am" },
146{ "Due: ","Fällig: "}, 146{ "Due: ","Fällig: "},
147{ "Due Time","Fällig um" }, 147{ "Due Time","Fällig um" },
148{ "Due:","Fällig:"}, 148{ "Due:","Fällig:"},
149{ "Duration: ","Dauer: " }, 149{ "Duration: ","Dauer: " },
150{ "Edit...","Bearbeite..." }, 150{ "Edit...","Bearbeite..." },
151{ "Edit","Bearbeite" }, 151{ "Edit","Bearbeite" },
152{ "Edit Event...","Bearbeite Termin..." }, 152{ "Edit Event...","Bearbeite Termin..." },
153{ "Edit Event","Bearbeite Termin" }, 153{ "Edit Event","Bearbeite Termin" },
154{ "Edit exceptions","Bearbeite Ausnahmen" }, 154{ "Edit exceptions","Bearbeite Ausnahmen" },
155{ "EditorBox:","Editor Fenster:" }, 155{ "EditorBox:","Editor Fenster:" },
156{ "Edit Recurrence Range","Bearbeite Wiederholung" }, 156{ "Edit Recurrence Range","Bearbeite Wiederholung" },
157{ "Edit Todo...","Berabeite Todo..." }, 157{ "Edit Todo...","Berabeite Todo..." },
158{ "Edit To-Do","Todo bearbeiten" }, 158{ "Edit To-Do","Todo bearbeiten" },
159{ "E&mail address:","E&mail Adresse:" }, 159{ "E&mail address:","E&mail Adresse:" },
160{ "(EmptyEmail)","(KeineEmail)" }, 160{ "(EmptyEmail)","(KeineEmail)" },
161{ "(EmptyName)","(KeinName)" }, 161{ "(EmptyName)","(KeinName)" },
162{ "Enable Recurrence","Wiederholender Termin" }, 162{ "Enable Recurrence","Wiederholung anschalten" },
163{ "End after","Endet nach"}, 163{ "End after","Endet nach"},
164{ "End by:","Endet am"}, 164{ "End by:","Endet am"},
165{ "End Date","End Datum" }, 165{ "End Date","End Datum" },
166{ "End:","Ende:" }, 166{ "End:","Ende:" },
167{ "End Time","End Zeit" }, 167{ "End Time","End Zeit" },
168{ "English","Englisch" }, 168{ "English","Englisch" },
169{ "Event","Termin" }, 169{ "Event","Termin" },
170{ "Event list","Termin Liste" }, 170{ "Event list","Termin Liste" },
171{ "Events","Termine" }, 171{ "Events","Termine" },
172{ "Event Viewer:","Termin Übersicht:" }, 172{ "Event Viewer:","Termin Übersicht:" },
173{ "every","jede" }, 173{ "every","jede" },
174{ "Exceptions...","Ausnahmen..." }, 174{ "Exceptions...","Ausnahmen..." },
175{ "Exceptions","Ausnahmen" }, 175{ "Exceptions","Ausnahmen" },
176{ "Exclude holidays","Ohne freie Tage" }, 176{ "Exclude holidays","Ohne freie Tage" },
177{ "Exclude Saturdays","Ohne Samstage" }, 177{ "Exclude Saturdays","Ohne Samstage" },
178{ "Feb","Feb" }, 178{ "Feb","Feb" },
179{ "February","Februar" }, 179{ "February","Februar" },
180{ "&Find","Suche!" }, 180{ "&Find","Suche!" },
181{ "Fonts","Schriftart" }, 181{ "Fonts","Schriftart" },
182{ "Force take local entry always","Erzwinge:Nimm immer lokalen Eintrag" }, 182{ "Force take local entry always","Erzwinge:Nimm immer lokalen Eintrag" },
183{ "Force take remote entry always","Erzwinge:Nimm immer fernen Eintrag"}, 183{ "Force take remote entry always","Erzwinge:Nimm immer fernen Eintrag"},
184{ "Free","Frei" }, 184{ "Free","Frei" },
185{ "Friday","Freitag" }, 185{ "Friday","Freitag" },
186{ "Fri","Fr" }, 186{ "Fri","Fr" },
187{ "From:","Vom:" }, 187{ "From:","Vom:" },
188{ "Full &name:","Vor- und &Nachname:" }, 188{ "Full &name:","Vor- und &Nachname:" },
189{ "General","Allgemein" }, 189{ "General","Allgemein" },
190{ "German","Deutsch" }, 190{ "German","Deutsch" },
191{ "Gifts","Geschenke" }, 191{ "Gifts","Geschenke" },
192{ "Go to Today","Heute anzeigen" }, 192{ "Go to Today","Heute anzeigen" },
193{ "Help","Hilfe" }, 193{ "Help","Hilfe" },
194{ "Hide Dates","Daten ausblenden" }, 194{ "Hide Dates","Daten ausblenden" },
195{ "Highlight color:","Markierungen:" }, 195{ "Highlight color:","Markierungen:" },
196{ "Holiday color:","Freie Tage:" }, 196{ "Holiday color:","Freie Tage:" },
197{ "hour(s)","Stunde(n)" }, 197{ "hour(s)","Stunde(n)" },
198{ "In %1 days: ","In %1 Tagen: " }, 198{ "In %1 days: ","In %1 Tagen: " },
199{ "Incomplete Todo:","Unerledigte Aufgaben:" }, 199{ "Incomplete Todo:","Unerledigte Aufgaben:" },
200{ "Information","Information" }, 200{ "Information","Information" },
201{ "Invalid search expression,\ncannot perform ","Kann Suche nicht ausführen" }, 201{ "Invalid search expression,\ncannot perform ","Kann Suche nicht ausführen" },
202{ "Jan","Jan" }, 202{ "Jan","Jan" },
203{ "January","Januar" }, 203{ "January","Januar" },
204{ "JournalView:","Journal Ansicht:" }, 204{ "JournalView:","Journal Ansicht:" },
205{ "Journals","Journale" }, 205{ "Journals","Journale" },
206{ "Jul","Jul" }, 206{ "Jul","Jul" },
207{ "July","Juli" }, 207{ "July","Juli" },
208{ "Jump to date","Springe zum Datum" }, 208{ "Jump to date","Springe zum Datum" },
209{ "June","Juni" }, 209{ "June","Juni" },
210{ "Jun","Jun" }, 210{ "Jun","Jun" },
@@ -1287,54 +1287,54 @@
1287{ "Summary/Loc.","Titel/Ort" }, 1287{ "Summary/Loc.","Titel/Ort" },
1288{ "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, 1288{ "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." },
1289{ "Week Number","Wochennummer" }, 1289{ "Week Number","Wochennummer" },
1290{ "Import","Importiere" }, 1290{ "Import","Importiere" },
1291{ "Export","Exportiere" }, 1291{ "Export","Exportiere" },
1292{ "Beam","Beame" }, 1292{ "Beam","Beame" },
1293{ "Export selected","Exportiere Selektierte" }, 1293{ "Export selected","Exportiere Selektierte" },
1294{ "As iCal (ics) file...","Als iCal (ics) Datei..." }, 1294{ "As iCal (ics) file...","Als iCal (ics) Datei..." },
1295{ "As vCal (vcs) file...","Als vCal (vcs) Datei..." }, 1295{ "As vCal (vcs) file...","Als vCal (vcs) Datei..." },
1296{ "Journal/Details...","Journale/Details..." }, 1296{ "Journal/Details...","Journale/Details..." },
1297{ "Agenda View","Agenda Ansicht" }, 1297{ "Agenda View","Agenda Ansicht" },
1298{ "Show current time","Zeige aktuelle Zeit" }, 1298{ "Show current time","Zeige aktuelle Zeit" },
1299{ "Edit new item","Bearbeite neuen Eintrag" }, 1299{ "Edit new item","Bearbeite neuen Eintrag" },
1300{ "Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals","Bitte wählen Sie mindestens\neinen dieser Typen\num darin zu suchen:\n\nTermine\nTodos\nJournale" }, 1300{ "Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals","Bitte wählen Sie mindestens\neinen dieser Typen\num darin zu suchen:\n\nTermine\nTodos\nJournale" },
1301{ "There is no next alarm.","Es gibt keinen nächsten Alarm." }, 1301{ "There is no next alarm.","Es gibt keinen nächsten Alarm." },
1302{ "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" }, 1302{ "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" },
1303{ "The next alarm is in:\n","Der nächste Alarm ist in:\n" }, 1303{ "The next alarm is in:\n","Der nächste Alarm ist in:\n" },
1304{ "%1 days\n","%1 Tagen\n" }, 1304{ "%1 days\n","%1 Tagen\n" },
1305{ "1 day\n","1 Tag\n" }, 1305{ "1 day\n","1 Tag\n" },
1306{ "%1 hours\n","%1 Stunden\n" }, 1306{ "%1 hours\n","%1 Stunden\n" },
1307{ "1 hour\n","1 Stunde\n" }, 1307{ "1 hour\n","1 Stunde\n" },
1308{ "%1 minutes\n","%1 Minuten\n" }, 1308{ "%1 minutes\n","%1 Minuten\n" },
1309{ "1 minute\n","1 Minute\n" }, 1309{ "1 minute\n","1 Minute\n" },
1310{ "Only one toolbar","Nur eine Toolbar" }, 1310{ "Only one toolbar","Nur eine Toolbar" },
1311{ "Print","Drucke" }, 1311{ "Print","Drucke" },
1312{ "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." }, 1312{ "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." },
1313{ "There is nothing selected!","Es ist nichts ausgewählt!" }, 1313{ "There is nothing selected!","Es ist nichts ausgewählt!" },
1314{ "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " }, 1314{ "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " },
1315{ "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" }, 1315{ "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" },
1316{ "This prints the view as you see it.\n(With the complete content, of course.)\nYou may change the print layout by resizing the view.\nPrint unscaled may print several pages\ndepending on the amount of data.\nPrint scaled down will print all on one page.\nPrint scaled up/down will print all on one page,\nbut will scale up the text to page boundaries,\nif the text is smaller than the page.\nYou can select page geometry setup in the next dialog.\n","Dies druckt die Ansicht wie man sie sieht.\n(Mit dem kompletten Inhalt natürlich.)\nMan kann das Layout ändern durch ändern der Fenstergröße.\nDrucke unskaliert druckt ggf. mehrere Seiten\nabhängig von der Menge der Daten.\nDrucke runterskaliert um auf eine Seite zu passen\ndruckt alles auf eine Seite.\nDrucke hoch/runterskaliert um genau auf eine Seite zu passen\nvergrößert den Text gegebenenfalls.\nDas Seitenlayout kann im nächsten Dialog gewählt werden.\n" }, 1316{ "This prints the view as you see it.\n(With the complete content, of course.)\nYou may change the print layout by resizing the view.\nPrint unscaled may print several pages\ndepending on the amount of data.\nPrint scaled down will print all on one page.\nPrint scaled up/down will print all on one page,\nbut will scale up the text to page boundaries,\nif the text is smaller than the page.\nYou can select page geometry setup in the next dialog.\n","Dies druckt die Ansicht wie man sie sieht.\n(Mit dem kompletten Inhalt natürlich.)\nMan kann das Layout ändern durch ändern der Fenstergröße.\nDrucke unskaliert druckt ggf. mehrere Seiten\nabhängig von der Menge der Daten.\nDrucke runterskaliert um auf eine Seite zu passen\ndruckt alles auf eine Seite.\nDrucke hoch/runterskaliert um genau auf eine Seite zu passen\nvergrößert den Text gegebenenfalls.\nDas Seitenlayout kann im nächsten Dialog gewählt werden.\n" },
1317{ "KO/Pi Printout","KO/Pi Ausdruck" }, 1317{ "KO/Pi Printout","KO/Pi Ausdruck" },
1318{ "Print unscaled","Drucke unskaliert" }, 1318{ "Print unscaled","Drucke unskaliert" },
1319{ "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." }, 1319{ "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." },
1320{ "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." }, 1320{ "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." },
1321{ "Printout Mode","Druck Modus" }, 1321{ "Printout Mode","Druck Modus" },
1322{ "Filter menu icon","Filtermenu Icon" }, 1322{ "Filter menu icon","Filtermenu Icon" },
1323{ "<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n","<p><b>A+(shift oder ctrl)</b>: Zeige Zeit bis zum nächsten Alarm</p>\n" }, 1323{ "<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n","<p><b>A+(shift oder ctrl)</b>: Zeige Zeit bis zum nächsten Alarm</p>\n" },
1324{ "<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n","<p><b>N</b>: Wechsle zur nächsten Ansicht, die ein Icon in der Toolbar hat</p>\n" }, 1324{ "<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n","<p><b>N</b>: Wechsle zur nächsten Ansicht, die ein Icon in der Toolbar hat</p>\n" },
1325{ "%1d","%1t" }, 1325{ "%1d","%1t" },
1326{ "%1h","%1std" }, 1326{ "%1h","%1std" },
1327{ "%1min","%1min" }, 1327{ "%1min","%1min" },
1328{ "( %1 before )","( %1 vorher )" }, 1328{ "( %1 before )","( %1 vorher )" },
1329{ "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" }, 1329{ "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" },
1330{ "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" }, 1330{ "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" },
1331{ "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." }, 1331{ "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." },
1332{ "Show Sync Events in WN+Agenda","Zeige Sync-Ereignisse in WN+Agenda" }, 1332{ "Show Sync Events in WN+Agenda","Zeige Sync-Ereignisse in WN+Agenda" },
1333{ "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" }, 1333{ "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" },
1334{ "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" }, 1334{ "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" },
1335{ "","" }, 1335{ " on "," am " },
1336{ "","" }, 1336{ "On: ","Am: " },
1337{ "","" }, 1337{ "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" },
1338{ "","" }, 1338{ "","" },
1339{ "","" }, 1339{ "","" },
1340{ "","" }, 1340{ "","" },
diff --git a/korganizer/koeditorgeneralevent.cpp b/korganizer/koeditorgeneralevent.cpp
index 2a49528..d4aa78c 100644
--- a/korganizer/koeditorgeneralevent.cpp
+++ b/korganizer/koeditorgeneralevent.cpp
@@ -331,97 +331,104 @@ void KOEditorGeneralEvent::writeEvent(Event *event)
331 } // check for float 331 } // check for float
332 mSummaryEdit->save(KOLocationBox::SUMMARYEVENT); 332 mSummaryEdit->save(KOLocationBox::SUMMARYEVENT);
333 333
334 event->setTransparency(mFreeTimeCombo->currentItem() > 0 334 event->setTransparency(mFreeTimeCombo->currentItem() > 0
335 ? KCal::Event::Transparent 335 ? KCal::Event::Transparent
336 : KCal::Event::Opaque); 336 : KCal::Event::Opaque);
337 337
338// kdDebug() << "KOEditorGeneralEvent::writeEvent() done" << endl; 338// kdDebug() << "KOEditorGeneralEvent::writeEvent() done" << endl;
339} 339}
340 340
341void KOEditorGeneralEvent::setDuration() 341void KOEditorGeneralEvent::setDuration()
342{ 342{
343 QString tmpStr = "", catStr; 343 QString tmpStr = "", catStr;
344 int hourdiff, minutediff; 344 int hourdiff, minutediff;
345 // end<date is an accepted temporary state while typing, but don't show 345 // end<date is an accepted temporary state while typing, but don't show
346 // any duration if this happens 346 // any duration if this happens
347 if(mCurrEndDateTime >= mCurrStartDateTime) { 347 if(mCurrEndDateTime >= mCurrStartDateTime) {
348 348
349 if (mNoTimeButton->isChecked()) { 349 if (mNoTimeButton->isChecked()) {
350 int daydiff = mCurrStartDateTime.date().daysTo(mCurrEndDateTime.date()) + 1; 350 int daydiff = mCurrStartDateTime.date().daysTo(mCurrEndDateTime.date()) + 1;
351 tmpStr = i18n("Duration: "); 351 tmpStr = i18n("Duration: ");
352 tmpStr.append(i18n("1 Day","%n Days",daydiff)); 352 tmpStr.append(i18n("1 Day","%n Days",daydiff));
353 } else { 353 } else {
354 int secto = mCurrStartDateTime.secsTo( mCurrEndDateTime ); 354 int secto = mCurrStartDateTime.secsTo( mCurrEndDateTime );
355 hourdiff = secto / 3600; 355 hourdiff = secto / 3600;
356 minutediff = (secto/60 ) % 60; 356 minutediff = (secto/60 ) % 60;
357 if (hourdiff || minutediff){ 357 if (hourdiff || minutediff){
358 tmpStr = i18n("Duration: "); 358 tmpStr = i18n("Duration: ");
359 if (hourdiff){ 359 if (hourdiff){
360 catStr = i18n("1 h","%n h",hourdiff); 360 catStr = i18n("1 h","%n h",hourdiff);
361 tmpStr.append(catStr); 361 tmpStr.append(catStr);
362 } 362 }
363 if (hourdiff && minutediff){ 363 if (hourdiff && minutediff){
364 tmpStr += i18n(", "); 364 tmpStr += i18n(", ");
365 } 365 }
366 if (minutediff){ 366 if (minutediff){
367 catStr = i18n("1 min","%n min",minutediff); 367 catStr = i18n("1 min","%n min",minutediff);
368 tmpStr += catStr; 368 tmpStr += catStr;
369 } 369 }
370 } else tmpStr = ""; 370 } else tmpStr = "";
371 } 371 }
372 } 372 }
373 mDurationLabel->setText(tmpStr); 373 mDurationLabel->setText(tmpStr);
374} 374}
375 375
376void KOEditorGeneralEvent::emitDateTimeStr() 376void KOEditorGeneralEvent::emitDateTimeStr()
377{ 377{
378 KLocale *l = KGlobal::locale(); 378 KLocale *l = KGlobal::locale();
379 379 QString startString = "";
380 QString from,to; 380 if ( mCurrStartDateTime.date() < mCurrEndDateTime.date() ) {
381 if (mNoTimeButton->isChecked()) { 381 if ( mNoTimeButton->isChecked() ) {
382 from = l->formatDate(mCurrStartDateTime.date()); 382 startString = i18n("From: ") + l->formatDate(mCurrStartDateTime.date() );
383 to = l->formatDate(mCurrEndDateTime.date()); 383 startString += "\n"+i18n("To: ")+ l->formatDate(mCurrEndDateTime.date());
384
385 } else {
386 startString = i18n("From: ") +l->formatDateTime(mCurrStartDateTime, false);
387 startString += "\n"+i18n("To: ")+l->formatDateTime(mCurrEndDateTime, false);
388 }
384 } else { 389 } else {
385 from = l->formatDateTime(mCurrStartDateTime); 390 if ( mNoTimeButton->isChecked() ) {
386 to = l->formatDateTime(mCurrEndDateTime); 391 startString = i18n("On: ") + l->formatDate(mCurrStartDateTime.date() );
392 } else {
393 startString = i18n("From: ") + KGlobal::locale()->formatTime(mCurrStartDateTime.time())+
394 "-"+KGlobal::locale()->formatTime(mCurrEndDateTime.time());
395 startString += i18n(" on ")+KGlobal::locale()->formatDate( mCurrStartDateTime.date(), true);
396 }
387 } 397 }
388 398 startString +="\n"+mDurationLabel->text();
389 QString str = i18n("From: %1 To: %2 %3").arg(from).arg(to) 399 emit dateTimeStrChanged(startString);
390 .arg(mDurationLabel->text());
391
392 emit dateTimeStrChanged(str);
393} 400}
394 401
395bool KOEditorGeneralEvent::validateInput() 402bool KOEditorGeneralEvent::validateInput()
396{ 403{
397 404
398 if (!mStartDateEdit->inputIsValid()) { 405 if (!mStartDateEdit->inputIsValid()) {
399 KMessageBox::sorry( 0, 406 KMessageBox::sorry( 0,
400 i18n("Please specify a valid start date,\nfor example '%1'.") 407 i18n("Please specify a valid start date,\nfor example '%1'.")
401 .arg( KGlobal::locale()->formatDate( QDate::currentDate(), true ) ) ); 408 .arg( KGlobal::locale()->formatDate( QDate::currentDate(), true ) ) );
402 return false; 409 return false;
403 } 410 }
404 411
405 if (!mEndDateEdit->inputIsValid()) { 412 if (!mEndDateEdit->inputIsValid()) {
406 KMessageBox::sorry( 0, 413 KMessageBox::sorry( 0,
407 i18n("Please specify a valid end date,\nfor example '%1'.") 414 i18n("Please specify a valid end date,\nfor example '%1'.")
408 .arg( KGlobal::locale()->formatDate( QDate::currentDate(), true ) ) ); 415 .arg( KGlobal::locale()->formatDate( QDate::currentDate(), true ) ) );
409 return false; 416 return false;
410 } 417 }
411 418
412 QDateTime startDt,endDt; 419 QDateTime startDt,endDt;
413 startDt.setDate(mStartDateEdit->date()); 420 startDt.setDate(mStartDateEdit->date());
414 endDt.setDate(mEndDateEdit->date()); 421 endDt.setDate(mEndDateEdit->date());
415 if (!mNoTimeButton->isChecked()) { 422 if (!mNoTimeButton->isChecked()) {
416 startDt.setTime(mStartTimeEdit->getTime()); 423 startDt.setTime(mStartTimeEdit->getTime());
417 endDt.setTime(mEndTimeEdit->getTime()); 424 endDt.setTime(mEndTimeEdit->getTime());
418 } 425 }
419 426
420 if (startDt > endDt) { 427 if (startDt > endDt) {
421 KMessageBox::sorry(0,i18n("The event ends before it starts.\n" 428 KMessageBox::sorry(0,i18n("The event ends before it starts.\n"
422 "Please correct dates and times.")); 429 "Please correct dates and times."));
423 return false; 430 return false;
424 } 431 }
425 432
426 return KOEditorGeneral::validateInput(); 433 return KOEditorGeneral::validateInput();
427} 434}
diff --git a/korganizer/koeditorrecurrence.cpp b/korganizer/koeditorrecurrence.cpp
index bf81b01..01c5773 100644
--- a/korganizer/koeditorrecurrence.cpp
+++ b/korganizer/koeditorrecurrence.cpp
@@ -684,113 +684,113 @@ int RecurrenceChooser::type()
684 else if ( mMonthlyButton->isChecked() ) return Monthly; 684 else if ( mMonthlyButton->isChecked() ) return Monthly;
685 else return Yearly; 685 else return Yearly;
686 } 686 }
687} 687}
688 688
689void RecurrenceChooser::setType( int type ) 689void RecurrenceChooser::setType( int type )
690{ 690{
691 if ( mTypeCombo ) { 691 if ( mTypeCombo ) {
692 mTypeCombo->setCurrentItem( type ); 692 mTypeCombo->setCurrentItem( type );
693 } else { 693 } else {
694 switch ( type ) { 694 switch ( type ) {
695 case Daily: 695 case Daily:
696 mDailyButton->setChecked( true ); 696 mDailyButton->setChecked( true );
697 break; 697 break;
698 case Weekly: 698 case Weekly:
699 mWeeklyButton->setChecked( true ); 699 mWeeklyButton->setChecked( true );
700 break; 700 break;
701 case Monthly: 701 case Monthly:
702 mMonthlyButton->setChecked( true ); 702 mMonthlyButton->setChecked( true );
703 break; 703 break;
704 case Yearly: 704 case Yearly:
705 default: 705 default:
706 mYearlyButton->setChecked( true ); 706 mYearlyButton->setChecked( true );
707 break; 707 break;
708 } 708 }
709 } 709 }
710} 710}
711 711
712void RecurrenceChooser::emitChoice() 712void RecurrenceChooser::emitChoice()
713{ 713{
714 emit chosen ( type() ); 714 emit chosen ( type() );
715} 715}
716 716
717/////////////////////////////// Main Widget ///////////////////////////// 717/////////////////////////////// Main Widget /////////////////////////////
718 718
719KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) : 719KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) :
720 QWidget( parent, name ) 720 QWidget( parent, name )
721{ 721{
722 QGridLayout *topLayout = new QGridLayout( this, 2,2 ); 722 QGridLayout *topLayout = new QGridLayout( this, 2,2 );
723 topLayout->setSpacing( KDialog::spacingHint() ); 723 topLayout->setSpacing( KDialog::spacingHint() );
724 topLayout->setMargin( KDialog::marginHintSmall() ); 724 topLayout->setMargin( KDialog::marginHintSmall() );
725 725
726 mEnabledCheck = new QCheckBox( i18n("Enable Recurrence"), this ); 726 mEnabledCheck = new QCheckBox( i18n("Enable Recurrence"), this );
727 connect( mEnabledCheck, SIGNAL( toggled( bool ) ), 727 connect( mEnabledCheck, SIGNAL( toggled( bool ) ),
728 SLOT( setEnabled( bool ) ) ); 728 SLOT( setEnabled( bool ) ) );
729 topLayout->addMultiCellWidget( mEnabledCheck, 0, 0, 0, 1 ); 729 topLayout->addMultiCellWidget( mEnabledCheck, 0, 0, 0, 1 );
730 730
731 731
732 mTimeGroupBox = new QGroupBox( 1, Horizontal, i18n("Appointment Time "), 732 mTimeGroupBox = new QGroupBox( 1, Horizontal, i18n("Time"),
733 this ); 733 this );
734 topLayout->addMultiCellWidget( mTimeGroupBox, 1, 1 , 0 , 1 ); 734 topLayout->addMultiCellWidget( mTimeGroupBox, 1, 1 , 0 , 1 );
735 735
736 if ( QApplication::desktop()->width() <= 320) { 736 if ( QApplication::desktop()->width() <= 320) {
737 mTimeGroupBox->hide(); 737 mTimeGroupBox->hide();
738 } 738 }
739 739
740// QFrame *timeFrame = new QFrame( mTimeGroupBox ); 740// QFrame *timeFrame = new QFrame( mTimeGroupBox );
741// QBoxLayout *layoutTimeFrame = new QHBoxLayout( timeFrame ); 741// QBoxLayout *layoutTimeFrame = new QHBoxLayout( timeFrame );
742// layoutTimeFrame->setSpacing( KDialog::spacingHint() ); 742// layoutTimeFrame->setSpacing( KDialog::spacingHint() );
743 743
744 mDateTimeLabel = new QLabel( mTimeGroupBox ); 744 mDateTimeLabel = new QLabel( mTimeGroupBox );
745// mDateTimeLabel = new QLabel( timeFrame ); 745// mDateTimeLabel = new QLabel( timeFrame );
746// layoutTimeFrame->addWidget( mDateTimeLabel ); 746// layoutTimeFrame->addWidget( mDateTimeLabel );
747 747 //mTimeGroupBox->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Maximum ) );
748 748 //mDateTimeLabel->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Maximum) );
749 mRuleBox = new QGroupBox( 1, Horizontal, i18n("Recurrence Rule"), this ); 749 mRuleBox = new QGroupBox( 1, Horizontal, i18n("Recurrence Rule"), this );
750 topLayout->addMultiCellWidget( mRuleBox, 2, 2, 0, 1 ); 750 topLayout->addMultiCellWidget( mRuleBox, 2, 2, 0, 1 );
751 mRecurrenceChooser = new RecurrenceChooser( mRuleBox ); 751 mRecurrenceChooser = new RecurrenceChooser( mRuleBox );
752 connect( mRecurrenceChooser, SIGNAL( chosen( int ) ), 752 connect( mRecurrenceChooser, SIGNAL( chosen( int ) ),
753 SLOT( showCurrentRule( int ) ) ); 753 SLOT( showCurrentRule( int ) ) );
754 754
755 755
756 mRuleStack = new QWidgetStack( mRuleBox ); 756 mRuleStack = new QWidgetStack( mRuleBox );
757 757
758 mDaily = new RecurDaily( mRuleStack ); 758 mDaily = new RecurDaily( mRuleStack );
759 mRuleStack->addWidget( mDaily, 0 ); 759 mRuleStack->addWidget( mDaily, 0 );
760 760
761 mWeekly = new RecurWeekly( mRuleStack ); 761 mWeekly = new RecurWeekly( mRuleStack );
762 mRuleStack->addWidget( mWeekly, 0 ); 762 mRuleStack->addWidget( mWeekly, 0 );
763 763
764 mMonthly = new RecurMonthly( mRuleStack ); 764 mMonthly = new RecurMonthly( mRuleStack );
765 mRuleStack->addWidget( mMonthly, 0 ); 765 mRuleStack->addWidget( mMonthly, 0 );
766 766
767 mYearly = new RecurYearly( mRuleStack ); 767 mYearly = new RecurYearly( mRuleStack );
768 mRuleStack->addWidget( mYearly, 0 ); 768 mRuleStack->addWidget( mYearly, 0 );
769 769
770 showCurrentRule( mRecurrenceChooser->type() ); 770 showCurrentRule( mRecurrenceChooser->type() );
771 mRecurrenceRangeWidget = 0; 771 mRecurrenceRangeWidget = 0;
772 mRecurrenceRangeDialog = new RecurrenceRangeDialog( this ); 772 mRecurrenceRangeDialog = new RecurrenceRangeDialog( this );
773 mRecurrenceRange = mRecurrenceRangeDialog; 773 mRecurrenceRange = mRecurrenceRangeDialog;
774 mRecurrenceRangeButton = new QPushButton( i18n("Recurrence Range..."), 774 mRecurrenceRangeButton = new QPushButton( i18n("Recurrence Range..."),
775 this ); 775 this );
776 776
777 connect( mRecurrenceRangeButton, SIGNAL( clicked() ), 777 connect( mRecurrenceRangeButton, SIGNAL( clicked() ),
778 SLOT( showRecurrenceRangeDialog() ) ); 778 SLOT( showRecurrenceRangeDialog() ) );
779 779
780 mExceptionsWidget = 0; 780 mExceptionsWidget = 0;
781 mExceptionsDialog = new ExceptionsDialog( this ); 781 mExceptionsDialog = new ExceptionsDialog( this );
782 mExceptions = mExceptionsDialog; 782 mExceptions = mExceptionsDialog;
783 mExceptionsButton = new QPushButton( i18n("Exceptions..."), this ); 783 mExceptionsButton = new QPushButton( i18n("Exceptions..."), this );
784 if ( QApplication::desktop()->width() < 320 ) { 784 if ( QApplication::desktop()->width() < 320 ) {
785 topLayout->addMultiCellWidget( mRecurrenceRangeButton, 3, 3, 0, 1 ); 785 topLayout->addMultiCellWidget( mRecurrenceRangeButton, 3, 3, 0, 1 );
786 topLayout->addMultiCellWidget( mExceptionsButton, 4, 4, 0, 1 ); 786 topLayout->addMultiCellWidget( mExceptionsButton, 4, 4, 0, 1 );
787 } else { 787 } else {
788 topLayout->addWidget( mRecurrenceRangeButton, 3, 0 ); 788 topLayout->addWidget( mRecurrenceRangeButton, 3, 0 );
789 topLayout->addWidget( mExceptionsButton, 3, 1 ); 789 topLayout->addWidget( mExceptionsButton, 3, 1 );
790 } 790 }
791 connect( mExceptionsButton, SIGNAL( clicked() ), 791 connect( mExceptionsButton, SIGNAL( clicked() ),
792 SLOT( showExceptionsDialog() ) ); 792 SLOT( showExceptionsDialog() ) );
793} 793}
794 794
795KOEditorRecurrence::~KOEditorRecurrence() 795KOEditorRecurrence::~KOEditorRecurrence()
796{ 796{
diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp
index 51e2524..6a05cc8 100644
--- a/korganizer/kotodoeditor.cpp
+++ b/korganizer/kotodoeditor.cpp
@@ -27,96 +27,97 @@
27#include <qpixmap.h> 27#include <qpixmap.h>
28#include <qlayout.h> 28#include <qlayout.h>
29#include <qhbox.h> 29#include <qhbox.h>
30#include <qdir.h> 30#include <qdir.h>
31#include <qdatetime.h> 31#include <qdatetime.h>
32#include <qapplication.h> 32#include <qapplication.h>
33#include <qtabwidget.h> 33#include <qtabwidget.h>
34 34
35#include <kiconloader.h> 35#include <kiconloader.h>
36#include <klocale.h> 36#include <klocale.h>
37#include <kfiledialog.h> 37#include <kfiledialog.h>
38#include <kstandarddirs.h> 38#include <kstandarddirs.h>
39#include <kmessagebox.h> 39#include <kmessagebox.h>
40 40
41#include <libkdepim/categoryselectdialog.h> 41#include <libkdepim/categoryselectdialog.h>
42#include <libkcal/calendarlocal.h> 42#include <libkcal/calendarlocal.h>
43#include <libkcal/calendarresources.h> 43#include <libkcal/calendarresources.h>
44#include <libkcal/resourcecalendar.h> 44#include <libkcal/resourcecalendar.h>
45#include <libkcal/icalformat.h> 45#include <libkcal/icalformat.h>
46#include <kresources/resourceselectdialog.h> 46#include <kresources/resourceselectdialog.h>
47#include <libkdepim/kdateedit.h> 47#include <libkdepim/kdateedit.h>
48 48
49#include "koprefs.h" 49#include "koprefs.h"
50#include "kolocationbox.h" 50#include "kolocationbox.h"
51 51
52#include "kotodoeditor.h" 52#include "kotodoeditor.h"
53extern int globalFlagBlockAgenda; 53extern int globalFlagBlockAgenda;
54 54
55KOTodoEditor::KOTodoEditor( Calendar *calendar, QWidget *parent ) : 55KOTodoEditor::KOTodoEditor( Calendar *calendar, QWidget *parent ) :
56 KOIncidenceEditor( i18n("Edit To-Do"), calendar, parent ) 56 KOIncidenceEditor( i18n("Edit To-Do"), calendar, parent )
57{ 57{
58 mTodo = 0; 58 mTodo = 0;
59 mRelatedTodo = 0; 59 mRelatedTodo = 0;
60 findButton(User1)->hide(); 60 findButton(User1)->hide();
61 init(); 61 init();
62} 62}
63 63
64KOTodoEditor::~KOTodoEditor() 64KOTodoEditor::~KOTodoEditor()
65{ 65{
66 emit dialogClose( mTodo ); 66 emit dialogClose( mTodo );
67} 67}
68 68
69void KOTodoEditor::init() 69void KOTodoEditor::init()
70{ 70{
71 setupGeneral(); 71 setupGeneral();
72 setupAttendeesTab(); 72 setupAttendeesTab();
73 setupRecurrence(); 73 setupRecurrence();
74 connect(mGeneral,SIGNAL(datesChecked()),this ,SLOT(checkRecurrence())); 74 connect(mGeneral,SIGNAL(datesChecked()),this ,SLOT(checkRecurrence()));
75 mRecurrence->setDateTimeStr( i18n("<i>The recurrence is computed from the start datetime!</i>") );
75} 76}
76void KOTodoEditor::setupRecurrence() 77void KOTodoEditor::setupRecurrence()
77{ 78{
78 QFrame *topFrame = addPage( i18n("Recurrence") ); 79 QFrame *topFrame = addPage( i18n("Recurrence") );
79 QBoxLayout *topLayout = new QVBoxLayout( topFrame ); 80 QBoxLayout *topLayout = new QVBoxLayout( topFrame );
80 81
81 mRecurrence = new KOEditorRecurrence( topFrame ); 82 mRecurrence = new KOEditorRecurrence( topFrame );
82 topLayout->addWidget( mRecurrence ); 83 topLayout->addWidget( mRecurrence );
83} 84}
84 85
85void KOTodoEditor::setCategories( QString s ) 86void KOTodoEditor::setCategories( QString s )
86{ 87{
87 mGeneral->setCategories(s); 88 mGeneral->setCategories(s);
88} 89}
89void KOTodoEditor::setSecrecy( int sec ) 90void KOTodoEditor::setSecrecy( int sec )
90{ 91{
91 mGeneral->setSecrecy( sec ); 92 mGeneral->setSecrecy( sec );
92} 93}
93void KOTodoEditor::reload() 94void KOTodoEditor::reload()
94{ 95{
95 if ( mTodo ) readTodo( mTodo ); 96 if ( mTodo ) readTodo( mTodo );
96} 97}
97 98
98void KOTodoEditor::setupGeneral() 99void KOTodoEditor::setupGeneral()
99{ 100{
100 mGeneral = new KOEditorGeneralTodo(this); 101 mGeneral = new KOEditorGeneralTodo(this);
101 connect ( mGeneral, SIGNAL ( allAccepted() ), this, SLOT ( slotOk () ) ); 102 connect ( mGeneral, SIGNAL ( allAccepted() ), this, SLOT ( slotOk () ) );
102 103
103 // connect(mGeneral,SIGNAL(openCategoryDialog()),mCategoryDialog,SLOT(show())); 104 // connect(mGeneral,SIGNAL(openCategoryDialog()),mCategoryDialog,SLOT(show()));
104 //connect(mCategoryDialog, SIGNAL(categoriesSelected(const QString &)), 105 //connect(mCategoryDialog, SIGNAL(categoriesSelected(const QString &)),
105 // mGeneral,SLOT(setCategories(const QString &))); 106 // mGeneral,SLOT(setCategories(const QString &)));
106 107
107 if (KOPrefs::instance()->mCompactDialogs) { 108 if (KOPrefs::instance()->mCompactDialogs) {
108 QFrame *topFrame = addPage(i18n("General")); 109 QFrame *topFrame = addPage(i18n("General"));
109 110
110 QBoxLayout *topLayout = new QVBoxLayout(topFrame); 111 QBoxLayout *topLayout = new QVBoxLayout(topFrame);
111 if ( QApplication::desktop()->width() < 480 ) { 112 if ( QApplication::desktop()->width() < 480 ) {
112 topLayout->setMargin(1); 113 topLayout->setMargin(1);
113 topLayout->setSpacing(1); 114 topLayout->setSpacing(1);
114 } else { 115 } else {
115 topLayout->setMargin(marginHint()-1); 116 topLayout->setMargin(marginHint()-1);
116 topLayout->setSpacing(spacingHint()-1); 117 topLayout->setSpacing(spacingHint()-1);
117 } 118 }
118 mGeneral->initHeader(topFrame,topLayout); 119 mGeneral->initHeader(topFrame,topLayout);
119 mGeneral->initTime(topFrame,topLayout); 120 mGeneral->initTime(topFrame,topLayout);
120 mGeneral->initAlarm(topFrame,topLayout); 121 mGeneral->initAlarm(topFrame,topLayout);
121 mGeneral->enableAlarm( false ); 122 mGeneral->enableAlarm( false );
122 123
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 94f4677..ffc4d9a 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -1542,97 +1542,98 @@ QString MainWindow::syncFileName()
1542#include "koglobals.h" 1542#include "koglobals.h"
1543#include <kcalendarsystem.h> 1543#include <kcalendarsystem.h>
1544void MainWindow::updateWeek(QDate seda) 1544void MainWindow::updateWeek(QDate seda)
1545{ 1545{
1546 int weekNum = KGlobal::locale()->weekNum ( seda ); 1546 int weekNum = KGlobal::locale()->weekNum ( seda );
1547 mWeekPixmap.fill( mWeekBgColor ); 1547 mWeekPixmap.fill( mWeekBgColor );
1548 QPainter p ( &mWeekPixmap ); 1548 QPainter p ( &mWeekPixmap );
1549 p.setFont( mWeekFont ); 1549 p.setFont( mWeekFont );
1550 p.drawText( 0,0,mWeekPixmap.width(), mWeekPixmap.height(),AlignCenter, QString::number( weekNum) ); 1550 p.drawText( 0,0,mWeekPixmap.width(), mWeekPixmap.height(),AlignCenter, QString::number( weekNum) );
1551 p.end(); 1551 p.end();
1552 QIconSet icon3 ( mWeekPixmap ); 1552 QIconSet icon3 ( mWeekPixmap );
1553 mWeekAction->setIconSet ( icon3 ); 1553 mWeekAction->setIconSet ( icon3 );
1554 1554
1555} 1555}
1556void MainWindow::updateWeekNum(const DateList &selectedDates) 1556void MainWindow::updateWeekNum(const DateList &selectedDates)
1557{ 1557{
1558 updateWeek( selectedDates.first() ); 1558 updateWeek( selectedDates.first() );
1559} 1559}
1560void MainWindow::processIncidenceSelection( Incidence *incidence ) 1560void MainWindow::processIncidenceSelection( Incidence *incidence )
1561{ 1561{
1562 1562
1563 if ( !incidence ) { 1563 if ( !incidence ) {
1564 enableIncidenceActions( false ); 1564 enableIncidenceActions( false );
1565 1565
1566 mNewSubTodoAction->setEnabled( false ); 1566 mNewSubTodoAction->setEnabled( false );
1567 setCaptionToDates(); 1567 setCaptionToDates();
1568 return; 1568 return;
1569 1569
1570 } 1570 }
1571 1571
1572 //KGlobal::locale()->formatDateTime(nextA, true); 1572 //KGlobal::locale()->formatDateTime(nextA, true);
1573 QString startString = ""; 1573 QString startString = "";
1574 if ( incidence->type() != "Todo" ) { 1574 if ( incidence->type() != "Todo" ) {
1575 if ( incidence->dtStart().date() < incidence->dtEnd().date() ) { 1575 if ( incidence->dtStart().date() < incidence->dtEnd().date() ) {
1576 if ( incidence->doesFloat() ) { 1576 if ( incidence->doesFloat() ) {
1577 startString += ": "+incidence->dtStartDateStr( true ); 1577 startString += ": "+incidence->dtStartDateStr( true );
1578 startString += " --- "+((Event*)incidence)->dtEndDateStr( true ); 1578 startString += " --- "+((Event*)incidence)->dtEndDateStr( true );
1579 1579
1580 } else { 1580 } else {
1581 startString = ": "+incidence->dtStartStr(true); 1581 startString = ": "+incidence->dtStartStr(true);
1582 startString += " --- "+((Event*)incidence)->dtEndStr(true); 1582 startString += " --- "+((Event*)incidence)->dtEndStr(true);
1583 1583
1584 } 1584 }
1585 1585
1586 } else { 1586 } else {
1587 if ( incidence->dtStart().time() != incidence->dtEnd().time() ) 1587 if ( incidence->dtStart().time() != incidence->dtEnd().time() )
1588 startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+ 1588 startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+
1589 "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time()); 1589 "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time());
1590 if ( incidence->categories().contains( i18n("Birthday") ) || incidence->categories().contains( i18n("Anniversary") ) ) { 1590
1591 if ( incidence->isBirthday() || incidence->isAnniversary() ) {
1591 bool ok; 1592 bool ok;
1592 QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok ); 1593 QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok );
1593 if ( ok ) { 1594 if ( ok ) {
1594 int years = noc.date().year() - incidence->dtStart().date().year(); 1595 int years = noc.date().year() - incidence->dtStart().date().year();
1595 startString += i18n(" (%1 y.)"). arg( years ); 1596 startString += i18n(" (%1 y.)"). arg( years );
1596 } 1597 }
1597 } 1598 }
1598 else 1599 else
1599 startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true); 1600 startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true);
1600 } 1601 }
1601 1602
1602 } 1603 }
1603 else 1604 else
1604 startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed"); 1605 startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed");
1605 if ( !incidence->location().isEmpty() ) 1606 if ( !incidence->location().isEmpty() )
1606 startString += " (" +incidence->location()+")"; 1607 startString += " (" +incidence->location()+")";
1607 setCaption( incidence->summary()+startString); 1608 setCaption( incidence->summary()+startString);
1608 1609
1609 enableIncidenceActions( true ); 1610 enableIncidenceActions( true );
1610 1611
1611 if ( incidence->type() == "Event" ) { 1612 if ( incidence->type() == "Event" ) {
1612 mShowAction->setText( i18n("Show Event...") ); 1613 mShowAction->setText( i18n("Show Event...") );
1613 mEditAction->setText( i18n("Edit Event...") ); 1614 mEditAction->setText( i18n("Edit Event...") );
1614 mDeleteAction->setText( i18n("Delete Event...") ); 1615 mDeleteAction->setText( i18n("Delete Event...") );
1615 1616
1616 mNewSubTodoAction->setEnabled( false ); 1617 mNewSubTodoAction->setEnabled( false );
1617 } else if ( incidence->type() == "Todo" ) { 1618 } else if ( incidence->type() == "Todo" ) {
1618 mShowAction->setText( i18n("Show Todo...") ); 1619 mShowAction->setText( i18n("Show Todo...") );
1619 mEditAction->setText( i18n("Edit Todo...") ); 1620 mEditAction->setText( i18n("Edit Todo...") );
1620 mDeleteAction->setText( i18n("Delete Todo...") ); 1621 mDeleteAction->setText( i18n("Delete Todo...") );
1621 1622
1622 mNewSubTodoAction->setEnabled( true ); 1623 mNewSubTodoAction->setEnabled( true );
1623 } else { 1624 } else {
1624 mShowAction->setText( i18n("Show...") ); 1625 mShowAction->setText( i18n("Show...") );
1625 mShowAction->setText( i18n("Edit...") ); 1626 mShowAction->setText( i18n("Edit...") );
1626 mShowAction->setText( i18n("Delete...") ); 1627 mShowAction->setText( i18n("Delete...") );
1627 1628
1628 mNewSubTodoAction->setEnabled( false ); 1629 mNewSubTodoAction->setEnabled( false );
1629 } 1630 }
1630} 1631}
1631 1632
1632void MainWindow::enableIncidenceActions( bool enabled ) 1633void MainWindow::enableIncidenceActions( bool enabled )
1633{ 1634{
1634 mShowAction->setEnabled( enabled ); 1635 mShowAction->setEnabled( enabled );
1635 mEditAction->setEnabled( enabled ); 1636 mEditAction->setEnabled( enabled );
1636 mDeleteAction->setEnabled( enabled ); 1637 mDeleteAction->setEnabled( enabled );
1637 1638
1638 mCloneAction->setEnabled( enabled ); 1639 mCloneAction->setEnabled( enabled );