summaryrefslogtreecommitdiff
path: root/ui/folder_history_box.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:28:01 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:28:01 +0200
commitfe9eb89ebc1b3c33cbac00a3fa095a14faef9113 (patch)
tree8a3bb620a9acb83fe0057061a86e8f2cb91a9fe1 /ui/folder_history_box.cpp
parent5.21 (diff)
downloadFreeFileSync-fe9eb89ebc1b3c33cbac00a3fa095a14faef9113.tar.gz
FreeFileSync-fe9eb89ebc1b3c33cbac00a3fa095a14faef9113.tar.bz2
FreeFileSync-fe9eb89ebc1b3c33cbac00a3fa095a14faef9113.zip
5.22
Diffstat (limited to 'ui/folder_history_box.cpp')
-rw-r--r--ui/folder_history_box.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/ui/folder_history_box.cpp b/ui/folder_history_box.cpp
index 89832a98..4676aa43 100644
--- a/ui/folder_history_box.cpp
+++ b/ui/folder_history_box.cpp
@@ -7,9 +7,11 @@
#include "folder_history_box.h"
#include <list>
#include <zen/scope_guard.h>
-//#include <wx/scrolwin.h>
#include <wx+/string_conv.h>
#include "../lib/resolve_path.h"
+#ifdef ZEN_LINUX
+#include <gtk/gtk.h>
+#endif
using namespace zen;
@@ -47,6 +49,16 @@ FolderHistoryBox::FolderHistoryBox(wxWindow* parent,
On OS attaching to wxEVT_LEFT_DOWN leads to occasional crashes, especially when double-clicking
*/
#endif
+
+#ifdef ZEN_LINUX
+ //file drag and drop directly into the text control unhelpfully inserts in format "file://..<cr><nl>"
+ //1. this format's implementation is a mess: http://www.lephpfacile.com/manuel-php-gtk/tutorials.filednd.urilist.php
+ //2. even if we handle "drag-data-received" for "text/uri-list" this doesn't consider logic in dirname.cpp
+ //=> disable all drop events on the text control (disables text drop, too, but not a big loss)
+ //=> all drops are nicely propagated as regular file drop events like they should have been in the first place!
+ if (GtkWidget* widget = GetConnectWidget())
+ ::gtk_drag_dest_unset(widget);
+#endif
}
bgstack15