author | zautrix <zautrix> | 2005-02-17 21:31:18 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-17 21:31:18 (UTC) |
commit | 8e8d2bd0c31eb272a7f26756252ff4930d0602bc (patch) (side-by-side diff) | |
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 | 9 | ||||
-rw-r--r-- | korganizer/koagendaitem.cpp | 5 | ||||
-rw-r--r-- | korganizer/koeventviewer.cpp | 17 | ||||
-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 | 32 | ||||
-rw-r--r-- | libkcal/kincidenceformatter.h | 3 |
11 files changed, 117 insertions, 13 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 @@ { "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: " }, { "","" }, { "","" }, { "","" }, { "","" }, { "","" },
\ 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 @@ -85,17 +85,20 @@ KOAgendaItem::KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent,bool setMouseTracking(true); //setAcceptDrops(true); xPaintCoord = -1; yPaintCoord = -1; } 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"; } void KOAgendaItem::init ( Incidence *incidence, QDate qd ) { mIncidence = incidence; mDate = qd; mFirstMultiItem = 0; 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 ) QString s =i18n("( %1 min before )").arg( min ); addTag("p",i18n("<b>Alarm on: ") + s +" </b>"); addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); //addTag("p",s); } addTag("b",i18n("Access: ")); mText.append(event->secrecyStr()+"<br>"); + + + if ( KOPrefs::instance()->mEVshowDetails ) { if (!event->description().isEmpty()) { addTag("p",i18n("<b>Details: </b>")); addTag("p",event->description()); } - + } formatCategories(event); formatReadOnly(event); 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); //QWhatsThis::add(this,mText); } void KOEventViewer::appendTodo(Todo *event, int mode ) { mMailSubject = ""; @@ -413,20 +426,22 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) mText.append(i18n("<p><b>Start on:</b> %1</p>").arg(event->dtStartStr(KOPrefs::instance()->mShortDateInViewer))); } if (event->hasDueDate()) { mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(KOPrefs::instance()->mShortDateInViewer))); mMailSubject += i18n(" - " )+event->dtDueStr( true ); } addTag("b",i18n("Access: ")); mText.append(event->secrecyStr()+"<br>"); + if ( KOPrefs::instance()->mEVshowDetails ) { if (!event->description().isEmpty()) { addTag("p",i18n("<b>Details: </b>")); addTag("p",event->description()); } + } formatCategories(event); mText.append(i18n("<p><b>Priority:</b> %2</p>") .arg(QString::number(event->priority()))); formatReadOnly(event); formatAttendees(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, KOListView::~KOListView() { delete mPopupMenu; } QString KOListView::getWhatsThisText(QPoint p) { KOListViewItem* item = ( KOListViewItem* ) mListView->itemAt( 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" ); } void KOListView::updateList() { // qDebug(" KOListView::updateList() "); 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() } QString KNoScrollListBox::getWhatsThisText(QPoint p) { QListBoxItem* item = itemAt ( p ); if ( ! item ) { return i18n("Click in the cell\nto add an event!"); } - return KIncidenceFormatter::instance()->getFormattedText(((MonthViewItem*) item)->incidence()); + return KIncidenceFormatter::instance()->getFormattedText(((MonthViewItem*) item)->incidence(), + KOPrefs::instance()->mWTshowDetails, + KOPrefs::instance()->mWTshowCreated, + KOPrefs::instance()->mWTshowChanged); } void KNoScrollListBox::keyPressEvent(QKeyEvent *e) { switch(e->key()) { case Key_Right: if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) { @@ -190,17 +193,16 @@ void KNoScrollListBox::mousePressEvent(QMouseEvent *e) MonthViewItem::MonthViewItem( Incidence *incidence, QDate qd, const QString & s) : QListBoxItem() { setText( s ); mIncidence = incidence; mDate = qd; - // QWhatsThis::add(this,KIncidenceFormatter::instance()->getFormattedText( mIncidence )); mRecur = false; mAlarm = false; mReply = false; mInfo = false; } void MonthViewItem::paint(QPainter *p) { 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() : KPrefs::setCurrentGroup( "Editors" ); addItemStringList( "EventTemplates", &mEventTemplates ); addItemStringList( "TodoTemplates", &mTodoTemplates ); addItemInt("DestinationPolicy",&mDestination,standardDestination); - + 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); } KOPrefs::~KOPrefs() { if (mInstance == this) 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 int mAlarmBeepInterval; int mOldLanguage; int mOldLoadedLanguage; QString mActiveSyncPort; QString mActiveSyncIP; + // settings for eventviewer + bool mEVshowDetails; + bool mEVshowCreated; + bool mEVshowChanged; + bool mWTshowDetails; + bool mWTshowCreated; + bool mWTshowChanged; + private: QDict<QColor> mCategoryColors; QColor mDefaultCategoryColor; QFont mDefaultTimeBarFont; QFont mDefaultViewFont; QFont mDefaultMonthViewFont; 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 = topLayout->addWidget(dummy->checkBox(),ii++,0); dummy = addWidBool(i18n("Allday Agenda view shows todos"), &(KOPrefs::instance()->mShowTodoInAgenda),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); + 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); topFrame = addPage(i18n("Alarm"),0,0); // DesktopIcon("viewmag",KIcon::SizeMedium)); topLayout = new QGridLayout(topFrame,2,1); topLayout->setSpacing(spacingHint()); 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) : KOTodoView::~KOTodoView() { delete mDocPrefs; } QString KOTodoView::getWhatsThisText(QPoint p) { KOTodoViewItem* item = ( KOTodoViewItem* ) mTodoListView->itemAt( 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" ); } void KOTodoView::jumpToDate () { // if (mActiveItem) { // 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 @@ #ifdef DEKTOP_VERSION #include <kabc/stdaddressbook.h> #define size count #endif KIncidenceFormatter* KIncidenceFormatter::mInstance = 0; static KStaticDeleter<KIncidenceFormatter> insd; -QString KIncidenceFormatter::getFormattedText( Incidence * inc ) +QString KIncidenceFormatter::getFormattedText( Incidence * inc, bool details, bool created , bool modified ) { // #ifndef QT_NO_INPUTDIALOG // return QInputDialog::getItem( caption, label, items, current, editable ); // #else // return QString::null; // #endif + mDetails = details; + mCreated = created ; + mModified = modified; mText = ""; if ( inc->type() == "Event" ) setEvent((Event *) inc ); else if ( inc->type() == "Todo" ) setTodo((Todo *) inc ); return mText; } @@ -133,25 +136,36 @@ void KIncidenceFormatter::setEvent(Event *event) addTag("p",i18n("<b>Alarm on: </b>") + s + ": "+KGlobal::locale()->formatDateTime( t, shortDate )); //addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); //addTag("p",s); } addTag("p",i18n("<b>Access: </b>") +event->secrecyStr() ); // mText.append(event->secrecyStr()+"<br>"); formatCategories(event); + 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 )); + + } } void KIncidenceFormatter::setTodo(Todo *event ) { int mode = 0; mCurrentIncidence = event; bool shortDate = true; @@ -207,27 +221,35 @@ void KIncidenceFormatter::setTodo(Todo *event ) if (event->hasDueDate()) { mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(shortDate))); } mText.append(i18n("<p><b>Priority:</b> %2</p>") .arg(QString::number(event->priority()))); addTag("p",i18n("<b>Access: </b>") +event->secrecyStr() ); formatCategories(event); + 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 )); + + } +} void KIncidenceFormatter::setJournal(Journal* ) { } 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 @@ using namespace KCal; class KIncidenceFormatter : public QObject { public: static KIncidenceFormatter* instance(); KIncidenceFormatter(); ~KIncidenceFormatter(); - QString getFormattedText( Incidence * inc ); + QString getFormattedText( Incidence * inc , bool details = false, bool created = false, bool modified = false ); void setEvent(Event *event); void setTodo(Todo *event ); void setJournal(Journal* ); protected: int mColorMode; void addTag(const QString & tag,const QString & text); void formatCategories(Incidence *event); void formatAttendees(Incidence *event); void formatReadOnly(Incidence *event); private: bool mSyncMode; + bool mDetails, mCreated ,mModified; QString mText; Incidence* mCurrentIncidence; static KIncidenceFormatter* mInstance; }; #endif |