! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Desktop menu doesn't show the icon with fixed path
Status:
RESOLVED: FIXED
Product:
Xfdesktop
Component:
General

Comments

Description Bojan Popovic 2012-04-04 11:47:32 CEST
All other icons seem to be ok, but this particular doesn't show up. I checked on my system and it does exist. 

How to reproduce?
1. Install Gradiator - http://gradient.inatorapp.com/
2. The app will show up in the menu without the icon.

Possible causes:
The app uses fixed path in non-standard directory. This is allowed by Freedesktop standard and works in Xfce 4.6 (probably also in 4.8, bu I am not sure about it). The app uses scalabale SVG icon.

$ grep Icon /usr/share/applications/gradiator.desktop 
Icon=/usr/share/gradiator/media/gradiator.svg

$ ls -l /usr/share/gradiator/media/gradiator.svg      
-rw-r--r-- 1 root root 13011 Jan  1 05:37 /usr/share/gradiator/media/gradiator.svg

The Xfce components are the same versions as released in the 4.10pre1 fat tarball. Xfce distribution is self-built from source.
Comment 1 Eric Koegel editbugs 2012-04-05 10:11:27 CEST
The icon correctly displays for me, there is code to support absolute paths. To test I added a couple dbg messages.

DBG[xfdesktop-app-menu-item.c:185] xfdesktop_app_menu_item_set_icon(): icon name: /usr/share/gradiator/media/gradiator.svg
DBG[xfdesktop-app-menu-item.c:188] xfdesktop_app_menu_item_set_icon(): path_is_absolute

grep Icon /usr/share/applications/gradiator.desktop 
Icon=/usr/share/gradiator/media/gradiator.svg

ls -l /usr/share/gradiator/media/gradiator.svg 
-rw-rw-r-- 1 root root 11846 2012-02-07 01:35 /usr/share/gradiator/media/gradiator.svg

Here's what I added if you want to test further.

--- a/src/xfdesktop-app-menu-item.c
+++ b/src/xfdesktop-app-menu-item.c
@@ -182,7 +182,10 @@ xfdesktop_app_menu_item_set_icon(XfdesktopAppMenuItem *app_menu_item)
         gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, &w, &h);
         size = MIN(w, h);
 
+        DBG("icon name: %s", icon_name);
+
         if (g_path_is_absolute (icon_name)) {
+            DBG("path_is_absolute");
             pixbuf = gdk_pixbuf_new_from_file_at_scale(icon_name, w, h, TRUE, NULL);
         } else {
             icon_theme = gtk_icon_theme_get_default();
Comment 2 Bojan Popovic 2012-04-05 23:47:14 CEST
I tested it some more just to find out i's something related to icon cache. Icon got created, but much later. Sorry. This one seems not to be xfdesktop related.

Bug #8633

Reported by:
Bojan Popovic
Reported on: 2012-04-04
Last modified on: 2012-04-05

People

Assignee:
Eric Koegel
CC List:
3 users

Version

Attachments

Additional information