[gnome-builder] libide: add some tracing helpers
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] libide: add some tracing helpers
- Date: Mon, 23 Mar 2015 23:52:41 +0000 (UTC)
commit d0a918855c1cdfb3a8ffa650ab487ab8843b7256
Author: Christian Hergert <christian hergert me>
Date: Tue Mar 3 23:53:25 2015 -0800
libide: add some tracing helpers
libide/ide-source-view.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/libide/ide-source-view.c b/libide/ide-source-view.c
index e17028b..bd80247 100644
--- a/libide/ide-source-view.c
+++ b/libide/ide-source-view.c
@@ -1192,6 +1192,17 @@ ide_source_view_key_press_event (GtkWidget *widget,
gboolean handled;
gboolean remove = FALSE;
+#ifndef IDE_DISABLE_TRACE
+ {
+ gchar *name = NULL;
+
+ g_object_get (priv->mode, "name", &name, NULL);
+ IDE_TRACE_MSG ("dispatching to mode \"%s\": (%s)",
+ name, event->string ?: "");
+ g_free (name);
+ }
+#endif
+
/* hold a reference incase binding changes mode */
mode = g_object_ref (priv->mode);
@@ -1450,6 +1461,7 @@ ide_source_view_real_set_mode (IdeSourceView *self,
IdeSourceViewPrivate *priv = ide_source_view_get_instance_private (self);
IDE_ENTRY;
+ IDE_TRACE_MSG ("mode (%s)", mode ?: "<default>");
g_assert (IDE_IS_SOURCE_VIEW (self));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]