[gnome-builder] devhelp: plumb close-tab to devhelp workspace.
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] devhelp: plumb close-tab to devhelp workspace.
- Date: Wed, 10 Sep 2014 06:12:18 +0000 (UTC)
commit f2a0e907789e20faa002f70c37e1cf702f47c592
Author: Christian Hergert <christian hergert me>
Date: Tue Sep 9 23:12:13 2014 -0700
devhelp: plumb close-tab to devhelp workspace.
src/devhelp/gb-devhelp-workspace.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/src/devhelp/gb-devhelp-workspace.c b/src/devhelp/gb-devhelp-workspace.c
index 9aecf40..194103e 100644
--- a/src/devhelp/gb-devhelp-workspace.c
+++ b/src/devhelp/gb-devhelp-workspace.c
@@ -60,6 +60,21 @@ update_show_tabs (GbDevhelpWorkspace *workspace)
}
static void
+on_close_tab_activated (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
+{
+ GbDevhelpWorkspace *workspace = user_data;
+ GbTab *tab;
+
+ g_return_if_fail (GB_IS_DEVHELP_WORKSPACE (workspace));
+
+ tab = gb_multi_notebook_get_active_tab (workspace->priv->multi_notebook);
+ if (tab)
+ gb_tab_close (tab);
+}
+
+static void
on_new_tab_activated (GSimpleAction *action,
GVariant *parameter,
gpointer user_data)
@@ -136,6 +151,7 @@ gb_devhelp_workspace_constructed (GObject *object)
{
GbDevhelpWorkspacePrivate *priv = GB_DEVHELP_WORKSPACE (object)->priv;
static const GActionEntry action_entries[] = {
+ { "close-tab", on_close_tab_activated },
{ "new-tab", on_new_tab_activated },
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]