local icolib = require('m_icolib')
local ttb = require('m_toptoolbar')
local protos = require("m_protocols")
local protoName = "%имя_протокола%"
m.CreateServiceFunction("MirLua/Scripts/OpenMRAInbox", function()
protos.CallService(protoName, "/GotoInbox", 0, 0)
end)
local hIcon = icolib.AddIcon('openMRAInbox', "MirLua/Open inbox")
m.HookEvent("TopToolBar/ModuleLoaded", function()
ttb.AddButton({
Name = "Open inbox",
Service = "MirLua/Scripts/OpenMRAInbox",
Flags = 0x0002,
IconUp = hIcon,
IconDown = hIcon,
TooltipUp = "Open inbox",
TooltipDown = "Open inbox",
})
end)