2016-12-20 07:19:54 +00:00
|
|
|
local InfoMessage = require("ui/widget/infomessage")
|
|
|
|
local UIManager = require("ui/uimanager")
|
|
|
|
local WidgetContainer = require("ui/widget/container/widgetcontainer")
|
|
|
|
local _ = require("gettext")
|
|
|
|
|
|
|
|
local Hello = WidgetContainer:new{
|
|
|
|
name = 'Hello',
|
|
|
|
is_doc_only = false,
|
|
|
|
disabled = true, -- This is a debug plugin
|
|
|
|
}
|
|
|
|
|
|
|
|
function Hello:init()
|
|
|
|
self.ui.menu:registerToMainMenu(self)
|
|
|
|
end
|
|
|
|
|
|
|
|
function Hello:addToMainMenu(tab_item_table)
|
|
|
|
table.insert(tab_item_table.plugins, {
|
|
|
|
text = _("Hello World"),
|
2016-12-27 10:03:11 +00:00
|
|
|
callback = function()
|
2016-12-20 07:19:54 +00:00
|
|
|
UIManager:show(InfoMessage:new{
|
|
|
|
text = _("Hello, docless plugin world"),
|
|
|
|
})
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
|
|
|
return Hello
|