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

Hello.

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( Gtk::Action.new( “stuff” )).signal_connect(
“activate” ) { stuff() }

instead of e.g.

newAction = Gtk::Action.new “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
foresee?

  • Martin Nordholts

Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net’s Techsay panel and you’ll get the chance to share
your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs