dirkwhoffmann / virtualc64

VirtualC64 is a cycle-accurate C64 emulator for macOS
https://dirkwhoffmann.github.io/virtualc64
Other
356 stars 33 forks source link

Unnecessary conformation dialog on closing app #480

Closed michellekg closed 5 years ago

michellekg commented 5 years ago

So when I started an emulator (even without any game, just opened VirtualC64 app) and tryint to close it with Cmd+W, it asks me if I want to save all changes. But there's not changes at this moment, so why dialog?

And one more suggestion - maybe let user choose in settings if this dialog should appear at all? I'm little (just a tiny little bit) annoyed by it because I never save games (well, I did couple of times, but I did it manually), and that's just one more key press for me. It's a little thing but still.

dirkwhoffmann commented 5 years ago

The technical reason for the dialog to appear is simple. VirtualC64 is a document based app where each document is an emulator instance. When the emulator runs, there is an internal change of state which means the document has been 'edited'. The GUI cannot know if the user has typed in something worthy or if the emulator was just toggling the cursor a couple of times.

We need to take one of the followings actions:

1) Leave it as it is. 2) Never ask to save (the user will still be warned if he is about to eject a modified disk which is independent behaviour). 3) Add an option in the emulator settings (e.g., under documents) named "Close emulators without asking to save." (maybe with a better name).

Personally, I don't have a strong opinion on the best solution. All options seem to have advantages and disadvantages. 1) is the macOS default behaviour which seems to annoy some people for the kind of application we're talking about, 2) might reflect how most people work with the emulator, 3) is most flexible, but it adds complexity to the GUI by introducing yet another user option.

dirkwhoffmann commented 5 years ago

There is a fourth option:

In the current implementation, the "changeCount" of a document is increased when the emulator instance is run. A changeCount > 0 lets the "unsaved changed" dialog appear by macOS. We could do the following modification:

The dialog would then only come up if an exported disk is inside the virtual drive. Advantage: We can get rid of the manually implemented disk warn dialog. Disadvantage: The "unsaved changes" dialog does not explicitly tell the user that his disk data will be lost if he proceeds.

Alessandro1970 commented 5 years ago

Hi, for me: Leave it as it is.

mortinus commented 5 years ago

We've been used for some time, so it's OK for me (option 1).

rossimariolee commented 5 years ago

Option 1 for me too. Leave it as it is.

UgoCaneFifone commented 5 years ago

Hello, option 1 for me too !!!

michellekg commented 5 years ago

The best option is 4, it's normal behavior for document based app - "Don't ask to save if user didn't change anything". Text editors, graphic editors etc - all works like that.

Option 3 is fine too, because it includes option 1 for most users (and give advanced users some extra).

DaitarnIII commented 5 years ago

Option 4 ...Disadvantage: The "unsaved changes" dialog does not explicitly tell the user that his disk data will be lost if he proceeds

Best Option 1

...but the Add-On "Close emulators without asking to save." Could be fine, like in VMWare

Alessandro1970 commented 5 years ago

Ok, right, add-On menu/command or dialog on exit: "Close emulators without asking to save."

dirkwhoffmann commented 5 years ago

What about adding an option like this:

Documents: Warn about unsaved data: <PopupBox: Always, If disk data has changed, Never>

Maybe with a better name for "If disk data has changed".

michellekg commented 5 years ago

What about adding an option like this:

Documents: Warn about unsaved data: <PopupBox: Always, If disk data has changed, Never> Maybe with a better name for "If disk data has changed".

Well, that's nice. Solves all the problems and justify all sides )

dirkwhoffmann commented 5 years ago

I finally decided to used two check buttons to make it crystal clear what the new options are about:

newsettings

dirkwhoffmann commented 5 years ago

Feature is available in V3.3 alpha 1:

http://www.dirkwhoffmann.de/virtualc64/VirtualC64_3.3_alpha1.zip

Please reopen if there is still an issue.

dirkwhoffmann commented 5 years ago

Feature is available in V3.3 alpha 1:

http://www.dirkwhoffmann.de/virtualc64/VirtualC64_3.3_alpha1.zip

Regarding the name of a quick-saved screenshot, I have adapted the name scheme of Apple's grab tool:

ohne titel

michellekg commented 5 years ago

Works like magic.