display timecode from BWF etc in SF browser; accels for windows now work (misspelling...
[ardour.git] / gtk2_ardour / editor_hscroller.cc
index 049f19b85fa91d2596a45e317a69e52702240569..c95d9230928381b64790030af129e0df7e788761 100644 (file)
 
 using namespace std;
 using namespace ARDOUR;
+using namespace PBD;
 
 void
 Editor::hscrollbar_allocate (Gtk::Allocation &alloc)
 {
-       if (session) {
-               horizontal_adjustment.set_upper (session->current_end_frame() / frames_per_unit);
-       }
-
 }
 
 bool
 Editor::hscrollbar_button_press (GdkEventButton *ev)
 {
-       edit_hscroll_dragging = true;
        return true;
 }
 
@@ -45,13 +41,15 @@ bool
 Editor::hscrollbar_button_release (GdkEventButton *ev)
 {
        if (session) {
-               if (edit_hscroll_dragging) {
-                       // lets do a tempo redisplay only on button release, because it is dog slow
-                       tempo_map_changed (Change (0));
-                       edit_hscroll_dragging = false;
-               }
+
        }
 
        return true;
 }
 
+void
+Editor::reset_hscrollbar_stepping ()
+{
+       horizontal_adjustment.set_step_increment ((current_page_frames() / 5)/frames_per_unit); /* 5 clicks to scroll the entire page */
+       horizontal_adjustment.set_page_increment (current_page_frames()/frames_per_unit);
+}