[gtk+] gtkwidgetpath: update gtk_widget_path_to_string
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gtkwidgetpath: update gtk_widget_path_to_string
- Date: Thu, 14 Jan 2016 22:36:49 +0000 (UTC)
commit c60cea3037719508e42b4ebf91ef076d1c7b74e1
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Tue Jan 12 21:34:56 2016 +0200
gtkwidgetpath: update gtk_widget_path_to_string
From gtk_widget_path_iter_set_object_name documentation:
"When set, the object name overrides the object type when matching CSS"
Update gtk_widget_path_to_string to match this behaviour.
gtk/gtkwidgetpath.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkwidgetpath.c b/gtk/gtkwidgetpath.c
index f28ddc9..f0297df 100644
--- a/gtk/gtkwidgetpath.c
+++ b/gtk/gtkwidgetpath.c
@@ -298,7 +298,10 @@ gtk_widget_path_to_string (const GtkWidgetPath *path)
if (i > 0)
g_string_append_c (string, ' ');
- g_string_append (string, g_type_name (gtk_css_node_declaration_get_type (elem->decl)));
+ if (gtk_css_node_declaration_get_name (elem->decl))
+ g_string_append (string, gtk_css_node_declaration_get_name (elem->decl));
+ else
+ g_string_append (string, g_type_name (gtk_css_node_declaration_get_type (elem->decl)));
if (gtk_css_node_declaration_get_id (elem->decl))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]