[gtkmm] Gtk::Application: Add documentation concerning the use of quit()



commit feedeed8c45cca9c19f18300c84328579aa69c4c
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date:   Sun Jun 8 11:10:24 2014 +0200

    Gtk::Application: Add documentation concerning the use of quit()
    
    * gtk/src/application.hg: Mention that some destructors may not be called
    after a call to Gio::Application::quit(). Bug #731126.

 gtk/src/application.hg |   23 +++++++++++++++++++----
 1 files changed, 19 insertions(+), 4 deletions(-)
---
diff --git a/gtk/src/application.hg b/gtk/src/application.hg
index 0049c21..ac6b783 100644
--- a/gtk/src/application.hg
+++ b/gtk/src/application.hg
@@ -208,18 +208,23 @@ public:
 #m4 _CONVERSION(`GList*',`std::vector<const Window*>',`Glib::ListHandler<const Window*>::list_to_vector($3, 
Glib::OWNERSHIP_NONE)')
   _WRAP_METHOD(std::vector<const Window*> get_windows() const, gtk_application_get_windows)
 
+  //Concerning the note on quit(), see https://bugzilla.gnome.org/show_bug.cgi?id=731126
   /** Adds a window to the Gtk::Application.
    *
-   * If all the windows managed by Gtk::Application are closed or removed from
-   * the application then the Gtk::Application will call quit(), and quit
-   * the application.
+   * If all the windows managed by Gtk::Application are closed (hidden) or
+   * removed from the application then the call to run() will return.
    *
    * This call is equivalent to calling Gtk::Window::set_application().
    *
    * Normally, the connection between the application and the window
-   * will remain until the window is closed or destroyed, but you can explicitly
+   * will remain until the window is closed (hidden) or destroyed, but you can explicitly
    * remove it with remove_window().
    *
+   * @note If you call Gio::Application::quit() while a window is connected to
+   * the application, and then return from main() without removing the window
+   * from the application, neither the window's nor the application's destructor
+   * will be called.
+   *
    * @newin{3,4}
    * @param window A toplevel window to add to the application.
    */
@@ -252,6 +257,11 @@ public:
    * It is an error to call this function if @a application is a proxy for
    * a remote application.
    *
+   * @note If you call Gio::Application::quit() while a window is connected to
+   * the application, and then return from main() without removing the window
+   * from the application, neither the window's nor the application's destructor
+   * will be called.
+   *
    * @param window The window to show. This method will return when the window is hidden.
    * @param argc The argc from main() (or 0 if @a argv is <tt>0</tt>).
    * @param argv The argv from main(), or <tt>0</tt>.
@@ -271,6 +281,11 @@ public:
    * It is an error to call this function if @a application is a proxy for
    * a remote application.
    *
+   * @note If you call Gio::Application::quit() while a window is connected to
+   * the application, and then return from main() without removing the window
+   * from the application, neither the window's nor the application's destructor
+   * will be called.
+   *
    * @param window The window to show. This method will return when the window is hidden.
    * @return The exit status.
    *


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