diff --git a/src/st/st-icon.c b/src/st/st-icon.c index bd7e9eb99..94e6842df 100644 --- a/src/st/st-icon.c +++ b/src/st/st-icon.c @@ -324,11 +324,11 @@ st_icon_update (StIcon *icon) if (theme_node) { StTextureCache *cache = st_texture_cache_get_default (); - priv->icon_texture = st_texture_cache_load_icon_name_for_theme (cache, - theme_node, - priv->icon_name, - priv->icon_type, - priv->icon_size); + priv->icon_texture = st_texture_cache_load_icon_name (cache, + theme_node, + priv->icon_name, + priv->icon_type, + priv->icon_size); if (priv->icon_texture) clutter_actor_set_parent (priv->icon_texture, CLUTTER_ACTOR (icon)); diff --git a/src/st/st-texture-cache.c b/src/st/st-texture-cache.c index 9d61129bf..cdea84811 100644 --- a/src/st/st-texture-cache.c +++ b/src/st/st-texture-cache.c @@ -1235,9 +1235,9 @@ st_texture_cache_load_sliced_image (StTextureCache *cache, */ /** - * st_texture_cache_load_icon_name_for_theme: + * st_texture_cache_load_icon_name: * @cache: The texture cache instance - * @theme_node: a #StThemeNode + * @theme_node: (allow-none): a #StThemeNode * @name: Name of a themed icon * @icon_type: the type of icon to load * @size: Size of themed @@ -1249,16 +1249,18 @@ st_texture_cache_load_sliced_image (StTextureCache *cache, * Return Value: (transfer none): A new #ClutterTexture for the icon */ ClutterActor * -st_texture_cache_load_icon_name_for_theme (StTextureCache *cache, - StThemeNode *theme_node, - const char *name, - StIconType icon_type, - gint size) +st_texture_cache_load_icon_name (StTextureCache *cache, + StThemeNode *theme_node, + const char *name, + StIconType icon_type, + gint size) { ClutterActor *texture; GIcon *themed; char *symbolic; + g_return_val_if_fail (!(icon_type == ST_ICON_SYMBOLIC && theme_node == NULL), NULL); + switch (icon_type) { case ST_ICON_APPLICATION: @@ -1273,12 +1275,8 @@ st_texture_cache_load_icon_name_for_theme (StTextureCache *cache, symbolic = g_strconcat (name, "-symbolic", NULL); themed = g_themed_icon_new_with_default_fallbacks ((const gchar*)symbolic); g_free (symbolic); - if (theme_node) - texture = load_gicon_with_colors (cache, themed, size, - st_theme_node_get_icon_colors (theme_node)); - else - texture = st_texture_cache_load_gicon (cache, themed, size); - + texture = load_gicon_with_colors (cache, themed, size, + st_theme_node_get_icon_colors (theme_node)); g_object_unref (themed); return CLUTTER_ACTOR (texture); @@ -1294,27 +1292,6 @@ st_texture_cache_load_icon_name_for_theme (StTextureCache *cache, } } -/** - * st_texture_cache_load_icon_name: - * @cache: The texture cache instance - * @name: Name of a themed icon - * @icon_type: the type of icon to load - * @size: Size of themed - * - * Load a themed icon into a texture. See the #StIconType documentation - * for an explanation of how @icon_type affects the returned icon. - * - * Return Value: (transfer none): A new #ClutterTexture for the icon - */ -ClutterActor * -st_texture_cache_load_icon_name (StTextureCache *cache, - const char *name, - StIconType icon_type, - gint size) -{ - return st_texture_cache_load_icon_name_for_theme (cache, NULL, name, icon_type, size); -} - /** * st_texture_cache_load_uri_async: * diff --git a/src/st/st-texture-cache.h b/src/st/st-texture-cache.h index 80b3060df..e8fc586c5 100644 --- a/src/st/st-texture-cache.h +++ b/src/st/st-texture-cache.h @@ -79,16 +79,11 @@ ClutterActor *st_texture_cache_bind_pixbuf_property (StTextureCache *cache, const char *property_name); ClutterActor *st_texture_cache_load_icon_name (StTextureCache *cache, + StThemeNode *theme_node, const char *name, StIconType icon_type, gint size); -ClutterActor *st_texture_cache_load_icon_name_for_theme (StTextureCache *cache, - StThemeNode *theme_node, - const char *name, - StIconType icon_type, - gint size); - ClutterActor *st_texture_cache_load_gicon (StTextureCache *cache, GIcon *icon, gint size);