+ duration_clock = manage (new AudioClock (X_("stretch"), true, X_("stretch"), true, false, true, false, true));
+ duration_clock->set_session (e.session());
+ duration_clock->set (new_length, true);
+ duration_clock->set_mode (AudioClock::BBT);
+ duration_clock->set_bbt_reference (position);
+
+ Gtk::Alignment* clock_align = manage (new Gtk::Alignment);
+ clock_align->add (*duration_clock);
+ clock_align->set (0.0, 0.5, 0.0, 1.0);
+
+ l = manage (new Gtk::Label (_("Duration")));
+ table->attach (*l, 0, 1, row, row+1, Gtk::FILL, Gtk::FILL, 0, 0);
+ table->attach (*clock_align, 1, 2, row, row+1, Gtk::AttachOptions (Gtk::EXPAND|Gtk::FILL), Gtk::FILL, 0, 0);
+ row++;
+
+ const double fract = ((double) new_length) / original_length;
+ /* note the *100.0 to convert fract into a percentage */
+ duration_adjustment.set_value (fract*100.0);
+ Gtk::SpinButton* spinner = manage (new Gtk::SpinButton (duration_adjustment, 1.0, 3));