[gnome-builder] editor: move code for reuse
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] editor: move code for reuse
- Date: Wed, 21 Jan 2015 01:06:11 +0000 (UTC)
commit becf8cf0475ac523eef904fe733cc2e7c4823e09
Author: Christian Hergert <christian hergert me>
Date: Tue Jan 20 17:00:33 2015 -0800
editor: move code for reuse
src/editor/gb-editor-view.c | 50 +++++++++++++++++++++---------------------
1 files changed, 25 insertions(+), 25 deletions(-)
---
diff --git a/src/editor/gb-editor-view.c b/src/editor/gb-editor-view.c
index 0f61cd1..1c7be14 100644
--- a/src/editor/gb-editor-view.c
+++ b/src/editor/gb-editor-view.c
@@ -640,6 +640,31 @@ gb_editor_view_set_document (GbEditorView *view,
}
}
+static void
+gb_editor_view_switch_pane (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
+{
+ 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)))
+ gtk_widget_grab_focus (GTK_WIDGET (view->priv->frame));
+ else
+ {
+ GtkWidget *child2;
+
+ child2 = gtk_paned_get_child2 (view->priv->paned);
+ if (child2)
+ gtk_widget_grab_focus (child2);
+ }
+
+ EXIT;
+}
+
static gboolean
gb_editor_view_on_vim_split (GbEditorView *self,
GbSourceVimSplit split,
@@ -797,31 +822,6 @@ gb_editor_view_set_split_enabled (GbEditorView *view,
}
static void
-gb_editor_view_switch_pane (GSimpleAction *action,
- GVariant *parameter,
- gpointer user_data)
-{
- 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)))
- gtk_widget_grab_focus (GTK_WIDGET (view->priv->frame));
- else
- {
- GtkWidget *child2;
-
- child2 = gtk_paned_get_child2 (view->priv->paned);
- if (child2)
- gtk_widget_grab_focus (child2);
- }
-
- EXIT;
-}
-
-static void
gb_editor_view_grab_focus (GtkWidget *widget)
{
GbEditorView *view = (GbEditorView *)widget;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]