From f98d049f20c94ed6b0099c29688d04a97b0bef7c Mon Sep 17 00:00:00 2001 From: Peter Landgren Date: Sun, 28 Feb 2010 21:29:24 +0000 Subject: [PATCH] Further improvments to drag and drop mult files in Windows. svn: r14535 --- src/gui/editors/displaytabs/gallerytab.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/gui/editors/displaytabs/gallerytab.py b/src/gui/editors/displaytabs/gallerytab.py index a048b1519..5f610b1ec 100644 --- a/src/gui/editors/displaytabs/gallerytab.py +++ b/src/gui/editors/displaytabs/gallerytab.py @@ -57,7 +57,7 @@ import Errors import gen.mime from DdTargets import DdTargets from buttontab import ButtonTab - +import constfunc #------------------------------------------------------------------------- # # @@ -456,9 +456,14 @@ class GalleryTab(ButtonTab, DbGUIElement): elif self._DND_EXTRA and mytype == self._DND_EXTRA.drag_type: self.handle_extra_type(mytype, obj) except pickle.UnpicklingError: - #We assume this is for URI_LIST - for file in sel_data.get_uris(): + #We assume this is for URI_LIST for Linux. For Windows split sel_data.data + if constfunc.win(): + files = sel_data.data.split('\n') + else: + files = sel_data.get_uris() + for file in files: d = Utils.fix_encoding(file.replace('\0',' ').strip()) + print repr(d) protocol, site, mfile, j, k, l = urlparse.urlparse(d) if protocol == "file": name = Utils.fix_encoding(mfile)