Recently I was looking for some examples of using gaction and gmenu with GTK builder. Found
Well that is not really an example, but only a test. But got it to compile with
gcc -Wall gaction.c -o gaction
pkg-config --cflags --libs gtk4
I assumed that it is a GTK4 example as widget.show() is used, not widget.showAll(). Changing show() to showAll() makes it compile with GTK3.
First observation. When I click the x at top right window corner, then window will not close. Not surprising, as there is no signal connect to destroy. It that not necessary for GTK4? Next observation: While it works fine for GTK3 with showAll(), for unchanged source text compiled for GTK4 all menu items are grey and can not be activated. Button works ok. I have installed GTK4 on /opt/gtk recently, all paths seems to be OK, there are no error messages when compiling or running. So I an a bit confused. Is this example intended for GTK3 or GTK4? Do I miss something, or do menu items not work in GTK4 at all?
Well not a real problem, I just shipped the Nim version, and at least for GTK3 that modified version seems to work. But as I provide bindings for GTK4 as well, I was going to ship a GTK4 version as well, but that would have grey disabled menus too, so I did ship only the GTK3 version for now: