Commit Graph

113 Commits (ce624be8b83e880b1a81106a143e1440eeda4aab)

Author SHA1 Message Date
Frans de Jonge f6ca1c7c0a
[feat] Open with: choose which engine to use for file (#3653)
Fixes #3345

* Add SVG to MuPDF filetypes
6 years ago
poire-z 7797c2369e
credocument: deal with loadDocument() failures (#3570)
cre:loadDocument() may fail in recognizing the document format, and
koreader would previously keep calling other methods on it, which would
make crengine segfaults. We now check loadDocument success at the
various places it is called, and try to deal the best way we can when it fails.
6 years ago
poire-z 29707bd664 FileBrowser: change page to show last file or previous subdir (#3351)
When going from reader to filemanager, we are in the directory
containing the last_file. With this, we will also be on the page
showing this file.
When in filemanager and going up (".."), we will also be on the
page containing the directory we came from.
7 years ago
Frans de Jonge 9eb073a524 [travis] Add protection against unscaled sizes
As pointed out by @poire-z

* [fix, UX] SkimToWidget scaling

* [fix] Button scaling

* [fix, UX] Scale ProgressWidget

* [fix, UX] Scale confirmbox

* [fix, UX] Scale just about everything
7 years ago
poire-z 17014f9281 Avoid settings double save when leaving Reader (#3131) 7 years ago
Frans de Jonge c8ab9183aa [UX] ReaderUI: save/don't save document instead of yes/no
Brings it in line with UX guidelines.
7 years ago
poire-z 031df2ffee Added PicDocument:getCoverPageImage() and :getProps()
So an image file can have a cover in coverbrowser's display.
It also allows for an alternative viewer (ImageViewer widget)
when holding on file / View full size cover.
7 years ago
poire-z 17656778b1 Book information: refactored and additional features
- Factored out duplicate code from filemanager.lua and filemanagerhistory.lua
to new filemanagerbookinfo.lua (and other common code to filemanagerutil.lua).
- Uses sidecar files' new doc_props and doc_pages settings, or fallback to
old 'stats' settings, or to opening document.
- Shows filename, filetype and directory.
- Shows description (Hold to see whole truncated text), keywords, and
cover image (tap to extract image from document and display it if available).
- Book information now available from reader menu, to display info about
the currently opened book.
- Convert possibly HTML description to plain text via added
util.htmlToPlainTextIfHtml() (for simple HTML conversion).
7 years ago
poire-z 64f699ba36 Store book metadata and nb of pages in new settings
They may already be available (with other statistics stuff) under
the 'stats' key, but not if Statistics plugin is disabled. As this
plugin may be migrated to SQLite, readerui and readerfooter will now
set two new properties: doc_props (containing all and only the metadata
returned by document:getDocumentProps()) and doc_pages (updated
by readerfooter on any display or font change).

PDF document: returns additional PDF properties: Keywords
and Subject (as Description).
7 years ago
Frans de Jonge 28524a5847 ReaderUI: return to filemanager instead of quitting if no document (#2956)
This affects #2335, at least for documents covered by `validDjvuFile()` (see 76cef07c07/frontend/document/djvudocument.lua (L15-L23)). However, that's only with regard to `touch invalid.djvu` and should not affect whatever happened in the OP.
7 years ago
Hzj_jie 30378eb2a8 Add restart koreader function and ensure FlushSettings event can be delivered to all widgets (#2772) 7 years ago
Qingping Hou fd862f5e28 plugin(fix): catch plugin crash at init time 7 years ago
Qingping Hou 00cf81febc readercopt(fix): set view mode after reader is ready
Otherwise, self.xpointer might still be nil in
ReaderRolling:onChangeViewMode
7 years ago
Qingping Hou a943b73303 fix: adjust pan rate for eink and non-eink screens 7 years ago
Qingping Hou f95ad00b9e feat: add logger module & rewrite kobo suspend script in lua 7 years ago
Hzj_jie c662ca4cc8 Load plugins also in FileManager (#2426)
added is_doc_only plugin attribute
7 years ago
Qingping Hou a6c506dc10 kobolight(refactor): move into plugin & only enable for kobo 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
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
Hzj_jie d4c31d683f Add a setting to disable save document (#2138)
* Add a setting to disable save document
* Add UI elements to control save-document settings
8 years ago
chrox 03fda94562 fix #2110 by adding disable double tap option in screen options 8 years ago
Qingping Hou f71534e399 readerfooter(fix): only populate footer info after document is loaded 8 years ago
Qingping Hou 60587e08c6 defaults(refactor): remove global hack in filemanagersetdefaults
also added screensaver folder setting dialog for kobo
8 years ago
Qingping Hou 2cf4e77ae5 readerui(chore): rename _running_instance 8 years ago
Qingping Hou 0166ff8add reader(fix): force draw info message before loading document
Since the doShowReader will run in nextTick, it will get picked up by
checkTask, which is in the beginning of next UI loop and blocks
UIManager from redrawing the screen for the info popup.
8 years ago
chrox 6e723237ba fix 'opening file' dialog not centered in landscape
by setting the timeout to 0.0 seconds so that when the screen
is turned to landscape the dialog is already closed.
8 years ago
Zijie He 667e8834ad Migrate history folder, FileManagerHistory uses own history.lua file and ReadHistory component 8 years ago
Qingping Hou 2f78493e9e minor: write reader error to stderr 8 years ago
Qingping Hou 34e0238b6f readermenu: move book status to info tab & minor cleanup 8 years ago
Qingping Hou 5e8c5243c4 uimanager: fix crash on crash.... 8 years ago
Qingping Hou 03e81cfa4d test: fix readerui instance reset test 8 years ago
Qingping Hou b63ddb8736 fix: kill in fly hinting event on document close 8 years ago
Alex Pletnev fbf98ed920 #1710 FR: Add support of statistics plugin for pdf 8 years ago
Alex Pletnev 0f9bfbf147 #1730 Create complete book feature 8 years ago
Qingping Hou 2f0544b1b7 refactor(statistics): avoid magic 0.1 schedule with PostRender event 8 years ago
Qingping Hou e2096ed8d9 doc: add documentation build infrastructure 8 years ago
Andrey Golovizin bb1d4c60b3 Choose hyphenation dict by document language 8 years ago
Qingping Hou 9c46cafc9c chore: fix luacheck warning 8 years ago
Qingping Hou 3b92bdc084 feat: support screenshot in filemanager 8 years ago
Qingping Hou 90d1101ab7 minor: quit uimanager properly on coroutine error 8 years ago
Qingping Hou 41240464ca minor: fail loudly with stack trace when doShowReader crashed 8 years ago
chrox 8b85cbf157 add support for password protected zip/cbz documents 9 years ago
chrox d08e22ec2e add simple sync service as a plugin
The 'KOSync' plugin will synchronize furthest reading progress
across different koreader devices after users registering their
devices.

The synchronizing service is open-sourced as the project
[koreader/koreader-sync-server](https://github.com/koreader/koreader-sync-server).
9 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
Frans de Jonge 7c01a3f2a9 Fixed spaces stripped out by Transifex in readerui.lua by using util.template 10 years ago
chrox d65e5cf813 dismiss 'Opening file' dialog once reader view is ready 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 bdebe90412 keep only one readerui instance running 10 years ago
chrox 4897d70b1f add reader history in the info panel 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 2bec0017a0 refactor out global functions showHomePage and showReaderUI 10 years ago
chrox fd9e3d57f3 fix performance issue of screensaver on Kobo
now loadDocument will not render the document and getCoverPageImage will
be much faster.
10 years ago
chrox 092522b89d promote user to save PDF document after highlighting
This is a wordaround for #791.
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 73e0608327 flush reader settings when closing readerui 10 years ago
chrox 26f5a4731e add peer-to-peer file sharing plugin ZSync 10 years ago
chrox e624695d54 the Back key on Android should close the popup window and menu 10 years ago
chrox 15baeb7867 save doc settings when receiving IntoSS or Suspend or SaveState events 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 17741e292b serialize cache when closing ReaderUI other than closing document 10 years ago
chrox 34fd9f3efa add koreader plugin mechanism
This should implement #505.
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