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

412 Commits

Author SHA1 Message Date
{Qingping,Dave} Hou
fe62c577b0 Merge pull request #412 from tigran123/djvu-gwidth
Use the local copy of the global G_width variable.
2012-10-10 16:34:54 -07:00
kai771
286f7caf2d "page links" -> "page links shortcut keys" 2012-10-10 21:14:02 +02:00
kai771
bb899cfad2 Implements a toggle that allows enabling/disabling links underlining 2012-10-10 20:36:51 +02:00
Tigran Aivazian
4705ec60ad Use the local copy of the global G_width variable. 2012-10-10 13:57:28 +01:00
Tigran Aivazian
c64da132c5 Merge pull request #387 from dpavlin/variable_link_font_size
recalculate font size for each link
2012-10-09 16:06:27 -07:00
{Qingping,Dave} Hou
f4f29bb12b Merge pull request #410 from tigran123/mode-refresh
Fix for the issue #404 no page redraw after setting mode from readers.
2012-10-09 15:29:22 -07:00
Tigran Aivazian
82831f4312 Get rid of comments showing bad practice. 2012-10-09 23:20:42 +01:00
Tigran Aivazian
832a36c624 Allow two decimal digits point for gamma/zoom
Allowing only one digit seems insufficient, especially for zoom.
2012-10-09 23:17:56 +01:00
Tigran Aivazian
339bda372a Restrict the value gamma in the window message.
In order to make sure that the message is always visible we should not
show all the decimal places --- one is more than enough. Otherwise the
whole thing is invisible, often enough to be irritating...
2012-10-09 18:42:49 +01:00
Tigran Aivazian
da3e336de5 Page redraw when pressing Alt-M and I in readers 2012-10-09 15:27:25 +01:00
Tigran Aivazian
62b2261555 Show current zoom value when changing it. 2012-10-09 09:35:15 +01:00
Tigran Aivazian
0de624a7ea Rename dim_overlap -> show_overlap_enable
The new name is more intuitive.
2012-10-08 14:59:32 +01:00
Dobrica Pavlinusic
d14d0ba137 use visible_links for selected link 2012-10-08 15:35:53 +02:00
Dobrica Pavlinusic
905a7e704d invert all four sides of link rectangle
this helps with huge areas (Linux Journal comes to mind) for which
is somewhat hard to figure out which shortcut corresponds to which
link area
2012-10-08 15:35:41 +02:00
Dobrica Pavlinusic
4a331ab8e8 recalculate font size for each link
This fixes problems with pages full of links where first link
is so big that rest of link shotcuts overlap on page
and size of link shortcuts under different zoom #385
2012-10-08 15:35:00 +02:00
Tigran Aivazian
cd48bc4d8b Add dim_overlap configurable
On request of users (dracodoc, kai771 et al.) I have added a new command
`O` which toggles the display (via dimmed box) of the page overlap
areas. This setting is saved on a per-book basis, i.e. is specific to
the book, which is the desired behaviour as one wants dimming on some
books (math, physics, etc) but not others (fiction).
2012-10-08 12:48:01 +01:00
Dobrica Pavlinušić
5608759e0f Merge pull request #393 from tigran123/bookmark-refresh
No need for page redraw in UniReader:addBookmark()
2012-10-08 04:08:00 -07:00
Tigran Aivazian
e06069c147 Comment out a Debug() for page jumping.
All those functions get called even if Debug() itself is a do-nothing,
so this type of Debug()s should only be uncommented when needed.
2012-10-08 11:13:59 +01:00
Tigran Aivazian
a63140e9c8 Add "manual full screen refresh" on pressing Space
Overloading the function "set full screen refresh count" (Shift-R) with
forcing screen refresh is rather counter-intuitive and inconvenient in
practice, because the InputBox dialog obscures the large part of the
page and when it disappears it is not obvious whether the full page
redraw occurred or not.
Therefore, it is more convenient to have a separate function (bound to
KEY_SPACE as in KPV's filemanager, K3Chess and in most other readers)
that does the full screen refresh.
2012-10-08 10:39:40 +01:00
Tigran Aivazian
aeb8bcf729 No need for page redraw in UniReader:addBookmark()
The call to self:redrawCurrentPage() in UniReader:addBookmark() comes
from the days when this function was causing a "Retrieving TOC..."
message via getTocTitleByPage()->fillToc() codepath. Now that message is
gone so we should kill the redraw as well.
2012-10-08 08:50:09 +01:00
Tigran Aivazian
33768b50a7 Explain Shift-R function in the help better
1. Explain the purpose of `Shift-R` function better in the help screen.
2. Show the range of valid values when the user presses `Shift-R`.
2012-10-08 08:31:34 +01:00
Dobrica Pavlinusic
fea2eea7a4 create shortcuts just for visible links 2012-10-07 12:35:49 +02:00
Dobrica Pavlinusic
6ab06cb584 reset screen offsets after pre-cache
Code which tried to restore offsets didn't do anything since old and
self point to same values
2012-10-07 12:35:23 +02:00
Dobrica Pavlinušić
1ced4ceb17 Merge pull request #376 from tigran123/nupogodi-inform
Switch to new InfoMessage API (from NuPogodi).
2012-10-06 11:33:37 -07:00
Tigran Aivazian
e541a378a2 Flush the time/battery info to the right for PDF
Do the same for PDF that I have done for DjVu, to be consistent.
2012-10-06 15:10:46 +01:00
NuPogodi
81cb3a1f25 Switch unireader.lua to new InfoMessage:inform() 2012-10-05 11:10:26 +01:00
Tigran Aivazian
77273a84a7 Decrease the step for gamma to 10%.
The current step of 25% forward and 20% backward is too big and does not
let us come close enough to the design value of 2.2 for most djvu files.
With 10% step we can get much closer.
2012-10-04 22:33:43 +01:00
Tigran Aivazian
a2970bafad Change print() to Debug for "Unknown direction!" message. 2012-10-04 11:54:37 +01:00
Tigran Aivazian
f2443a7d33 Kill "Retrieving TOC..." message and simplify code.
After some consideration I believe that it is best to get rid of
"Retrieving TOC..." message altogether on the following grounds:
1. The code in unireader.lua/crereader.lua that has to deal with this
specifically can be removed.
2. The fillToc() is a data manipulation function and ought not to touch
graphical state.
3. The files for which retrieving TOC can take a long time are
_exceptionally_ rare (only two are known to me --- both are my own
editions with detailed morphological tags which require massive
hierarchical TOC for quick navigation)
4. Users are going to be confused when they press Menu for the first
time and see "Retrieving TOC..." staying on the screen until they press
Menu again.
2012-10-03 23:05:53 +01:00
Tigran Aivazian
fe20d8a899 Tiny optimization of UniReader:goto()
Save the value of self.doc:getPages() in a local variable instead of
calling it twice (the number of pages in a document is not going to
change).
2012-10-03 09:24:30 +01:00
Qingping Hou
f37d6a647f Merge branch 'master' of github.com:hwhw/kindlepdfviewer 2012-10-02 20:43:08 -04:00
Qingping Hou
d2a1033baf set full screen refresh on every page turn 2012-10-02 20:17:36 -04:00
Dobrica Pavlinusic
ccff5c899d show reneding page_indicator only in debug mode
This addresses performance degradation because of two e-ink refreshes
introduced by this feature #349
2012-10-03 00:16:45 +02:00
Dobrica Pavlinusic
6325183dc3 Revert "don't preCache in two column mode"
This reverts commit 4d187aad4e.
2012-10-02 23:22:06 +02:00
Dobrica Pavlinusic
2fc0cb2ddd reset last_globalzoom_mode on setglobalzoom_mode #346 2012-10-01 15:50:15 +02:00
{Qingping,Dave} Hou
69e43d1c4d Merge pull request #343 from dpavlin/preCache
don't preCache in two column mode
2012-09-30 13:26:42 -07:00
Tigran Aivazian
72f669ff3c Don't allow floating point values for rcountmax
This is a better version of the previous commit, which:
a) makes the code more readable
b) disallows rcountmax values like "6.05", i.e. restricts to integers
only.
2012-09-30 18:28:10 +01:00
Tigran Aivazian
79c1dd44ca Restrict the values of rcountmax to the range 0-10
Currently the user can enter any value like -10 and it is accepted and
saved in the settings file(s).
2012-09-30 16:06:55 +01:00
Dobrica Pavlinusic
4d187aad4e don't preCache in two column mode
This also cleanups code to make it easier to follow chaning logic
a bit to generate useful Debug messages
2012-09-30 16:18:16 +02:00
Dobrica Pavlinusic
12e9930975 ZOOM_FIT_TO_CONTENT_WIDTH_PAN pan centers page
When we start panning up in fit to width mode, we shouldn't
center page vertically on screen.
2012-09-30 00:48:06 +02:00
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
Dobrica Pavlinusic
acc61e7c07 fix crash on documents without TOC
Showing TOC on documents without one results in following error:

