Hi;

On Sun, 12 Aug 2018 at 12:33, c.buhtz--- via gtk-app-devel-list <
gtk-app-devel-list@gnome.org> wrote:

> Below you see a minimal working example using Gtk.FileChooserNative as
> a file-open dialog. While running with Python 3.6.6 I recieve
> this warning message
>
> "GtkDialog mapped without a transient parent. This is discouraged."
>
> I understand the logic behind it but can not find a solution BECAUSE
> the docu is IMO inusfficient. Please see
>
> <
> https://lazka.github.io/pgi-docs/#Gtk-3.0/classes/FileChooserDialog.html#Gtk.FileChooserDialog
> >
>
> This docu is about PyGObject which is Python, isn't it!? But there is C
> code in the example. Also with my C experience this doesn't help.
>

The documentation for Python/GObject bindings is generated from the
introspection data, which is in turn generated from comments and
annotations inside the C code.

The C code comes with C examples, because writing examples in Python, Perl,
JavaScript, whatever inside the C documentation would be odd, and could not
be validated in any way by the C developers.

Yes, it would be nice if we had a translation layer for introspected
languages using the documentation inside the generated data; it's been a
request for a long time, but nobody has shown up to do the work.

What IMO is missing in that documentation and what would help me to
> understand and solve the problem by myself without contacting the list
> or issue tracker is
>  - Description of the Constructor or new()
>  - all possible parameters accepted by this constructor (I have no idea
>    where and how to put a parent to it)
>

The properties are inherited from the GtkFileChooserDialog class, so you'll
have to look at the hierarchy of the type, namely:

 - GtkWidget
 - GtkWindow
 - GtkDialog

The transient parent is provided by the transient-for property on GtkWindow:


https://developer.gnome.org/gtk3/stable/GtkWindow.html#GtkWindow--transient-for

or:


http://lazka.github.io/pgi-docs/#Gtk-3.0/classes/Window.html#Gtk.Window.props.transient_for

In any case, it would be good to file this as an issue against pygobject:

  https://gitlab.gnome.org/GNOME/pygobject/issues/new

Documentation doesn't magically improve by itself, and issues are how
projects can work on improving it, as long as they provide actionable items
and goals.

Ciao,
 Emmanuele.

-- 
https://www.bassi.io
[@] ebassi [@gmail.com]
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to