Created attachment 7968 this is the right mouse click panel when on thunar Version : 1.8.1git-f5147445 Os : Arch Linux / ArcoLinux Only the custom actions icons will not display when clicking right mouse click on a thunar window. Downgrading to 1.6.15-1 will make the custom actions display again. It is not related to an icon theme. None of the icon themes will display an icon in version 1.8.1. Again - just for the custom actions.
Same issue. Downgrading glib2 to 2.56.2 also fixes this issue, perhaps thunar has to accommodate whatever changes were made in glib2 though.
A fix for glib is being worked on here: https://gitlab.gnome.org/GNOME/glib/issues/1513 I have tested the proposed patch there and it fixes this issue. Once committed, it'll be added to Arch's glib2 package.
(In reply to Evangelos Foutras from comment #2) > A fix for glib is being worked on here: > https://gitlab.gnome.org/GNOME/glib/issues/1513 > > I have tested the proposed patch there and it fixes this issue. Once > committed, it'll be added to Arch's glib2 package. I'll try it in a bit and report my findings. Thanks for the info!
Created attachment 7971 thunar fixed after downgrading
When downgrading glib to 2.56.2-1 then the icons will show up again. https://arcolinuxforum.com/viewtopic.php?f=80&t=816&p=3117&sid=79872256a4383a2926cd4dea45b298bc#p3117
Icon names are retrieved with exo_icon_chooser_dialog_get_icon which states that "the selected icon can be either a named icon (from the active icon theme) or the absolute path to an image file in the file system". I honestly don't know how to work this around, Thunar doesn't do anything fancy to set those icons: https://git.xfce.org/xfce/thunar/tree/thunar/thunar-menu-util.c?id=2708c105bee56f3920f7bd8d0578768fd384a754#n59 Upstream broke stuff, so let's await their fix.
Created attachment 7980 Fix icons in Thunar There is indeed a behavior regression in g_icon_to_string() but there is also a bug in Thunar. The upstream glib issue was only putting Thunar bug into light. Basically you are assuming that `g_icon_to_string()` is returning an icon name: https://git.xfce.org/xfce/thunar/tree/plugins/thunar-uca/thunar-uca-provider.c#n230 Then later you reuse this information with this assumption: https://git.xfce.org/xfce/thunar/tree/thunar/thunar-menu-util.c?id=2708c105bee56f3920f7bd8d0578768fd384a754#n59 This is the bug here. A GIcon can be a GFileIcon (for which g_icon_to_string() would not return an icon name) or a themed name created with fallback icons, or whatever other sub-type of icons which may be created in the future. You should not assume you get an icon name. So anyway the attached patch fixes this. I also update `thunarx_menu_item_new()` docs to acknowledge for this. Note that it should not break any previous uses of this API in plug-ins or whatever else, as paths and icon names are valid textual representations which can be recreated by g_icon_new_for_string(). Actually if anything this is fixing more bugs, as you were using g_icon_new_for_string() which would have not worked with a path (unlike what your docs say!). :-)
P.S.: I have not actually tested my patch, nor have I even built it (as I don't have xfce4-dev-tools, and don't feel like spending too much time on this, sorry ;p). I think it is fine, hopefully I have not done any stupid mistake there. ;-)
Jehan referenced this bugreport in commit 8349a54d998755f51a4e217f7adddb3445af05a8 Right mouse click will not display icons for custom actions. (Bug #14685) https://git.xfce.org/xfce/thunar/commit?id=8349a54d998755f51a4e217f7adddb3445af05a8
Jehan referenced this bugreport in commit 0f6cc96a1d43664325ae2133c48d5395a19bd1af Right mouse click will not display icons for custom actions. (Bug #14685) https://git.xfce.org/xfce/thunar/commit?id=0f6cc96a1d43664325ae2133c48d5395a19bd1af
Thanks alot for the patch! Looks good to me and was tested by Andre Miranda. Just applied it to master and the 4.14 branch. Will be released in thunar 1.8.2
*** Bug 14708 has been marked as a duplicate of this bug. ***