inspector: Add a graph cell renderer

... and use it to display graphs for how object counts changed.
This commit is contained in:
Benjamin Otte 2014-10-14 13:51:09 +02:00
parent 0a6755b57c
commit 43ad7c9714
4 changed files with 40 additions and 0 deletions

View File

@ -19,6 +19,8 @@ libgtkinspector_la_SOURCES = \
action-editor.c \
actions.h \
actions.c \
cellrenderergraph.h \
cellrenderergraph.c \
classes-list.h \
classes-list.c \
css-editor.h \

View File

@ -25,6 +25,7 @@
#include "init.h"
#include "actions.h"
#include "cellrenderergraph.h"
#include "classes-list.h"
#include "css-editor.h"
#include "data-list.h"
@ -51,6 +52,7 @@ gtk_inspector_init (void)
{
gtk_inspector_register_resource ();
g_type_ensure (GTK_TYPE_CELL_RENDERER_GRAPH);
g_type_ensure (GTK_TYPE_GRAPH_DATA);
g_type_ensure (GTK_TYPE_INSPECTOR_ACTIONS);
g_type_ensure (GTK_TYPE_INSPECTOR_CLASSES_LIST);

View File

@ -110,6 +110,40 @@
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="column_self_graph">
<property name="visible">True</property>
<property name="sort-column-id">4</property>
<property name="title" translatable="yes">Self</property>
<child>
<object class="GtkCellRendererGraph" id="renderer_self_graph">
<property name="minimum">0</property>
<property name="xpad">1</property>
<property name="ypad">1</property>
</object>
<attributes>
<attribute name="data">6</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="column_cumulative_graph">
<property name="visible">True</property>
<property name="sort-column-id">5</property>
<property name="title" translatable="yes">Cumulative</property>
<child>
<object class="GtkCellRendererGraph" id="renderer_cumulative_graph">
<property name="minimum">0</property>
<property name="xpad">1</property>
<property name="ypad">1</property>
</object>
<attributes>
<attribute name="data">7</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child>
</object>

View File

@ -4,4 +4,6 @@ N_("Self 1");
N_("Cumulative 1");
N_("Self 2");
N_("Cumulative 2");
N_("Self");
N_("Cumulative");
N_("Enable statistics with GOBJECT_DEBUG=instance-count");