diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2018-12-10 08:32:11 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2018-12-10 08:34:01 -0500 |
commit | d1d8fd197dfe76ba2f49f3216d9130bbd634ac91 (patch) | |
tree | d11a0a5125f4436648bad35f7d1da0a4b66beba2 | |
parent | ad002d0de097d46b32b81fdedf2744479726106d (diff) |
change ActionManager::find_action() back to ActionManager::get_action()
This avoids dozens or hundreds of unnecessary changes in gtk2_ardour code
-rw-r--r-- | libs/gtkmm2ext/actions.cc | 26 | ||||
-rw-r--r-- | libs/gtkmm2ext/bindings.cc | 18 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtk_ui.cc | 4 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/actions.h | 12 |
4 files changed, 30 insertions, 30 deletions
diff --git a/libs/gtkmm2ext/actions.cc b/libs/gtkmm2ext/actions.cc index 8f6fa139fd..89ee999e4c 100644 --- a/libs/gtkmm2ext/actions.cc +++ b/libs/gtkmm2ext/actions.cc @@ -201,7 +201,7 @@ ActionManager::set_toggleaction_state (const string& n, bool s) bool ActionManager::set_toggleaction_state (const char* group_name, const char* action_name, bool s) { - RefPtr<Action> act = find_action (group_name, action_name); + RefPtr<Action> act = get_action (group_name, action_name); if (act) { RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic(act); if (tact) { @@ -215,7 +215,7 @@ ActionManager::set_toggleaction_state (const char* group_name, const char* actio void ActionManager::do_action (const char* group, const char*action) { - Glib::RefPtr<Gtk::Action> act = ActionManager::find_action (group, action); + Glib::RefPtr<Gtk::Action> act = ActionManager::get_action (group, action); if (act) { act->activate (); } @@ -224,12 +224,12 @@ ActionManager::do_action (const char* group, const char*action) void ActionManager::set_toggle_action (const char* group, const char*action, bool yn) { - Glib::RefPtr<Gtk::ToggleAction> tact = ActionManager::find_toggle_action (group, action); + Glib::RefPtr<Gtk::ToggleAction> tact = ActionManager::get_toggle_action (group, action); tact->set_active (yn); } RefPtr<Action> -ActionManager::find_action (const string& name, bool or_die) +ActionManager::get_action (const string& name, bool or_die) { ActionMap::const_iterator a = actions.find (name); @@ -246,9 +246,9 @@ ActionManager::find_action (const string& name, bool or_die) } RefPtr<ToggleAction> -ActionManager::find_toggle_action (const string& name, bool or_die) +ActionManager::get_toggle_action (const string& name, bool or_die) { - RefPtr<Action> act = find_action (name, or_die); + RefPtr<Action> act = get_action (name, or_die); if (!act) { return RefPtr<ToggleAction>(); @@ -258,9 +258,9 @@ ActionManager::find_toggle_action (const string& name, bool or_die) } RefPtr<RadioAction> -ActionManager::find_radio_action (const string& name, bool or_die) +ActionManager::get_radio_action (const string& name, bool or_die) { - RefPtr<Action> act = find_action (name, or_die); + RefPtr<Action> act = get_action (name, or_die); if (!act) { return RefPtr<RadioAction>(); @@ -270,7 +270,7 @@ ActionManager::find_radio_action (const string& name, bool or_die) } RefPtr<Action> -ActionManager::find_action (char const * group_name, char const * action_name, bool or_die) +ActionManager::get_action (char const * group_name, char const * action_name, bool or_die) { string fullpath (group_name); fullpath += '/'; @@ -291,9 +291,9 @@ ActionManager::find_action (char const * group_name, char const * action_name, b } RefPtr<ToggleAction> -ActionManager::find_toggle_action (char const * group_name, char const * action_name, bool or_die) +ActionManager::get_toggle_action (char const * group_name, char const * action_name, bool or_die) { - RefPtr<Action> act = find_action (group_name, action_name, or_die); + RefPtr<Action> act = get_action (group_name, action_name, or_die); if (!act) { return RefPtr<ToggleAction>(); @@ -303,9 +303,9 @@ ActionManager::find_toggle_action (char const * group_name, char const * action_ } RefPtr<RadioAction> -ActionManager::find_radio_action (char const * group_name, char const * action_name, bool or_die) +ActionManager::get_radio_action (char const * group_name, char const * action_name, bool or_die) { - RefPtr<Action> act = find_action (group_name, action_name, or_die); + RefPtr<Action> act = get_action (group_name, action_name, or_die); if (!act) { return RefPtr<RadioAction>(); diff --git a/libs/gtkmm2ext/bindings.cc b/libs/gtkmm2ext/bindings.cc index d5d8245099..49f890029f 100644 --- a/libs/gtkmm2ext/bindings.cc +++ b/libs/gtkmm2ext/bindings.cc @@ -408,7 +408,7 @@ Bindings::get_binding_for_action (RefPtr<Action> action, Operation& op) */ if (k->second.action_name == action_name) { - k->second.action = ActionManager::find_action (action_name, false); + k->second.action = ActionManager::get_action (action_name, false); return k->first; } @@ -429,7 +429,7 @@ Bindings::get_binding_for_action (RefPtr<Action> action, Operation& op) */ if (k->second.action_name == action_name) { - k->second.action = ActionManager::find_action (action_name, false); + k->second.action = ActionManager::get_action (action_name, false); return k->first; } @@ -488,7 +488,7 @@ Bindings::activate (KeyboardKey kb, Operation op) if (k->second.action) { action = k->second.action; } else { - action = ActionManager::find_action (k->second.action_name, false); + action = ActionManager::get_action (k->second.action_name, false); } if (action) { @@ -508,7 +508,7 @@ Bindings::associate () KeybindingMap::iterator k; for (k = press_bindings.begin(); k != press_bindings.end(); ++k) { - k->second.action = ActionManager::find_action (k->second.action_name, false); + k->second.action = ActionManager::get_action (k->second.action_name, false); if (k->second.action) { push_to_gtk (k->first, k->second.action); } else { @@ -517,18 +517,18 @@ Bindings::associate () } for (k = release_bindings.begin(); k != release_bindings.end(); ++k) { - k->second.action = ActionManager::find_action (k->second.action_name, false); + k->second.action = ActionManager::get_action (k->second.action_name, false); /* no working support in GTK for release bindings */ } MouseButtonBindingMap::iterator b; for (b = button_press_bindings.begin(); b != button_press_bindings.end(); ++b) { - b->second.action = ActionManager::find_action (b->second.action_name, false); + b->second.action = ActionManager::get_action (b->second.action_name, false); } for (b = button_release_bindings.begin(); b != button_release_bindings.end(); ++b) { - b->second.action = ActionManager::find_action (b->second.action_name, false); + b->second.action = ActionManager::get_action (b->second.action_name, false); } } @@ -662,7 +662,7 @@ Bindings::activate (MouseButton bb, Operation op) if (b->second.action) { action = b->second.action; } else { - action = ActionManager::find_action (b->second.action_name, false); + action = ActionManager::get_action (b->second.action_name, false); } if (action) { @@ -881,7 +881,7 @@ Bindings::save_as_html (ostream& ostr, bool categorize) const if ((*k)->second.action) { action = (*k)->second.action; } else { - action = ActionManager::find_action ((*k)->second.action_name, false); + action = ActionManager::get_action ((*k)->second.action_name, false); } if (!action) { diff --git a/libs/gtkmm2ext/gtk_ui.cc b/libs/gtkmm2ext/gtk_ui.cc index f03c5c5dec..c321d94d4f 100644 --- a/libs/gtkmm2ext/gtk_ui.cc +++ b/libs/gtkmm2ext/gtk_ui.cc @@ -617,7 +617,7 @@ UI::process_error_message (Transmitter::Channel chn, const char *str) void UI::show_errors () { - Glib::RefPtr<Action> act = ActionManager::find_action (X_("Editor"), X_("toggle-log-window")); + Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("toggle-log-window")); if (!act) { return; } @@ -631,7 +631,7 @@ UI::show_errors () void UI::toggle_errors () { - Glib::RefPtr<Action> act = ActionManager::find_action (X_("Editor"), X_("toggle-log-window")); + Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("toggle-log-window")); if (!act) { return; } diff --git a/libs/gtkmm2ext/gtkmm2ext/actions.h b/libs/gtkmm2ext/gtkmm2ext/actions.h index 6986973169..b396294f11 100644 --- a/libs/gtkmm2ext/gtkmm2ext/actions.h +++ b/libs/gtkmm2ext/gtkmm2ext/actions.h @@ -86,12 +86,12 @@ namespace ActionManager { LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::Action> register_toggle_action (Glib::RefPtr<Gtk::ActionGroup> group, const char* name, const char* label, sigc::slot<void> sl); - LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::Action> find_action (const std::string& name, bool or_die = true); - LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::Action> find_action (char const * group_name, char const * action_name, bool or_die = true); - LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::ToggleAction> find_toggle_action (const std::string& name, bool or_die = true); - LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::ToggleAction> find_toggle_action (char const * group_name, char const * action_name, bool or_die = true); - LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::RadioAction> find_radio_action (const std::string& name, bool or_die = true); - LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::RadioAction> find_radio_action (char const * group_name, char const * action_name, bool or_die = true); + LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::Action> get_action (const std::string& name, bool or_die = true); + LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::Action> get_action (char const * group_name, char const * action_name, bool or_die = true); + LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::ToggleAction> get_toggle_action (const std::string& name, bool or_die = true); + LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::ToggleAction> get_toggle_action (char const * group_name, char const * action_name, bool or_die = true); + LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::RadioAction> get_radio_action (const std::string& name, bool or_die = true); + LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::RadioAction> get_radio_action (char const * group_name, char const * action_name, bool or_die = true); LIBGTKMM2EXT_API extern void get_all_actions (std::vector<std::string>& paths, |