summaryrefslogtreecommitdiff
path: root/baobab
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2023-10-18 00:03:07 +0200
committerraveit65 <[email protected]>2023-10-22 10:33:20 +0200
commitac8612ca04a798a084630530205ec8bf28a61c07 (patch)
tree96b2471b6c007b12a1b771df98e9f6b73761066f /baobab
parentf1d486c32b3221cb8f03dec67b31098528138095 (diff)
downloadmate-utils-ac8612ca04a798a084630530205ec8bf28a61c07.tar.bz2
mate-utils-ac8612ca04a798a084630530205ec8bf28a61c07.tar.xz
replace deprecated gtk_image_menu_item*
Diffstat (limited to 'baobab')
-rw-r--r--baobab/src/Makefile.am2
-rw-r--r--baobab/src/baobab-utils.c6
-rw-r--r--baobab/src/baobab.c18
3 files changed, 16 insertions, 10 deletions
diff --git a/baobab/src/Makefile.am b/baobab/src/Makefile.am
index aa50eaa0..e6e34268 100644
--- a/baobab/src/Makefile.am
+++ b/baobab/src/Makefile.am
@@ -62,6 +62,7 @@ mate_disk_usage_analyzer_CFLAGS = \
$(GIO_CFLAGS) \
$(GTK_CFLAGS) \
$(LIBGTOP_CFLAGS) \
+ $(MATE_DESKTOP_CFLAGS) \
$(WARN_CFLAGS) \
$(NULL)
@@ -72,6 +73,7 @@ mate_disk_usage_analyzer_LDADD = \
$(GIO_LIBS) \
$(GTK_LIBS) \
$(LIBGTOP_LIBS) \
+ $(MATE_DESKTOP_LIBS) \
$(NULL)
CLEANFILES = $(BUILT_SOURCES)
diff --git a/baobab/src/baobab-utils.c b/baobab/src/baobab-utils.c
index d7c03e48..43efd3fb 100644
--- a/baobab/src/baobab-utils.c
+++ b/baobab/src/baobab-utils.c
@@ -33,6 +33,8 @@
#include <glibtop/mountlist.h>
#include <glibtop/fsusage.h>
+#include <libmate-desktop/mate-image-menu-item.h>
+
#include "baobab.h"
#include "baobab-treeview.h"
#include "baobab-utils.h"
@@ -323,9 +325,9 @@ add_popupmenu_item (GtkMenu *pmenu, const gchar *label, const gchar *icon_name,
GtkWidget *item;
GtkWidget *image;
- item = gtk_image_menu_item_new_with_mnemonic (label);
+ item = mate_image_menu_item_new_with_mnemonic (label);
image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
+ mate_image_menu_item_set_image (MATE_IMAGE_MENU_ITEM (item), image);
g_signal_connect (item, "activate", item_cb, NULL);
diff --git a/baobab/src/baobab.c b/baobab/src/baobab.c
index 6de2887a..380f5407 100644
--- a/baobab/src/baobab.c
+++ b/baobab/src/baobab.c
@@ -26,6 +26,8 @@
#include <gio/gio.h>
#include <glibtop.h>
+#include <libmate-desktop/mate-image-menu-item.h>
+
#include "baobab.h"
#include "baobab-scan.h"
#include "baobab-treeview.h"
@@ -910,20 +912,20 @@ create_context_menu (void)
menu->widget = gtk_menu_new ();
- menu->up_item = gtk_image_menu_item_new_with_label (_("Move to parent folder"));
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu->up_item),
+ menu->up_item = mate_image_menu_item_new_with_label (_("Move to parent folder"));
+ mate_image_menu_item_set_image (MATE_IMAGE_MENU_ITEM (menu->up_item),
gtk_image_new_from_icon_name("go-up", GTK_ICON_SIZE_MENU));
- menu->zoom_in_item = gtk_image_menu_item_new_with_label (_("Zoom in")) ;
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu->zoom_in_item),
+ menu->zoom_in_item = mate_image_menu_item_new_with_label (_("Zoom in")) ;
+ mate_image_menu_item_set_image (MATE_IMAGE_MENU_ITEM (menu->zoom_in_item),
gtk_image_new_from_icon_name("list-add", GTK_ICON_SIZE_MENU));
- menu->zoom_out_item = gtk_image_menu_item_new_with_label (_("Zoom out"));
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu->zoom_out_item),
+ menu->zoom_out_item = mate_image_menu_item_new_with_label (_("Zoom out"));
+ mate_image_menu_item_set_image (MATE_IMAGE_MENU_ITEM (menu->zoom_out_item),
gtk_image_new_from_icon_name("list-remove", GTK_ICON_SIZE_MENU));
- menu->snapshot_item = gtk_image_menu_item_new_with_label (_("Save screenshot"));
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu->snapshot_item),
+ menu->snapshot_item = mate_image_menu_item_new_with_label (_("Save screenshot"));
+ mate_image_menu_item_set_image (MATE_IMAGE_MENU_ITEM (menu->snapshot_item),
gtk_image_new_from_icon_name ("applets-screenshooter", GTK_ICON_SIZE_MENU));
gtk_menu_shell_append (GTK_MENU_SHELL (menu->widget),