author | zautrix <zautrix> | 2005-02-17 21:31:18 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-17 21:31:18 (UTC) |
commit | 8e8d2bd0c31eb272a7f26756252ff4930d0602bc (patch) (unidiff) | |
tree | 8392e9ca561d1444bcd949e9f1aaf78f698cde98 | |
parent | 002e4f8cea2352e4b9a046b98f66be946fbeb5fc (diff) | |
download | kdepimpi-8e8d2bd0c31eb272a7f26756252ff4930d0602bc.zip kdepimpi-8e8d2bd0c31eb272a7f26756252ff4930d0602bc.tar.gz kdepimpi-8e8d2bd0c31eb272a7f26756252ff4930d0602bc.tar.bz2 |
fixes
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 11 | ||||
-rw-r--r-- | korganizer/koagendaitem.cpp | 5 | ||||
-rw-r--r-- | korganizer/koeventviewer.cpp | 31 | ||||
-rw-r--r-- | korganizer/kolistview.cpp | 5 | ||||
-rw-r--r-- | korganizer/komonthview.cpp | 6 | ||||
-rw-r--r-- | korganizer/koprefs.cpp | 8 | ||||
-rw-r--r-- | korganizer/koprefs.h | 8 | ||||
-rw-r--r-- | korganizer/koprefsdialog.cpp | 32 | ||||
-rw-r--r-- | korganizer/kotodoview.cpp | 5 | ||||
-rw-r--r-- | libkcal/kincidenceformatter.cpp | 46 | ||||
-rw-r--r-- | libkcal/kincidenceformatter.h | 3 |
11 files changed, 132 insertions, 28 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index 6b93606..ab6d220 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -1271,13 +1271,22 @@ | |||
1271 | { "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!" }, | 1271 | { "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!" }, |
1272 | { "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, | 1272 | { "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, |
1273 | { "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, | 1273 | { "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, |
1274 | { "List week view","Listenwochenansicht" }, | 1274 | { "List week view","Listenwochenansicht" }, |
1275 | { "List week","Listenwochenansicht" }, | 1275 | { "List week","Listenwochenansicht" }, |
1276 | { "Next Week","Nächste Woche" }, | 1276 | { "Next Week","Nächste Woche" }, |
1277 | { "Previous Week","Vorherige Woche" }, | 1277 | { "Previous Week","Vorherige Woche" }, |
1278 | { "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." }, | 1278 | { "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." }, |
1279 | { "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, | ||
1280 | { "Details","Details" }, | ||
1281 | { "Created time","Erstellt Zeit" }, | ||
1282 | { "Last modified time","Geändert Zeit" }, | ||
1283 | { "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, | ||
1284 | { "View Options","Anzeige Optionen" }, | ||
1285 | { "<b>Created: ","<b>Erstellt am: " }, | ||
1286 | { "<b>Last modified: ","<b>Zuletzt geändert am: " }, | ||
1287 | { "","" }, | ||
1279 | { "","" }, | 1288 | { "","" }, |
1280 | { "","" }, | 1289 | { "","" }, |
1281 | { "","" }, | 1290 | { "","" }, |
1282 | { "","" }, | 1291 | { "","" }, |
1283 | { "","" }, \ No newline at end of file | 1292 | |
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index 6a312b3..cead612 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp | |||
@@ -85,17 +85,20 @@ KOAgendaItem::KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent,bool | |||
85 | setMouseTracking(true); | 85 | setMouseTracking(true); |
86 | //setAcceptDrops(true); | 86 | //setAcceptDrops(true); |
87 | xPaintCoord = -1; | 87 | xPaintCoord = -1; |
88 | yPaintCoord = -1; | 88 | yPaintCoord = -1; |
89 | } | 89 | } |
90 | QString KOAgendaItem::getWhatsThisText() | 90 | QString KOAgendaItem::getWhatsThisText() |
91 | { | 91 | { |
92 | if ( mIncidence ) | 92 | if ( mIncidence ) |
93 | return KIncidenceFormatter::instance()->getFormattedText( mIncidence ); | 93 | return KIncidenceFormatter::instance()->getFormattedText( mIncidence, |
94 | KOPrefs::instance()->mWTshowDetails, | ||
95 | KOPrefs::instance()->mWTshowCreated, | ||
96 | KOPrefs::instance()->mWTshowChanged); | ||
94 | return "KOAgendaItem::getWhatsThisText()::internal error"; | 97 | return "KOAgendaItem::getWhatsThisText()::internal error"; |
95 | } | 98 | } |
96 | void KOAgendaItem::init ( Incidence *incidence, QDate qd ) | 99 | void KOAgendaItem::init ( Incidence *incidence, QDate qd ) |
97 | { | 100 | { |
98 | mIncidence = incidence; | 101 | mIncidence = incidence; |
99 | mDate = qd; | 102 | mDate = qd; |
100 | mFirstMultiItem = 0; | 103 | mFirstMultiItem = 0; |
101 | mNextMultiItem = 0; | 104 | mNextMultiItem = 0; |
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index f6c9624..d87938a 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp | |||
@@ -334,26 +334,39 @@ void KOEventViewer::appendEvent(Event *event, int mode ) | |||
334 | QString s =i18n("( %1 min before )").arg( min ); | 334 | QString s =i18n("( %1 min before )").arg( min ); |
335 | addTag("p",i18n("<b>Alarm on: ") + s +" </b>"); | 335 | addTag("p",i18n("<b>Alarm on: ") + s +" </b>"); |
336 | addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); | 336 | addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); |
337 | //addTag("p",s); | 337 | //addTag("p",s); |
338 | } | 338 | } |
339 | 339 | ||
340 | addTag("b",i18n("Access: ")); | 340 | addTag("b",i18n("Access: ")); |
341 | mText.append(event->secrecyStr()+"<br>"); | 341 | mText.append(event->secrecyStr()+"<br>"); |
342 | if (!event->description().isEmpty()) { | 342 | |
343 | addTag("p",i18n("<b>Details: </b>")); | ||
344 | addTag("p",event->description()); | ||
345 | } | ||
346 | 343 | ||
344 | if ( KOPrefs::instance()->mEVshowDetails ) { | ||
345 | if (!event->description().isEmpty()) { | ||
346 | addTag("p",i18n("<b>Details: </b>")); | ||
347 | addTag("p",event->description()); | ||
348 | } | ||
349 | } | ||
347 | formatCategories(event); | 350 | formatCategories(event); |
348 | 351 | ||
349 | formatReadOnly(event); | 352 | formatReadOnly(event); |
350 | formatAttendees(event); | 353 | formatAttendees(event); |
351 | 354 | ||
355 | if ( KOPrefs::instance()->mEVshowCreated ) { | ||
356 | addTag("p",i18n("<b>Created: ") +" </b>"); | ||
357 | addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); | ||
358 | |||
359 | } | ||
360 | if ( KOPrefs::instance()->mEVshowChanged ) { | ||
361 | addTag("p",i18n("<b>Last modified: ") +" </b>"); | ||
362 | addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); | ||
363 | |||
364 | } | ||
352 | setText(mText); | 365 | setText(mText); |
353 | //QWhatsThis::add(this,mText); | 366 | //QWhatsThis::add(this,mText); |
354 | 367 | ||
355 | } | 368 | } |
356 | 369 | ||
357 | void KOEventViewer::appendTodo(Todo *event, int mode ) | 370 | void KOEventViewer::appendTodo(Todo *event, int mode ) |
358 | { | 371 | { |
359 | mMailSubject = ""; | 372 | mMailSubject = ""; |
@@ -413,19 +426,21 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) | |||
413 | mText.append(i18n("<p><b>Start on:</b> %1</p>").arg(event->dtStartStr(KOPrefs::instance()->mShortDateInViewer))); | 426 | mText.append(i18n("<p><b>Start on:</b> %1</p>").arg(event->dtStartStr(KOPrefs::instance()->mShortDateInViewer))); |
414 | } | 427 | } |
415 | if (event->hasDueDate()) { | 428 | if (event->hasDueDate()) { |
416 | mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(KOPrefs::instance()->mShortDateInViewer))); | 429 | mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(KOPrefs::instance()->mShortDateInViewer))); |
417 | mMailSubject += i18n(" - " )+event->dtDueStr( true ); | 430 | mMailSubject += i18n(" - " )+event->dtDueStr( true ); |
418 | } | 431 | } |
419 | addTag("b",i18n("Access: ")); | 432 | addTag("b",i18n("Access: ")); |
420 | mText.append(event->secrecyStr()+"<br>"); | 433 | mText.append(event->secrecyStr()+"<br>"); |
421 | if (!event->description().isEmpty()) { | 434 | if ( KOPrefs::instance()->mEVshowDetails ) { |
422 | addTag("p",i18n("<b>Details: </b>")); | 435 | if (!event->description().isEmpty()) { |
423 | addTag("p",event->description()); | 436 | addTag("p",i18n("<b>Details: </b>")); |
437 | addTag("p",event->description()); | ||
438 | } | ||
424 | } | 439 | } |
425 | 440 | ||
426 | formatCategories(event); | 441 | formatCategories(event); |
427 | 442 | ||
428 | mText.append(i18n("<p><b>Priority:</b> %2</p>") | 443 | mText.append(i18n("<p><b>Priority:</b> %2</p>") |
429 | .arg(QString::number(event->priority()))); | 444 | .arg(QString::number(event->priority()))); |
430 | 445 | ||
431 | formatReadOnly(event); | 446 | formatReadOnly(event); |
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index d8e940b..1f5afc0 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp | |||
@@ -320,17 +320,20 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, | |||
320 | KOListView::~KOListView() | 320 | KOListView::~KOListView() |
321 | { | 321 | { |
322 | delete mPopupMenu; | 322 | delete mPopupMenu; |
323 | } | 323 | } |
324 | QString KOListView::getWhatsThisText(QPoint p) | 324 | QString KOListView::getWhatsThisText(QPoint p) |
325 | { | 325 | { |
326 | KOListViewItem* item = ( KOListViewItem* ) mListView->itemAt( p ); | 326 | KOListViewItem* item = ( KOListViewItem* ) mListView->itemAt( p ); |
327 | if ( item ) | 327 | if ( item ) |
328 | return KIncidenceFormatter::instance()->getFormattedText( item->data() ); | 328 | return KIncidenceFormatter::instance()->getFormattedText( item->data(), |
329 | KOPrefs::instance()->mWTshowDetails, | ||
330 | KOPrefs::instance()->mWTshowCreated, | ||
331 | KOPrefs::instance()->mWTshowChanged); | ||
329 | return i18n("That is the list view" ); | 332 | return i18n("That is the list view" ); |
330 | 333 | ||
331 | } | 334 | } |
332 | 335 | ||
333 | void KOListView::updateList() | 336 | void KOListView::updateList() |
334 | { | 337 | { |
335 | // qDebug(" KOListView::updateList() "); | 338 | // qDebug(" KOListView::updateList() "); |
336 | 339 | ||
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index f9bc1ca..2fe80af 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp | |||
@@ -89,17 +89,20 @@ KNoScrollListBox::~KNoScrollListBox() | |||
89 | 89 | ||
90 | } | 90 | } |
91 | QString KNoScrollListBox::getWhatsThisText(QPoint p) | 91 | QString KNoScrollListBox::getWhatsThisText(QPoint p) |
92 | { | 92 | { |
93 | QListBoxItem* item = itemAt ( p ); | 93 | QListBoxItem* item = itemAt ( p ); |
94 | if ( ! item ) { | 94 | if ( ! item ) { |
95 | return i18n("Click in the cell\nto add an event!"); | 95 | return i18n("Click in the cell\nto add an event!"); |
96 | } | 96 | } |
97 | return KIncidenceFormatter::instance()->getFormattedText(((MonthViewItem*) item)->incidence()); | 97 | return KIncidenceFormatter::instance()->getFormattedText(((MonthViewItem*) item)->incidence(), |
98 | KOPrefs::instance()->mWTshowDetails, | ||
99 | KOPrefs::instance()->mWTshowCreated, | ||
100 | KOPrefs::instance()->mWTshowChanged); | ||
98 | } | 101 | } |
99 | void KNoScrollListBox::keyPressEvent(QKeyEvent *e) | 102 | void KNoScrollListBox::keyPressEvent(QKeyEvent *e) |
100 | { | 103 | { |
101 | 104 | ||
102 | switch(e->key()) { | 105 | switch(e->key()) { |
103 | case Key_Right: | 106 | case Key_Right: |
104 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) | 107 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) |
105 | { | 108 | { |
@@ -190,17 +193,16 @@ void KNoScrollListBox::mousePressEvent(QMouseEvent *e) | |||
190 | 193 | ||
191 | MonthViewItem::MonthViewItem( Incidence *incidence, QDate qd, const QString & s) | 194 | MonthViewItem::MonthViewItem( Incidence *incidence, QDate qd, const QString & s) |
192 | : QListBoxItem() | 195 | : QListBoxItem() |
193 | { | 196 | { |
194 | setText( s ); | 197 | setText( s ); |
195 | 198 | ||
196 | mIncidence = incidence; | 199 | mIncidence = incidence; |
197 | mDate = qd; | 200 | mDate = qd; |
198 | // QWhatsThis::add(this,KIncidenceFormatter::instance()->getFormattedText( mIncidence )); | ||
199 | mRecur = false; | 201 | mRecur = false; |
200 | mAlarm = false; | 202 | mAlarm = false; |
201 | mReply = false; | 203 | mReply = false; |
202 | mInfo = false; | 204 | mInfo = false; |
203 | } | 205 | } |
204 | 206 | ||
205 | void MonthViewItem::paint(QPainter *p) | 207 | void MonthViewItem::paint(QPainter *p) |
206 | { | 208 | { |
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 5efc247..a91074f 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp | |||
@@ -286,17 +286,23 @@ KOPrefs::KOPrefs() : | |||
286 | 286 | ||
287 | KPrefs::setCurrentGroup( "Editors" ); | 287 | KPrefs::setCurrentGroup( "Editors" ); |
288 | 288 | ||
289 | addItemStringList( "EventTemplates", &mEventTemplates ); | 289 | addItemStringList( "EventTemplates", &mEventTemplates ); |
290 | addItemStringList( "TodoTemplates", &mTodoTemplates ); | 290 | addItemStringList( "TodoTemplates", &mTodoTemplates ); |
291 | 291 | ||
292 | addItemInt("DestinationPolicy",&mDestination,standardDestination); | 292 | addItemInt("DestinationPolicy",&mDestination,standardDestination); |
293 | 293 | ||
294 | 294 | KPrefs::setCurrentGroup( "ViewOptions" ); | |
295 | addItemBool("EVshowDetails",&mEVshowDetails,true); | ||
296 | addItemBool("EVshowCreated",&mEVshowCreated,true); | ||
297 | addItemBool("EVshowChanged",&mEVshowChanged,true); | ||
298 | addItemBool("WTshowDetails",&mWTshowDetails,false); | ||
299 | addItemBool("WTshowCreated",&mWTshowCreated,false); | ||
300 | addItemBool("WTshowChanged",&mWTshowChanged,false); | ||
295 | 301 | ||
296 | } | 302 | } |
297 | 303 | ||
298 | 304 | ||
299 | KOPrefs::~KOPrefs() | 305 | KOPrefs::~KOPrefs() |
300 | { | 306 | { |
301 | if (mInstance == this) | 307 | if (mInstance == this) |
302 | mInstance = insd.setObject(0); | 308 | mInstance = insd.setObject(0); |
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h index e300067..e4e3dd7 100644 --- a/korganizer/koprefs.h +++ b/korganizer/koprefs.h | |||
@@ -264,16 +264,24 @@ class KOPrefs : public KPimPrefs | |||
264 | int mAlarmBeepInterval; | 264 | int mAlarmBeepInterval; |
265 | int mOldLanguage; | 265 | int mOldLanguage; |
266 | int mOldLoadedLanguage; | 266 | int mOldLoadedLanguage; |
267 | 267 | ||
268 | 268 | ||
269 | QString mActiveSyncPort; | 269 | QString mActiveSyncPort; |
270 | QString mActiveSyncIP; | 270 | QString mActiveSyncIP; |
271 | 271 | ||
272 | // settings for eventviewer | ||
273 | bool mEVshowDetails; | ||
274 | bool mEVshowCreated; | ||
275 | bool mEVshowChanged; | ||
276 | bool mWTshowDetails; | ||
277 | bool mWTshowCreated; | ||
278 | bool mWTshowChanged; | ||
279 | |||
272 | private: | 280 | private: |
273 | QDict<QColor> mCategoryColors; | 281 | QDict<QColor> mCategoryColors; |
274 | QColor mDefaultCategoryColor; | 282 | QColor mDefaultCategoryColor; |
275 | 283 | ||
276 | QFont mDefaultTimeBarFont; | 284 | QFont mDefaultTimeBarFont; |
277 | QFont mDefaultViewFont; | 285 | QFont mDefaultViewFont; |
278 | QFont mDefaultMonthViewFont; | 286 | QFont mDefaultMonthViewFont; |
279 | 287 | ||
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index 452d019..443508d 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp | |||
@@ -899,16 +899,48 @@ dummy = | |||
899 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 899 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
900 | 900 | ||
901 | dummy = | 901 | dummy = |
902 | addWidBool(i18n("Allday Agenda view shows todos"), | 902 | addWidBool(i18n("Allday Agenda view shows todos"), |
903 | &(KOPrefs::instance()->mShowTodoInAgenda),topFrame); | 903 | &(KOPrefs::instance()->mShowTodoInAgenda),topFrame); |
904 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 904 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
905 | 905 | ||
906 | 906 | ||
907 | topFrame = addPage(i18n("View Options"),0,0); | ||
908 | |||
909 | topLayout = new QGridLayout(topFrame,4,1); | ||
910 | topLayout->setSpacing(spacingHint()); | ||
911 | topLayout->setMargin(marginHint()); | ||
912 | ii = 0; | ||
913 | lab = new QLabel( i18n("Show in todo/event viewer:"), topFrame); | ||
914 | topLayout->addWidget(lab ,ii++,0); | ||
915 | |||
916 | dummy = addWidBool(i18n("Details"), | ||
917 | &(KOPrefs::instance()->mEVshowDetails),topFrame); | ||
918 | topLayout->addWidget(dummy->checkBox(),ii++,0); | ||
919 | dummy = addWidBool(i18n("Created time"), | ||
920 | &(KOPrefs::instance()->mEVshowCreated),topFrame); | ||
921 | topLayout->addWidget(dummy->checkBox(),ii++,0); | ||
922 | dummy = addWidBool(i18n("Last modified time"), | ||
923 | &(KOPrefs::instance()->mEVshowChanged),topFrame); | ||
924 | topLayout->addWidget(dummy->checkBox(),ii++,0); | ||
925 | |||
926 | |||
927 | lab = new QLabel( i18n("Show in What'sThis quick overview:"), topFrame); | ||
928 | topLayout->addWidget(lab ,ii++,0); | ||
929 | |||
930 | dummy = addWidBool(i18n("Details"), | ||
931 | &(KOPrefs::instance()->mWTshowDetails),topFrame); | ||
932 | topLayout->addWidget(dummy->checkBox(),ii++,0); | ||
933 | dummy = addWidBool(i18n("Created time"), | ||
934 | &(KOPrefs::instance()->mWTshowCreated),topFrame); | ||
935 | topLayout->addWidget(dummy->checkBox(),ii++,0); | ||
936 | dummy = addWidBool(i18n("Last modified time"), | ||
937 | &(KOPrefs::instance()->mWTshowChanged),topFrame); | ||
938 | topLayout->addWidget(dummy->checkBox(),ii++,0); | ||
907 | 939 | ||
908 | 940 | ||
909 | topFrame = addPage(i18n("Alarm"),0,0); | 941 | topFrame = addPage(i18n("Alarm"),0,0); |
910 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 942 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
911 | 943 | ||
912 | topLayout = new QGridLayout(topFrame,2,1); | 944 | topLayout = new QGridLayout(topFrame,2,1); |
913 | topLayout->setSpacing(spacingHint()); | 945 | topLayout->setSpacing(spacingHint()); |
914 | topLayout->setMargin(marginHint()); | 946 | topLayout->setMargin(marginHint()); |
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 3011458..3483e95 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp | |||
@@ -551,17 +551,20 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | |||
551 | KOTodoView::~KOTodoView() | 551 | KOTodoView::~KOTodoView() |
552 | { | 552 | { |
553 | delete mDocPrefs; | 553 | delete mDocPrefs; |
554 | } | 554 | } |
555 | QString KOTodoView::getWhatsThisText(QPoint p) | 555 | QString KOTodoView::getWhatsThisText(QPoint p) |
556 | { | 556 | { |
557 | KOTodoViewItem* item = ( KOTodoViewItem* ) mTodoListView->itemAt( p ); | 557 | KOTodoViewItem* item = ( KOTodoViewItem* ) mTodoListView->itemAt( p ); |
558 | if ( item ) | 558 | if ( item ) |
559 | return KIncidenceFormatter::instance()->getFormattedText( item->todo() ); | 559 | return KIncidenceFormatter::instance()->getFormattedText( item->todo(), |
560 | KOPrefs::instance()->mWTshowDetails, | ||
561 | KOPrefs::instance()->mWTshowCreated, | ||
562 | KOPrefs::instance()->mWTshowChanged); | ||
560 | return i18n("That is the todo view" ); | 563 | return i18n("That is the todo view" ); |
561 | 564 | ||
562 | } | 565 | } |
563 | 566 | ||
564 | void KOTodoView::jumpToDate () | 567 | void KOTodoView::jumpToDate () |
565 | { | 568 | { |
566 | // if (mActiveItem) { | 569 | // if (mActiveItem) { |
567 | // mActiveItem->todo()); | 570 | // mActiveItem->todo()); |
diff --git a/libkcal/kincidenceformatter.cpp b/libkcal/kincidenceformatter.cpp index cc3088a..1751ae3 100644 --- a/libkcal/kincidenceformatter.cpp +++ b/libkcal/kincidenceformatter.cpp | |||
@@ -5,23 +5,26 @@ | |||
5 | #ifdef DEKTOP_VERSION | 5 | #ifdef DEKTOP_VERSION |
6 | #include <kabc/stdaddressbook.h> | 6 | #include <kabc/stdaddressbook.h> |
7 | #define size count | 7 | #define size count |
8 | #endif | 8 | #endif |
9 | 9 | ||
10 | KIncidenceFormatter* KIncidenceFormatter::mInstance = 0; | 10 | KIncidenceFormatter* KIncidenceFormatter::mInstance = 0; |
11 | static KStaticDeleter<KIncidenceFormatter> insd; | 11 | static KStaticDeleter<KIncidenceFormatter> insd; |
12 | 12 | ||
13 | QString KIncidenceFormatter::getFormattedText( Incidence * inc ) | 13 | QString KIncidenceFormatter::getFormattedText( Incidence * inc, bool details, bool created , bool modified ) |
14 | { | 14 | { |
15 | // #ifndef QT_NO_INPUTDIALOG | 15 | // #ifndef QT_NO_INPUTDIALOG |
16 | // return QInputDialog::getItem( caption, label, items, current, editable ); | 16 | // return QInputDialog::getItem( caption, label, items, current, editable ); |
17 | // #else | 17 | // #else |
18 | // return QString::null; | 18 | // return QString::null; |
19 | // #endif | 19 | // #endif |
20 | mDetails = details; | ||
21 | mCreated = created ; | ||
22 | mModified = modified; | ||
20 | mText = ""; | 23 | mText = ""; |
21 | if ( inc->type() == "Event" ) | 24 | if ( inc->type() == "Event" ) |
22 | setEvent((Event *) inc ); | 25 | setEvent((Event *) inc ); |
23 | else if ( inc->type() == "Todo" ) | 26 | else if ( inc->type() == "Todo" ) |
24 | setTodo((Todo *) inc ); | 27 | setTodo((Todo *) inc ); |
25 | return mText; | 28 | return mText; |
26 | } | 29 | } |
27 | 30 | ||
@@ -133,25 +136,36 @@ void KIncidenceFormatter::setEvent(Event *event) | |||
133 | addTag("p",i18n("<b>Alarm on: </b>") + s + ": "+KGlobal::locale()->formatDateTime( t, shortDate )); | 136 | addTag("p",i18n("<b>Alarm on: </b>") + s + ": "+KGlobal::locale()->formatDateTime( t, shortDate )); |
134 | //addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); | 137 | //addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); |
135 | //addTag("p",s); | 138 | //addTag("p",s); |
136 | } | 139 | } |
137 | 140 | ||
138 | addTag("p",i18n("<b>Access: </b>") +event->secrecyStr() ); | 141 | addTag("p",i18n("<b>Access: </b>") +event->secrecyStr() ); |
139 | // mText.append(event->secrecyStr()+"<br>"); | 142 | // mText.append(event->secrecyStr()+"<br>"); |
140 | formatCategories(event); | 143 | formatCategories(event); |
141 | if (!event->description().isEmpty()) { | 144 | if ( mDetails ) { |
142 | addTag("p",i18n("<b>Details: </b>")); | 145 | if (!event->description().isEmpty()) { |
143 | addTag("p",event->description()); | 146 | addTag("p",i18n("<b>Details: </b>")); |
147 | addTag("p",event->description()); | ||
148 | } | ||
144 | } | 149 | } |
145 | 150 | ||
146 | |||
147 | formatReadOnly(event); | 151 | formatReadOnly(event); |
148 | formatAttendees(event); | 152 | formatAttendees(event); |
149 | 153 | ||
154 | if ( mCreated ) { | ||
155 | addTag("p",i18n("<b>Created: ") +" </b>"); | ||
156 | addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); | ||
157 | |||
158 | } | ||
159 | if ( mModified ) { | ||
160 | addTag("p",i18n("<b>Last modified: ") +" </b>"); | ||
161 | addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); | ||
162 | |||
163 | } | ||
150 | 164 | ||
151 | } | 165 | } |
152 | 166 | ||
153 | void KIncidenceFormatter::setTodo(Todo *event ) | 167 | void KIncidenceFormatter::setTodo(Todo *event ) |
154 | { | 168 | { |
155 | int mode = 0; | 169 | int mode = 0; |
156 | mCurrentIncidence = event; | 170 | mCurrentIncidence = event; |
157 | bool shortDate = true; | 171 | bool shortDate = true; |
@@ -207,26 +221,34 @@ void KIncidenceFormatter::setTodo(Todo *event ) | |||
207 | if (event->hasDueDate()) { | 221 | if (event->hasDueDate()) { |
208 | mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(shortDate))); | 222 | mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(shortDate))); |
209 | } | 223 | } |
210 | mText.append(i18n("<p><b>Priority:</b> %2</p>") | 224 | mText.append(i18n("<p><b>Priority:</b> %2</p>") |
211 | .arg(QString::number(event->priority()))); | 225 | .arg(QString::number(event->priority()))); |
212 | 226 | ||
213 | addTag("p",i18n("<b>Access: </b>") +event->secrecyStr() ); | 227 | addTag("p",i18n("<b>Access: </b>") +event->secrecyStr() ); |
214 | formatCategories(event); | 228 | formatCategories(event); |
215 | if (!event->description().isEmpty()) { | 229 | if ( mDetails ) { |
216 | addTag("p",i18n("<b>Details: </b>")); | 230 | if (!event->description().isEmpty()) { |
217 | addTag("p",event->description()); | 231 | addTag("p",i18n("<b>Details: </b>")); |
232 | addTag("p",event->description()); | ||
233 | } | ||
218 | } | 234 | } |
219 | |||
220 | |||
221 | |||
222 | formatReadOnly(event); | 235 | formatReadOnly(event); |
223 | formatAttendees(event); | 236 | formatAttendees(event); |
224 | 237 | if ( mCreated ) { | |
238 | addTag("p",i18n("<b>Created: ") +" </b>"); | ||
239 | addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); | ||
240 | |||
241 | } | ||
242 | if ( mModified ) { | ||
243 | addTag("p",i18n("<b>Last modified: ") +" </b>"); | ||
244 | addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); | ||
245 | |||
246 | } | ||
225 | } | 247 | } |
226 | 248 | ||
227 | void KIncidenceFormatter::setJournal(Journal* ) | 249 | void KIncidenceFormatter::setJournal(Journal* ) |
228 | { | 250 | { |
229 | 251 | ||
230 | } | 252 | } |
231 | 253 | ||
232 | void KIncidenceFormatter::formatCategories(Incidence *event) | 254 | void KIncidenceFormatter::formatCategories(Incidence *event) |
diff --git a/libkcal/kincidenceformatter.h b/libkcal/kincidenceformatter.h index 6165a9f..068e6d2 100644 --- a/libkcal/kincidenceformatter.h +++ b/libkcal/kincidenceformatter.h | |||
@@ -12,31 +12,32 @@ | |||
12 | using namespace KCal; | 12 | using namespace KCal; |
13 | 13 | ||
14 | class KIncidenceFormatter : public QObject | 14 | class KIncidenceFormatter : public QObject |
15 | { | 15 | { |
16 | public: | 16 | public: |
17 | static KIncidenceFormatter* instance(); | 17 | static KIncidenceFormatter* instance(); |
18 | KIncidenceFormatter(); | 18 | KIncidenceFormatter(); |
19 | ~KIncidenceFormatter(); | 19 | ~KIncidenceFormatter(); |
20 | QString getFormattedText( Incidence * inc ); | 20 | QString getFormattedText( Incidence * inc , bool details = false, bool created = false, bool modified = false ); |
21 | 21 | ||
22 | void setEvent(Event *event); | 22 | void setEvent(Event *event); |
23 | void setTodo(Todo *event ); | 23 | void setTodo(Todo *event ); |
24 | void setJournal(Journal* ); | 24 | void setJournal(Journal* ); |
25 | 25 | ||
26 | protected: | 26 | protected: |
27 | int mColorMode; | 27 | int mColorMode; |
28 | void addTag(const QString & tag,const QString & text); | 28 | void addTag(const QString & tag,const QString & text); |
29 | 29 | ||
30 | void formatCategories(Incidence *event); | 30 | void formatCategories(Incidence *event); |
31 | void formatAttendees(Incidence *event); | 31 | void formatAttendees(Incidence *event); |
32 | void formatReadOnly(Incidence *event); | 32 | void formatReadOnly(Incidence *event); |
33 | 33 | ||
34 | private: | 34 | private: |
35 | bool mSyncMode; | 35 | bool mSyncMode; |
36 | bool mDetails, mCreated ,mModified; | ||
36 | 37 | ||
37 | QString mText; | 38 | QString mText; |
38 | Incidence* mCurrentIncidence; | 39 | Incidence* mCurrentIncidence; |
39 | static KIncidenceFormatter* mInstance; | 40 | static KIncidenceFormatter* mInstance; |
40 | }; | 41 | }; |
41 | 42 | ||
42 | #endif | 43 | #endif |