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

1201 Commits

Author SHA1 Message Date
NuPogodi
10592c68b0 Fixed search with empty pattern (from NuPogodi). 2012-10-04 23:22:08 +01:00
{Qingping,Dave} Hou
17acaa27b5 Merge pull request #374 from tigran123/djvu-menu-info
Display DjVu info in the status line.
2012-10-04 15:05:26 -07: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
057c461e7d Display DjVu info in the status line.
The DjVu info shown in the status line includes:
1. Physical page dimensions.
2. Current value of gamma and (in square brackets) the value of the
display for which the page was designed.
3. Page resolution (in dpi).
4. Page type.
For the end-user probably the most useful bit is the page type as it
helps him decide which rendering mode to choose for this page (and also
explains why he can't see anything on the page --- e.g. when rendering
some COMPOUND or PHOTO pages in B&W mode). For the developer the
physical page dimensions are also interesting as they allow to estimate
the amount of time needed for page decoding and cache efficiency.
2012-10-04 22:08:52 +01:00
Tigran Aivazian
c7b82f938a First stage of improving the DjVu status info. 2012-10-04 21:08:39 +01:00
Dobrica Pavlinušić
20e4b55965 Merge pull request #371 from tigran123/master
Prevent crash when opening a stale history entry
2012-10-04 12:52:41 -07:00
Tigran Aivazian
723be220ac Tidy up the previous commit.
I didn't realize that the voice message is optional, so the last
argument can be deleted, i.e. in this case the voice message can be the
same as the text one.
2012-10-04 18:37:46 +01:00
Tigran Aivazian
c13a1553f4 Prevent crash when opening stale history entry.
This fixes the issue #370 raised by dracodoc.
When the user removes or renames the book which was previously opened
and tries to open it again via (now stale) history entry we are passing
the filename of a non-existent file to the format-specific
:openDocument() method and the behaviour depends on the format. For PDF
and DjVu files it is okay --- they just return an error, but for the
crengine files (ebooks) we get a coredump.
Anyway, the proper solution is to not attempt to open a non-existent
file but give a more meaningful message (than, for example:
"ddjvu: **Unrecognized DjVu Me" for DjVu case) which informs the user
that the history entry is stale. If he has valuable data in it (such as
highlights, etc) he can save them, otherwise he can delete the history
entry there and then.
2012-10-04 18:21:40 +01:00
Dobrica Pavlinušić
48fba48206 Merge pull request #369 from tigran123/master
Small typo that wasted millions of instructions...
2012-10-04 04:53:40 -07:00
Tigran Aivazian
a2970bafad Change print() to Debug for "Unknown direction!" message. 2012-10-04 11:54:37 +01:00
Tigran Aivazian
8f68227c3c Small typo that wasted millions of instructions.
Now that #define CRENGINE_DEBUG is handled correctly, all those pesky
messages from crengine are gone and so the performance of crereader
should be much better --- remember that under some circumstances
crengine generates literally THOUSANDS of debug messages per second
(e.g. when complaining about corrupt TOC nodes and there are _plenty_ of
fb2 files out there which have an invalid structure).
2012-10-04 08:26:08 +01:00
{Qingping,Dave} Hou
d3c6ac816b Merge pull request #368 from tigran123/master
Kill "Retrieving TOC..." message and simplify code.
2012-10-03 18:27:58 -07: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
{Qingping,Dave} Hou
f011bdc358 Merge pull request #366 from tigran123/master
Kill getDiskSizeInfo() function and make only Back (not Home) return from Search.
2012-10-03 12:34:00 -07:00
Tigran Aivazian
d1d955f3a4 Make only Back (not Home) return from Search Results.
It is best to restrict Home to only exit from the application (or
perhaps also for closing the document, though even this is doubtful) and
not use it in any other context, because otherwise pressing Home too
many times may inadvertently exit the application and annoy the user.
It is a bad practice to let user try various keys in different contexts
and hope that one of them may work.
2012-10-03 20:29:34 +01:00
Tigran Aivazian
f3306d5512 Kill getDiskSizeInfo() function.
Instead of making an extra function call, packing return values in key'd
values of a table and then use two table indexing operations, just call
util.df(".") directly from FileInfo:formatDiskSizeInfo() and use its two
return values appropriately.
2012-10-03 19:56:36 +01:00
{Qingping,Dave} Hou
8308ce0218 Merge pull request #363 from NiLuJe/master
Bunch of Makefile fixes
2012-10-03 09:43:20 -07:00
{Qingping,Dave} Hou
6e9b809238 Merge pull request #364 from tigran123/master
Small fixes to "Last Documents" dialog.
2012-10-03 09:33:05 -07:00
Tigran Aivazian
8107d84e9e Cleanup crereader fonts initialization.
Don't try to register the two fonts Dingbats.cff and StandardSymL.cff
with crengine because it will reject them anyway. But we cannot simply
remove these two fonts because they are used internally by mupdf to
emulate "builtin" fonts which are mandated by Adobe PDF specification to
be present in every valid implementation.
2012-10-03 17:30:57 +01:00
Tigran Aivazian
37099d81f1 Fixes to "Last Documents" dialog.
1. Remove ".." entry as unnecessary waste of (rather limited) space.
Pressing KEY_BACK returns the user from this dialog, so there is no need
for the ".." entry.
2. Simplify FileHistory:init() function as it does not really need the
argument --- our history location is fixed and hardcoded.
3. Remove KEY_HOME quit key from history command handlers. Pressing Home
key too many times would cause the application to exit, which is
very annoying.
4. Show the number of items in the header next to "Last Documents".
2012-10-03 16:17:45 +01:00
NiLuJe
fab4b29502 More comments on the whole unaligned access mess on FW 2.x. Don't even
think about setting the alignment trap to a mode that includes warn,
that simply kills the performance because of the storm of faults the
syslog gets...
2012-10-03 16:07:03 +02:00
NiLuJe
9cc3438fd2 Yep, -mno-unaligned-access is definitely needed with a GCC 4.7
ToolChain, the kernel used on FW 2.x is too old to handle unaligned
accesses properly.
2012-10-03 15:57:52 +02:00
NiLuJe
1f2b85e0de It's a spaaaaace! 2012-10-03 15:43:25 +02:00
NiLuJe
aa68e5250a Quote that to avoid potential issues... 2012-10-03 15:42:11 +02:00
NiLuJe
ef94d27084 We don't need you, either, in EMU... 2012-10-03 15:36:05 +02:00
NiLuJe
1606cc195d We don't need those two in EMU ;). 2012-10-03 15:34:59 +02:00
NiLuJe
566d081503 Slightly nicer fix for building mupdf's .host stuff with CFLAGS in the env. 2012-10-03 15:24:06 +02:00
NiLuJe
c38c6dbea4 Add a note about -mno-unaligned-access (check my x-compile.sh script for
more details, I'll revisit this once Linaro 2012.10 comes out).
2012-10-03 15:07:48 +02:00
NiLuJe
2d5c952749 Split the backward compat stuff between CFLAGS/CXXFLAGS 2012-10-03 14:56:14 +02:00
NiLuJe
bd306da170 Don't use the backward compat flags on the host. Move to a dedicated
variable, with a few comments to explain ;).
2012-10-03 14:54:45 +02:00
NiLuJe
c312eaabf1 Add -fno-finite-math-only (after -ffast-math) to the ARM flags to avoid
MG 2012.03 pulling GLIBC_2.15 symbols from libm (because -ffast-math asks
for it).
I didn't see this on my own TC because it's using a much older glibc version (2.9).
2012-10-03 14:50:29 +02:00
NiLuJe
50386743ec revert the whole 'let's use ld' thing. It's useless, and might wreak
havoc on EMU builds picking up system libs instead of the bundled ones.
2012-10-03 14:24:40 +02:00
NiLuJe
29878a0a90 Make sure we're always building luajit statically, so ld doesn't pick a
shared version. Of course that explained the size difference :D.
2012-10-03 14:19:32 +02:00
NiLuJe
a79d29fd17 Fix the luajit clean fix (forgot to quote *_*).
Let ld do its job when linking, don't pass the static libs as object
files (we end up with a smaller native binary).
2012-10-03 13:56:36 +02:00
NiLuJe
f817437660 Mention open_noshell in the README 2012-10-03 13:40:53 +02:00
NiLuJe
36d4b5e22a Make sure we're building for the softfp float ABI, and not in Thumb.
Might fix #359
2012-10-03 13:37:36 +02:00
NiLuJe
bf032e5c6a Honor toplevel settings re: CC/FLAGS when building libdjvu. Define
_GNU_SOURCE to fix build with CS/MG TC. Fixes #341
2012-10-03 13:35:49 +02:00
NiLuJe
392f29f522 Let's do a distclean, actually. Less noise in git status that way. 2012-10-03 13:27:48 +02:00
NiLuJe
d4782d05e8 Don't require a cross-tc for cleanthirdparty (still confuzzled about why
luajit needs CFLAGS for a clean target, but, hey!). Fixes #357
2012-10-03 13:25:15 +02:00
Tigran Aivazian
28e9f06727 Merge pull request #360 from houqp/master
revert commit 9127d1c
2012-10-03 03:25:14 -07:00
{Qingping,Dave} Hou
bfe3c605be Merge pull request #356 from tigran123/master
Various cleanups.
2012-10-03 02:42:09 -07:00
Qingping Hou
269de90598 Merge branch 'master' of github.com:hwhw/kindlepdfviewer 2012-10-03 05:40:50 -04:00
Qingping Hou
14fdb90f58 revert commit 9127d1c9a1
As NiLuJe points out, that line is not needed, clean
stage of the popen Makefile will take care of it.
2012-10-03 05:39:40 -04: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
Tigran Aivazian
35c423328e Fix two crashes on the emulator.
When running on the emulator don't attempt to perform any of the TTS
function as this will crash the application.
2012-10-03 09:09:07 +01:00
Tigran Aivazian
4da5138bbe Merge pull request #353 from houqp/master
set full screen refresh on every page turn
2012-10-03 00:47:28 -07:00
Tigran Aivazian
b5f1ec08d0 Merge pull request #355 from tigran123/master
Mention svn as a dependency.
2012-10-03 00:39:38 -07:00
Tigran Aivazian
da766c09ce Mention dependency on svn as required for popen_noshell.c
When we run make fetchthirdparty it does svn co of popen-noshell
2012-10-03 08:37:06 +01:00
Qingping Hou
3623ad9afb Merge branch 'master' of github.com:hwhw/kindlepdfviewer 2012-10-02 21:39:27 -04:00
{Qingping,Dave} Hou
e5a2ac4344 Merge pull request #354 from NiLuJe/master
Misc kpdf.sh fixes after #348 & #352
2012-10-02 18:39:00 -07:00