[gnome-builder/search] editor: add some debug logging for focus tracking
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/search] editor: add some debug logging for focus tracking
- Date: Sun, 14 Dec 2014 23:32:55 +0000 (UTC)
commit f5c7eb82c1c256e7da5dcab2ca2b50ba2917c6d9
Author: Christian Hergert <christian hergert me>
Date: Sun Dec 14 15:32:03 2014 -0800
editor: add some debug logging for focus tracking
src/editor/gb-editor-frame.c | 14 ++++++++++++--
src/editor/gb-editor-view.c | 15 +++++++++++++++
src/editor/gb-editor-workspace.c | 7 ++++++-
3 files changed, 33 insertions(+), 3 deletions(-)
---
diff --git a/src/editor/gb-editor-frame.c b/src/editor/gb-editor-frame.c
index 1ba39a7..4e8bb07 100644
--- a/src/editor/gb-editor-frame.c
+++ b/src/editor/gb-editor-frame.c
@@ -682,6 +682,8 @@ gb_editor_frame_on_search_entry_key_press (GbEditorFrame *frame,
GdkEventKey *event,
GdTaggedEntry *entry)
{
+ ENTRY;
+
g_assert (GD_IS_TAGGED_ENTRY (entry));
g_assert (GB_IS_EDITOR_FRAME (frame));
@@ -690,21 +692,25 @@ gb_editor_frame_on_search_entry_key_press (GbEditorFrame *frame,
gtk_revealer_set_reveal_child (frame->priv->search_revealer, FALSE);
gb_source_view_set_show_shadow (frame->priv->source_view, FALSE);
gtk_widget_grab_focus (GTK_WIDGET (frame->priv->source_view));
- return GDK_EVENT_STOP;
+ RETURN (GDK_EVENT_STOP);
}
- return GDK_EVENT_PROPAGATE;
+ RETURN (GDK_EVENT_PROPAGATE);
}
static void
gb_editor_frame_on_search_entry_activate (GbEditorFrame *frame,
GdTaggedEntry *entry)
{
+ ENTRY;
+
g_assert (GD_IS_TAGGED_ENTRY (entry));
g_assert (GB_IS_EDITOR_FRAME (frame));
gb_editor_frame_move_next_match (frame);
gtk_widget_grab_focus (GTK_WIDGET (frame->priv->source_view));
+
+ EXIT;
}
static void
@@ -922,9 +928,13 @@ gb_editor_frame_grab_focus (GtkWidget *widget)
{
GbEditorFrame *frame = (GbEditorFrame *)widget;
+ ENTRY;
+
g_return_if_fail (GB_IS_EDITOR_FRAME (frame));
gtk_widget_grab_focus (GTK_WIDGET (frame->priv->source_view));
+
+ EXIT;
}
static void
diff --git a/src/editor/gb-editor-view.c b/src/editor/gb-editor-view.c
index 3ad2c98..cbff5c3 100644
--- a/src/editor/gb-editor-view.c
+++ b/src/editor/gb-editor-view.c
@@ -26,6 +26,7 @@
#include "gb-editor-view.h"
#include "gb-glib.h"
#include "gb-html-document.h"
+#include "gb-log.h"
#include "gb-widget.h"
struct _GbEditorViewPrivate
@@ -416,6 +417,8 @@ gb_editor_view_toggle_split (GbEditorView *view)
GbEditorViewPrivate *priv;
GtkWidget *child2;
+ ENTRY;
+
g_return_if_fail (GB_IS_EDITOR_VIEW (view));
priv = view->priv;
@@ -437,6 +440,8 @@ gb_editor_view_toggle_split (GbEditorView *view)
NULL);
gtk_widget_grab_focus (child2);
}
+
+ EXIT;
}
static void
@@ -469,6 +474,8 @@ gb_editor_view_switch_pane (GSimpleAction *action,
{
GbEditorView *view = user_data;
+ ENTRY;
+
g_return_if_fail (GB_IS_EDITOR_VIEW (view));
if (!gtk_widget_has_focus (GTK_WIDGET (view->priv->frame->priv->source_view)))
@@ -481,6 +488,8 @@ gb_editor_view_switch_pane (GSimpleAction *action,
if (child2)
gtk_widget_grab_focus (child2);
}
+
+ EXIT;
}
static void
@@ -488,7 +497,13 @@ gb_editor_view_grab_focus (GtkWidget *widget)
{
GbEditorView *view = (GbEditorView *)widget;
+ ENTRY;
+
+ g_return_if_fail (GB_IS_EDITOR_VIEW (view));
+
gtk_widget_grab_focus (GTK_WIDGET (view->priv->frame));
+
+ EXIT;
}
static void
diff --git a/src/editor/gb-editor-workspace.c b/src/editor/gb-editor-workspace.c
index d6c5746..adedf76 100644
--- a/src/editor/gb-editor-workspace.c
+++ b/src/editor/gb-editor-workspace.c
@@ -26,6 +26,7 @@
#include "gb-document-grid.h"
#include "gb-editor-document.h"
#include "gb-editor-workspace.h"
+#include "gb-log.h"
#include "gb-tree.h"
#include "gb-widget.h"
#include "gb-workbench.h"
@@ -191,11 +192,15 @@ gb_editor_workspace_action_open (GSimpleAction *action,
static void
gb_editor_workspace_grab_focus (GtkWidget *widget)
{
- GbEditorWorkspace *workspace = GB_EDITOR_WORKSPACE (widget);
+ GbEditorWorkspace *workspace = (GbEditorWorkspace *)widget;
+
+ ENTRY;
g_return_if_fail (GB_IS_EDITOR_WORKSPACE (workspace));
gtk_widget_grab_focus (GTK_WIDGET (workspace->priv->document_grid));
+
+ EXIT;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]