Fix uninitialized variable
[ardour.git] / gtk2_ardour / insert_remove_time_dialog.cc
index 815820f3a393d91d2d2958dee5b346dd718f85e5..2d444b92d149752e33a3010c4f6a06399bd65b3b 100644 (file)
@@ -61,23 +61,23 @@ InsertRemoveTimeDialog::InsertRemoveTimeDialog (PublicEditor& e, bool remove)
        time_label->set_alignment (1, 0.5);
        table->attach (*time_label, 0, 1, 0, 1, FILL | EXPAND);
        position_clock.set_session (_session);
-       position_clock.set_mode (ARDOUR_UI::instance()->secondary_clock->mode());
+       position_clock.set_mode (ARDOUR_UI::instance()->primary_clock->mode());
        table->attach (position_clock, 1, 2, 0, 1);
 
        time_label = manage (new Label (remove ? _("Time to remove:") : _("Time to insert:")));
        time_label->set_alignment (1, 0.5);
        table->attach (*time_label, 0, 1, 1, 2, FILL | EXPAND);
        duration_clock.set_session (_session);
-       duration_clock.set_mode (ARDOUR_UI::instance()->secondary_clock->mode());
+       duration_clock.set_mode (ARDOUR_UI::instance()->primary_clock->mode());
        table->attach (duration_clock, 1, 2, 1, 2);
 
        //if a Range is selected, assume the user wants to insert/remove the length of the range
        if ( _editor.get_selection().time.length() != 0 ) {
                position_clock.set ( _editor.get_selection().time.start(), true );
-               duration_clock.set ( _editor.get_selection().time.end_frame(), true,  _editor.get_selection().time.start() );
+               duration_clock.set ( _editor.get_selection().time.end_sample(), true,  _editor.get_selection().time.start() );
                duration_clock.set_bbt_reference (_editor.get_selection().time.start());
        } else {
-               framepos_t const pos = _editor.get_preferred_edit_position (EDIT_IGNORE_MOUSE);
+               samplepos_t const pos = _editor.get_preferred_edit_position (EDIT_IGNORE_MOUSE);
                position_clock.set ( pos, true );
                duration_clock.set_bbt_reference (pos);
                duration_clock.set (0);
@@ -99,12 +99,14 @@ InsertRemoveTimeDialog::InsertRemoveTimeDialog (PublicEditor& e, bool remove)
        _all_playlists.set_label (_("Apply to all the track's playlists"));
        get_vbox()->pack_start (_all_playlists);
 
-       _move_glued.set_label (_("Move glued regions"));
+       _move_glued.set_label (_("Move glued-to-musical-time regions (MIDI regions)"));
+       _move_glued.set_active();
        get_vbox()->pack_start (_move_glued);
        _move_markers.set_label (_("Move markers"));
        get_vbox()->pack_start (_move_markers);
        _move_markers.signal_toggled().connect (sigc::mem_fun (*this, &InsertRemoveTimeDialog::move_markers_toggled));
-       _move_glued_markers.set_label (_("Move glued markers"));
+       _move_glued_markers.set_label (_("Move glued-to-musical-time markers"));
+       _move_glued_markers.set_active();
        Alignment* indent = manage (new Alignment);
        indent->set_padding (0, 0, 12, 0);
        indent->add (_move_glued_markers);
@@ -187,13 +189,13 @@ InsertRemoveTimeDialog::move_locked_markers () const
        return _move_locked_markers.get_active ();
 }
 
-framepos_t
+samplepos_t
 InsertRemoveTimeDialog::position () const
 {
        return position_clock.current_time();
 }
 
-framepos_t
+samplepos_t
 InsertRemoveTimeDialog::distance () const
 {
        return duration_clock.current_duration ( position_clock.current_time() );