mirror of
https://github.com/koreader/koreader
synced 2024-11-16 06:12:56 +00:00
Remove DCREREADER_PROGRESS_BAR (#5641)
This commit is contained in:
parent
4778d3db3b
commit
d93206a841
@ -110,7 +110,6 @@ read_globals = {
|
||||
"DCREREADER_CONFIG_WORD_GAP_SMALL",
|
||||
"DCREREADER_CONFIG_WORD_GAP_MEDIUM",
|
||||
"DCREREADER_CONFIG_WORD_GAP_LARGE",
|
||||
"DCREREADER_PROGRESS_BAR",
|
||||
"DMINIBAR_TOC_MARKER_WIDTH",
|
||||
"DMINIBAR_CONTAINER_HEIGHT",
|
||||
"DMINIBAR_FONT_SIZE",
|
||||
|
@ -172,10 +172,10 @@ DCREREADER_CONFIG_WORD_GAP_SMALL = 50
|
||||
DCREREADER_CONFIG_WORD_GAP_MEDIUM = 75
|
||||
DCREREADER_CONFIG_WORD_GAP_LARGE = 100
|
||||
|
||||
-- crereader progress bar
|
||||
-- crereader progress bar (no longer needed)
|
||||
-- 0 for top "full" progress bar
|
||||
-- 1 for bottom "mini" progress bar
|
||||
DCREREADER_PROGRESS_BAR = 1
|
||||
--DCREREADER_PROGRESS_BAR = 1
|
||||
|
||||
-- configure "mini" progress bar
|
||||
DMINIBAR_TOC_MARKER_WIDTH = 2 -- Looses usefulness > 3
|
||||
|
@ -16,9 +16,7 @@ function ReaderCoptListener:onReadSettings(config)
|
||||
end)
|
||||
end
|
||||
|
||||
local status_line = config:readSetting("copt_status_line") or
|
||||
G_reader_settings:readSetting("copt_status_line") or
|
||||
DCREREADER_PROGRESS_BAR
|
||||
local status_line = config:readSetting("copt_status_line") or G_reader_settings:readSetting("copt_status_line") or 1
|
||||
self.ui:handleEvent(Event:new("SetStatusLine", status_line, true))
|
||||
end
|
||||
|
||||
|
@ -430,9 +430,9 @@ Note that your selected font size is not affected by this setting.]]),
|
||||
name_text = S.PROGRESS_BAR,
|
||||
toggle = {S.FULL, S.MINI},
|
||||
values = {0, 1},
|
||||
default_value = DCREREADER_PROGRESS_BAR,
|
||||
default_value = 1,
|
||||
args = {0, 1},
|
||||
default_arg = DCREREADER_PROGRESS_BAR,
|
||||
default_arg = 1,
|
||||
event = "SetStatusLine",
|
||||
name_text_hold_callback = optionsutil.showValues,
|
||||
help_text = _([[- 'full' displays a status bar at the top of the screen (this status bar can't be customized).
|
||||
|
@ -8,8 +8,8 @@ describe("defaults module", function()
|
||||
|
||||
it("should load all defaults from defaults.lua", function()
|
||||
Defaults:init()
|
||||
assert.is_same(111, #Defaults.defaults_name)
|
||||
assert.is_same("DFULL_SCREEN", Defaults.defaults_name[56])
|
||||
assert.is_same(110, #Defaults.defaults_name)
|
||||
assert.is_same("DFULL_SCREEN", Defaults.defaults_name[55])
|
||||
end)
|
||||
|
||||
it("should save changes to defaults.persistent.lua", function()
|
||||
@ -19,14 +19,14 @@ describe("defaults module", function()
|
||||
-- not in persistent but checked in defaults
|
||||
Defaults.changed[20] = true
|
||||
Defaults.changed[47] = true
|
||||
Defaults.changed[56] = true
|
||||
Defaults.changed[90] = true
|
||||
Defaults.changed[106] = true
|
||||
Defaults.changed[55] = true
|
||||
Defaults.changed[89] = true
|
||||
Defaults.changed[105] = true
|
||||
Defaults:saveSettings()
|
||||
assert.is_same(111, #Defaults.defaults_name)
|
||||
assert.is_same("DFULL_SCREEN", Defaults.defaults_name[56])
|
||||
assert.is_same("SEARCH_LIBRARY_PATH", Defaults.defaults_name[106])
|
||||
assert.is_same("DTAP_ZONE_BACKWARD", Defaults.defaults_name[90])
|
||||
assert.is_same(110, #Defaults.defaults_name)
|
||||
assert.is_same("DFULL_SCREEN", Defaults.defaults_name[55])
|
||||
assert.is_same("SEARCH_LIBRARY_PATH", Defaults.defaults_name[105])
|
||||
assert.is_same("DTAP_ZONE_BACKWARD", Defaults.defaults_name[89])
|
||||
assert.is_same("DCREREADER_CONFIG_WORD_GAP_LARGE", Defaults.defaults_name[47])
|
||||
assert.is_same("DCREREADER_CONFIG_H_MARGIN_SIZES_XXX_LARGE", Defaults.defaults_name[20])
|
||||
local fd = io.open(persistent_filename, "r")
|
||||
@ -51,10 +51,10 @@ DFULL_SCREEN = 1
|
||||
|
||||
-- in persistent
|
||||
Defaults:init()
|
||||
Defaults.changed[56] = true
|
||||
Defaults.defaults_value[56] = 2
|
||||
Defaults.changed[90] = true
|
||||
Defaults.defaults_value[90] = {
|
||||
Defaults.changed[55] = true
|
||||
Defaults.defaults_value[55] = 2
|
||||
Defaults.changed[89] = true
|
||||
Defaults.defaults_value[89] = {
|
||||
y = 10,
|
||||
x = 10.125,
|
||||
h = 20.25,
|
||||
@ -100,8 +100,8 @@ DHINTCOUNT = 2
|
||||
|
||||
-- in persistent
|
||||
Defaults:init()
|
||||
Defaults.changed[56] = true
|
||||
Defaults.defaults_value[56] = 1
|
||||
Defaults.changed[55] = true
|
||||
Defaults.defaults_value[55] = 1
|
||||
Defaults:saveSettings()
|
||||
fd = io.open(persistent_filename)
|
||||
assert.Equals(
|
||||
|
Loading…
Reference in New Issue
Block a user