mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-09 18:08:39 +00:00
Fix #577 adding torrents by drag n' drop in windows
This commit is contained in:
parent
be70707149
commit
b3cda61961
2 changed files with 33 additions and 32 deletions
|
@ -88,6 +88,8 @@ def process_args(args):
|
|||
return
|
||||
config = ConfigManager("gtkui.conf")
|
||||
for arg in args:
|
||||
if not arg:
|
||||
continue
|
||||
log.debug("arg: %s", arg)
|
||||
if deluge.common.is_url(arg):
|
||||
log.debug("Attempting to add %s from external source..",
|
||||
|
@ -113,4 +115,3 @@ def process_args(args):
|
|||
component.get("AddTorrentDialog").show(config["focus_add_dialog"])
|
||||
else:
|
||||
client.add_torrent_file([os.path.abspath(arg)])
|
||||
|
||||
|
|
|
@ -196,9 +196,9 @@ class MainWindow(component.Component):
|
|||
args = []
|
||||
for uri in selection_data.data.split():
|
||||
if deluge.common.windows_check():
|
||||
uri = uri[7:]
|
||||
uri = urllib.url2pathname(uri).strip("\r\n\x00")
|
||||
args.append(urllib.unquote(urlparse(uri).path))
|
||||
args.append(urllib.url2pathname(uri[7:]))
|
||||
else:
|
||||
args.append(urllib.unquote(urlparse(uri).path))
|
||||
process_args(args)
|
||||
drag_context.finish(True, True)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue