Is GtkCheckButton a GtkToggleButton in GTK4?

From

I would strongly assume that, and I think it was the case in GTK3. But my compiler tells me

/home/salewski/Nim/lib/core/macros.nim(559, 11) Error: type mismatch: got <CheckButton>
but expected one of: 
proc buttonCb(b: Button)
  first type mismatch at position: 1
  required type for b: Button
  but expression 'cast[gtk4.CheckButton](h)' is of type: CheckButton

And from /opt/gtk/share/gir-1.0/Gtk-4.0.gir we have

    <class name="CheckButton"
           c:symbol-prefix="check_button"
           c:type="GtkCheckButton"
           parent="Widget"

So I assume that GtkCheckButton is a direct child of GtkWidget in GTK4.

If API docs are wrong, do we have an issue tracker for docs, or where can we post doc errors? (There are some typos in the docs still, some for many years also. And in GTK4 docs there is some wrong legacy from GTK3. Do we care for fixing them, or do devs have more important priorities?)

Google found it:

Instead of deriving GtkCheckButton from GtkToggleButton, they are now two independent widgets,

So API doc page is wrong, maybe mostly a plain copy of GTK3 one still.

[EDIT]

And finally I found the most recent GTK4 API docs and all is OK:

And I was really sure that I was reading latest GTK4 API docs :frowning:

May it be possible to block older GTK4 API docs or put a warning on top?

You were looking under /gtk4/stable/ even if GTK4 is not out, yet? I mean: the link is there, but it’s not like you can assume things at random.

You can check the released API references under: https://developer.gnome.org/gtk4/

The issue will be solved when 4.0 is released; the GTK team does not control the tool that generates the layout of developer.gnome.org, and to be fair, the website is kind of unmaintained at the moment.

If you want to always get the latest, bleeding edge documentation, GTK generates and publishes it as part of the CI pipeline.

Yes, I thought gtk4 stable is refering for the latest docs, which made same sense for me as latest is closest to stable? And I generally insert that links in the Nim GTK4 book (http://ssalewski.de/gtkprogramming.html), I think inserting the stable links makes more sense than inserting currently latest ones. I will try to choose the right ones in future. Maybe I should try to use more the devhelp tool instead of Google.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.