Ejemplo n.º 1
0
	def __onListSelectionChanged(self):
		numSelected = len(self.ui.listWidget.selectedItems())
		if not numSelected:
			self.ui.status.setText("")
		else:
			self.ui.status.setText("%d path%s selected" % (numSelected, '' if numSelected <= 1 else 's'))

		self.ui.lineEditDocumentName.setText(DocumentStorage.getNewDocumentName(self.__scanPaths()))
		self.completeChanged.emit()
Ejemplo n.º 2
0
    def __onListSelectionChanged(self):
        numSelected = len(self.ui.listWidget.selectedItems())
        if not numSelected:
            self.ui.status.setText("")
        else:
            self.ui.status.setText("%d path%s selected" % (numSelected, "" if numSelected <= 1 else "s"))

        self.ui.lineEditDocumentName.setText(DocumentStorage.getNewDocumentName(self.__scanPaths()))
        self.completeChanged.emit()
Ejemplo n.º 3
0
 def test_document_gives_new_filenames(self):
     new_name = DocumentStorage.getNewDocumentName(None)
     self.assertTrue('New Scan' in new_name)
Ejemplo n.º 4
0
 def test_cdrive_path_creates_sane_document_name(self):
     path = "c:\\"
     name = DocumentStorage.getNewDocumentName([path])
     self.assertTrue("c__" in name)