+
+string
+ActionManager::get_key_representation (const string& accel_path, AccelKey& key)
+{
+ bool known = lookup_entry (accel_path, key);
+
+ if (known) {
+ uint32_t k = possibly_translate_legal_accelerator_to_real_key (key.get_key());
+ key = AccelKey (k, Gdk::ModifierType (key.get_mod()));
+ return ui_manager->get_accel_group()->get_label (key.get_key(), Gdk::ModifierType (key.get_mod()));
+ }
+
+ return unbound_string;
+}
+
+void
+ActionManager::do_action (const char* group, const char*action)
+{
+ Glib::RefPtr<Gtk::Action> act = ActionManager::get_action (group, action);
+ if (act) {
+ act->activate ();
+ }
+}
+
+void
+ActionManager::set_toggle_action (const char* group, const char*action, bool yn)
+{
+ Glib::RefPtr<Gtk::Action> act = ActionManager::get_action (group, action);
+ if (act) {
+ Glib::RefPtr<Gtk::ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
+ if (tact) {
+ tact->set_active (yn);
+ }
+ }
+}
+