aboutsummaryrefslogtreecommitdiff
path: root/src/idobasicmenuitem.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/idobasicmenuitem.c')
-rw-r--r--src/idobasicmenuitem.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/src/idobasicmenuitem.c b/src/idobasicmenuitem.c
index 5077546..5106144 100644
--- a/src/idobasicmenuitem.c
+++ b/src/idobasicmenuitem.c
@@ -1,6 +1,6 @@
/*
* Copyright 2013 Canonical Ltd.
- * Copyright 2021-2022 Robert Tari
+ * Copyright 2021-2023 Robert Tari
*
* Authors:
* Charles Kerr <charles.kerr@canonical.com>
@@ -163,25 +163,8 @@ ido_basic_menu_item_update_image (IdoBasicMenuItem *self)
}
else if (p->icon)
{
- GtkIconInfo *info;
- const gchar *filename;
-
- info = gtk_icon_theme_lookup_by_gicon (gtk_icon_theme_get_default (), p->icon, 16, 0);
- filename = gtk_icon_info_get_filename (info);
-
- if (filename)
- {
- GdkPixbuf *pixbuf;
-
- pixbuf = gdk_pixbuf_new_from_file_at_scale (filename, -1, 16, TRUE, NULL);
- gtk_image_set_from_pixbuf (GTK_IMAGE (p->image), pixbuf);
-
- g_object_unref (pixbuf);
- }
-
- gtk_widget_set_visible (p->image, filename != NULL);
-
- g_object_unref (info);
+ gtk_image_set_from_gicon (GTK_IMAGE (p->image), p->icon, GTK_ICON_SIZE_MENU);
+ gtk_widget_set_visible (p->image, TRUE);
}
}
}