Hacker News new | ask | show | jobs
by plowjockey 596 days ago
Trivial examples of Gtk+ apps seem to be legion but to find a decent tutorial that works its way through a moderately complex and usable app seem to be scarce. In particular I haven't found a decent example of using the GTKBuilder class and complete documentation of the XML properties seems almost nonexistent.

Aside from that, instead of writing a GNOME app in C, isn't Vala or GJS the preferred language now?

3 comments

I wanted to try and follow this blog, but write the app in Vala and I haven't figured out how to use gtk4 with meson yet. I personally want to build a nautilus extension, but that seems very far off considering the sorry state of their documentation.
I have written an app in Vala + gtk4, using meson + ninja as the build system. It is pretty straight forward.

https://github.com/line72/campcounselor/

> Trivial examples of Gtk+ apps seem to be legion but to find a decent tutorial that works its way through a moderately complex and usable app seem to be scarce.

The same is true for a lot of languages and frameworks: Programming education, and tutorials on the Internet, start with Hello World and stop at some very small, trivial application with the complexity of about 1-4 source files. Final class: How to write a notepad-like application, or a TODO list with check boxes. There are a lot of resources that get you started but very little about how you'd approach what would turn into a medium-sized or large application, with hundreds of source files and many third party dependencies.

GObjectIntrospection is very good, so GTK has usable bindings to essentially every language.

I would recommend looking at the GNOME apps and picking one that is written in the language that you want to use.