X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-icon-factory.c;h=a577cd62c372df71d7bed8e2696243b69b747b2e;hp=326705b75e194f611be4ae6b15d3be532fb8f4fc;hb=cd901a170b449d3be26a6790d6ecab76ad1b42b3;hpb=790031656562c2a792dd91efbcb6108eac79b0e1 diff --git a/src/modest-icon-factory.c b/src/modest-icon-factory.c index 326705b..a577cd6 100644 --- a/src/modest-icon-factory.c +++ b/src/modest-icon-factory.c @@ -79,30 +79,3 @@ modest_icon_factory_get_icon (const gchar *name) } - -GdkPixbuf* -modest_icon_factory_get_icon_at_size (const gchar *name, guint width, guint height) -{ - /* FIXME, somehow, cache scaled icons as well... */ - GError *err = NULL; - GdkPixbuf *pixbuf = NULL; - static GHashTable *icon_cache = NULL; - - g_return_val_if_fail (name, NULL); - - if (G_UNLIKELY(!icon_cache)) - icon_cache = get_icon_cache (); - - pixbuf = gdk_pixbuf_new_from_file_at_size (name, width, height, &err); - if (!pixbuf) { - g_printerr ("modest: error in icon factory while loading '%s'@(%dx%d): %s\n", - name, width, height, err->message); - g_error_free (err); - } - - /* we insert it, so it will be freed... FIXME... */ - if (pixbuf && icon_cache) - g_hash_table_insert (icon_cache, g_strdup_printf ("%s-%d-%d",name,width,height), - (gpointer)pixbuf); - return pixbuf; -}