From: Matthias Clasen Date: Mon, 1 Feb 2021 01:22:59 +0000 (-0500) Subject: nativedialog: Add more docs X-Git-Tag: archive/raspbian/4.4.1+ds1-2+rpi1~1^2~83^2^2~450^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7985d277b3c58156ba619dc28ee90d08ad892cac;p=gtk4.git nativedialog: Add more docs Emphasize that native dialogs aren't widgets, and are not kept alive by GTK. --- 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;