[gtk/matthiasc/for-master: 31/32] nativedialog: Add more docs




commit 7985d277b3c58156ba619dc28ee90d08ad892cac
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Jan 31 20:22:59 2021 -0500

    nativedialog: Add more docs
    
    Emphasize that native dialogs aren't widgets, and are not
    kept alive by GTK.

 gtk/gtkfilechoosernative.c | 5 +++++
 gtk/gtknativedialog.c      | 5 +++++
 2 files changed, 10 insertions(+)
---
diff --git a/gtk/gtkfilechoosernative.c b/gtk/gtkfilechoosernative.c
index 597deb5256..067d2b19f6 100644
--- a/gtk/gtkfilechoosernative.c
+++ b/gtk/gtkfilechoosernative.c
@@ -60,6 +60,11 @@
  * Showing, hiding and running the dialog is handled by the #GtkNativeDialog
  * functions.
  *
+ * Note that unlike #GtkFileChooserDialog, #GtkFileChooserNative objects are
+ * not toplevel widgets, and GTK does not keep them alive. It is your
+ * responsibility to keep a reference until you are done with the
+ * object.
+
  * ## Typical usage ## {#gtkfilechoosernative-typical-usage}
  *
  * In the simplest of cases, you can the following code to use
diff --git a/gtk/gtknativedialog.c b/gtk/gtknativedialog.c
index 4b28a42041..73ad13ea3a 100644
--- a/gtk/gtknativedialog.c
+++ b/gtk/gtknativedialog.c
@@ -52,6 +52,11 @@
  * various common properties on the dialog, as well as show and hide
  * it and get a #GtkNativeDialog::response signal when the user finished
  * with the dialog.
+ *
+ * Note that unlike #GtkDialog, #GtkNativeDialog objects are not
+ * toplevel widgets, and GTK does not keep them alive. It is your
+ * responsibility to keep a reference until you are done with the
+ * object.
  */
 
 typedef struct _GtkNativeDialogPrivate GtkNativeDialogPrivate;


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