Commit Graph

7 Commits (ce624be8b83e880b1a81106a143e1440eeda4aab)

Author SHA1 Message Date
Frans de Jonge fd51671478
[chore] Change single quotes to double quotes (#6949)
*Especially* in the hello world plugin.
3 years ago
yparitcher 34b3d5541d Gestures/Profiles: make sure dispatcher is initalized
even when the menu is not opened. this was causing a crash when the event name was parsed from creoptions
4 years ago
NiLuJe 99045b4311
Minor util & ffi/util cleanups (#6657) 4 years ago
yparitcher 7583571707
Dispatcher Gestures Profiles: only flush settings when changed (#6471) 4 years ago
yparitcher 87b1f0c1f2
simplify Dispatcher (#6435)
there is no need to pass the caller rather just the table where the setting is located. passing the setting alone is not enough as sometimes it is nil and then you do not get a reference to its location
4 years ago
yparitcher bda44a99ef
Dispatcher: use sections (#6364)
use `device` `filemanager` `rolling` and `paging` sections to organize the
dispatcher menu and allow the user to know when the action will apply

add events from ReaderGesture

allow profiles in FM
4 years ago
yparitcher a9d4e97115
[plugin] Dispatcher: for profiles & gestures (#6106)
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.
4 years ago