st-texture-cache: Remove unused fields from AsyncTextureLoadData

https://bugzilla.gnome.org/show_bug.cgi?id=672273
This commit is contained in:
Jasper St. Pierre 2012-03-16 23:03:02 -04:00
parent 63cf470e07
commit db4b266874

View File

@ -233,8 +233,7 @@ rgba_from_clutter (GdkRGBA *rgba,
} }
static GdkPixbuf * static GdkPixbuf *
impl_load_pixbuf_gicon (GIcon *icon, impl_load_pixbuf_gicon (GtkIconInfo *info,
GtkIconInfo *info,
int size, int size,
StIconColors *colors, StIconColors *colors,
GError **error) GError **error)
@ -296,7 +295,6 @@ typedef struct {
StTextureCache *cache; StTextureCache *cache;
StTextureCachePolicy policy; StTextureCachePolicy policy;
char *key; char *key;
char *checksum;
gboolean enforced_square; gboolean enforced_square;
@ -304,11 +302,8 @@ typedef struct {
guint height; guint height;
GSList *textures; GSList *textures;
GIcon *icon;
char *mimetype;
GtkIconInfo *icon_info; GtkIconInfo *icon_info;
StIconColors *colors; StIconColors *colors;
GtkRecentInfo *recent_info;
char *uri; char *uri;
} AsyncTextureLoadData; } AsyncTextureLoadData;
@ -317,24 +312,17 @@ texture_load_data_destroy (gpointer p)
{ {
AsyncTextureLoadData *data = p; AsyncTextureLoadData *data = p;
if (data->icon) if (data->icon_info)
{ {
g_object_unref (data->icon);
gtk_icon_info_free (data->icon_info); gtk_icon_info_free (data->icon_info);
if (data->colors) if (data->colors)
st_icon_colors_unref (data->colors); st_icon_colors_unref (data->colors);
} }
else if (data->uri) else if (data->uri)
g_free (data->uri); g_free (data->uri);
else if (data->recent_info)
gtk_recent_info_unref (data->recent_info);
if (data->key) if (data->key)
g_free (data->key); g_free (data->key);
if (data->checksum)
g_free (data->checksum);
if (data->mimetype)
g_free (data->mimetype);
if (data->textures) if (data->textures)
g_slist_free_full (data->textures, (GDestroyNotify) g_object_unref); g_slist_free_full (data->textures, (GDestroyNotify) g_object_unref);
@ -548,8 +536,8 @@ load_pixbuf_thread (GSimpleAsyncResult *result,
if (data->uri) if (data->uri)
pixbuf = impl_load_pixbuf_file (data->uri, data->width, data->height, &error); pixbuf = impl_load_pixbuf_file (data->uri, data->width, data->height, &error);
else if (data->icon) else if (data->icon_info)
pixbuf = impl_load_pixbuf_gicon (data->icon, data->icon_info, data->width, data->colors, &error); pixbuf = impl_load_pixbuf_gicon (data->icon_info, data->width, data->colors, &error);
else else
g_assert_not_reached (); g_assert_not_reached ();
@ -960,7 +948,6 @@ load_gicon_with_colors (StTextureCache *cache,
/* Transfer ownership of key */ /* Transfer ownership of key */
request->key = key; request->key = key;
request->policy = policy; request->policy = policy;
request->icon = g_object_ref (icon);
request->colors = colors ? st_icon_colors_ref (colors) : NULL; request->colors = colors ? st_icon_colors_ref (colors) : NULL;
request->icon_info = info; request->icon_info = info;
request->width = request->height = size; request->width = request->height = size;