summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2018-05-23 17:44:43 +0200
committerraveit65 <[email protected]>2018-05-23 22:07:48 +0200
commit28de7bc506b57fffe81c75d77974789d528af4a3 (patch)
tree6b6ace37983b9f811bc8334e326ab0b525577f82
parent8b793f42781b1cfbce45834e22ca914c08a6eddf (diff)
downloadpluma-28de7bc506b57fffe81c75d77974789d528af4a3.tar.bz2
pluma-28de7bc506b57fffe81c75d77974789d528af4a3.tar.xz
pluma-window: use gtk_menu_popup_at_widget for GtkNotebook
-rw-r--r--pluma/pluma-window.c30
1 files changed, 12 insertions, 18 deletions
diff --git a/pluma/pluma-window.c b/pluma/pluma-window.c
index 7363442c..261c09c6 100644
--- a/pluma/pluma-window.c
+++ b/pluma/pluma-window.c
@@ -3440,28 +3440,22 @@ show_notebook_popup_menu (GtkNotebook *notebook,
g_return_val_if_fail (action != NULL, FALSE);
gtk_action_activate (action);
#endif
- if (event != NULL)
- {
- gtk_menu_popup_at_pointer (GTK_MENU (menu), NULL);
- }
- else
- {
- GtkWidget *tab;
- GtkWidget *tab_label;
- tab = GTK_WIDGET (pluma_window_get_active_tab (window));
- g_return_val_if_fail (tab != NULL, FALSE);
+ GtkWidget *tab;
+ GtkWidget *tab_label;
+
+ tab = GTK_WIDGET (pluma_window_get_active_tab (window));
+ g_return_val_if_fail (tab != NULL, FALSE);
- tab_label = gtk_notebook_get_tab_label (notebook, tab);
+ tab_label = gtk_notebook_get_tab_label (notebook, tab);
- gtk_menu_popup_at_widget (GTK_MENU (menu),
- tab_label,
- GDK_GRAVITY_SOUTH_WEST,
- GDK_GRAVITY_NORTH_WEST,
- (const GdkEvent*) event);
+ gtk_menu_popup_at_widget (GTK_MENU (menu),
+ tab_label,
+ GDK_GRAVITY_SOUTH_WEST,
+ GDK_GRAVITY_NORTH_WEST,
+ (const GdkEvent*) event);
- gtk_menu_shell_select_first (GTK_MENU_SHELL (menu), FALSE);
- }
+ gtk_menu_shell_select_first (GTK_MENU_SHELL (menu), FALSE);
return TRUE;
}