mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
Clean up DnD, use MIME-types
This is in preparation for allowing to drag trigger-regions or trigger-slots. Those will not use a static singleton PublicEditor API. Additionally this constrains Ardour-internal drags to Ardour (via Gtk::TARGET_SAME_APP).
This commit is contained in:
parent
1078dc7eda
commit
056189c76c
10 changed files with 32 additions and 28 deletions
|
|
@ -268,8 +268,8 @@ Editor::initialize_canvas ()
|
|||
|
||||
vector<TargetEntry> target_table;
|
||||
|
||||
target_table.push_back (TargetEntry ("regions")); // DnD from the region list will generate this target
|
||||
target_table.push_back (TargetEntry ("sources")); // DnD from the source list will generate this target
|
||||
target_table.push_back (TargetEntry ("x-ardour/region.erl", TARGET_SAME_APP)); // DnD from the region list will generate this target
|
||||
target_table.push_back (TargetEntry ("x-ardour/region.esl", TARGET_SAME_APP)); // DnD from the source list will generate this target
|
||||
target_table.push_back (TargetEntry ("text/uri-list"));
|
||||
target_table.push_back (TargetEntry ("text/plain"));
|
||||
target_table.push_back (TargetEntry ("application/x-rootwin-drop"));
|
||||
|
|
@ -391,9 +391,9 @@ Editor::track_canvas_drag_data_received (const RefPtr<Gdk::DragContext>& context
|
|||
if (!ARDOUR_UI_UTILS::engine_is_running ()) {
|
||||
return;
|
||||
}
|
||||
if (data.get_target() == X_("regions")) {
|
||||
if (data.get_target() == "x-ardour/region.erl") {
|
||||
drop_regions (context, x, y, data, info, time, true);
|
||||
} else if (data.get_target() == X_("sources")) {
|
||||
} else if (data.get_target() == "x-ardour/region.esl") {
|
||||
drop_regions (context, x, y, data, info, time, false);
|
||||
} else {
|
||||
drop_paths (context, x, y, data, info, time);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue