Bug 91560 - right click on a todo's check box, checks it
Summary: right click on a todo's check box, checks it
Status: RESOLVED FIXED
Alias: None
Product: korganizer
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-17 23:16 UTC by Kevin Goeser
Modified: 2008-05-09 12:01 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Goeser 2004-10-17 23:16:47 UTC
Version:            (using KDE KDE 3.3.0)
Installed from:    Gentoo Packages
OS:                Linux

this is somehow confusing: if you do a rightclick on a todo and accidentally hit the checkbox, the checkbox gets checked.
Comment 1 Allen Winter 2005-01-07 03:16:12 UTC
CVS commit by winterz: 

FIX for Bug 91560: right click on a todo's check box, checks it.

My solution is to popup the context menu only if the cursor is to
the right of the to-do's checkbox.  A right, middle, or left-click
will still check/uncheck the box.


BUG: 91560-done@bugs.kde.org


  M +22 -7     kotodoview.cpp   1.192


--- kdepim/korganizer/kotodoview.cpp  #1.191:1.192
@@ -784,4 +784,18 @@ void KOTodoView::popupMenu( QListViewIte
           break;
         default:
+          int left =  mTodoListView->header()
+                      ->sectionPos( mTodoListView->header()->mapToIndex( 0 ) );
+          int width =  mTodoListView->treeStepSize()
+                       * ( mActiveItem->depth()
+                           + ( mTodoListView->rootIsDecorated() ? 1 : 0) )
+                       + mTodoListView->itemMargin();
+          left += width; // left side of checkbox
+          int cbi_width = 20; // FIXME: compute actual size of CheckBoxIndicator (use QStyle?)
+          int right = left + cbi_width; // right side of checkbox
+
+          QPoint wp = QWidget::mapFromGlobal( QCursor::pos() );
+
+          if ( wp.x() > right ) {
+            // Popup menu ONLY if the mouse position is right of the checkbox.
           mCopyPopupMenu->datePicker()->setDate( date );
           mCopyPopupMenu->datePicker()->setDate( QDate::currentDate() );
@@ -792,4 +806,5 @@ void KOTodoView::popupMenu( QListViewIte
           mItemPopupMenu->popup( QCursor::pos() );
       }
+      }
     } else {
       mItemPopupMenu->popup( QCursor::pos() );


Comment 2 Allen Winter 2005-01-07 18:51:43 UTC
The fix I put in was too hackish and has been removed.  I'll have to look at a better way to solve it.

BTW: I also noticed the same problem with the calendar resource selection list.
Comment 3 Reinhold Kainhofer 2006-11-02 18:49:05 UTC
Reassigning all KOrganizer bug reports and wishes to the newly created 
korganizer-devel mailing list.
Comment 4 Reinhold Kainhofer 2006-11-02 19:22:54 UTC
Reassigning the bug also changed the status from UNCONFIRMED to NEW. Undoing that manually :-(
Comment 5 Thomas Thrainer 2008-05-09 12:01:25 UTC
That's apparently working in QTreeView, on which the new todo view relies. I any case, it's no longer checking the todo on right click, but correctly displaying the popup-menu.
The new todo view is in svn trunk for KDE4, and this fix will not be backported.