-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 @@ -1278,2 +1278,11 @@ { "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: " }, +{ "","" }, { "","" }, @@ -1282,2 +1291,2 @@ { "","" }, -{ "","" },
\ No newline at end of file + diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index 6a312b3..cead612 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp @@ -92,3 +92,6 @@ QString KOAgendaItem::getWhatsThisText() if ( mIncidence ) - return KIncidenceFormatter::instance()->getFormattedText( mIncidence ); + return KIncidenceFormatter::instance()->getFormattedText( mIncidence, + KOPrefs::instance()->mWTshowDetails, + KOPrefs::instance()->mWTshowCreated, + KOPrefs::instance()->mWTshowChanged); return "KOAgendaItem::getWhatsThisText()::internal error"; diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index f6c9624..d87938a 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp @@ -341,7 +341,10 @@ void KOEventViewer::appendEvent(Event *event, int mode ) mText.append(event->secrecyStr()+"<br>"); - if (!event->description().isEmpty()) { - addTag("p",i18n("<b>Details: </b>")); - addTag("p",event->description()); - } + + if ( KOPrefs::instance()->mEVshowDetails ) { + if (!event->description().isEmpty()) { + addTag("p",i18n("<b>Details: </b>")); + addTag("p",event->description()); + } + } formatCategories(event); @@ -350,3 +353,13 @@ void KOEventViewer::appendEvent(Event *event, int mode ) formatAttendees(event); - + + if ( KOPrefs::instance()->mEVshowCreated ) { + addTag("p",i18n("<b>Created: ") +" </b>"); + addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); + + } + if ( KOPrefs::instance()->mEVshowChanged ) { + addTag("p",i18n("<b>Last modified: ") +" </b>"); + addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); + + } setText(mText); @@ -420,5 +433,7 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) mText.append(event->secrecyStr()+"<br>"); - if (!event->description().isEmpty()) { - addTag("p",i18n("<b>Details: </b>")); - addTag("p",event->description()); + if ( KOPrefs::instance()->mEVshowDetails ) { + if (!event->description().isEmpty()) { + addTag("p",i18n("<b>Details: </b>")); + addTag("p",event->description()); + } } diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index d8e940b..1f5afc0 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp @@ -327,3 +327,6 @@ QString KOListView::getWhatsThisText(QPoint p) if ( item ) - return KIncidenceFormatter::instance()->getFormattedText( item->data() ); + return KIncidenceFormatter::instance()->getFormattedText( item->data(), + KOPrefs::instance()->mWTshowDetails, + KOPrefs::instance()->mWTshowCreated, + KOPrefs::instance()->mWTshowChanged); return i18n("That is the list view" ); diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index f9bc1ca..2fe80af 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -96,3 +96,6 @@ QString KNoScrollListBox::getWhatsThisText(QPoint p) } - return KIncidenceFormatter::instance()->getFormattedText(((MonthViewItem*) item)->incidence()); + return KIncidenceFormatter::instance()->getFormattedText(((MonthViewItem*) item)->incidence(), + KOPrefs::instance()->mWTshowDetails, + KOPrefs::instance()->mWTshowCreated, + KOPrefs::instance()->mWTshowChanged); } @@ -197,3 +200,2 @@ MonthViewItem::MonthViewItem( Incidence *incidence, QDate qd, const QString & s) mDate = qd; - // QWhatsThis::add(this,KIncidenceFormatter::instance()->getFormattedText( mIncidence )); mRecur = false; diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 5efc247..a91074f 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp @@ -293,3 +293,9 @@ KOPrefs::KOPrefs() : - + KPrefs::setCurrentGroup( "ViewOptions" ); + addItemBool("EVshowDetails",&mEVshowDetails,true); + addItemBool("EVshowCreated",&mEVshowCreated,true); + addItemBool("EVshowChanged",&mEVshowChanged,true); + addItemBool("WTshowDetails",&mWTshowDetails,false); + addItemBool("WTshowCreated",&mWTshowCreated,false); + addItemBool("WTshowChanged",&mWTshowChanged,false); diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h index e300067..e4e3dd7 100644 --- a/korganizer/koprefs.h +++ b/korganizer/koprefs.h @@ -271,2 +271,10 @@ class KOPrefs : public KPimPrefs + // settings for eventviewer + bool mEVshowDetails; + bool mEVshowCreated; + bool mEVshowChanged; + bool mWTshowDetails; + bool mWTshowCreated; + bool mWTshowChanged; + private: diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index 452d019..443508d 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp @@ -906,2 +906,34 @@ dummy = + topFrame = addPage(i18n("View Options"),0,0); + + topLayout = new QGridLayout(topFrame,4,1); + topLayout->setSpacing(spacingHint()); + topLayout->setMargin(marginHint()); + ii = 0; + lab = new QLabel( i18n("Show in todo/event viewer:"), topFrame); + topLayout->addWidget(lab ,ii++,0); + + dummy = addWidBool(i18n("Details"), + &(KOPrefs::instance()->mEVshowDetails),topFrame); + topLayout->addWidget(dummy->checkBox(),ii++,0); + dummy = addWidBool(i18n("Created time"), + &(KOPrefs::instance()->mEVshowCreated),topFrame); + topLayout->addWidget(dummy->checkBox(),ii++,0); + dummy = addWidBool(i18n("Last modified time"), + &(KOPrefs::instance()->mEVshowChanged),topFrame); + topLayout->addWidget(dummy->checkBox(),ii++,0); + + + lab = new QLabel( i18n("Show in What'sThis quick overview:"), topFrame); + topLayout->addWidget(lab ,ii++,0); + + dummy = addWidBool(i18n("Details"), + &(KOPrefs::instance()->mWTshowDetails),topFrame); + topLayout->addWidget(dummy->checkBox(),ii++,0); + dummy = addWidBool(i18n("Created time"), + &(KOPrefs::instance()->mWTshowCreated),topFrame); + topLayout->addWidget(dummy->checkBox(),ii++,0); + dummy = addWidBool(i18n("Last modified time"), + &(KOPrefs::instance()->mWTshowChanged),topFrame); + topLayout->addWidget(dummy->checkBox(),ii++,0); diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 3011458..3483e95 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp @@ -558,3 +558,6 @@ QString KOTodoView::getWhatsThisText(QPoint p) if ( item ) - return KIncidenceFormatter::instance()->getFormattedText( item->todo() ); + return KIncidenceFormatter::instance()->getFormattedText( item->todo(), + KOPrefs::instance()->mWTshowDetails, + KOPrefs::instance()->mWTshowCreated, + KOPrefs::instance()->mWTshowChanged); return i18n("That is the todo view" ); diff --git a/libkcal/kincidenceformatter.cpp b/libkcal/kincidenceformatter.cpp index cc3088a..1751ae3 100644 --- a/libkcal/kincidenceformatter.cpp +++ b/libkcal/kincidenceformatter.cpp @@ -12,3 +12,3 @@ static KStaticDeleter<KIncidenceFormatter> insd; -QString KIncidenceFormatter::getFormattedText( Incidence * inc ) +QString KIncidenceFormatter::getFormattedText( Incidence * inc, bool details, bool created , bool modified ) { @@ -19,2 +19,5 @@ QString KIncidenceFormatter::getFormattedText( Incidence * inc ) // #endif + mDetails = details; + mCreated = created ; + mModified = modified; mText = ""; @@ -140,8 +143,9 @@ void KIncidenceFormatter::setEvent(Event *event) formatCategories(event); - if (!event->description().isEmpty()) { - addTag("p",i18n("<b>Details: </b>")); - addTag("p",event->description()); + if ( mDetails ) { + if (!event->description().isEmpty()) { + addTag("p",i18n("<b>Details: </b>")); + addTag("p",event->description()); + } } - formatReadOnly(event); @@ -149,2 +153,12 @@ void KIncidenceFormatter::setEvent(Event *event) + if ( mCreated ) { + addTag("p",i18n("<b>Created: ") +" </b>"); + addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); + + } + if ( mModified ) { + addTag("p",i18n("<b>Last modified: ") +" </b>"); + addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); + + } @@ -214,12 +228,20 @@ void KIncidenceFormatter::setTodo(Todo *event ) formatCategories(event); - if (!event->description().isEmpty()) { - addTag("p",i18n("<b>Details: </b>")); - addTag("p",event->description()); + if ( mDetails ) { + if (!event->description().isEmpty()) { + addTag("p",i18n("<b>Details: </b>")); + addTag("p",event->description()); + } } - - - formatReadOnly(event); formatAttendees(event); - + if ( mCreated ) { + addTag("p",i18n("<b>Created: ") +" </b>"); + addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); + + } + if ( mModified ) { + addTag("p",i18n("<b>Last modified: ") +" </b>"); + addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); + + } } diff --git a/libkcal/kincidenceformatter.h b/libkcal/kincidenceformatter.h index 6165a9f..068e6d2 100644 --- a/libkcal/kincidenceformatter.h +++ b/libkcal/kincidenceformatter.h @@ -19,3 +19,3 @@ class KIncidenceFormatter : public QObject ~KIncidenceFormatter(); - QString getFormattedText( Incidence * inc ); + QString getFormattedText( Incidence * inc , bool details = false, bool created = false, bool modified = false ); @@ -35,2 +35,3 @@ class KIncidenceFormatter : public QObject bool mSyncMode; + bool mDetails, mCreated ,mModified; |