lua config error: ./unireader.lua:1742: attempt to get length of a nil value
2012-09-09 12:19:59 +02:00
Tigran Aivazian
27340db68b cleanup: get rid of the variable that is no longer needed. 2012-09-09 01:00:43 +01:00
Tigran Aivazian
44df8027f7 Fix the function cleanUpTocTitle() to return a single string, so that
it can be passed as a second argument to table.insert().
2012-09-08 23:53:28 +01:00
Tigran Aivazian
e2a3f1de64 Multi-level TOC support, see issue #235 on github. 2012-09-08 23:52:04 +01:00
NuPogodi
d58fa93285 Next tigran's requests
1. Finally, removed infomessage about redrawing page in new zoom mode
2. Prevented potentially wrong user's input of non-integer values for page numbers in the 'go to page' input box
3. Removed duplicated code to make screenshot; already included in commands.lua
2012-09-06 19:49:56 +03:00
NuPogodi
676a4610cf Following requests...
1. Replace hotkeys Alt+<> & Shift+<> (houpq's request)
2. Restrict maximum X/Y-panning steps by G_width/G_height, respectively.
3. Remove warning out about redrawing in new zoom mode (tigran's request)
2012-09-05 20:54:49 +03:00
NuPogodi
1f89704b90 storing rcountmax; user-configurable zoom step & pan steps, etc
1. In order to close issue #59, I've introduced user-configurable values for panning steps - for X- & Y-axis, separately. Now panning is called by pressing fiveway without mod_keys. When one presses Shift+FW, he/she changes panning steps in the following way - Shift-Left/Right = decrease / increase X-panning step (divide or multiply on factor 2), Shift-Up/Down = increase / decrease Y-panning step. The lowest value for panning steps is set 1. Both parameters, shift_x & shift_y, are saved to local settings (i.e. history file).

2. Manual zoom step was also made user-configurable. So, instead of two old zooming functions (with fixed 10% and 20%-steps), I made one function to zoom (Shift+<>), while the other (Alt+<>) changes the zoom step downto minimum 1%. 

3. Fresh introduced function to change parameter rcountmax was added by storing rcountmax to both setting files - global settings & local ones (i.e. history file) - so that the rcountmax-priority (from low to high) is the following: default rcountmax=5 < its value in global settings < rcountmax stored for each concrete document.

3. Dirty, the extention-based hack to avoid reading not crengine-related parameters stored in history files. TODO: one has to finally introduce loadSpecialSettings() & readSpecialSettings() for PDFReader & DJVUReader and to store therein the reader-specific parameters (like globalgamma, bbox, globalzoom, globalzoom_mode; render_mode = for djvu-files only, etc.)

4. Some lua-code cosmetics (to make code more readable); for example: "self.pan_margin = settings:readSetting("pan_margin") or self.pan_margin" instead of 
"local pan_margin = settings:readSetting("pan_margin")
if pan_margin then
		self.pan_margin = pan_margin
	end"

5. Fix for the today's tigran123 fix: issue #246 (details are included). Added InfoMessage:show() to inform most impatient users that the reader tries to redraw new zoo mode.

6. The fontface for the reading info (called by 'Menu') is restored to be in accordance with original intentions and with the same fontface in crereader.lua - namely, Font:getFace("rifont", 20)

7. Moved the exit hotkeys (Alt+Back & Home) to the end of hotkey list.
2012-09-03 22:23:06 +03:00
Tigran Aivazian
b70865286c Remove Debug() --- I keep forgetting to remove them before commit :) 2012-09-03 17:40:13 +01:00
Tigran Aivazian
df18cae233 Bugfix: In zoom mode menu selection we need to redraw the screen even if the selected mode is the same as the current one,
otherwise it gives an impression that the program hangs (unless the user presses Next page or does anything else that causes
screen refresh, e.g. manual screen refresh).
2012-09-03 17:34:48 +01:00
Tigran Aivazian
3b1da21cfd Merge remote branch 'upstream/master'
Conflicts:
	djvureader.lua
	unireader.lua
2012-09-01 16:36:52 +01:00
NuPogodi
4bb8ef7f45 unireader: refresh frequency; zoommode-menu, etc.
1. Restored default value rcountmax=5; the function to make manual full screen refresh is no more silent; at first, it asks user to set a number of partial refreshes (rcountmax) and then performs full refresh. TODO: saving parameter 'rcountmax' in the global reader settings (or separately, for each document). 
2. The hotkey 'R' and the respective function toggle_render_mode() for djvu-documents are moved to djvureader.
3. Added hotkey 'M' and the respective function that calls menu with zoom-modes. Probably, one needs to remove unappropriate items, like "Fit zoom to page" and, less probably, the hotkeys (A, S, D, F and ^A, ^S, ^D, ^F) to set zoom-mode directly.
2012-09-01 13:39:14 +03:00
Tigran Aivazian
711cee787e Merge remote branch 'upstream/master' 2012-09-01 00:17:25 +01:00
Tigran Aivazian
60b87b4b95 Update the name of the function cycle_render_mode() -> select_render_mode() in the comment. 2012-08-30 16:11:37 +01:00
Qingping Hou
461c135c5d patch for #234 by Nupogoddi
refresh screen if no input from search highlight.

close #234
2012-08-30 12:44:13 +08:00
Tigran Aivazian
2e0876a4ae Merge remote branch 'upstream/master' 2012-08-29 23:13:13 +01:00
NuPogodi
25edd3101f TOC position on current place in the tree #235 2012-08-29 22:47:16 +02:00
Tigran Aivazian
3fd33805c5 Save/restore the setting of render_mode. 2012-08-29 11:37:38 +01:00
Dobrica Pavlinusic
d577ed9b00 show search results as inverted block 2012-08-29 12:26:25 +02:00
Tigran Aivazian
42491bfefd Merge remote branch 'upstream/master' 2012-08-29 10:17:21 +01:00
Tigran Aivazian
824e9d139e Move render_mode support out of unireader.lua into djvureader.lua as it is djvu-specific.
Also added support for all other rendering modes handled by djvulibre.
Also made the message print a human-readable description of the mode rather than just the number.
2012-08-28 23:48:56 +01:00
Dobrica Pavlinusic
f0476ab481 hide inputbox after entry 2012-08-28 22:14:04 +02:00
Tigran Aivazian
5c9a8fbec6 DjVu enhancements: a) add support for switching the rendering mode between B&W (default, 1) and COLOUR (0) values. b) handle the gamma values correctly. 2012-08-27 15:33:32 +01:00
Tigran Aivazian
0a4e11d4af In the status line shorten "Memory:" -> "M:" and "Section:" -> "Sec:" and also show the battery level. 2012-08-27 15:27:51 +01:00
Tigran Aivazian
424a6a895b Refresh the screen completely on every page, not every 5th. 2012-08-27 15:25:29 +01:00
Dobrica Pavlinusic
2dfee0a2fb remember last search so it's incremental now 2012-08-26 16:19:51 +02:00
Dobrica Pavlinusic
d827301639 search through whole document 2012-08-26 16:03:55 +02:00
Dobrica Pavlinusic
eb38dfedd4 show search highlight until next page refresh 2012-08-26 15:16:08 +02:00
Dobrica Pavlinusic
e8ab2381c3 extract code into new function UniReader:searchHighLight(search) 2012-08-26 14:48:51 +02:00
Dobrica Pavlinusic
ed59adecea naive implementation of search highlight issue #75 2012-08-26 14:28:34 +02:00
Qingping Hou
2dfbf3177f revert shift+page turn bindings
previously, they are overwritten by mistakes
2012-06-06 20:43:11 +08:00
Qingping Hou
dec86586e8 bug fix in CREReader:prevBookMarkedPage
handle two more corner situations
2012-06-06 20:16:40 +08:00
Qingping Hou
d0e7f2240d add bookmark navigation function to crereader 2012-06-06 16:21:25 +08:00
Qingping Hou
763e2223d2 sort bookmark table after addition 2012-06-06 15:35:45 +08:00
Qingping Hou
b76be2b87d add bookmark navigation functions in unireader.lua 2012-06-06 15:30:16 +08:00
HW
0d12ff70cd rename debug() to Debug() to stop clashing with the debug submodule from Lua 2012-06-04 00:49:23 +02:00
HW
ab400b97ac faster refresh path for the cursor 2012-05-28 19:45:08 +02:00
Qingping Hou
d2d8ad84ed handle djvu getPageText API changes. 2012-05-23 13:04:05 +08:00
{Qingping,Dave} Hou
763b97744b Merge pull request #170 from dpavlin/NuPogodi
NuPogodi patch 19.05.2012
2012-05-20 03:39:41 -07:00
Dobrica Pavlinusic
a08c35a52c added Screen:screenshot() 2012-05-19 23:04:40 +02:00
Dobrica Pavlinusic
28161ae3d0 added Registering fonts dialog on startup
This operation can take some time on device
2012-05-18 23:28:05 +02:00
Dobrica Pavlinusic
54657bb74c use hpkfont for ruler, increase size and fix aligment #35
This is maximum font size which allows vertical ruler to have
spacing between vertical letters.
2012-05-02 16:03:04 +02:00
Dobrica Pavlinusic
bca64dd4ef use showInfoMsgWithDelay for new bbox and redraw page #153 2012-05-02 15:50:19 +02:00
Qingping Hou
c275862ffe fix bug in jump_history
record current page when jump_history.cur points to
empty head.
2012-04-30 20:33:10 +08:00
Qingping Hou
c818d7e90e screenshot shorcut patch by NuPogodi@mobileread 2012-04-30 17:03:45 +08:00
Dobrica Pavlinusic
55cdb26823 force next full refresh 2012-04-29 19:36:23 +02:00
Dobrica Pavlinusic
de12c6aac0 second try to implement rouler idea by y @eLiNK2gl in #35 2012-04-29 19:15:53 +02:00
Dobrica Pavlinusic
90b8860ed5 always use partial refresh 2012-04-29 15:56:56 +02:00
Dobrica Pavlinusic
31108d536c manually select page bounding box
I hope we can finally close #35 with this.
2012-04-29 14:31:45 +02:00
Dobrica Pavlinusic
761cd68964 highlight mode also benefits from key repeat 2012-04-27 23:45:07 +02:00
Dobrica Pavlinusic
9bdf4bf4c7 prevent full screen refresh if key is repeating #142 2012-04-27 20:38:29 +02:00
Dobrica Pavlinusic
6a479aee80 support pressed or repeating keys 2012-04-27 20:37:07 +02:00
Dobrica Pavlinusic
44be823115 use getRectInScreen 2012-04-26 22:27:00 +02:00
Dobrica Pavlinusic
37289fb18d invert page bbox on X #35 2012-04-26 22:16:36 +02:00
Dobrica Pavlinusic
5492025a38 pan_margin is really in screen pixels
I don't know what I was thinking when implementing this code. If I
modify it with global zoom, it keeps moving, as we zoom in on multiple
key presses
2012-04-26 14:20:15 +02:00
Qingping Hou
a99a0a9489 fix bug in highlight engine
only goto next view when the word is in next view.
same for previous view
2012-04-21 12:14:35 +08:00
Qingping Hou
1a2be0453d fix bug in highlight engine
handle left end of line in highlight delete.
2012-04-21 09:46:30 +08:00
Qingping Hou
8d74649642 adjust wording 2012-04-20 18:29:08 +08:00
Qingping Hou
c350f5af87 add: hint message for inputbox
use hint message to indicate current page
in goto page feature.
2012-04-20 14:04:37 +08:00
Qingping Hou
eaafcafb9e add fix KEY_LPG{BCK,FWD} listening for unireader 2012-04-20 10:16:14 +08:00
Qingping Hou
b03d589ae9 add preLoadSettings methods for cache_document_size setting
cache_document_size should be configurable for
every docuemnt and it must be loaded before
document open, so I added the preLoadSettings method
2012-04-19 14:39:50 +08:00