[gtk+] css: Remove _gtk_css_computed_values_get_value_by_name()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] css: Remove _gtk_css_computed_values_get_value_by_name()
- Date: Tue, 17 Apr 2012 07:16:27 +0000 (UTC)
commit a360e77a7b742933a4eccf5f58c1cdf7bfcf34e4
Author: Benjamin Otte <otte redhat com>
Date: Sat Mar 31 05:45:28 2012 +0200
css: Remove _gtk_css_computed_values_get_value_by_name()
Now that we use an enum for the IDs, we don't need that function
anymore.
gtk/gtkcsscomputedvalues.c | 15 ---------------
gtk/gtkcsscomputedvaluesprivate.h | 2 --
gtk/gtkstylecontext.c | 4 ++--
3 files changed, 2 insertions(+), 19 deletions(-)
---
diff --git a/gtk/gtkcsscomputedvalues.c b/gtk/gtkcsscomputedvalues.c
index 44a7f97..a3b51d5 100644
--- a/gtk/gtkcsscomputedvalues.c
+++ b/gtk/gtkcsscomputedvalues.c
@@ -214,21 +214,6 @@ _gtk_css_computed_values_get_value (GtkCssComputedValues *values,
return g_ptr_array_index (values->values, id);
}
-GtkCssValue *
-_gtk_css_computed_values_get_value_by_name (GtkCssComputedValues *values,
- const char *name)
-{
- GtkStyleProperty *prop;
-
- g_return_val_if_fail (GTK_IS_CSS_COMPUTED_VALUES (values), NULL);
- g_return_val_if_fail (name != NULL, NULL);
-
- prop = _gtk_style_property_lookup (name);
- g_assert (GTK_IS_CSS_STYLE_PROPERTY (prop));
-
- return _gtk_css_computed_values_get_value (values, _gtk_css_style_property_get_id (GTK_CSS_STYLE_PROPERTY (prop)));
-}
-
GtkCssSection *
_gtk_css_computed_values_get_section (GtkCssComputedValues *values,
guint id)
diff --git a/gtk/gtkcsscomputedvaluesprivate.h b/gtk/gtkcsscomputedvaluesprivate.h
index 1b4dc132..81c9cf2 100644
--- a/gtk/gtkcsscomputedvaluesprivate.h
+++ b/gtk/gtkcsscomputedvaluesprivate.h
@@ -67,8 +67,6 @@ void _gtk_css_computed_values_set_value (GtkCssCom
GtkCssValue * _gtk_css_computed_values_get_value (GtkCssComputedValues *values,
guint id);
-GtkCssValue * _gtk_css_computed_values_get_value_by_name (GtkCssComputedValues *values,
- const char *name);
GtkCssSection * _gtk_css_computed_values_get_section (GtkCssComputedValues *values,
guint id);
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index 9b86904..b319ada 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -1006,7 +1006,7 @@ style_data_lookup (GtkStyleContext *context)
if (priv->theming_engine)
g_object_unref (priv->theming_engine);
- v = _gtk_css_computed_values_get_value_by_name (info->data->store, "engine");
+ v = _gtk_css_computed_values_get_value (info->data->store, GTK_CSS_PROPERTY_ENGINE);
if (v)
priv->theming_engine = _gtk_css_value_dup_object (v);
else
@@ -2920,7 +2920,7 @@ gtk_style_context_notify_state_change (GtkStyleContext *context,
gtk_style_context_set_state (context, flags);
data = style_data_lookup (context);
gtk_style_context_restore (context);
- v = _gtk_css_computed_values_get_value_by_name (data->store, "transition");
+ v = _gtk_css_computed_values_get_value (data->store, GTK_CSS_PROPERTY_TRANSITION);
if (!v)
return;
desc = _gtk_css_value_get_boxed (v);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]