mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
- Script: Fixed that Unicode characters were not correctly displayed
- About Log: 20 last log items are now displayed on launch - LOG_DEBUG messages are ignored from plugins only when not in Debug mode
This commit is contained in:
@ -7,7 +7,7 @@ static int Measure_GetName(lua_State* L)
|
||||
{
|
||||
CMeasure* self = (CMeasure*)tolua_tousertype(L, 1, 0);
|
||||
const WCHAR* val = (const WCHAR*)self->GetName();
|
||||
push_wchar(L, val);
|
||||
LuaManager::PushWide(L, val);
|
||||
|
||||
return 1;
|
||||
}
|
||||
@ -18,8 +18,7 @@ static int Measure_GetOption(lua_State* L)
|
||||
CMeterWindow* meterWindow = self->GetMeterWindow();
|
||||
CConfigParser& parser = meterWindow->GetParser();
|
||||
|
||||
const char* arg = (const char*)tolua_tostring(L, 2, 0);
|
||||
std::wstring strTmp = ConvertToWide(arg);
|
||||
std::wstring strTmp = LuaManager::ToWide(L, 2);
|
||||
strTmp = parser.GetValue(self->GetName(), strTmp, L"");
|
||||
|
||||
parser.SetBuiltInVariable(L"CURRENTSECTION", self->GetName()); // Set temporarily
|
||||
@ -27,7 +26,7 @@ static int Measure_GetOption(lua_State* L)
|
||||
parser.SetBuiltInVariable(L"CURRENTSECTION", L""); // Reset
|
||||
parser.ReplaceMeasures(strTmp);
|
||||
|
||||
push_wchar(L, strTmp.c_str());
|
||||
LuaManager::PushWide(L, strTmp.c_str());
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -101,7 +100,7 @@ static int Measure_GetStringValue(lua_State* L)
|
||||
bool percentual = (bool)tolua_toboolean(L, 5, false);
|
||||
|
||||
const WCHAR* val = self->GetStringValue(autoScale, scale, decimals, percentual);
|
||||
push_wchar(L, val);
|
||||
LuaManager::PushWide(L, val);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -6,7 +6,8 @@ static int Meter_GetName(lua_State* L)
|
||||
{
|
||||
CMeter* self = (CMeter*)tolua_tousertype(L, 1, 0);
|
||||
const WCHAR* val = (const WCHAR*)self->GetName();
|
||||
push_wchar(L, val);
|
||||
LuaManager::PushWide(L, val);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -16,8 +17,7 @@ static int Meter_GetOption(lua_State* L)
|
||||
CMeterWindow* meterWindow = self->GetMeterWindow();
|
||||
CConfigParser& parser = meterWindow->GetParser();
|
||||
|
||||
const char* arg = (const char*)tolua_tostring(L, 2, 0);
|
||||
std::wstring strTmp = ConvertToWide(arg);
|
||||
std::wstring strTmp = LuaManager::ToWide(L, 2);
|
||||
strTmp = parser.GetValue(self->GetName(), strTmp, L"");
|
||||
|
||||
parser.SetBuiltInVariable(L"CURRENTSECTION", self->GetName()); // Set temporarily
|
||||
@ -25,7 +25,7 @@ static int Meter_GetOption(lua_State* L)
|
||||
parser.SetBuiltInVariable(L"CURRENTSECTION", L""); // Reset
|
||||
parser.ReplaceMeasures(strTmp);
|
||||
|
||||
push_wchar(L, strTmp.c_str());
|
||||
LuaManager::PushWide(L, strTmp.c_str());
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -24,8 +24,8 @@ static int MeterString_Update(lua_State* L)
|
||||
static int MeterString_SetText(lua_State* L)
|
||||
{
|
||||
CMeterString* self = (CMeterString*)tolua_tousertype(L, 1, 0);
|
||||
const WCHAR* text = to_wchar(L, 2, 0);
|
||||
self->SetText(text);
|
||||
std::wstring str = LuaManager::ToWide(L, 2);
|
||||
self->SetText(str.c_str());
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ static int MeterWindow_GetSkinName(lua_State* L)
|
||||
{
|
||||
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||
const std::wstring& val = self->GetSkinName();
|
||||
push_wstring(L, val);
|
||||
LuaManager::PushWide(L, val.c_str());
|
||||
|
||||
return 1;
|
||||
}
|
||||
@ -38,7 +38,7 @@ static int MeterWindow_GetSkinIniFile(lua_State* L)
|
||||
{
|
||||
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||
const std::wstring& val = self->GetSkinIniFile();
|
||||
push_wchar(L, val.c_str());
|
||||
LuaManager::PushWide(L, val.c_str());
|
||||
|
||||
return 1;
|
||||
}
|
||||
@ -82,10 +82,10 @@ static int MeterWindow_GetY(lua_State* L)
|
||||
static int MeterWindow_MakePathAbsolute(lua_State* L)
|
||||
{
|
||||
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||
const std::wstring path = to_wstring(L, 2, 0);
|
||||
const std::wstring path = LuaManager::ToWide(L, 2);
|
||||
|
||||
std::wstring val = self->MakePathAbsolute(path);
|
||||
push_wstring(L, val);
|
||||
LuaManager::PushWide(L, val.c_str());
|
||||
|
||||
return 1;
|
||||
}
|
||||
@ -93,7 +93,7 @@ static int MeterWindow_MakePathAbsolute(lua_State* L)
|
||||
static int MeterWindow_GetMeter(lua_State* L)
|
||||
{
|
||||
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||
const std::wstring meterName = to_wstring(L, 2, 0);
|
||||
const std::wstring meterName = LuaManager::ToWide(L, 2);
|
||||
|
||||
CMeter* meter = self->GetMeter(meterName);
|
||||
if (!meter)
|
||||
@ -120,7 +120,7 @@ static int MeterWindow_GetMeter(lua_State* L)
|
||||
static int MeterWindow_GetMeasure(lua_State* L)
|
||||
{
|
||||
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||
const std::wstring measureName = to_wstring(L, 2, 0);
|
||||
const std::wstring measureName = LuaManager::ToWide(L, 2);
|
||||
|
||||
CMeasure* val = self->GetMeasure(measureName);
|
||||
tolua_pushusertype(L, (void*)val, "CMeasure");
|
||||
@ -131,13 +131,11 @@ static int MeterWindow_GetMeasure(lua_State* L)
|
||||
static int MeterWindow_GetVariable(lua_State* L)
|
||||
{
|
||||
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||
const char* arg = (const char*)tolua_tostring(L, 2, 0);
|
||||
std::wstring strTmp = ConvertToWide(arg);
|
||||
std::wstring strTmp = LuaManager::ToWide(L, 2);
|
||||
|
||||
if (self->GetParser().GetVariable(strTmp, strTmp))
|
||||
{
|
||||
std::string val = ConvertToAscii(strTmp.c_str());
|
||||
tolua_pushstring(L, val.c_str());
|
||||
LuaManager::PushWide(L, strTmp.c_str());
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
@ -149,12 +147,10 @@ static int MeterWindow_GetVariable(lua_State* L)
|
||||
static int MeterWindow_ReplaceVariables(lua_State* L)
|
||||
{
|
||||
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||
const char* arg = (const char*)tolua_tostring(L, 2, 0);
|
||||
std::wstring strTmp = ConvertToWide(arg);
|
||||
std::wstring strTmp = LuaManager::ToWide(L, 2);
|
||||
|
||||
self->GetParser().ReplaceVariables(strTmp);
|
||||
std::string val = ConvertToAscii(strTmp.c_str());
|
||||
tolua_pushstring(L, val.c_str());
|
||||
LuaManager::PushWide(L, strTmp.c_str());
|
||||
|
||||
return 1;
|
||||
}
|
||||
@ -162,8 +158,7 @@ static int MeterWindow_ReplaceVariables(lua_State* L)
|
||||
static int MeterWindow_Bang(lua_State* L)
|
||||
{
|
||||
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||
const char* arg = (const char*)tolua_tostring(L, 2, 0);
|
||||
std::wstring strTmp = ConvertToWide(arg);
|
||||
std::wstring strTmp = LuaManager::ToWide(L, 2);
|
||||
|
||||
CConfigParser& parser = self->GetParser();
|
||||
parser.ReplaceVariables(strTmp);
|
||||
|
Reference in New Issue
Block a user