[jsword-svn] bibledesktop/java/main/org/crosswire/bibledesktop/desktop s

jswordcvs at crosswire.org jswordcvs at crosswire.org
Sat Jun 25 14:41:39 MST 2005


Update of /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/desktop
In directory www.crosswire.org:/tmp/cvs-serv28191/java/main/org/crosswire/bibledesktop/desktop

Modified Files:
	Desktop.java 
Log Message:
Added two preferences (both defaulting to true):
1) Open links in current BibleView
2) Use current Bible for new BibleViews.

Index: Desktop.java
===================================================================
RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/desktop/Desktop.java,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -d -r1.48 -r1.49
*** Desktop.java	22 Jun 2005 03:50:49 -0000	1.48
--- Desktop.java	25 Jun 2005 21:41:37 -0000	1.49
***************
*** 589,592 ****
--- 589,603 ----
                  }
  
+                 // If we didn't find a view and BibleViews are reused,
+                 // then pretend that the selected view is clear.
+                 if (isBibleViewReused())
+                 {
+                     BibleViewPane view = (BibleViewPane) views.getSelected();
+                     if (view != null)
+                     {
+                         clearView = view;
+                     }
+                 }
+ 
                  // Do we have an empty view we can use?
                  if (clearView != null)
***************
*** 596,599 ****
--- 607,611 ----
                      {
                          Key key = book.getKey(data);
+                         clearView.setKey(book.createEmptyKeyList()); // force it to be a clear view, if it is not really.
                          clearView.setKey(key);
                          views.select(clearView);
***************
*** 793,796 ****
--- 805,824 ----
  
      /**
+      * @param reuse Whether reuse the current BibleView.
+      */
+     public static void setBibleViewReused(boolean reuse)
+     {
+         reuseBibleView = reuse;
+     }
+ 
+     /**
+      * @return Whether links use the current BibleView.
+      */
+     public static boolean isBibleViewReused()
+     {
+         return reuseBibleView;
+     }
+ 
+     /**
       * @param maxHeight The maxHeight to set.
       */
***************
*** 934,937 ****
--- 962,970 ----
  
      /**
+      * Whether to current BibleView should be used for links
+      */
+     private static boolean reuseBibleView = true;
+ 
+     /**
       * The default dimension for this frame
       */



More information about the jsword-svn mailing list