[jsword-svn] r1108 - trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install

dmsmith at crosswire.org dmsmith at crosswire.org
Mon Jul 24 14:15:44 MST 2006


Author: dmsmith
Date: 2006-07-24 14:15:38 -0700 (Mon, 24 Jul 2006)
New Revision: 1108

Modified:
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/BookTreeCellRenderer.java
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/EditSitePane.java
Log:
bug fix in saving update sites

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/BookTreeCellRenderer.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/BookTreeCellRenderer.java	2006-07-24 20:45:45 UTC (rev 1107)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/BookTreeCellRenderer.java	2006-07-24 21:15:38 UTC (rev 1108)
@@ -46,22 +46,26 @@
         String tooltip = null;
         if (leaf && value instanceof BookNode)
         {
-            Book book = (Book) ((BookNode) value).getUserObject();
-            setLeafIcon(BookIcon.getIcon(book));
-
-            if (book.isQuestionable())
+            Object obj = ((BookNode) value).getUserObject();
+            if (obj instanceof Book)
             {
-                tooltip = Msg.BOOK_QUESTIONABLE.toString();
+                Book book = (Book) obj;
+                setLeafIcon(BookIcon.getIcon(book));
+    
+                if (book.isQuestionable())
+                {
+                    tooltip = Msg.BOOK_QUESTIONABLE.toString();
+                }
+    
+                if (!book.isSupported())
+                {
+                    tooltip = Msg.BOOK_UNSUPPORTED.toString();
+                }
+                else if (book.isLocked())
+                {
+                    tooltip = Msg.BOOK_LOCKED.toString();
+                }
             }
-
-            if (!book.isSupported())
-            {
-                tooltip = Msg.BOOK_UNSUPPORTED.toString();
-            }
-            else if (book.isLocked())
-            {
-                tooltip = Msg.BOOK_LOCKED.toString();
-            }
         }
 
         setToolTipText(tooltip);

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/EditSitePane.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/EditSitePane.java	2006-07-24 20:45:45 UTC (rev 1107)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/EditSitePane.java	2006-07-24 21:15:38 UTC (rev 1108)
@@ -407,9 +407,9 @@
     public void doSave()
     {
         String name = txtName.getText();
+        siteEditor.save();
         Installer installer = siteEditor.getInstaller();
         imanager.addInstaller(name, installer);
-        siteEditor.save();
 
         clear();
         editName = null;



More information about the jsword-svn mailing list