summaryrefslogtreecommitdiffabout
path: root/korganizer/kotodoview.cpp
Unidiff
Diffstat (limited to 'korganizer/kotodoview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/kotodoview.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index 01cf0ff..395325c 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -199,16 +199,20 @@ void KOTodoListView::contentsDropEvent(QDropEvent *e)
199 } 199 }
200 else { 200 else {
201 qDebug("KOTodoListView::contentsDropEvent(): Todo from drop not decodable "); 201 qDebug("KOTodoListView::contentsDropEvent(): Todo from drop not decodable ");
202 e->ignore(); 202 e->ignore();
203 } 203 }
204 } 204 }
205#endif 205#endif
206} 206}
207void KOTodoListView::wheelEvent (QWheelEvent *e)
208{
209 QListView::wheelEvent (e);
210}
207 211
208void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) 212void KOTodoListView::contentsMousePressEvent(QMouseEvent* e)
209{ 213{
210 214
211 QPoint p(contentsToViewport(e->pos())); 215 QPoint p(contentsToViewport(e->pos()));
212 QListViewItem *i = itemAt(p); 216 QListViewItem *i = itemAt(p);
213 bool rootClicked = true; 217 bool rootClicked = true;
214 if (i) { 218 if (i) {
@@ -222,19 +226,21 @@ void KOTodoListView::contentsMousePressEvent(QMouseEvent* e)
222 X < header()->sectionPos(0)) { 226 X < header()->sectionPos(0)) {
223 rootClicked = false; 227 rootClicked = false;
224 } 228 }
225 } else { 229 } else {
226 rootClicked = false; 230 rootClicked = false;
227 } 231 }
228#ifndef KORG_NODND 232#ifndef KORG_NODND
229 mMousePressed = false; 233 mMousePressed = false;
230 if (! rootClicked ) { 234 if (! rootClicked && !( e->button() == RightButton) ) {
231 mPressPos = e->pos(); 235 mPressPos = e->pos();
232 mMousePressed = true; 236 mMousePressed = true;
237 } else {
238 mMousePressed = false;
233 } 239 }
234#endif 240#endif
235 //qDebug("KOTodoListView::contentsMousePressEvent %d", rootClicked); 241 //qDebug("KOTodoListView::contentsMousePressEvent %d", rootClicked);
236#ifndef DESKTOP_VERSION 242#ifndef DESKTOP_VERSION
237 if (!( e->button() == RightButton && rootClicked) ) 243 if (!( e->button() == RightButton && rootClicked) )
238 QListView::contentsMousePressEvent(e); 244 QListView::contentsMousePressEvent(e);
239#else 245#else
240 QListView::contentsMousePressEvent(e); 246 QListView::contentsMousePressEvent(e);
@@ -1077,17 +1083,17 @@ void KOTodoView::itemDoubleClicked(QListViewItem *item)
1077 } 1083 }
1078 pendingSubtodo = 0; 1084 pendingSubtodo = 0;
1079 int row = mTodoListView->header()->sectionAt ( mTodoListView->header()->mapFromGlobal( QCursor::pos()).x() ); 1085 int row = mTodoListView->header()->sectionAt ( mTodoListView->header()->mapFromGlobal( QCursor::pos()).x() );
1080 //qDebug("ROW %d ", row); 1086 //qDebug("ROW %d ", row);
1081 if (!item) { 1087 if (!item) {
1082 newTodo(); 1088 newTodo();
1083 return; 1089 return;
1084 } else { 1090 } else {
1085 if ( row == 1 ) { 1091 if ( row == 1 || row == 2 ) {
1086 mActiveItem = (KOTodoViewItem *) item; 1092 mActiveItem = (KOTodoViewItem *) item;
1087 newSubTodo(); 1093 newSubTodo();
1088 return; 1094 return;
1089 } 1095 }
1090 } 1096 }
1091 if ( KOPrefs::instance()->mEditOnDoubleClick ) 1097 if ( KOPrefs::instance()->mEditOnDoubleClick )
1092 editItem( item ); 1098 editItem( item );
1093 else 1099 else
@@ -1266,16 +1272,17 @@ void KOTodoView::setAllFlat()
1266 storeCurrentItem(); 1272 storeCurrentItem();
1267 displayAllFlat(); 1273 displayAllFlat();
1268 resetCurrentItem(); 1274 resetCurrentItem();
1269} 1275}
1270 1276
1271void KOTodoView::purgeCompleted() 1277void KOTodoView::purgeCompleted()
1272{ 1278{
1273 emit purgeCompletedSignal(); 1279 emit purgeCompletedSignal();
1280
1274} 1281}
1275void KOTodoView::toggleQuickTodo() 1282void KOTodoView::toggleQuickTodo()
1276{ 1283{
1277 if ( mQuickAdd->isVisible() ) { 1284 if ( mQuickAdd->isVisible() ) {
1278 mQuickAdd->hide(); 1285 mQuickAdd->hide();
1279 KOPrefs::instance()->mEnableQuickTodo = false; 1286 KOPrefs::instance()->mEnableQuickTodo = false;
1280 } 1287 }
1281 else { 1288 else {