Re: Failure to add radio buttons to popup menu.



I don't know if it works with a file that glade has written. Can't glade write files without GtkMenu, GtkRadioMenuItem, etc? If it can't, it's not compatible with gtk4 and gtkmm4, at least not when it comes to creating menus. Classes like GtkMenuBar, GtkMenu, GtkMenuItem, GtkRadioMenuItem have been removed from gtk4.

On 2020-12-07 23:27, Carlo Wood wrote:
On Sun, 6 Dec 2020 16:39:42 +0100
Kjell Ahlstedt <kjellahlstedt gmail com> wrote:

I combined ideas from the book/menus/main_menu and book/menus/popup 
examples in gtkmm-documentation. Then it works. See attached files.  
Thank you. So, the problem is that this doesn't work
with glade generated syntax?

It seems that the ui_info string that you used
causes a Gio::Menu to be created, while if I use
a glade generated format (aka, a file that I read
with m_refBuilder->add_from_file(...)) then
a Gtk::Menu is being created.

The latter is not working.

Can you make it work by loading the attached glade file?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]