Have you looked at the menu examples in the gtkmm
tutorial? One with a popup menu: In that example the actions are inserted in a Gio::SimpleActionGroup. I think that a SimpleActionGroup would simplify your code. In the usual types of menu items (plain menu item, toggle menu item, radio menu item) you can connect signal handlers without a VariantBase parameter. Gio::SimpleActionGroup (actually its base class Gio::ActionMap) has several add_action*() methods for different types of menu items. There are other examples with menus. They also
use a SimpleActionGroup. Kjell On 2017-12-16 21:43,
Marty Moore wrote:
Hi Daniel, Thanks for your replay. I found two things while perusing the documentation: 1. I nedd to connect either the signal_activate or signal_state_changed of the SimpleAction if I don't want default behavior. 2. There's a 'TODO' note saying that documentation is needed about how to connect the signals. I'm still playing around with things, but what I really need is a tutorial about how to use Variant/BariantBase. I'm getting stuck every time I run into it. There doesn't seem to be much explanation about it. I assumed it was along the lines of void*, where you can use it for any data type. Is there something to explain how to use it? A good example about this stuff would really be appreciated. Thanks for your help, Marty |