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

44 Commits

Author SHA1 Message Date
Tigran Aivazian
c3ded9f8fe Don't use Home for exiting InputBox dialog 2012-10-22 20:23:31 +01:00
NuPogodi
00c1f2ec9c New InfoMessage Concept
Part I (still no unireader, crereader, filesearcher & fileinfo)
2012-10-03 00:45:45 +02:00
Tigran Aivazian
1a3371c5bf Two fixes from NuPogodi
1. ATM, the footers in selectmenu.lua & helppage.lua are left-adjusted,
these also contain the prompt for users how to call help
(selectmenu.lua) and how to go back (helppage.lua). By minor correction
to function DrawFooter() in filechooser.lua, one may readily make the
rest footers to look in a similar way.
2. When writing the code of inputbox.lua, I (NuPogodi) left the wrong
command to delete the 1st entry in the math function list
(called in calculator mode by pressing Alt-M).
2012-09-29 19:03:29 +01:00
Tigran Aivazian
4f2be7a7e8 Calculator: make it more robust. Previously it was very easy to crash
the application by entering invalid input into calculator, for example
things like these: ")(", "inf/0", "f()", etc.
By using Lua pcall() function to execute not only the construction of
the expression, but also the calculation of the final result, the calculator
is made more robust and safe-guarded from such crashes.
2012-09-14 18:36:55 +01:00
Tigran Aivazian
da296e2e95 Slight cleanup of the previous commit: save one arithmetical operation. 2012-09-14 18:10:21 +01:00
Tigran Aivazian
b6a429a1d4 Calculator: calculate the cursor position correctly when the output contains more characters than input. 2012-09-14 18:03:43 +01:00
Tigran Aivazian
dc473e85a9 Calculator: on exit from help page refresh the screen properly (i.e. fully) 2012-09-14 17:38:02 +01:00
Tigran Aivazian
b0febe2d9b Calculator: don't crash when pressing Enter or FW-select buttons. 2012-09-14 17:24:38 +01: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
Dobrica Pavlinusic
1c6421dc3f correctly show default value in inputbox 2012-08-26 16:50:16 +02:00
Dobrica Pavlinusic
89fd8d22d6 make on-screen keyboard lower case by default
close #194
2012-06-13 16:03:06 +02:00
HW
0d12ff70cd rename debug() to Debug() to stop clashing with the debug submodule from Lua 2012-06-04 00:49:23 +02:00
HW
e35339a398 fixed wrong escape sequences in strings
again, LuaJIT will choke on these, Lua-5.1.n did just ignore them
2012-06-03 01:52:16 +02:00
NuPogodi
944a3b5b05 NuPogodi code drop from 2012-05-27
- zip files don't require double extensions any more
- filechooser has 'H' shortcut to display keys
- new function for files and folders (^ == shift)
	^N - new folder
	Del - delete document/folder
	^C - copy file into clipboard
	^X - cut (move) file to clipboard
	^V - paste files from clipboard
	^R - rename file
- configurable keyboard for input box
2012-05-28 19:19:21 +02:00
Qingping Hou
1e36018021 fix bug in inputbox
Redundant code in character deleting
2012-04-30 16:19:28 +08:00
Dobrica Pavlinusic
c688e6e20c few more places in which repeat key is useful 2012-04-27 23:35:33 +02:00
Qingping Hou
c350f5af87 add: hint message for inputbox
use hint message to indicate current page
in goto page feature.
2012-04-20 14:04:37 +08:00
Qingping Hou
3306346dba use debug to print debug info 2012-04-19 00:16:49 +08:00
traycold
02dd9b023f Merge remote branch 'hwhw/master'
* hwhw/master: (183 commits)
  show infomessage on document open
  use InfoMessage for empty TOC, jump history and highlights
  copy resources dir on customupdate
  add resource: info icon
  display document open error message
  added infomessage dialog implementation
  bugfix, removed old test constant
  Added widget abstraction framework
  added interface to get blitbuffers from JPEG/PNG files
  fix typo
  added reading of pan_margin settings
  fix full screen refresh command, close #99
  add: sleep and usleep in util module
  fix: add back KEY_FW{LEFT,RIGHT} commands to NumInputBox
  reverted removal of last-doc shortcut, introduced framework restart
  kill our own child process. not quite finished.
  added line spacing setting for crereader
  remove page:getPageText debug dump to improve performance on device
  remove page:getPageText debug dump to improve performance on device
  display crash.log on error
  ...

