GNOME Bugzilla – Bug 149931
If hicolor theme is missing, GtkFileChooser generates a warning for missing icon for root directory
Last modified: 2013-01-20 22:54:19 UTC
If gtk+ is installed but the hicolor theme isn't, which isn't that unusual, the GtkFileChooser will attempt to load the gnome-fs-home (IIRC) icon to use for the root directory. When this fails, it generates an ugly Gtk-Warning on the console. As hicolor is not a hard dependency for gtk+, it seems reasonable that a more graceful failure mode be expected. Either gtk should include the icon or it should silently handle it. Something as simple as using a / character is better than the empty button and the warning.
This should be fixed in 2.4.4. GTK will use fallback icons if the hicolor theme is not installed. Please reopen if you still see this with 2.4.4
I still see this with gtk-2.4.10. The exact spew is: (main:32080): Gtk-WARNING **: Could not find the icon 'gnome-fs-home'. The 'hicolor' theme was not found either, perhaps you need to install it. You can get a copy from: http://freedesktop.org/Software/icon-theme/releases I'm running on Mandrake 9.2, and I also see it on my neighbour's RH box. The snippet that makes this happen for us is: #include <gtk/gtk.h> void destroy_main(GtkWidget *widget, gpointer data) { gtk_main_quit (); } int main (int argc, char *argv[]) { GtkWidget *mainWindow, *dialog; gtk_init (&argc, &argv); mainWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_default_size(GTK_WINDOW(mainWindow), 200, 200); g_signal_connect (G_OBJECT (mainWindow) ,"destroy", G_CALLBACK (destroy_main), NULL); gtk_widget_show (mainWindow); dialog = gtk_file_chooser_dialog_new ("Open", GTK_WINDOW(mainWindow), GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); return 0; }
Can someone confirm whether they also see this with gtk 2.4.10? ...And if so, is there a possibility of this being fixed in the 2.4.x stream? I'd like SWT's FileDialog and DirectoryDialog to start using the new file chooser if a certain gtk version or higher is detected, but a version is needed that doesn't display warnings easily. TIA.
There is nothing to fix, really. You do get fallback icons now, so the file chooser is usable. The warning isn't displayed "easily", it is an indicator of a broken situation, namely the missing hicolor theme, which is required by the icon theme spec.
Yes, but it looks unprofessional and reflects badly on the affected application which can't do anything to avoid it. Especially given that gtk now has a fallback icon and does the right thing, I don't believe the big ugly warning is justified anymore.
It is a hint to the user that something may be amiss with the installation. I don't see whats unprofessional about that.
Well, if you're in our position and shipping the libraries so that we can support users on rh7.2, then it's not reasonable to expect them to have hicolor installed. I'd rather we didn't have to ship hicolor just to shut it up. The theme situation is bad enough :-/
Does this still happen with gtk+ 2.10?
Closing old, obsolete bugs. We assume the presence of a reasonably equipped icon theme.