[jsword-svn] r1474 - in trunk: bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop common-swing/src/main/java/org/crosswire/common/swing jsword/src/main/java/org/crosswire/jsword/book/sword
dmsmith at www.crosswire.org
dmsmith at www.crosswire.org
Wed Jul 4 16:28:01 MST 2007
Author: dmsmith
Date: 2007-07-04 16:27:59 -0700 (Wed, 04 Jul 2007)
New Revision: 1474
Modified:
trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/Desktop.java
trunk/common-swing/src/main/java/org/crosswire/common/swing/CWScrollPane.java
trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/SwordBookDriver.java
trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/SwordBookMetaData.java
Log:
Fixed a bug where an invalid conf was not handled correctly.
More right-to-left changes.
Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/Desktop.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/Desktop.java 2007-07-04 15:22:50 UTC (rev 1473)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/Desktop.java 2007-07-04 23:27:59 UTC (rev 1474)
@@ -569,7 +569,6 @@
changeSupport.addPropertyChangeListener(BookDataDisplay.COMPARE_BOOKS, display);
DisplaySelectPane dsp = view.getSelectPane();
dsp.addCommandListener(this);
- GuiUtil.applyDefaultOrientation(view);
return view;
}
Modified: trunk/common-swing/src/main/java/org/crosswire/common/swing/CWScrollPane.java
===================================================================
--- trunk/common-swing/src/main/java/org/crosswire/common/swing/CWScrollPane.java 2007-07-04 15:22:50 UTC (rev 1473)
+++ trunk/common-swing/src/main/java/org/crosswire/common/swing/CWScrollPane.java 2007-07-04 23:27:59 UTC (rev 1474)
@@ -46,6 +46,7 @@
public CWScrollPane(Component view)
{
super(view, verticalPolicy, horizontalPolicy);
+ GuiUtil.applyDefaultOrientation(this);
}
private static int getXPlatformVerticalScrollBarPolicy()
Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/SwordBookDriver.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/SwordBookDriver.java 2007-07-04 15:22:50 UTC (rev 1473)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/SwordBookDriver.java 2007-07-04 23:27:59 UTC (rev 1474)
@@ -104,6 +104,13 @@
internal = internal.substring(0, internal.length() - 5);
}
SwordBookMetaData sbmd = new SwordBookMetaData(configfile, internal, NetUtil.getURI(bookDir));
+
+ // skip any book that is not supported.
+ if (!sbmd.isSupported())
+ {
+ continue;
+ }
+
sbmd.setDriver(this);
// Only take the first "installation" of the Book
@@ -222,7 +229,7 @@
private Book createBook(SwordBookMetaData sbmd) throws BookException
{
BookType modtype = sbmd.getBookType();
- if (modtype.getBookCategory() == null)
+ if (modtype == null || modtype.getBookCategory() == null)
{
throw new BookException(Msg.TYPE_UNSUPPORTED);
}
Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/SwordBookMetaData.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/SwordBookMetaData.java 2007-07-04 15:22:50 UTC (rev 1473)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/SwordBookMetaData.java 2007-07-04 23:27:59 UTC (rev 1474)
@@ -187,11 +187,18 @@
*/
public void setLibrary(URI library)
{
+ // Ignore it if it is not supported.
+ if (!isSupported())
+ {
+ return;
+ }
+
cet.add(ConfigEntryType.LIBRARY_URL, library.toString());
super.setLibrary(library);
// Currently all DATA_PATH entries end in / to indicate dirs or not to indicate file prefixes
String datapath = getProperty(ConfigEntryType.DATA_PATH);
+
int lastSlash = datapath.lastIndexOf('/');
// There were modules that did not have a valid datapath.
More information about the jsword-svn
mailing list