[gnome-builder] app: display new document by default if no file was provided in argv
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] app: display new document by default if no file was provided in argv
- Date: Mon, 19 Jan 2015 07:31:00 +0000 (UTC)
commit 3c1c589bfad35e955ff9df98a8967b5c259e11e0
Author: Christian Hergert <christian hergert me>
Date: Sun Jan 18 23:30:48 2015 -0800
app: display new document by default if no file was provided in argv
This might change longer term once we have project support plumbed in,
and can display project information by default. But for now this is
probably better.
src/app/gb-application.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/app/gb-application.c b/src/app/gb-application.c
index 2a3b38e..fae3040 100644
--- a/src/app/gb-application.c
+++ b/src/app/gb-application.c
@@ -398,6 +398,7 @@ static void
gb_application_activate (GApplication *application)
{
GbWorkbench *workbench;
+ GbWorkspace *workspace;
GList *list;
g_return_if_fail (GB_IS_APPLICATION (application));
@@ -414,6 +415,8 @@ gb_application_activate (GApplication *application)
}
workbench = gb_application_create_workbench (application);
+ workspace = gb_workbench_get_workspace (workbench, GB_TYPE_EDITOR_WORKSPACE);
+ gb_editor_workspace_new_document (GB_EDITOR_WORKSPACE (workspace));
gtk_window_present (GTK_WINDOW (workbench));
}
@@ -429,6 +432,8 @@ gb_application_open (GApplication *application,
GList *list;
guint i;
+ ENTRY;
+
g_assert (GB_IS_APPLICATION (application));
list = gtk_application_get_windows (GTK_APPLICATION (application));
@@ -457,6 +462,8 @@ gb_application_open (GApplication *application,
g_return_if_fail (G_IS_FILE (files [i]));
gb_editor_workspace_open (GB_EDITOR_WORKSPACE (workspace), files [i]);
}
+
+ EXIT;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]