[gtk+] inspector: Add a graph cell renderer
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] inspector: Add a graph cell renderer
- Date: Tue, 14 Oct 2014 12:18:58 +0000 (UTC)
commit 43ad7c9714b1be81d74289845dddbfdaf6242ba2
Author: Benjamin Otte <otte redhat com>
Date: Tue Oct 14 13:51:09 2014 +0200
inspector: Add a graph cell renderer
... and use it to display graphs for how object counts changed.
gtk/inspector/Makefile.am | 2 ++
gtk/inspector/init.c | 2 ++
gtk/inspector/statistics.ui | 34 ++++++++++++++++++++++++++++++++++
gtk/inspector/statistics.ui.h | 2 ++
4 files changed, 40 insertions(+), 0 deletions(-)
---
diff --git a/gtk/inspector/Makefile.am b/gtk/inspector/Makefile.am
index da016f4..e12f3e0 100644
--- a/gtk/inspector/Makefile.am
+++ b/gtk/inspector/Makefile.am
@@ -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 \
diff --git a/gtk/inspector/init.c b/gtk/inspector/init.c
index 3e523b3..80b303d 100644
--- a/gtk/inspector/init.c
+++ b/gtk/inspector/init.c
@@ -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);
diff --git a/gtk/inspector/statistics.ui b/gtk/inspector/statistics.ui
index 04148cd..7c4ca20 100644
--- a/gtk/inspector/statistics.ui
+++ b/gtk/inspector/statistics.ui
@@ -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>
diff --git a/gtk/inspector/statistics.ui.h b/gtk/inspector/statistics.ui.h
index bbb27b3..b1fbb46 100644
--- a/gtk/inspector/statistics.ui.h
+++ b/gtk/inspector/statistics.ui.h
@@ -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");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]