Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
caja-navigation-window-pane.c: avoid deprecated GtkImageMenuItem
avoid deprecated:

gtk_image_menu_item_new_with_mnemonic
gtk_image_menu_item_set_image
  • Loading branch information
sc0w authored and lukefromdc committed Apr 1, 2018
1 parent 9b6b0dc commit ffb953f
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/caja-navigation-window-pane.c
Expand Up @@ -30,6 +30,8 @@
#include "caja-notebook.h"
#include "caja-window-slot.h"

#include <eel/eel-gtk-extensions.h>

#include <libcaja-private/caja-global-preferences.h>
#include <libcaja-private/caja-window-slot-info.h>
#include <libcaja-private/caja-view-factory.h>
Expand Down Expand Up @@ -439,7 +441,6 @@ notebook_popup_menu_show (CajaNavigationWindowPane *pane,
{
GtkWidget *popup;
GtkWidget *item;
GtkWidget *image;
int button, event_time;
gboolean can_move_left, can_move_right;
CajaNotebook *notebook;
Expand All @@ -451,7 +452,9 @@ notebook_popup_menu_show (CajaNavigationWindowPane *pane,

popup = gtk_menu_new();

item = gtk_menu_item_new_with_mnemonic (_("_New Tab"));
gtk_menu_set_reserve_toggle_size (GTK_MENU (popup), FALSE);

item = eel_image_menu_item_new_from_icon (NULL, _("_New Tab"));
g_signal_connect (item, "activate",
G_CALLBACK (notebook_popup_menu_new_tab_cb),
pane);
Expand All @@ -461,15 +464,15 @@ notebook_popup_menu_show (CajaNavigationWindowPane *pane,
gtk_menu_shell_append (GTK_MENU_SHELL (popup),
gtk_separator_menu_item_new ());

item = gtk_menu_item_new_with_mnemonic (_("Move Tab _Left"));
item = eel_image_menu_item_new_from_icon (NULL, _("Move Tab _Left"));
g_signal_connect (item, "activate",
G_CALLBACK (notebook_popup_menu_move_left_cb),
pane);
gtk_menu_shell_append (GTK_MENU_SHELL (popup),
item);
gtk_widget_set_sensitive (item, can_move_left);

item = gtk_menu_item_new_with_mnemonic (_("Move Tab _Right"));
item = eel_image_menu_item_new_from_icon (NULL, _("Move Tab _Right"));
g_signal_connect (item, "activate",
G_CALLBACK (notebook_popup_menu_move_right_cb),
pane);
Expand All @@ -480,9 +483,8 @@ notebook_popup_menu_show (CajaNavigationWindowPane *pane,
gtk_menu_shell_append (GTK_MENU_SHELL (popup),
gtk_separator_menu_item_new ());

item = gtk_image_menu_item_new_with_mnemonic (_("_Close Tab"));
image = gtk_image_new_from_icon_name ("window-close", GTK_ICON_SIZE_MENU);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
item = eel_image_menu_item_new_from_icon ("window-close", _("_Close Tab"));

g_signal_connect (item, "activate",
G_CALLBACK (notebook_popup_menu_close_cb), pane);
gtk_menu_shell_append (GTK_MENU_SHELL (popup),
Expand Down

0 comments on commit ffb953f

Please sign in to comment.