[jsword-svn]
bibledesktop/java/main/org/crosswire/bibledesktop/desktop s
jswordcvs at crosswire.org
jswordcvs at crosswire.org
Wed Oct 6 15:52:31 MST 2004
Update of /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/desktop
In directory www.crosswire.org:/tmp/cvs-serv26997/java/main/org/crosswire/bibledesktop/desktop
Modified Files:
Desktop.java
Log Message:
[BD-2] and linked issues
Index: Desktop.java
===================================================================
RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/desktop/Desktop.java,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** Desktop.java 18 Sep 2004 12:40:45 -0000 1.30
--- Desktop.java 6 Oct 2004 22:52:29 -0000 1.31
***************
*** 184,187 ****
--- 184,191 ----
init();
+ // This is technically overkill, but it does hide the reference pane if
+ // there are no reference works
+ refreshBooks();
+
// Configuration
startJob.setProgress(Msg.STARTUP_GENERAL_CONFIG.toString());
***************
*** 670,673 ****
--- 674,700 ----
String[] dnames = getFullNameArray(BookFilters.getDictionaries());
ChoiceFactory.getDataMap().put(DICTIONARY_KEY, dnames);
+
+ // Has the number of reference books changed?
+ int newRefBooks = dnames.length + cnames.length;
+ if (newRefBooks != refBooks)
+ {
+ // This method is called during setup
+ if (reference != null)
+ {
+ if (newRefBooks == 0)
+ {
+ sptBooks.setDividerLocation(8000);
+ }
+ else
+ {
+ int norm = (int) (sptBooks.getMaximumDividerLocation() * 0.8);
+ sptBooks.setDividerLocation(norm);
+ }
+ //reference.setVisible(newRefBooks != 0);
+ //sptBooks.setDividerLocation(0.8D);
+ }
+
+ refBooks = newRefBooks;
+ }
}
***************
*** 697,700 ****
--- 724,729 ----
}
+ private int refBooks = 0;
+
// Strings for the names of property files.
private static final String SPLASH_PROPS = "splash"; //$NON-NLS-1$
More information about the jsword-svn
mailing list