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

306 Commits

Author SHA1 Message Date
Hans-Werner Hilse
143c56c48c record ButtonDialog.dimen 2014-11-30 22:33:38 +00:00
Hans-Werner Hilse
3f9dc46315 fix dict window refresh
was still using old API
also, move this to another place.
2014-11-30 18:38:03 +00:00
Frans de Jonge
c25254a7ec OPDS: embryonic unit test for OPDS browser
This initial seed specifically tests against what recently broke in Gutenberg and FeedBooks.
2014-11-30 19:06:27 +01:00
Hans-Werner Hilse
f02be20a65 refresh fixes for the menus
this will only refresh the areas that actually need to be refreshed.
2014-11-30 12:04:33 +00:00
Hans-Werner Hilse
6793a4fee1 reader config dialog: properly refresh config pane
This serves as a good example for the way refreshes are done:
setDirty("all", function() ... end)
* the "all" will have all widgets on screen repainted.
  In this case that is needed because the config pane has
  different sizes, covering different parts of underlying
  widgets. So they need to be repainted every time.
* the function will return the area to refresh and is evaluated
  after painting. In this example, we take the area that is covered
  by the config pane before switching it (if present at all), and
  hand it to the refresh area function as an upvalue.
  When the function is called later after painting, it will
  use that saved area and combine it with the area that is covered
  then by the widget. That way, parts that are covered no more are
  included in the refresh area, too.
2014-11-30 11:50:51 +00:00
Hans-Werner Hilse
82c26b1f18 adapt widgets to new refresh/repaint API 2014-11-30 00:17:50 +00:00
Andrey Golovizin
296f63b22a OPDS: ignore links with unknown rel values, treat empty rel as rel="subsection". 2014-11-29 11:15:41 +01:00
Frans de Jonge
7a87b66fa1 OPDS catalog: auto-fill http:// if no protocol given and revert #1106
This fixes #1259.
2014-11-28 21:58:19 +01:00
Hans-Werner Hilse
0c80537003 allow image widgets to do alpha-blitting
when the image (e.g. a PNG) does contain an alpha channel, that can
be honored by ImageWidget. It doesn't do so by default for compatibility
(arguably, we should change that in the future), it has to be enabled
by setting the "alpha" property to "true" (boolean, not string).
2014-11-28 15:37:11 +00:00
Frans de Jonge
693fa0837e Reworked several strings
This is the remaining gruntwork of #1276. I believe that only leaves networkmgr.lua and filemanagersearch.lua, which will require a little more thought.
2014-11-28 14:10:37 +01:00
chrox
ca60ceacd0 make radius field respects popout flag 2014-11-27 22:01:57 +08:00
chrox
0a06041cd9 fix calculation of widget height of filechooser
the height of filechooser is provided when creating filechooser
widget since there may be no title as in filemanger which needs
a special title widget to contain filemanger menu.
2014-11-25 17:49:46 +08:00
chrox
67693367b9 init width and height of filechooser widget during init
so that everytime a filechooser is inited right dimension
size is used.
2014-11-25 16:31:03 +08:00
Hans-Werner Hilse
22697adf20 switch from scaleByDPI() to scaleBySize() 2014-11-23 12:13:32 +00:00
HW
7b91935df0 Merge pull request #1230 from chrox/fix_1170
fix #1169 and #1170
2014-11-23 13:13:07 +01:00
chrox
d11dba0558 fix #1169 and #1170 2014-11-23 18:06:20 +08:00
chrox
3574865dcb fix #1166 by auto alignment of option name 2014-11-23 16:52:08 +08:00
chrox
dbf8faa9b1 remove hardcoded footer height of reader menu 2014-11-20 18:02:50 +08:00
chrox
f52872b081 default autoscale for IconButton 2014-11-20 18:02:50 +08:00
chrox
e66801039b refactoring: reuse IconButton for config menu bar 2014-11-20 18:02:50 +08:00
Hans-Werner Hilse
ab44d1f7e3 fix item number distinction (plural forms) 2014-11-19 13:25:32 +01:00
Frans de Jonge
8b9bbf918c Fix typo in #1176 2014-11-19 12:53:03 +01:00
Frans de Jonge
d701d9b198 First util.template encapsulated strings 2014-11-19 12:23:37 +01:00
NiLuJe
e9573ebe58 Try to avoid more update_regions_func mismatches
scheduling tricks
2014-11-18 10:32:47 +01:00
Hans-Werner Hilse
3d03713cb1 implement case-insensitive sort, make default and configurable
This will convert any file name to lowercase before doing the comparison.
Note that this will only work for ASCII character range, a full Unicode
aware solution will be much more complicated. And in the end, file names
are byte arrays, not character strings ;-)

