[gnome-builder] app: don't show greeter when opening project files on startup
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] app: don't show greeter when opening project files on startup
- Date: Thu, 30 Jun 2016 21:10:44 +0000 (UTC)
commit fec0655ee750f74eaba274bf6d82148288287796
Author: Christian Hergert <chergert redhat com>
Date: Thu Jun 30 14:10:14 2016 -0700
app: don't show greeter when opening project files on startup
If we are simply creating a new workbench to open a project/file, then we
can avoid creating the greeter (which will avoid loading recent projects).
libide/application/ide-application-open.c | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)
---
diff --git a/libide/application/ide-application-open.c b/libide/application/ide-application-open.c
index 1f81420..36966ee 100644
--- a/libide/application/ide-application-open.c
+++ b/libide/application/ide-application-open.c
@@ -117,9 +117,21 @@ ide_application_open_project_cb (GObject *object,
g_ptr_array_remove_index (state->files, state->files->len - 1);
if (!ide_workbench_open_project_finish (workbench, result, &error))
- g_warning ("%s", error->message);
+ {
+ g_warning ("%s", error->message);
+ gtk_widget_destroy (GTK_WIDGET (workbench));
+ }
else
- ide_workbench_open_files_async (workbench, &file, 1, state->hint, 0, NULL, NULL, NULL);
+ {
+ ide_workbench_open_files_async (workbench,
+ &file, 1,
+ state->hint,
+ 0,
+ g_task_get_cancellable (task),
+ NULL,
+ NULL);
+ gtk_window_present (GTK_WINDOW (workbench));
+ }
ide_application_open_tick (task);
}
@@ -184,6 +196,7 @@ ide_application_open_tick (GTask *task)
workbench = g_object_new (IDE_TYPE_WORKBENCH,
"application", self,
+ "disable-greeter", TRUE,
NULL);
ide_workbench_open_project_async (workbench,
@@ -191,8 +204,6 @@ ide_application_open_tick (GTask *task)
cancellable,
ide_application_open_project_cb,
g_object_ref (task));
-
- gtk_window_present (GTK_WINDOW (workbench));
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]