Forum: Ruby-Gnome 2 Making Gtk::ActionGroup#add_action return added Gtk::Action,

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
97b082da2e737a0d1c74e629f4f81b3b?d=identicon&s=25 Martin Nordholts (Guest)
on 2007-02-20 18:00
(Received via mailing list)

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
This topic is locked and can not be replied to.