[jsword-devel] Another patch

DM Smith dmsmith555 at yahoo.com
Sat Jun 26 05:51:16 MST 2004


Joe,
I have merged your changes and have prepared another patch.
This patch has a bunch of bug fixes and updates.

Whenever moving the mouse (mouse enter, mouse move, mouse leave) over a
checkbox, the checkbox listener was fired. The upshot is that
unnecessary work was being repeated.
ChangeListner listens for all changes concerning a checkbox not just
whether it is set or cleared. ItemListner does just that.
Changed code:
     DisplaySelectPane
     ExceptionPane

I improved ExceptionPane to show file name and line number even when 
there is source. Ultimately, the line should be highlighted.

In Desktop.java the hyperlink listener was on the list twice. I removed
one of them.

Hebrew text display now works correctly. To do this the following had to
be done:
   o Compute and store the orientation of the language in BookMetaData.
     (Note, this uses Sw*ng to compute it. So this may need changing.)
   o Each time a passage viewed, set the viewer's ComponentOrientation.
   o Pass the orientation to the XSLT.
This caused a bunch of code to change:
DesktopActions passes orientation to the XLST.
TextPaneBookDataDisplay passes orientation to the XSLT.
simple.xsl was changed:
   to accept an orientation
   to use it to change the layout of the table when there are notes
   I also improved this table's layout in general.
BookMetaData I added boolean isLeftToRight()
DefaultBookMetaData I had it return true and added a task to do it right
SwordBookMetaData computes the value of isLeftToRight.

Fixed bugs in Msg.properties where ever it occurred:
In a MsgFormat a single apostrophe ' is an indicator that everything
between it and the next, if there is one, is to be treated as a literal.
The symptom that led me to this was that the {0} and {1} for an
Exception pane were showing up. To have a single quote, you use two in a
row.

I also un-escaped double quotes. I think this was an artifact of moving
the strings from code to a resource bundle.

I also fixed a cut and paste error in a Msg.properties.

Based on the earlier thread for EventListenerList, I put it back to the
non-Sw*ng version in non-Sw*ng code.

Removed "RealFont" from ConfigurableSwingConverter as it was not used.

Changed ViewSourcePane to copy from the selected tab.

In PathField I changed the "do" methods to have the expected names:
   doAddEntry -> doAddPathEntry
   doUpdateEntry -> doUpdatePathEntry
   doRemoveEntry -> doRemovePathEntry

In StringUtil I removed methods that have direct equivalents in apache
commons and methods that are not used at all.

Fixed a bug in ExceptionPane and did some general improvements.

In MapTable I got rid of a couple of error messages by replacing them
with asserts.

In Project.java I moved a couple of unused/dead symbolic constants to
the new limbo/.../BookRoot.

There were too many places in the code that were doing the conversion of
the byte array to a String.
I changed the signature in Backend of
	byte[] getRawText(Key)
to
	String getRawText(Key key, String charset)
In support of this I added
String SwordUtil.decode(Key key, byte[] data, String charset)
and
String SwordUtil.clean(Key key, String data)
In both cases Key is being passed for reporting purposes only.





-------------- next part --------------
A non-text attachment was scrubbed...
Name: patchmore.zip
Type: application/x-zip-compressed
Size: 16986 bytes
Desc: not available
Url : http://www.crosswire.org/pipermail/jsword-devel/attachments/20040626/70d8aabc/patchmore-0001.bin


More information about the jsword-devel mailing list