[gnome-builder/wip/libide-merge] workbench: implement new-document action
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/libide-merge] workbench: implement new-document action
- Date: Mon, 23 Mar 2015 10:14:55 +0000 (UTC)
commit 56cca4c7e3ce16d57304e7f2589a29d493afc0c7
Author: Christian Hergert <christian hergert me>
Date: Mon Mar 23 02:51:04 2015 -0700
workbench: implement new-document action
src/workbench/gb-workbench-actions.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/src/workbench/gb-workbench-actions.c b/src/workbench/gb-workbench-actions.c
index eeda7b5..3d6a844 100644
--- a/src/workbench/gb-workbench-actions.c
+++ b/src/workbench/gb-workbench-actions.c
@@ -50,6 +50,23 @@ gb_workbench_actions_rebuild (GSimpleAction *action,
}
static void
+gb_workbench_actions_new_document (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
+{
+ GbWorkbench *self = user_data;
+ IdeContext *context;
+ IdeBufferManager *buffer_manager;
+ g_autoptr(IdeBuffer) buffer = NULL;
+
+ g_assert (GB_IS_WORKBENCH (self));
+
+ context = gb_workbench_get_context (self);
+ buffer_manager = ide_context_get_buffer_manager (context);
+ buffer = ide_buffer_manager_create_buffer (buffer_manager);
+}
+
+static void
gb_workbench_actions_global_search (GSimpleAction *action,
GVariant *parameter,
gpointer user_data)
@@ -262,6 +279,7 @@ static const GActionEntry GbWorkbenchActions[] = {
{ "build", gb_workbench_actions_build },
{ "dayhack", gb_workbench_actions_dayhack },
{ "global-search", gb_workbench_actions_global_search },
+ { "new-document", gb_workbench_actions_new_document },
{ "nighthack", gb_workbench_actions_nighthack },
{ "open", gb_workbench_actions_open },
{ "open-uri-list", gb_workbench_actions_open_uri_list, "as" },
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]