[gtk/wip/baedert/gl-rework] Revert "cssimageicontheme: Implement is_computed"



commit 347395d413ff0bdd4f9de3b914c53fbe4e47e114
Author: Timm Bäder <mail baedert org>
Date:   Mon Jan 20 10:41:50 2020 +0100

    Revert "cssimageicontheme: Implement is_computed"
    
    This reverts commit 2b669ce94cc564286fe7882064aeebe2035f720c.

 gtk/gtkcssimageicontheme.c        | 26 ++------------------------
 gtk/gtkcssimageiconthemeprivate.h |  1 -
 2 files changed, 2 insertions(+), 25 deletions(-)
---
diff --git a/gtk/gtkcssimageicontheme.c b/gtk/gtkcssimageicontheme.c
index f74f293afe..c2a21c41b9 100644
--- a/gtk/gtkcssimageicontheme.c
+++ b/gtk/gtkcssimageicontheme.c
@@ -172,25 +172,11 @@ gtk_css_image_icon_theme_compute (GtkCssImage      *image,
 {
   GtkCssImageIconTheme *icon_theme = GTK_CSS_IMAGE_ICON_THEME (image);
   GtkCssImageIconTheme *copy;
-  GtkIconTheme *icontheme;
-  int scale;
-
-  if (icon_theme->is_computed)
-    return g_object_ref (image);
-
-  icontheme = gtk_css_icon_theme_value_get_icon_theme (gtk_css_style_get_value (style, 
GTK_CSS_PROPERTY_ICON_THEME));
-  scale = gtk_style_provider_get_scale (provider);
-
-  if (icon_theme->scale == scale &&
-      icon_theme->icon_theme == icontheme)
-    return g_object_ref (image);
 
   copy = g_object_new (GTK_TYPE_CSS_IMAGE_ICON_THEME, NULL);
   copy->name = g_strdup (icon_theme->name);
-  copy->icon_theme = icontheme;
-  copy->scale = scale;
-  copy->is_computed = TRUE;
-
+  copy->icon_theme = gtk_css_icon_theme_value_get_icon_theme (gtk_css_style_get_value (style, 
GTK_CSS_PROPERTY_ICON_THEME));
+  copy->scale = gtk_style_provider_get_scale (provider);
   gtk_icon_theme_lookup_symbolic_colors (style, &copy->color, &copy->success, &copy->warning, &copy->error);
 
   return GTK_CSS_IMAGE (copy);
@@ -219,13 +205,6 @@ gtk_css_image_icon_theme_dispose (GObject *object)
   G_OBJECT_CLASS (_gtk_css_image_icon_theme_parent_class)->dispose (object);
 }
 
-static gboolean
-gtk_css_image_icon_theme_is_computed (GtkCssImage *image)
-{
-  GtkCssImageIconTheme *icon_theme = (GtkCssImageIconTheme *) image;
-
-  return icon_theme->is_computed;
-}
 static void
 _gtk_css_image_icon_theme_class_init (GtkCssImageIconThemeClass *klass)
 {
@@ -238,7 +217,6 @@ _gtk_css_image_icon_theme_class_init (GtkCssImageIconThemeClass *klass)
   image_class->print = gtk_css_image_icon_theme_print;
   image_class->compute = gtk_css_image_icon_theme_compute;
   image_class->equal = gtk_css_image_icon_theme_equal;
-  image_class->is_computed = gtk_css_image_icon_theme_is_computed;
 
   object_class->dispose = gtk_css_image_icon_theme_dispose;
 }
diff --git a/gtk/gtkcssimageiconthemeprivate.h b/gtk/gtkcssimageiconthemeprivate.h
index d4b93accb1..f583b35230 100644
--- a/gtk/gtkcssimageiconthemeprivate.h
+++ b/gtk/gtkcssimageiconthemeprivate.h
@@ -40,7 +40,6 @@ struct _GtkCssImageIconTheme
   GtkCssImage parent;
 
   GtkIconTheme *icon_theme;
-  guint is_computed: 1;
   GdkRGBA color;
   GdkRGBA success;
   GdkRGBA warning;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]