2
0
mirror of https://github.com/koreader/koreader synced 2024-11-13 19:11:25 +00:00
Commit Graph

245 Commits

Author SHA1 Message Date
Paulo Matias
1b1e65edfe Avoid crash if trying to open a non-existent file
which currently might occur by clicking in the history entry of a file which was removed
2014-01-17 16:41:44 -02:00
chrox
92b62c907a refactoring frontlight device to more generic power device 2014-01-04 21:38:07 +08:00
chrox
62e12ddfba import document module on-demand 2013-12-31 13:12:56 +08:00
chrox
1fb4dfab95 add visual indication on document loading
This should implement #265.
2013-12-28 18:21:39 +08:00
chrox
c205503828 remove global variable DEBUG 2013-10-25 20:09:21 +08:00
chrox
f49f64bc15 add missing gettext and Menu module 2013-10-23 22:51:07 +08:00
HW
ef111b99c6 Refactored to use strictly locals 2013-10-18 22:38:07 +02:00
Paulo Matias
d7b747d6dd Change util.isEmulated to boolean and fix frontlight
Device:hasFrontlight always returned a true-like value because util.isEmulated was an integer.
Fixed this, also, used a polymorphic object design to reduce FrontLight code, and
adapted BaseFrontLight for the emulator.
2013-08-22 10:10:29 -03:00
Paulo Matias
8f53571e06 No need for lulip to be global 2013-08-19 11:07:19 -03:00
Paulo Matias
2492ca247a Use ffi/lulip.lua from koreader-base; change package.path 2013-08-19 10:58:42 -03:00
Huang Xin
2e8b5cb39c Merge pull request #215 from houqp/houqp-master
check frontlight before setting intensity
2013-08-14 03:54:43 -07:00
Huang Xin
4e83288040 Merge pull request #214 from houqp/filemanager
bug fix in class system & rewrite filemanager
2013-08-14 03:39:36 -07:00
Qingping Hou
f65ae9a2b5 check frontlight before setting intensity 2013-08-14 06:34:12 -04:00
Qingping Hou
caf7ebb9ae bug fix & rewrite filemanager 2013-08-14 05:29:05 -04:00
Paulo Matias
e45442c1f6 Refactor Kobo frontlight_intensity restoration: move to reader.lua 2013-08-13 13:56:46 -03:00
Paulo Matias
aaa646aa56 Only assign DEBUG to a no-op function if Dbg.is_on==false 2013-08-10 11:16:02 -03:00
Paulo Matias
cc9f9cce4d Added LuaJIT profiling support (lulip), better cmdline option handling. 2013-08-06 11:53:44 -03:00
Qingping Hou
561c7902ca move defaults.lua to root directory 2013-07-01 02:55:28 -04:00
chrox
313525e961 add cpath in reader.lua 2013-04-21 16:49:00 +08:00
Qingping Hou
fb16790958 add gettext to inputevent.lua 2013-04-08 14:45:04 +08:00
Huang Xin
e42c8f7956 Merge pull request #36 from houqp/houqp-master
add gettext support
2013-04-07 21:41:14 -07:00
Qingping Hou
15a409245a use gettext in reader.lua 2013-04-07 16:13:08 +08:00
th0mass
e1684cae77 file manager close button is activated
since home menu doesn't work properly we need a solid close button on file manager to exit from the app on Touch.
https://github.com/koreader/koreader/issues/15
2013-04-07 10:22:01 +03:00
HW
0c4264b065 updated project URLs 2013-03-24 20:08:24 +01:00
HW
fb317810fa Some adaptions needed after refactoring 2013-03-24 15:08:42 +01:00
chrox
f85fd7a9b2 bugfix: terminate the program when exiting reader 2013-03-23 17:22:49 +08:00
chrox
819467df0b bugfix: hack swipe to unlock after going out of screensaver
by feeding a fake tap at the bottom of the screen
2013-03-17 19:33:59 +08:00
Qingping Hou
595392e841 remove debug information 2013-03-16 14:37:56 -04:00
Qingping Hou
d3e362a551 use show_parent in reader.lua 2013-03-16 14:17:42 -04:00
Qingping Hou
b2f0fe1c5d when kpdf.sh start with no argument, it will actuall pass in "" 2013-03-15 22:12:19 -04:00
Qingping Hou
8dd9e1ec5e forgot to add exitReader at the end 2013-03-15 22:02:08 -04:00
Qingping Hou
1f9adcbb91 add exitReader so we can save G_reader_settings properly 2013-03-15 21:54:49 -04:00
Qingping Hou
10d980ed87 rearranged source tree 2013-03-13 01:18:53 +08:00
Qingping Hou
9fa6ec2a0c listen home key press in filechooser 2013-03-12 23:28:55 +08:00
Qingping Hou
f22b2301fa add last documents menu entry 2013-03-12 12:51:00 +08:00
Qingping Hou
186712d401 add ev log in debug mode 2013-02-24 15:10:11 +08:00
chrox
905b315c81 hide certain directories in FileManager
The exclude pattern should be editable by users in the future.
2013-02-19 21:30:35 +08:00
Qingping Hou
ae6c4bd03a Merge branch 'new_ui_code' of github.com:hwhw/kindlepdfviewer into rotate
Conflicts:
	frontend/ui/reader/readerconfig.lua
