summaryrefslogtreecommitdiff
path: root/gtk/gtkcsspathnode.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2015-01-24 20:57:17 +0100
committerBenjamin Otte <otte@redhat.com>2015-03-18 15:23:29 +0100
commitd79a44c1afaea14cd8442df61631154fe0bdd441 (patch)
treeb47767e234a0d4524db9dffec3a0fedcd5d9fb9e /gtk/gtkcsspathnode.c
parent6f99a3cdb0cd6b8bc6c31cffde31ad7257915b66 (diff)
downloadgtk+-d79a44c1afaea14cd8442df61631154fe0bdd441.tar.gz
stylecontext: Get rid of create_query_path()
Move that functionality into GtkCssNode.
Diffstat (limited to 'gtk/gtkcsspathnode.c')
-rw-r--r--gtk/gtkcsspathnode.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/gtk/gtkcsspathnode.c b/gtk/gtkcsspathnode.c
index 85358b4666..39a2f073a1 100644
--- a/gtk/gtkcsspathnode.c
+++ b/gtk/gtkcsspathnode.c
@@ -26,11 +26,23 @@ static GtkWidgetPath *
gtk_css_path_node_real_create_widget_path (GtkCssNode *node)
{
GtkCssPathNode *path_node = GTK_CSS_PATH_NODE (node);
+ GtkWidgetPath *path;
+ guint length;
if (path_node->path == NULL)
- return gtk_widget_path_new ();
-
- return gtk_widget_path_copy (path_node->path);
+ path = gtk_widget_path_new ();
+ else
+ path = gtk_widget_path_copy (path_node->path);
+
+ length = gtk_widget_path_length (path);
+ if (length > 0)
+ {
+ gtk_css_node_declaration_add_to_widget_path (gtk_css_node_get_declaration (node),
+ path,
+ length - 1);
+ }
+
+ return path;
}
static const GtkWidgetPath *