From: Jim Procter Date: Thu, 28 Jun 2018 15:52:56 +0000 (+0100) Subject: JAL-3048 TODOs for refactoring JalviewFileChooser pattern X-Git-Tag: Release_2_11_4_0~45^2~18^2~615^2^2~1 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=8193add590cf13e5bdb422347473f1d96755c4f3;p=jalview.git JAL-3048 TODOs for refactoring JalviewFileChooser pattern JAL-3026 disable browser select dialog for default browser in javasript --- diff --git a/src/jalview/gui/Preferences.java b/src/jalview/gui/Preferences.java index 7d02fac..019b29e 100755 --- a/src/jalview/gui/Preferences.java +++ b/src/jalview/gui/Preferences.java @@ -833,6 +833,7 @@ public class Preferences extends GPreferences @Override public void startupFileTextfield_mouseClicked() { + // TODO: JAL-3048 not needed for Jalview-JS String fileFormat = Cache.getProperty("DEFAULT_FILE_FORMAT"); JalviewFileChooser chooser = JalviewFileChooser .forRead(Cache.getProperty("LAST_DIRECTORY"), fileFormat); @@ -1006,17 +1007,22 @@ public class Preferences extends GPreferences @Override public void defaultBrowser_mouseClicked(MouseEvent e) { - JFileChooser chooser = new JFileChooser("."); - chooser.setDialogTitle( - MessageManager.getString("label.select_default_browser")); + // TODO: JAL-3048 not needed for j2s + /* + * @j2sNative + */ + { + JFileChooser chooser = new JFileChooser("."); + chooser.setDialogTitle( + MessageManager.getString("label.select_default_browser")); - int value = chooser.showOpenDialog(this); + int value = chooser.showOpenDialog(this); - if (value == JFileChooser.APPROVE_OPTION) - { - defaultBrowser.setText(chooser.getSelectedFile().getAbsolutePath()); + if (value == JFileChooser.APPROVE_OPTION) + { + defaultBrowser.setText(chooser.getSelectedFile().getAbsolutePath()); + } } - } /*