2013-02-04 15:00:17 +08:00
Qingping Hou
2090dabf22 add menu to FileManager 2013-02-03 03:41:35 +08:00
Qingping Hou
dd7e26a986 fix crash in goint into screen saver 2013-02-02 16:37:48 +08:00
Qingping Hou
f568ee4139 remove unnecessary framecontainer in reader.lua 2012-12-15 09:31:03 +08:00
Qingping Hou
27ec17b405 only echo to /proc/keypad for K3 and DXG 2012-12-12 10:02:32 +08:00
Qingping Hou
1b7357fc0f add Device:hasKeyboard to help initialize UI components
So that kindle4 won't have all the gesture event registered.
2012-12-10 19:01:32 -05:00
Qingping Hou
d4e5b4cb06 add readerpaging and readermenu touch support 2012-11-11 15:25:49 +08:00
Qingping Hou
c90e2ae797 delete dulplicate code 2012-11-04 11:20:28 +08:00
Qingping Hou
75f2c2774f fix getopt module clearance in reader.lua 2012-10-31 22:15:02 -04:00
Qingping Hou
2b185961e8 remove getopt lua module in reader.lua 2012-10-31 22:02:53 -04:00
Qingping Hou
f641f50e2a add comment for build version reading in the future 2012-10-09 16:14:09 -04:00
Qingping Hou
6c0670740d revert wrong conflict merge for New InfoMessage Concept 2012-10-02 21:21:59 -04:00
NuPogodi
0eaf2671fd New InfoMessage Concept
Part I (still no unireader, crereader, filesearcher & fileinfo)

Conflicts:

	commands.lua
	dialog.lua
	filechooser.lua
	filehistory.lua
	font.lua
	inputbox.lua
	reader.lua
	resources/info-i.png
	screen.lua
	selectmenu.lua
2012-10-02 21:03:56 -04:00
Tigran Aivazian
7894b15511 Tidy up debug support.
1. Make "-d" switch passed to reader.lua enable all debugging
2. Enable debugging for now (development stage) to preserve the current
behaviour. But for the production release I advise to: a) disable it by
not passing "-d" and b) redirect standard output (not just standard
error) of reader.lua to crash.log in kpdf.sh
3. Comment out debug printf()s in pdf.c

Conflicts:

	reader.lua
2012-09-25 11:01:10 -04:00
Qingping Hou
ac385783ed remove menu item shortcut for k4 2012-06-27 16:26:06 +08:00
Qingping Hou
4c71c628d3 release input devices on reader exit 2012-06-12 22:48:57 +08:00
Qingping Hou
84c435ebdc use getProvider and openDocument in reader.lua
we use getProvider for file extension filter
2012-06-12 14:38:52 +08:00
Qingping Hou
07d6f66565 fix screen rotation mode restore for native system 2012-06-12 12:13:51 +08:00
Qingping Hou
379d6216a0 read reader settings in reader.lua 2012-06-12 12:10:44 +08:00
Qingping Hou
bb450c81d4 read arguemtns in reader.lua 2012-06-12 00:37:58 +08:00
HW
5025be971d separated dialog.lua into source files for each individual function 2012-06-10 17:52:09 +02:00
HW
1e9fdd818f a new base file for the reader in new_ui_code branch 2012-06-10 17:38:16 +02:00
HW
9e531fc2db file reorganisation
all lua frontend files are now in the frontend/ directory.
all old code is cleaned up.
2012-05-19 01:10:57 +02:00
Qingping Hou
a89c88f40f add zip format support 2012-04-24 20:44:59 +08:00
Qingping Hou
dbb49505f1 add doc format support
Though I don't like doc at all.
2012-04-24 20:37:16 +08:00
Dobrica Pavlinusic
18f0cf8043 added mobi to CREReader #131 2012-04-21 14:18:23 +02:00
Qingping Hou
b03d589ae9 add preLoadSettings methods for cache_document_size setting
cache_document_size should be configurable for
every docuemnt and it must be loaded before
document open, so I added the preLoadSettings method
2012-04-19 14:39:50 +08:00
Qingping Hou
c4bd2a1046 add debug argument to reader.lua
Without -d argument, all the debug message will
be suppressed.
2012-04-19 11:05:48 +08:00
Qingping Hou
3306346dba use debug to print debug info 2012-04-19 00:16:49 +08:00
Qingping Hou
1b2d0b71b0 fallback to stop framework approach on screensaver fix 2012-04-18 19:43:55 +08:00
Qingping Hou
fa414af1eb handle obselete jumpstack settings
* remove jumpstack settings if found
* add DocSettings:delSetting method
* rename DocSettings:savesetting to
  DocSettings:savesetting.
