move all (G)UI related configuration parameters into UIConfiguration, not RCConfiguration
[ardour.git] / gtk2_ardour / editor_canvas_events.cc
index 2609abadc84c2779f687211730a9821a217f2aab..93c0abea356bf2be94e2ae58f9525151e8b067f9 100644 (file)
@@ -35,6 +35,7 @@
 #include "editor.h"
 #include "keyboard.h"
 #include "public_editor.h"
+#include "ardour_ui.h"
 #include "audio_region_view.h"
 #include "audio_streamview.h"
 #include "audio_time_axis.h"
@@ -100,7 +101,7 @@ Editor::track_canvas_scroll (GdkEventScroll* ev)
                        current_stepping_trackview->step_height (false);
                        return true;
                } else {
-                       scroll_tracks_up_line ();
+                       scroll_up_one_track ();
                        return true;
                }
                break;
@@ -129,7 +130,7 @@ Editor::track_canvas_scroll (GdkEventScroll* ev)
                        current_stepping_trackview->step_height (true);
                        return true;
                } else {
-                       scroll_tracks_down_line ();
+                       scroll_down_one_track ();
                        return true;
                }
                break;
@@ -1085,12 +1086,6 @@ Editor::canvas_playhead_cursor_event (GdkEvent *event, ArdourCanvas::Item* item)
        return typed_event (item, event, PlayheadCursorItem);
 }
 
-bool
-Editor::canvas_zoom_rect_event (GdkEvent *event, ArdourCanvas::Item* item)
-{
-       return typed_event (item, event, NoItem);
-}
-
 bool
 Editor::canvas_note_event (GdkEvent *event, ArdourCanvas::Item* item)
 {
@@ -1126,6 +1121,12 @@ Editor::canvas_drop_zone_event (GdkEvent* event)
                return canvas_scroll_event (&scroll, true);
                break;
 
+       case GDK_ENTER_NOTIFY:
+               return typed_event (_canvas_drop_zone, event, DropZoneItem);
+
+       case GDK_LEAVE_NOTIFY:
+               return typed_event (_canvas_drop_zone, event, DropZoneItem);
+
        default:
                break;
        }
@@ -1157,7 +1158,7 @@ Editor::track_canvas_drag_motion (Glib::RefPtr<Gdk::DragContext> const& context,
 
        (void) window_event_sample (&event, &px, &py);
 
-       std::pair<TimeAxisView*, int> const tv = trackview_by_y_position (py);
+       std::pair<TimeAxisView*, int> const tv = trackview_by_y_position (py, false);
        bool can_drop = false;
        
        if (tv.first != 0) {
@@ -1201,7 +1202,7 @@ Editor::track_canvas_drag_motion (Glib::RefPtr<Gdk::DragContext> const& context,
                         * TODO: check if file is audio/midi, allow drops on same track-type only,
                         * currently: if audio is dropped on a midi-track, it is only added to the region-list
                         */
-                       if (Profile->get_sae() || Config->get_only_copy_imported_files()) {
+                       if (Profile->get_sae() || ARDOUR_UI::config()->get_only_copy_imported_files()) {
                                context->drag_status(Gdk::ACTION_COPY, time);
                        } else {
                                if ((context->get_actions() & (Gdk::ACTION_COPY | Gdk::ACTION_LINK | Gdk::ACTION_MOVE)) == Gdk::ACTION_COPY) {