Skip to content

Commit

Permalink
Merge pull request metabrainz#2192 from rdswift/quit_command_mods
Browse files Browse the repository at this point in the history
PICARD-2615: Picard does not check for unsaved files when using the QUIT command
  • Loading branch information
phw authored Feb 5, 2023
2 parents 5fabe95 + 98f3072 commit 5094917
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions picard/tagger.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,10 @@ def handle_command_pause(self, argstring):
log.error("No command pause time specified.")

def handle_command_quit(self, argstring):
if not argstring.upper() == 'FORCE' and self.window.show_quit_confirmation():
log.info("QUIT command cancelled by the user.")
RemoteCommands.set_quit(False) # Allow queueing more commands.
return
self.exit()
self.quit()

Expand Down
4 changes: 3 additions & 1 deletion picard/util/remotecommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ def __init__(self, method_name, help_text=None, help_args=None):
),
"QUIT": RemoteCommand(
"handle_command_quit",
help_text="Exit the running instance of Picard.",
help_text="Exit the running instance of Picard. "
"Use the argument 'FORCE' to bypass Picard's unsaved files check.",
help_args="[FORCE]",
),
"REMOVE": RemoteCommand(
"handle_command_remove",
Expand Down

0 comments on commit 5094917

Please sign in to comment.