Fix drag n' drop in windows

This commit is contained in:
Andrew Resch 2008-08-03 20:12:35 +00:00
parent 520dab70d0
commit 53f6909b6e
1 changed files with 3 additions and 0 deletions

View File

@ -193,6 +193,9 @@ 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():
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.unquote(urlparse(uri).path))
process_args(args) process_args(args)
drag_context.finish(True, True) drag_context.finish(True, True)