Conflicts:
	ft.c
	helppage.lua
	inputbox.lua
	rendertext.lua
	rendertext_example.lua
	unireader.lua
2012-04-16 00:08:19 +02:00
traycold
0350822ade remove some trailing white spaces 2012-04-15 16:05:44 +02:00
Qingping Hou
db1b2cd01a fix: add back KEY_FW{LEFT,RIGHT} commands to NumInputBox 2012-04-14 12:20:04 +08:00
Dobrica Pavlinusic
ffa663d37d added few more keys to inputbox 2012-04-13 20:52:30 +02:00
HW
57d769e0ae added wrapper function for input.waitForEvent that retries on EINTR 2012-04-12 21:00:44 +02:00
Qingping Hou
485dda2a0f fix: bugs in inputbox.lua
* one typo
* clear ret_code on exit
* add init() method
2012-04-10 16:35:46 +08:00
Qingping Hou
95998a7397 add: NumInputBox class for goto page feature 2012-04-10 15:52:51 +08: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
Qingping Hou
ff60a41604 mod: rewrite inputbox with commands 2012-04-09 17:17:23 +08:00
Qingping Hou
7c81f60a58 rewrite highlight again :( finished the cursor part 2012-03-22 23:12:57 +08:00
Qingping Hou
44d7d6cd29 fix: handle -1 index when deleting characters in inputbox 2012-03-19 20:43:52 +08:00
Qingping Hou
46de106e8a fix: clear input_text before input result return 2012-03-16 14:23:09 +08:00
Qingping Hou
9eff3e3224 mod: delete debug lines in inputbox.lua 2012-03-15 22:18:27 +08:00
Qingping Hou
709a9003d2 fix: handle default text in inputbox 2012-03-15 22:15:09 +08:00
Qingping Hou
7b0f2ad815 mod: cursor finished, add to inputbox 2012-03-15 21:43:55 +08:00
Qingping Hou
a231b944c1 add: first demo of cursor support 2012-03-15 17:03:09 +08:00
Qingping Hou
b7c04ada1a mod: clean up in inputbox.lua 2012-03-11 15:46:25 +08:00
Qingping Hou
6614bbe33d mod: handle shift and alt key events in adjustKeyEvents() 2012-03-02 18:38:34 +08:00
Qingping Hou
53d4016c64 fix: move shiftmode and altmode to global
now shiftmode and altmode is recoreded in Keys module.  So all the UIs
are sharing these two mode instead of remembering their own. These fix
the bug in UI switchings.

For instance, you use combo 'Alt'+'b' to fire up some menu in pdfreader,
the altmode is set, but the alt key was released after the menu show
up. Then the key release event will only be captured by the menu. So
after you exit from the menu, the altmode is still set in pdfreader,
which is not what we want.
2012-03-02 13:46:15 +08:00
Qingping Hou
b33720a567 mod: change shortcut for jumpstack & fix: inputbox 2012-02-26 11:39:36 +08:00
Qingping Hou
91dd1a13c8 mod: add number keys in inputbox 2012-02-19 19:51:08 +08:00
Qingping Hou
417ef640a7 Merge branch 'rotate'
Conflicts:
	filechooser.lua

* merge rotate branch with search branch
* fix font display bug in font menu

not fully tested the new rotation implemention yet.
2012-02-19 15:29:51 +08:00
Qingping Hou
060ad5cb01 finished search feature! 2012-02-19 14:41:44 +08:00
Qingping Hou
32d1bede8c start working on filesearcher 2012-02-19 07:21:50 +08:00
Qingping Hou
29a9996fb2 mod: inputbox finished 2012-02-18 20:32:38 +08:00
Qingping Hou
8fdb0a4c3e add: demo for inputbox 2012-02-18 18:21:03 +08:00