[gtk+] Clarify documentation about application vs window lifecycle



commit 7db4bee4b62bc9b6f20ba4e599e8d030314984fd
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Jan 24 22:20:35 2011 -0500

    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 701a0e8..cf57bf2 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 91b404c..a461129 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
    */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]