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

983 Commits

Author SHA1 Message Date
Tigran Aivazian
1c32a24450 1. Shorten the "No TOC" message to be displayable.
2. Get rid of the calls to self:fillToc() from the places in the code which cannot affect TOC.
I assume the reason for these calls is that they are needed in the original CoolReader application
(because there the TOC displays the virtual "page numbers") and were brought over to our crengine.lua
during the port.
2012-09-10 23:12:09 +01:00
Dobrica Pavlinušić
44d9daf07a Merge pull request #271 from tigran123/master
TOC cleanup in crengine.lua
2012-09-10 14:31:32 -07:00
{Qingping,Dave} Hou
75d286257f Merge pull request #270 from tigran123/master
When renaming a file no need to initialize oldname TWICE.
2012-09-10 09:49:41 -07:00
Tigran Aivazian
253a0829ff No need to initialize oldname = self:FullFileName() twice when renaming a file --- one initialization is enough.
(and, while at it, replaced references to a non-existent word "extention" with the proper English "extension")
2012-09-10 18:17:50 +01:00
Dobrica Pavlinušić
bfc369062e Merge pull request #268 from houqp/master
set crengine cache size in lua code
2012-09-10 08:16:28 -07:00
Qingping Hou
1eb7162796 set crengine cache size in lua code 2012-09-10 21:45:05 +08:00
{Qingping,Dave} Hou
275e94c7a3 Merge pull request #267 from dpavlin/crengine_64Mb_cache
use 64Mb for on disk DOM cache for crengine
2012-09-10 06:26:38 -07:00
Dobrica Pavlinusic
880374f5db use 64Mb for on disk DOM cache for crengine
Previously we had cache size limit of 100 bytes, so crengine would erase
all on-disk cache on each file open as described in #206
2012-09-10 13:42:47 +02:00
{Qingping,Dave} Hou
4cdbcac458 Merge pull request #266 from tigran123/master
Shorten the message about opening the document.
2012-09-09 16:05:54 -07:00
Tigran Aivazian
47556b5562 Shorten the message about opening the document, otherwise it is not displayed at all. 2012-09-10 00:16:06 +01:00
Dobrica Pavlinusic
397d3aa037 Merge branch 'gamma_speedup' 2012-09-09 21:44:09 +02:00
Dobrica Pavlinusic
2332691bb0 replaced showInfoMsgWithDelay with InfoMessage:show in crereader 2012-09-09 21:41:35 +02: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
Dobrica Pavlinušić
b75470365b Merge pull request #263 from tigran123/master
Allow deleting bookmarks as requested in issue #256
2012-09-09 11:56:01 -07: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
{Qingping,Dave} Hou
af53a78291 Merge pull request #260 from tigran123/master
Slight tidy up to the fix for \#257
2012-09-09 06:35:18 -07:00
Tigran Aivazian
2c6dfae807 Shorten various messages --- otherwise they are NOT SHOWN at all.
Also, mark pagedirty in all cases when deleting the file, to cause the screen refresh --
otherwise the message "Press 'Y' to confirm" stays there indefinitely.
2012-09-09 15:08:46 +01: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
{Qingping,Dave} Hou
329132d3df Merge pull request #259 from dpavlin/fileinfo_duplication
fileinfo doesn't reset results
2012-09-09 06:33:48 -07:00
{Qingping,Dave} Hou
7e20d120db Merge pull request #258 from dpavlin/cr_cache
use ldomDocCache::init to cache crengine DOM
2012-09-09 06:32:28 -07:00
Dobrica Pavlinušić
4c5f488151 Merge pull request #257 from dpavlin/master
fix crash on documents without TOC
2012-09-09 04:21:06 -07:00
Dobrica Pavlinusic
d3aa98abb9 fileinfo doesn't reset results
This affects multiple entry into fileinfo which just accumulate
information, eventually scrolling off screen
2012-09-09 13:13:12 +02:00
Dobrica Pavlinusic
3fe518979c use ldomDocCache::init to cache crengine DOM
This should improve performance of crengine #206
2012-09-09 12:58:04 +02: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
{Qingping,Dave} Hou
9c0b59c79e Merge pull request #255 from tigran123/master
Multi-level TOC support.
2012-09-08 17:09:26 -07:00
Qingping Hou
6a1de042f4 initialize fileinfo.commands to nil 2012-09-09 08:08:48 +08: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
Tigran Aivazian
e824fb24da Correct the comment (the existing text was referring to a different file). 2012-09-08 22:21:26 +01:00
{Qingping,Dave} Hou
aa93a8f078 Merge pull request #254 from dpavlin/master
fallback to default fonts when loading reader configuration
2012-09-07 08:38:37 -07:00
Dobrica Pavlinusic
406f3d72da fallback to default fonts when loading reader configuration
Since we are adding and renaming fonts, we need to make sure that
all fonts which reader uses are defined. This allows us to add fonts
and not break when users load old configuration files

