[gnome-builder/editor-layout] add scroll up/down commands
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/editor-layout] add scroll up/down commands
- Date: Sun, 30 Nov 2014 13:20:12 +0000 (UTC)
commit d87b02c33eed22882b663834f1f26b005a4f9b2b
Author: Christian Hergert <christian hergert me>
Date: Sun Nov 30 02:48:46 2014 -0800
add scroll up/down commands
src/editor/gb-editor-workspace.c | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
---
diff --git a/src/editor/gb-editor-workspace.c b/src/editor/gb-editor-workspace.c
index 46cd3c3..3f3f81b 100644
--- a/src/editor/gb-editor-workspace.c
+++ b/src/editor/gb-editor-workspace.c
@@ -78,6 +78,32 @@ save_as_tab (GSimpleAction *action,
}
static void
+scroll_up_tab (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
+{
+ GbEditorWorkspace *workspace = user_data;
+ GbTab *tab;
+
+ tab = gb_tab_grid_get_active (workspace->priv->tab_grid);
+ if (GB_IS_EDITOR_TAB (tab))
+ gb_editor_tab_scroll_up (GB_EDITOR_TAB (tab));
+}
+
+static void
+scroll_down_tab (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
+{
+ GbEditorWorkspace *workspace = user_data;
+ GbTab *tab;
+
+ tab = gb_tab_grid_get_active (workspace->priv->tab_grid);
+ if (GB_IS_EDITOR_TAB (tab))
+ gb_editor_tab_scroll_down (GB_EDITOR_TAB (tab));
+}
+
+static void
new_tab (GSimpleAction *action,
GVariant *parameter,
gpointer user_data)
@@ -150,6 +176,8 @@ gb_editor_workspace_init (GbEditorWorkspace *workspace)
{ "new-tab", new_tab },
{ "save", save_tab },
{ "save-as", save_as_tab },
+ { "scroll-up", scroll_up_tab },
+ { "scroll-down", scroll_down_tab },
};
workspace->priv = gb_editor_workspace_get_instance_private (workspace);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]