X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FPreferences.java;h=c4f32c39f8acd7525386774a9cd73cc82d158595;hb=65ed1da9a1710a9ce132c7edfce54955dc1ddf99;hp=35fdf6ad29768fa1bc60963505804fbd76a8916f;hpb=b9293410486a5a6f9bc505e66b04b912a559cdd5;p=jalview.git diff --git a/src/jalview/gui/Preferences.java b/src/jalview/gui/Preferences.java index 35fdf6a..c4f32c3 100755 --- a/src/jalview/gui/Preferences.java +++ b/src/jalview/gui/Preferences.java @@ -156,6 +156,9 @@ public class Preferences extends GPreferences public static List groupURLLinks; static { + // don't populate with session properties + Cache.disableSessionProperties(); + // get links selected to be in the menu (SEQUENCE_LINKS) // and links entered by the user but not selected (STORED_LINKS) String inMenuString = Cache.getDefault("SEQUENCE_LINKS", ""); @@ -180,6 +183,9 @@ public class Preferences extends GPreferences */ groupURLLinks = new ArrayList<>(); + + // reenable + Cache.enableSessionProperties(); } JInternalFrame frame; @@ -248,6 +254,9 @@ public class Preferences extends GPreferences private Preferences() { super(); + // don't populate with session properties + Cache.disableSessionProperties(); + frame = new JInternalFrame(); frame.setFrameIcon(null); frame.setContentPane(this); @@ -689,6 +698,8 @@ public class Preferences extends GPreferences * Set Startup tab defaults */ + // re-enable + Cache.enableSessionProperties(); } /** @@ -701,6 +712,8 @@ public class Preferences extends GPreferences protected void setupOutputCombo(JComboBox comboBox, String propertyKey) { + Cache.disableSessionProperties(); + comboBox.addItem(promptEachTimeOpt); comboBox.addItem(lineArtOpt); comboBox.addItem(textOpt); @@ -722,6 +735,8 @@ public class Preferences extends GPreferences { comboBox.setSelectedItem(promptEachTimeOpt); } + + Cache.enableSessionProperties(); } /** @@ -733,6 +748,8 @@ public class Preferences extends GPreferences @Override public void ok_actionPerformed(ActionEvent e) { + Cache.disableSessionProperties(); + if (!validateSettings()) { return; @@ -746,6 +763,7 @@ public class Preferences extends GPreferences /* * Save Visual settings */ + Cache.applicationProperties.setProperty("SHOW_JVSUFFIX", Boolean.toString(seqLimit.isSelected())); Cache.applicationProperties.setProperty("RIGHT_ALIGN_IDS", @@ -1020,10 +1038,14 @@ public class Preferences extends GPreferences } catch (Exception ex) { } + + Cache.enableSessionProperties(); } public void saveProxySettings() { + Cache.disableSessionProperties(); + String newProxyType = customProxy.isSelected() ? Cache.PROXYTYPE_CUSTOM : noProxy.isSelected() ? Cache.PROXYTYPE_NONE : Cache.PROXYTYPE_SYSTEM; @@ -1044,6 +1066,8 @@ public class Preferences extends GPreferences wsPrefs.update++; } previousProxyType = newProxyType; + + Cache.enableSessionProperties(); } /** @@ -1075,6 +1099,8 @@ public class Preferences extends GPreferences @Override public void startupFileTextfield_mouseClicked() { + Cache.disableSessionProperties(); + // TODO: JAL-3048 not needed for Jalview-JS String fileFormat = Cache.getProperty("DEFAULT_FILE_FORMAT"); JalviewFileChooser chooser = JalviewFileChooser @@ -1096,6 +1122,8 @@ public class Preferences extends GPreferences startupFileTextfield .setText(chooser.getSelectedFile().getAbsolutePath()); } + + Cache.enableSessionProperties(); } /** @@ -1405,6 +1433,7 @@ public class Preferences extends GPreferences */ String viewerPath = ""; List paths = null; + Cache.disableSessionProperties(); try { ViewerType viewerType = ViewerType.valueOf(selectedItem); @@ -1430,6 +1459,7 @@ public class Preferences extends GPreferences { // only valid entries should be in the drop-down } + Cache.enableSessionProperties(); structureViewerPath.setText(viewerPath); paths.add(0, structureViewerPath.getText());