https://bugzilla.xfce.org/show_bug.cgi?id=14685
Jehan <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #7 from Jehan <[email protected]> --- Created attachment 7980 --> https://bugzilla.xfce.org/attachment.cgi?id=7980&action=edit 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!). :-) -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Xfce-bugs mailing list [email protected] https://mail.xfce.org/mailman/listinfo/xfce-bugs
