From 70b45fe97813c4fd336b7ca8fdedab13f9c2e039 Mon Sep 17 00:00:00 2001 From: zautrix Date: Sun, 17 Apr 2005 16:49:25 +0000 Subject: fixes --- (limited to 'korganizer') diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index f39b5e1..c8c2f28 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp @@ -278,6 +278,7 @@ void KOEventViewer::appendEvent(Event *event, int mode ) mMailSubject = ""; mCurrentIncidence = event; bool shortDate = KOPrefs::instance()->mShortDateInViewer; + bool wideScreen = ( QApplication::desktop()->width() >= 640 ); topLevelWidget()->setCaption(i18n("Event Viewer")); if ( mode == 0 ) { addTag("h2",deTag(event->summary())); @@ -331,8 +332,7 @@ void KOEventViewer::appendEvent(Event *event, int mode ) } } if (!event->location().isEmpty()) { - addTag("b",i18n("Location: ")); - mText.append(deTag(event->location())+"
"); + addTag("p",""+i18n("Location: ")+""+ deTag(event->location() ) ); mMailSubject += i18n(" at ") + event->location(); } if (event->recurrence()->doesRecur()) { @@ -344,8 +344,12 @@ void KOEventViewer::appendEvent(Event *event, int mode ) QDateTime next; next = event->getNextOccurence( QDateTime::currentDateTime() , &ok ); if ( ok ) { - addTag("p",i18n("Next recurrence is on:") ); - addTag("p", KGlobal::locale()->formatDate( next.date(), shortDate )); + if ( wideScreen ){ + addTag("p",i18n("Next recurrence is on:") +" " + KGlobal::locale()->formatDate( next.date(), shortDate ) ); + } else { + addTag("p",i18n("Next recurrence is on:") ); + addTag("p", KGlobal::locale()->formatDate( next.date(), shortDate )); + } mMailSubject += i18n(" - " )+ KGlobal::locale()->formatDateTime( next, true ); } else { @@ -353,8 +357,12 @@ void KOEventViewer::appendEvent(Event *event, int mode ) QDate nextd; nextd = event->recurrence()->getPreviousDate( QDate::currentDate() , &last ); if ( last ) { - addTag("p",i18n("Last recurrence was on:") ); - addTag("p", KGlobal::locale()->formatDate( nextd, shortDate )); + if ( wideScreen ){ + addTag("p",i18n("Last recurrence was on:") +" " + KGlobal::locale()->formatDate( nextd, shortDate )); + } else{ + addTag("p",i18n("Last recurrence was on:") ); + addTag("p", KGlobal::locale()->formatDate( nextd, shortDate )); + } } } } else { @@ -367,37 +375,39 @@ void KOEventViewer::appendEvent(Event *event, int mode ) Alarm *alarm =event->alarms().first() ; QDateTime t = alarm->time(); QString s =i18n("( %1 before )").arg( alarm->offsetText() ); - addTag("p",i18n("Alarm on: ") + s +" "); - addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); + if(wideScreen ){ + addTag("p",i18n("Alarm on: ") + s +" "+ KGlobal::locale()->formatDateTime( t, shortDate )); + }else{ + addTag("p",i18n("Alarm on: ") + s +" "); + addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); + } //addTag("p",s); } - addTag("b",i18n("Access: ")); - mText.append(event->secrecyStr()+"
"); + addTag("p",""+i18n("Access: ") + "" + event->secrecyStr()); - - formatCategories(event); formatReadOnly(event); formatAttendees(event); if ( KOPrefs::instance()->mEVshowCreated ) { -#ifdef DESKTOP_VERSION - addTag("p",i18n("Created: ") +" "+KGlobal::locale()->formatDateTime( event->created(), shortDate )); -#else - addTag("p",i18n("Created: ") +" "); - addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); -#endif + if(wideScreen ){ + addTag("p",i18n("Created: ") +" "+KGlobal::locale()->formatDateTime( event->created(), shortDate )); + }else{ + addTag("p",i18n("Created: ") +" "); + addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); + } + } if ( KOPrefs::instance()->mEVshowChanged ) { -#ifdef DESKTOP_VERSION - addTag("p",i18n("Last modified: ") +" " + KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ) ); -#else - addTag("p",i18n("Last modified: ") +" "); - addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); -#endif + if(wideScreen ){ + addTag("p",i18n("Last modified: ") +" " + KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ) ); + }else{ + addTag("p",i18n("Last modified: ") +" "); + addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); + } } if ( KOPrefs::instance()->mEVshowDetails ) { @@ -417,6 +427,7 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) mCurrentIncidence = event; topLevelWidget()->setCaption(i18n("Todo Viewer")); bool shortDate = KOPrefs::instance()->mShortDateInViewer; + bool wideScreen = ( QApplication::desktop()->width() >= 640 ); if (mode == 0 ) addTag("h2",deTag(event->summary())); else { @@ -469,9 +480,8 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) mText.append(i18n("

Due on: %1

").arg(event->dtDueStr(KOPrefs::instance()->mShortDateInViewer))); mMailSubject += i18n(" - " )+event->dtDueStr( true ); } - if (!event->location().isEmpty()) { - addTag("b",i18n("Location: ")); - mText.append(deTag(event->location())+"
"); + if (!event->location().isEmpty()) { + addTag("p",""+i18n("Location: ")+""+ deTag(event->location() ) ); mMailSubject += i18n(" at ") + event->location(); } mText.append(i18n("

Priority: %2

") @@ -480,14 +490,16 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) if (event->isAlarmEnabled()) { Alarm *alarm =event->alarms().first() ; QDateTime t = alarm->time(); - QString s =i18n("( %1 before )").arg( alarm->offsetText() ); - addTag("p",i18n("Alarm on: ") + s +" "); - addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); - //addTag("p",s); + QString s =i18n("( %1 before )").arg( alarm->offsetText() ); + if ( wideScreen ) { + addTag("p",i18n("Alarm on: ") + s +" "+ KGlobal::locale()->formatDateTime( t, shortDate )); + } else { + addTag("p",i18n("Alarm on: ") + s +" "); + addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); + } } - addTag("b",i18n("Access: ")); - mText.append(event->secrecyStr()+"
"); + addTag("p",""+i18n("Access: ") + "" + event->secrecyStr()); formatCategories(event); @@ -495,22 +507,23 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) formatAttendees(event); if ( KOPrefs::instance()->mEVshowCreated ) { -#ifdef DESKTOP_VERSION - addTag("p",i18n("Created: ") +" "+KGlobal::locale()->formatDateTime( event->created(), shortDate )); -#else - addTag("p",i18n("Created: ") +" "); - addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); -#endif - + if(wideScreen ){ + + addTag("p",i18n("Created: ") +" "+KGlobal::locale()->formatDateTime( event->created(), shortDate )); + + } else { + addTag("p",i18n("Created: ") +" "); + addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); + } } if ( KOPrefs::instance()->mEVshowChanged ) { -#ifdef DESKTOP_VERSION - addTag("p",i18n("Last modified: ") +" " +KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ) ); -#else - addTag("p",i18n("Last modified: ") +" "); - addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); -#endif - + if(wideScreen ){ + addTag("p",i18n("Last modified: ") +" " +KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ) ); + + } else { + addTag("p",i18n("Last modified: ") +" "); + addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); + } } if ( event->relatedTo() ) { addTag("b",i18n("Parent todo:
")); @@ -538,11 +551,10 @@ void KOEventViewer::formatCategories(Incidence *event) { if (!event->categoriesStr().isEmpty()) { if (event->categories().count() == 1) { - addTag("h3",i18n("Category")); + addTag("p",""+i18n("Category") + ": " + event->categoriesStrWithSpace()); } else { - addTag("h3",i18n("Categories")); + addTag("p",""+i18n("Categories")+": " + event->categoriesStrWithSpace() ) ; } - addTag("p",event->categoriesStr()); } } void KOEventViewer::formatAttendees(Incidence *event) diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 0a608dc..25be63a 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp @@ -464,7 +464,10 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : - mItemPopupMenu = new QPopupMenu(this); + mItemPopupMenu = new QPopupMenu(this); + mItemPopupMenu->insertItem( i18n("Start/Stop todo..."), this, + SLOT (toggleRunningItem())); + mItemPopupMenu->insertSeparator(); mItemPopupMenu->insertItem(i18n("Show..."), this, SLOT (showTodo())); mItemPopupMenu->insertItem(i18n("Edit..."), this, @@ -480,11 +483,10 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : mItemPopupMenu->insertItem( i18n("Toggle Cancel"), this, SLOT (cancelTodo())); 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, SLOT (newSubTodo())); mItemPopupMenu->insertItem(i18n("Unparent Todo"), this, -- cgit v0.9.0.2