[gnome-builder/wip/chergert/perspective] app: restore open project functionality
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/chergert/perspective] app: restore open project functionality
- Date: Wed, 18 Nov 2015 00:30:29 +0000 (UTC)
commit 21f8161233aa169ccd9494d55b257ebfe3a485f2
Author: Christian Hergert <chergert redhat com>
Date: Tue Nov 17 16:30:10 2015 -0800
app: restore open project functionality
libide/ide-application-actions.c | 4 ++--
libide/ide-application.c | 32 +++++++++++++++-----------------
2 files changed, 17 insertions(+), 19 deletions(-)
---
diff --git a/libide/ide-application-actions.c b/libide/ide-application-actions.c
index ff61d79..f5a2972 100644
--- a/libide/ide-application-actions.c
+++ b/libide/ide-application-actions.c
@@ -183,7 +183,6 @@ ide_application_actions_about (GSimpleAction *action,
gtk_window_present (GTK_WINDOW (dialog));
}
-#if 0
static void
ide_application_actions_open_project (GSimpleAction *action,
GVariant *variant,
@@ -196,6 +195,7 @@ ide_application_actions_open_project (GSimpleAction *action,
ide_application_show_projects_window (self);
}
+#if 0
static void
ide_application_actions_open_project_cb (GObject *object,
GAsyncResult *result,
@@ -310,7 +310,7 @@ ide_application_actions_shortcuts (GSimpleAction *action,
static const GActionEntry IdeApplicationActions[] = {
{ "about", ide_application_actions_about },
- //{ "open-project", ide_application_actions_open_project },
+ { "open-project", ide_application_actions_open_project },
//{ "new-project", ide_application_actions_new_project },
{ "preferences", ide_application_actions_preferences },
{ "quit", ide_application_actions_quit },
diff --git a/libide/ide-application.c b/libide/ide-application.c
index 44c03f0..6881346 100644
--- a/libide/ide-application.c
+++ b/libide/ide-application.c
@@ -575,8 +575,7 @@ ide_application_open (GApplication *application,
void
ide_application_show_projects_window (IdeApplication *self)
{
-#if 0
- IdeProjectsDialog *window;
+ GtkWindow *window;
GList *windows;
g_assert (IDE_IS_APPLICATION (self));
@@ -585,26 +584,26 @@ ide_application_show_projects_window (IdeApplication *self)
for (; windows; windows = windows->next)
{
- if (IDE_IS_GREETER_WINDOW (windows->data))
+ window = windows->data;
+
+ if (IDE_IS_WORKBENCH (window))
{
- gtk_window_present (windows->data);
- return;
- }
- }
+ const gchar *name;
- if (self->recent_projects == NULL)
- {
- self->recent_projects = ide_recent_projects_new ();
- ide_recent_projects_discover_async (self->recent_projects, NULL, NULL, NULL);
+ name = ide_workbench_get_visible_perspective_name (IDE_WORKBENCH (window));
+
+ if (ide_str_equal0 ("greeter", name))
+ {
+ gtk_window_present (windows->data);
+ return;
+ }
+ }
}
- window = g_object_new (IDE_TYPE_GREETER_WINDOW,
+ window = g_object_new (IDE_TYPE_WORKBENCH,
"application", self,
- "recent-projects", self->recent_projects,
NULL);
- gtk_window_group_add_window (self->greeter_group, GTK_WINDOW (window));
- gtk_window_present (GTK_WINDOW (window));
-#endif
+ gtk_window_present (window);
}
static void
@@ -636,7 +635,6 @@ ide_application_activate (GApplication *application)
workbench = g_object_new (IDE_TYPE_WORKBENCH,
"application", self,
NULL);
- gtk_window_maximize (GTK_WINDOW (workbench));
gtk_window_present (GTK_WINDOW (workbench));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]