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:
@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
enum {
|
enum {
|
||||||
COLUMN_NAME,
|
COLUMN_NAME,
|
||||||
|
COLUMN_TYPE,
|
||||||
COLUMN_VISIBLE,
|
COLUMN_VISIBLE,
|
||||||
COLUMN_CLASSES,
|
COLUMN_CLASSES,
|
||||||
COLUMN_ID,
|
COLUMN_ID,
|
||||||
@ -99,6 +100,10 @@ gtk_inspector_css_node_tree_get_node_value (GtkTreeModelCssNode *model,
|
|||||||
switch (column)
|
switch (column)
|
||||||
{
|
{
|
||||||
case COLUMN_NAME:
|
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)));
|
g_value_set_string (value, g_type_name (gtk_css_node_get_widget_type (node)));
|
||||||
break;
|
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,
|
priv->model = gtk_tree_model_css_node_new (gtk_inspector_css_node_tree_get_node_value,
|
||||||
N_COLUMNS,
|
N_COLUMNS,
|
||||||
G_TYPE_STRING,
|
G_TYPE_STRING,
|
||||||
|
G_TYPE_STRING,
|
||||||
G_TYPE_BOOLEAN,
|
G_TYPE_BOOLEAN,
|
||||||
G_TYPE_STRING,
|
G_TYPE_STRING,
|
||||||
G_TYPE_STRING);
|
G_TYPE_STRING);
|
||||||
|
|||||||
@ -12,40 +12,53 @@
|
|||||||
<object class="GtkTreeView" id="tree_view">
|
<object class="GtkTreeView" id="tree_view">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<child>
|
<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="resizable">True</property>
|
||||||
<property name="title" translatable="yes">Name</property>
|
<property name="title" translatable="yes">Name</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkCellRendererText"/>
|
<object class="GtkCellRendererText"/>
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="text">0</attribute>
|
<attribute name="text">0</attribute>
|
||||||
<attribute name="sensitive">1</attribute>
|
<attribute name="sensitive">2</attribute>
|
||||||
</attributes>
|
</attributes>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkTreeViewColumn" id="treeviewcolumn2">
|
<object class="GtkTreeViewColumn">
|
||||||
<property name="resizable">True</property>
|
<property name="resizable">True</property>
|
||||||
<property name="title" translatable="yes">ID</property>
|
<property name="title" translatable="yes">ID</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkCellRendererText"/>
|
<object class="GtkCellRendererText"/>
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="text">3</attribute>
|
<attribute name="text">4</attribute>
|
||||||
<attribute name="sensitive">1</attribute>
|
<attribute name="sensitive">2</attribute>
|
||||||
</attributes>
|
</attributes>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkTreeViewColumn" id="treeviewcolumn3">
|
<object class="GtkTreeViewColumn">
|
||||||
<property name="resizable">True</property>
|
<property name="resizable">True</property>
|
||||||
<property name="title" translatable="yes">Classes</property>
|
<property name="title" translatable="yes">Classes</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkCellRendererText"/>
|
<object class="GtkCellRendererText"/>
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="text">2</attribute>
|
<attribute name="text">3</attribute>
|
||||||
<attribute name="sensitive">1</attribute>
|
<attribute name="sensitive">2</attribute>
|
||||||
</attributes>
|
</attributes>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
|||||||
Reference in New Issue
Block a user