mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-07 17:08:42 +00:00
Fix #577 adding torrents by drag n' drop in windows
This commit is contained in:
parent
e89251b545
commit
040337982f
4 changed files with 103 additions and 98 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Deluge 1.0.5 (In Development)
|
||||||
|
Windows:
|
||||||
|
* Fix #577 adding torrents by drag n' drop
|
||||||
|
|
||||||
Deluge 1.0.4 (31 October 2008)
|
Deluge 1.0.4 (31 October 2008)
|
||||||
Core:
|
Core:
|
||||||
* Fix #560 force an int value for global max connections
|
* Fix #560 force an int value for global max connections
|
||||||
|
|
|
@ -198,7 +198,7 @@ class AddTorrentDialog(component.Component):
|
||||||
filedump = lt.bdecode(filedump)
|
filedump = lt.bdecode(filedump)
|
||||||
_file.close()
|
_file.close()
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
log.warning("Unable to open %s: e", filename, e)
|
log.warning("Unable to open %s: %s", filename, e)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -88,6 +88,8 @@ def process_args(args):
|
||||||
return
|
return
|
||||||
config = ConfigManager("gtkui.conf")
|
config = ConfigManager("gtkui.conf")
|
||||||
for arg in args:
|
for arg in args:
|
||||||
|
if not arg:
|
||||||
|
continue
|
||||||
if deluge.common.is_url(arg):
|
if deluge.common.is_url(arg):
|
||||||
log.debug("Attempting to add %s from external source..",
|
log.debug("Attempting to add %s from external source..",
|
||||||
arg)
|
arg)
|
||||||
|
@ -105,4 +107,3 @@ def process_args(args):
|
||||||
component.get("AddTorrentDialog").show(config["focus_add_dialog"])
|
component.get("AddTorrentDialog").show(config["focus_add_dialog"])
|
||||||
else:
|
else:
|
||||||
client.add_torrent_file([os.path.abspath(arg)])
|
client.add_torrent_file([os.path.abspath(arg)])
|
||||||
|
|
||||||
|
|
|
@ -194,8 +194,8 @@ class MainWindow(component.Component):
|
||||||
args = []
|
args = []
|
||||||
for uri in selection_data.data.split():
|
for uri in selection_data.data.split():
|
||||||
if deluge.common.windows_check():
|
if deluge.common.windows_check():
|
||||||
uri = uri[7:]
|
args.append(urllib.url2pathname(uri[7:]))
|
||||||
uri = urllib.url2pathname(uri).strip("\r\n\x00")
|
else:
|
||||||
args.append(urllib.unquote(urlparse(uri).path))
|
args.append(urllib.unquote(urlparse(uri).path))
|
||||||
process_args(args)
|
process_args(args)
|
||||||
drag_context.finish(True, True)
|
drag_context.finish(True, True)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue