[epiphany] Make Ctrl-rightclick always display the browser keyboard
- From: Gustavo Noronha Silva <gns src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [epiphany] Make Ctrl-rightclick always display the browser keyboard
- Date: Fri, 18 Dec 2009 10:44:47 +0000 (UTC)
commit b46e4176e430872a3d47d0b41d0694a2ea121c5e
Author: Gustavo Noronha Silva <gns gnome org>
Date: Fri Dec 18 11:38:29 2009 +0100
Make Ctrl-rightclick always display the browser keyboard
embed/ephy-web-view.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 47960a2..4871fc9 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -513,6 +513,16 @@ ephy_web_view_key_press_event (GtkWidget *widget, GdkEventKey *event)
return key_handled;
}
+static gboolean
+ephy_web_view_button_press_event (GtkWidget *widget, GdkEventButton *event)
+{
+ /* We always show the browser context menu on control-rightclick */
+ if (event->button == 3 && event->state & GDK_CONTROL_MASK)
+ return FALSE;
+
+ return GTK_WIDGET_CLASS (ephy_web_view_parent_class)->button_press_event (widget, event);
+}
+
static void
ephy_web_view_dispose (GObject *object)
{
@@ -1312,6 +1322,7 @@ ephy_web_view_class_init (EphyWebViewClass *klass)
gobject_class->get_property = ephy_web_view_get_property;
gobject_class->set_property = ephy_web_view_set_property;
+ widget_class->button_press_event = ephy_web_view_button_press_event;
widget_class->key_press_event = ephy_web_view_key_press_event;
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]