diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-01-31 20:22:59 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-02-07 11:40:17 -0500 |
commit | 22fc7b38207ebd93da3f3287bd5d64b7682e13ae (patch) | |
tree | 55758a96a7785c9707db0acf23b586fc3066ed6d | |
parent | 3990cd2559ef9eb9e8e83c0deaf40c37000c257d (diff) | |
download | gtk+-22fc7b38207ebd93da3f3287bd5d64b7682e13ae.tar.gz |
nativedialog: Add more docs
Emphasize that native dialogs aren't widgets, and are not
kept alive by GTK.
-rw-r--r-- | gtk/gtkfilechoosernative.c | 5 | ||||
-rw-r--r-- | gtk/gtknativedialog.c | 5 |
2 files changed, 10 insertions, 0 deletions
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; |