[gnome-builder/editor-layout] implement close-tab for editor workspace
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/editor-layout] implement close-tab for editor workspace
- Date: Sun, 30 Nov 2014 13:21:29 +0000 (UTC)
commit d85000790155ddecb3ed5b2afe99f2afa951bed2
Author: Christian Hergert <christian hergert me>
Date: Sun Nov 30 04:45:42 2014 -0800
implement close-tab for editor workspace
src/editor/gb-editor-workspace.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/src/editor/gb-editor-workspace.c b/src/editor/gb-editor-workspace.c
index d8254f1..5b463df 100644
--- a/src/editor/gb-editor-workspace.c
+++ b/src/editor/gb-editor-workspace.c
@@ -102,6 +102,19 @@ scroll_down_tab (GSimpleAction *action,
}
static void
+close_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_TAB (tab))
+ gb_tab_close (GB_TAB (tab));
+}
+
+static void
new_tab (GSimpleAction *action,
GVariant *parameter,
gpointer user_data)
@@ -171,6 +184,7 @@ static void
gb_editor_workspace_init (GbEditorWorkspace *workspace)
{
const GActionEntry entries[] = {
+ { "close-tab", close_tab },
{ "new-tab", new_tab },
{ "save", save_tab },
{ "save-as", save_as_tab },
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]