[gnome-builder/wip/project-selector: 60/72] project-selector: don't use modal or transient for for new-project dialog
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/project-selector: 60/72] project-selector: don't use modal or transient for for new-project dialog
- Date: Tue, 7 Apr 2015 23:02:43 +0000 (UTC)
commit abec93abb31a5ae3bd249062b6b78cbb141f19c0
Author: Christian Hergert <christian hergert me>
Date: Mon Apr 6 15:54:08 2015 -0700
project-selector: don't use modal or transient for for new-project dialog
Setting the type-hint to dialog is enough to get the effect we want, which
is the dialog to always stay above the workbench windows. Making them
modal or transient-for implies that 1) all other windows should be blocked
and 2) that the operation is relative to the workbench. Neither of these
is true.
We do, however, want to stay transient-for the select-project window when
the "New" button in the header bar is pressed.
src/app/gb-application-actions.c | 15 ---------------
1 files changed, 0 insertions(+), 15 deletions(-)
---
diff --git a/src/app/gb-application-actions.c b/src/app/gb-application-actions.c
index 7345368..f48fe77 100644
--- a/src/app/gb-application-actions.c
+++ b/src/app/gb-application-actions.c
@@ -214,25 +214,10 @@ gb_application_actions_new_project (GSimpleAction *action,
{
GbApplication *self = user_data;
GtkWindow *window;
- GList *windows;
- GList *iter;
g_assert (GB_IS_APPLICATION (self));
- windows = gtk_application_get_windows (GTK_APPLICATION (self));
-
- for (iter = windows; iter; iter = iter->next)
- {
- if (GB_IS_PROJECT_WINDOW (iter->data))
- {
- gtk_window_present (GTK_WINDOW (iter->data));
- return;
- }
- }
-
window = g_object_new (GB_TYPE_NEW_PROJECT_DIALOG,
- "modal", TRUE,
- "transient-for", windows ? windows->data : NULL,
"type-hint", GDK_WINDOW_TYPE_HINT_DIALOG,
NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]