Hello, Since last update, it seems impossible to set an icon to a folder menu item. It keeps the "forbidden" icon no matter what.
The Directory Menu uses gtk_image_set_from_icon_name()[1] to set the icon, so it needs to be an icon from the icon theme to work - custom icons not supported. As a workaround, you can copy your custom icon to ~/.icons (create the folder if it doesn't exist) and then you can find the icon under the "Uncategorized" or "All" sections. [1]https://git.xfce.org/xfce/xfce4-panel/tree/plugins/directorymenu/directorymenu.c#n247
Created attachment 8966 Screenshot
Hello and thank you for your answer! It seems to me that it's a regression since it was possible to use custom images in the previous version. Moreover, the system allows me to pick a custom image (as seen in attached screenshots), it's just that it has no effects when I validate (with no warning nor alert message). Regards, JD
The behavior was changed by this commit: https://git.xfce.org/xfce/xfce4-panel/commit/plugins/directorymenu/directorymenu.c?id=ccfa438 xfce_panel_image_set_from_source was replaced by gtk_image_set_from_icon_name. The former accepts a "source " which "can be an absolute path or an icon-name" according to the docs.
Well it seems that there's an issue somewhere, but I don't know if it's related to gtk_image_set_from_icon_name or to the way XFCE sends parameters to the method. In my xfce4-panel.xml, I do have the following <property name="plugin-22" type="string" value="directorymenu"> <property name="base-directory" type="string" value="/home/xxx/Applications/Applis AMUE"/> <property name="icon-name" type="string" value="/home/xxx/Applications/Applis AMUE/LogoAMUE.png"/> <property name="file-pattern" type="string" value="*.jnlp"/> </property> where /home/xxx/Applications/Applis AMUE/LogoAMUE.png is a valid existing absolute path to a png image. If I copy the icon to /usr/share/pixmaps then I can use it as an "uncategorized icon", but it requires privileges to copy files there (so it's still a regression, in my opinion). I wonder if the problem could be in the property name "icon-name", maybe it should be a "button-icon"? Regards, JD
(In reply to JD from comment #5) > If I copy the icon to /usr/share/pixmaps then I can use it as an > "uncategorized icon", but it requires privileges to copy files there (so > it's still a regression, in my opinion). To avoid the need to copy to system directory, you can use xdg-icon-resource to install icon resource in your homedir. I did it like that: xdg-icon-resource install --size 48 your-icon-file.png (where 48 is size of the icon, you can choose whatever size suits you). In my case icon gets installed inside ~/.local/share/icons/hicolor/48x48/apps/, so no system permissions are necessary. Icon installed that way can be easily selected as directorymenu plugin icon and is visible under "Application icons" (actually I found this solution just to do that).
-- GitLab Migration Automatic Message -- This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/xfce4-panel/-/issues/254. Please create an account or use an existing account on one of our supported OAuth providers. If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev