From 3afe01569c99d056523ee96fdf8d8f9ce3ca39fa Mon Sep 17 00:00:00 2001 From: spx Date: Thu, 1 Oct 2009 03:13:19 +0000 Subject: [PATCH] Broken backwards compatibility was fixed. ([Measure] contained in Action in Measure and Meter are not replaced when reading skins. They are replaced only when executing action.) --- Library/Measure.cpp | 6 +++--- Library/MeasureNet.cpp | 2 +- Library/Meter.cpp | 16 ++++++++-------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Library/Measure.cpp b/Library/Measure.cpp index 17b1587e..fcd735fa 100644 --- a/Library/Measure.cpp +++ b/Library/Measure.cpp @@ -100,13 +100,13 @@ void CMeasure::ReadConfig(CConfigParser& parser, const WCHAR* section) // The ifabove/ifbelow define actions that are ran when the value goes above/below the given number. m_IfAboveValue = parser.ReadFloat(section, L"IfAboveValue", 0.0); - m_IfAboveAction = parser.ReadString(section, L"IfAboveAction", L""); + m_IfAboveAction = parser.ReadString(section, L"IfAboveAction", L"", false); m_IfBelowValue = parser.ReadFloat(section, L"IfBelowValue", 0.0); - m_IfBelowAction = parser.ReadString(section, L"IfBelowAction", L""); + m_IfBelowAction = parser.ReadString(section, L"IfBelowAction", L"", false); m_IfEqualValue = parser.ReadFloat(section, L"IfEqualValue", 0.0); - m_IfEqualAction = parser.ReadString(section, L"IfEqualAction", L""); + m_IfEqualAction = parser.ReadString(section, L"IfEqualAction", L"", false); m_AverageSize = parser.ReadInt(section, L"AverageSize", 0); diff --git a/Library/MeasureNet.cpp b/Library/MeasureNet.cpp index de4d060d..8efe5c11 100644 --- a/Library/MeasureNet.cpp +++ b/Library/MeasureNet.cpp @@ -286,7 +286,7 @@ void CMeasureNet::ReadConfig(CConfigParser& parser, const WCHAR* section, NET ne m_Cumulative = 0!=parser.ReadInt(section, L"Cumulative", 0); m_TrafficValue = parser.ReadFloat(section, L"TrafficValue", 0.0); - m_TrafficAction = parser.ReadString(section, L"TrafficAction", L""); + m_TrafficAction = parser.ReadString(section, L"TrafficAction", L"", false); if (maxValue == 0) { diff --git a/Library/Meter.cpp b/Library/Meter.cpp index ef35a7d6..47081f13 100644 --- a/Library/Meter.cpp +++ b/Library/Meter.cpp @@ -264,14 +264,14 @@ void CMeter::ReadConfig(const WCHAR* section) m_SolidColor2 = parser.ReadColor(section, L"SolidColor2", m_SolidColor); m_SolidAngle = (Gdiplus::REAL)parser.ReadFloat(section, L"GradientAngle", 0.0); - m_RightMouseDownAction = parser.ReadString(section, L"RightMouseDownAction", L""); - m_LeftMouseDownAction = parser.ReadString(section, L"LeftMouseDownAction", L""); - m_MiddleMouseDownAction = parser.ReadString(section, L"MiddleMouseDownAction", L""); - m_RightMouseUpAction = parser.ReadString(section, L"RightMouseUpAction", L""); - m_LeftMouseUpAction = parser.ReadString(section, L"LeftMouseUpAction", L""); - m_MiddleMouseUpAction = parser.ReadString(section, L"MiddleMouseUpAction", L""); - m_MouseOverAction = parser.ReadString(section, L"MouseOverAction", L""); - m_MouseLeaveAction = parser.ReadString(section, L"MouseLeaveAction", L""); + m_RightMouseDownAction = parser.ReadString(section, L"RightMouseDownAction", L"", false); + m_LeftMouseDownAction = parser.ReadString(section, L"LeftMouseDownAction", L"", false); + m_MiddleMouseDownAction = parser.ReadString(section, L"MiddleMouseDownAction", L"", false); + m_RightMouseUpAction = parser.ReadString(section, L"RightMouseUpAction", L"", false); + m_LeftMouseUpAction = parser.ReadString(section, L"LeftMouseUpAction", L"", false); + m_MiddleMouseUpAction = parser.ReadString(section, L"MiddleMouseUpAction", L"", false); + m_MouseOverAction = parser.ReadString(section, L"MouseOverAction", L"", false); + m_MouseLeaveAction = parser.ReadString(section, L"MouseLeaveAction", L"", false); m_MouseActionCursor = 0!= parser.ReadInt(section, L"MouseActionCursor", 1);