From 5cc44a40f31bd8be1acaba0000c7ad521e9464e7 Mon Sep 17 00:00:00 2001 From: Jacob Wisor Date: Wed, 11 Sep 2013 12:05:44 +0200 Subject: Made temporary files location JFileChooser open at the currently specified location Made temporary files location JFileChooser display a helpful title Removed misleading "All Files" file filter from JFileChooser Added new message to resources for JFileChooser's choose button Fixed a few inconsistent messages in resource files --- .../jnlp/controlpanel/TemporaryInternetFilesPanel.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'netx/net/sourceforge/jnlp/controlpanel/TemporaryInternetFilesPanel.java') diff --git a/netx/net/sourceforge/jnlp/controlpanel/TemporaryInternetFilesPanel.java b/netx/net/sourceforge/jnlp/controlpanel/TemporaryInternetFilesPanel.java index a946595..f42ed08 100644 --- a/netx/net/sourceforge/jnlp/controlpanel/TemporaryInternetFilesPanel.java +++ b/netx/net/sourceforge/jnlp/controlpanel/TemporaryInternetFilesPanel.java @@ -109,10 +109,12 @@ public class TemporaryInternetFilesPanel extends NamedBorderPanel implements Cha bLocation.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { - JFileChooser fileChooser = new JFileChooser(); + JFileChooser fileChooser = new JFileChooser(location.getText()); fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); fileChooser.setFileHidingEnabled(false); - if (fileChooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) { + fileChooser.setAcceptAllFileFilterUsed(false); + fileChooser.setDialogTitle(Translator.R("TIFPLocationLabel")); + if (fileChooser.showDialog(null, Translator.R("TIFPFileChooserChooseButton")) == JFileChooser.APPROVE_OPTION) { // Check if we have permission to write to that location. String result = fileChooser.getSelectedFile().getAbsolutePath(); File dirLocation = new File(result); @@ -242,4 +244,4 @@ public class TemporaryInternetFilesPanel extends NamedBorderPanel implements Cha config.setProperty(properties[2], spCacheSize.getValue().toString()); } -} +} \ No newline at end of file -- cgit v1.2.3