-#ifndef USE_STABLE_LIBGNOMEUI
-static GdkPixbuf *
-load_icon_file (char *filename,
- guint nominal_size)
-{
- GdkPixbuf *pixbuf, *scaled_pixbuf;
- guint width, height;
-
- pixbuf = gdk_pixbuf_new_from_file_at_size (filename, nominal_size, nominal_size, NULL);
-
- if (pixbuf == NULL) {
- return NULL;
- }
-
- width = gdk_pixbuf_get_width (pixbuf);
- height = gdk_pixbuf_get_height (pixbuf);
- /* if the icon is larger than the nominal size, scale down */
- if (MAX (width, height) > nominal_size) {
- if (width > height) {
- height = height * nominal_size / width;
- width = nominal_size;
- } else {
- width = width * nominal_size / height;
- height = nominal_size;
- }
- scaled_pixbuf = gdk_pixbuf_scale_simple
- (pixbuf, width, height, GDK_INTERP_BILINEAR);
- g_object_unref (pixbuf);
- pixbuf = scaled_pixbuf;
- }
-
- return pixbuf;
-}
-