2012-04-18 17:29:27 +08:00
Qingping Hou
84fe9f49a4 rewrite jump stack and add bookmark feature
* jump stack is rewritten as jump history
* add bookmark feature
2012-04-18 17:01:22 +08:00
Dobrica Pavlinusic
065d68c3a5 use refresh_mode 2012-04-16 21:55:18 +02:00
Qingping Hou
5e867d38ef show infomessage on document open 2012-04-15 14:20:26 +08:00
HW
676e4268ff display document open error message 2012-04-15 02:34:09 +02:00
HW
ec2eda0c05 switched font handling to only work with external fonts
now you can use a environment variable, FONTDIR, to point
to a font dir. Otherwise, "./fonts" is used by default.
Subdirectories are indexed.
2012-04-09 19:04:26 +02:00
HW
a824204039 fixed missed case for device/emu recognition 2012-04-09 16:32:19 +02:00
HW
caefddb99c Merge branch 'master' of github.com:hwhw/kindlepdfviewer
Conflicts:
	crereader.lua
2012-04-09 12:36:28 +02:00
HW
877ecdfb71 switched slider handling to a fork()ed process 2012-04-09 12:29:13 +02:00
Qingping Hou
ecd56a3745 mod: prefix global variables width and height with G_ 2012-04-09 15:42:19 +08:00
Qingping Hou
1f9efe0d9c Merge branch 'master' into epub
Conflicts:
	Makefile
	unireader.lua
2012-04-07 23:09:57 +08:00
Qingping Hou
9d11916bbd mod: resume framework in kpdf.sh 2012-04-07 10:05:27 +08:00
Qingping Hou
c41e3e75a3 add: demo for fixing #85, #86 2012-04-06 13:51:37 +08:00
Qingping Hou
1593c56803 mod: add html support in crereader 2012-04-05 10:31:31 +08:00
Qingping Hou
37dfc84d5a fix: move commands initilization from global init to local
If we call addAllCommands in initGlobalSettings, all
the readers will share the same commands and we cannot
adjust commands for a specific reader. I thus moved this
method call to Unireader:init() method.
2012-03-30 14:10:04 +08:00
Qingping Hou
8a2b86e203 mod: factor last reading page saving and resotring 2012-03-30 13:07:48 +08:00
Qingping Hou
b09110a38d Merge branch 'djvu-highlight' into epub 2012-03-29 17:54:48 +08:00
Qingping Hou
4821f10dda half done demo for crengine 2012-03-29 00:09:26 +08:00
Qingping Hou
46f171df3b Merge branch 'master' of github.com:hwhw/kindlepdfviewer into djvu-highlight
Conflicts:
	unireader.lua
2012-03-21 10:52:51 +08:00
traycold
bfcad367bb using font module for getting fonts (commit f95231d789)
renamed function names using camelCase (issue #62)
2012-03-20 20:15:24 +01:00
traycold
fd6c6dbe60 Merge remote branch 'hwhw/master'
* hwhw/master:
  Password input, handling for broken documents
  factored pages count out, better error and password handling
  factored pages counter out of document struct
2012-03-20 18:40:43 +01:00
Qingping Hou
f4ea1cdb62 Merge branch 'master' of github.com:hwhw/kindlepdfviewer into djvu-highlight
Conflicts:
	blitbuffer.c
	unireader.lua
2012-03-20 10:36:35 +08:00
HW
7e3e38be62 Password input, handling for broken documents 2012-03-20 00:10:19 +01:00
traycold
c2fe6f9bee Merge remote branch 'hwhw/master'
* hwhw/master:
  make muPDF cache size configurable from Lua
  add XPS and CBZ support (muPDF provides this)
  fixed bug for odd rendering widths
  refactored muPDF integration to use strictly the fitz.h API
  forgot Makefile change when factoring out drawcontext
2012-03-19 23:21:23 +01:00
HW
48463d4739 add XPS and CBZ support (muPDF provides this) 2012-03-19 22:35:16 +01:00
Qingping Hou
7bbc5b5ed2 highlight with cursor demo 2012-03-19 21:22:45 +08:00
traycold
943b511b7c complete implementation of issue #55
created a help page
2012-03-13 22:51:25 +01:00
Qingping Hou
f95231d789 add: status bar in reading menu & font.lua
* Since fontchooser is replaced by selectmenu, it
is no longer needed. So I rewrite it into font.lua
module which can cache faces that shared among all
UIs.

* add progressBar method in graphics.lua to draw
reading progress.

* add reading progress information in reading menu.
It is just a demo. Should be clean up in next release
when the real reading menu is out. :)
2012-03-10 16:41:23 +08:00
Qingping Hou
319826c385 mod: screen rotation implemented by ioctl
Now you get a instance rotate :) With only one bug.
I have to restore to previous rotation state of the
native system after exists. Because the native system
does poll the new rotation state that changed by ioctl.

