| Summary: | right click on a todo's check box, checks it | ||
|---|---|---|---|
| Product: | [Applications] korganizer | Reporter: | Kevin Goeser <kevin> |
| Component: | general | Assignee: | kdepim bugs <pim-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Gentoo Packages | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Kevin Goeser
2004-10-17 23:16:47 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() ); 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. Reassigning all KOrganizer bug reports and wishes to the newly created korganizer-devel mailing list. Reassigning the bug also changed the status from UNCONFIRMED to NEW. Undoing that manually :-( 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. |