site  contact  subhomenews

gtk stock icons missing

December 17, 2017 — BarryK

Working on 01micko's Simple Samba Management and my QuickSamba scripts, I noticed that gtk stock icons are not displaying.

Then I tried Dropbox GUI file manager, created by mikeb:

...however, none of the icons in the buttons display.

Dropbox GUI is great, it is good to see mikeb active on the Puppy Forum again.

Forum member SFR has created a patch for the gtk+ source, to restore the traditional icons:

...this patch still works on the latest gtk+, 2.24.31, so I plan to recompile it in OpenEmbedded and see if that fixes the problem.


That patch did not fix anything. The solution was elsewhere. Dropbox-GUI is using code for gtkdialog like icon="gtk-network", which triggered a memory. Changing it to stock="gtk-network" fixed it.

However, icon-name="gtk-network" in the window tag is broken. Replacing icon-name with stock, icon, or stock-id does not fix it. It actually has to be an icon in /usr/share/icons/hicolor. So, I created /usr/share/icons/hicolor/16x16/actions/gtk-network.xpm (symlink to /usr/local/lib/X11/mini-icons/pc-2x.xpm, to save space). Now it works.

Note that stock="gtk-network" elsewhere in the gtkdialog xml code uses the gtk inbuilt icon, not the new one that I have created,

Tags: easy, quirky, oe