mirror of
https://github.com/koreader/koreader
synced 2024-10-31 21:20:20 +00:00
Merge pull request #548 from tigran123/batopt
Allow anyone to set event notifications.
This commit is contained in:
commit
befad6bb1e
@ -473,41 +473,25 @@ function FileChooser:addAllCommands()
|
|||||||
self:changeFileChooserMode()
|
self:changeFileChooserMode()
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
-- NuPogodi, 25.09.12: new functions to tune the way how to inform user about the reader events
|
self.commands:add(KEY_E, nil, "E",
|
||||||
local popup_text = "Unstable... For experts only! "
|
"configure event notifications",
|
||||||
local voice_text = "This function is still under development and available only for experts and beta testers."
|
|
||||||
self.commands:add(KEY_I, nil, "I",
|
|
||||||
"change the way to inform about events",
|
|
||||||
function(self)
|
function(self)
|
||||||
if self.filemanager_expert_mode == self.ROOT_MODE then
|
InfoMessage:chooseNotificatonMethods()
|
||||||
InfoMessage:chooseNotificatonMethods()
|
self.pagedirty = true
|
||||||
self.pagedirty = true
|
|
||||||
else
|
|
||||||
InfoMessage:inform(popup_text, -1, 1, MSG_WARN, voice_text)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
self.commands:addGroup("Vol-/+", {Keydef:new(KEY_VPLUS,nil), Keydef:new(KEY_VMINUS,nil)},
|
self.commands:addGroup("Vol-/+", {Keydef:new(KEY_VPLUS,nil), Keydef:new(KEY_VMINUS,nil)},
|
||||||
"decrease/increase sound volume",
|
"decrease/increase sound volume",
|
||||||
function(self)
|
function(self)
|
||||||
if self.filemanager_expert_mode == self.ROOT_MODE then
|
InfoMessage:incrSoundVolume(keydef.keycode == KEY_VPLUS and 1 or -1)
|
||||||
InfoMessage:incrSoundVolume(keydef.keycode == KEY_VPLUS and 1 or -1)
|
|
||||||
else
|
|
||||||
InfoMessage:inform(popup_text, -1, 1, MSG_WARN, voice_text)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
self.commands:addGroup(MOD_SHIFT.."Vol-/+", {Keydef:new(KEY_VPLUS,MOD_SHIFT), Keydef:new(KEY_VMINUS,MOD_SHIFT)},
|
self.commands:addGroup(MOD_SHIFT.."Vol-/+", {Keydef:new(KEY_VPLUS,MOD_SHIFT), Keydef:new(KEY_VMINUS,MOD_SHIFT)},
|
||||||
"decrease/increase TTS-engine speed",
|
"decrease/increase TTS-engine speed",
|
||||||
function(self)
|
function(self)
|
||||||
if self.filemanager_expert_mode == self.ROOT_MODE then
|
InfoMessage:incrTTSspeed(keydef.keycode == KEY_VPLUS and 1 or -1)
|
||||||
InfoMessage:incrTTSspeed(keydef.keycode == KEY_VPLUS and 1 or -1)
|
|
||||||
else
|
|
||||||
InfoMessage:inform(popup_text, -1, 1, MSG_WARN, voice_text)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
------------ end of changes (NuPogodi, 25.09.12) ------------
|
|
||||||
self.commands:add({KEY_F, KEY_AA}, nil, "F, Aa",
|
self.commands:add({KEY_F, KEY_AA}, nil, "F, Aa",
|
||||||
"change font faces",
|
"change font faces",
|
||||||
function(self)
|
function(self)
|
||||||
|
@ -3421,16 +3421,11 @@ function UniReader:addAllCommands()
|
|||||||
self:redrawCurrentPage()
|
self:redrawCurrentPage()
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
self.commands:add(KEY_I, nil, "I",
|
self.commands:add(KEY_E, nil, "E",
|
||||||
"change the way to inform about events",
|
"configure event notifications",
|
||||||
function(unireader)
|
function(unireader)
|
||||||
if FileChooser.filemanager_expert_mode == FileChooser.ROOT_MODE then
|
InfoMessage:chooseNotificatonMethods()
|
||||||
InfoMessage:chooseNotificatonMethods()
|
self:redrawCurrentPage()
|
||||||
self:redrawCurrentPage()
|
|
||||||
else
|
|
||||||
InfoMessage:inform("Unstable... For experts only ", -1, 1, MSG_WARN,
|
|
||||||
"This function is still under development and available only for experts and beta testers.")
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
self.commands:add(KEY_BACK,MOD_ALT,"Back",
|
self.commands:add(KEY_BACK,MOD_ALT,"Back",
|
||||||
|
Loading…
Reference in New Issue
Block a user