mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Enable Highlight action on single word selection (#6114)
Also add "Dictionary" and "Fulltext search" to available and cycleable highlight actions. Generalize long-press (3s) at end of selection to show the highlight dialog popup.
This commit is contained in:
@@ -546,6 +546,16 @@ common_settings.document = {
|
||||
{
|
||||
text = _("Highlight action"),
|
||||
sub_item_table = {
|
||||
{
|
||||
text = _("Enable on single word selection"),
|
||||
checked_func = function()
|
||||
return G_reader_settings:isTrue("highlight_action_on_single_word")
|
||||
end,
|
||||
callback = function()
|
||||
G_reader_settings:flipNilOrFalse("highlight_action_on_single_word", nil)
|
||||
end,
|
||||
separator = true,
|
||||
},
|
||||
{
|
||||
text = _("Ask with popup dialog"),
|
||||
checked_func = function()
|
||||
@@ -582,6 +592,24 @@ common_settings.document = {
|
||||
G_reader_settings:saveSetting("default_highlight_action", "wikipedia")
|
||||
end,
|
||||
},
|
||||
{
|
||||
text = _("Dictionary"),
|
||||
checked_func = function()
|
||||
return G_reader_settings:readSetting("default_highlight_action") == "dictionary"
|
||||
end,
|
||||
callback = function()
|
||||
G_reader_settings:saveSetting("default_highlight_action", "dictionary")
|
||||
end,
|
||||
},
|
||||
{
|
||||
text = _("Fulltext search"),
|
||||
checked_func = function()
|
||||
return G_reader_settings:readSetting("default_highlight_action") == "search"
|
||||
end,
|
||||
callback = function()
|
||||
G_reader_settings:saveSetting("default_highlight_action", "search")
|
||||
end,
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user