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

878 Commits

Author SHA1 Message Date
Dobrica Pavlinušić
a52ce4d22a Merge pull request #247 from NuPogodi/master
unireader: storing rcountmax; user-configurable zoom step & pan steps, etc
2012-09-04 06:28:31 -07: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
{Qingping,Dave} Hou
f85614f1c7 Merge pull request #246 from tigran123/master
Bugfix: screen refresh needed on exit from zoom mode menu.
2012-09-03 08:51:42 -07: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
{Qingping,Dave} Hou
c9dcf5bdd2 Merge pull request #244 from tigran123/master
Minor optimization of DjVu drawPage() and set dither bits to 4 to match Kindle's screen.
2012-09-02 10:03:50 -07:00
Tigran Aivazian
af37e9f14d Comment out the setting of dithering bits because djvulibre ignores anything less than 8 bits anyway. 2012-09-02 18:57:37 +01:00
Tigran Aivazian
524c8209c0 Improve customupdate target to only include the _real_ LUA source files, not
the garbage settings.*.lua or any other small test/experimental *.lua files
that happen to be in the current directory.
2012-09-02 18:43:07 +01:00
Tigran Aivazian
95be71c1e1 Small optimization in djvu.c:drawPage() --- there is no need to create and destroy
djvu pixel format on each redraw of the page as this can be done once on open and close
of the document. Also, set dither bits to 4 to help djvulibre choose the most
optimal dithering algorithm for the Kindle. Also, make coding style of "if(" -> "if ("
consistent (both instances were used, but "if (" was more frequent).
2012-09-02 18:22:15 +01:00
{Qingping,Dave} Hou
1e45c06689 Merge pull request #243 from tigran123/master
Bugfix: moving files to/from clipboard works now.
2012-09-02 07:54:18 -07:00
Tigran Aivazian
b96f4f509f Remove the Debug() call I added when debugging the previous issue. 2012-09-02 15:45:29 +01:00
Tigran Aivazian
6f1dea294c Merge remote branch 'upstream/master' 2012-09-02 15:39:34 +01:00
Tigran Aivazian
2d4189fc84 Bugfix: moving files to/from clipboard works now. 2012-09-02 15:38:25 +01:00
Dobrica Pavlinušić
a56e49c3f3 Merge pull request #240 from tigran123/master
DjVu rendering mode and other changes.
2012-09-01 16:00:09 -07:00
Tigran Aivazian
b2e0ecb7b0 Add description of MASK ONLY djvu page rendering mode. 2012-09-01 22:21:29 +01:00
Tigran Aivazian
3b1da21cfd Merge remote branch 'upstream/master'
Conflicts:
	djvureader.lua
	unireader.lua
2012-09-01 16:36:52 +01:00
{Qingping,Dave} Hou
45d9b10aa6 Merge pull request #239 from NuPogodi/master
Restored: partial screen refresh; Moved: djvu render mode to djvureader; Added: menu with zoom-modes
2012-09-01 07:08:35 -07: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
NuPogodi
c9e20704a4 djvureader: moved render-mode functions
Since parameter 'render_mode' is related to djvu-documents only, the hotkey 'R' and the respective function to toggle 'render_mode' are moved from unireader to djvureader.
2012-09-01 13:12:32 +03:00
NuPogodi
a2f7f62a3d crereader: remove not crengine-related 'M'-hotkey
Since I've added new unireader-hotkey that calls menu with zoom-modes, one has to remove it from crereader.lua. Done...
2012-09-01 13:01:17 +03:00
Tigran Aivazian
10a23e81d6 Merge remote branch 'upstream/master' 2012-09-01 10:28:51 +01:00
{Qingping,Dave} Hou
ee83b6e043 Merge pull request #238 from NuPogodi/master
crereader
2012-08-31 17:15:26 -07:00
Tigran Aivazian
711cee787e Merge remote branch 'upstream/master' 2012-09-01 00:17:25 +01:00
NuPogodi
4d6b03052a crereader: some corrections
1. Improved the method to restore position in document after rescaling font face, size, weight, interline spacing,  etc.
2. Fixed rotation functions inherited from unireader.lua
3. Removed hotkey for the function of manual cropping inherited from unireader.lua; reason: not crengine-related
4. Added fast navigation functions via Shift+fiveway: jump to previous / next TOC-entry; scroll 10 pages backwards / forward
2012-08-31 20:41:36 +03: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
Tigran Aivazian
9a22a022bf Tidy up the help text on the 'R' command. 2012-08-30 13:38:18 +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
NuPogodi
20fae9369e Update rendertext.lua
Minor modification in function renderUtf8Multiline(...) to solve Issue #214
2012-08-29 15:42:20 +02:00
Tigran Aivazian
c6a1d22bc9 Redraw the page even if the user did not select any rendering mode, otherwise nothing is displayed (except menu). 2012-08-29 12:09:41 +01:00
Tigran Aivazian
b0b0b85ca1 Re-implement the interface for setting DjVu page rendering mode as a menu.
Thanks to NuPogodi for showing how to do this.
2012-08-29 11:39:17 +01: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
32333ca1d6 Make the function cycle_render_mode() slightly more readable. 2012-08-29 10:48:33 +01:00
Tigran Aivazian
7000f349c0 Allow renaming the whole file, including "extension". 2012-08-29 10:33:42 +01:00
Tigran Aivazian
42491bfefd Merge remote branch 'upstream/master' 2012-08-29 10:17:21 +01:00
Tigran Aivazian
2d5a936480 Remove the local variable render_mode from drawPage() (although it would be optimized away by gcc anyway). 2012-08-29 10:02:31 +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
989016ece5 disable DEBUG_CRENGINE 2012-08-28 23:15:34 +02:00
Dobrica Pavlinušić
cd3f72136e Merge pull request #231 from dpavlin/cre-search
coolreader search highlight
2012-08-28 14:13:53 -07:00
NuPogodi
bfe8a5d84f added calculator to filechooser
closes #232
2012-08-28 23:09:28 +02:00
Dobrica Pavlinušić
ebe6b87587 Merge pull request #233 from hwhw/nupogodi-inputbox
Nupogodi inputbox
2012-08-28 14:03:43 -07:00
NuPogodi
282d8e693e improvements to rename if file browser
closes #219
2012-08-28 23:00:18 +02:00
NuPogodi
63e1c4b66c a lot of inputbox improvements
closes #194, closes #218

1. Lowercase layout is default
2. Uppercase chars by pressing Shift+Key; it will probably require us to
   remap some old MOD_SHIFT-commands to MOD_ALT (not the upper raw that is
   responsible for digits: Alt-Q = 1, etc.)
3. New 'documentation' functions
   - usual helppage with active hotkeys (Alt+H)
   - list of available math functions (Alt+M, active in the calculator
     mode)
4. Added two small functions to move cursor to the first/last position
   in inputbox (Shift+FW-left/FW-right)
5. Some minor rearrangement for layouts (mostly for convenient work with
   calculator)
6. Keeping initial "d_text" in InputBox:input(... d_text, is_hint) when
   is_hint is not true (say, for minor changing of long filenames #219, etc.)
   or incremental search.

Added: calculator with a proper documentation of available math
functions
2012-08-28 22:59:54 +02:00
NuPogodi
3f410bdb6b To allow arbitrary header title 2012-08-28 22:28:29 +02:00
Dobrica Pavlinusic
bc0a911e7e showInfoMsgWithDelay with number of results 2012-08-28 22:14:57 +02:00
Dobrica Pavlinusic
f0476ab481 hide inputbox after entry 2012-08-28 22:14:04 +02:00
Dobrica Pavlinusic
7d10a636e7 correctly return first search position and refresh screen 2012-08-28 21:56:46 +02:00
Dobrica Pavlinusic
adf0b42e5b coolreader search highlight
This is rough port of Android code, but seems to work
2012-08-28 20:56:05 +02:00