Commit Graph

784 Commits (7210fb478d8d0c6aa5bb8e0ae3e0fc67dd730874)

Author SHA1 Message Date
Frans de Jonge e1aa57f27e Font: unify font styling 7 years ago
Frans de Jonge 19928f2b1b KeyValuePage: smaller font and padding 7 years ago
Frans de Jonge 4616339ef8 KeyValuePage: improve looks
Fixes #2578.

* key bolded
* values normally left-aligned at 50%
* allows misalignment for the sake of fitting everything on one line
7 years ago
Frans de Jonge bb70ae9eaf Dev docs: some widgets 7 years ago
Qingping Hou 76e427cbb4 kodev: add device simulation option for run command (#2802) 7 years ago
Frans de Jonge 89099e2c94 Swipe for menu and quickstart guide (#2761)
* Swipe for menu and quickstart guide

Because swiping for the menu is a big change from what we're used to, this commit includes a new quickstart guide.

Fixes #2608.

* add some dev docs
* add FileConverter spec
* add QuickStart spec
* add Version module
* add Version spec
7 years ago
Qingping Hou 1922b2526b fix: normalize require path to reuse import result 7 years ago
Frans de Jonge 485295657c Docs: fix typo in listview.lua example 7 years ago
Qingping Hou 15fd7fc0ff bring back support for disabling progressbar in footer (#2753)
* footer(optimize): remove dead code

* footer(fix): disable auto refresh time option when current time is not checked

* fix: support disable progress bar again
7 years ago
Frans de Jonge e8721887ba InputContainer: add cancel_text and ok_text
Makes it easier to comply with UX style.

* Change "OK" to "Search dictionary" in Dictionary lookup to comply with UX style
* Change "OK" to "Search all text" in Fulltext search to comply with UX style

Tacked on but highly related:

* change "OK" to "Search Wikipedia" in Wikipedia lookup to comply with UX style
* change "OK" to "Set default" in ConfigDialog to comply with UX style

Chore:

* fixed up order of requires
7 years ago
Frans de Jonge e9df73f6dc Developer documentation improvements
* Fixed up all of util and added when absent
* Updated widget examples to new coding style
7 years ago
Frans de Jonge 1c25d0fd1b Language: improve confirmboxes
Generic "OK" buttons should be avoided. Thanks to @lightonflux for pointing this out https://github.com/koreader/koreader/issues/2555#issuecomment-291039945
7 years ago
Robert a3c4254809 Added util.fixUtf8 (#2704)
* Remove invalid UTF-8 chars from OPDS
* add unit tests
7 years ago
Hzj_jie 339e16636b Terminal plugin (#2646) 7 years ago
Cosmin Gorgovan 6aeecdba08 Only show the last character of a password after typing it 7 years ago
Frans de Jonge cee3603436 TouchMenu: keep hamburger menu on the right 7 years ago
Hzj_jie ed461c7f30 InputDialog is broken by #2672 (#2690)
This change also adds a tap_input_func in both TouchMenu and Button.
7 years ago
Hzj_jie 0318a048b4 Read timer plugin (#2672)
A countdown timer to notify user.
7 years ago
Cosmin Gorgovan 3e656d71e0 WiFi manager bugfix: delete the cached psk when changing the password
Previously, the cached psk, which is derived from the password and
passed to wpa_supplicant, was not updated when changing the password.
7 years ago
Frans de Jonge 1e351e6b87 Menu: remove "Show advanced options"
See #2610 for discussion.
7 years ago
Frans de Jonge 99349173be TouchMenu [widget]: remove check for missing menu item 7 years ago
Frans de Jonge 8f31a81601 MenuSorter: some documentation
MenuSorter: forgot to add plugin style change

MenuSorter: worked out the final quirks

* Menu always compressed into tables without missing indexes for ipairs compatibility
* Orphans attached
* Separators no longer count as items
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 fc12ee6537 decouple reader footer from dictquicklookup widget & translation fix (#2664)
* chore: fix strings for translations

* dictionary(chore): decouple reader footer from dictquicklookup widget
7 years ago
Hzj_jie 8f4ec13841 Remove powerd:refreshCapacity() (#2671) 7 years ago
poire-z 39d1afe37d Update footer when refreshing screen with diagonal swipe
And added diagonal swipe support to readerrolling.
7 years ago
Qingping Hou ee0e337433 opds(fix): avoid infinite loop on paging 7 years ago
Robert 4f40250b88 Prompt users to turn on Wifi in Cloud Storage and OPDS Browser (#2650)
* prompt users to turn on Wifi in Cloud Storage and OPDS Browser
7 years ago
Robert dccbf4cf96 Fix crash when downloading books with unknown characters in title (#2628) 7 years ago
Frans de Jonge ce8f568486 Revert "TouchMenu: keep file/exit button on the right" 7 years ago
Adrian Sampaleanu fc5e8f1242 OPDS catalog: improve download dialog (#2445)
* Add action clarification to format download dialog

The format download dialog now has a title reflecting where a format will be downloaded with a prefix making it clear that choosing a format will download it.
7 years ago
Bastien Dejean f72514f99d Use a simple gray line to separate menu items 7 years ago
Frans de Jonge a9b969b58f TouchMenu: keep file/exit button on the right
References #2555.
7 years ago
Frans de Jonge d1785e1863 Reorganize menus
* Replace "home" (exit) menu with hamburger
* Discard pokeball and put items in hamburger
* Introduce search menu in reader

Cf. #2562
7 years ago
Qingping Hou 4fce69d18d bookstatus(minor): read setting only once 7 years ago
robert00s 8b95b8fd96 Fix #2176 - Wrong book's review and rating stars are shown 7 years ago
Frans de Jonge 1ed0ce0c21 FileManager: fix up arrow issue 7 years ago
Frans de Jonge 6458c8e9eb File Manager: rename to "KOReader File Browser" and add up arrow to ".."
This should make it clearer to new users what's going on. Fixes #2529.
7 years ago
Bastien Dejean ee54e127b1 FileManager: replace arrows by ellipsis to indicate cut-off long filenames 7 years ago
Bastien Dejean f0b63003e9 Use a smaller font to display the filename
More information regarding the file!
7 years ago
Hzj_jie 726b15ad01 More sorting orders in file manager (#2535) 7 years ago
Zijie He b502047635 Removing metadata file instead of purging .sdr folder 7 years ago
Frans de Jonge bec5f46245 Merge pull request #2524 from Hzj-jie/master2
Add characters in menu items to indicate sub menus
7 years ago
Hzj_jie 18117584c0 Resolve review comments 7 years ago
poire-z 56d1a26a8b ImageViewer: allow zoom with vertical swipe on sides
For devices without multi touch support, where pinch & spreak don't work.
7 years ago
Frans de Jonge 6257bae77f Language: mostly Wikipedia-related changes 7 years ago
Hzj_jie c33d1aa43b Use 25b9 instead of > 7 years ago
Hzj_jie fa848719ae > 7 years ago
Hzj_jie 98a86ba62f prepose plus signal 7 years ago
Hzj_jie c90a484d01 Add a + for menu items with sub menu 7 years ago
Hzj_jie f91ad679d9 swithItemTable -> switchItemTable 7 years ago
poire-z 7166efd777 ImageViewer: added zoom & pan via gestures
ImageWidget: removed 'autostretch' setting (replaced by scale_factor=0)
and renamed 'autoscale' setting to 'scale_for_dpi'.
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
robert00s 0bbb4bbc16 Fix: missing letters from portuguese language 7 years ago
Frans de Jonge 399190c520 Merge pull request #2508 from NickSavage/master
OPDS: Fixed Wifi prompt and enabled removing default catalogs.
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
Nick Savage 85585a0973 Fixed bug where only calibre OPDS catalogs would prompt to enable Wifi.
Tested on Kindle PW3. The error message my device threw was different from what was coded in OPDSBrowser.lua in getCatalog(). Perhaps we should test other devices and see if there are other error messages thrown as well.
7 years ago
Nick Savage ebb290f0ba OPDSCatalog: Normalize default and user-added catalogs
This patch makes the OPDS Browser treat the default catalogs (Project Gutenberg, Feedbooks, etc.) the same as a user-added catalog. This makes them removable and editable if the user so chooses.
7 years ago
Frans de Jonge 81bc115cee ImageViewer: "best fit" to "scale" 7 years ago
poire-z 97d34c5bb0 Better handling of tap on invalid/external links
Tap on external urls or invalid links would jump to
document's 1st page. We check first the validity of the
link, and deal with wikipedia links or just show the external
url.
ConfirmBox: allow dismissing/cancelling by taping outside,
to keep UX consistent.
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
poire-z 0577fde59e Better tracking, management and freeing of BlitBuffers
This should fix the most obvious memory leaks (noticable when
using images as screensaver).
ImageWidget: added a few more options needed by ImageViewer,
and removed 'overflow' option as logic was wrong.
7 years ago
poire-z 130f7b0773 wikipedia: fix languages rotation and query
Fix innacurate language query and rotation when back from nested lookups.
More informative lookup message (langage used, search or full page)
Allow for screen refresh with diagonal swipe (like in readerpaging).
7 years ago
poire-z ebe0c08bfb dict/wiki: definitions' text justification
This can be disabled by adding ["dict_justify"] = false to settings.reader.lua
7 years ago
robert00s 7ff1731aab Fix #2326 7 years ago
Robert 7bfbc9f06a Sanitize filename for vfat, fix #2433 (#2464) 7 years ago
Qingping Hou f95ad00b9e feat: add logger module & rewrite kobo suspend script in lua 8 years ago
Hzj_jie 5bda44473d Add dictionary to filemanager 8 years ago
Qingping Hou 581039aed5 opds(fix): unescape name and value 8 years ago
Qingping Hou cb195e9ce8 feat: support disable show file name in bold
also rename show_opened_doc_in_bold setting to show_file_in_bold
8 years ago
Qingping Hou 0f931517ba doc: fix document build 8 years ago
Qingping Hou dc2746f1d7 chore: various minor cleanups 8 years ago
Qingping Hou 36763a1ad7 feat: new setting to show opened book name in bold 8 years ago
Qingping Hou 33367d3a6c inputcontainer(fix): update gesture range on screen resize properly 8 years ago
poire-z 5b2aee3c81 textboxwidget: added some sanity checks
fix #2434 and avoid strange things when holding from/to outside dimension.
Also fix crash when tap (move cursor) in an inputtext with no text at all.
8 years ago
poire-z a8dd8c6f30 textboxwidget: even better text wrapping
util.isSplitable() accepts now also the previous char to help
decide if a space can be used to split a line.
TextBoxWidget:_splitCharWidthList() : simplified logic
8 years ago
retrue eae730d140 Some uppercase fixes (#2421) 8 years ago
Frans de Jonge ba7377065e Doc: miscellaneous improvements. 8 years ago
Frans de Jonge 7f318c0762 Merge pull request #2416 from koreader/houqp-master
doc: event propagation for widgets
8 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
poire-z 5040bfe4c5 textboxwidget and scrolltextwidget enhancements (#2393)
util: made isSplitable() accept an optional next_char
for wiser decision

textboxwidget: speed up rendering, enhanced text wrapping,
allow selection of multiple words with Hold.

scrolltextwidget: allow scrolling with Tap.

Details in #2393
8 years ago
Qingping Hou 09564d4b4d doc: event propagation for widgets 8 years ago
Qingping Hou 11f55d2aff doc: Event and WidgetContainer 8 years ago
Qingping Hou 329fd55302 filemanager: show new books in bold 8 years ago
Qingping Hou 0c49b915de refactor: add touch zone subsystem to inputcontainer
Touch zone decouples screen size from gesture event registration.

The win here is each individual widget does not need to update
gesture range on screen rotate/resize anymore.

Another advantage is we now have a centralized ordered array to handle
all registered touch event listeners, makes it much easier to resolve
gesture range conflicts between multiple widgets.

This patch also includes the following changes:

* migrate readerpaging to use readerui's touch zone
* migrate readerfooter to use readerui's touch zone
* move inverse read direction setting to touch menu's setting tab
* moved kobolight widget from readerview into readerui
* various dead code cleanups and comments
8 years ago
Robert 93e075feb6 Adding the buttondialogtitle widget and show long filename in filemanager (#2414) 8 years ago
robert00s e0ad600bc7 Fix: prevent step_min lower than fl_min 8 years ago
poire-z 0aa19d72a0 FileManager: show files with sidecar dir in bold (#2391)
docsettings : added hasSidecarDir() and made getSidecarDir() more robust
widget/menu : allow items to specify themselves to be displayed in bold
8 years ago
poire-z e1c3448d0e ImageWidget optimisations (#2394)
Avoid multiple renderings.
Don't cache big images (ie: screensaver images)
8 years ago
poire-z 0145ab0410 Fix: crash if wpa_supplicant has already connected (#2394) 8 years ago
Robert fdbab3e11d frontlightwidget(fix): prog_button does not honor powerd.fl_min (#2396) 8 years ago
Robert 64a79f6892 Frontlight progress bar (#2385) 8 years ago
poire-z 4ec7efb2d0 Fix selection in dictionary window (#2126)
Fix #2126 (hold on a word on the 2nd page of a definition was triggering
lookup of the word at the same place in 1st page).
8 years ago
Robert 171d40d287 feat: Would you like to read the downloaded book for OPDS (#2370) 8 years ago
robert00s 2cfce6f369 OPDS - fix opds catalog for Wolne Lektury 8 years ago
Qingping Hou b7cdf103e3 chore: fix luacheck error & add comment to release-ip.sh 8 years ago
Qingping Hou 17b453cd02 doc: add more doc for imagewidget 8 years ago
Qingping Hou b2e1d9dc42 dictquicklookup(chore): simplify logic that disables wikipedia button 8 years ago
robert00s 2238fdc882 Fix #2328 8 years ago
robert00s 09f2db3729 Fix long filename text in history textbox (#2322)
Fix long filename text in history textbox
8 years ago
Qingping Hou efae2ed16f network(fix): automaticallly obtain IP if network is already authenticated 8 years ago
robert00s 8a9811804d Add Polish keyboard (#2319)
Add Polish keyboard


* Optimization
8 years ago
Qingping Hou c998120a78 progressbar(performance): reuse calcauted value for ticks loop 8 years ago
Qingping Hou ca21ab4be5 fix(defaults): type casting for user input 8 years ago
chrox 9ab005a1d3 fix unit test of readerlink and readerpaging
and have more confidence with the unit testing framework.

Now `make testfront` won't retry on failure and testing files are
ordered in each run so that it's possible to reproduce testing failure.

And this patch also fix flush settings not working before suspend issue:
at some point the `FlushSettings` event is sent to `UIManager` instead
of `ReaderUI`, but `UIManager` only delegated events to active widgets
and `ReaderUI` is actually not an active widgets thus will miss the event.

This patch also add a verbose debug mode with "-v" as a switch to turn
on this mode. With verbose mode on, event handling will be logged.
8 years ago
Qingping Hou 29578d74eb touchmenu(fix): reset page num before switching to sub menu 8 years ago
Qingping Hou 086dbdb657 scrolltextwidget(fix): add moveCursor method 8 years ago
Qingping Hou 4cdafedcc8 Merge pull request #2147 from koreader/houqp-master
move setDirty call from TextWidget:setText to FileManager
8 years ago
Huang Xin b8f23d162d filemanager(fix): refresh banner in filemanager insteand of TextWidget 8 years ago
Qingping Hou 20eb36a03d feat: add network management UI for kobo 8 years ago
Qingping Hou a10a4f65a5 minor: use predefined color instead of gray method 8 years ago
Hzj_jie 273a0cb7ee We should set TextWidget.parent as dirty. 8 years ago
Hzj_jie 3bc5e90a52 TextWidget should set dirty region in setText function. 8 years ago
Hzj_jie 493ff00609 Add path in file manager 8 years ago
chrox 1c5c7d3a7c fix #1682 by closing all dict windows when holding close icon 8 years ago
chrox 71bf9efc7c split accient greek words with spacing character
This should fix #1705.
8 years ago
chrox 6ec30376a6 fix two crashes 8 years ago
chrox f1b76d41d9 fix crash when clearing inputbox 8 years ago
chrox 6b43233c4a fix #2092
And fix several other bugs introduced in #2028:
1. hint messages are back instead of the "Demo hint"
2. cursor now only presents in the focused inputbox in a multiinput dialog
3. moving cursor now works in multiinput dialog
8 years ago
chrox 40858c670a restrict dictionary window inside of screen especially in landscape mode
This should fix #2020.
8 years ago
Qingping Hou e58198fbe2 widgetcontainer(fix): crash when getting widget size 8 years ago
Qingping Hou 301925e34a textboxwidget(fix): handle onHoldWord event 8 years ago
Qingping Hou adf5ffdd26 dictquicklookup(fix): use self.region for matching hold event 8 years ago
Huang Xin fd39016c87 Merge pull request #2028 from union2find/master
Add cursor functionality for inputtext widget
8 years ago
Huang Xin ffca77af40 Merge pull request #2032 from koreader/keyboard
russian keyboard layout improvement from mergen3107
8 years ago
Qingping Hou 6a1fa7f612 move keyboard layout into data modules
also changed keyboard mode for number to 4
8 years ago
Qingping Hou 56a9bad23b russian keyboard layout improvement from mergen3107 8 years ago
Qingping Hou 476e35708d inputdialog(feat): add is_enter_default attribute to buttons 8 years ago
Qingping Hou 60587e08c6 defaults(refactor): remove global hack in filemanagersetdefaults
also added screensaver folder setting dialog for kobo
8 years ago
union2find a7f24b6eaf fix function util.splitToChars in frontend/util.lua 8 years ago
union2find f8943efdbf fix indent sytle 8 years ago
union2find 3d89b27e59 remove debug output 8 years ago
union2find 9ea56827dc resolve conflict on frontend/ui/widget/scrolltextwidget.lua 8 years ago
Zijie He 1aa0c4192a Multi-line toggle switch & add instruction to resolve sdcv build error. 8 years ago
Qingping Hou 2bcc3671c5 scrolltextwideget(fix): listen to page fwd/bck events 8 years ago
union2find d6fcc9adf9 add cursor functionality 8 years ago
Qingping Hou d7b1b403c1 progresswidget(fix): ignore nil self.last 8 years ago
Qingping Hou 26ecc6035a bookstatus: cache total pages 8 years ago
frankyifei 73f7d860cd imagewidget fix
bring back the old behavior: when width and height are set and all the
zooming options are false, zoom the image to that size. The last commit
to Imagewidget.lua caused it ignores the set width and height and use
the image's original size instead when no zoom option is set. This
caused #1979. Although #1979 can be fixed by setting autostretch=true,
but I think it's good to fix here.
8 years ago
Qingping Hou e9b9bbadcc fix: luacheck 8 years ago
Qingping Hou 790472fb38 Merge pull request #1969 from Hzj-jie/screen-saver
Update ImageWidget to support more stretch settings, and enable screensaver on kobo
8 years ago
Frans de Jonge 5638819f25 Removed a bunch of "successfully", replaced an ellipsis, and some deviant spellings of KOReader. 8 years ago
Zijie He 0b59d501a6 Merge remote-tracking branch 'upstream/master' into screen-saver 8 years ago
Zijie He 7d4bd076f7 Resolve review comments 8 years ago
Allan Nordhøy bc16ed5035 Spelling of calibre and KOReader. Ellipsis. 8 years ago
Zijie He 865b2a8f90 Update ImageWidget to support more stretch settings, and enable screensaver on kobo 8 years ago
Zijie He 6eeac33ad1 *.sdr folders are not excluded in folder item count
Bug #1966
8 years ago
Hzj_jie 3cf4e79f62 Use Screen:scaleBySize to auto scale virtual keyboard size 8 years ago
chrox f3e0d44cc4 disable jit on some modules on android
to make koreader on Android  more stable

and with these opt params:
```
require("jit.opt").start("sizemcode=64","maxmcode=64", "hotloop=10000")
```

The strategy here is that we only use precious mcode memory (jitting)
on deep loops like the several blitting methods in blitbuffer.lua and
the pixel-copying methods in mupdf.lua. So that a small amount of mcode
memory (64KB) allocated when koreader is launched in the android.lua
is enough for the program and it won't need to jit other parts of lua
code and thus won't allocate mcode memory any more which by our
observation will be harder and harder as we run koreader.
8 years ago
Qingping Hou 7c46cb3eda bookstatus(fix): reset self.stats on init 8 years ago
Qingping Hou 2a2643bdb5 Revert "bookstatus(fix): reset self.stats on init"
This reverts commit be8ceb84b4.
8 years ago
Qingping Hou be8ceb84b4 bookstatus(fix): reset self.stats on init 8 years ago
Qingping Hou f48d9bd6d9 fix(readerfooter): marker ticks initialization 8 years ago
Qingping Hou 2f78493e9e minor: write reader error to stderr 8 years ago
Qingping Hou e9a5624373 fix(bookstatus): enforce status page height to screen height 8 years ago
Qingping Hou fad50772ce minor: fix luacheck errors 8 years ago
Qingping Hou b0d4915977 progressbar: fix infill offset in bookstatus 8 years ago
Qingping Hou 10ded583b9 minor: adjust kvpage and dictlookup for new closebutton 8 years ago
Qingping Hou 34e0238b6f readermenu: move book status to info tab & minor cleanup 8 years ago
Qingping Hou a99ab5a976 bookstatus: adjust layout and spacing for bookstatus page 8 years ago
Qingping Hou 0772fd1439 touchmenu: fix menu height calculation 8 years ago
chrox 529cb801c1 fix broken extended InputDialog components
eg. LoginDialog and MultiInputDialog
since the style refactoring in #1783.
8 years ago
Qingping Hou 8e35a6e4ab fix inputcontainer 8 years ago
Qingping Hou 4598284bbb fix(readerfontlight): crash in toggle 8 years ago
Qingping Hou 87c28a72cf doc: update closebutton 8 years ago
Qingping Hou 6a6469fa09 more luacheck fixes 8 years ago
Qingping Hou 3c647ff244 minor: various luacheck fixes 8 years ago
Qingping Hou 3bec9cea89 ui(kvpage) truncate title/key/value if it's too long 8 years ago
Qingping Hou 59c17ef420 minor: more luacheck fixes 8 years ago
Qingping Hou 11ee8d6fcc refactor: use new KeyValuePage widget for displaying statistics 8 years ago
Alex Pletnev fbf98ed920 #1710 FR: Add support of statistics plugin for pdf 8 years ago
Alex Pletnev a6ebbe9adb #1807 FR: Add separator into menu 8 years ago
Qingping Hou 8f4fae7a09 minore: more static check fixes 8 years ago
Qingping Hou ba1ef91df2 minor: translate progress bar text with template 8 years ago
Qingping Hou b8ee33871f style: clean up statuswidget a bit 8 years ago
Alex Pletnev c0a2b3d4d9 #1730 Create complete book feature 8 years ago
Qingping Hou 7625621c84 feat(ui): support text alignment in TextBoxWidget 8 years ago
Alex Pletnev 0f9bfbf147 #1730 Create complete book feature 8 years ago
Qingping Hou 5a3b9c6856 style: make staick-check happier 8 years ago
Qingping Hou 59e791db82 feat: support numeric input for keyboard only devices 8 years ago
Qingping Hou 0a492bee3c add(ui): topcontainer 8 years ago
Qingping Hou 68ead0c9b2 feat(inputcontainer): support showing inputcontainer without content 8 years ago
Qingping Hou 72b0b8197b style(inputdialog): rename self.input to self.input_widget 8 years ago
Qingping Hou 6fe9f7870b chore: more luacheck fixes 9 years ago
Qingping Hou 3b92bdc084 feat: support screenshot in filemanager 9 years ago
Qingping Hou 4759def09c chore: fix static-check errors 9 years ago
chrox 394c9cf948 fix dimen returned by getSize used as dimen in inputcontainer 9 years ago
Qingping Hou 46aed752c7 Merge pull request #1680 from erosennin/opds-title
OPDS: fix parsing entry titles on ManyBooks (and possible other sites)
9 years ago
Qingping Hou 8cff0f3ba9 Merge pull request #1679 from erosennin/opds-author
OPDS: include author's name into the file name
9 years ago
Andrey Golovizin 63e0605080 OPDS: fix entry titles on ManyBooks 9 years ago
Andrey Golovizin dbac03e5f4 OPDS: include author's name into the file name 9 years ago
chrox 2216ddd796 hold to lookup word in dict window
This should close #1541.
9 years ago
NiLuJe bfb2ee703a Force poll the battery when showing the menu.
Making sure to always show up to date info.

Also fix the battery polling cache invalidation logic to actually
work?
Should make it behave properly on devices where we handle resuming
ourselves.
9 years ago
chrox 8b85cbf157 add support for password protected zip/cbz documents 9 years ago
chrox e91b7bd266 set foucus of button table only if the device has a dpad
so that Kindle Voyage won't show a highlighted button in
confirm dialog.
9 years ago
chrox 9e91512f5f add custom sync server option in Kosync plugin
This should fix #1619.
9 years ago
Huang Xin d393fbb180 Merge pull request #1628 from apletnev/#1581
Add Statistic plugin (#1581 Amount of hours spent on a book)
9 years ago
chrox b0df6d53e9 add Basic Authentication for OPDS catalog
use coroutine to support ad-hoc callback in login button so that when
the username/password is incorrect it will retry automatically
currently tested with COPS on apache

This should fix #1001.
9 years ago
chrox 5ec384efb5 fix #1593 cannot download from COPS OPDS server
and get rid of the ugly baseurl workaround for "Internet Archive",
actually the url building of all these catalogs is perfectly
handled with `url.absolute(base, relative)`.
9 years ago
Qingping Hou a62e7ee34c feat: add keyboard support for button table 9 years ago
Qingping Hou 8c14613085 fix: support self.selected override for FocusManager 9 years ago
Qingping Hou 63e88baf33 fix: stop self.dimen polution for inputcontainers
Without this fix, self.dimen is shared among all inputcontainers
intances, which breaks some of the UI rendering. All widget should
set/initialize their own self.dimen in self:init() method.
9 years ago
NiLuJe ce5f66ccbc Prefix battery percentage w/ a + when charging.
Adresses comments on MR.
Add a comment explaining the magic behind CRe's charging icon when using
CRE's full (top) status bar.
9 years ago
Alexander Pletnev 52d821df00 Add Statistic plugin (#1581 Amount of hours spent on a book) 9 years ago
NiLuJe 6309df9dec Guard against nil text in menu widget
Allow one to go further in the FM's setting menu on legacy devices...
... and potentially shoot oneself in the foot because of the unusable
confirmdialogs (among other things ;p).
9 years ago
Frans de Jonge f84b537954 Make 'default' and 'fallback' strings translatable 9 years ago
frankyifei 059de23037 implement GUI dialog for setting crengine fallback font 9 years ago
frankyifei d0a44b9152 style 9 years ago
frankyifei f7fb103abc loop menu pages when it reaches ends
the following graph shows my idea.

1->2->3->4->5->6->7->8->9->10
└----------------------------------------┘
9 years ago
frankyifei f7142cfcbe fix filechooser crash on entering folder contains nil symlink 9 years ago
Qingping Hou 186673587e chore: fix some of the luacheck errors 9 years ago
NiLuJe c847807322 Turns out that also looks better as ui refreshes 9 years ago
NiLuJe 50dbf6b581 Switch a few widgets to ui refresh modes
More closely matches native behavior on REAGL devices.
Closing those widgets should still trigger a partial refresh though,
because we usually get back to the reader, and text, so we want REAGL
;).
9 years ago
chrox 932df2a2f9 Refactor out string.gsplit to util.gsplit 9 years ago
chrox ebdd374c93 Add 'input page number' function in filemanager
by holding on the page info label at the buttom of the filemanager
9 years ago
chrox 72012e97e1 disable reflow options when reflow is not ON
This should also fix #1061.
9 years ago
chrox 90a5e09bdc disable highlight in dict window if it's highlighted already
This should fix #1418.
9 years ago
chrox cf124eb72f refresh menu instead of closing if menu item is a check option 9 years ago
chrox f22a53affd screen orientation won't change when going into filemanager
and filemanager remembers screen orientation at exit
This should fix #1338.
9 years ago
chrox c6f6699644 fix empty menu widget won't trigger screen refresh
This should fix #1398.
9 years ago
Qingping Hou 6ed8f30f35 fix: empty item_table crashes menu widget 10 years ago
chrox b3d79b053a workaround to fix #1340 10 years ago
variousvirgil 9c69c1f14e Fix #1299 10 years ago
Hans-Werner Hilse ff0fbbdb4b fix widget closing 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
Huang Xin ddae003925 Merge pull request #1310 from hwhw/master
fixes for scrolling, fix for double-refresh, misc stuff
10 years ago
Hans-Werner Hilse e8642fbad7 use API for refresh when closing widgets in message popups 10 years ago
Hans-Werner Hilse 143c56c48c record ButtonDialog.dimen 10 years ago
Frans de Jonge 47d7a48555 OPDS: refactored unit test and fixed a minor bug with undefined image_rel 10 years ago
Hans-Werner Hilse 3f9dc46315 fix dict window refresh
was still using old API
also, move this to another place.
10 years ago
Frans de Jonge c25254a7ec OPDS: embryonic unit test for OPDS browser
This initial seed specifically tests against what recently broke in Gutenberg and FeedBooks.
10 years ago
Hans-Werner Hilse f02be20a65 refresh fixes for the menus
this will only refresh the areas that actually need to be refreshed.
10 years ago
Hans-Werner Hilse 6793a4fee1 reader config dialog: properly refresh config pane
This serves as a good example for the way refreshes are done:
setDirty("all", function() ... end)
* the "all" will have all widgets on screen repainted.
  In this case that is needed because the config pane has
  different sizes, covering different parts of underlying
  widgets. So they need to be repainted every time.
* the function will return the area to refresh and is evaluated
  after painting. In this example, we take the area that is covered
  by the config pane before switching it (if present at all), and
  hand it to the refresh area function as an upvalue.
  When the function is called later after painting, it will
  use that saved area and combine it with the area that is covered
  then by the widget. That way, parts that are covered no more are
  included in the refresh area, too.
10 years ago
Hans-Werner Hilse 82c26b1f18 adapt widgets to new refresh/repaint API 10 years ago
Andrey Golovizin 296f63b22a OPDS: ignore links with unknown rel values, treat empty rel as rel="subsection". 10 years ago
Frans de Jonge 7a87b66fa1 OPDS catalog: auto-fill http:// if no protocol given and revert #1106
This fixes #1259.
10 years ago
Hans-Werner Hilse 0c80537003 allow image widgets to do alpha-blitting
when the image (e.g. a PNG) does contain an alpha channel, that can
be honored by ImageWidget. It doesn't do so by default for compatibility
(arguably, we should change that in the future), it has to be enabled
by setting the "alpha" property to "true" (boolean, not string).
10 years ago
Frans de Jonge 693fa0837e Reworked several strings
This is the remaining gruntwork of #1276. I believe that only leaves networkmgr.lua and filemanagersearch.lua, which will require a little more thought.
10 years ago
chrox ca60ceacd0 make radius field respects popout flag 10 years ago
chrox 0a06041cd9 fix calculation of widget height of filechooser
the height of filechooser is provided when creating filechooser
widget since there may be no title as in filemanger which needs
a special title widget to contain filemanger menu.
10 years ago
chrox 67693367b9 init width and height of filechooser widget during init
so that everytime a filechooser is inited right dimension
size is used.
10 years ago
Hans-Werner Hilse 22697adf20 switch from scaleByDPI() to scaleBySize() 10 years ago
HW 7b91935df0 Merge pull request #1230 from chrox/fix_1170
fix #1169 and #1170
10 years ago
chrox d11dba0558 fix #1169 and #1170 10 years ago
chrox 3574865dcb fix #1166 by auto alignment of option name 10 years ago
chrox dbf8faa9b1 remove hardcoded footer height of reader menu 10 years ago
chrox f52872b081 default autoscale for IconButton 10 years ago
chrox e66801039b refactoring: reuse IconButton for config menu bar 10 years ago
Hans-Werner Hilse ab44d1f7e3 fix item number distinction (plural forms) 10 years ago
Frans de Jonge 8b9bbf918c Fix typo in #1176 10 years ago
Frans de Jonge d701d9b198 First util.template encapsulated strings 10 years ago
NiLuJe e9573ebe58 Try to avoid more update_regions_func mismatches
scheduling tricks
10 years ago
Hans-Werner Hilse 3d03713cb1 implement case-insensitive sort, make default and configurable
This will convert any file name to lowercase before doing the comparison.
Note that this will only work for ASCII character range, a full Unicode
aware solution will be much more complicated. And in the end, file names
are byte arrays, not character strings ;-)

fixes #1183.
10 years ago
Hans-Werner Hilse e031599c0a fix strcoll() workaround
The strcoll() workaround we had in place for Kobo devices was (or has
become) ineffective. We had set self.strcoll to nil on Kobo devices -
but this was the instance variable. Setting it to nil effectively makes
the instance variable vanish, so when trying to access it later, it
was not there and got looked up via the metatable - which had the original
reference. Setting it to nil had no effect whatsoever.

We simplify that approach and set the replacement function where before we
had set this to nil.

This is a partial fix for issue #1183 (and explains a comment in issue #686
which says that the old fix did not work).

However, to really fix #1183 - if we want to do so - we would need a collate
function that normalizes uppercase/lowercase before compare.
10 years ago
NiLuJe 1ee09010c4 Make ScrollTextWidget updates regional
Because I like breaking stuff in fun & interesting ways :D
10 years ago
chrox efbd7f7b5d schedule in menu option callback
so that new reginal update on menu entry don't
affect screen update from callback results
10 years ago
Qingping Hou 123d0a1230 Merge pull request #1126 from chrox/wifi_toggler
add network settings in reader menu
10 years ago
Qingping Hou fac2e121d2 Merge pull request #1124 from chrox/remember_menutab
remember menu tab index when showing reader menu
10 years ago
chrox 590073e4a8 add network settings in reader menu
and remove the wifi toggler on the footer of each menu page,
so that network status is only checked (currently with the stdout of ip cmd)
when navigating to the "Network settings" submenu instead of checking
on each menu popup.
10 years ago
NiLuJe c3274a9d5e Unbreak FM by reverting 7a812f
:D
10 years ago
NiLuJe b88e304845 Make TouchMenu updates regional 10 years ago
NiLuJe 88c26b4112 Make ConfigDialog updates regional 10 years ago
chrox 95ac27df5c remember menu tab index when showing reader menu 10 years ago
NiLuJe 7a812ff86d Make Button update regional 10 years ago
NiLuJe 39244aa0cb Make ToggleSwitch updates regional 10 years ago
NiLuJe 041f11cba0 Tweak some comments 10 years ago
NiLuJe 8f3598bec3 Make IconButton updates regional
Beginning of the quest to make menu refreshes slightly smoother ;).
10 years ago
NiLuJe a12015c0d1 Force the dictionary popup to do a partial update.
It was done the other way around on purpose, so I probably broke some
very specific use-case ;). Feel free to shout at me ^^.
10 years ago
Andrey Golovizin 8bce54a6a0 Ignore OPDS links with unknown rel values. 10 years ago
Andrey Golovizin 5888773c95 Try to fetch next page if loading a new catalog resulted in a single page 10 years ago
Andrey Golovizin 500ad9ba4c Fetch enough items to fill at lest one new page 10 years ago
chrox bd0975896d add fulltext search for EPUB documents 10 years ago
chrox 8ddca4bf49 close reader config panel when touching reader menu 10 years ago
chrox a766ec51ae only update neccessary screen regions when typing with virtual keyboard 10 years ago
chrox 3a1fe689e2 update multiple screen regions
This is useful when updating keyboard and inputbox.
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 a32991d898 add new sorting methods for file list in filemanager
Now files can be sorted by filename or last accessed time
10 years ago
chrox 84029e9694 add modal widget type that will stay on the top of window stack
ConfirmBox and InfoMessage are default to be modal.
Now returning to filamanager after highlighting a PDF page
the confirmbox asking users to save the document will not be hidden by
the filamanager window.
And it's tested on Kindle that #791 is already been solved probably by
out refacorting of MuPDF backend.
10 years ago
chrox dfcd67c5bf move screenshot settings to submenu of Screenshot entry in readermenu
And also fix a touchmenu bug that prevent some menu entries
(always at the bottom of the menu) from showing submenus. The reason is
that the onTapSelect method of TouchMenuItem doesn't return true, so that
the tap gesture will propagate to the parent widget and be captured by
touchmenu itself. But at this time the dimen of touchmenu is changed to
the submenu of the tapped menuitem. If the submenu is short enough the
tap will be outside of touchmenu which will cause a TapCloseAllMenus
event and the submenu will never be shown.
10 years ago
chrox 68265336f4 fix #1034 by refactoring path chooser to a download manager
Now directories visible in the filemanager should also
be visible in the path chooser
10 years ago
Michael Hall dd80d61155 Leave both readerconfig and readermenu open on wifi toggle 10 years ago
Qingping Hou 394c847e2b fix(app): initilize menu properly in reader and filemanager 10 years ago
Qingping Hou d1627337e0 fix(ui): fix dynamic menu height calculation 10 years ago
Hans-Werner Hilse ba40cc56e9 fill background of intermediary blitbuffers
we need to explicitly fill those buffers, now that white is not "0"
anymore.
10 years ago
Hans-Werner Hilse 5982e24d57 unify color specification
colors were a mixture of 4bpp integers (0=white, 15=black) and
fractional blackness levels (0=white, 1.0=black) before. This is
now unified to use the color specification of the Blitbuffer API.
10 years ago
chrox c994e30cff fix #1024
if toc item has expand/collapse state and tap select on the left side
the state switch action is triggered, otherwise goto the
linked page.
10 years ago
Hans-Werner Hilse e0868826ad use new FFI based mupdf API
This will use the new API where the Lua/C interface was used before
and also drop usage of mupdfimg wrapper which is now implemented
within the mupdf interface
10 years ago
chrox 2ad63fc1a3 expand/collapse TOC only by tap on the icon 10 years ago
chrox f3417c5488 fix #987 10 years ago
chrox 96960cd554 don't dim icon button by default 10 years ago
chrox 7c9130744c add collapsable TOC menu 10 years ago
chrox b09bb87d4e refactoring readertoc and readerfooter
so that they don't repeat themselves.
10 years ago
Qingping Hou 55cb0271cb Merge pull request #954 from chrox/fix_950
get rid of query filed of baseurl when building href
10 years ago
chrox 549f54ab07 get rid of query filed of baseurl when building href
otherwise there will be "?offset=90" query in downloading href
for calibre opds server which doesn't accept the url

This should fix #950.
10 years ago
chrox 7b78d70c74 fix fgcolor of inputbox is always 0.0 10 years ago
chrox 6152198e88 still needs button bgcolor
This bgcolor is for framecontainer background color.
10 years ago
Hans-Werner Hilse 7b1777e095 adapt widgets and text rendering to new font rendering
no background for text rendering anymore
10 years ago
evgsh aae2c4de27 Added acquisition relation types , fixes issue #940 10 years ago
Hans-Werner Hilse e47b43e8b5 add implementation of a container widget with alpha-blitting
This is a container that will honor a given alpha value (0..1)
when painting, so it will be translucent for values < 1.
10 years ago
chrox 97e7a90865 encode lfs.dir iterated file path to UTF-8 10 years ago