diff options
author | aunsane <aunsane@gmail.com> | 2018-05-20 19:44:27 +0300 |
---|---|---|
committer | aunsane <aunsane@gmail.com> | 2018-05-20 19:44:27 +0300 |
commit | 5de8252e58fbdbebb8914e99a90bec06a0ff039f (patch) | |
tree | d4022c1e804d636ee933ab1e5475f21f20a47c14 /plugins/MirLua/src/m_icolib.cpp | |
parent | cf39a24da2375575d0f93b95c7ae258aae1658a7 (diff) |
MirLua: environment now inherits CMPluginBase
Diffstat (limited to 'plugins/MirLua/src/m_icolib.cpp')
-rw-r--r-- | plugins/MirLua/src/m_icolib.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/plugins/MirLua/src/m_icolib.cpp b/plugins/MirLua/src/m_icolib.cpp index a83c9877d7..f9faa2997b 100644 --- a/plugins/MirLua/src/m_icolib.cpp +++ b/plugins/MirLua/src/m_icolib.cpp @@ -25,8 +25,7 @@ static void MakeSKINICONDESC(lua_State *L, SKINICONDESC &sid) sid.defaultFile.w = mir_utf8decodeW(lua_tostring(L, -1));
lua_pop(L, 1);
- if (sid.defaultFile.w == nullptr)
- {
+ if (sid.defaultFile.w == nullptr) {
sid.defaultFile.w = (wchar_t*)mir_calloc(MAX_PATH + 1);
GetModuleFileName(g_plugin.getInst(), sid.defaultFile.w, MAX_PATH);
}
@@ -52,8 +51,7 @@ static int lua_AddIcon(lua_State *L) {
SKINICONDESC sid = { };
- if (lua_type(L, 1) == LUA_TSTRING)
- {
+ if (lua_type(L, 1) == LUA_TSTRING) {
sid.flags = SIDF_ALL_UNICODE;
sid.pszName = mir_utf8decodeA(luaL_checkstring(L, 1));
sid.description.w = mir_utf8decodeW(luaL_checkstring(L, 2));
@@ -61,8 +59,7 @@ static int lua_AddIcon(lua_State *L) sid.defaultFile.w = mir_utf8decodeW(lua_tostring(L, 4));
sid.hDefaultIcon = GetIcon(IDI_SCRIPT);
- if (sid.defaultFile.w == nullptr)
- {
+ if (sid.defaultFile.w == nullptr) {
sid.defaultFile.w = (wchar_t*)mir_calloc(MAX_PATH + 1);
GetModuleFileName(g_plugin.getInst(), sid.defaultFile.w, MAX_PATH);
}
@@ -89,8 +86,7 @@ static int lua_GetIcon(lua_State *L) bool big = luaM_toboolean(L, 2);
HICON hIcon = nullptr;
- switch (lua_type(L, 1))
- {
+ switch (lua_type(L, 1)) {
case LUA_TLIGHTUSERDATA:
hIcon = IcoLib_GetIconByHandle(lua_touserdata(L, 1), big);
break;
@@ -121,8 +117,7 @@ static int lua_GetIconHandle(lua_State *L) static int lua_RemoveIcon(lua_State *L)
{
- switch (lua_type(L, 1))
- {
+ switch (lua_type(L, 1)) {
case LUA_TLIGHTUSERDATA:
IcoLib_RemoveIconByHandle(lua_touserdata(L, 1));
break;
|