remove EnableTranslations action, since this stuff is all done in the prefs dialog now and there is no need for a separate action to use with a menu item

git-svn-id: svn://localhost/ardour2/branches/3.0@13979 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis
2013-01-23 18:42:01 +00:00
parent 4c42a77441
commit f08f3acbac
3 changed files with 0 additions and 50 deletions

View File

@@ -3629,43 +3629,6 @@ ARDOUR_UI::setup_profile ()
}
}
void
ARDOUR_UI::toggle_translations ()
{
using namespace Glib;
RefPtr<Action> act = ActionManager::get_action (X_("Main"), X_("EnableTranslation"));
if (act) {
RefPtr<ToggleAction> ract = RefPtr<ToggleAction>::cast_dynamic (act);
if (ract) {
string i18n_killer = ARDOUR::translation_kill_path();
bool already_enabled = !ARDOUR::translations_are_disabled ();
if (ract->get_active ()) {
/* we don't care about errors */
int fd = ::open (i18n_killer.c_str(), O_RDONLY|O_CREAT, 0644);
close (fd);
} else {
/* we don't care about errors */
unlink (i18n_killer.c_str());
}
if (already_enabled != ract->get_active()) {
MessageDialog win (already_enabled ? _("Translations disabled") : _("Translations enabled"),
false,
Gtk::MESSAGE_WARNING,
Gtk::BUTTONS_OK);
win.set_secondary_text (string_compose (_("You must restart %1 for this to take effect."), PROGRAM_NAME));
win.set_position (Gtk::WIN_POS_CENTER);
win.present ();
win.run ();
}
}
}
}
/** Add a window proxy to our list, so that its state will be saved.
* This call also causes the window to be created and opened if its
* state was saved as `visible'.

View File

@@ -688,8 +688,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
void loading_message (const std::string& msg);
void toggle_translations ();
PBD::ScopedConnectionList forever_connections;
void step_edit_status_change (bool);

View File

@@ -442,17 +442,6 @@ ARDOUR_UI::install_actions ()
act = ActionManager::register_toggle_action (option_actions, X_("SendMIDIfeedback"), _("Send MIDI Feedback"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_send_midi_feedback));
ActionManager::session_sensitive_actions.push_back (act);
if (getenv ("ARDOUR_BUNDLED")) {
act = ActionManager::register_toggle_action (main_actions, X_("EnableTranslation"), _("Enable Translations"), mem_fun (*this, &ARDOUR_UI::toggle_translations));
if (act) {
RefPtr<ToggleAction> ract = RefPtr<ToggleAction>::cast_dynamic (act);
if (ract) {
ract->set_active (!ARDOUR::translations_are_disabled());
}
}
}
/* MIDI */
Glib::RefPtr<ActionGroup> midi_actions = ActionGroup::create (X_("MIDI"));