make autoscroll a bit easier to use, fix missing measure lines when moving the editor...
[ardour.git] / gtk2_ardour / route_time_axis.cc
index 6e578a13e7cc75b6868d3875b197c247409a750a..c94d3d2e719c8af2f115082446d61b215d142871 100644 (file)
@@ -118,6 +118,8 @@ RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session& sess, boost::sh
 
        hide_button.add (*(manage (new Image (get_xpm("small_x.xpm")))));
 
+       /* XXX is this incomplete? i don't think its very useful atm
+
        solo_button->signal_button_press_event().connect (mem_fun (*this, &RouteTimeAxisView::select_me), false);
        mute_button->signal_button_press_event().connect (mem_fun (*this, &RouteTimeAxisView::select_me), false);
        playlist_button.signal_button_press_event().connect (mem_fun (*this, &RouteTimeAxisView::select_me), false);
@@ -125,6 +127,7 @@ RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session& sess, boost::sh
        size_button.signal_button_press_event().connect (mem_fun (*this, &RouteTimeAxisView::select_me), false);
        visual_button.signal_button_press_event().connect (mem_fun (*this, &RouteTimeAxisView::select_me), false);
        hide_button.signal_button_press_event().connect (mem_fun (*this, &RouteTimeAxisView::select_me), false);
+       */
 
        solo_button->signal_button_press_event().connect (mem_fun(*this, &RouteUI::solo_press), false);
        solo_button->signal_button_release_event().connect (mem_fun(*this, &RouteUI::solo_release), false);
@@ -140,7 +143,7 @@ RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session& sess, boost::sh
        if (is_track()) {
                rec_enable_button->set_active (false);
                rec_enable_button->set_name ("TrackRecordEnableButton");
-               rec_enable_button->signal_button_press_event().connect (mem_fun (*this, &RouteTimeAxisView::select_me), false);
+               //rec_enable_button->signal_button_press_event().connect (mem_fun (*this, &RouteTimeAxisView::select_me), false);
                rec_enable_button->signal_button_press_event().connect (mem_fun(*this, &RouteUI::rec_enable_press));
                controls_table.attach (*rec_enable_button, 5, 6, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 0, 0);
                ARDOUR_UI::instance()->tooltips().set_tip(*rec_enable_button, _("Record"));
@@ -728,7 +731,7 @@ RouteTimeAxisView::rename_current_playlist ()
        ArdourPrompter prompter (true);
        string name;
 
-       Diskstream *const ds = get_diskstream();
+       boost::shared_ptr<Diskstream> ds = get_diskstream();
        if (!ds || ds->destructive())
                return;
 
@@ -759,7 +762,7 @@ RouteTimeAxisView::use_copy_playlist (bool prompt)
 {
        string name;
        
-       Diskstream *const ds = get_diskstream();
+       boost::shared_ptr<Diskstream> ds = get_diskstream();
        if (!ds || ds->destructive())
                return;
 
@@ -800,7 +803,7 @@ RouteTimeAxisView::use_new_playlist (bool prompt)
 {
        string name;
        
-       Diskstream *const ds = get_diskstream();
+       boost::shared_ptr<Diskstream> ds = get_diskstream();
        if (!ds || ds->destructive())
                return;
 
@@ -838,7 +841,7 @@ RouteTimeAxisView::use_new_playlist (bool prompt)
 void
 RouteTimeAxisView::clear_playlist ()
 {
-       Diskstream *const ds = get_diskstream();
+       boost::shared_ptr<Diskstream> ds = get_diskstream();
        if (!ds || ds->destructive())
                return;
 
@@ -878,8 +881,7 @@ RouteTimeAxisView::selection_click (GdkEventButton* ev)
 
        switch (Keyboard::selection_type (ev->state)) {
        case Selection::Toggle:
-               /* XXX this is not right */
-               editor.get_selection().add (*tracks);
+               editor.get_selection().toggle (*tracks);
                break;
                
        case Selection::Set:
@@ -964,7 +966,7 @@ RouteTimeAxisView::name() const
 Playlist *
 RouteTimeAxisView::playlist () const 
 {
-       Diskstream *ds;
+       boost::shared_ptr<Diskstream> ds;
 
        if ((ds = get_diskstream()) != 0) {
                return ds->playlist(); 
@@ -1011,24 +1013,24 @@ RouteTimeAxisView::hide_click ()
        editor.hide_track_in_display (*this);
 }
 
-Region*
+boost::shared_ptr<Region>
 RouteTimeAxisView::find_next_region (jack_nframes_t pos, RegionPoint point, int32_t dir)
 {
-       Diskstream *stream;
+       boost::shared_ptr<Diskstream> stream;
        Playlist *playlist;
 
        if ((stream = get_diskstream()) != 0 && (playlist = stream->playlist()) != 0) {
                return playlist->find_next_region (pos, point, dir);
        }
 
-       return 0;
+       return boost::shared_ptr<Region> ();
 }
 
 bool
 RouteTimeAxisView::cut_copy_clear (Selection& selection, CutCopyOp op)
 {
        Playlist* what_we_got;
-       Diskstream* ds = get_diskstream();
+       boost::shared_ptr<Diskstream> ds = get_diskstream();
        Playlist* playlist;
        bool ret = false;