From 961dd0ad540822616aacec558e360d5df175e874 Mon Sep 17 00:00:00 2001 From: Michael Becker Date: Wed, 17 Jun 2020 18:32:49 -0400 Subject: [PATCH] populate drag-drop list of files in a more cross-platform way (requires latest uwt) --- .../Editors/FileSystem/FileSystemEditor.cs | 2 +- Libraries/UniversalEditor.UserInterface/MainWindow.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Libraries/UniversalEditor.UserInterface/Editors/FileSystem/FileSystemEditor.cs b/Libraries/UniversalEditor.UserInterface/Editors/FileSystem/FileSystemEditor.cs index 9e44c5b1..14210013 100644 --- a/Libraries/UniversalEditor.UserInterface/Editors/FileSystem/FileSystemEditor.cs +++ b/Libraries/UniversalEditor.UserInterface/Editors/FileSystem/FileSystemEditor.cs @@ -80,7 +80,7 @@ namespace UniversalEditor.Editors.FileSystem // FIXME: this is GTK-specific... this.tv.RegisterDragSource(new DragDropTarget[] { - new DragDropTarget("text/uri-list", DragDropTargetFlags.SameApplication | DragDropTargetFlags.OtherApplication, 0x0) + new DragDropTarget(DragDropTargetTypes.FileList, DragDropTargetFlags.SameApplication | DragDropTargetFlags.OtherApplication, 0x0) }, DragDropEffect.Copy, MouseButtons.Primary | MouseButtons.Secondary, KeyboardModifierKey.None); this.tv.DragDropDataRequest += tv_DragDropDataRequest; diff --git a/Libraries/UniversalEditor.UserInterface/MainWindow.cs b/Libraries/UniversalEditor.UserInterface/MainWindow.cs index e5212d7e..089af350 100644 --- a/Libraries/UniversalEditor.UserInterface/MainWindow.cs +++ b/Libraries/UniversalEditor.UserInterface/MainWindow.cs @@ -737,7 +737,7 @@ namespace UniversalEditor.UserInterface { this.RegisterDropTarget(new DragDropTarget[] { - new DragDropTarget("text/uri-list", DragDropTargetFlags.SameApplication | DragDropTargetFlags.OtherApplication, 0x1) + new DragDropTarget(DragDropTargetTypes.FileList, DragDropTargetFlags.SameApplication | DragDropTargetFlags.OtherApplication, 0x1) }, DragDropEffect.Copy, MouseButtons.Primary | MouseButtons.Secondary, KeyboardModifierKey.None); Engine.CurrentEngine.Windows.Add(this);