[Xfce4-commits] [xfce/xfdesktop] 01/01: Restore icons of custom actions
noreply at xfce.org
noreply at xfce.org
Sun Sep 23 05:40:04 CEST 2018
This is an automated email from the git hooks/post-receive script.
a n d r e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository xfce/xfdesktop.
commit f0bd8162dfffa568d73846da8c27b785c40ee70c
Author: Andre Miranda <andreldm at xfce.org>
Date: Sun Sep 23 00:39:54 2018 -0300
Restore icons of custom actions
---
src/xfdesktop-file-icon-manager.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/xfdesktop-file-icon-manager.c b/src/xfdesktop-file-icon-manager.c
index 24a405c..2794134 100644
--- a/src/xfdesktop-file-icon-manager.c
+++ b/src/xfdesktop-file-icon-manager.c
@@ -1281,17 +1281,21 @@ thunarx_action_callback (GtkAction *action,
static GtkWidget*
xfdesktop_menu_create_menu_item_from_thunarx_menu_item (GObject *item)
{
- gchar *label, *icon_name;
- GtkWidget *mi, *img;
+ gchar *label, *icon_str;
+ GtkWidget *mi, *img = NULL;
g_return_val_if_fail (THUNARX_IS_MENU_ITEM (item), NULL);
g_object_get (G_OBJECT (item),
"label", &label,
- "icon", &icon_name,
+ "icon", &icon_str,
NULL);
- img = gtk_image_new_from_icon_name(icon_name, GTK_ICON_SIZE_MENU);
+ if (icon_str != NULL) {
+ GIcon *icon = g_icon_new_for_string (icon_str, NULL);
+ img = gtk_image_new_from_gicon (icon, GTK_ICON_SIZE_MENU);
+ }
+
mi = xfdesktop_menu_create_menu_item_with_mnemonic (label, img);
g_signal_connect_data (mi, "activate",
@@ -1300,7 +1304,7 @@ xfdesktop_menu_create_menu_item_from_thunarx_menu_item (GObject *item)
(GClosureNotify) g_object_unref, 0);
g_free (label);
- g_free (icon_name);
+ g_free (icon_str);
return mi;
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list