inspector: Show names for css nodes

Currently, we don't have any css nodes with names, but we will soon.
This commit is contained in:
Matthias Clasen 2015-10-22 20:58:08 -04:00
parent 7cf3eec85b
commit e0d9250a07
2 changed files with 27 additions and 8 deletions

View File

@ -31,6 +31,7 @@
enum {
COLUMN_NAME,
COLUMN_TYPE,
COLUMN_VISIBLE,
COLUMN_CLASSES,
COLUMN_ID,
@ -99,6 +100,10 @@ gtk_inspector_css_node_tree_get_node_value (GtkTreeModelCssNode *model,
switch (column)
{
case COLUMN_NAME:
g_value_set_string (value, gtk_css_node_get_name (node));
break;
case COLUMN_TYPE:
g_value_set_string (value, g_type_name (gtk_css_node_get_widget_type (node)));
break;
@ -136,6 +141,7 @@ gtk_inspector_css_node_tree_init (GtkInspectorCssNodeTree *cnt)
priv->model = gtk_tree_model_css_node_new (gtk_inspector_css_node_tree_get_node_value,
N_COLUMNS,
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_BOOLEAN,
G_TYPE_STRING,
G_TYPE_STRING);

View File

@ -12,40 +12,53 @@
<object class="GtkTreeView" id="tree_view">
<property name="visible">True</property>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn1">
<object class="GtkTreeViewColumn">
<property name="resizable">True</property>
<property name="title" translatable="yes">Type</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">1</attribute>
<attribute name="sensitive">2</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="resizable">True</property>
<property name="title" translatable="yes">Name</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">0</attribute>
<attribute name="sensitive">1</attribute>
<attribute name="sensitive">2</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn2">
<object class="GtkTreeViewColumn">
<property name="resizable">True</property>
<property name="title" translatable="yes">ID</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">3</attribute>
<attribute name="sensitive">1</attribute>
<attribute name="text">4</attribute>
<attribute name="sensitive">2</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn3">
<object class="GtkTreeViewColumn">
<property name="resizable">True</property>
<property name="title" translatable="yes">Classes</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">2</attribute>
<attribute name="sensitive">1</attribute>
<attribute name="text">3</attribute>
<attribute name="sensitive">2</attribute>
</attributes>
</child>
</object>