From 7db4bee4b62bc9b6f20ba4e599e8d030314984fd Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 24 Jan 2011 22:20:35 -0500 Subject: [PATCH] Clarify documentation about application vs window lifecycle https://bugzilla.gnome.org/show_bug.cgi?id=639931 --- gtk/gtkapplication.c | 7 +++++++ gtk/gtkwindow.c | 11 +++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/gtk/gtkapplication.c b/gtk/gtkapplication.c index 701a0e8119..cf57bf28f5 100644 --- a/gtk/gtkapplication.c +++ b/gtk/gtkapplication.c @@ -192,6 +192,13 @@ gtk_application_new (const gchar *application_id, * This call is equivalent to setting the #GtkWindow:application * property of @window to @application. * + * Normally, the connection between the application and the window + * will remain until the window is destroyed, but you can explicitly + * remove it with gtk_application_remove_window(). + * + * GTK+ will keep the application running as long as it has + * any windows. + * * Since: 3.0 **/ void diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 91b404cee4..a461129a4e 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -943,15 +943,18 @@ gtk_window_class_init (GtkWindowClass *klass) 0, G_MAXINT, 16, GTK_PARAM_READWRITE)); - /* Signals - */ /** * GtkWindow:application: * * The #GtkApplication associated with the window. * - * The application will be kept alive for at least as long as the - * window is open. + * The application will be kept alive for at least as long as it + * has any windows associated with it (see g_application_hold() + * for a way to keep it alive without windows). + * + * Normally, the connection between the application and the window + * will remain until the window is destroyed, but you can explicitly + * remove it by setting the ::application property to %NULL. * * Since: 3.0 */