mirror of
https://github.com/koreader/koreader
synced 2024-10-31 21:20:20 +00:00
a9d4e97115
add a Dispatcher module that allows for dispatching multiple events at once. This will allow for profiles & for gestures that do multiple things. it has 2 methods: Execute which is given a kv table of settings to change and fires an event for each of them. addSubMenu adds a menu item to a menu to allow for modifying which events are called it also has settingsList which is a master table of all allowed setting and their corresponding info (it is mostly from ReaderGesture and needs a lot of work) to allow for a new setting all one has to do is add a entry to settingsList with a corresponding event and it will work out of the box. the profile plugin is right now still a stub, just to test Dispatcher. the plan is to finish it and eventually refactor ReaderGesture to rely on this. This also needs effort to move many functions out of reader gesture into events where they belong.
7 lines
197 B
Lua
7 lines
197 B
Lua
local _ = require("gettext")
|
|
return {
|
|
name = 'profiles',
|
|
fullname = _("Profiles"),
|
|
description = _([[This plugin allows combining multiple settings to make switchable 'profiles'.]]),
|
|
}
|