feat: set focus to book ident on change
This commit is contained in:
@@ -276,7 +276,7 @@ class MainUI(QtWidgets.QMainWindow, Ui_MainWindow):
|
||||
"Bitte erst in den Ausleihmodus wechseln"
|
||||
)
|
||||
self.input_userno.setPlaceholderText("Bitte erst in den Ausleihmodus wechseln")
|
||||
|
||||
self.input_file_ident.setFocus()
|
||||
def showUser(self):
|
||||
if self.activeUser is None:
|
||||
# create warning dialog
|
||||
@@ -395,7 +395,7 @@ class MainUI(QtWidgets.QMainWindow, Ui_MainWindow):
|
||||
self.input_file_ident.clear()
|
||||
return
|
||||
else:
|
||||
if not " " in value:
|
||||
if " " not in value:
|
||||
# create warning dialog
|
||||
log.info("Invalid Input")
|
||||
dialog = QtWidgets.QMessageBox()
|
||||
@@ -421,7 +421,7 @@ class MainUI(QtWidgets.QMainWindow, Ui_MainWindow):
|
||||
log.debug(f"Book ID: {book_id}, User ID: {user_id}", media=media)
|
||||
if not book_id:
|
||||
log.info("Book not found, searching catalogue")
|
||||
if config.catalogue == True:
|
||||
if config.catalogue:
|
||||
media = cat.get_book(identifier)
|
||||
if not media:
|
||||
self.setStatusTipMessage("Buch nicht gefunden")
|
||||
@@ -572,7 +572,7 @@ def exit_handler():
|
||||
"Exiting, creating backup, renaming inactive users, creating report if day matches"
|
||||
)
|
||||
restore_config()
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
QtWidgets.QApplication(sys.argv)
|
||||
# print(backup.backup)
|
||||
# generate report if monday
|
||||
if datetime.datetime.now().weekday() == config.report.report_day:
|
||||
@@ -582,7 +582,7 @@ def exit_handler():
|
||||
if config.database.do_backup:
|
||||
state = backup.createBackup()
|
||||
# create dialog to show state
|
||||
if state == True:
|
||||
if state:
|
||||
return
|
||||
else:
|
||||
dialog = QtWidgets.QMessageBox()
|
||||
@@ -630,7 +630,7 @@ def launch(*argv):
|
||||
|
||||
# Load base QT translations from the normal place
|
||||
app = QtWidgets.QApplication([])
|
||||
main_ui = MainUI()
|
||||
MainUI()
|
||||
# translate ui to system language
|
||||
if SYSTEM_LANGUAGE:
|
||||
translator = QtCore.QTranslator()
|
||||
|
||||
Reference in New Issue
Block a user