Skip to content

[BOOK] Various minor issues #2217

@valentingoebel

Description

@valentingoebel

It's death by a thousand cuts so I won't bother making multiple issues.

"GObject Concepts > Memory Management" starts off with a comment // Create two buttons for the single button listing. The same comment appears later again for Cell where it is still superfluous, because the Cell example is for a single button. That comment becomes necessary in the listing that introduces Rc but for some reason the code for the second button is in the hidden part of the listing when it should be shown.

At the very end of the "Settings" chapter, the book binds the setting to the active property which works exactly as you expect, but the example before that uses the state property which for me only changes the background color without moving the toggle. Changing .state(is_switch_enabled) to .active(is_switch_enabled) changes both the background color and moves the toggle.

I personally jumped straight to using libadwaita for the entire book and libadwaita introduces datastructures that have names identical to the gtk4 ones and it is not clear at all which ones you should choose. If you use the ApplicationWindow from libadwaita, you will run into an issue when adding a button via .child(&button). The error message is highly unintuitive and appears like an unsurmountable obstacle until you realize that you can just use the ApplicationWindow from gtk4. Since the To-Do app uses xml files to define the UI, you never get to see a simple code based UI listing for how to get libadwaita working with the earlier chapters of the book.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions