git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Jmol/SwingJS update. Includes new transpiler and runtime
[jalview.git]
/
src
/
jalview
/
gui
/
Preferences.java
diff --git
a/src/jalview/gui/Preferences.java
b/src/jalview/gui/Preferences.java
index
31842e4
..
92dde1f
100755
(executable)
--- a/
src/jalview/gui/Preferences.java
+++ b/
src/jalview/gui/Preferences.java
@@
-22,6
+22,7
@@
package jalview.gui;
import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
import jalview.bin.Cache;
import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
import jalview.bin.Cache;
+import jalview.bin.Jalview;
import jalview.gui.Help.HelpId;
import jalview.gui.StructureViewer.ViewerType;
import jalview.io.FileFormatI;
import jalview.gui.Help.HelpId;
import jalview.gui.StructureViewer.ViewerType;
import jalview.io.FileFormatI;
@@
-188,10
+189,12
@@
public class Preferences extends GPreferences
super();
frame = new JInternalFrame();
frame.setContentPane(this);
super();
frame = new JInternalFrame();
frame.setContentPane(this);
- wsPrefs = new WsPreferences();
- wsTab.add(wsPrefs, BorderLayout.CENTER);
+ if (!Jalview.isJS())
+ {
+ wsPrefs = new WsPreferences();
+ wsTab.add(wsPrefs, BorderLayout.CENTER);
+ }
int width = 500, height = 450;
int width = 500, height = 450;
- new jalview.util.Platform();
if (Platform.isAMac())
{
width = 570;
if (Platform.isAMac())
{
width = 570;
@@
-548,8
+551,12
@@
public class Preferences extends GPreferences
comboBox.addItem(promptEachTimeOpt);
comboBox.addItem(lineArtOpt);
comboBox.addItem(textOpt);
comboBox.addItem(promptEachTimeOpt);
comboBox.addItem(lineArtOpt);
comboBox.addItem(textOpt);
- String defaultOption = Cache.getDefault(propertyKey,
- "Prompt each time");
+
+ /*
+ * JalviewJS doesn't support Lineart so force it to Text
+ */
+ String defaultOption = Jalview.isJS() ? "Text"
+ : Cache.getDefault(propertyKey, "Prompt each time");
if (defaultOption.equalsIgnoreCase("Text"))
{
comboBox.setSelectedItem(textOpt);
if (defaultOption.equalsIgnoreCase("Text"))
{
comboBox.setSelectedItem(textOpt);
@@
-813,7
+820,10
@@
public class Preferences extends GPreferences
Cache.applicationProperties.setProperty("PAD_GAPS",
Boolean.toString(padGaps.isSelected()));
Cache.applicationProperties.setProperty("PAD_GAPS",
Boolean.toString(padGaps.isSelected()));
- wsPrefs.updateAndRefreshWsMenuConfig(false);
+ if (!Jalview.isJS())
+ {
+ wsPrefs.updateAndRefreshWsMenuConfig(false);
+ }
Cache.saveProperties();
Desktop.instance.doConfigureStructurePrefs();
try
Cache.saveProperties();
Desktop.instance.doConfigureStructurePrefs();
try
@@
-887,8
+897,11
@@
public class Preferences extends GPreferences
{
try
{
{
try
{
- wsPrefs.updateWsMenuConfig(true);
- wsPrefs.refreshWs_actionPerformed(e);
+ if (!Jalview.isJS())
+ {
+ wsPrefs.updateWsMenuConfig(true);
+ wsPrefs.refreshWs_actionPerformed(e);
+ }
frame.setClosed(true);
} catch (Exception ex)
{
frame.setClosed(true);
} catch (Exception ex)
{