def do(self): SimpleAction.do(self) (model, selection_iter) = self.__dialog.lists["docs"]["gui"].get_selection().get_selected() if selection_iter == None: print "No doc selected" return val = model.get_value(selection_iter, 5) self.__dialog.removeDocButton.set_sensitive(val)
def do(self): SimpleAction.do(self) (model, selection_iter) = self.__dialog.lists["docs"]["gui"].get_selection().get_selected() if selection_iter == None: print "No doc selected" return self.__dialog.lists["docs"]["gui"].set_cursor( model.get_path(selection_iter), self.__dialog.lists["docs"]["columns"]["nb_pages"], start_editing=True )
def do(self, new_text): SimpleAction.do(self, new_text=new_text) new_text = str(int(new_text)) # make sure it's a valid number (model, selection_iter) = self.__dialog.lists["docs"]["gui"].get_selection().get_selected() if selection_iter == None: print "No doc selected" return line = model[selection_iter] line[1] = int(new_text) model[selection_iter] = line
def do(self): SimpleAction.do(self) (model, selection_iter) = self.__dialog.lists["docs"]["gui"].get_selection().get_selected() if selection_iter == None: print "No doc selected" return model.remove(selection_iter) for line_idx in range(0, len(self.__dialog.lists["docs"]["model"])): line = self.__dialog.lists["docs"]["model"][line_idx] if not self.__dialog.lists["docs"]["include_current_doc"]: line[0] = _("Document %d") % (line_idx + 1) elif line_idx != 0: line[0] = _("Document %d") % line_idx
def do(self): SimpleAction.do(self) docidx = len(self.__dialog.lists["docs"]["model"]) if not self.__dialog.lists["docs"]["include_current_doc"]: docidx += 1 self.__dialog.lists["docs"]["model"].append( [ _("Document %d") % docidx, "1", # nb_pages True, # can_edit (nb_pages) 0, # scan_progress_int "", # scan_progress_txt True, # can_delete ] )
def do(self): SimpleAction.do(self) try: scanner = self.__config.get_scanner_inst() except Exception: print "No scanner found !" gobject.idle_add(popup_no_scanner_found, self.__dialog.dialog) raise for line_idx in range(0, len(self.__dialog.lists["docs"]["model"])): line = self.__dialog.lists["docs"]["model"][line_idx] doc = None if line_idx == 0: doc = self.__main_win_doc worker = DocScanWorker(self.__config, nb_pages=int(line[1]), line_in_treeview=line_idx, doc=doc) self.__dialog.scan_queue.add_worker(worker) if not self.__dialog.scan_queue.is_running: try: scanner.options["source"].value = "ADF" except pyinsane.rawapi.SaneException, exc: print ("Warning: Unable to set scanner source to 'Auto': %s" % (str(exc))) scan_src = scanner.scan(multiple=True) self.__dialog.scan_queue.start(scan_src=scan_src)
def __init__(self, multiscan_dialog): SimpleAction.__init__(self, "Doc selected in multi-scan list") self.__dialog = multiscan_dialog
def __init__(self, multiscan_dialog, config): SimpleAction.__init__(self, "Add doc to the multi-scan list") self.__dialog = multiscan_dialog self.__config = config
def do(self): SimpleAction.do(self) self.__dialog.dialog.destroy()
def __init__(self, multiscan_dialog): SimpleAction.__init__(self, "Cancel multi-scan") self.__dialog = multiscan_dialog
def __init__(self, multiscan_dialog, config, main_win_doc): SimpleAction.__init__(self, "Start multi-scan") self.__dialog = multiscan_dialog self.__config = config self.__main_win_doc = main_win_doc
def __init__(self, multiscan_dialog): SimpleAction.__init__(self, "End doc edit in multi-scan list") self.__dialog = multiscan_dialog
def __init__(self, settings_win): SimpleAction.__init__(self, "Scan calibration sheet") self.__settings_win = settings_win
def __init__(self, settings_win, config): SimpleAction.__init__(self, "Cancel settings") self.__settings_win = settings_win self.__config = config
def __init__(self, settings_win): SimpleAction.__init__(self, "New scanner selected") self.__settings_win = settings_win