Gtk::Actionable Gtk::RadioToolButton?



I'm using gtkmm to build a UI. The task I'm trying to accomplish is constructing a radio button from an action that is already part of a menu and a toolbar. I'd like the new button to proxy for the existing action.

One likely candidate is Gtk::Action::create_tool_item(). Its documentation states:

Deprecated: 3.10: Use a Gtk::ToolItem and associate it with a Action using Gtk::Actionable::set_action_name() instead

So, I'd expect that ToolItem and by inheritance RadioToolButton would implment this interface. In gtkmm-3.12 it does not and the stable documentation reflects this as well.

However, the C library gtk-3.0 RadioToolButton does implement this interface. So, my question is this.

Should gtkmm Gtk::RadioToolButton implement Gtk::Actionable? Is the absence of this int erface an oversight, or is there another way that the features of Actionable are supported?

There is a function, set_related_action() which associates the correct icon for the radio button. It doesn't seem to put the button into the group and it is also deprecated.

I tried this, and found that the button wasn't added to the action_group and the icon didn't appear.

 auto tool = Gtk::manage (new Gtk::RadioToolButton ());
 gtk_actionable_set_action_name (GTK_ACTIONABLE (tool->gobj ()), "sample-radio-action");

What am I missing? 




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