kaikramer / keystore-explorer

KeyStore Explorer is a free GUI replacement for the Java command-line utilities keytool and jarsigner.
https://keystore-explorer.org/
GNU General Public License v3.0
1.7k stars 275 forks source link

setApproveButtonText/showOpenDialog workaround for various actions (issue #218) #230

Closed gcbartlett closed 4 years ago

kaikramer commented 4 years ago

Thanks for the PR. Looks like a good workaround for the problem with VAqua. I would have preferred a fix in VAqua, because it behaves differently than any other laf, but I can live with this solution.

However, right now it addresses only the "Examine File" dialog, but @derkork wrote that the problem exists for every open file dialog.

gcbartlett commented 4 years ago

I'm not familiar with VAqua, but it seems like you'd at least need to specify the type of the dialog to be created (e.g. either setDialogType(OPEN_DIALOG) or setDialogType(SAVE_DIALOG)) as the dialog UI elements and selection logic appears different for these different types. But it looks like the OPEN_DIALOG type should be the default.

The main "Open Keystore" action already works correctly (it too uses the JFileChooser.showOpenDialog method. The same fix/workaround could be applied to the other file open actions too, obviously. This was the action that I had run across. Unfortunately, I'm away from my machine at the moment, so not able to update the PR.

gcbartlett commented 4 years ago

I added the same workaround for a few other file open dialogs.

kaikramer commented 4 years ago

There are 2 more locations with open dialogs, but I'll just merge the PR for simplicity's sake.

Thanks again for contributing to KSE!