[jsword-svn] r1872 - in trunk: bibledesktop/src/main/resources common/src/main/java/org/crosswire/common/config jsword/src/main/java/org/crosswire/jsword/util
dmsmith at www.crosswire.org
dmsmith at www.crosswire.org
Mon Jun 9 16:00:39 MST 2008
Author: dmsmith
Date: 2008-06-09 16:00:37 -0700 (Mon, 09 Jun 2008)
New Revision: 1872
Modified:
trunk/bibledesktop/src/main/resources/config.xml
trunk/common/src/main/java/org/crosswire/common/config/AbstractReflectedChoice.java
trunk/jsword/src/main/java/org/crosswire/jsword/util/WebWarning.java
Log:
Fixed web warning bug.
Modified: trunk/bibledesktop/src/main/resources/config.xml
===================================================================
--- trunk/bibledesktop/src/main/resources/config.xml 2008-06-09 11:51:44 UTC (rev 1871)
+++ trunk/bibledesktop/src/main/resources/config.xml 2008-06-09 23:00:37 UTC (rev 1872)
@@ -36,6 +36,7 @@
<!ATTLIST option
key CDATA #REQUIRED
static (true|false) 'true'
+ external (true|false) 'false'
type (string|boolean|int-options|map-options|string-options|string-array|file|path|directory|number|font|class|custom|password) #REQUIRED
class CDATA #IMPLIED
separator CDATA #IMPLIED
@@ -223,7 +224,7 @@
<introspect class="org.crosswire.common.swing.LookAndFeelUtil" property="Font"/>
</option>
- <option key="Application.WebWarning" type="boolean">
+ <option key="Application.WebWarning" type="boolean" external="true">
<introspect class="org.crosswire.jsword.util.WebWarning" property="WarningShown"/>
</option>
Modified: trunk/common/src/main/java/org/crosswire/common/config/AbstractReflectedChoice.java
===================================================================
--- trunk/common/src/main/java/org/crosswire/common/config/AbstractReflectedChoice.java 2008-06-09 11:51:44 UTC (rev 1871)
+++ trunk/common/src/main/java/org/crosswire/common/config/AbstractReflectedChoice.java 2008-06-09 23:00:37 UTC (rev 1872)
@@ -99,6 +99,10 @@
}
setFullPath(path.toString());
+ external = Boolean.valueOf(option.getAttributeValue("external")).booleanValue(); //$NON-NLS-1$
+
+ restart = Boolean.valueOf(option.getAttributeValue("restart")).booleanValue(); //$NON-NLS-1$
+
type = option.getAttributeValue("type"); //$NON-NLS-1$
// The important 3 things saying what we update and how we describe ourselves
@@ -226,7 +230,7 @@
*/
public boolean isSaveable()
{
- return true;
+ return !external;
}
/* (non-Javadoc)
@@ -250,7 +254,7 @@
*/
public boolean requiresRestart()
{
- return false;
+ return restart;
}
/* (non-Javadoc)
@@ -368,6 +372,16 @@
private boolean ignored;
/**
+ * Whether this choice is managed externally, via setXXX and getXXX.
+ */
+ private boolean external;
+
+ /**
+ * Whether this choice is requires a restart to be seen.
+ */
+ private boolean restart;
+
+ /**
* The log stream
*/
private static final Logger log = Logger.getLogger(AbstractReflectedChoice.class);
Modified: trunk/jsword/src/main/java/org/crosswire/jsword/util/WebWarning.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/util/WebWarning.java 2008-06-09 11:51:44 UTC (rev 1871)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/util/WebWarning.java 2008-06-09 23:00:37 UTC (rev 1872)
@@ -95,6 +95,7 @@
}
/**
+ * From configuration set the state.
* @param newShown Whether this WebWarning should be shown.
*/
public static void setWarningShown(boolean newShown)
More information about the jsword-svn
mailing list