sylikc/jpegview

Overwrite image without dialog or prompt does not work?

Closed this issue · 2 comments

My settings:

in JPEGView.ini: OverrideOriginalFileWithoutSaveDialog=true
in KeyMap.txt: Ctrl+S IDM_SAVE_ALLOW_NO_PROMPT

The text in the ini file states:
; If set to true, Ctrl-S overrides the original file on disk, applying the current processings without
; showing a dialog or prompting the user to confirm.

However, for example rotating the image, and doing a Control-S results in a save dialog with also _proc appended to the filename ?

I have the same settings and exact same issue.

I've just had a look around and found the problem though.
The JPEGView.ini (and the template the creates it) has a spelling/grammar error.
It writes OverrideOriginalFileWithoutSaveDialog=true but it should be OverwriteOriginalFileWithoutSaveDialog=true as seen in the code here:

https://github.com/sylikc/jpegview/blob/57ac9bcf1b9154bc6650434a576d3fb85209d75f/src/JPEGView/Config/KeyMap-README.html#L31C1-L33C2

So if you put the correct option in your config file it should save without prompt, it does for me.

There are a few spelling errors in that section, writing "overridden" instead of "overwritten", I assume someone replaced all instances of a previous word in the file (wrongly) thus creating a non-existing option to appear that looks correct.

the original setting was Override... which I renamed to Overwrite in the last release and it looks like I just forgot to replace the rest