Skip to content
This repository has been archived by the owner on Apr 4, 2021. It is now read-only.

Commit

Permalink
replace deprecated gtk_icon_info_free() calls with g_object_unref() i…
Browse files Browse the repository at this point in the history
…n GTK+ >= 3.8.0

git-svn-id: svn://svn.transmissionbt.com/Transmission/trunk@14107 f4695dd4-2c0a-0410-b89c-da849a56a58e
  • Loading branch information
jordan committed Jul 8, 2013
1 parent 08ef4de commit adf164b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions gtk/icons.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 5 additions & 1 deletion gtk/tr-icon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit adf164b

Please sign in to comment.