Commit Graph

48 Commits (338fcd76ae7820313a44ecca50465bcfb65cab64)

Author SHA1 Message Date
Frans de Jonge 338fcd76ae Lang: two tiny strings
* ReaderHighlight: underscore to underline. Although underscore means to
emphasize by underlining, the emphasis lies on the, ahem, emphasis. Besides
which, it's mostly AmE and less well understood worldwide (although in this
particular context it should probably cause no trouble).

* Statistics plugin: menu item text to "reading statistics" to make it clear
which statistics we're talking about. Fixes #2744.
7 years ago
Frans de Jonge a970a1f034 MenuSorter: fix outside testability (for potential unit tests) 7 years ago
Frans de Jonge b7b5950e98 MenuSorter: review comments and various bug fixes
* fixed wrongful retention of submenus variable and added return to MenuSorter:findById
* fixed readerfooter_spec.lua error
* fixed review comments
7 years ago
Frans de Jonge 5b20106db7 MenuSorter: initial implementation
* Menus are now sanely configurable
* Custom separator placement for clearer menus
7 years ago
Qingping Hou 9b7aba3fba fix: override readerhighlight hold in readerfooter
Also fix touch zone dependency graph generation code.

ReaderHighlight has now been migrated to use touch zone

Inputcontainer's touch event handling logic changed to only stop
propagation when handler returns `true`. Previously, it stops
propagation when a handler is found. This is needed to support
both readerhighlight_tap and tap_forward touch zones.
7 years ago
poire-z 2ded2bce5e Wikipedia: save full page as epub (html, with optional images)
Also for the current text-only wikipedia full page: replace
the ==s in section titles with some unicode symbols for a better
visual feeling of hierarchy. These same symbols are also used
in the .epub.
Both can be disabled by adding ["wikipedia_prettify"] = false
to settings.reader.lua

