X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=gtk%2Fgtkcssmatcher.c;h=ccdf5479cf853575e5e1fd3615a05c09f9a8b0e9;hb=a960230a20f86ebb31594a40132e341c1b7a7c21;hp=68207387fef8f729726b16707001c8f854e4a989;hpb=16f2b20f9610d7d6658c6b14c9e95f0bf6384fd9;p=~andy%2Fgtk diff --git a/gtk/gtkcssmatcher.c b/gtk/gtkcssmatcher.c index 68207387f..ccdf5479c 100644 --- a/gtk/gtkcssmatcher.c +++ b/gtk/gtkcssmatcher.c @@ -62,13 +62,11 @@ gtk_css_matcher_widget_path_get_state (const GtkCssMatcher *matcher) } static gboolean -gtk_css_matcher_widget_path_has_name (const GtkCssMatcher *matcher, - const char *name) +gtk_css_matcher_widget_path_has_type (const GtkCssMatcher *matcher, + GType type) { const GtkWidgetPath *siblings; - GType type; - - type = g_type_from_name (name); + siblings = gtk_widget_path_iter_get_siblings (matcher->path.path, matcher->path.index); if (siblings && matcher->path.sibling_index != gtk_widget_path_iter_get_sibling_index (matcher->path.path, matcher->path.index)) return g_type_is_a (gtk_widget_path_iter_get_object_type (siblings, matcher->path.sibling_index), type); @@ -179,7 +177,7 @@ static const GtkCssMatcherClass GTK_CSS_MATCHER_WIDGET_PATH = { gtk_css_matcher_widget_path_get_parent, gtk_css_matcher_widget_path_get_previous, gtk_css_matcher_widget_path_get_state, - gtk_css_matcher_widget_path_has_name, + gtk_css_matcher_widget_path_has_type, gtk_css_matcher_widget_path_has_class, gtk_css_matcher_widget_path_has_id, gtk_css_matcher_widget_path_has_regions, @@ -236,8 +234,8 @@ gtk_css_matcher_any_get_state (const GtkCssMatcher *matcher) } static gboolean -gtk_css_matcher_any_has_name (const GtkCssMatcher *matcher, - const char *name) +gtk_css_matcher_any_has_type (const GtkCssMatcher *matcher, + GType type) { return TRUE; } @@ -283,7 +281,7 @@ static const GtkCssMatcherClass GTK_CSS_MATCHER_ANY = { gtk_css_matcher_any_get_parent, gtk_css_matcher_any_get_previous, gtk_css_matcher_any_get_state, - gtk_css_matcher_any_has_name, + gtk_css_matcher_any_has_type, gtk_css_matcher_any_has_class, gtk_css_matcher_any_has_id, gtk_css_matcher_any_has_regions, @@ -332,11 +330,11 @@ gtk_css_matcher_superset_get_state (const GtkCssMatcher *matcher) } static gboolean -gtk_css_matcher_superset_has_name (const GtkCssMatcher *matcher, - const char *name) +gtk_css_matcher_superset_has_type (const GtkCssMatcher *matcher, + GType type) { if (matcher->superset.relevant & GTK_CSS_CHANGE_NAME) - return _gtk_css_matcher_has_name (matcher->superset.subset, name); + return _gtk_css_matcher_has_type (matcher->superset.subset, type); else return TRUE; } @@ -402,7 +400,7 @@ static const GtkCssMatcherClass GTK_CSS_MATCHER_SUPERSET = { gtk_css_matcher_superset_get_parent, gtk_css_matcher_superset_get_previous, gtk_css_matcher_superset_get_state, - gtk_css_matcher_superset_has_name, + gtk_css_matcher_superset_has_type, gtk_css_matcher_superset_has_class, gtk_css_matcher_superset_has_id, gtk_css_matcher_superset_has_regions,