fixes #1183.
2014-11-16 19:27:31 +01:00
Hans-Werner Hilse
e031599c0a fix strcoll() workaround
The strcoll() workaround we had in place for Kobo devices was (or has
become) ineffective. We had set self.strcoll to nil on Kobo devices -
but this was the instance variable. Setting it to nil effectively makes
the instance variable vanish, so when trying to access it later, it
was not there and got looked up via the metatable - which had the original
reference. Setting it to nil had no effect whatsoever.

We simplify that approach and set the replacement function where before we
had set this to nil.

This is a partial fix for issue #1183 (and explains a comment in issue #686
which says that the old fix did not work).

However, to really fix #1183 - if we want to do so - we would need a collate
function that normalizes uppercase/lowercase before compare.
2014-11-16 19:15:24 +01:00
NiLuJe
1ee09010c4 Make ScrollTextWidget updates regional
Because I like breaking stuff in fun & interesting ways :D
2014-11-12 15:55:30 +01:00
chrox
efbd7f7b5d schedule in menu option callback
so that new reginal update on menu entry don't
affect screen update from callback results
2014-11-12 15:40:37 +08:00
Qingping Hou
123d0a1230 Merge pull request #1126 from chrox/wifi_toggler
add network settings in reader menu
2014-11-11 03:05:12 -05:00
Qingping Hou
fac2e121d2 Merge pull request #1124 from chrox/remember_menutab
remember menu tab index when showing reader menu
2014-11-11 03:01:35 -05:00
chrox
590073e4a8 add network settings in reader menu
and remove the wifi toggler on the footer of each menu page,
so that network status is only checked (currently with the stdout of ip cmd)
when navigating to the "Network settings" submenu instead of checking
on each menu popup.
2014-11-11 12:12:39 +08:00
NiLuJe
c3274a9d5e Unbreak FM by reverting 7a812f
:D
2014-11-11 03:24:56 +01:00
NiLuJe
b88e304845 Make TouchMenu updates regional 2014-11-11 03:17:15 +01:00
NiLuJe
88c26b4112 Make ConfigDialog updates regional 2014-11-11 03:10:03 +01:00
chrox
95ac27df5c remember menu tab index when showing reader menu 2014-11-11 10:06:17 +08:00
NiLuJe
7a812ff86d Make Button update regional 2014-11-11 03:03:25 +01:00
NiLuJe
39244aa0cb Make ToggleSwitch updates regional 2014-11-11 02:52:47 +01:00
NiLuJe
041f11cba0 Tweak some comments 2014-11-11 02:42:07 +01:00
NiLuJe
8f3598bec3 Make IconButton updates regional
Beginning of the quest to make menu refreshes slightly smoother ;).
2014-11-10 20:27:35 +01:00
NiLuJe
a12015c0d1 Force the dictionary popup to do a partial update.
It was done the other way around on purpose, so I probably broke some
very specific use-case ;). Feel free to shout at me ^^.
2014-11-10 16:48:16 +01:00
Andrey Golovizin
8bce54a6a0 Ignore OPDS links with unknown rel values. 2014-11-08 09:19:29 +01:00
Andrey Golovizin
5888773c95 Try to fetch next page if loading a new catalog resulted in a single page 2014-11-07 22:10:12 +01:00
Andrey Golovizin
500ad9ba4c Fetch enough items to fill at lest one new page 2014-11-07 22:10:06 +01:00
chrox
bd0975896d add fulltext search for EPUB documents 2014-11-05 12:28:28 +08:00
chrox
8ddca4bf49 close reader config panel when touching reader menu 2014-11-05 12:28:28 +08:00
chrox
a766ec51ae only update neccessary screen regions when typing with virtual keyboard 2014-11-05 12:28:28 +08:00
chrox
3a1fe689e2 update multiple screen regions
This is useful when updating keyboard and inputbox.
2014-11-05 12:28:28 +08:00
Hans-Werner Hilse
3066c86e38 Refactoring hardware abstraction
This is a major overhaul of the hardware abstraction layer.
A few notes:

General platform distinction happens in
  frontend/device.lua
which will delegate everything else to
  frontend/device/<platform_name>/device.lua
which should extend
  frontend/device/generic/device.lua

Screen handling is implemented in
  frontend/device/screen.lua
which includes the *functionality* to support device specifics.
Actually setting up the device specific functionality, however,
is done in the device specific setup code in the relevant
device.lua file.

The same goes for input handling.
2014-11-02 21:19:04 +01:00
chrox
a32991d898 add new sorting methods for file list in filemanager
Now files can be sorted by filename or last accessed time
2014-10-30 22:41:52 +08:00
chrox
84029e9694 add modal widget type that will stay on the top of window stack
ConfirmBox and InfoMessage are default to be modal.
Now returning to filamanager after highlighting a PDF page
the confirmbox asking users to save the document will not be hidden by
the filamanager window.
And it's tested on Kindle that #791 is already been solved probably by
out refacorting of MuPDF backend.
2014-10-30 16:01:04 +08:00