additional API to make it nicer to get an existing action group
This commit is contained in:
parent
b67bb8165b
commit
f974ff594a
@ -360,6 +360,18 @@ ActionManager::create_action_group (void * owner, string const & name)
|
||||
return g;
|
||||
}
|
||||
|
||||
RefPtr<ActionGroup>
|
||||
ActionManager::get_action_group (string const & name)
|
||||
{
|
||||
for (ActionGroups::iterator g = groups.begin(); g != groups.end(); ++g) {
|
||||
if ((*g)->get_name () == name) {
|
||||
return *g;
|
||||
}
|
||||
}
|
||||
|
||||
return RefPtr<ActionGroup> ();
|
||||
}
|
||||
|
||||
RefPtr<Action>
|
||||
ActionManager::register_action (RefPtr<ActionGroup> group, const char* name, const char* label)
|
||||
{
|
||||
|
@ -71,6 +71,7 @@ namespace ActionManager {
|
||||
LIBGTKMM2EXT_API extern void disable_active_actions ();
|
||||
|
||||
LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::ActionGroup> create_action_group (void * owner, std::string const & group_name);
|
||||
LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::ActionGroup> get_action_group (std::string const & group_name);
|
||||
|
||||
LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::Action> register_action (Glib::RefPtr<Gtk::ActionGroup> group, const char* name, const char* label);
|
||||
LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::Action> register_action (Glib::RefPtr<Gtk::ActionGroup> group,
|
||||
|
Loading…
Reference in New Issue
Block a user