GtkCssProvider: Compare GtkWidgetPath regions with css.

This commit is contained in:
Carlos Garnacho 2010-04-23 01:31:44 +02:00
parent 977a972358
commit 67c4f8d02e

View File

@ -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 */