2
0
mirror of https://github.com/koreader/koreader synced 2024-10-31 21:20:20 +00:00
Commit Graph

272 Commits

Author SHA1 Message Date
Dobrica Pavlinusic
7b983ee7e6 fix fiveway pan to right-bottom of previous page 2012-09-27 21:29:25 +02:00
Dobrica Pavlinusic
01a57b2fb9 recalculate pan offsets on page change
Store last globalzoom_mode in self.pan_by_page so we can restore it
to force offsets recalculation on page change

This wasn't quite enough to trigger correct re-panning for page
changes when using fiveway to move in two-column mode, issue #275

I considered adding callback to goto method and than transfering
it through function calls, but this approach (allthough very
questionable) seemed to provide simplier code.
2012-09-27 19:21:51 +02:00
{Qingping,Dave} Hou
cc1ab45b1c Merge pull request #329 from dpavlin/fit-content-pan
remember last zoom mode when panning #236
2012-09-26 21:40:23 -07:00
Dobrica Pavlinusic
7ba8d6f877 remember last zoom mode when panning #236
This tries to address issue #236 so that previous and next keys don't
change meaning when user go into panning mode by pressing fiveway.
2012-09-27 00:37:32 +02:00
Tigran Aivazian
a7b22ba0d4 Mixed up unireader.toc with self.toc, sorry. 2012-09-26 19:56:07 +01:00
Tigran Aivazian
5d82ffe984 Redraw current page if necessary on pressing Back
For PDF and DjVu files (but not for crereader) the command handler for
"Back" key can call addJump() in order to avoid losing the top of the
jump history on return. This (addJump()) can cause the TOC to be
retrieved and the message "Retrieving TOC..." to be displayed.
If this happens then we need to redraw the current page after displaying
our own "Already first jump!" message.
2012-09-26 16:05:07 +01:00
Tigran Aivazian
3cdb57ccc7 Merge pull request #309 from dpavlin/pdf-links
show pdf links using L key
2012-09-26 03:03:22 -07:00
Dobrica Pavlinusic
929334c00c shortcut_offset should be added directly to shortcut_map 2012-09-26 11:42:15 +02:00
Dobrica Pavlinusic
51e2a0c13b use shortcut_map to track page links 2012-09-26 10:55:03 +02:00
Dobrica Pavlinusic
771901d56e use all shortcuts, skipping uri links 2012-09-26 10:48:07 +02:00
Dobrica Pavlinusic
d936f86f04 fix shortcuts beyond last one 2012-09-25 21:16:03 +02:00
Dobrica Pavlinusic
88828fd478 check if there is at least one page link before drawing shortcuts 2012-09-25 19:28:16 +02:00
Dobrica Pavlinusic
ee7b0ca41e ignore all non-page links 2012-09-25 19:04:46 +02:00
Dobrica Pavlinusic
fc22f5ed93 check if getPageLinks returned links before use 2012-09-25 18:31:42 +02:00
Dobrica Pavlinusic
16c5171432 removed refresh which will be called after anyway 2012-09-25 15:39:20 +02:00
Dobrica Pavlinusic
01b1f5ba66 move 30 link shortcuts around using fireway 2012-09-25 15:36:13 +02:00
Dobrica Pavlinusic
cc222c6525 fix DOT and SYM bindings, added ENTER 2012-09-25 15:00:58 +02:00
Tigran Aivazian
06a0b27664 Allow clearing both internal and document caches via Menu
Bind the key "C" in Menu to clear internal tile cache and key "D" to
clear the document cache.
2012-09-25 10:55:31 +01:00
NuPogodi
d542982778 remove self:redrawCurrentPage() in UniReader:addJump(pageno) 2012-09-25 02:19:33 +03:00
Dobrica Pavlinusic
ac14ac4a21 show only page links 2012-09-25 00:04:11 +02:00
Dobrica Pavlinusic
8a7f2bd562 go only to page links 2012-09-25 00:03:32 +02:00
Dobrica Pavlinusic
a3f5de9e7a fix size of fonts according to globalzoom
And a few of one pixel up, one pixel down adjustemts, so that all
underlines get dimmed.
2012-09-24 23:57:49 +02:00
Dobrica Pavlinusic
1916f5038b draw links on page as underline 2012-09-24 23:24:10 +02:00
Tigran Aivazian
1e2429b3be Fix for the issue #311.
Children nodes that have no [apparent] parent should be adopted
by the "_HEAD" i.e. the root of the whole tree.
2012-09-24 21:33:47 +01:00
Dobrica Pavlinusic
f2eeca73aa overlay keyboard shortcuts on top of links
This is example of user interface discussed in #309
2012-09-24 20:27:13 +02:00
Dobrica Pavlinusic
2774350ec6 transform coordinates to on-screen values 2012-09-24 17:49:03 +02:00
Dobrica Pavlinusic
0828468b12 try to draw inverted rectangles over links
This commit nicely shows that we need to translate link coordinates
2012-09-24 17:49:03 +02:00
Dobrica Pavlinusic
71ff602cd5 getPageLinks implementation for mupdf #72
This is rough first draft, and provides just dump of all links
available on pdf page. Binding to Shift+L is temporary and just for
debugging!
2012-09-24 17:49:03 +02:00
Tigran Aivazian
3056bf440c Fix for TOC breakage for crengine-related files.
In UniReader:showToc() function we cannot use goto() by page number
but have to use self:gotoTocEntry() because crereader defines its own
CREReader:gotoTocEntry() method which uses "xpointer" field of the TOC
entry for this purpose.
With this fix the TOC navigation in crengine-related files works
correctly, BUT after each jump you have to press Menu to refresh the
page for some reason (adding explicit self:redrawCurrentPage() in the
code before gotoTocEntry() doesn't help). This seems to be an unrelated
problem to do with cr3 caching or something else. I will try to
investigate it as well, but for now I am committing the fix for the TOC side
of the problem.
2012-09-21 23:05:19 +01:00
Tigran Aivazian
e5c859059d Fix for the crash when deleting highlights, see issue #295. 2012-09-19 23:34:16 +01:00
Tigran Aivazian
f11a006775 1. Fix deleting highlights when there is more than one (previously it would delete not only the current highlight but some or all of the later ones)
2. Support deleting highlights from within "show all highlights" function (Shift-N). It is much easier to delete multiple highlights than having to position the cursor on them and press Del.
3. Fix the bug whereby the first press of Menu would overlay the info on top of the book's text.
4. Show the number of bookmarks and highlights in their respective lists.
5. Fix the incorrect section title shown in Menu when the file contains TOC with external links.
6. Rename "start highlight mode" -> "enter highlight mode".
7. Rename "display all highlights" -> "show all highlights".
2012-09-19 18:25:26 +01:00
Tigran Aivazian
f5f5040f20 Change "Updating HighLight data..." message to Debug() as this operation
cannot possibly hang and it conveys no useful info to the end user.
2012-09-19 12:29:45 +01:00
Tigran Aivazian
d2b2d8b18f Make the info messages about highlight short enough to be visible.
Also, shorten the delay from 2s to 1s.
2012-09-19 12:26:32 +01:00
Tigran Aivazian
75bd54657b Cleanup of the TOC support code: remove unnecessary initializations. 2012-09-17 19:56:19 +01:00
Tigran Aivazian
51ccc20845 Save a few table indexing operations since we already have the page number. 2012-09-15 23:32:56 +01:00
Tigran Aivazian
56f4ac42bd Better fix for the external links in TOC problem: instead of returning
to the current page display a message "External links unsupported" and
remain in the TOC menu. The reason for this decision is that if the
user chose invalid TOC entry she is more likely to wish to stay in the
TOC menu and choose another entry rather than return to reading immediately.
2012-09-15 23:26:30 +01:00
Tigran Aivazian
cc5abd3b87 Use the value of self.doc:getPages() stored in a local variable instead of calling it for each TOC entry. 2012-09-15 22:22:07 +01:00
Tigran Aivazian
853f34b488 Fix for calculating the current position in the case of TOC containing links to external files:
when walking the TOC we should check if the destination page is within the range of the current document.
2012-09-15 22:19:12 +01:00
Tigran Aivazian
dac88587bf Fix for the case when TOC contains a link to external file: we should redraw the current page and not just quietly return from UniReader:goto(). 2012-09-15 22:00:59 +01:00
Tigran Aivazian
29b1ef5dde Cleanup of expandAllTOCSubItems(). 2012-09-14 21:43:23 +01:00
Tigran Aivazian
922b53ac60 Cleanup of cleanUpTocTitle() function: (f(x)) is a more elegant way of forcing
the return of a single value than the use of a dummy variable.
2012-09-14 21:27:06 +01:00
Tigran Aivazian
8312ad83c5 Add "expand all" command attached to Shift-Right key in the menu which recursively expands all subitems of a given item. 2012-09-14 13:54:33 +01:00
Tigran Aivazian
e35a828fb0 Generate expandable TOC only if there really is something to expand in the TOC. 2012-09-14 09:08:47 +01:00
Tigran Aivazian
49a76330ac Bugfix for the issue #269 and also fixed findTOCpos() function to correctly calculate the position in TOC
for the case when the current page is before the first page with a TOC entry.
2012-09-10 23:36:58 +01:00
{Qingping,Dave} Hou
0100f33128 Merge pull request #264 from dpavlin/gamma_speedup
showInfoMsgWithDelay would delay gamma change for 1s #165
2012-09-09 12:39:39 -07:00
{Qingping,Dave} Hou
79a304bb5d Merge pull request #262 from dpavlin/render_indicator
added page_indicator to show document position and rendering
2012-09-09 12:38:13 -07:00
Dobrica Pavlinusic
b27b665a97 showInfoMsgWithDelay would delay gamma change for 1s #165 2012-09-09 21:05:23 +02:00
Tigran Aivazian
4242cc9686 Allow deleting bookmarks. 2012-09-09 19:46:24 +01:00
Dobrica Pavlinusic
4e1586fc81 added page_indicator to show document position and rendering
idea is simple: when starting long operation (page renedering) invert
box on top of screen which has relative width of this page.

This allows easy overview where in document user is, along with
indication that something is still happending.

Perfect use-case are glossy magazines pdfs which have first two
pages in hi-res graphics, so this indicator is very useful to see
that something is still happending and that reader didn't die
2012-09-09 19:06:15 +02:00
Tigran Aivazian
f1e197cbfd For documents without TOC we need to redraw current page after showing the "No Table of Contents" message,
otherwise the message "Retrieving TOC..." will stay on the screen indefinitely.
2012-09-09 15:00:17 +01:00