News for hackers. Stuff that matters.
Re:Gtk4 Tutorial by deaddabe on Wednesday October 20, 2021 @11:08PM (#28939745)
I downloaded and tried it just now.

When creating a project, I get an empty .ui file with no possibility to add any widget. This project still seems in its infancy, or I am doing something wrong. It also seems to enforce a "framework" instead of just being a graphical .ui file editor. How I am supposed to use this if I am using Rust instead of Python, and Relm instead of their MVC framework?

I miss Glade (and it had issues!).

Re:Gtk4 Tutorial by md8z on Wednesday October 20, 2021 @11:15PM (#28939789)
The UI is a bit rough and still unstable, I think you have to press the search button and then type the name of the widget in the search box and double click.

It's just a .ui file editor, so unfortunately you can't use it with Relm. Maybe someone could write a tool that converts .ui files to Relm code. Although I guess it would be a one-way transition, so perhaps not so useful.

Re:Gtk4 Tutorial by deaddabe on Thursday October 21, 2021 @12:32AM (#28940294)
You do not have to convert .ui files to Relm code, see gladis's relm example [0].

[0] https://github.com/MicroJoe/gladis/blob/master/gladis/exampl...

Re:Gtk4 Tutorial by md8z on Thursday October 21, 2021 @12:43AM (#28940354)
Sorry, I thought you meant if you wanted to save it in the style of those Relm declarative macros.
Re:Gtk4 Tutorial by phoneperson on Wednesday October 20, 2021 @11:11PM (#28939768)
Try writing the name of the widget in the search bar in the top left. Something like GtkWindow.
Re:Gtk4 Tutorial by deaddabe on Thursday October 21, 2021 @12:31AM (#28940289)
Thanks, it works.

However adding a GtkApplicationWindow and a GtkButton inside of the component tree is not updating the preview area. Adding a know valid GTK3 .ui file [0] does not update the preview area either.

Seems like the "preview" button is also missing from Glade. Oh well, let's edit XML files afterall. :)

[0] https://github.com/MicroJoe/gtk_liststore_item/blob/master/g...

Re:Gtk4 Tutorial by phoneperson on Thursday October 21, 2021 @12:36AM (#28940317)
Yeah, it is still very early on in development. I am personally a fan of QtCreator, it is very similar to how visual studio used to work regarding ui creation.