mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Dispatcher: add "Save book metadata"
This commit is contained in:
@@ -21,6 +21,7 @@ local InfoMessage = require("ui/widget/infomessage")
|
||||
local InputContainer = require("ui/widget/container/inputcontainer")
|
||||
local InputDialog = require("ui/widget/inputdialog")
|
||||
local LanguageSupport = require("languagesupport")
|
||||
local Notification = require("ui/widget/notification")
|
||||
local PluginLoader = require("pluginloader")
|
||||
local ReaderActivityIndicator = require("apps/reader/modules/readeractivityindicator")
|
||||
local ReaderBack = require("apps/reader/modules/readerback")
|
||||
@@ -742,8 +743,12 @@ function ReaderUI:saveSettings()
|
||||
G_reader_settings:flush()
|
||||
end
|
||||
|
||||
function ReaderUI:onFlushSettings()
|
||||
function ReaderUI:onFlushSettings(show_notification)
|
||||
self:saveSettings()
|
||||
if show_notification then
|
||||
-- Invoked from dispatcher to explicitely flush settings
|
||||
Notification:notify(_("Book metadata saved."))
|
||||
end
|
||||
end
|
||||
|
||||
function ReaderUI:closeDocument()
|
||||
|
||||
@@ -144,7 +144,8 @@ local settingsList = {
|
||||
swap_page_turn_buttons = {category="none", event="SwapPageTurnButtons", title=_("Invert page turn buttons"), reader=true, condition=Device:hasKeys(), separator=true},
|
||||
set_highlight_action = {category="string", event="SetHighlightAction", title=_("Set highlight action"), args_func=ReaderHighlight.getHighlightActions, reader=true},
|
||||
cycle_highlight_action = {category="none", event="CycleHighlightAction", title=_("Cycle highlight action"), reader=true},
|
||||
cycle_highlight_style = {category="none", event="CycleHighlightStyle", title=_("Cycle highlight style"), reader=true},
|
||||
cycle_highlight_style = {category="none", event="CycleHighlightStyle", title=_("Cycle highlight style"), reader=true, separator=true},
|
||||
flush_settings = {category="none", event="FlushSettings", arg=true, title=_("Save book metadata"), reader=true, separator=true},
|
||||
page_jmp = {category="absolutenumber", event="GotoViewRel", min=-100, max=100, title=_("Turn pages"), reader=true},
|
||||
panel_zoom_toggle = {category="none", event="TogglePanelZoomSetting", title=_("Toggle panel zoom"), paging=true, separator=true},
|
||||
|
||||
@@ -347,6 +348,7 @@ local dispatcher_menu_order = {
|
||||
"set_highlight_action",
|
||||
"cycle_highlight_action",
|
||||
"cycle_highlight_style",
|
||||
"flush_settings",
|
||||
"panel_zoom_toggle",
|
||||
|
||||
"visible_pages",
|
||||
|
||||
Reference in New Issue
Block a user