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

jswordcvs at crosswire.org jswordcvs at crosswire.org
Sat Jun 11 13:41:17 MST 2005


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

Modified Files:
	ViewSourcePane.java Desktop.java 
Log Message:
Made showing the sidebar a default and set it to no.
Cleaned up the code to consistently use "book" to refer to "module"

Index: Desktop.java
===================================================================
RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/desktop/Desktop.java,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -d -r1.46 -r1.47
*** Desktop.java	11 Jun 2005 14:26:34 -0000	1.46
--- Desktop.java	11 Jun 2005 20:41:15 -0000	1.47
***************
*** 330,336 ****
          toggle.setSelected(true);
          menuView.add(toggle).addMouseListener(barStatus);
!         toggle = new JCheckBoxMenuItem(actions.getAction(DesktopActions.SIDEBAR_TOGGLE));
!         toggle.setSelected(true);
!         menuView.add(toggle).addMouseListener(barStatus);
          menuView.addSeparator();
          menuView.add(actions.getAction(DesktopActions.VIEW_SOURCE)).addMouseListener(barStatus);
--- 330,336 ----
          toggle.setSelected(true);
          menuView.add(toggle).addMouseListener(barStatus);
!         sidebarToggle = new JCheckBoxMenuItem(actions.getAction(DesktopActions.SIDEBAR_TOGGLE));
!         sidebarToggle.setSelected(isSidebarShowing());
!         menuView.add(sidebarToggle).addMouseListener(barStatus);
          menuView.addSeparator();
          menuView.add(actions.getAction(DesktopActions.VIEW_SOURCE)).addMouseListener(barStatus);
***************
*** 418,422 ****
          setTitle(Msg.getApplicationTitle());
      }
!     
      /**
       * Get the size of the content panel and make that the preferred size.
--- 418,422 ----
          setTitle(Msg.getApplicationTitle());
      }
! 
      /**
       * Get the size of the content panel and make that the preferred size.
***************
*** 426,430 ****
          JComponent contentPane = (JComponent) getContentPane();
          contentPane.setPreferredSize(contentPane.getSize());
!         
          log.warn("The size of the contentpane is: " + contentPane.getSize()); //$NON-NLS-1$
      }
--- 426,430 ----
          JComponent contentPane = (JComponent) getContentPane();
          contentPane.setPreferredSize(contentPane.getSize());
! 
          log.warn("The size of the contentpane is: " + contentPane.getSize()); //$NON-NLS-1$
      }
***************
*** 440,444 ****
      public Component createView()
      {
!         BibleViewPane view = new BibleViewPane();
          BookDataDisplay display = view.getPassagePane().getBookDataDisplay();
          display.addURLEventListener(this);
--- 440,445 ----
      public Component createView()
      {
!         boolean show = sidebarToggle == null ? isSidebarShowing() : sidebarToggle.isSelected();
!         BibleViewPane view = new BibleViewPane(show);
          BookDataDisplay display = view.getPassagePane().getBookDataDisplay();
          display.addURLEventListener(this);
***************
*** 718,721 ****
--- 719,738 ----
  
      /**
+      * @param show Whether to show the KeySidebar at start up.
+      */
+     public static void setSidebarShowing(boolean show)
+     {
+         sidebarShowing = show;
+     }
+ 
+     /**
+      * @return Whether to show the KeySidebar at start up.
+      */
+     public static boolean isSidebarShowing()
+     {
+         return sidebarShowing;
+     }
+ 
+     /**
       * @param maxHeight The maxHeight to set.
       */
***************
*** 854,857 ****
--- 871,879 ----
  
      /**
+      * Whether to show the Key Sidebar at startup
+      */
+     private static boolean sidebarShowing;
+ 
+     /**
       * The default dimension for this frame
       */
***************
*** 873,876 ****
--- 895,899 ----
      private JPanel corePanel;
      private ToolBar pnlTbar;
+     private JCheckBoxMenuItem sidebarToggle;
      private StatusBar barStatus;
      private DictionaryPane reference;

Index: ViewSourcePane.java
===================================================================
RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/desktop/ViewSourcePane.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** ViewSourcePane.java	17 May 2005 00:44:31 -0000	1.18
--- ViewSourcePane.java	11 Jun 2005 20:41:15 -0000	1.19
***************
*** 50,56 ****
  import org.crosswire.common.xml.TransformingSAXEventProvider;
  import org.crosswire.jsword.book.Book;
  import org.crosswire.jsword.book.BookData;
  import org.crosswire.jsword.book.BookMetaData;
- import org.crosswire.jsword.book.BookType;
  import org.crosswire.jsword.passage.Key;
  import org.crosswire.jsword.util.ConverterFactory;
--- 50,56 ----
  import org.crosswire.common.xml.TransformingSAXEventProvider;
  import org.crosswire.jsword.book.Book;
+ import org.crosswire.jsword.book.BookCategory;
  import org.crosswire.jsword.book.BookData;
  import org.crosswire.jsword.book.BookMetaData;
  import org.crosswire.jsword.passage.Key;
  import org.crosswire.jsword.util.ConverterFactory;
***************
*** 87,91 ****
  
              TransformingSAXEventProvider htmlsep = (TransformingSAXEventProvider) converter.convert(osissep);
!             if (bmd.getType() == BookType.BIBLE)
              {
                  htmlsep.setParameter(XSLTProperty.STRONGS_NUMBERS.getName(), Boolean.toString(XSLTProperty.STRONGS_NUMBERS.getState()));
--- 87,91 ----
  
              TransformingSAXEventProvider htmlsep = (TransformingSAXEventProvider) converter.convert(osissep);
!             if (bmd.getType() == BookCategory.BIBLE)
              {
                  htmlsep.setParameter(XSLTProperty.STRONGS_NUMBERS.getName(), Boolean.toString(XSLTProperty.STRONGS_NUMBERS.getState()));



More information about the jsword-svn mailing list