close #252
2012-09-07 16:29:52 +02:00
NuPogodi
a5496b83c6 Update helppage.lua
Fixed crash of heplpage 'cause of typo: tfont > tface
2012-09-07 15:36:38 +02:00
Qingping Hou
6c9fb8b023 fix typo in getFace 2012-09-07 12:32:19 +08:00
Qingping Hou
4199ac8e3c add missing ")" 2012-09-07 12:31:55 +08:00
{Qingping,Dave} Hou
f03e198573 Merge pull request #251 from NuPogodi/master
New menu to change font faces; new parameter to handle files; etc
2012-09-06 21:17:55 -07:00
NuPogodi
d1ae0f3999 Enter filemanager modes for beginners & advanced users
1. Added parameter that tells filemanager the way how to manage files. Those who prefer 'safe' method (default) should not select any other mode except for BEGINNERS_MODE in new menu called by Alt+M. Actually, 'safe mode' is our old version (the files are filtered on the extention-basis; one may rename the filenames, but not their extentions). The tigran's corrections de0f40ce9c
are easy to switch on by selecting mode for advanced users who understand potential danger (mostly, crashes of crereader 'cause of improper input files) and accept it.
2. New menu Font:chooseFonts() to change font faces
3. Removed duplicated code of 'make screenshot'
4. The hotkeys (Back & Home) to exit FileChooser are moved down
5. Removed outdated comments
2012-09-06 22:21:36 +03:00
NuPogodi
dddbea89df Restored proper separation of cre-documents
The decision whether ext:getReader(ftype) returns CREReader or nil for documents with improper file extentions now depends on the new parameter FileChooser.filemanager_expert_mode. Improper files are now related to CREReader only for advances users.
2012-09-06 21:45:40 +03:00
NuPogodi
b052e3207c Add global parameter filemanager_expert_mode
In order to switch between safe and advanced way for filechooser to manage files, I've introduced special parameter 'filemanager_expert_mode':
i) 'safe' means that filemanager shows only files with the reader-related extentions; make safe renaming (i.e. the extention remains the same)
ii) 'advanced': all files are available (no filtering); any renaming is allowed;
TODO: to add also 'expert' mode & use it for unstable or dangerous functions
2012-09-06 21:38:54 +03:00
NuPogodi
92545a0cc2 Message font: "cfont" > "infofont"
1. Removed useless parameter self.face
2. Changed font face from "cfont" to "infofont"
2012-09-06 21:25:47 +03:00
NuPogodi
4196d98323 Replaced: font-related 'self' parameters > local
1. Made few (font-related) self parameters to be local > now updating font faces in Font:chooseFonts() properly changes these font faces
3. Removed outdated comments; minor code cleanup: to make it more readable
2012-09-06 21:19:57 +03:00
NuPogodi
8a792d2f31 Replaced: font selection menu (new version), etc
1. New menu Font:chooseFonts() to change font faces
2. Removed duplicate of 'make screenshot'
3. Hotkeys (Back & Home) to exit are moved down, to the end of hotkey list
4. Removed outdated comments & not informative comments
2012-09-06 21:04:20 +03:00
NuPogodi
dc2fcc8654 Replace old 'Font menu'-function by new, improved version
1. Replace old function to change 'cfont' by new, improved version capable to change all font faces.
2. Remove 'make screenshot'; already added in commands.lua
2. Moved exit hotkeys (Back & Home) to the end of the hotkey list
3. Remove some outdated comments and clean a bit the code (just cosmetics to make it more readable)
2012-09-06 20:50:50 +03:00
NuPogodi
5e6a93191a Clear the code from not used parameters
1. Remove a lot of unused self parameters & commands (including 'make screenshot') 
2. Make sure adding commands only once
3. Add function to change font faces for any items enumerated in Fonts.fontmap and modify the code to recalculate the width of left column that depends on the selected font face => lface
4. Remove most of outdated comments
2012-09-06 20:35:25 +03:00
NuPogodi
cfa4afe35a Improved the method to define font face to render menu items
1. Add parameter own_glyph that defines how to render menu items:
default own_glyph = 0,	-- render menu items with default "cfont"
own_glyph = 1 => own glyphs for items like "Droid/DroidSans.ttf"
own_glyph = 2 => own glyphs for Font.fontmap._index like "ffont", "tfont", etc.
Now own font face may be used to render both types of menu items called from Font:chooseFonts() 
2. Delete some outdated comments
2012-09-06 20:24:48 +03:00
NuPogodi
bd0c180c81 Add functions to change font face for all items in Font.fontmap
1. Excluded pgfont from Font.fontmap-items; it was used in helppage.lua to render footer and just duplicated ffont
2. Fixed typo: self.cfont > "cfont" in Font:getFace()
3. 3 small functions to change font face for any member of Font.fontmap
2012-09-06 20:05:57 +03: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