Re: Failure to add radio buttons to popup menu.

On 2020-12-09 08:55, Kjell Ahlstedt wrote:

Gtkmm supports glade, if gtk supports glade. Gtkmm just wraps gtk's C functions in C++ code. The glade file with a GtkDialog that you mention should be no problem for gtkmm. It's similar to the example.

A glade file with GtkRadioMenuItem can probably also be used. If I had realized from the beginning that you're not interested in the kind of solution I gave you, I might have managed to get something working without touching the ui_info string. There is a limit to how much time I want to spend trying to answer your questions. That's a drawback with free open source code: When you get stuck, no one is responsible for answering your questions.

GtkRadioMenuItem can't be used together with GAction and GSimpleAction, and therefore it can't be used together with Gio::Action, Gio::SimpleAction, Gio::SimpleActionGroup. I had a look at gtk's source code and made some tests. When I replaced GtkRadioMenuItem by GtkCheckMenuItem, the signal handler was called, but of course the menu items didn't act as connected in a radio item group. GtkRadioMenuItems will perhaps work with the deprecated Gtk::RadioAction and Gtk::ActionGroup.

See also the gtk issue

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