Fix preference directory opening in the GUI with --preferences-file

In the preferences dialog, the name of the preferences file is shown for
advanced editing. If the filename is clicked, the folder containing the
file is opened. However, this always used Base.getSettingsFolder, which
is the folder where the settings file _normally_ resides. But when the
--preferences-file option is used, the actual preferences file might be
somewhere else.

This commit makes sure to always open up the parent directory of the
actual preferences file in use, instead of always the default one.
This commit is contained in:
Matthijs Kooijman 2014-04-10 12:34:52 +02:00 committed by Cristian Maglie
parent f47ec35ebe
commit 83ede8fdb4
1 changed files with 1 additions and 1 deletions

View File

@ -492,7 +492,7 @@ public class Preferences {
final JLabel clickable = label;
label.addMouseListener(new MouseAdapter() {
public void mousePressed(MouseEvent e) {
Base.openFolder(Base.getSettingsFolder());
Base.openFolder(preferencesFile.getParentFile());
}
public void mouseEntered(MouseEvent e) {