[gnome-builder/wip/greeter] greeter: destroy transient-for if its a greeter window
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/greeter] greeter: destroy transient-for if its a greeter window
- Date: Mon, 11 May 2015 00:20:40 +0000 (UTC)
commit a53414a274911ea73b7657967a5e9336b565223b
Author: Christian Hergert <christian hergert me>
Date: Sun May 10 17:14:59 2015 -0700
greeter: destroy transient-for if its a greeter window
When using the New Project from the greeter, we should destroy the parent
as well after the project has loaded.
src/app/gb-application-actions.c | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/src/app/gb-application-actions.c b/src/app/gb-application-actions.c
index e180921..43aa8c8 100644
--- a/src/app/gb-application-actions.c
+++ b/src/app/gb-application-actions.c
@@ -193,6 +193,7 @@ gb_application_actions_open_project_cb (GObject *object,
GbApplication *self = (GbApplication *)object;
g_autoptr(GbNewProjectDialog) window = user_data;
g_autoptr(GError) error = NULL;
+ GtkWindow *transient_for;
g_assert (GB_IS_NEW_PROJECT_DIALOG (window));
@@ -202,8 +203,20 @@ gb_application_actions_open_project_cb (GObject *object,
g_warning ("%s", error->message);
}
- gtk_widget_hide (GTK_WIDGET (window));
+ transient_for = gtk_window_get_transient_for (GTK_WINDOW (window));
+
+ if (GB_IS_GREETER_WINDOW (transient_for))
+ g_object_ref (transient_for);
+ else
+ transient_for = NULL;
+
gtk_widget_destroy (GTK_WIDGET (window));
+
+ if (transient_for != NULL)
+ {
+ gtk_widget_destroy (GTK_WIDGET (transient_for));
+ g_object_unref (transient_for);
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]