Homebrew/legacy-homebrew

GTK+3 missing system-run icon and hicolor theme

wah opened this issue · 5 comments

wah commented

Hi,

I've been having a lot of trouble using a Python-based graph drawing package (graph-tool) that relies on GTK+3. I think the problem comes from a missing icon in GTK. Using graph-tool to produce an interactive figure generates a couple of warnings from GTK. First, upon opening the interactive window:

Gtk-WARNING **: Could not find the icon 'system-run'. The 'hicolor' theme was not found either, perhaps you need to install it.

Then upon the first interaction:

Gtk-WARNING **: Error loading theme icon 'system-run' for stock: Icon 'system-run' not present in theme

Gtk-WARNING **: Error loading theme icon 'image-missing' for stock: Icon 'image-missing' not present in theme

On the second interaction these last two warnings are repeated, followed by a null pointer exception, which crashes the Python kernel:

Gtk-WARNING **: drawing failure for widget `graph_tool+draw+gtk_draw+GraphWindow': NULL pointer
Python(23162,0x7fff79bc8300) malloc: *** error for object 0x7fedddf65780: pointer being realloc'd was not allocated

Downloading the hicolor theme from Homebrew (brew install hicolor-icon-theme) fixed only the very first warning; the icon still couldn't be loaded upon interaction. I eventually fixed it by creating a file /usr/share/icons/system-run.png. I also had to modify the permissions on the file so that GTK could load it.

Is this a problem with the GTK Formula? It's given me nightmares.

Cheers,

Charlie

Edit - Ignore this comment...

Oh! It occurred to me. As well as hicolor-icon-theme you also want gnome-icon-theme. The latter contains the files you want.

wah commented

Thanks! I eventually got it working by creating an icon called system-run.png and sticking it in the path.

Is there anything actionable here? Pull request?

Not really.

We could consider shipping hicolor-icon-theme with both the GTK+ formulae, as a lot of GTK+ things require/expect them in some capacity, and our current workaround is to just add them as deps to other formulae when they are directly required.

Same thing with gnome-icon-theme and GTK+3. We could ship it inside the GTK+3 formulae and handle the icon-cache issue postinstall. But I don't know if the minimal amount of complaints/issues we've had about the icon-theme situation merits such a radical change, I don't know how you'd feel about that.

I guess as a middle ground the GTK+ formulae could have a new caveat added along the lines of you may also wish to install blah.