-rw-r--r-- | korganizer/koeventviewer.cpp | 68 | ||||
-rw-r--r-- | korganizer/kotodoview.cpp | 8 |
2 files changed, 45 insertions, 31 deletions
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index f39b5e1..c8c2f28 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp @@ -280,2 +280,3 @@ void KOEventViewer::appendEvent(Event *event, int mode ) bool shortDate = KOPrefs::instance()->mShortDateInViewer; + bool wideScreen = ( QApplication::desktop()->width() >= 640 ); topLevelWidget()->setCaption(i18n("Event Viewer")); @@ -333,4 +334,3 @@ void KOEventViewer::appendEvent(Event *event, int mode ) if (!event->location().isEmpty()) { - addTag("b",i18n("Location: ")); - mText.append(deTag(event->location())+"<br>"); + addTag("p","<b>"+i18n("Location: ")+"</b>"+ deTag(event->location() ) ); mMailSubject += i18n(" at ") + event->location(); @@ -346,4 +346,8 @@ void KOEventViewer::appendEvent(Event *event, int mode ) if ( ok ) { + if ( wideScreen ){ + addTag("p",i18n("<b>Next recurrence is on:</b>") +" " + KGlobal::locale()->formatDate( next.date(), shortDate ) ); + } else { addTag("p",i18n("<b>Next recurrence is on:</b>") ); addTag("p", KGlobal::locale()->formatDate( next.date(), shortDate )); + } mMailSubject += i18n(" - " )+ KGlobal::locale()->formatDateTime( next, true ); @@ -355,2 +359,5 @@ void KOEventViewer::appendEvent(Event *event, int mode ) if ( last ) { + if ( wideScreen ){ + addTag("p",i18n("<b>Last recurrence was on:</b>") +" " + KGlobal::locale()->formatDate( nextd, shortDate )); + } else{ addTag("p",i18n("<b>Last recurrence was on:</b>") ); @@ -359,2 +366,3 @@ void KOEventViewer::appendEvent(Event *event, int mode ) } + } } else { @@ -369,4 +377,8 @@ void KOEventViewer::appendEvent(Event *event, int mode ) QString s =i18n("( %1 before )").arg( alarm->offsetText() ); + if(wideScreen ){ + addTag("p",i18n("<b>Alarm on: ") + s +" </b>"+ KGlobal::locale()->formatDateTime( t, shortDate )); + }else{ addTag("p",i18n("<b>Alarm on: ") + s +" </b>"); addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); + } //addTag("p",s); @@ -374,6 +386,3 @@ void KOEventViewer::appendEvent(Event *event, int mode ) - addTag("b",i18n("Access: ")); - mText.append(event->secrecyStr()+"<br>"); - - + addTag("p","<b>"+i18n("Access: ") + "</b>" + event->secrecyStr()); @@ -385,8 +394,9 @@ void KOEventViewer::appendEvent(Event *event, int mode ) if ( KOPrefs::instance()->mEVshowCreated ) { -#ifdef DESKTOP_VERSION + if(wideScreen ){ addTag("p",i18n("<b>Created: ") +" </b>"+KGlobal::locale()->formatDateTime( event->created(), shortDate )); -#else + }else{ addTag("p",i18n("<b>Created: ") +" </b>"); addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); -#endif + } + @@ -394,8 +404,8 @@ void KOEventViewer::appendEvent(Event *event, int mode ) if ( KOPrefs::instance()->mEVshowChanged ) { -#ifdef DESKTOP_VERSION + if(wideScreen ){ addTag("p",i18n("<b>Last modified: ") +" </b>" + KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ) ); -#else + }else{ addTag("p",i18n("<b>Last modified: ") +" </b>"); addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); -#endif + } @@ -419,2 +429,3 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) bool shortDate = KOPrefs::instance()->mShortDateInViewer; + bool wideScreen = ( QApplication::desktop()->width() >= 640 ); if (mode == 0 ) @@ -472,4 +483,3 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) if (!event->location().isEmpty()) { - addTag("b",i18n("Location: ")); - mText.append(deTag(event->location())+"<br>"); + addTag("p","<b>"+i18n("Location: ")+"</b>"+ deTag(event->location() ) ); mMailSubject += i18n(" at ") + event->location(); @@ -483,9 +493,11 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) QString s =i18n("( %1 before )").arg( alarm->offsetText() ); + if ( wideScreen ) { + addTag("p",i18n("<b>Alarm on: ") + s +" </b>"+ KGlobal::locale()->formatDateTime( t, shortDate )); + } else { 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>"); + addTag("p","<b>"+i18n("Access: ") + "</b>" + event->secrecyStr()); @@ -497,18 +509,19 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) if ( KOPrefs::instance()->mEVshowCreated ) { -#ifdef DESKTOP_VERSION + if(wideScreen ){ + addTag("p",i18n("<b>Created: ") +" </b>"+KGlobal::locale()->formatDateTime( event->created(), shortDate )); -#else + + } else { addTag("p",i18n("<b>Created: ") +" </b>"); addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); -#endif - + } } if ( KOPrefs::instance()->mEVshowChanged ) { -#ifdef DESKTOP_VERSION + if(wideScreen ){ addTag("p",i18n("<b>Last modified: ") +" </b>" +KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ) ); -#else + + } else { addTag("p",i18n("<b>Last modified: ") +" </b>"); addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); -#endif - + } } @@ -540,7 +553,6 @@ void KOEventViewer::formatCategories(Incidence *event) if (event->categories().count() == 1) { - addTag("h3",i18n("Category")); + addTag("p","<b>"+i18n("Category") + ":</b> " + event->categoriesStrWithSpace()); } else { - addTag("h3",i18n("Categories")); + addTag("p","<b>"+i18n("Categories")+":</b> " + event->categoriesStrWithSpace() ) ; } - addTag("p",event->categoriesStr()); } diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 0a608dc..25be63a 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp @@ -467,2 +467,5 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : mItemPopupMenu = new QPopupMenu(this); + mItemPopupMenu->insertItem( i18n("Start/Stop todo..."), this, + SLOT (toggleRunningItem())); + mItemPopupMenu->insertSeparator(); mItemPopupMenu->insertItem(i18n("Show..."), this, @@ -482,7 +485,6 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : mItemPopupMenu->insertSeparator(); - - mItemPopupMenu->insertItem( i18n("Start/Stop todo..."), this, - SLOT (toggleRunningItem())); + /* mItemPopupMenu->insertItem( i18n("New Todo..."), this, SLOT (newTodo())); + */ mItemPopupMenu->insertItem(i18n("New Sub-Todo..."), this, |