Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
pluma-window: use gtk_menu_popup_at_widget for GtkNotebook
  • Loading branch information
raveit65 committed May 23, 2018
1 parent 8b793f4 commit 28de7bc
Showing 1 changed file with 12 additions and 18 deletions.
30 changes: 12 additions & 18 deletions pluma/pluma-window.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 28de7bc

Please sign in to comment.