[gtk+/gtk-style-context: 77/206] GtkCssProvider: Compare GtkWidgetPath regions with css.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-style-context: 77/206] GtkCssProvider: Compare GtkWidgetPath regions with css.
- Date: Mon, 23 Aug 2010 17:21:23 +0000 (UTC)
commit 86d0c8d666f3abb79e5d86c18b2fbd17e25f7499
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Apr 23 01:31:44 2010 +0200
GtkCssProvider: Compare GtkWidgetPath regions with css.
gtk/gtkcssprovider.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index e903ec5..9360488 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -384,6 +384,24 @@ compare_selector_element (GtkWidgetPath *path,
return TRUE;
}
+ else if (elem->elem_type == SELECTOR_REGION)
+ {
+ const gchar *region_name;
+ GtkChildClassFlags flags;
+
+ /* FIXME: Need GQuark API here */
+ region_name = g_quark_to_string (elem->region.name);
+
+ if (!gtk_widget_path_iter_has_region (path, index, region_name, &flags))
+ return FALSE;
+
+ if (elem->region.flags != 0 &&
+ (flags & elem->region.flags) == 0)
+ return FALSE;
+
+ *score = 0xF;
+ return TRUE;
+ }
else if (elem->elem_type == SELECTOR_GLOB)
{
/* Treat as lowest matching type */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]