summaryrefslogtreecommitdiff
path: root/plugins/filebrowser/pluma-file-browser-widget.c
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2018-04-20 01:25:13 +0200
committerPablo Barciela <[email protected]>2018-04-20 01:25:13 +0200
commit7c692bd51aa1b5cf670625936c28fed187184c4c (patch)
treed1ad0e73f5d86136d919f138c8f17af993f7cf71 /plugins/filebrowser/pluma-file-browser-widget.c
parent6ab83502622938048e7cf3b783beb1c618861819 (diff)
downloadpluma-7c692bd51aa1b5cf670625936c28fed187184c4c.tar.bz2
pluma-7c692bd51aa1b5cf670625936c28fed187184c4c.tar.xz
pluma-file-browser-widget.c: avoid deprecated GtkImageMenuItem
avoid deprecated: gtk_image_menu_item_new_with_label gtk_image_menu_item_set_image
Diffstat (limited to 'plugins/filebrowser/pluma-file-browser-widget.c')
-rw-r--r--plugins/filebrowser/pluma-file-browser-widget.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/plugins/filebrowser/pluma-file-browser-widget.c b/plugins/filebrowser/pluma-file-browser-widget.c
index 6187696e..7b5f1245 100644
--- a/plugins/filebrowser/pluma-file-browser-widget.c
+++ b/plugins/filebrowser/pluma-file-browser-widget.c
@@ -984,6 +984,9 @@ create_toolbar (PlumaFileBrowserWidget * obj,
/* Previous directory menu tool item */
obj->priv->location_previous_menu = gtk_menu_new ();
+
+ gtk_menu_set_reserve_toggle_size (GTK_MENU (obj->priv->location_previous_menu), FALSE);
+
gtk_widget_show (obj->priv->location_previous_menu);
widget = GTK_WIDGET (gtk_menu_tool_button_new (gtk_image_new_from_icon_name ("go-previous",
@@ -1007,6 +1010,9 @@ create_toolbar (PlumaFileBrowserWidget * obj,
/* Next directory menu tool item */
obj->priv->location_next_menu = gtk_menu_new ();
+
+ gtk_menu_set_reserve_toggle_size (GTK_MENU (obj->priv->location_next_menu), FALSE);
+
gtk_widget_show (obj->priv->location_next_menu);
widget = GTK_WIDGET (gtk_menu_tool_button_new (gtk_image_new_from_icon_name ("go-next",
@@ -1532,7 +1538,6 @@ create_goto_menu_item (PlumaFileBrowserWidget * obj, GList * item,
GdkPixbuf * icon)
{
GtkWidget *result;
- GtkWidget *image;
gchar *unescape;
GdkPixbuf *pixbuf = NULL;
Location *loc;
@@ -1547,14 +1552,8 @@ create_goto_menu_item (PlumaFileBrowserWidget * obj, GList * item,
}
if (pixbuf) {
- image = gtk_image_new_from_pixbuf (pixbuf);
+ result = pluma_image_menu_item_new_from_pixbuf (pixbuf, unescape);
g_object_unref (pixbuf);
-
- gtk_widget_show (image);
-
- result = gtk_image_menu_item_new_with_label (unescape);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (result),
- image);
} else {
result = gtk_menu_item_new_with_label (unescape);
}