diff options
author | Benjamin Otte <otte@redhat.com> | 2015-11-21 02:21:12 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2015-11-21 02:21:12 +0100 |
commit | 6eb89fb6a3861a07e6f7eb8e764772c4fcce6516 (patch) | |
tree | 7e5627bb01a356f41dc6d19cb77f88271ee5a8dd /gtk | |
parent | 7373fd8aab32dcd03ba8cf3080c91eb43f643e68 (diff) | |
download | gtk+-6eb89fb6a3861a07e6f7eb8e764772c4fcce6516.tar.gz |
stylecontext: Copy name when setting widget path
Imitate what we do for the type. This way we don't lose the name on
save/restore.
https://bugzilla.gnome.org/show_bug.cgi?id=758442
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkstylecontext.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c index 46be12c0f9..d07fe1ffdb 100644 --- a/gtk/gtkstylecontext.c +++ b/gtk/gtkstylecontext.c @@ -1081,14 +1081,18 @@ gtk_style_context_set_path (GtkStyleContext *context, GtkWidgetPath *copy = gtk_widget_path_copy (path); gtk_css_path_node_set_widget_path (GTK_CSS_PATH_NODE (root), copy); if (gtk_widget_path_length (copy)) - gtk_css_node_set_widget_type (root, - gtk_widget_path_iter_get_object_type (copy, -1)); + { + gtk_css_node_set_widget_type (root, + gtk_widget_path_iter_get_object_type (copy, -1)); + gtk_css_node_set_name (root, gtk_widget_path_iter_get_object_name (copy, -1)); + } gtk_widget_path_unref (copy); } else { gtk_css_path_node_set_widget_path (GTK_CSS_PATH_NODE (root), NULL); gtk_css_node_set_widget_type (root, G_TYPE_NONE); + gtk_css_node_set_name (root, NULL); } } |