readerhighlight: close ButtonTable (like other buttons do) when looking
up wikipedia, otherwise if we save as epub, and swtich to new document,
this ButtonTable will never be closed and stays in UI.
7 years ago
poire-z ee06171c83 New ImageViewer widget + hold on image show it fullscreen
Simple image viewer with Best Fit/Original size and Rotate
(for landscape images) buttons.
readerhighlight: check if hold is on an image to show it
fullscrren
7 years ago
Qingping Hou f95ad00b9e feat: add logger module & rewrite kobo suspend script in lua 7 years ago
poire-z 1708fd5e1c Dictionary and wikipedia enhancements (#2393)
Stardict:
- remove duplicate results
- better cleaning of selection
- append results from a 2nd query of a 2nd set of dictionaries
  in data/dict_ext/

Wikipedia:
- use the search API for better results
- allow viewing the full page content of a result in a bigger window
- allow queries for multiple languages
- available languages can be set in settings.reader.lua :
    ["wikipedia_languages"] = {"en", "fr", "it"}
- "Wikipedia lookup" added to Tools menu

For both:
- allow selection of multiple words for a new lookup (so one can
  actually browse wikipedia)
- allow continuous reading with Tap
- display "current result / total number of results"

Details in #2393
8 years ago
ycrichard c3aa5fa0d9 allow disable highlight by default
minor code change

typo
8 years ago
chrox 4c491b5ee2 rename 'Highlight' to 'Highlight options' in menu
This should fix #2023.
8 years ago
Qingping Hou c22a3747d8 fix all the tests 8 years ago
Qingping Hou 467199285f minor: rename Koreader to KOReader 8 years ago
Qingping Hou 26f5c8861b chore: minor style cleanup 8 years ago
Alexander Pletnev c45328f14e Add Statistic plugin (#1581 Amount of hours spent on a book)
Changes based on comments
9 years ago
Alexander Pletnev 52d821df00 Add Statistic plugin (#1581 Amount of hours spent on a book) 9 years ago
chrox ec1d9e4b7d partial refresh after deleting highlights
This should fix #1558.
9 years ago
chrox 612ee99707 dictionary lookup now supports phrase
This should fix #1537.
9 years ago
chrox 90a5e09bdc disable highlight in dict window if it's highlighted already
This should fix #1418.
9 years ago
chrox 2ad21dcaa2 only strip punctuations when highlight to search
This should fix #1419.
9 years ago
chrox ca6b3d7e33 fix #1373 by checking the pos0 and pos1 of selected text 9 years ago
chrox 846836dceb fix #1275
Full refresh when highlighting text is quite annoying, I fixed it by
using 'ui' refresh type.
And this patch also fixed a bug that after cleaning temporary highlights
the screen is not refreshed.
10 years ago
chrox 6c9b7facbe fix crash when removing highlighted bookmarks in PDF 10 years ago
Hans-Werner Hilse 94ce08937a clean up refreshes
This is a larger clean-up of the refresh situation.
The general shift is that refreshes are now mainly triggered by
the (top-level) widgets when they get shown or closed via UIManager.

All refreshes for the widgets when they are in use were handled by
themselves before. This adds the case of showing/closing.

It is the desired result of not having UIManager:show()/:close()
do (full screen) refreshes on its own.
10 years ago
Hans-Werner Hilse e7f7417cd3 refresh only dialog part of the screen for multi-word selection window 10 years ago
Hans-Werner Hilse 82c26b1f18 adapt widgets to new refresh/repaint API 10 years ago
chrox fe885be563 refactoring readerbookmark to show both bookmarks and highlights
in the bookmark menu
and use binary search of the sorted bookmarks table whenever is
possible.
10 years ago
chrox 566586619a add unit tests for readerdictionary and readerhighlight 10 years ago
NiLuJe eef26a0e94 Ask for a full refresh when clearing HL
Helps avoiding ghosting, especially on REAGL devices.

re #1119
10 years ago
NiLuJe 656a2c7cb6 Actually do what the comment says.
Don't hijack forced partial updates (i.e., from UI elements) on always
FULL REAGL devices. It doesn't implode if we don't, and it makes for a
snappier UI.
10 years ago
chrox d5f6d743bd add option to disable highlighting as well as dictionary lookup
This should also fix #973.
10 years ago
chrox bd0975896d add fulltext search for EPUB documents 10 years ago
Hans-Werner Hilse 3066c86e38 Refactoring hardware abstraction
This is a major overhaul of the hardware abstraction layer.
A few notes:

General platform distinction happens in
  frontend/device.lua
which will delegate everything else to
  frontend/device/<platform_name>/device.lua
which should extend
  frontend/device/generic/device.lua

Screen handling is implemented in
  frontend/device/screen.lua
which includes the *functionality* to support device specifics.
Actually setting up the device specific functionality, however,
is done in the device specific setup code in the relevant
device.lua file.

The same goes for input handling.
10 years ago
chrox e34ad5ffe5 refactoring module registration in readerui
now every module can be looked up in readerui so that
unit test of these modules is possible.
10 years ago
chrox 26e8dc7065 fix faked Tap event causes koreader crash
Since there is a new clear method to clear highlight selection
the faked event is not needed when closing highlight

This should fix #847.
10 years ago
chrox a275a8cc89 strip punctuations in word before wikipedia lookup 10 years ago
chrox 7b10d66e1b enable Wikipedia support
Since wikipedia server is language specific we should first detect
language of the text by querying Google Translate. Make sure you have
access to both Google Translate and Wikipedia service to use this
function.
10 years ago
chrox d34a7fb355 lookup input word when holding on word in dict lookup window 10 years ago
chrox a9b16613cf enable highlight in dictionary lookup window
This should fix #774.
10 years ago
chrox 5214cc0f4c tap to clear selected text too
This should fix #589.
10 years ago
chrox 27b15b7020 restrict highlight in current page area
This should fix #588.

Highlight in multiple pages is too complicated and requires large
code refactoring and will not be considered for now.
10 years ago
chrox e624695d54 the Back key on Android should close the popup window and menu 10 years ago
chrox 0ea5ce1afd use checked/unchecked for hightlight drawer style 10 years ago
chrox 857bd6fcc8 strings not shown on GUI will not be translated
This may encourage users in transifex to join Koreader project.
10 years ago
chrox 3726e096f9 indicate current highlight mode in submenu 10 years ago
chrox 31aebe1caf disable exporting hightlights to My Clippings 10 years ago
chrox 1cd7ee9501 remove newline when exporting highlight to My Clipping 10 years ago
Qingping Hou 4b357c1466 move reader code into frontend/apps/reader
it makes more sense to completely separate the UI framework and
application code

also move frontend/ui/configurable.lua to frontend/configurable.lua
10 years ago