action parent



When a Gtk2::Action is activated, ie. the activate method which raises
the activate signal, is there anywhere to find the invoking menuitem or
toolitem, at least for the usual case of a uimanager generated thingie
activates it?

I had some actions which pop up a dialog thought to put the dialog on
the same screen as the invoking widget, in case it's a multi-screen
program.  With Gtk2::ActionGroup->add_actions and friends I've used the
userdata, but wondered about a Gtk2::Action subclass where the activate
handler is a class closure so there's no userdata as such.

I suppose an action object subclass could have a property saying a
target screen or toplevel application window.  Unless there's somewhere
dynamic to get that information ...



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