Updating branch refs/heads/master to 9797cb5493524eaf786e49a665f11cf9869dbe88 (commit) from 7d7ce99052f57600d12b8f077fecf1b1a9ca8e25 (commit)
commit 9797cb5493524eaf786e49a665f11cf9869dbe88 Author: Eric Koegel <eric.koe...@gmail.com> Date: Sun Nov 10 09:21:19 2013 +0300 Fix icons for .desktop files with absolute paths src/xfdesktop-regular-file-icon.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/xfdesktop-regular-file-icon.c b/src/xfdesktop-regular-file-icon.c index b0ca4c7..44c7b75 100644 --- a/src/xfdesktop-regular-file-icon.c +++ b/src/xfdesktop-regular-file-icon.c @@ -261,11 +261,16 @@ xfdesktop_load_icon_from_desktop_file(XfdesktopRegularFileIcon *regular_icon) G_KEY_FILE_DESKTOP_KEY_ICON, NULL); - /* Create the themed icon for it */ - if(icon_name) { + if(icon_name && g_file_test(icon_name, G_FILE_TEST_IS_REGULAR)) { + /* icon_name is an absolute path, create it as a file icon */ + gicon = g_file_icon_new(g_file_new_for_path(icon_name)); + } else if(icon_name) { + /* otherwise create a themed icon for it */ gicon = g_themed_icon_new(icon_name); - g_free(icon_name); } + + if(icon_name) + g_free(icon_name); } /* free key file and in-memory data */ _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits