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

1254 Commits

Author SHA1 Message Date
Tigran Aivazian
da3e336de5 Page redraw when pressing Alt-M and I in readers 2012-10-09 15:27:25 +01:00
Dobrica Pavlinušić
495a24b972 Merge pull request #398 from tigran123/showzoom
Show current zoom value when changing it.
2012-10-09 04:19:19 -07:00
Dobrica Pavlinušić
224327406c Merge pull request #399 from tigran123/djvu-zoom
Show zoom factor in DjVu info.
2012-10-09 04:18:38 -07:00
Dobrica Pavlinušić
7d5b2e6962 Merge pull request #400 from tigran123/djvu-memset
Optimize DjVu drawPage() function
2012-10-09 04:18:05 -07:00
Tigran Aivazian
4a727c8595 Optimize DjVu drawPage() function
We only need to fill the image buffer with white colour if DjVu page
rendering function did not fill it in with page data.
2012-10-09 10:23:29 +01:00
Tigran Aivazian
30415e8e3b Show zoom factor in DjVu info.
It is useful to know which zoom factor the page is shown at, right after
showing the physical dimensions of the page.
2012-10-09 09:41:18 +01:00
Tigran Aivazian
62b2261555 Show current zoom value when changing it. 2012-10-09 09:35:15 +01:00
Dobrica Pavlinušić
08ef1e3666 Merge pull request #396 from tigran123/djvu-cleanup
Cleanup of getUsedBBox() function.
2012-10-08 09:02:21 -07:00
Tigran Aivazian
7177f71c55 Cleanup of getUsedBBox() function.
The function getUsedBBox() does not need to perform any operations on
the DjvuPage structure, so there is no need to obtain it from Lua.
2012-10-08 16:41:30 +01:00
Dobrica Pavlinušić
fe77be4830 Merge pull request #395 from tigran123/dim-overlap
Add dim_overlap configurable
2012-10-08 07:08:11 -07:00
Tigran Aivazian
0de624a7ea Rename dim_overlap -> show_overlap_enable
The new name is more intuitive.
2012-10-08 14:59:32 +01:00
Tigran Aivazian
3dd2fba241 Merge branch 'master' into dim-overlap 2012-10-08 14:55:15 +01:00
Dobrica Pavlinušić
436d738b43 Merge pull request #394 from tigran123/dirinfo
Bugfix: count books like BOOK.PDF and BOOK.DJVU
2012-10-08 06:43:13 -07: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
Dobrica Pavlinušić
621b787a85 Merge pull request #392 from tigran123/refresh-help
Explain Shift-R function in the help better
2012-10-08 04:07:04 -07:00
Tigran Aivazian
c115127e1c Bugfix: count books like BOOK.PDF and BOOK.DJVU
In the function FileInfo:getFolderContent() we need to lowercase the
extension before deciding if it is a book or not --- otherwise files
like BOOK.PDF and BOOK.DJVU are not counted as books.
2012-10-08 12:04:52 +01: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 Pavlinušić
5ce6bf87ca Merge pull request #386 from tigran123/rendertext-part2
Fix the kerning check in renderUtf8TextWidth()
2012-10-07 08:52:54 -07:00
Tigran Aivazian
cb25029ddd Fix the kerning check in renderUtf8TextWidth()
This is a completion of my fixes that went into PR \#383.
In the function renderUtf8TextWidth() the check for kerning was
meaningless (always true).
2012-10-07 16:00:41 +01:00
Dobrica Pavlinušić
36486d0697 Merge pull request #383 from tigran123/rendertext
Fixes to text rendering functions and their callers.
2012-10-07 07:28:31 -07:00
Dobrica Pavlinušić
239c3bbcbc Merge pull request #384 from tigran123/show-version
Show the program version in the Help header.
2012-10-07 07:27:13 -07:00
Tigran Aivazian
7fe288ace3 No need for the local variable 'title' 2012-10-07 15:20:31 +01:00
Tigran Aivazian
e9913dce40 Generate git-rev file at compile time.
The file git-rev containing the program's version should be generated at
kpdfview compile time rather than package generation time.
2012-10-07 15:05:00 +01:00
Dobrica Pavlinušić
c1827b1d9a Merge pull request #381 from tigran123/selectmenu-nokerning
Don't use kerning for monospaced fonts.
2012-10-07 06:42:17 -07:00
Tigran Aivazian
ba0e4460d7 Merge branch 'master' into show-version 2012-10-07 14:32:09 +01:00
Tigran Aivazian
cf557bdaf8 Merge pull request #372 from dpavlin/screen_offset
Screen offset fixes
2012-10-07 06:24:59 -07:00
Tigran Aivazian
87712cf0e4 Show the program version in the Help header.
1. On startup read the file git-rev if exists and initialize a new global
G_program_version.
2. In filechooser's help page's header show the version.
This helps to easily identify what version the user is running without
asking him to cat git-rev file manually.
2012-10-07 12:59:37 +01:00
Tigran Aivazian
c7b4cf71f8 Fix the kerning logic in text size/rendering.
1. Fix the functions sizeUtf8Text(), renderUtf8Text() and
renderUtf8TextWidth() to have a meaningful test whether to kern or not
(the current code is meaningless as it contains the `else` clause that is never
executed).
2. Whitespace changes to filechooser.lua
2012-10-07 12:28:22 +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 Pavlinusic
cceae8ad0a add negative x,y checking in dimRect 2012-10-07 12:34:57 +02:00
Dobrica Pavlinusic
d6bbf5d1ef paintRect should support negative x and y
without this page, highlights which land outside of page in negative
direction will core-dump reader
2012-10-07 12:34:43 +02:00
Tigran Aivazian
379cba7b68 Pass the boolean kerning to renderUtf8Text()
The last argument of renderUtf8Text() accepts only boolean values of
`kerning`.
2012-10-07 11:27:55 +01:00
Tigran Aivazian
ea92f8c1fc Don't use kerning for monospaced fonts.
If you happened to have a word like "HISTORY" in the book's TOC you will know
how ugly it looks when kerning is enabled. Since we use monospaced font
(by default) for selectmenu, it makes sense to disable kerning for the
actual items (but leave it on for shortcuts and "..." etc).
2012-10-06 20:46:19 +01: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
{Qingping,Dave} Hou
d916c55a87 Merge pull request #380 from tigran123/master
TTS in EMU and PDF/DjVu info cleanup.
2012-10-06 07:47:17 -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
Tigran Aivazian
ca5be5c0e6 Merge branch 'djvu-info' 2012-10-06 15:07:09 +01:00
Tigran Aivazian
4945994516 Flush the date/time and battery info to the right.
Because it looks nicer that way.
2012-10-06 15:00:02 +01:00
Tigran Aivazian
1dccc29c7d Show the current rendering mode in DjVu info
Although the current rendering mode can also be ascertained by pressing
"R" and noting the current position in the menu, it is convenient to
show it alongside the page type in the Menu status info.
2012-10-06 14:43:21 +01:00
Tigran Aivazian
5eeda016a9 Mention patch in the pre-requisites for building.
On FC17 patch(1) command is not installed by default.
2012-10-06 13:17:21 +01:00
Tigran Aivazian
683ec7570c Enable TTS for the emulator.
On the PC in the EMU mode we can run espeak command which has the same interface as say
on Kindle.
2012-10-06 10:10:03 +01:00
{Qingping,Dave} Hou
d1d6cdb056 Merge pull request #379 from tigran123/master
Use only Back (not Home) for exiting from Help screens
2012-10-05 14:03:01 -07:00
Tigran Aivazian
a5032046d3 Don't use Home to exit Help page.
It is a bad idea to use too many keys for the same function and also do
this non-uniformly (i.e. not in all contexts). The info at the bottom of
Help screen says "Back to close this page", so only KEY_BACK (but not
KEY_HOME) should serve this purpose. And if the user pressed Home twice
then the whole application would exit, so using Home here is a bad idea.
2012-10-05 17:36:43 +01:00
Dobrica Pavlinušić
4716321b0a Merge pull request #377 from tigran123/nupogodi-filesearcher
Improvements to filesearcher from NuPogodi
2012-10-05 06:01:43 -07:00
NuPogodi
5a493c141f Improvements to filesearcher from NuPogodi
1. Initialize self.commands only once
2. Corrections to hotkeys: added fast jumps to item at position 0%,
10%, ... 100% by Alt+Q, W, ... P
3. Added fast jump to page entered via inputbox (by G)
4. Cleanup of function descriptions and to hotkeys.
5. Added a function deleteFoundFile(full_filename) used by KEY_DEL
handler.
2012-10-05 11:17:18 +01:00