def on_drag_data_received_event(self, widget, drag_context, x, y, selection_data, info, timestamp): log.debug("Selection(s) dropped on main window %s", selection_data.data) if selection_data.get_uris(): process_args(selection_data.get_uris()) else: process_args(selection_data.data.split()) drag_context.finish(True, True)
def on_drag_data_received_event(self, widget, drag_context, x, y, selection_data, info, timestamp): args = [] for uri in selection_data.data.split(): args.append(urllib.unquote(uri)) process_args(args) drag_context.finish(True, True)
def on_drag_data_received_event(self, widget, drag_context, x, y, selection_data, info, timestamp): args = [] for uri in selection_data.data.split(): if deluge.common.windows_check(): args.append(urllib.url2pathname(uri[7:])) else: args.append(urllib.unquote(urlparse(uri).path)) process_args(args) drag_context.finish(True, True)
def nsapp_open_file(osxapp, filename): # Will be raised at app launch (python opening main script) if filename.endswith('Deluge-bin'): return True from deluge.ui.gtkui.ipcinterface import process_args process_args([filename])
def add_torrent(model, path, iter, data): torrent_path = model.get_value(iter, 1) process_args([torrent_path])
def add_torrent(model, path, _iter, data): torrent_path = model.get_value(_iter, 1).decode('utf-8') process_args([torrent_path])
def nsapp_open_file(osxapp, filename): # Ignore command name which is raised at app launch (python opening main script). if filename == sys.argv[0]: return True process_args([filename])
def nsapp_open_file(osxapp, filename): # Ignore command name which is raised at app launch (python opening main script). if filename == sys.argv[0]: return True from deluge.ui.gtkui.ipcinterface import process_args process_args([filename])