After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 149931 - If hicolor theme is missing, GtkFileChooser generates a warning for missing icon for root directory
If hicolor theme is missing, GtkFileChooser generates a warning for missing i...
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
2.4.x
Other Linux
: Low minor
: Small fix
Assigned To: gtk-bugs
Federico Mena Quintero
Depends on:
Blocks:
 
 
Reported: 2004-08-11 18:39 UTC by Philip Langdale
Modified: 2013-01-20 22:54 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Philip Langdale 2004-08-11 18:39:21 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.
Comment 1 Matthias Clasen 2004-08-12 13:39:34 UTC
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
Comment 2 Grant Gayed 2004-09-28 17:10:51 UTC
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;
}
Comment 3 Grant Gayed 2004-10-04 21:20:47 UTC
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.
Comment 4 Matthias Clasen 2004-10-05 03:41:39 UTC
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.
Comment 5 Philip Langdale 2004-10-05 04:19:53 UTC
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.
Comment 6 Matthias Clasen 2004-10-05 04:24:48 UTC
It is a hint to the user that something may be amiss with the installation. I
don't see whats unprofessional about that.
Comment 7 Philip Langdale 2004-10-05 04:39:27 UTC
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 :-/
Comment 8 Federico Mena Quintero 2007-01-25 16:27:06 UTC
Does this still happen with gtk+ 2.10?
Comment 9 Matthias Clasen 2013-01-20 22:54:19 UTC
Closing old, obsolete bugs. We assume the presence of a reasonably equipped icon theme.