X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=gtk2_ardour%2Ftime_fx_dialog.cc;h=0958c20f2ea97f2016b61888b3f0471b01c66ef7;hb=6ee23029a338951705c589be6c61ab52099758b6;hp=b0536a26b6a96092599a2b75909e99da9731b953;hpb=b65f8073ba306ac2d85133875746767e7c6b0eb6;p=ardour.git diff --git a/gtk2_ardour/time_fx_dialog.cc b/gtk2_ardour/time_fx_dialog.cc index b0536a26b6..0958c20f2e 100644 --- a/gtk2_ardour/time_fx_dialog.cc +++ b/gtk2_ardour/time_fx_dialog.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2000-2009 Paul Davis + Copyright (C) 2000-2009 Paul Davis This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -29,7 +29,6 @@ #include "pbd/pthread_utils.h" #include "pbd/memento_command.h" -#include #include #include "editor.h" @@ -42,7 +41,6 @@ #include "ardour/audioplaylist.h" #include "ardour/audio_track.h" #include "ardour/audioregion.h" -#include "ardour/audio_diskstream.h" #include "ardour/stretch.h" #include "ardour/midi_stretch.h" #include "ardour/pitch.h" @@ -57,7 +55,6 @@ using namespace RubberBand; using namespace std; using namespace ARDOUR; using namespace PBD; -using namespace sigc; using namespace Gtk; using namespace Gtkmm2ext; @@ -74,7 +71,7 @@ TimeFXDialog::TimeFXDialog (Editor& e, bool pitch) , quick_button (_("Quick but Ugly")) , antialias_button (_("Skip Anti-aliasing")) , stretch_opts_label (_("Contents:")) - , precise_button (_("Strict Linear")) + , precise_button (_("Minimize time distortion")) , preserve_formants_button(_("Preserve Formants")) { set_modal (true); @@ -83,13 +80,11 @@ TimeFXDialog::TimeFXDialog (Editor& e, bool pitch) set_position (Gtk::WIN_POS_MOUSE); set_name (N_("TimeFXDialog")); - WindowTitle title(Glib::get_application_name()); if (pitching) { - title += _("Pitch Shift"); + set_title (_("Pitch Shift Audio")); } else { - title += _("Time Stretch"); + set_title (_("Time Stretch Audio")); } - set_title(title.get_string()); cancel_button = add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); @@ -119,20 +114,22 @@ TimeFXDialog::TimeFXDialog (Editor& e, bool pitch) l = manage (new Label (_("Octaves:"), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false)); table->attach (*l, 1, 2, 0, 1, Gtk::FILL, Gtk::EXPAND, 0, 0); table->attach (pitch_octave_spinner, 2, 3, 0, 1, Gtk::FILL, Gtk::EXPAND & Gtk::FILL, 0, 0); + pitch_octave_spinner.set_activates_default (); l = manage (new Label (_("Semitones:"), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false)); table->attach (*l, 1, 2, 1, 2, Gtk::FILL, Gtk::EXPAND, 0, 0); table->attach (pitch_semitone_spinner, 2, 3, 1, 2, Gtk::FILL, Gtk::EXPAND & Gtk::FILL, 0, 0); + pitch_semitone_spinner.set_activates_default (); l = manage (new Label (_("Cents:"), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false)); pitch_cent_spinner.set_digits (1); table->attach (*l, 1, 2, 2, 3, Gtk::FILL, Gtk::EXPAND, 0, 0); table->attach (pitch_cent_spinner, 2, 3, 2, 3, Gtk::FILL, Gtk::EXPAND & Gtk::FILL, 0, 0); + pitch_cent_spinner.set_activates_default (); table->attach (preserve_formants_button, 1, 3, 3, 4, Gtk::FILL, Gtk::EXPAND, 0, 0); - - add_button (_("Shift"), Gtk::RESPONSE_ACCEPT); + add_button (S_("Time|Shift"), Gtk::RESPONSE_ACCEPT); upper_button_box.pack_start (*table, false, true); } else { @@ -150,7 +147,7 @@ TimeFXDialog::TimeFXDialog (Editor& e, bool pitch) set_popdown_strings (stretch_opts_selector, editor.rb_opt_strings); /* set default */ - stretch_opts_selector.set_active_text (editor.rb_opt_strings[4]); + stretch_opts_selector.set_active_text (editor.rb_opt_strings[editor.rb_current_opt]); table->attach (stretch_opts_selector, 2, 3, 0, 1, Gtk::FILL, Gtk::EXPAND & Gtk::FILL, 0, 0); table->attach (precise_button, 1, 3, 1, 2, Gtk::FILL, Gtk::EXPAND, 0, 0); @@ -162,21 +159,21 @@ TimeFXDialog::TimeFXDialog (Editor& e, bool pitch) antialias_button.set_name (N_("TimeFXButton")); table->attach (antialias_button, 1, 3, 1, 2, Gtk::FILL, Gtk::EXPAND, 0, 0); -#endif +#endif add_button (_("Stretch/Shrink"), Gtk::RESPONSE_ACCEPT); upper_button_box.pack_start (*table, false, true); } + set_default_response (Gtk::RESPONSE_ACCEPT); + VBox* progress_box = manage (new VBox); progress_box->set_spacing (6); l = manage (new Label (_("Progress"), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false)); l->set_use_markup (); - progress_bar.set_name (N_("TimeFXProgress")); - progress_box->pack_start (*l, false, false); progress_box->pack_start (progress_bar, false, true); @@ -186,15 +183,13 @@ TimeFXDialog::TimeFXDialog (Editor& e, bool pitch) get_vbox()->pack_start (*vbox, false, false); - show_all_children (); } -gint -TimeFXDialog::update_progress () +void +TimeFXDialog::update_progress_gui (float p) { - progress_bar.set_fraction (request.progress); - return !request.done; + progress_bar.set_fraction (p); } void