replace deprecated gtk_icon_info_free() calls with g_object_unref() in GTK+ >= 3.8.0

This commit is contained in:
Jordan Lee 2013-07-08 16:25:18 +00:00
parent 836e497be6
commit 59af132947
2 changed files with 9 additions and 1 deletions

View File

@ -142,7 +142,11 @@ get_themed_icon_pixbuf (GThemedIcon * icon,
g_clear_error (&error);
}
#if GTK_CHECK_VERSION(3,8,0)
g_object_unref (icon_info);
#else
gtk_icon_info_free (icon_info);
#endif
g_strfreev (icon_names);
return pixbuf;

View File

@ -132,7 +132,11 @@ getIconName (void)
{
GtkIconInfo * icon_info = gtk_icon_theme_lookup_icon (theme, TRAY_ICON, 48, GTK_ICON_LOOKUP_USE_BUILTIN);
const gboolean icon_is_builtin = gtk_icon_info_get_filename (icon_info) == NULL;
gtk_icon_info_free (icon_info);
#if GTK_CHECK_VERSION(3,8,0)
g_object_unref (icon_info);
#else
gtk_icon_info_free (icon_info);
#endif
icon_name = icon_is_builtin ? ICON_NAME : TRAY_ICON;
}