summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-04-17 16:49:25 (UTC)
committer zautrix <zautrix>2005-04-17 16:49:25 (UTC)
commit70b45fe97813c4fd336b7ca8fdedab13f9c2e039 (patch) (side-by-side diff)
tree37e89cf6cc411af8c646003fcfb0d5975f38272c /korganizer
parent02dc5d8173393d2069951a5f847db5bdf69137f6 (diff)
downloadkdepimpi-70b45fe97813c4fd336b7ca8fdedab13f9c2e039.zip
kdepimpi-70b45fe97813c4fd336b7ca8fdedab13f9c2e039.tar.gz
kdepimpi-70b45fe97813c4fd336b7ca8fdedab13f9c2e039.tar.bz2
fixes
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koeventviewer.cpp68
-rw-r--r--korganizer/kotodoview.cpp8
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
@@ -279,4 +279,5 @@ void KOEventViewer::appendEvent(Event *event, int mode )
mCurrentIncidence = event;
bool shortDate = KOPrefs::instance()->mShortDateInViewer;
+ bool wideScreen = ( QApplication::desktop()->width() >= 640 );
topLevelWidget()->setCaption(i18n("Event Viewer"));
if ( mode == 0 ) {
@@ -332,6 +333,5 @@ 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();
}
@@ -345,6 +345,10 @@ void KOEventViewer::appendEvent(Event *event, int mode )
next = event->getNextOccurence( QDateTime::currentDateTime() , &ok );
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 );
@@ -354,8 +358,12 @@ void KOEventViewer::appendEvent(Event *event, int mode )
nextd = event->recurrence()->getPreviousDate( QDate::currentDate() , &last );
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>") );
addTag("p", KGlobal::locale()->formatDate( nextd, shortDate ));
}
}
+ }
} else {
mMailSubject += i18n(" - " )+event->dtStartStr( true );
@@ -368,13 +376,14 @@ void KOEventViewer::appendEvent(Event *event, int mode )
QDateTime t = alarm->time();
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());
formatCategories(event);
@@ -384,19 +393,20 @@ 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
+ }
+
}
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
+ }
}
@@ -418,4 +428,5 @@ void KOEventViewer::appendTodo(Todo *event, int mode )
topLevelWidget()->setCaption(i18n("Todo Viewer"));
bool shortDate = KOPrefs::instance()->mShortDateInViewer;
+ bool wideScreen = ( QApplication::desktop()->width() >= 640 );
if (mode == 0 )
addTag("h2",deTag(event->summary()));
@@ -471,6 +482,5 @@ 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();
}
@@ -482,11 +492,13 @@ void KOEventViewer::appendTodo(Todo *event, int mode )
QDateTime t = alarm->time();
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());
formatCategories(event);
@@ -496,20 +508,21 @@ 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
-
+ }
}
if ( event->relatedTo() ) {
@@ -539,9 +552,8 @@ void KOEventViewer::formatCategories(Incidence *event)
if (!event->categoriesStr().isEmpty()) {
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
@@ -466,4 +466,7 @@ 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,
SLOT (showTodo()));
@@ -481,9 +484,8 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
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()));