aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-notebook.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-01-06 04:58:45 +0800
committerChristian Persch <chpe@src.gnome.org>2005-01-06 04:58:45 +0800
commit40dafa4179a4349c73c2acce6330970698159767 (patch)
treea7100448433bd0f841a0c0237f6321e9a937b40c /src/ephy-notebook.c
parent4953a4bdb2cb833574b4188f6795e796b4ff9a2d (diff)
downloadgsoc2013-epiphany-40dafa4179a4349c73c2acce6330970698159767.tar.gz
gsoc2013-epiphany-40dafa4179a4349c73c2acce6330970698159767.tar.zst
gsoc2013-epiphany-40dafa4179a4349c73c2acce6330970698159767.zip
Add context menu on notebook. Fixes bug #132989.
2005-01-05 Christian Persch <chpe@cvs.gnome.org> * data/ui/epiphany-ui.xml: * src/ephy-notebook.c: (button_press_cb): * src/ephy-window.c: (show_notebook_popup_menu), (notebook_button_press_cb), (notebook_popup_menu_cb), (setup_notebook): Add context menu on notebook. Fixes bug #132989.
Diffstat (limited to 'src/ephy-notebook.c')
-rw-r--r--src/ephy-notebook.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c
index 893880f13..48d8856ef 100644
--- a/src/ephy-notebook.c
+++ b/src/ephy-notebook.c
@@ -549,6 +549,21 @@ button_press_cb (EphyNotebook *notebook,
"motion-notify-event",
G_CALLBACK (motion_notify_cb), NULL);
}
+ else if (GDK_BUTTON_PRESS == event->type && 3 == event->button)
+ {
+ if (tab_clicked == -1)
+ {
+ /* consume event, so that we don't pop up the context menu when
+ * the mouse if not over a tab label
+ */
+ return TRUE;
+ }
+ else
+ {
+ /* switch to the page the mouse is over, but don't consume the event */
+ gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), tab_clicked);
+ }
+ }
return FALSE;
}