! 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 launchers ignore unthemed icons
Status:
RESOLVED: FIXED
Product:
Xfdesktop
Component:
General

Comments

Description vpooldyn-subscription 2019-04-16 15:27:56 CEST
Overview
    
    Up to xfdesktop 4.12, icons placed directly under /usr/share/icons were used to paint icons on the desktop.
    Now, all icons placed directly there and not under a theme or "hicolor" are ignored, but only on the desktop: they still appear in menus.
    The same happens if the icon is placed directly under $HOME/.icons, as opposed to i.e. $HOME/.icons/hicolor/48x48/apps.

Steps to Reproduce

    1) Place an icon under /usr/share/icons (i.e. /usr/share/icons/testicon.png).
    2) Create a .desktop entry on the desktop and make it reference the new icon by name (i.e. Icon=testicon)

Actual Results

    The new launcher shows the default launcher icon rather than the chosen one

Expected Results

    The launcher should use the selected icon

Other info

   The system is Arch Linux x86-64, fully updated. Using official distro-provided XFCE packages.

    Output of "LANG=C xfdesktop --version"

    This is xfdesktop version 4.13.3, running on Xfce 4.12.
    Built with GTK+ 3.24.7, linked with GTK+ 3.24.8.
    Build options:
        Desktop Menu:        enabled
        Desktop Icons:       enabled
        Desktop File Icons:  enabled
Comment 1 Theo Linkspfeifer editbugs 2019-04-17 16:23:14 CEST
https://git.xfce.org/xfce/xfdesktop/tree/src/xfdesktop-regular-file-icon.c#n408

Removing the gtk_icon_theme_has_icon() check allowed xfdesktop to load my test icon from /usr/share/icons. Maybe gtk_icon_theme_lookup_icon() could be used instead (see thunar-icon-factory.c).
Comment 2 Theo Linkspfeifer editbugs 2019-04-19 13:05:22 CEST
*** Bug 12523 has been marked as a duplicate of this bug. ***
Comment 3 Andre Miranda editbugs 2019-05-14 06:51:44 CEST
(In reply to Theo Linkspfeifer from comment #1)
> Removing the gtk_icon_theme_has_icon() check allowed xfdesktop to load my
> test icon from /usr/share/icons. Maybe gtk_icon_theme_lookup_icon() could be
> used instead (see thunar-icon-factory.c).

Patch, please, please?
Comment 4 Theo Linkspfeifer editbugs 2019-05-19 23:11:04 CEST
Created attachment 8546 
patch
Comment 5 Theo Linkspfeifer editbugs 2019-05-19 23:23:47 CEST
Created attachment 8547 
patch
Comment 6 Andre Miranda editbugs 2019-05-21 03:03:10 CEST
Created attachment 8557 
Screenshot

The patch works, but when the icon doesn't exists xfdesktop now draws a strange icon, I don't know its name but seems to be from gnome or Adwaita themes. Thunar also doesn't load the icon for this scenario, but fallbacks to a icon (which I don't know its name) that seems to be part of theme. So it fixes one problem but creates another :/

P.S. I took me a while to understand that the second patch is just a follow up of the first, which you marked as obsolete.
Comment 7 Theo Linkspfeifer editbugs 2019-05-21 22:11:09 CEST
Created attachment 8567 
diff

New try.

Note: the pixmaps block is needed for finding icons in subfolders and for bigger icon scaling. Without it the behavior would be like in Thunar (smaller scaling, no subfolder icons).

Examples:
/usr/share/pixmaps/xfce-logo-white.svg
/usr/share/pixmaps/pidgin/logo.png
Comment 8 Andre Miranda editbugs 2019-06-18 00:16:28 CEST
(In reply to Theo Linkspfeifer from comment #7)
> Created attachment 8567 
> diff
> 
> New try.

It didn't work for, I tried to put icons in both /usr/share/icons and /usr/share/pixmaps.
The previous patch still works.
Comment 9 Git Bot editbugs 2019-06-22 13:25:47 CEST
Theo Linkspfeifer referenced this bugreport in commit 5efb05e084a6ce2d24e84b27c05fa0bf40c662fb

Allow to load non-theme icons (Bug #15294)

https://git.xfce.org/xfce/xfdesktop/commit?id=5efb05e084a6ce2d24e84b27c05fa0bf40c662fb
Comment 10 Andre Miranda editbugs 2019-06-22 13:26:45 CEST
Corrected patch merged, thanks!

Bug #15294

Reported by:
vpooldyn-subscription
Reported on: 2019-04-16
Last modified on: 2019-06-22
Duplicates (1):
  • 12523 desktop icons are not used if located in $XDG_DATA_DIRS/icons

People

Assignee:
Xfce Bug Triage
CC List:
3 users

Version

Version:
4.13.3

Attachments

patch (1.45 KB, patch)
2019-05-19 23:11 CEST , Theo Linkspfeifer
no flags
patch (1.77 KB, patch)
2019-05-19 23:23 CEST , Theo Linkspfeifer
no flags
Screenshot (38.92 KB, image/png)
2019-05-21 03:03 CEST , Andre Miranda
no flags
diff (3.21 KB, patch)
2019-05-21 22:11 CEST , Theo Linkspfeifer
no flags

Additional information