[gnome-builder] workbench: create document manager for GbWorkbench
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] workbench: create document manager for GbWorkbench
- Date: Sun, 14 Dec 2014 11:35:04 +0000 (UTC)
commit f68b350cc1399cc26888cfc8db3e6465c5d09ca4
Author: Christian Hergert <christian hergert me>
Date: Sun Dec 14 03:31:02 2014 -0800
workbench: create document manager for GbWorkbench
src/workbench/gb-workbench.c | 28 ++++++++++++++++++----------
1 files changed, 18 insertions(+), 10 deletions(-)
---
diff --git a/src/workbench/gb-workbench.c b/src/workbench/gb-workbench.c
index ffc9b14..9bd8482 100644
--- a/src/workbench/gb-workbench.c
+++ b/src/workbench/gb-workbench.c
@@ -38,6 +38,7 @@
struct _GbWorkbenchPrivate
{
GbCommandManager *command_manager;
+ GbDocumentManager *document_manager;
GbNavigationList *navigation_list;
GbWorkspace *active_workspace;
@@ -97,6 +98,22 @@ gb_workbench_get_command_manager (GbWorkbench *workbench)
}
/**
+ * gb_workbench_get_document_manager:
+ * @workbench: A #GbWorkbench
+ *
+ * Retrieves the document manager for the workbench.
+ *
+ * Returns: (transfer none): A #GbDocumentManager.
+ */
+GbDocumentManager *
+gb_workbench_get_document_manager (GbWorkbench *workbench)
+{
+ g_return_val_if_fail (GB_IS_WORKBENCH (workbench), NULL);
+
+ return workbench->priv->document_manager;
+}
+
+/**
* gb_workbench_get_navigation_list:
*
* Fetches the navigation list for the workbench. This can be used to move
@@ -481,16 +498,6 @@ gb_workbench_constructed (GObject *object)
EXIT;
}
-GbDocumentManager *
-gb_workbench_get_document_manager (GbWorkbench *workbench)
-{
- g_return_val_if_fail (GB_IS_WORKBENCH (workbench), NULL);
-
- /* TODO: Store document manager per project/workbench */
-
- return gb_document_manager_get_default ();
-}
-
static void
gb_workbench_save_cb (GObject *object,
GAsyncResult *result,
@@ -794,6 +801,7 @@ gb_workbench_init (GbWorkbench *workbench)
workbench->priv = gb_workbench_get_instance_private (workbench);
+ workbench->priv->document_manager = gb_document_manager_new ();
gtk_widget_init_template (GTK_WIDGET (workbench));
workbench->priv->command_manager =
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]