aboutsummaryrefslogtreecommitdiff
path: root/src/idoremovablemenuitem.c
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-08-07 08:38:02 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-08-07 08:38:02 +0200
commitb1998c6ab583d5129ef0e10eb9b6c99ff0b89631 (patch)
tree89f3201214321fbc0384562f70164f2f057d0711 /src/idoremovablemenuitem.c
parent09c5052d290d76faadc997a6aefe49a398959463 (diff)
parente487b162ba82a1a454657a8ab5dbd6d04a17b591 (diff)
downloadayatana-ido-b1998c6ab583d5129ef0e10eb9b6c99ff0b89631.tar.gz
ayatana-ido-b1998c6ab583d5129ef0e10eb9b6c99ff0b89631.tar.bz2
ayatana-ido-b1998c6ab583d5129ef0e10eb9b6c99ff0b89631.zip
Merge branch 'tari01-pr/no-hardcoded-icon-sizes'
Attributes GH PR #66: https://github.com/AyatanaIndicators/ayatana-ido/pull/66
Diffstat (limited to 'src/idoremovablemenuitem.c')
-rw-r--r--src/idoremovablemenuitem.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/src/idoremovablemenuitem.c b/src/idoremovablemenuitem.c
index 946ffb3..d857fd4 100644
--- a/src/idoremovablemenuitem.c
+++ b/src/idoremovablemenuitem.c
@@ -1,8 +1,10 @@
/*
* Copyright 2013 Canonical Ltd.
+ * Copyright 2023 Robert Tari
*
* Authors:
* Charles Kerr <charles.kerr@canonical.com>
+ * Robert Tari <robert@tari.in>
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 3, as published
@@ -131,23 +133,8 @@ static void idoRemovableMenuItemStyleUpdateImage(IdoRemovableMenuItem *self)
}
else
{
- GtkIconInfo *pInfo;
- const gchar *sFilename;
-
- pInfo = gtk_icon_theme_lookup_by_gicon(gtk_icon_theme_get_default(), pPrivate->pIcon, 16, 0);
- sFilename = gtk_icon_info_get_filename(pInfo);
-
- if (sFilename)
- {
- GdkPixbuf *pPixbuf;
-
- pPixbuf = gdk_pixbuf_new_from_file_at_scale(sFilename, -1, 16, TRUE, NULL);
- gtk_image_set_from_pixbuf(GTK_IMAGE(pPrivate->pImage), pPixbuf);
- g_object_unref (pPixbuf);
- }
-
- gtk_widget_set_visible(pPrivate->pImage, sFilename != NULL);
- g_object_unref(pInfo);
+ gtk_image_set_from_gicon (GTK_IMAGE (pPrivate->pImage), pPrivate->pIcon, GTK_ICON_SIZE_MENU);
+ gtk_widget_set_visible (pPrivate->pImage, TRUE);
}
}