summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-05-24 19:56:05 (UTC)
committer zautrix <zautrix>2005-05-24 19:56:05 (UTC)
commitbebdc6ca63f4bcbfb735c3d75710ca53959ef48f (patch) (unidiff)
treeed755ca04104d571799e91a31443fe94bbf00fdd
parentb441ef64338079e3e29c07d8884a02588050a54a (diff)
downloadkdepimpi-bebdc6ca63f4bcbfb735c3d75710ca53959ef48f.zip
kdepimpi-bebdc6ca63f4bcbfb735c3d75710ca53959ef48f.tar.gz
kdepimpi-bebdc6ca63f4bcbfb735c3d75710ca53959ef48f.tar.bz2
menu fix
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koagenda.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index 355f4bb..99009a5 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -381,7 +381,7 @@ bool KOAgenda::eventFilter ( QObject *object, QEvent *event )
381void KOAgenda::popupMenu() 381void KOAgenda::popupMenu()
382{ 382{
383 mPopupTimer->stop(); 383 mPopupTimer->stop();
384 if ( mPopupKind == 1 ) { 384 if ( mPopupKind == 1 || mPopupKind == 3 ) {
385 if (mActionItem ) { 385 if (mActionItem ) {
386 endItemAction(); 386 endItemAction();
387 } 387 }
@@ -389,17 +389,17 @@ void KOAgenda::popupMenu()
389 if (mPopupItem) { 389 if (mPopupItem) {
390 //mClickedItem = mPopupItem; 390 //mClickedItem = mPopupItem;
391 selectItem(mPopupItem); 391 selectItem(mPopupItem);
392 if ( mAllAgendaPopup && KOPrefs::instance()->mBlockPopupMenu ) 392 if ( mAllAgendaPopup && KOPrefs::instance()->mBlockPopupMenu && mPopupKind == 1 )
393 mAllAgendaPopup->installEventFilter( this ); 393 mAllAgendaPopup->installEventFilter( this );
394 emit showIncidencePopupSignal(mPopupItem->incidence()); 394 emit showIncidencePopupSignal(mPopupItem->incidence());
395 395
396 } 396 }
397 } else if ( mPopupKind == 2 ) { 397 } else if ( mPopupKind == 2 || mPopupKind == 4 ) {
398 if ( mLeftMouseDown ) { // we have a simulated right click - clear left mouse action 398 if ( mLeftMouseDown ) { // we have a simulated right click - clear left mouse action
399 endSelectAction( false ); // do not emit new event signal 399 endSelectAction( false ); // do not emit new event signal
400 mLeftMouseDown = false; // no more leftMouse computation 400 mLeftMouseDown = false; // no more leftMouse computation
401 } 401 }
402 if ( KOPrefs::instance()->mBlockPopupMenu ) 402 if ( KOPrefs::instance()->mBlockPopupMenu && mPopupKind == 2 )
403 mNewItemPopup->installEventFilter( this ); 403 mNewItemPopup->installEventFilter( this );
404 mNewItemPopup->popup( mPopupPos); 404 mNewItemPopup->popup( mPopupPos);
405 405
@@ -470,6 +470,7 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
470 mPopupItem = (KOAgendaItem *)object; 470 mPopupItem = (KOAgendaItem *)object;
471 mPopupKind = 1; 471 mPopupKind = 1;
472 if (me->button() == RightButton) { 472 if (me->button() == RightButton) {
473 mPopupKind = 3;
473 popupMenu(); 474 popupMenu();
474 } else if (me->button() == LeftButton) { 475 } else if (me->button() == LeftButton) {
475 mActionItem = (KOAgendaItem *)object; 476 mActionItem = (KOAgendaItem *)object;
@@ -499,6 +500,7 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
499 mCurrentCellY = gy; 500 mCurrentCellY = gy;
500 mStartCellX = gx; 501 mStartCellX = gx;
501 mStartCellY = gy; 502 mStartCellY = gy;
503 mPopupKind = 4;
502 popupMenu(); 504 popupMenu();
503 } else if (me->button() == LeftButton) { 505 } else if (me->button() == LeftButton) {
504 setCursor(arrowCursor); 506 setCursor(arrowCursor);