summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-01-27 12:14:32 (UTC)
committer zautrix <zautrix>2005-01-27 12:14:32 (UTC)
commitc8b484570a9cf8aacc070f92141c8bcfebbf3a93 (patch) (side-by-side diff)
treeaf81a25ccc142582a60a5ed100dcd44956255b62
parent9ff00e650e32d6f348a2333c9cf21da9c9a137ff (diff)
downloadkdepimpi-c8b484570a9cf8aacc070f92141c8bcfebbf3a93.zip
kdepimpi-c8b484570a9cf8aacc070f92141c8bcfebbf3a93.tar.gz
kdepimpi-c8b484570a9cf8aacc070f92141c8bcfebbf3a93.tar.bz2
birthday fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt3
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt2
-rw-r--r--korganizer/calendarview.cpp11
-rw-r--r--korganizer/kowhatsnextview.cpp13
4 files changed, 24 insertions, 5 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 6c4cb7b..4c00770 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -11,4 +11,7 @@ Changed agenda size menu to items 1-10.
Made it possible to change agenda size quickly by pressing mouse on timelabels in agenda view and move mouse up/down.
Usebility enhancements in the KO/Pi menus.
+Birthday import now adds year to summary.
+What's Next view shows age in years for birthday.
+
OM/Pi:
Added three info lines to display subject, from and to of selected mails.
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index e55d17e..dce95cd 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1194,5 +1194,5 @@
{ "Size %1","Größe %1" },
{ "New Agendasize: %1","Neue Agendagröße: %1" },
-{ "","" },
+{ " (%1 y.)"," (%1 J.)" },
{ "","" },
{ "","" },
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 1d5a57e..257a4dd 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1524,9 +1524,12 @@ bool CalendarView::addAnniversary( QDate date, QString name, KCal::Attendee* a
}
QString kind;
- if ( birthday )
+ if ( birthday ) {
kind = i18n( "Birthday" );
- else
+ ev->setSummary( name + " (" + QString::number(date.year()) +")");
+ }
+ else {
kind = i18n( "Anniversary" );
- ev->setSummary( name + " - " + kind );
+ ev->setSummary( name + " (" + QString::number(date.year()) +") " + kind );
+ }
ev->setOrganizer(a->email());
ev->setCategories( kind );
@@ -2512,4 +2515,5 @@ void CalendarView::showEventEditor()
topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") );
qDebug("KO: CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() );
+ qApp->processEvents();
delete mEventEditor;
mEventEditor = mDialogManager->getEventEditor();
@@ -2527,4 +2531,5 @@ void CalendarView::showTodoEditor()
topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") );
qDebug("KO: CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() );
+ qApp->processEvents();
delete mTodoEditor;
mTodoEditor = mDialogManager->getTodoEditor();
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp
index 7166a01..4111c5d 100644
--- a/korganizer/kowhatsnextview.cpp
+++ b/korganizer/kowhatsnextview.cpp
@@ -601,4 +601,12 @@ bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool a
else
tempText += i18n("-no summary-");
+ if ( ev->categories().contains( i18n("Birthday") ) || ev->categories().contains( i18n("Anniversary") ) ) {
+ noc = ev->getNextOccurence( cdt, &ok );
+ if ( ok ) {
+ int years = noc.date().year() - ev->dtStart().date().year();
+ tempText += i18n(" (%1 y.)"). arg( years );
+ }
+ }
+
tempText += "</a>";
if ( KOPrefs::instance()->mWNViewShowLocation )
@@ -656,5 +664,8 @@ bool KOWhatsNextView::appendTodo(Incidence *ev, QString ind , bool isSub )
mText += "</font>";
mText += "<a href=\"todo:" + ev->uid() + "\">";
- mText += ev->summary();
+ if ( ev->summary().length() > 0 )
+ mText += ev->summary();
+ else
+ mText += i18n("-no summary-");
mText += "</a>";
if ( ((Todo*)ev)->hasDueDate () ) {