Komodo / KomodoEdit

Komodo Edit is a fast and free multi-language code editor. Written in JS, Python, C++ and based on the Mozilla platform.
http://www.komodoide.com/komodo-edit
Other
2.15k stars 301 forks source link

Close deleted files window always appear #2462

Open kevinlieser opened 7 years ago

kevinlieser commented 7 years ago

When there are files open that get externally deleted I am getting a dialog which asks me to close these files every time Komodo IDE get "in foreground". When I select "don't ask me again" it does not work – it does not remember. It will always prompt the dialog when switching to Komdo IDE.

Open a file – delete it. Select "cancel" in the dialog. Switch to another app – switch to Komodo again. The dialog will appear again.

The dialog show not get prompted as I selected "don't ask me again".

Komodo Edit or IDE? Komodo IDE Komodo Version? 10.2.1 Operating System (and version)? macOS Sierra 10.12.4

bildschirmfoto 2017-04-07 um 12 20 45

Defman21 commented 7 years ago

As a workaround you can change this behavior in Preferences - Editor.

image

kevinlieser commented 7 years ago

Thanks!

mitchell-as commented 7 years ago

When you click "Cancel", you are not actually saving any preference. You have to click "Ok" to save the preference. However, since this closes the file, that may be undesirable. I think this should be a Yes/No type of prompt instead of Ok/Cancel. Clicking "No" should save the preference selection while keeping the file open.

th3coop commented 7 years ago

I don't think this dialog can change. I often hit the use cases it supports.

  1. I want all files gone, i deleted them on purpose
  2. I want no files gone, I'm doing some sort of reset
  3. I want some files gone, but not all of them.

You can't have a Yes/No dialog for those use cases. @kevinlieser as @mitchell-as said, you clicked Cancel so Komodo correctly did nothing. We don't save Cancel as an action. I think that would be weird. You need to say either 'Close all", "Close some" or "Close none" then click Ok, that will then save the pref that @Defman21 pointed out to "Close all files", "Ask me what files to close" and "Close no files" respectively.

Does that make sense? Now that I've written all that it does seem a bit complicated but I still would like to keep that use case around.

Naatan commented 7 years ago

Why can't it have yes/no? The question it prompts is "Do you want to close them?".

th3coop commented 7 years ago

It shouldn't. It should say "Which files would you like to close?"

Naatan commented 7 years ago

But why? The current prompt with a yes/no button would address the problem. I don't see the advantage of making the task involve anything else.

th3coop commented 7 years ago

I don't see the advantage of making the task involve anything else.

I'm not saying do anything else. I'm saying don't change anything except perhaps the wording. You're suggesting implementing new logic which I don't think is necessary.

Naatan commented 7 years ago

Oh I see. I think a potential problem with that is people probably dont read it. Yes/no would have both actions save your selection (dont ask again).

th3coop commented 7 years ago

OK, so No keeps all files open and saves Close no files to the prefs if "Don't asks again" is selected. That would be the only functional change. Other than changing Ok to Yes, clicking Yes would not change from what it currently does as described in my previous comment: https://github.com/Komodo/KomodoEdit/issues/2462#issuecomment-292590340

So what @mitchell-as...

kevinlieser commented 7 years ago

OK, so No keeps all files open and saves Close no files to the prefs if "Don't asks again" is selected. That would be the only functional change. Other than changing Ok to Yes, clicking Yes would not change from what it currently does as described in my previous comment: #2462 (comment)

I would say the dialog should show "Close no files" (actually cancel), "Close selected files" (actually Ok) and when selecting "Don't ask again" the "Close no files" button should get renamed to "Never close files" and this button should also store the preference. The "Ok" button should do what he actually does.

With this wording there cannot be any misunderstanding.

th3coop commented 7 years ago

I would say the dialog should show "Close no files" (actually cancel)

I don't agree with this. Cancel shouldn't imply a different action, it's just Cancel ie. ignore this dialog and any action it is asking for. I would think a person would later ask "why didn't this state save when I selected Don't ask me again?".

I don't reeeeeally like the idea of adding even more code and logic to change button names around but I'll leave that to Nathanr as I don't feel strongly about it.

Naatan commented 7 years ago

Yeah let's keep it simple. Yes/no, both save your preference in regards to whether you want to be asked again.

Defman21 commented 7 years ago

I like Nathan's idea :)