MenuSorter: some documentation

MenuSorter: forgot to add plugin style change

MenuSorter: worked out the final quirks

* Menu always compressed into tables without missing indexes for ipairs compatibility
* Orphans attached
* Separators no longer count as items
This commit is contained in:
Frans de Jonge
2017-03-03 16:03:12 +01:00
parent 56659ddb20
commit 8f31a81601
16 changed files with 102 additions and 45 deletions

View File

@@ -80,7 +80,7 @@ function CalibreCompanion:find_calibre_server()
end
function CalibreCompanion:addToMainMenu(tab_item_table)
self.ui.menu.menu_items["calibre_wireless_connection"] = {
self.ui.menu.menu_items.calibre_wireless_connection = {
text = _("Calibre wireless connection"),
sub_item_table = {
{

View File

@@ -71,7 +71,7 @@ function EvernoteExporter:migrateClippings()
end
function EvernoteExporter:addToMainMenu(tab_item_table)
self.ui.menu.menu_items["evernote"] = {
self.ui.menu.menu_items.evernote = {
text = _("Evernote"),
sub_item_table = {
{

View File

@@ -23,7 +23,7 @@ function Goodreads:init()
end
function Goodreads:addToMainMenu(tab_item_table)
self.ui.menu.menu_items["goodreads"] = {
self.ui.menu.menu_items.goodreads = {
text = _("Goodreads"),
sub_item_table = {
{

View File

@@ -68,7 +68,7 @@ function KeepAlive:init()
end
function KeepAlive:addToMainMenu(tab_item_table)
self.ui.menu.menu_items["keep_alive"] = menuItem
self.ui.menu.menu_items.keep_alive = menuItem
end
return KeepAlive

View File

@@ -86,7 +86,7 @@ function KOSync:onReaderReady()
end
function KOSync:addToMainMenu(tab_item_table)
self.ui.menu.menu_items["progress_sync"] = {
self.ui.menu.menu_items.progress_sync = {
text = _("Progress sync"),
sub_item_table = {
{

View File

@@ -158,7 +158,7 @@ function PerceptionExpander:showSettingsDialog()
end
function PerceptionExpander:addToMainMenu(tab_item_table)
self.ui.menu.menu_items["speed_reading_module_perception_expander"] = {
self.ui.menu.menu_items.speed_reading_module_perception_expander = {
text = _("Speed reading module - perception expander"),
sub_item_table ={
{

View File

@@ -192,7 +192,7 @@ function ReaderStatistics:updateSettings()
end
function ReaderStatistics:addToMainMenu(tab_item_table)
self.ui.menu.menu_items["statistics"] = {
self.ui.menu.menu_items.statistics = {
text = _("Statistics"),
sub_item_table = {
self:getStatisticEnabledMenuItem(),

View File

@@ -50,7 +50,7 @@ function StorageStat:init()
end
function StorageStat:addToMainMenu(tab_item_table)
self.ui.menu.menu_items["storagestat"] = self.menuItem
self.ui.menu.menu_items.storagestat = self.menuItem
end
return StorageStat

View File

@@ -71,7 +71,7 @@ function TimeSync:init()
end
function TimeSync:addToMainMenu(tab_item_table)
self.ui.menu.menu_items["synchronize_time"] = menuItem
self.ui.menu.menu_items.synchronize_time = menuItem
end
return TimeSync

View File

@@ -25,7 +25,7 @@ function ZSync:init()
end
function ZSync:addToMainMenu(tab_item_table)
self.ui.menu.menu_items["zsync"] = {
self.ui.menu.menu_items.zsync = {
text = _("ZSync"),
sub_item_table = {
{