LaurensWeyn / Spark-Reader

A tool to assist non-naitive speakers in reading Japanese
GNU General Public License v3.0
30 stars 7 forks source link

Re-synchronizing #18

Closed wareya closed 7 years ago

wareya commented 7 years ago

The last three commits caused ton of merge conflicts, which basically means I have to get you to merge as much of my master branch as possible, preferably all of it, if I don't want to scrap it. The changes have piled up.

Let me try to go through this again, but as a summary of what I changed where. This should make it easier to look through and decide whether it's ready to merge.

src/hooker/User32.java                        |   8 +-
src/hooker/WindowHook.java                    |  69 ++++++

Added window hooking. Only position tracking implemented right now.

src/language/deconjugator/ValidWord.java      |   8 +-
src/language/deconjugator/WordScannerNew.java |  20 +-

Minor deconjugator changes.

src/language/dictionary/Definition.java       |   3 +-

Guard against possible null dereference.

src/language/dictionary/Dictionary.java       |  26 ++-

Frequency list loading and track userdict filename. Check blacklist in find().

src/language/dictionary/EDICTDefinition.java  | 304 ++++++++++++++++++++++----

Load definitions as an association between spellings, readings, and tags, not as a pile of spellings, readings, and tags. Not used everywhere right now, only where I needed it at the time. Also a regex fix. Kind of messy because it's not used everywhere right now, it would be simpler if it were.

src/language/dictionary/FrequencySink.java    | 128 +++++++++++

Frequency list implementation. spelling-reading pair to frequency info.

src/language/dictionary/Japanese.java         |  18 ++

toKatakana

src/language/dictionary/UserDefinition.java   |  16 +-

Methods for editing support.

src/language/splitter/FoundDef.java           |  22 +-

Frequency stuff.

src/language/splitter/FoundWord.java          | 153 +++++++++++--

Initial variable width font support.

Support for other kinds of text backing. Rendering split into multiple steps/methods for this.

Constrain definition popup to the screen on the left edge, and an option to do so on the right edge.

src/language/splitter/WordSplitter.java       |   6 +-

Stop forcing segmentations on writing system change.

src/main/Main.java                            |  15 +-

Commented out the exception catching for debugging reasons. Catching exceptions probably be behind a production flag or something.

src/options/BlacklistDef.java                 | 139 ++++++++++++

Blacklist guts.

src/options/Options.java                      |  12 +
src/options/OptionsUI.java                    |  11 +-

Various new options, some hidden.

src/options/page/UserDefPage.java             |  43 +++-

Started implement user def adding and editing. Doesn't autosave when you add new entries right now. It should probably do that.

src/ui/Line.java                              |  78 +++++--

Variable width text support. Split into multiple steps/methods for alternate text backdrop support.

src/ui/UI.java                                |  57 ++++-

Alternate text backdrop support. Support for constraining the def dropdown inside the window on the right side.

src/ui/WindowHookUI.java                      |  46 ++++

Dialogue for window hooking.

src/ui/WordEditUI.java                        |  58 +++--

Started making it functional.

src/ui/input/MouseHandler.java                |  81 ++++---

Variable width text support.

src/ui/menubar/MenubarBuilder.java            |  23 +-

Menu entry for window hooking.

src/ui/popup/DefPopup.java                    |  48 +++-

Blacklist menu entry.

src/ui/popup/WordPopup.java                   |  40 +++-

Make new userdict definition menu entry.

26 files changed, 1239 insertions(+), 193 deletions(-)
LaurensWeyn commented 7 years ago

Apologies for the massive commits; Those were features I have been considering for quite a while and once I finally found time I decided to get them done and out of the way. Perhaps I should just merge all your changes and I'll have a look and take out/change whatever's needed a bit later today.

wareya commented 7 years ago

Here's a frequency list for testing that feature. Rename to .tsv

freqlist.txt