diff --git a/source/org/thdl/tib/scanner/DictionarySource.java b/source/org/thdl/tib/scanner/DictionarySource.java index 1f5c3b3..7961c10 100644 --- a/source/org/thdl/tib/scanner/DictionarySource.java +++ b/source/org/thdl/tib/scanner/DictionarySource.java @@ -20,7 +20,7 @@ package org.thdl.tib.scanner; import java.io.*; /** Specifies a subset of dictionaries among a set of - dictionaries. Supports a maximum of 15 dictionaries. + dictionaries. Supports a maximum of 30 dictionaries. @author Andrés Montano Pellegrini */ @@ -29,7 +29,7 @@ public class DictionarySource private int dicts; /** Last bit of word; 1 if there are more brothers.*/ - private static final int lastBit=32768; + private static final int lastBit=1073741824; private static final int allDicts=lastBit-1; public DictionarySource() @@ -80,13 +80,13 @@ public class DictionarySource int numDict; if (hasNext) numDict = lastBit | dicts; else numDict = dicts; - raf.writeShort(numDict); + raf.writeInt(numDict); } public static DictionarySource read(DataInput raf) throws IOException { DictionarySource ds = new DictionarySource(); - ds.setDicts(raf.readShort()); + ds.setDicts(raf.readInt()); return ds; } diff --git a/source/org/thdl/tib/scanner/WindowScannerFilter.java b/source/org/thdl/tib/scanner/WindowScannerFilter.java index 4c32d56..37f1a96 100644 --- a/source/org/thdl/tib/scanner/WindowScannerFilter.java +++ b/source/org/thdl/tib/scanner/WindowScannerFilter.java @@ -137,6 +137,17 @@ public class WindowScannerFilter implements WindowListener, FocusListener, Actio // frame.setSize(240,320); //else frame.setSize(500,600); frame.show(); + + if (usingSwing) + { + //JOptionPane.showMessageDialog(frame, TibetanScanner.aboutUnicode, "About", JOptionPane.PLAIN_MESSAGE); + diagAbout = new AboutDialog(frame, true); + } + else if (diagAbout==null) + { + diagAbout = new AboutDialog(frame, false); + } + diagAbout.show(); } public static void main(String[] args) @@ -287,11 +298,12 @@ public class WindowScannerFilter implements WindowListener, FocusListener, Actio { if (usingSwing) { - JOptionPane.showMessageDialog(frame, TibetanScanner.aboutUnicode, "About", JOptionPane.PLAIN_MESSAGE); + //JOptionPane.showMessageDialog(frame, TibetanScanner.aboutUnicode, "About", JOptionPane.PLAIN_MESSAGE); + diagAbout = new AboutDialog(frame, true); } else if (diagAbout==null) { - diagAbout = new AboutDialog(frame); + diagAbout = new AboutDialog(frame, false); } diagAbout.show(); }