Remove _for_theme() variant of st_texture_cache_load_icon_name()
Now that we're using St.Icon in the Javascript, there is no reason to have separate st_texture_cache_load_icon_name() and st_texture_cache_load_icon_name_for_theme(), instead just add the StThemeNode argument to st_texture_cache_load_icon_name(). https://bugzilla.gnome.org/show_bug.cgi?id=633866
This commit is contained in:
parent
0e3431ac47
commit
dc1e23501c
@ -324,7 +324,7 @@ 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,
|
||||
priv->icon_texture = st_texture_cache_load_icon_name (cache,
|
||||
theme_node,
|
||||
priv->icon_name,
|
||||
priv->icon_type,
|
||||
|
@ -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,7 +1249,7 @@ 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,
|
||||
st_texture_cache_load_icon_name (StTextureCache *cache,
|
||||
StThemeNode *theme_node,
|
||||
const char *name,
|
||||
StIconType icon_type,
|
||||
@ -1259,6 +1259,8 @@ st_texture_cache_load_icon_name_for_theme (StTextureCache *cache,
|
||||
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);
|
||||
|
||||
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:
|
||||
*
|
||||
|
@ -79,11 +79,6 @@ ClutterActor *st_texture_cache_bind_pixbuf_property (StTextureCache *cache,
|
||||
const char *property_name);
|
||||
|
||||
ClutterActor *st_texture_cache_load_icon_name (StTextureCache *cache,
|
||||
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,
|
||||
|
Loading…
Reference in New Issue
Block a user