summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt8
-rw-r--r--korganizer/koeditorgeneralevent.cpp27
-rw-r--r--korganizer/koeditorrecurrence.cpp6
-rw-r--r--korganizer/kotodoeditor.cpp1
-rw-r--r--korganizer/mainwindow.cpp3
5 files changed, 27 insertions, 18 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
@@ -66,193 +66,193 @@
{"Ask for every entry on conflict","Frage bei Konflikten nach"},
{ "Ask for preferences before syncing","Vor dem Syncronisieren nachfragen" },
{ "Ask for quit when closing KO/Pi","Vor dem Beenden von KO/Pi nachfragen" },
{ "Attendees","Teilnehmer" },
{ "Aug","Aug" },
{ "August","August" },
{ "Auto-Save","Automatisches Abspeichern" },
{ "Auto save delay in minutes:","Verzög.autom.Speichern in Min" },
{ "Auto saving...","Automatische Sicherung..." },
{ "Begin on:","Starte mit:" },
{ "Begins on: %1","Starte mit: %1" },
{ "<b>From:</b> %1 <b>To:</b> %2","<b>Vom:</b> %1 <b>Zum:</b> %2" },
{ "<b>On:</b> %1","<b>Am:</b> %1" },
{ "<b>On:</b> %1 <b>From:S</b> %2 <b>To:</b> %3","<b>Am:</b> %1 <b>Vom:S</b> %2 <b>Zum:</b> %3" },
{ "<b>Original event:</b><p>","<b>Original Termin:</b><p>" },
{ " - both are modified after last sync"," - beide wurden nach der letzten Syncronisation verändert" },
{ "Busy","Belegt" },
{ "&Cancel","Abbre&chen" },
{ "Cancel","Abbrechen" },
{ "Cannot delete To-Do\nwhich has children.","Kann Todo nicht löschen,\n da noch Einträge vorhanden sind" },
{ "Can't generate mail:\nNo event selected.","Kann e-Mail nicht erstellen:\nKein Termin ausgewählt." },
{ "Categories...","Kategorien..." },
{ "Categories","Kategorien" },
{ "Category","Kategorie" },
{ "Center View","Zentriere Ansicht" },
{ "Change","Ändere" },
{ "Cinema","Kino" },
{ "Click to add a new Todo","Hier klicken, um ein neues Todo anzulegen" },
{ "Clone Item","Klone Eintrag" },
{ "&Close","S&chließen" },
{ "Close","Schließen" },
{ "Close this dialog to abort deletion!","Zum Abbrechen des Löschvorganges Dialog schließen!" },
{ "Colors","Farben" },
{ "completed","erledigt" },
{ "completed on %1","erledigt am %1" },
{ "Complete","Erledigt" },
{ "Confidential","Vertraulich" },
{ "Configure...","Einstellungen..." },
{ "Confirm &deletes","Löschvogang bestätigen" },
{ "Couldn't load calendar\n '%1'.","Kann Kalender\n '%1' nicht laden." },
{ "Counter-event Viewer","Terminzähler Ansicht" },
{ "Daily ending hour:","Feierabend:" },
{ "Daily starting hour:","Anfangszeit:" },
{ "Daily","Täglich" },
{ "Date Format","Datums Format" },
{ "Date Format:","Datums Format:" },
{ "DateNavigator:(nr)","Datums Navigator" },
{ "Dates: ","Datum: " },
{ "Date && Time","Datum && Zeit" },
{ "Day begins at:","Der Tag beginnt um:" },
{ "Days in Next-X-Days:","Tage in Nächste-X-Tage:" },
{ "Days in What's Next:","Tage in What's Next:" },
{ "day(s)","Tag(e)" },
{ "Days to show in Next-X-Days view:","Welche Tage in Nächste-X-Tagen anzeigen:" },
{ "day","Tag" },
{ "Dec","Dez" },
{ "December","Dezember" },
{ "Default alarm time:","Standard Alarmzeit:" },
{ "Default appointment time:","Standard Termin Startzeit:" },
{ "Default event color:","Standard Terminfarbe:" },
{ "Default","Standard" },
{ "Def. duration of new app.:","Standard Termin Länge:" },
{ "Delete all completed To-Dos?","Alle bereits erledigten Todos löschen?" },
{ "Delete All","Lösche alles" },
{ "Delete all selected","Lösche alle Selektierten" },
{ "Delete Current","Aktuellen löschen" },
{ "Delete Event...","Lösche Termin..." },
{ "Delete Event","Lösche Termin" },
{ "&Delete","Löschen" },
{ "Delete...","Löschen..." },
{ "Delete","Löschen" },
{ "Delete Todo...","Lösche Todo..." },
{ "Delete To-Do","Lösche Todo" },
{ "Deleting item %d ...","Lösche Eintrag %d..." },
{ "Descriptions","Beschreibungen" },
{ "Deselect all","Deselektiere Alle" },
{ "Details","Details" },
{ "Dinner","Abendessen" },
{ "Do you really want\nto close KO/Pi?","Möchten Sie wirklich\nKO/PI verlassen?" },
{ "Due Date","Fällig am" },
{ "Due: ","Fällig: "},
{ "Due Time","Fällig um" },
{ "Due:","Fällig:"},
{ "Duration: ","Dauer: " },
{ "Edit...","Bearbeite..." },
{ "Edit","Bearbeite" },
{ "Edit Event...","Bearbeite Termin..." },
{ "Edit Event","Bearbeite Termin" },
{ "Edit exceptions","Bearbeite Ausnahmen" },
{ "EditorBox:","Editor Fenster:" },
{ "Edit Recurrence Range","Bearbeite Wiederholung" },
{ "Edit Todo...","Berabeite Todo..." },
{ "Edit To-Do","Todo bearbeiten" },
{ "E&mail address:","E&mail Adresse:" },
{ "(EmptyEmail)","(KeineEmail)" },
{ "(EmptyName)","(KeinName)" },
-{ "Enable Recurrence","Wiederholender Termin" },
+{ "Enable Recurrence","Wiederholung anschalten" },
{ "End after","Endet nach"},
{ "End by:","Endet am"},
{ "End Date","End Datum" },
{ "End:","Ende:" },
{ "End Time","End Zeit" },
{ "English","Englisch" },
{ "Event","Termin" },
{ "Event list","Termin Liste" },
{ "Events","Termine" },
{ "Event Viewer:","Termin Übersicht:" },
{ "every","jede" },
{ "Exceptions...","Ausnahmen..." },
{ "Exceptions","Ausnahmen" },
{ "Exclude holidays","Ohne freie Tage" },
{ "Exclude Saturdays","Ohne Samstage" },
{ "Feb","Feb" },
{ "February","Februar" },
{ "&Find","Suche!" },
{ "Fonts","Schriftart" },
{ "Force take local entry always","Erzwinge:Nimm immer lokalen Eintrag" },
{ "Force take remote entry always","Erzwinge:Nimm immer fernen Eintrag"},
{ "Free","Frei" },
{ "Friday","Freitag" },
{ "Fri","Fr" },
{ "From:","Vom:" },
{ "Full &name:","Vor- und &Nachname:" },
{ "General","Allgemein" },
{ "German","Deutsch" },
{ "Gifts","Geschenke" },
{ "Go to Today","Heute anzeigen" },
{ "Help","Hilfe" },
{ "Hide Dates","Daten ausblenden" },
{ "Highlight color:","Markierungen:" },
{ "Holiday color:","Freie Tage:" },
{ "hour(s)","Stunde(n)" },
{ "In %1 days: ","In %1 Tagen: " },
{ "Incomplete Todo:","Unerledigte Aufgaben:" },
{ "Information","Information" },
{ "Invalid search expression,\ncannot perform ","Kann Suche nicht ausführen" },
{ "Jan","Jan" },
{ "January","Januar" },
{ "JournalView:","Journal Ansicht:" },
{ "Journals","Journale" },
{ "Jul","Jul" },
{ "July","Juli" },
{ "Jump to date","Springe zum Datum" },
{ "June","Juni" },
{ "Jun","Jun" },
{ "Key Bindings...","Tastenzuordnung..." },
{ "Kids","Kinder" },
{ "Known Problems...","Bekannte Probleme..." },
{ "KO/Pi Find ","KO/Pi Suchdialog " },
{ "KO/Pi Find: ","KO/Pi Suchen: " },
{ "KO/Pi is starting ... "," KO/Pi startet ... \n... Zeit für eine Kaffeepause ..." },
{ "Language:(needs restart)","Sprache (Neustart!)" },
{ "Language:","Sprache" },
{ "Large","Etwas mehr" },
{ "List View:","Listenansicht:" },
{ "List View","Listenansicht" },
{ "Load/Save","Laden/Speichern" },
{ "Load Template","Lade Vorlage" },
{ "Locale","Localisation" },
{ "Local temp file:","Lokale temp. Datei:" },
{ "Location: ","Ort: " },
{ "Location:","Ort:" },
{ "Mail client","Mail Programm" },
{ "Mail Client","Mail Programm" },
{ "March","März" },
{ "Mar","Mär" },
{ "May","Mai" },
{ "M. Bains line:","M. Bains Linie:" },
{ "Medium","Medium" },
{ "Method","Methode" },
{ "minute(s)","Minute(n)" },
{ "Monday","Montag" },
{ "Mon","Mo" },
{ "Monthly","Monatlich" },
{ "Month not long enough","Monat ist nicht lang genug" },
{ "month(s)","Monat(e)" },
{ "Month view:","Monatsansicht:" },
{ "Month view uses category colors","Monatsansicht zeigt Kategorie Farben" },
{ "Todo view uses category colors","To-Do Ansicht zeigt Kategorie Farben" },
{ "Move &Down","Nach unten verschieben" },
{ "Move &Up","Nach oben verschieben" },
{ "Name:","Name:" },
{ "Name","Name" },
{ "\nAre you sure you want\nto delete this event?","\nSind Sie sicher, dass Sie\nden Termin löschen möchten?" },
{ "%n Days","%n Tage" },
{ "Never","Nie" },
{ "New event...","Neuer Termin..." },
{ "New event","Neuer Termin" },
{ "New Event...","Neuer Termin..." },
{ "New Events/Todos should","Neue Termine/Todos sollten" },
{ "&New","&Neu" },
{ "New","Neu", },
{ "New Sub-Todo...","Neues Sub-Todo..." },
@@ -1239,102 +1239,102 @@
{ "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " },
{ "Password for remote access:","Passwort für fernen Zugriff:" },
{ "Remote IP address:","Ferne IP Adresse:" },
{ "Remote port number:","Ferne Port Nummer:" },
{ "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." },
{ "Remote from: ","Fern von: " },
{ "Local from: ","Lokal von: " },
{ "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n","Synchronisationsübersicht:\n\n %d lokal hinzugefügt\n %d fern hinzugefügt\n %d lokal geändert\n %d fern geändert\n %d lokal gelöscht\n %d fern gelöscht\n %d eingehende ausgefiltert\n %d ausgehende ausgefiltert\n" },
{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" },
{ "Write back","Schreibe zurück" },
{ "KO/Pi Synchronization","KO/Pi Synchronisation" },
{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" },
{ "Received sync request","Sync Anfrage erhalten" },
{ "Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog.","Ferne Synchronisation ...\n\nBenutze diese Anwendung nicht!\n\nWenn das Syncen fehlschlägt kann\ndieser Dialog geschlossen werden." },
{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." },
{ "Data saved to temp file!","Daten in temp Datei gespeichert!" },
{ "Sending file...","Sende Datei..." },
{ "Waiting for synced file...","Warte auf gesyncte Daten..." },
{ "Receiving synced file...","Gesyncte Daten erhalten..." },
{ "Received %1 bytes","%1 Bytes erhalten" },
{ "Writing file to disk...","Speichere Datei..." },
{ "Pi-Sync successful!","Pi-Sync erfolgreich!" },
{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" },
{ "Synchronize!","Synchronisiere!" },
{ "High clock skew!","Großer Uhrzeitunterschied!" },
{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" },
{ "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" },
{ "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." },
{ "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" },
{ "List week view","Listenwochenansicht" },
{ "List week","Listenwochenansicht" },
{ "Next Week","Nächste Woche" },
{ "Previous Week","Vorherige Woche" },
{ "No items were found matching\nyour search expression.\nUse the wildcard characters\n'*' and '?' where needed.","Keine Einträge gefunden die\ndem Suchausdruck entsprechen.\nBenutze Platzhalter Zeichen\n'*' und '?' wo benötigt." },
{ "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" },
{ "Details","Details" },
{ "Created time","Erstellt Zeit" },
{ "Last modified time","Geändert Zeit" },
{ "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" },
{ "View Options","Anzeige Optionen" },
{ "<b>Created: ","<b>Erstellt am: " },
{ "<b>Last modified: ","<b>Zuletzt geändert am: " },
{ "Journal: ","Journal: " },
{ "yearly","jährlich" },
{ "(%1) ","%1-" },
{ "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" },
{ "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" },
{ "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" },
{ "Summary/Loc.","Titel/Ort" },
{ "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." },
{ "Week Number","Wochennummer" },
{ "Import","Importiere" },
{ "Export","Exportiere" },
{ "Beam","Beame" },
{ "Export selected","Exportiere Selektierte" },
{ "As iCal (ics) file...","Als iCal (ics) Datei..." },
{ "As vCal (vcs) file...","Als vCal (vcs) Datei..." },
{ "Journal/Details...","Journale/Details..." },
{ "Agenda View","Agenda Ansicht" },
{ "Show current time","Zeige aktuelle Zeit" },
{ "Edit new item","Bearbeite neuen Eintrag" },
{ "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" },
{ "There is no next alarm.","Es gibt keinen nächsten Alarm." },
{ "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" },
{ "The next alarm is in:\n","Der nächste Alarm ist in:\n" },
{ "%1 days\n","%1 Tagen\n" },
{ "1 day\n","1 Tag\n" },
{ "%1 hours\n","%1 Stunden\n" },
{ "1 hour\n","1 Stunde\n" },
{ "%1 minutes\n","%1 Minuten\n" },
{ "1 minute\n","1 Minute\n" },
{ "Only one toolbar","Nur eine Toolbar" },
{ "Print","Drucke" },
{ "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." },
{ "There is nothing selected!","Es ist nichts ausgewählt!" },
{ "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " },
{ "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" },
{ "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" },
{ "KO/Pi Printout","KO/Pi Ausdruck" },
{ "Print unscaled","Drucke unskaliert" },
{ "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." },
{ "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." },
{ "Printout Mode","Druck Modus" },
{ "Filter menu icon","Filtermenu Icon" },
{ "<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" },
{ "<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" },
{ "%1d","%1t" },
{ "%1h","%1std" },
{ "%1min","%1min" },
{ "( %1 before )","( %1 vorher )" },
{ "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" },
{ "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" },
{ "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." },
{ "Show Sync Events in WN+Agenda","Zeige Sync-Ereignisse in WN+Agenda" },
{ "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" },
{ "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" },
-{ "","" },
-{ "","" },
-{ "","" },
+{ " on "," am " },
+{ "On: ","Am: " },
+{ "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" },
{ "","" },
{ "","" },
{ "","" },
diff --git a/korganizer/koeditorgeneralevent.cpp b/korganizer/koeditorgeneralevent.cpp
index 2a49528..d4aa78c 100644
--- a/korganizer/koeditorgeneralevent.cpp
+++ b/korganizer/koeditorgeneralevent.cpp
@@ -283,145 +283,152 @@ void KOEditorGeneralEvent::readEvent( Event *event, bool tmpl )
mSummaryEdit->load(KOLocationBox::SUMMARYEVENT);
mLocationEdit->load(KOLocationBox::LOCATION);
readIncidence(event);
}
void KOEditorGeneralEvent::writeEvent(Event *event)
{
// kdDebug() << "KOEditorGeneralEvent::writeEvent()" << endl;
writeIncidence(event);
QDate tmpDate;
QTime tmpTime;
QDateTime tmpDT;
// temp. until something better happens.
QString tmpStr;
if (mNoTimeButton->isChecked()) {
event->setFloats(true);
// need to change this.
tmpDate = mStartDateEdit->date();
tmpTime.setHMS(0,0,0);
tmpDT.setDate(tmpDate);
tmpDT.setTime(tmpTime);
event->setDtStart(tmpDT);
tmpDate = mEndDateEdit->date();
tmpTime.setHMS(0,0,0);
tmpDT.setDate(tmpDate);
tmpDT.setTime(tmpTime);
event->setDtEnd(tmpDT);
} else {
event->setFloats(false);
// set date/time end
tmpDate = mEndDateEdit->date();
tmpTime = mEndTimeEdit->getTime();
tmpDT.setDate(tmpDate);
tmpDT.setTime(tmpTime);
event->setDtEnd(tmpDT);
// set date/time start
tmpDate = mStartDateEdit->date();
tmpTime = mStartTimeEdit->getTime();
tmpDT.setDate(tmpDate);
tmpDT.setTime(tmpTime);
event->setDtStart(tmpDT);
} // check for float
mSummaryEdit->save(KOLocationBox::SUMMARYEVENT);
event->setTransparency(mFreeTimeCombo->currentItem() > 0
? KCal::Event::Transparent
: KCal::Event::Opaque);
// kdDebug() << "KOEditorGeneralEvent::writeEvent() done" << endl;
}
void KOEditorGeneralEvent::setDuration()
{
QString tmpStr = "", catStr;
int hourdiff, minutediff;
// end<date is an accepted temporary state while typing, but don't show
// any duration if this happens
if(mCurrEndDateTime >= mCurrStartDateTime) {
if (mNoTimeButton->isChecked()) {
int daydiff = mCurrStartDateTime.date().daysTo(mCurrEndDateTime.date()) + 1;
tmpStr = i18n("Duration: ");
tmpStr.append(i18n("1 Day","%n Days",daydiff));
} else {
int secto = mCurrStartDateTime.secsTo( mCurrEndDateTime );
hourdiff = secto / 3600;
minutediff = (secto/60 ) % 60;
if (hourdiff || minutediff){
tmpStr = i18n("Duration: ");
if (hourdiff){
catStr = i18n("1 h","%n h",hourdiff);
tmpStr.append(catStr);
}
if (hourdiff && minutediff){
tmpStr += i18n(", ");
}
if (minutediff){
catStr = i18n("1 min","%n min",minutediff);
tmpStr += catStr;
}
} else tmpStr = "";
}
}
mDurationLabel->setText(tmpStr);
}
void KOEditorGeneralEvent::emitDateTimeStr()
{
KLocale *l = KGlobal::locale();
+ QString startString = "";
+ if ( mCurrStartDateTime.date() < mCurrEndDateTime.date() ) {
+ if ( mNoTimeButton->isChecked() ) {
+ startString = i18n("From: ") + l->formatDate(mCurrStartDateTime.date() );
+ startString += "\n"+i18n("To: ")+ l->formatDate(mCurrEndDateTime.date());
- QString from,to;
+ } else {
+ startString = i18n("From: ") +l->formatDateTime(mCurrStartDateTime, false);
+ startString += "\n"+i18n("To: ")+l->formatDateTime(mCurrEndDateTime, false);
+ }
+ } else {
if (mNoTimeButton->isChecked()) {
- from = l->formatDate(mCurrStartDateTime.date());
- to = l->formatDate(mCurrEndDateTime.date());
+ startString = i18n("On: ") + l->formatDate(mCurrStartDateTime.date() );
} else {
- from = l->formatDateTime(mCurrStartDateTime);
- to = l->formatDateTime(mCurrEndDateTime);
+ startString = i18n("From: ") + KGlobal::locale()->formatTime(mCurrStartDateTime.time())+
+ "-"+KGlobal::locale()->formatTime(mCurrEndDateTime.time());
+ startString += i18n(" on ")+KGlobal::locale()->formatDate( mCurrStartDateTime.date(), true);
}
-
- QString str = i18n("From: %1 To: %2 %3").arg(from).arg(to)
- .arg(mDurationLabel->text());
-
- emit dateTimeStrChanged(str);
+ }
+ startString +="\n"+mDurationLabel->text();
+ emit dateTimeStrChanged(startString);
}
bool KOEditorGeneralEvent::validateInput()
{
if (!mStartDateEdit->inputIsValid()) {
KMessageBox::sorry( 0,
i18n("Please specify a valid start date,\nfor example '%1'.")
.arg( KGlobal::locale()->formatDate( QDate::currentDate(), true ) ) );
return false;
}
if (!mEndDateEdit->inputIsValid()) {
KMessageBox::sorry( 0,
i18n("Please specify a valid end date,\nfor example '%1'.")
.arg( KGlobal::locale()->formatDate( QDate::currentDate(), true ) ) );
return false;
}
QDateTime startDt,endDt;
startDt.setDate(mStartDateEdit->date());
endDt.setDate(mEndDateEdit->date());
if (!mNoTimeButton->isChecked()) {
startDt.setTime(mStartTimeEdit->getTime());
endDt.setTime(mEndTimeEdit->getTime());
}
if (startDt > endDt) {
KMessageBox::sorry(0,i18n("The event ends before it starts.\n"
"Please correct dates and times."));
return false;
}
return KOEditorGeneral::validateInput();
}
diff --git a/korganizer/koeditorrecurrence.cpp b/korganizer/koeditorrecurrence.cpp
index bf81b01..01c5773 100644
--- a/korganizer/koeditorrecurrence.cpp
+++ b/korganizer/koeditorrecurrence.cpp
@@ -636,209 +636,209 @@ void RecurrenceRangeDialog::setDuration( int duration )
int RecurrenceRangeDialog::duration()
{
return mRecurrenceRangeWidget->duration();
}
void RecurrenceRangeDialog::setEndDate( const QDate &date )
{
mRecurrenceRangeWidget->setEndDate( date );
}
QDate RecurrenceRangeDialog::endDate()
{
return mRecurrenceRangeWidget->endDate();
}
void RecurrenceRangeDialog::setDateTimes( const QDateTime &start,
const QDateTime &end )
{
mRecurrenceRangeWidget->setDateTimes( start, end );
}
//////////////////////////// RecurrenceChooser ////////////////////////
RecurrenceChooser::RecurrenceChooser( QWidget *parent, const char *name ) :
QWidget( parent, name )
{
QBoxLayout *topLayout = new QVBoxLayout( this );
mTypeCombo = new QComboBox( this );
mTypeCombo->insertItem( i18n("Daily") );
mTypeCombo->insertItem( i18n("Weekly") );
mTypeCombo->insertItem( i18n("Monthly") );
mTypeCombo->insertItem( i18n("Yearly") );
topLayout->addWidget( mTypeCombo );
connect( mTypeCombo, SIGNAL( activated( int ) ), SLOT( emitChoice() ) );
}
int RecurrenceChooser::type()
{
if ( mTypeCombo ) {
return mTypeCombo->currentItem();
} else {
if ( mDailyButton->isChecked() ) return Daily;
else if ( mWeeklyButton->isChecked() ) return Weekly;
else if ( mMonthlyButton->isChecked() ) return Monthly;
else return Yearly;
}
}
void RecurrenceChooser::setType( int type )
{
if ( mTypeCombo ) {
mTypeCombo->setCurrentItem( type );
} else {
switch ( type ) {
case Daily:
mDailyButton->setChecked( true );
break;
case Weekly:
mWeeklyButton->setChecked( true );
break;
case Monthly:
mMonthlyButton->setChecked( true );
break;
case Yearly:
default:
mYearlyButton->setChecked( true );
break;
}
}
}
void RecurrenceChooser::emitChoice()
{
emit chosen ( type() );
}
/////////////////////////////// Main Widget /////////////////////////////
KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) :
QWidget( parent, name )
{
QGridLayout *topLayout = new QGridLayout( this, 2,2 );
topLayout->setSpacing( KDialog::spacingHint() );
topLayout->setMargin( KDialog::marginHintSmall() );
mEnabledCheck = new QCheckBox( i18n("Enable Recurrence"), this );
connect( mEnabledCheck, SIGNAL( toggled( bool ) ),
SLOT( setEnabled( bool ) ) );
topLayout->addMultiCellWidget( mEnabledCheck, 0, 0, 0, 1 );
- mTimeGroupBox = new QGroupBox( 1, Horizontal, i18n("Appointment Time "),
+ mTimeGroupBox = new QGroupBox( 1, Horizontal, i18n("Time"),
this );
topLayout->addMultiCellWidget( mTimeGroupBox, 1, 1 , 0 , 1 );
if ( QApplication::desktop()->width() <= 320) {
mTimeGroupBox->hide();
}
// QFrame *timeFrame = new QFrame( mTimeGroupBox );
// QBoxLayout *layoutTimeFrame = new QHBoxLayout( timeFrame );
// layoutTimeFrame->setSpacing( KDialog::spacingHint() );
mDateTimeLabel = new QLabel( mTimeGroupBox );
// mDateTimeLabel = new QLabel( timeFrame );
// layoutTimeFrame->addWidget( mDateTimeLabel );
-
-
+ //mTimeGroupBox->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Maximum ) );
+ //mDateTimeLabel->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Maximum) );
mRuleBox = new QGroupBox( 1, Horizontal, i18n("Recurrence Rule"), this );
topLayout->addMultiCellWidget( mRuleBox, 2, 2, 0, 1 );
mRecurrenceChooser = new RecurrenceChooser( mRuleBox );
connect( mRecurrenceChooser, SIGNAL( chosen( int ) ),
SLOT( showCurrentRule( int ) ) );
mRuleStack = new QWidgetStack( mRuleBox );
mDaily = new RecurDaily( mRuleStack );
mRuleStack->addWidget( mDaily, 0 );
mWeekly = new RecurWeekly( mRuleStack );
mRuleStack->addWidget( mWeekly, 0 );
mMonthly = new RecurMonthly( mRuleStack );
mRuleStack->addWidget( mMonthly, 0 );
mYearly = new RecurYearly( mRuleStack );
mRuleStack->addWidget( mYearly, 0 );
showCurrentRule( mRecurrenceChooser->type() );
mRecurrenceRangeWidget = 0;
mRecurrenceRangeDialog = new RecurrenceRangeDialog( this );
mRecurrenceRange = mRecurrenceRangeDialog;
mRecurrenceRangeButton = new QPushButton( i18n("Recurrence Range..."),
this );
connect( mRecurrenceRangeButton, SIGNAL( clicked() ),
SLOT( showRecurrenceRangeDialog() ) );
mExceptionsWidget = 0;
mExceptionsDialog = new ExceptionsDialog( this );
mExceptions = mExceptionsDialog;
mExceptionsButton = new QPushButton( i18n("Exceptions..."), this );
if ( QApplication::desktop()->width() < 320 ) {
topLayout->addMultiCellWidget( mRecurrenceRangeButton, 3, 3, 0, 1 );
topLayout->addMultiCellWidget( mExceptionsButton, 4, 4, 0, 1 );
} else {
topLayout->addWidget( mRecurrenceRangeButton, 3, 0 );
topLayout->addWidget( mExceptionsButton, 3, 1 );
}
connect( mExceptionsButton, SIGNAL( clicked() ),
SLOT( showExceptionsDialog() ) );
}
KOEditorRecurrence::~KOEditorRecurrence()
{
}
void KOEditorRecurrence::setEnabled( bool enabled )
{
// kdDebug() << "KOEditorRecurrence::setEnabled(): " << (enabled ? "on" : "off") << endl;
mTimeGroupBox->setEnabled( enabled );
if ( mRecurrenceRangeWidget ) mRecurrenceRangeWidget->setEnabled( enabled );
if ( mRecurrenceRangeButton ) mRecurrenceRangeButton->setEnabled( enabled );
if ( mExceptionsWidget ) mExceptionsWidget->setEnabled( enabled );
if ( mExceptionsButton ) mExceptionsButton->setEnabled( enabled );
mRuleBox->setEnabled( enabled );
}
void KOEditorRecurrence::showCurrentRule( int current )
{
switch ( current ) {
case Daily:
mRuleStack->raiseWidget( mDaily );
break;
case Weekly:
mRuleStack->raiseWidget( mWeekly );
break;
case Monthly:
mRuleStack->raiseWidget( mMonthly );
break;
default:
case Yearly:
mRuleStack->raiseWidget( mYearly );
break;
}
}
void KOEditorRecurrence::setDateTimes( QDateTime start, QDateTime end )
{
// kdDebug() << "KOEditorRecurrence::setDateTimes" << endl;
mRecurrenceRange->setDateTimes( start, end );
mExceptions->setDefaults( end );
}
void KOEditorRecurrence::setDefaults( QDateTime from, QDateTime to, bool )
{
// qDebug("KOEditorRecurrence::setDefaults %s %s ",from.toString().latin1(),to.toString().latin1() );
setDateTimes( from, to );
diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp
index 51e2524..6a05cc8 100644
--- a/korganizer/kotodoeditor.cpp
+++ b/korganizer/kotodoeditor.cpp
@@ -1,170 +1,171 @@
/*
This file is part of KOrganizer.
Copyright (c) 1997, 1998 Preston Brown
Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#include <qtooltip.h>
#include <qframe.h>
#include <qpixmap.h>
#include <qlayout.h>
#include <qhbox.h>
#include <qdir.h>
#include <qdatetime.h>
#include <qapplication.h>
#include <qtabwidget.h>
#include <kiconloader.h>
#include <klocale.h>
#include <kfiledialog.h>
#include <kstandarddirs.h>
#include <kmessagebox.h>
#include <libkdepim/categoryselectdialog.h>
#include <libkcal/calendarlocal.h>
#include <libkcal/calendarresources.h>
#include <libkcal/resourcecalendar.h>
#include <libkcal/icalformat.h>
#include <kresources/resourceselectdialog.h>
#include <libkdepim/kdateedit.h>
#include "koprefs.h"
#include "kolocationbox.h"
#include "kotodoeditor.h"
extern int globalFlagBlockAgenda;
KOTodoEditor::KOTodoEditor( Calendar *calendar, QWidget *parent ) :
KOIncidenceEditor( i18n("Edit To-Do"), calendar, parent )
{
mTodo = 0;
mRelatedTodo = 0;
findButton(User1)->hide();
init();
}
KOTodoEditor::~KOTodoEditor()
{
emit dialogClose( mTodo );
}
void KOTodoEditor::init()
{
setupGeneral();
setupAttendeesTab();
setupRecurrence();
connect(mGeneral,SIGNAL(datesChecked()),this ,SLOT(checkRecurrence()));
+ mRecurrence->setDateTimeStr( i18n("<i>The recurrence is computed from the start datetime!</i>") );
}
void KOTodoEditor::setupRecurrence()
{
QFrame *topFrame = addPage( i18n("Recurrence") );
QBoxLayout *topLayout = new QVBoxLayout( topFrame );
mRecurrence = new KOEditorRecurrence( topFrame );
topLayout->addWidget( mRecurrence );
}
void KOTodoEditor::setCategories( QString s )
{
mGeneral->setCategories(s);
}
void KOTodoEditor::setSecrecy( int sec )
{
mGeneral->setSecrecy( sec );
}
void KOTodoEditor::reload()
{
if ( mTodo ) readTodo( mTodo );
}
void KOTodoEditor::setupGeneral()
{
mGeneral = new KOEditorGeneralTodo(this);
connect ( mGeneral, SIGNAL ( allAccepted() ), this, SLOT ( slotOk () ) );
// connect(mGeneral,SIGNAL(openCategoryDialog()),mCategoryDialog,SLOT(show()));
//connect(mCategoryDialog, SIGNAL(categoriesSelected(const QString &)),
// mGeneral,SLOT(setCategories(const QString &)));
if (KOPrefs::instance()->mCompactDialogs) {
QFrame *topFrame = addPage(i18n("General"));
QBoxLayout *topLayout = new QVBoxLayout(topFrame);
if ( QApplication::desktop()->width() < 480 ) {
topLayout->setMargin(1);
topLayout->setSpacing(1);
} else {
topLayout->setMargin(marginHint()-1);
topLayout->setSpacing(spacingHint()-1);
}
mGeneral->initHeader(topFrame,topLayout);
mGeneral->initTime(topFrame,topLayout);
mGeneral->initAlarm(topFrame,topLayout);
mGeneral->enableAlarm( false );
QBoxLayout *priorityLayout;
if ( QApplication::desktop()->width() < 500 )
priorityLayout = new QVBoxLayout( topLayout );
else
priorityLayout = new QHBoxLayout( topLayout );
QWidget* prioWidget = new QWidget (topFrame);
priorityLayout->addWidget( prioWidget );
QHBoxLayout* priorityLayout2 = new QHBoxLayout( prioWidget);
QIconSet icon;
if ( QApplication::desktop()->width() < 321 )
icon = SmallIcon("fileimport16");
else
icon = SmallIcon("fileimport");
QPushButton * loadTemplate = new QPushButton( prioWidget);
loadTemplate->setIconSet (icon ) ;
int size = loadTemplate->sizeHint().height();
loadTemplate->setFixedSize( size, size );
if ( QApplication::desktop()->width() < 321 )
icon = SmallIcon("fileexport16");
else
icon = SmallIcon("fileexport");
QPushButton * saveTemplate = new QPushButton( prioWidget);
saveTemplate->setIconSet (icon ) ;
saveTemplate->setFixedSize( size, size );
priorityLayout2->addWidget(loadTemplate);
priorityLayout2->addWidget(saveTemplate);
mGeneral->initPriority(prioWidget,priorityLayout2);
mGeneral->initCategories( topFrame, priorityLayout );
topLayout->addStretch(1);
QFrame *topFrame2 = addPage(i18n("Details"));
QBoxLayout *topLayout2 = new QVBoxLayout(topFrame2);
topLayout2->setMargin(marginHint());
topLayout2->setSpacing(spacingHint());
QHBoxLayout *completionLayout = new QHBoxLayout( topLayout2 );
mGeneral->initCompletion(topFrame2,completionLayout);
mGeneral->initSecrecy( topFrame2, topLayout2 );
mGeneral->initDescription(topFrame2,topLayout2);
// QHBox * hb = new QHBox ( topFrame2 );
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 94f4677..ffc4d9a 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -1494,193 +1494,194 @@ void MainWindow::keyBindings()
i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") +
i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") +
i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+
i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+
i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+
i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+
i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+
i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") +
i18n("<p><b>White</b>: Item readonly</p>\n");
displayText( text, cap);
}
void MainWindow::aboutAutoSaving()
{
QString text = i18n("After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n");
KApplication::showText( i18n("Auto Saving in KOrganizer/Pi"), text);
}
void MainWindow::aboutKnownBugs()
{
QMessageBox* msg;
msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"),
i18n("1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n")+
i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+
i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n") +
i18n("\nor report them in the bugtracker on\n") +
i18n("\nhttp://sourceforge.net/projects/kdepimpi\n"),
QMessageBox::NoIcon,
QMessageBox::Ok,
QMessageBox::NoButton,
QMessageBox::NoButton);
msg->exec();
delete msg;
}
QString MainWindow::defaultFileName()
{
return locateLocal( "data", "korganizer/mycalendar.ics" );
}
QString MainWindow::syncFileName()
{
#ifdef DESKTOP_VERSION
return locateLocal( "tmp", "synccalendar.ics" );
#else
return QString( "/tmp/synccalendar.ics" );
#endif
}
#include "koglobals.h"
#include <kcalendarsystem.h>
void MainWindow::updateWeek(QDate seda)
{
int weekNum = KGlobal::locale()->weekNum ( seda );
mWeekPixmap.fill( mWeekBgColor );
QPainter p ( &mWeekPixmap );
p.setFont( mWeekFont );
p.drawText( 0,0,mWeekPixmap.width(), mWeekPixmap.height(),AlignCenter, QString::number( weekNum) );
p.end();
QIconSet icon3 ( mWeekPixmap );
mWeekAction->setIconSet ( icon3 );
}
void MainWindow::updateWeekNum(const DateList &selectedDates)
{
updateWeek( selectedDates.first() );
}
void MainWindow::processIncidenceSelection( Incidence *incidence )
{
if ( !incidence ) {
enableIncidenceActions( false );
mNewSubTodoAction->setEnabled( false );
setCaptionToDates();
return;
}
//KGlobal::locale()->formatDateTime(nextA, true);
QString startString = "";
if ( incidence->type() != "Todo" ) {
if ( incidence->dtStart().date() < incidence->dtEnd().date() ) {
if ( incidence->doesFloat() ) {
startString += ": "+incidence->dtStartDateStr( true );
startString += " --- "+((Event*)incidence)->dtEndDateStr( true );
} else {
startString = ": "+incidence->dtStartStr(true);
startString += " --- "+((Event*)incidence)->dtEndStr(true);
}
} else {
if ( incidence->dtStart().time() != incidence->dtEnd().time() )
startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+
"-"+KGlobal::locale()->formatTime(incidence->dtEnd().time());
- if ( incidence->categories().contains( i18n("Birthday") ) || incidence->categories().contains( i18n("Anniversary") ) ) {
+
+ if ( incidence->isBirthday() || incidence->isAnniversary() ) {
bool ok;
QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok );
if ( ok ) {
int years = noc.date().year() - incidence->dtStart().date().year();
startString += i18n(" (%1 y.)"). arg( years );
}
}
else
startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true);
}
}
else
startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed");
if ( !incidence->location().isEmpty() )
startString += " (" +incidence->location()+")";
setCaption( incidence->summary()+startString);
enableIncidenceActions( true );
if ( incidence->type() == "Event" ) {
mShowAction->setText( i18n("Show Event...") );
mEditAction->setText( i18n("Edit Event...") );
mDeleteAction->setText( i18n("Delete Event...") );
mNewSubTodoAction->setEnabled( false );
} else if ( incidence->type() == "Todo" ) {
mShowAction->setText( i18n("Show Todo...") );
mEditAction->setText( i18n("Edit Todo...") );
mDeleteAction->setText( i18n("Delete Todo...") );
mNewSubTodoAction->setEnabled( true );
} else {
mShowAction->setText( i18n("Show...") );
mShowAction->setText( i18n("Edit...") );
mShowAction->setText( i18n("Delete...") );
mNewSubTodoAction->setEnabled( false );
}
}
void MainWindow::enableIncidenceActions( bool enabled )
{
mShowAction->setEnabled( enabled );
mEditAction->setEnabled( enabled );
mDeleteAction->setEnabled( enabled );
mCloneAction->setEnabled( enabled );
mMoveAction->setEnabled( enabled );
mBeamAction->setEnabled( enabled );
mCancelAction->setEnabled( enabled );
}
void MainWindow::importOL()
{
#ifdef _OL_IMPORT_
KOImportOLdialog *id = new KOImportOLdialog("Import from OL - select folder!" , mView->calendar(),this );
id->exec();
delete id;
mView->updateView();
#endif
}
void MainWindow::importBday()
{
int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),
i18n("When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n"),
i18n("Import!"), i18n("Cancel"), 0,
0, 1 );
if ( result == 0 ) {
mView->importBday();
}
}
void MainWindow::importQtopia()
{
//#ifndef DESKTOP_VERSION
QString mess = i18n("When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing");
#ifdef DESKTOP_VERSION
mess += i18n("The content of the following files will be\nimported (located in your home directory (hd)):\n(hd)/Applications/datebook/datebook.xml\n(hd)/Applications/todolist/todolist.xml\nThe following category file will be used:\n(hd)/Settings/Categories.xml");
#endif
int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mess,
i18n("Import!"), i18n("Cancel"), 0,
0, 1 );
if ( result == 0 ) {
#ifndef DESKTOP_VERSION
QString datebook = Global::applicationFileName( "datebook", "datebook.xml");
QString todolist = Global::applicationFileName( "todolist", "todolist.xml");
QString categories = QString( getenv( "HOME" ) ) + "/Settings/Categories.xml";
#else
QString datebook = QDir::homeDirPath()+ "/Applications/datebook/datebook.xml";
QString todolist = QDir::homeDirPath()+ "/Applications/todolist/todolist.xml";
QString categories = QDir::homeDirPath()+ "/Settings/Categories.xml";
#endif
mView->importQtopia( categories, datebook, todolist );