This is more useful when replacing ActionManager::get_action
return a->second;
}
+ cerr << "Failed to find action: [" << name << ']' << endl;
+ return RefPtr<Action>();
+}
+
+RefPtr<Action>
+ActionMap::find_action (char const * group_name, char const * action_name)
+{
+ string fullpath;
+
+ fullpath = group_name;
+ fullpath += '/';
+ fullpath += action_name;
+
+ _ActionMap::iterator a = _actions.find (fullpath);
+
+ if (a != _actions.end()) {
+ return a->second;
+ }
+
+ cerr << "Failed to find action (2): [" << fullpath << ']' << endl;
return RefPtr<Action>();
}
const char* name, const char* label, sigc::slot<void> sl);
Glib::RefPtr<Gtk::Action> find_action (const std::string& name);
+ Glib::RefPtr<Gtk::Action> find_action (char const * group_name, char const * action_name);
void set_bindings (Bindings*);
Bindings* bindings() const { return _bindings; }