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

315 Commits

Author SHA1 Message Date
Tigran Aivazian
4ff751d2f1 Remove unneeded page redraw from showToc()
This is a leftover from the days of "Retrieving TOC..." message, so it
is no longer needed.
2012-10-12 23:51:52 +01:00
Tigran Aivazian
dc52f81ec6 Update the message in the help screen for Shift-L 2012-10-12 23:29:49 +01:00
Tigran Aivazian
a354d96ab8 Two bugfixes and a cleanup
1. When loading boolean settings we have to explicitly check for the
return of nil from the self.settings:readSetting() function and only
modify the default if the return value is NOT nil.

2. When closing the document we have to reset the settings to defaults,
otherwise their values are re-used on the next open.

3. The messages "Links on page ON/OFF" changed to
"Link underlines ON/OFF" because the old version gave two false
impressions: a) as if the action is pertinent only to the current page
(but in fact it is global for the entire document) and b) that we are
disabling the links whereas we are only disabling the show of underlines
under the links. The new message addresses both issues.
2012-10-12 19:39:22 +01:00
{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