AppleCommander icon indicating copy to clipboard operation
AppleCommander copied to clipboard

Handle confirmation when exiting with modified disk contents

Open a2geek opened this issue 2 years ago • 1 comments

          Thanks. Now, I do get get asked for confirmation if I try to close the disk window:

The disk has been modified. Are you certain you want to quit? [No] [Yes]

AppleCommander

However, a couple things.

First, I wasn't quitting; I was closing the disk window.

Second, such dialog boxes typically give three buttons: one to save the changes and close the document, one to discard the changes and close the document, and one to leave the document open. You've given us the last two options but not the first one, and you've labeled the buttons in a way that is counterintuitive to me as a Mac user by asking the inverse of the question I'm used to being asked and by making the destructive action the default button.

On Macintosh System 6 and earlier, such dialog boxes typically asked a question like "Do you want to save changes?" and the buttons were customarily labeled "Yes", "No", and "Cancel":

TeachText 6

On System 7 and later, the custom changed so that the dialog text included the name of the application and the name of the document (which can be helpful if you have many documents or applications open) and the buttons were then labeled "Save", "Don't Save", and "Cancel" to make them clearer for those who don't read the text above the buttons, and the destructive button was moved to be visually separate from the non-destructive buttons:

TeachText 7

This custom persists on macOS today in apps that don't implement autosave:

BBEdit

I don't know if there's a particular custom in Java for this kind of thing but you might look at what other Windows and Linux GUI apps (not necessarily written in Java) do.

Third, while I get this confirmation if I close the disk window, I do not get any message if I close the main application window; it quits and discards my changes.

Fourth, if I choose Quit AppleCommander from the AppleCommander menu, it also quits without confirmation.

Originally posted by @ryandesign in https://github.com/AppleCommander/AppleCommander/issues/117#issuecomment-1774368333

a2geek avatar Nov 01 '23 19:11 a2geek

@ryandesign Moved #117 continuation here.

a2geek avatar Nov 01 '23 19:11 a2geek