[gnome-builder] counters: add counter for source view instances
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] counters: add counter for source view instances
- Date: Thu, 17 Sep 2015 08:05:15 +0000 (UTC)
commit bf579df4d504f302f729c5f679d520348e8a6488
Author: Christian Hergert <christian hergert me>
Date: Thu Sep 17 01:05:08 2015 -0700
counters: add counter for source view instances
This helps comparing active buffers to source view instances. Useful.
libide/ide-source-view.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/libide/ide-source-view.c b/libide/ide-source-view.c
index 8533201..179e830 100644
--- a/libide/ide-source-view.c
+++ b/libide/ide-source-view.c
@@ -21,6 +21,7 @@
#include <glib/gi18n.h>
#include <stdlib.h>
#include "egg-binding-group.h"
+#include "egg-counter.h"
#include "egg-signal-group.h"
#include "egg-animation.h"
@@ -167,6 +168,7 @@ typedef struct
} SearchMovement;
G_DEFINE_TYPE_WITH_PRIVATE (IdeSourceView, ide_source_view, GTK_SOURCE_TYPE_VIEW)
+EGG_DEFINE_COUNTER (instances, "IdeSourceView", "Instances", "Number of IdeSourceView instances")
enum {
PROP_0,
@@ -5066,6 +5068,8 @@ ide_source_view_finalize (GObject *object)
g_clear_pointer (&priv->selections, g_queue_free);
g_clear_pointer (&priv->snippets, g_queue_free);
+ EGG_COUNTER_DEC (instances);
+
G_OBJECT_CLASS (ide_source_view_parent_class)->finalize (object);
}
@@ -6042,6 +6046,8 @@ ide_source_view_init (IdeSourceView *self)
GtkSourceCompletion *completion;
GtkTargetList *target_list;
+ EGG_COUNTER_INC (instances);
+
priv->target_line_offset = -1;
priv->snippets = g_queue_new ();
priv->selections = g_queue_new ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]