Skip to content
Permalink
Browse files

pluma-window: use gtk_menu_popup_at_widget for GtkNotebook

  • Loading branch information...
raveit65 committed May 23, 2018
1 parent 8b793f4 commit 28de7bc506b57fffe81c75d77974789d528af4a3
Showing with 12 additions and 18 deletions.
  1. +12 −18 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;
}

0 comments on commit 28de7bc

Please sign in to comment.
You can’t perform that action at this time.