7258 7618 7837: let the win() stuff to windows, fix url/uri handling with non-ascii characters under linux and mac (not tested under mac)
This commit is contained in:
parent
42ce347ff5
commit
66b051d3f0
@ -520,7 +520,10 @@ class GalleryTab(ButtonTab, DbGUIElement):
|
|||||||
else:
|
else:
|
||||||
files = sel_data.get_uris()
|
files = sel_data.get_uris()
|
||||||
for file in files:
|
for file in files:
|
||||||
|
if win():
|
||||||
d = conv_to_unicode((file.replace('\0',' ').strip()), None)
|
d = conv_to_unicode((file.replace('\0',' ').strip()), None)
|
||||||
|
else:
|
||||||
|
d = file
|
||||||
protocol, site, mfile, j, k, l = urlparse(d)
|
protocol, site, mfile, j, k, l = urlparse(d)
|
||||||
if protocol == "file":
|
if protocol == "file":
|
||||||
name = url2pathname(mfile)
|
name = url2pathname(mfile)
|
||||||
|
@ -184,9 +184,12 @@ class MediaView(ListView):
|
|||||||
#modern file managers provide URI_LIST. For Windows split sel_data.data
|
#modern file managers provide URI_LIST. For Windows split sel_data.data
|
||||||
files = sel_data.get_uris()
|
files = sel_data.get_uris()
|
||||||
for file in files:
|
for file in files:
|
||||||
|
if win():
|
||||||
clean_string = conv_to_unicode(
|
clean_string = conv_to_unicode(
|
||||||
file.replace('\0',' ').replace("\r", " ").strip(),
|
file.replace('\0',' ').replace("\r", " ").strip(),
|
||||||
None)
|
None)
|
||||||
|
else:
|
||||||
|
clean_string = file
|
||||||
protocol, site, mfile, j, k, l = urlparse(clean_string)
|
protocol, site, mfile, j, k, l = urlparse(clean_string)
|
||||||
if protocol == "file":
|
if protocol == "file":
|
||||||
name = url2pathname(mfile)
|
name = url2pathname(mfile)
|
||||||
|
Loading…
Reference in New Issue
Block a user