[gtk+/wip/cssvalue: 46/141] css: Remove _gtk_css_style_property_is_specified_type()



commit a15c2be4f251733c09994e2b1bbd58d6090204c8
Author: Benjamin Otte <otte redhat com>
Date:   Mon Mar 26 16:22:53 2012 +0200

    css: Remove _gtk_css_style_property_is_specified_type()
    
    That check is going to be refactored away.

 gtk/gtkcssprovider.c             |    1 -
 gtk/gtkcssstyleproperty.c        |   22 ----------------------
 gtk/gtkcssstylepropertyprivate.h |    2 --
 3 files changed, 0 insertions(+), 25 deletions(-)
---
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index 3ec900a..7e59346 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -1246,7 +1246,6 @@ gtk_css_ruleset_add (GtkCssRuleset       *ruleset,
 {
   guint i;
 
-  g_return_if_fail (_gtk_css_style_property_is_specified_type (property, G_VALUE_TYPE (value)));
   g_return_if_fail (ruleset->owns_styles || ruleset->n_styles == 0);
 
   if (ruleset->set_styles == NULL)
diff --git a/gtk/gtkcssstyleproperty.c b/gtk/gtkcssstyleproperty.c
index ef5a8fe..35d21ca 100644
--- a/gtk/gtkcssstyleproperty.c
+++ b/gtk/gtkcssstyleproperty.c
@@ -464,28 +464,6 @@ _gtk_css_style_property_get_specified_type (GtkCssStyleProperty *property)
   return _gtk_css_value_get_content_type (property->initial_value);
 }
 
-gboolean
-_gtk_css_style_property_is_specified_type (GtkCssStyleProperty *property,
-                                           GType                type)
-{
-  g_return_val_if_fail (GTK_IS_CSS_STYLE_PROPERTY (property), FALSE);
-
-  /* If it's our specified type, of course it's valid */
-  if (type == _gtk_css_value_get_content_type (property->initial_value))
-    return TRUE;
-
-  /* The special values 'inherit' and 'initial' are always valid */
-  if (type == GTK_TYPE_CSS_SPECIAL_VALUE)
-    return TRUE;
-
-  /* XXX: Someone needs to fix that legacy */
-  if (_gtk_css_value_holds (property->initial_value, CAIRO_GOBJECT_TYPE_PATTERN) &&
-      type == GTK_TYPE_GRADIENT)
-    return TRUE;
-
-  return FALSE;
-}
-
 /**
  * _gtk_css_style_property_compute_value:
  * @property: the property
diff --git a/gtk/gtkcssstylepropertyprivate.h b/gtk/gtkcssstylepropertyprivate.h
index 391f418..a10297b 100644
--- a/gtk/gtkcssstylepropertyprivate.h
+++ b/gtk/gtkcssstylepropertyprivate.h
@@ -82,8 +82,6 @@ GtkCssValue  *          _gtk_css_style_property_get_initial_value
                                                                 (GtkCssStyleProperty    *property);
 GType                   _gtk_css_style_property_get_computed_type (GtkCssStyleProperty *property);
 GType                   _gtk_css_style_property_get_specified_type (GtkCssStyleProperty *property);
-gboolean                _gtk_css_style_property_is_specified_type (GtkCssStyleProperty  *property,
-                                                                 GType                   type);
 
 GtkCssValue *           _gtk_css_style_property_compute_value   (GtkCssStyleProperty    *property,
                                                                  GtkStyleContext        *context,



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