audiveris icon indicating copy to clipboard operation
audiveris copied to clipboard

file-open dialog: disable file-rename function

Open Bacchushlg opened this issue 6 years ago • 3 comments

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...

Bacchushlg avatar May 21 '18 06:05 Bacchushlg

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?

hbitteur avatar May 23 '18 08:05 hbitteur

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...

Bacchushlg avatar May 23 '18 08:05 Bacchushlg

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.

hbitteur avatar May 23 '18 08:05 hbitteur