[gtk+/parser] cssprovider: Refactor code to have a gtk_css_ruleset_matches()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/parser] cssprovider: Refactor code to have a gtk_css_ruleset_matches()
- Date: Wed, 18 May 2011 03:54:18 +0000 (UTC)
commit 2ce55860a112f204f68305cc1f04d50f6a100894
Author: Benjamin Otte <otte redhat com>
Date: Tue May 17 22:11:50 2011 +0200
cssprovider: Refactor code to have a gtk_css_ruleset_matches()
gtk/gtkcssprovider.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index f360473..ce54442 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -944,6 +944,14 @@ gtk_css_ruleset_set_style (GtkCssRuleset *ruleset,
ruleset->style = NULL;
}
+static gboolean
+gtk_css_ruleset_matches (GtkCssRuleset *ruleset,
+ GtkWidgetPath *path,
+ guint length)
+{
+ return _gtk_css_selector_matches (ruleset->selector, path, length);
+}
+
static void
property_value_free (GValue *value)
{
@@ -1130,7 +1138,7 @@ gtk_css_provider_get_style (GtkStyleProvider *provider,
if (l < length && _gtk_css_selector_get_state_flags (ruleset->selector))
continue;
- if (!_gtk_css_selector_matches (ruleset->selector, path, l))
+ if (!gtk_css_ruleset_matches (ruleset, path, l))
continue;
g_hash_table_iter_init (&iter, ruleset->style);
@@ -1181,7 +1189,7 @@ gtk_css_provider_get_style_property (GtkStyleProvider *provider,
ruleset = g_ptr_array_index (priv->rulesets, i);
- if (!_gtk_css_selector_matches (ruleset->selector, path, gtk_widget_path_length (path)))
+ if (gtk_css_ruleset_matches (ruleset, path, gtk_widget_path_length (path)))
continue;
selector_state = _gtk_css_selector_get_state_flags (ruleset->selector);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]