Message info
 
To:kde-commits@kde.org From:Jekyll Wu Subject:[konsole] src: Support showing the context menu by pressing the "Menu" key Date:Sun, 18 Mar 2012 16:20:46 +0100 (CET)
 

Git commit 33be288c037f1dad20fcbca9caa3b10087772c01 by Jekyll Wu.
Committed on 13/03/2012 at 08:38.
Pushed by jekyllwu into branch 'master'.

Support showing the context menu by pressing the "Menu" key

REVIEW: 104190

M +5 -0 src/TerminalDisplay.cpp
M +2 -0 src/TerminalDisplay.h

http://commits.kde.org/konsole/33be288c037f1dad20fcbca9caa3b10087772c01

diff --git a/src/TerminalDisplay.cpp b/src/TerminalDisplay.cpp
index baf6765..dd83ef9 100644
--- a/src/TerminalDisplay.cpp
+++ b/src/TerminalDisplay.cpp
@@ -2690,6 +2690,11 @@ bool TerminalDisplay::event(QEvent* event)
return eventHandled ? true : QWidget::event(event);
}

+void TerminalDisplay::contextMenuEvent(QContextMenuEvent* )
+{
+ emit configureRequest(mapFromGlobal(QCursor::pos()));
+}
+
/* --------------------------------------------------------------------- */
/* */
/* Bell */
diff --git a/src/TerminalDisplay.h b/src/TerminalDisplay.h
index 35b3a4f..aada004 100644
--- a/src/TerminalDisplay.h
+++ b/src/TerminalDisplay.h
@@ -603,6 +603,8 @@ protected:
virtual void hideEvent(QHideEvent* event);
virtual void resizeEvent(QResizeEvent* event);

+ virtual void contextMenuEvent(QContextMenuEvent* event);
+
virtual void fontChange(const QFont&);
virtual void focusInEvent(QFocusEvent* event);
virtual void focusOutEvent(QFocusEvent* event);