summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-04-02 14:07:31 (UTC)
committer zautrix <zautrix>2005-04-02 14:07:31 (UTC)
commitb0d17f8f2ef9b09b7d8b8aa0f6cc34f400f8fddd (patch) (unidiff)
tree942bcf89b35cf165e9147c1e4a5efa817c48007f /korganizer
parent997e7660a81baa2b8aeb1b66a3cc3ebe54e00ebe (diff)
downloadkdepimpi-b0d17f8f2ef9b09b7d8b8aa0f6cc34f400f8fddd.zip
kdepimpi-b0d17f8f2ef9b09b7d8b8aa0f6cc34f400f8fddd.tar.gz
kdepimpi-b0d17f8f2ef9b09b7d8b8aa0f6cc34f400f8fddd.tar.bz2
fixes
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeventviewer.cpp14
-rw-r--r--korganizer/kolistview.cpp14
-rw-r--r--korganizer/kotodoview.cpp26
3 files changed, 41 insertions, 13 deletions
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp
index dbe0668..bdad248 100644
--- a/korganizer/koeventviewer.cpp
+++ b/korganizer/koeventviewer.cpp
@@ -370,8 +370,7 @@ void KOEventViewer::appendEvent(Event *event, int mode )
370 if (event->isAlarmEnabled()) { 370 if (event->isAlarmEnabled()) {
371 Alarm *alarm =event->alarms().first() ; 371 Alarm *alarm =event->alarms().first() ;
372 QDateTime t = alarm->time(); 372 QDateTime t = alarm->time();
373 int min = t.secsTo( event->dtStart() )/60; 373 QString s =i18n("( %1 before )").arg( alarm->offsetText() );
374 QString s =i18n("( %1 min before )").arg( min );
375 addTag("p",i18n("<b>Alarm on: ") + s +" </b>"); 374 addTag("p",i18n("<b>Alarm on: ") + s +" </b>");
376 addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); 375 addTag("p", KGlobal::locale()->formatDateTime( t, shortDate ));
377 //addTag("p",s); 376 //addTag("p",s);
@@ -469,6 +468,17 @@ void KOEventViewer::appendTodo(Todo *event, int mode )
469 mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(KOPrefs::instance()->mShortDateInViewer))); 468 mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(KOPrefs::instance()->mShortDateInViewer)));
470 mMailSubject += i18n(" - " )+event->dtDueStr( true ); 469 mMailSubject += i18n(" - " )+event->dtDueStr( true );
471 } 470 }
471
472
473 if (event->isAlarmEnabled()) {
474 Alarm *alarm =event->alarms().first() ;
475 QDateTime t = alarm->time();
476 QString s =i18n("( %1 before )").arg( alarm->offsetText() );
477 addTag("p",i18n("<b>Alarm on: ") + s +" </b>");
478 addTag("p", KGlobal::locale()->formatDateTime( t, shortDate ));
479 //addTag("p",s);
480 }
481
472 addTag("b",i18n("Access: ")); 482 addTag("b",i18n("Access: "));
473 mText.append(event->secrecyStr()+"<br>"); 483 mText.append(event->secrecyStr()+"<br>");
474 if ( KOPrefs::instance()->mEVshowDetails ) { 484 if ( KOPrefs::instance()->mEVshowDetails ) {
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index 15e094d..e0e138e 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -120,7 +120,11 @@ bool ListItemVisitor::visit(Event *e)
120 mItem->setText(2,e->dtStartTimeStr()); 120 mItem->setText(2,e->dtStartTimeStr());
121 mItem->setText(3,end); 121 mItem->setText(3,end);
122 mItem->setText(4,e->dtEndTimeStr()); 122 mItem->setText(4,e->dtEndTimeStr());
123 mItem->setText(5,e->isAlarmEnabled() ? i18n("Yes") : i18n("No")); 123 if ( e->isAlarmEnabled() ) {
124 mItem->setText(5,e->alarms().first()->offsetText() );
125 } else {
126 mItem->setText(5, i18n("No"));
127 }
124 mItem->setText(6, e->recurrence()->recurrenceText()); 128 mItem->setText(6, e->recurrence()->recurrenceText());
125 mItem->setText(7,"---"); 129 mItem->setText(7,"---");
126 mItem->setText(8,"---"); 130 mItem->setText(8,"---");
@@ -154,8 +158,12 @@ bool ListItemVisitor::visit(Todo *t)
154 mItem->setText(2,"---"); 158 mItem->setText(2,"---");
155 } 159 }
156 mItem->setText(3,"---"); 160 mItem->setText(3,"---");
157 mItem->setText(4,"---"); 161 mItem->setText(4,"---");
158 mItem->setText(5,t->isAlarmEnabled() ? i18n("Yes") : i18n("No")); 162 if ( t->isAlarmEnabled() ) {
163 mItem->setText(5,t->alarms().first()->offsetText() );
164 } else {
165 mItem->setText(5, i18n("No"));
166 }
159 mItem->setText(6, t->recurrence()->recurrenceText()); 167 mItem->setText(6, t->recurrence()->recurrenceText());
160 if (t->hasDueDate()) { 168 if (t->hasDueDate()) {
161 mItem->setText(7,t->dtDueDateStr()); 169 mItem->setText(7,t->dtDueDateStr());
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index 0a315cb..01cf0ff 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -218,10 +218,12 @@ void KOTodoListView::contentsMousePressEvent(QMouseEvent* e)
218 //qDebug("%d %d %d", X, header()->sectionPos(0), treeStepSize() ); 218 //qDebug("%d %d %d", X, header()->sectionPos(0), treeStepSize() );
219 if (X > header()->sectionPos(0) + 219 if (X > header()->sectionPos(0) +
220 treeStepSize() * (i->depth() + (rootIsDecorated() ? 1 : 0)) + 220 treeStepSize() * (i->depth() + (rootIsDecorated() ? 1 : 0)) +
221 itemMargin() || 221 itemMargin() +i->height()||
222 X < header()->sectionPos(0)) { 222 X < header()->sectionPos(0)) {
223 rootClicked = false; 223 rootClicked = false;
224 } 224 }
225 } else {
226 rootClicked = false;
225 } 227 }
226#ifndef KORG_NODND 228#ifndef KORG_NODND
227 mMousePressed = false; 229 mMousePressed = false;
@@ -730,9 +732,9 @@ void KOTodoView::storeCurrentItem()
730 KOTodoViewItem* activeItemAbove = (KOTodoViewItem*)mActiveItem->itemAbove (); 732 KOTodoViewItem* activeItemAbove = (KOTodoViewItem*)mActiveItem->itemAbove ();
731 if ( activeItemAbove ) 733 if ( activeItemAbove )
732 mCurItemAbove = activeItemAbove->todo(); 734 mCurItemAbove = activeItemAbove->todo();
733 while ( mActiveItem->parent() != 0 ) 735 mCurItemRootParent = mCurItem;
734 mActiveItem = (KOTodoViewItem*)mActiveItem->parent(); 736 while ( mCurItemRootParent->relatedTo() != 0 )
735 mCurItemRootParent = mActiveItem->todo(); 737 mCurItemRootParent = mCurItemRootParent->relatedTo();
736 } 738 }
737 mActiveItem = 0; 739 mActiveItem = 0;
738} 740}
@@ -759,10 +761,10 @@ void KOTodoView::resetCurrentItem()
759 item = (KOTodoViewItem*)item->itemBelow(); 761 item = (KOTodoViewItem*)item->itemBelow();
760 } 762 }
761 if ( ! foundItem ) { 763 if ( ! foundItem ) {
762 if ( foundItemAbove ) 764 if ( foundItemRoot )
763 foundItem = foundItemAbove;
764 else
765 foundItem = foundItemRoot; 765 foundItem = foundItemRoot;
766 else
767 foundItem = foundItemAbove;
766 } 768 }
767 } 769 }
768 if ( foundItem ) { 770 if ( foundItem ) {
@@ -1205,8 +1207,11 @@ void KOTodoView::setAllOpen()
1205 isFlatDisplay = false; 1207 isFlatDisplay = false;
1206 mPopupMenu->setItemChecked( 8,false ); 1208 mPopupMenu->setItemChecked( 8,false );
1207 updateView(); 1209 updateView();
1210 } else {
1211 storeCurrentItem();
1208 } 1212 }
1209 setOpen(mTodoListView->firstChild(), true); 1213 setOpen(mTodoListView->firstChild(), true);
1214 resetCurrentItem();
1210} 1215}
1211void KOTodoView::setAllClose() 1216void KOTodoView::setAllClose()
1212{ 1217{
@@ -1214,8 +1219,11 @@ void KOTodoView::setAllClose()
1214 isFlatDisplay = false; 1219 isFlatDisplay = false;
1215 mPopupMenu->setItemChecked( 8,false ); 1220 mPopupMenu->setItemChecked( 8,false );
1216 updateView(); 1221 updateView();
1222 } else {
1223 storeCurrentItem();
1217 } 1224 }
1218 setOpen(mTodoListView->firstChild(), false); 1225 setOpen(mTodoListView->firstChild(), false);
1226 resetCurrentItem();
1219} 1227}
1220void KOTodoView::setOpen( QListViewItem* item, bool setOpenI) 1228void KOTodoView::setOpen( QListViewItem* item, bool setOpenI)
1221{ 1229{
@@ -1254,8 +1262,10 @@ void KOTodoView::setAllFlat()
1254 mPopupMenu->setItemChecked( 8,false ); 1262 mPopupMenu->setItemChecked( 8,false );
1255 updateView(); 1263 updateView();
1256 return; 1264 return;
1257 } 1265 }
1266 storeCurrentItem();
1258 displayAllFlat(); 1267 displayAllFlat();
1268 resetCurrentItem();
1259} 1269}
1260 1270
1261void KOTodoView::purgeCompleted() 1271void KOTodoView::purgeCompleted()