diff --git a/capplets/common/ChangeLog b/capplets/common/ChangeLog index baaa4441c..de97b861e 100644 --- a/capplets/common/ChangeLog +++ b/capplets/common/ChangeLog @@ -1,3 +1,11 @@ +2005-07-10 Rodney Dawes + + * capplet-util.c (capplet_set_icon): Update to use the GtkIconTheme + API instead of the deprecated GnomeIconTheme API + Based on patch from Jan de Groot + + Fixes #171679 + 2005-06-30 William Jon McCann * file-transfer-dialog.c: Don't include gnome.h diff --git a/capplets/common/capplet-util.c b/capplets/common/capplet-util.c index 4277c7021..5100048d5 100644 --- a/capplets/common/capplet-util.c +++ b/capplets/common/capplet-util.c @@ -356,21 +356,22 @@ capplet_set_icon (GtkWidget *window, char const *icon_file_name) char *tmp; char *p; GdkPixbuf *icon_pixbuf = NULL; - GnomeIconTheme *icon_theme; + GtkIconTheme *icon_theme; + GtkIconInfo *icon_info; /* First look up from the icon theme */ - icon_theme = gnome_icon_theme_new (); + icon_theme = gtk_icon_theme_get_default (); tmp = g_strdup (icon_file_name); p = strrchr (tmp, '.'); if (p) p[0] = '\0'; - path = gnome_icon_theme_lookup_icon (icon_theme, tmp, 48, NULL, NULL); - - if (path != NULL) { - icon_pixbuf = gdk_pixbuf_new_from_file (path, NULL); - g_free (path); + icon_info = gtk_icon_theme_lookup_icon (icon_theme, tmp, 48, 0); + + if (icon_info != NULL) { + icon_pixbuf = gtk_icon_info_load_icon (icon_info, NULL); + gtk_icon_info_free (icon_info); } g_free (tmp);