Currently, I don't know how to force the native system
to detect the changes.
2012-03-09 18:34:56 +08:00
Qingping Hou
d2aaf15dce add: screen.lua
* move rotation mode to global variable, now check rotation
with Screen.cur_rotation_mode

* move screenRotate to screen module so other UIs can use it.
2012-03-09 09:40:46 +08:00
Qingping Hou
3dbf9877bc add: 90 degree rotation support
demo for issue #51
2012-03-08 23:28:16 +08:00
Qingping Hou
f79ae48de8 add: UniReader:initGlobalSettings()
Use this method to read settings that may shared
among all readers. For instance, pan_overlap_vertical
2012-03-07 18:16:46 +08:00
Dobrica Pavlinusic
0e48785e0e fix #36: enable file path back 2012-03-06 22:11:00 +01:00
traycold
eba1c2d5ef Merge remote-tracking branch 'hwhw/master' into djvu 2012-03-05 23:36:58 +01:00
HW
917dc33985 put some missing bits into place to fix #34 2012-03-05 19:11:18 +01:00
Qingping Hou
ab2cd3ec8c mod: save jump_stack after exit 2012-03-05 10:48:03 +08:00
Qingping Hou
b318ca08e3 mod: merge djvu branch with master 2012-03-05 09:46:16 +08:00
traycold
04184a5950 improved filechooser; enable "single file" mode of kindlepdfviewer
with this mode it's possible to start kindlepdfviewer opening last
viewed file, bypassing filechooser
2012-03-04 23:03:04 +01:00
HW
4f46f9fa7a proper exit when pressing HOME, store settings etc 2012-03-04 21:39:34 +01:00
Qingping Hou
e4e0eb45ee mod: adapt pdfreader and djvureader to unireader 2012-03-04 19:34:19 +08:00
Qingping Hou
2f9a44bfc6 code clean up for first demo 2012-03-03 22:56:54 +08:00
Qingping Hou
516e32bc46 mod: call different reader in reader.lua
call PDFReader or DJVUReader according to filetype
2012-03-03 19:51:49 +08:00
Qingping Hou
e258371134 mod: add closePage and demo for filechooser 2012-03-03 17:17:35 +08:00
Qingping Hou
4a1a5233c0 Merge branch 'master' into djvu
Conflicts:
	reader.lua
