From d3ba00231304e13bf4d59ffa4739aa915cc2a815 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Mon, 24 Sep 2012 22:10:04 +0200 Subject: [PATCH] st: Remove unused methods This reverts commits cd024e21f0d and dc9ad8df8074. https://bugzilla.gnome.org/show_bug.cgi?id=679268 --- src/st/st-texture-cache.c | 27 --------------------------- src/st/st-texture-cache.h | 3 --- src/st/st-widget.c | 35 ----------------------------------- src/st/st-widget.h | 2 -- 4 files changed, 67 deletions(-) diff --git a/src/st/st-texture-cache.c b/src/st/st-texture-cache.c index 2ba0f8e1b..d178490f4 100644 --- a/src/st/st-texture-cache.c +++ b/src/st/st-texture-cache.c @@ -106,33 +106,6 @@ st_texture_cache_class_init (StTextureCacheClass *klass) G_TYPE_NONE, 1, G_TYPE_STRING); } -/** - * st_texture_cache_clear_uri: - * @cache: A #StTextureCache - * @uri: URI of cached object - * - * If the given @uri is known to have been modified - * externally, this function may be used to invalidate - * the in-memory cache. - */ -void -st_texture_cache_clear_uri (StTextureCache *cache, - const char *uri) -{ - char *key; - - g_return_if_fail (ST_IS_TEXTURE_CACHE (cache)); - g_return_if_fail (uri != NULL); - - key = g_strconcat (CACHE_PREFIX_URI, uri, NULL); - g_hash_table_remove (cache->priv->keyed_cache, key); - g_free (key); - - key = g_strconcat (CACHE_PREFIX_URI_FOR_CAIRO, uri, NULL); - g_hash_table_remove (cache->priv->keyed_cache, key); - g_free (key); -} - /* Evicts all cached textures for named icons */ static void st_texture_cache_evict_icons (StTextureCache *cache) diff --git a/src/st/st-texture-cache.h b/src/st/st-texture-cache.h index ce9857dae..8db438b4f 100644 --- a/src/st/st-texture-cache.h +++ b/src/st/st-texture-cache.h @@ -68,9 +68,6 @@ GType st_texture_cache_get_type (void) G_GNUC_CONST; StTextureCache* st_texture_cache_get_default (void); -void st_texture_cache_clear_uri (StTextureCache *cache, - const gchar *uri); - ClutterActor * st_texture_cache_load_sliced_image (StTextureCache *cache, const gchar *path, diff --git a/src/st/st-widget.c b/src/st/st-widget.c index 46904e979..25b9ad87a 100644 --- a/src/st/st-widget.c +++ b/src/st/st-widget.c @@ -2799,38 +2799,3 @@ st_widget_get_focus_chain (StWidget *widget) { return ST_WIDGET_GET_CLASS (widget)->get_focus_chain (widget); } - -/** - * st_widget_clear_background_image: - * @widget: An #StWidget - * - * Force a reload of the background-image property. Usually properties - * are cached heavily to avoid unnecessary work on paint, this method - * will force the cache to be recreated. - */ -void -st_widget_clear_background_image (StWidget *actor) -{ - GFile *file; - const char *path; - char *uri; - - if (actor->priv->theme_node == NULL) - return; - - path = st_theme_node_get_background_image (actor->priv->theme_node); - if (path == NULL) - return; - - file = g_file_new_for_path (path); - uri = g_file_get_uri (file); - - st_texture_cache_clear_uri (st_texture_cache_get_default (), uri); - st_theme_node_invalidate_paint_state (actor->priv->theme_node); - - if (CLUTTER_ACTOR_IS_MAPPED (CLUTTER_ACTOR (actor))) - clutter_actor_queue_redraw (CLUTTER_ACTOR (actor)); - - g_object_unref (file); - g_free (uri); -} diff --git a/src/st/st-widget.h b/src/st/st-widget.h index b04defa7d..eb9e4cec1 100644 --- a/src/st/st-widget.h +++ b/src/st/st-widget.h @@ -142,8 +142,6 @@ ClutterActor * st_widget_get_label_actor (StWidget *widg void st_widget_set_label_actor (StWidget *widget, ClutterActor *label); -void st_widget_clear_background_image (StWidget *widget); - /* Only to be used by sub-classes of StWidget */ void st_widget_style_changed (StWidget *widget); StThemeNode * st_widget_get_theme_node (StWidget *widget);