From 26605c7d08acd0874d420f34f1a1b2f4fe4243d1 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 8 Aug 2010 02:20:21 +0000 Subject: [PATCH] Add tooltip for edit mode selector. Shorten strings used in the selector to save horizontal space. git-svn-id: svn://localhost/ardour2/branches/3.0@7564 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/editor.cc | 18 ++---------------- libs/ardour/utils.cc | 12 ++++++------ 2 files changed, 8 insertions(+), 22 deletions(-) diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 7f19e1e415..f5d64a523d 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -3094,6 +3094,7 @@ Editor::setup_tooltips () ARDOUR_UI::instance()->set_tip (edit_point_selector, _("Edit point")); ARDOUR_UI::instance()->set_tip (midi_sound_notes, _("Sound Notes")); ARDOUR_UI::instance()->set_tip (midi_panic_button, _("Send note off and reset controller messages on all MIDI channels")); + ARDOUR_UI::instance()->set_tip (edit_mode_selector, _("Edit Mode")); } void @@ -3501,22 +3502,7 @@ Editor::cycle_edit_mode () void Editor::edit_mode_selection_done () { - if (_session == 0) { - return; - } - - string choice = edit_mode_selector.get_active_text(); - EditMode mode = Slide; - - if (choice == _("Splice Edit")) { - mode = Splice; - } else if (choice == _("Slide Edit")) { - mode = Slide; - } else if (choice == _("Lock Edit")) { - mode = Lock; - } - - Config->set_edit_mode (mode); + Config->set_edit_mode (string_to_edit_mode (edit_mode_selector.get_active_text ())); } void diff --git a/libs/ardour/utils.cc b/libs/ardour/utils.cc index cfa183f499..6f8586648d 100644 --- a/libs/ardour/utils.cc +++ b/libs/ardour/utils.cc @@ -309,11 +309,11 @@ compute_equal_power_fades (nframes_t nframes, float* in, float* out) EditMode string_to_edit_mode (string str) { - if (str == _("Splice Edit")) { + if (str == _("Splice")) { return Splice; - } else if (str == _("Slide Edit")) { + } else if (str == _("Slide")) { return Slide; - } else if (str == _("Lock Edit")) { + } else if (str == _("Lock")) { return Lock; } fatal << string_compose (_("programming error: unknown edit mode string \"%1\""), str) << endmsg; @@ -326,14 +326,14 @@ edit_mode_to_string (EditMode mode) { switch (mode) { case Slide: - return _("Slide Edit"); + return _("Slide"); case Lock: - return _("Lock Edit"); + return _("Lock"); default: case Splice: - return _("Splice Edit"); + return _("Splice"); } }