2012-03-03 17:08:06 +08:00
Qingping Hou
1713e2ab0b fix: refresh screen more elegantly after reader exit 2012-03-02 14:22:27 +08:00
Qingping Hou
c4d0cd26ae half done djvu support 2012-03-01 21:04:46 +08:00
Qingping Hou
dc3ea10fd9 initial commit for djvu 2012-02-29 22:49:52 +08:00
HW
e1a916d48c Merge pull request #16 from dpavlin/master
Open Kindle 3 volume via /dev/input/event2 so gamma change works
2012-02-27 12:33:19 -08:00
Qingping Hou
0366e8b8c2 mod: use settings module to save font configuration 2012-02-24 00:30:02 +08:00
Qingping Hou
f26adf97f0 trigger KEY_HOME after exit to refresh screen 2012-02-23 12:44:49 +08:00
Dobrica Pavlinusic
70dd8c8b07 open /dev/input/event2 to route volume keys to gamma on auto-detected Kindle 3 2012-02-19 22:51:56 +01:00
Dobrica Pavlinusic
287aa58731 document --device emu option 2012-01-19 18:17:16 +01:00
Dobrica Pavlinusic
1a2f51cafb auto-detect Kindle 3 based on /dev/input/event2
This is somewhat important, because if we are started without
explicit -d k3 all key mappings are wrong, and user can't exit
2011-12-23 23:27:29 +01:00
HW
1af5ce3d04 reordered freeing of resources, error handling for doc open 2011-12-09 00:10:54 +01:00
HW
c47512a01d slight refactoring of filechooser so it remembers state 2011-12-08 19:01:40 +01:00
HW
c869ee0a95 added file chooser 2011-12-08 01:17:33 +01:00
HW
affc3b231a major overhaul of the code structure, more OO like 2011-12-08 00:45:39 +01:00
HW
1cc44feb6f factored out settings into own class
also started using OO paradigm
2011-12-05 22:31:40 +01:00
HW
f739baff5f moved blitting over to blitbuffer API
the framebuffer "object" now has a "member" that exposes the blitbuffer
API for the framebuffer pixmap. This allows to reuse blitting & Co for
blitbuffer-to-blitbuffer operations
2011-12-02 01:31:13 +01:00
HW
ff38118a89 added exemplary storing of last read page 2011-11-29 00:54:38 +01:00
Dobrica Pavlinusic
31a487e746 fix direction of up/down pan 2011-11-26 16:32:24 +01:00
Dobrica Pavlinusic
04087c072f added altmode for smaller pans and zooms 2011-11-26 15:52:20 +01:00
Dobrica Pavlinusic
95952f7b11 enable panning over zoomed page
This works only in ZOOM_BY_VALUE mode invoked by Shift+Page< or Shift+Page>

Panning is modal: in normal mode, you move using fiveway but
when you press fiveway you switch to move-by-screen mode
(which is useful after you centered first column of article
and you just want to move around)

At any time you can press fiveway with shift to move in even smaller
increments
2011-11-26 15:41:11 +01:00
Dobrica Pavlinusic
bdda25f284 move gamma controlls to volume or F11/F12 in emu
Idea is to fee 5way presses for pan/zoom operations in future
2011-11-21 19:30:17 +01:00
HW
e54ce6a358 changed gamma handling: now we multiply. 2011-11-21 01:18:10 +01:00
HW
a6541596ce added multiple zoom variants
also, added key codes from launchpad sources.
thus, a few constants change their names.
These are the current keys:
PGFWD = next page
PGBCK = previous page

SHIFT+PGFWD = zoom in
SHIFT+PGBCK = zoom out

A = fit to page
S = fit to page width
D = fit to page height

SHIFT+A = fit to page content
SHIFT+S = fit to page content width
SHIFT+D = fit to page content height

SHIFT+FW_UP = Gamma + 0.2
SHIFT+FW_DOWN = Gamma - 0.2
2011-11-21 01:02:03 +01:00
HW
d96666f4b1 new cache organization in preparation for more complex tile data
in order to use the tile cache for variable zoomed tiles, we need more
flexibility. thus, now cache tiles are hashed (well, in fact it's a
concatenation) of their metadata.

also, we close pages right after opening them - there was no re-use
before and now we have opening and closing at one place. this should
also make it easier for the garbage collector.
2011-11-20 22:36:31 +01:00
HW
a07ea2f8b8 factored out key config and tilecache 2011-11-20 21:40:56 +01:00
Dobrica Pavlinusic
0d9de55944 modify_gamma now use cache correctly
This exposed small bug in checkcache which checked just page no
which didn't get invalidated when closing page, so we now check if page
is also not nil
2011-11-20 00:32:18 +01:00
Dobrica Pavlinusic
1d7dc7ffee naive modify_gamma implementation 2011-11-17 18:37:08 +01:00
Dobrica Pavlinusic
0bff614525 device emu for emulated /tmp/input 2011-11-17 18:25:15 +01:00
Dobrica Pavlinusic
f56c122e49 make long-form --goto page work 2011-11-17 11:58:49 +01:00
HW
32b85d2035 reader.lua changes to reflect new emulator 2011-11-17 00:14:36 +01:00
Dobrica Pavlinusic
716d81a28b add missing d (device) option 2011-11-17 07:09:37 +08:00
Dobrica Pavlinusic
83cfaad621 added --goto page comamnd-line argument 2011-11-17 07:08:57 +08:00
HW
d10b73d81a fixed non-initialization bug for dc->gamma 2011-11-16 17:26:34 +01:00
HW
ade5c4892d better argument parsing and option for gamma correction
included MIT-licensed alt_getopt implementation:
http://files.luaforge.net/releases/alt-getopt/alt-getopt/alt-getopt-0.7.0

created example use of gamma correction.

reader.lua now has usage notes for its invocation syntax.
2011-11-16 17:13:08 +01:00
HW
0c24e3c7e0 initial project, basic reader working 2011-11-14 18:30:16 +01:00