Fix drag n drop adding of torrents with space in filename

This commit is contained in:
Andrew Resch 2008-07-21 09:54:46 +00:00
parent 6e35589ea9
commit 0e6dc927b3
1 changed files with 3 additions and 2 deletions

View File

@ -37,6 +37,7 @@ import gtk, gtk.glade
import gobject import gobject
import pkg_resources import pkg_resources
from urlparse import urlparse from urlparse import urlparse
import urllib
from deluge.ui.client import aclient as client from deluge.ui.client import aclient as client
import deluge.component as component import deluge.component as component
@ -192,6 +193,6 @@ class MainWindow(component.Component):
def on_drag_data_received_event(self, widget, drag_context, x, y, selection_data, info, timestamp): def on_drag_data_received_event(self, widget, drag_context, x, y, selection_data, info, timestamp):
args = [] args = []
for uri in selection_data.data.split(): for uri in selection_data.data.split():
args.append(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)