[gnome-builder/document-manager] workspace: workaround code until we have proper loading



commit e1f752b6132a2750e85721e6c05e78f949c7b1a6
Author: Christian Hergert <christian hergert me>
Date:   Mon Dec 8 00:28:35 2014 -0800

    workspace: workaround code until we have proper loading

 src/editor/gb-editor-workspace.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/editor/gb-editor-workspace.c b/src/editor/gb-editor-workspace.c
index 12b6170..3393407 100644
--- a/src/editor/gb-editor-workspace.c
+++ b/src/editor/gb-editor-workspace.c
@@ -19,6 +19,7 @@
 #define G_LOG_DOMAIN "editor-workspace"
 
 #include <glib/gi18n.h>
+#include <gtksourceview/gtksource.h>
 
 #include "gb-devhelp-tab.h"
 #include "gb-editor-document.h"
@@ -325,11 +326,15 @@ open_tab (GSimpleAction *action,
 
           if (!document)
             {
+              GtkSourceFile *sfile;
+
               document = GB_DOCUMENT (gb_editor_document_new ());
               gb_document_manager_add (manager, document);
               gb_document_grid_focus_document (workspace->priv->document_grid,
                                                document);
               /* TODO: open */
+              sfile = gb_editor_document_get_file (GB_EDITOR_DOCUMENT (document));
+              gtk_source_file_set_location (sfile, file);
               //g_object_unref (document);
             }
           else


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]