Further improvments to drag and drop mult files in Windows.
svn: r14534
This commit is contained in:
		@@ -57,7 +57,7 @@ import Errors
 | 
				
			|||||||
import gen.mime
 | 
					import gen.mime
 | 
				
			||||||
from DdTargets import DdTargets
 | 
					from DdTargets import DdTargets
 | 
				
			||||||
from buttontab import ButtonTab
 | 
					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:
 | 
					                elif self._DND_EXTRA and mytype == self._DND_EXTRA.drag_type:
 | 
				
			||||||
                    self.handle_extra_type(mytype, obj)
 | 
					                    self.handle_extra_type(mytype, obj)
 | 
				
			||||||
            except pickle.UnpicklingError:
 | 
					            except pickle.UnpicklingError:
 | 
				
			||||||
                #We assume this is for URI_LIST
 | 
					                #We assume this is for URI_LIST for Linux. For Windows split sel_data.data
 | 
				
			||||||
                for file in sel_data.get_uris():
 | 
					                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())
 | 
					                    d = Utils.fix_encoding(file.replace('\0',' ').strip())
 | 
				
			||||||
 | 
					                    print repr(d)
 | 
				
			||||||
                    protocol, site, mfile, j, k, l = urlparse.urlparse(d)
 | 
					                    protocol, site, mfile, j, k, l = urlparse.urlparse(d)
 | 
				
			||||||
                    if protocol == "file":
 | 
					                    if protocol == "file":
 | 
				
			||||||
                        name = Utils.fix_encoding(mfile)
 | 
					                        name = Utils.fix_encoding(mfile)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user