Making Gtk::ActionGroup#add_action return added Gtk::Action,


I’m working on a Ruby-GNOME2 app and use Gtk::ActionGroup and friends.

How about making Gtk::ActionGroup#add_action return the added
Gtk::Action instead of self? That way one could write

actionGroup.add_action( “stuff” )).signal_connect(
“activate” ) { stuff() }

instead of e.g.

newAction = “stuff”
newAction.signal_connect( “activate” ) { stuff() }
actionGroup.add_action newAction

The patch will be trivial, but before I submit it, is there some benefit
of making it return self instead of the added Gtk::ActionGroup which I

  • Martin Nordholts

Take Surveys. Earn Cash. Influence the Future of IT
Join’s Techsay panel and you’ll get the chance to share
opinions on IT & business topics through brief surveys-and earn cash