Saving settings restarts photobooth now to apply settings immediately

This commit is contained in:
Balthasar Reuter
2018-04-04 22:38:37 +02:00
parent 90ec84e286
commit 7a02d36c80
2 changed files with 31 additions and 6 deletions

View File

@@ -169,7 +169,7 @@ def main_photobooth(config, send, recv):
return photobooth.run(send, recv)
def main(argv):
def run(argv):
config = Config('photobooth.cfg')
@@ -181,3 +181,20 @@ def main(argv):
gui = PyQt5Gui(argv, config)
return gui.run(event_send, gui_recv)
def main(argv):
known_status_codes = {
-1: 'Initializing photobooth',
-2: 'Restarting photobooth and reloading config'
}
status_code = -1
while status_code in known_status_codes:
print(known_status_codes[status_code])
status_code = run(argv)
return status_code