[Xfce4-commits] <xfdesktop:xfce-4.8> Support absolute icon paths in desktop files (bug #7160).
Jannis Pohlmann
noreply at xfce.org
Tue Jan 25 02:40:02 CET 2011
Updating branch refs/heads/xfce-4.8
to 928c28551b8dba8c8cc432dcf9552ca982390acb (commit)
from d735a57d12de89c045d1e9dff32296502626c406 (commit)
commit 928c28551b8dba8c8cc432dcf9552ca982390acb
Author: Jannis Pohlmann <jannis at xfce.org>
Date: Tue Jan 25 02:37:08 2011 +0100
Support absolute icon paths in desktop files (bug #7160).
The patch was provided by xaizek at gmail.com.
NEWS | 2 ++
src/xfdesktop-file-utils.c | 2 ++
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/NEWS b/NEWS
index f509dea..a55124f 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,8 @@ Xfdesktop 4.x.y
---------------
* Use Name field as display name of desktop files (bug #6896).
+ * Support absolute icon paths in desktop files (bug #7160).
+ Patch by xaizek at gmail.com.
Xfdesktop 4.8.0
diff --git a/src/xfdesktop-file-utils.c b/src/xfdesktop-file-utils.c
index b3a3486..c3c3e3b 100644
--- a/src/xfdesktop-file-utils.c
+++ b/src/xfdesktop-file-utils.c
@@ -499,6 +499,8 @@ xfdesktop_file_utils_get_icon(const gchar *custom_icon_name,
if(custom_icon_name) {
pix_theme = gtk_icon_theme_load_icon(itheme, custom_icon_name, size,
ITHEME_FLAGS, NULL);
+ if(!pix_theme && *custom_icon_name == '/' && g_file_test(custom_icon_name, G_FILE_TEST_IS_REGULAR))
+ pix_theme = gdk_pixbuf_new_from_file_at_size(custom_icon_name, size, size, NULL);
}
if(!pix_theme && icon) {
More information about the Xfce4-commits
mailing list