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