[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/kate/part
From: Christoph Cullmann <crossfire () babylon2k ! de>
Date: 2004-08-24 13:23:37
Message-ID: 20040824132337.161EF26E8 () office ! kde ! org
[Download RAW message or body]
CVS commit by cullmann:
implement contextMenu event
M +14 -12 kateviewinternal.cpp 1.306
M +2 -0 kateviewinternal.h 1.102
--- kdelibs/kate/part/kateviewinternal.cpp #1.305:1.306
@@ -2521,4 +2521,18 @@ void KateViewInternal::keyReleaseEvent(
}
+void KateViewInternal::contextMenuEvent ( QContextMenuEvent * e )
+{
+ // try to show popup menu
+
+ if ( ! isTargetSelected( e->pos() ) )
+ placeCursor( e->pos() );
+
+ // popup is a qguardedptr now
+ if (m_view->popup())
+ m_view->popup()->popup( mapToGlobal( e->pos() ) );
+
+ e->accept ();
+}
+
void KateViewInternal::mousePressEvent( QMouseEvent* e )
{
@@ -2583,16 +2597,4 @@ void KateViewInternal::mousePressEvent(
break;
- // try to show popup menu
- case RightButton:
- if ( ! isTargetSelected( e->pos() ) )
- placeCursor( e->pos() );
-
- // popup is a qguardedptr now
- if (m_view->popup())
- m_view->popup()->popup( mapToGlobal( e->pos() ) );
-
- e->accept ();
- break;
-
default:
e->ignore ();
--- kdelibs/kate/part/kateviewinternal.h #1.101:1.102
@@ -227,4 +227,6 @@ class KateViewInternal : public QWidget
void focusOutEvent (QFocusEvent *);
+ void contextMenuEvent ( QContextMenuEvent * e );
+
void imStartEvent( QIMEvent *e );
void imComposeEvent( QIMEvent *e );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic