Audiveris / audiveris

Latest generation of Audiveris OMR engine
https://audiveris.github.io/audiveris
GNU Affero General Public License v3.0
1.54k stars 230 forks source link

file-open dialog: disable file-rename function #165

Open Bacchushlg opened 6 years ago

Bacchushlg commented 6 years ago

The file-open dialog allows to rename a file actually. Unfortunately this leeds to a problem when opening a file by double-click - but the double click is interpreted a 2 click (-> rename). Once this happens, the double-click does not function any more, not even to select another directory.

I propose to disable rename, if the used dialog box allows this (I assume it is possible...). Rename during opening a file makes no sense...

hbitteur commented 6 years ago

Yes, this happens when you first select a file, then do a double-click on this same file. It does not happen when you directly do a double-click on a not-yet-selected file.

I'm afraid there isn't much we can do here. At least on Windows, the dialog seems delegated to some Windows platform stuff. And I can't find any option (in Java code) to deal with this. A workaround might be to fall-back to some (ugly) Java look & feel... :-(

Do you observe the same "renaming capability" on Linux and Mac?

Bacchushlg commented 6 years ago

Ok, no problem. I just know from the file dialogs provided by Windows directly (e.g. used by Visual Studio) there are flags to disable this. My expectation was that the same would be provided by the dialog that you use. It's more a nice-to-have...

hbitteur commented 6 years ago

Here is the javadoc for JFileChooser: https://docs.oracle.com/javase/7/docs/api/javax/swing/JFileChooser.html

There are some flags available, but I couldn't find any related to renaming.