summaryrefslogtreecommitdiff
path: root/plugins/MirLua
diff options
context:
space:
mode:
authoraunsane <aunsane@gmail.com>2018-08-12 16:16:33 +0300
committeraunsane <aunsane@gmail.com>2018-08-12 16:16:33 +0300
commit4141c732c40bbd021512aab2f06a6abb0a5a76c1 (patch)
tree1f109516c0649df2c59aac49d832c4b56f0c422b /plugins/MirLua
parentb3238ec1c11258230818c348c4f916e4856dd9c2 (diff)
MirLua: added open into m_options
Diffstat (limited to 'plugins/MirLua')
-rw-r--r--plugins/MirLua/src/Modules/m_options.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/plugins/MirLua/src/Modules/m_options.cpp b/plugins/MirLua/src/Modules/m_options.cpp
index 9a06a28fe5..aefc68a526 100644
--- a/plugins/MirLua/src/Modules/m_options.cpp
+++ b/plugins/MirLua/src/Modules/m_options.cpp
@@ -116,11 +116,24 @@ int opt_OpenPage(lua_State *L)
return 0;
}
+int opt_Open(lua_State *L)
+{
+ ptrW group(mir_utf8decodeW(luaL_checkstring(L, 1)));
+ ptrW page(mir_utf8decodeW(lua_tostring(L, 2)));
+ ptrW tab(mir_utf8decodeW(lua_tostring(L, 3)));
+
+ g_plugin.openOptions(group, page, tab);
+
+ return 0;
+}
+
static luaL_Reg optionsApi[] =
{
{ "AddPage", opt_AddPage },
{ "OpenPage", opt_OpenPage },
+ { "Open", opt_Open },
+
{ nullptr, nullptr }
};