Cosmetics

This commit is contained in:
Birunthan Mohanathas 2012-05-30 21:53:44 +03:00
parent 6efb485e69
commit e3d92d354c
59 changed files with 106 additions and 106 deletions

View File

@ -115,7 +115,7 @@ void CMeasure::Initialize()
** must call the base implementation if they overwrite this method. ** must call the base implementation if they overwrite this method.
** **
*/ */
void CMeasure::ReadConfig(CConfigParser& parser, const WCHAR* section) void CMeasure::ReadOptions(CConfigParser& parser, const WCHAR* section)
{ {
// Clear substitutes to prevent from being added more than once. // Clear substitutes to prevent from being added more than once.
if (!m_Substitute.empty()) if (!m_Substitute.empty())

View File

@ -49,7 +49,7 @@ public:
virtual UINT GetTypeID() = 0; virtual UINT GetTypeID() = 0;
void ReadConfig(CConfigParser& parser) { ReadConfig(parser, GetName()); } void ReadOptions(CConfigParser& parser) { ReadOptions(parser, GetName()); }
virtual void Initialize(); virtual void Initialize();
bool Update(); bool Update();
@ -85,7 +85,7 @@ public:
static CMeasure* Create(const WCHAR* measure, CMeterWindow* meterWindow, const WCHAR* name); static CMeasure* Create(const WCHAR* measure, CMeterWindow* meterWindow, const WCHAR* name);
protected: protected:
virtual void ReadConfig(CConfigParser& parser, const WCHAR* section); virtual void ReadOptions(CConfigParser& parser, const WCHAR* section);
virtual void UpdateValue() = 0; virtual void UpdateValue() = 0;
bool ParseSubstitute(std::wstring buffer); bool ParseSubstitute(std::wstring buffer);

View File

@ -94,9 +94,9 @@ CMeasureCPU::~CMeasureCPU()
** Reads the measure specific configs. ** Reads the measure specific configs.
** **
*/ */
void CMeasureCPU::ReadConfig(CConfigParser& parser, const WCHAR* section) void CMeasureCPU::ReadOptions(CConfigParser& parser, const WCHAR* section)
{ {
CMeasure::ReadConfig(parser, section); CMeasure::ReadOptions(parser, section);
int processor = parser.ReadInt(section, L"Processor", 0); int processor = parser.ReadInt(section, L"Processor", 0);

View File

@ -32,7 +32,7 @@ public:
virtual UINT GetTypeID() { return TypeID<CMeasureCPU>(); } virtual UINT GetTypeID() { return TypeID<CMeasureCPU>(); }
protected: protected:
virtual void ReadConfig(CConfigParser& parser, const WCHAR* section); virtual void ReadOptions(CConfigParser& parser, const WCHAR* section);
virtual void UpdateValue(); virtual void UpdateValue();
private: private:

View File

@ -75,9 +75,9 @@ void CMeasureCalc::UpdateValue()
** Reads the measure specific configs. ** Reads the measure specific configs.
** **
*/ */
void CMeasureCalc::ReadConfig(CConfigParser& parser, const WCHAR* section) void CMeasureCalc::ReadOptions(CConfigParser& parser, const WCHAR* section)
{ {
CMeasure::ReadConfig(parser, section); CMeasure::ReadOptions(parser, section);
// Store the current values so we know if the value needs to be updated // Store the current values so we know if the value needs to be updated
int oldLowBound = m_LowBound; int oldLowBound = m_LowBound;

View File

@ -32,7 +32,7 @@ public:
bool GetMeasureValue(const WCHAR* str, int len, double* value); bool GetMeasureValue(const WCHAR* str, int len, double* value);
protected: protected:
virtual void ReadConfig(CConfigParser& parser, const WCHAR* section); virtual void ReadOptions(CConfigParser& parser, const WCHAR* section);
virtual void UpdateValue(); virtual void UpdateValue();
private: private:

View File

@ -179,11 +179,11 @@ const WCHAR* CMeasureDiskSpace::GetStringValue(AUTOSCALE autoScale, double scale
** Reads the measure specific configs. ** Reads the measure specific configs.
** **
*/ */
void CMeasureDiskSpace::ReadConfig(CConfigParser& parser, const WCHAR* section) void CMeasureDiskSpace::ReadOptions(CConfigParser& parser, const WCHAR* section)
{ {
double oldMaxValue = m_MaxValue; double oldMaxValue = m_MaxValue;
CMeasure::ReadConfig(parser, section); CMeasure::ReadOptions(parser, section);
m_Drive = parser.ReadString(section, L"Drive", L"C:\\"); m_Drive = parser.ReadString(section, L"Drive", L"C:\\");
if (m_Drive.empty()) if (m_Drive.empty())

View File

@ -32,7 +32,7 @@ public:
virtual const WCHAR* GetStringValue(AUTOSCALE autoScale, double scale, int decimals, bool percentual); virtual const WCHAR* GetStringValue(AUTOSCALE autoScale, double scale, int decimals, bool percentual);
protected: protected:
virtual void ReadConfig(CConfigParser& parser, const WCHAR* section); virtual void ReadOptions(CConfigParser& parser, const WCHAR* section);
virtual void UpdateValue(); virtual void UpdateValue();
private: private:

View File

@ -60,9 +60,9 @@ void CMeasureMemory::UpdateValue()
** Reads the measure specific configs. ** Reads the measure specific configs.
** **
*/ */
void CMeasureMemory::ReadConfig(CConfigParser& parser, const WCHAR* section) void CMeasureMemory::ReadOptions(CConfigParser& parser, const WCHAR* section)
{ {
CMeasure::ReadConfig(parser, section); CMeasure::ReadOptions(parser, section);
m_Total = (1 == parser.ReadInt(section, L"Total", 0)); m_Total = (1 == parser.ReadInt(section, L"Total", 0));

View File

@ -30,7 +30,7 @@ public:
virtual UINT GetTypeID() { return TypeID<CMeasureMemory>(); } virtual UINT GetTypeID() { return TypeID<CMeasureMemory>(); }
protected: protected:
virtual void ReadConfig(CConfigParser& parser, const WCHAR* section); virtual void ReadOptions(CConfigParser& parser, const WCHAR* section);
virtual void UpdateValue(); virtual void UpdateValue();
private: private:

View File

@ -438,7 +438,7 @@ ULONG64 CMeasureNet::GetNetStatsValue(NET net)
** the net-parameter informs which inherited class called this method. ** the net-parameter informs which inherited class called this method.
** **
*/ */
void CMeasureNet::ReadConfig(CConfigParser& parser, const WCHAR* section, NET net) void CMeasureNet::ReadOptions(CConfigParser& parser, const WCHAR* section, NET net)
{ {
double value; double value;
const WCHAR* netName = NULL; const WCHAR* netName = NULL;

View File

@ -53,7 +53,7 @@ public:
static void FinalizeNewApi(); static void FinalizeNewApi();
protected: protected:
void ReadConfig(CConfigParser& parser, const WCHAR* section, CMeasureNet::NET net); void ReadOptions(CConfigParser& parser, const WCHAR* section, CMeasureNet::NET net);
void UpdateValue(); void UpdateValue();
ULONG64 GetNetOctets(NET net); ULONG64 GetNetOctets(NET net);

View File

@ -82,9 +82,9 @@ void CMeasureNetIn::UpdateValue()
** Reads the measure specific configs. ** Reads the measure specific configs.
** **
*/ */
void CMeasureNetIn::ReadConfig(CConfigParser& parser, const WCHAR* section) void CMeasureNetIn::ReadOptions(CConfigParser& parser, const WCHAR* section)
{ {
CMeasure::ReadConfig(parser, section); CMeasure::ReadOptions(parser, section);
CMeasureNet::ReadConfig(parser, section, NET_IN); CMeasureNet::ReadOptions(parser, section, NET_IN);
} }

View File

@ -28,7 +28,7 @@ public:
virtual ~CMeasureNetIn(); virtual ~CMeasureNetIn();
protected: protected:
virtual void ReadConfig(CConfigParser& parser, const WCHAR* section); virtual void ReadOptions(CConfigParser& parser, const WCHAR* section);
virtual void UpdateValue(); virtual void UpdateValue();
private: private:

View File

@ -82,8 +82,8 @@ void CMeasureNetOut::UpdateValue()
** Reads the measure specific configs. ** Reads the measure specific configs.
** **
*/ */
void CMeasureNetOut::ReadConfig(CConfigParser& parser, const WCHAR* section) void CMeasureNetOut::ReadOptions(CConfigParser& parser, const WCHAR* section)
{ {
CMeasure::ReadConfig(parser, section); CMeasure::ReadOptions(parser, section);
CMeasureNet::ReadConfig(parser, section, NET_OUT); CMeasureNet::ReadOptions(parser, section, NET_OUT);
} }

View File

@ -28,7 +28,7 @@ public:
virtual ~CMeasureNetOut(); virtual ~CMeasureNetOut();
protected: protected:
virtual void ReadConfig(CConfigParser& parser, const WCHAR* section); virtual void ReadOptions(CConfigParser& parser, const WCHAR* section);
virtual void UpdateValue(); virtual void UpdateValue();
private: private:

View File

@ -82,8 +82,8 @@ void CMeasureNetTotal::UpdateValue()
** Reads the measure specific configs. ** Reads the measure specific configs.
** **
*/ */
void CMeasureNetTotal::ReadConfig(CConfigParser& parser, const WCHAR* section) void CMeasureNetTotal::ReadOptions(CConfigParser& parser, const WCHAR* section)
{ {
CMeasure::ReadConfig(parser, section); CMeasure::ReadOptions(parser, section);
CMeasureNet::ReadConfig(parser, section, NET_TOTAL); CMeasureNet::ReadOptions(parser, section, NET_TOTAL);
} }

View File

@ -28,7 +28,7 @@ public:
virtual ~CMeasureNetTotal(); virtual ~CMeasureNetTotal();
protected: protected:
virtual void ReadConfig(CConfigParser& parser, const WCHAR* section); virtual void ReadOptions(CConfigParser& parser, const WCHAR* section);
virtual void UpdateValue(); virtual void UpdateValue();
private: private:

View File

@ -60,9 +60,9 @@ void CMeasurePhysicalMemory::UpdateValue()
** Reads the measure specific configs. ** Reads the measure specific configs.
** **
*/ */
void CMeasurePhysicalMemory::ReadConfig(CConfigParser& parser, const WCHAR* section) void CMeasurePhysicalMemory::ReadOptions(CConfigParser& parser, const WCHAR* section)
{ {
CMeasure::ReadConfig(parser, section); CMeasure::ReadOptions(parser, section);
m_Total = (1 == parser.ReadInt(section, L"Total", 0)); m_Total = (1 == parser.ReadInt(section, L"Total", 0));

View File

@ -30,7 +30,7 @@ public:
virtual UINT GetTypeID() { return TypeID<CMeasurePhysicalMemory>(); } virtual UINT GetTypeID() { return TypeID<CMeasurePhysicalMemory>(); }
protected: protected:
virtual void ReadConfig(CConfigParser& parser, const WCHAR* section); virtual void ReadOptions(CConfigParser& parser, const WCHAR* section);
virtual void UpdateValue(); virtual void UpdateValue();
private: private:

View File

@ -99,11 +99,11 @@ void CMeasurePlugin::UpdateValue()
** Reads the configs and loads & initializes the plugin ** Reads the configs and loads & initializes the plugin
** **
*/ */
void CMeasurePlugin::ReadConfig(CConfigParser& parser, const WCHAR* section) void CMeasurePlugin::ReadOptions(CConfigParser& parser, const WCHAR* section)
{ {
static UINT id = 0; static UINT id = 0;
CMeasure::ReadConfig(parser, section); CMeasure::ReadOptions(parser, section);
if (m_Initialized) if (m_Initialized)
{ {

View File

@ -48,7 +48,7 @@ public:
virtual void Command(const std::wstring& command); virtual void Command(const std::wstring& command);
protected: protected:
virtual void ReadConfig(CConfigParser& parser, const WCHAR* section); virtual void ReadOptions(CConfigParser& parser, const WCHAR* section);
virtual void UpdateValue(); virtual void UpdateValue();
private: private:

View File

@ -104,9 +104,9 @@ void CMeasureRegistry::UpdateValue()
** Reads the measure specific configs. ** Reads the measure specific configs.
** **
*/ */
void CMeasureRegistry::ReadConfig(CConfigParser& parser, const WCHAR* section) void CMeasureRegistry::ReadOptions(CConfigParser& parser, const WCHAR* section)
{ {
CMeasure::ReadConfig(parser, section); CMeasure::ReadOptions(parser, section);
const WCHAR* keyname = parser.ReadString(section, L"RegHKey", L"HKEY_CURRENT_USER").c_str(); const WCHAR* keyname = parser.ReadString(section, L"RegHKey", L"HKEY_CURRENT_USER").c_str();
if (_wcsicmp(keyname, L"HKEY_CURRENT_USER") == 0) if (_wcsicmp(keyname, L"HKEY_CURRENT_USER") == 0)

View File

@ -32,7 +32,7 @@ public:
virtual const WCHAR* GetStringValue(AUTOSCALE autoScale, double scale, int decimals, bool percentual); virtual const WCHAR* GetStringValue(AUTOSCALE autoScale, double scale, int decimals, bool percentual);
protected: protected:
virtual void ReadConfig(CConfigParser& parser, const WCHAR* section); virtual void ReadOptions(CConfigParser& parser, const WCHAR* section);
virtual void UpdateValue(); virtual void UpdateValue();
private: private:

View File

@ -110,10 +110,10 @@ const WCHAR* CMeasureScript::GetStringValue(AUTOSCALE autoScale, double scale, i
** Reads the measure specific configs. ** Reads the measure specific configs.
** **
*/ */
void CMeasureScript::ReadConfig(CConfigParser& parser, const WCHAR* section) void CMeasureScript::ReadOptions(CConfigParser& parser, const WCHAR* section)
{ {
// Read common configs // Read common configs
CMeasure::ReadConfig(parser, section); CMeasure::ReadOptions(parser, section);
std::wstring file = parser.ReadString(section, L"ScriptFile", L""); std::wstring file = parser.ReadString(section, L"ScriptFile", L"");

View File

@ -36,7 +36,7 @@ public:
void DeleteLuaScript(); void DeleteLuaScript();
protected: protected:
virtual void ReadConfig(CConfigParser& parser, const WCHAR* section); virtual void ReadOptions(CConfigParser& parser, const WCHAR* section);
virtual void UpdateValue(); virtual void UpdateValue();
private: private:

View File

@ -210,9 +210,9 @@ const WCHAR* CMeasureTime::GetStringValue(AUTOSCALE autoScale, double scale, int
** Reads the measure specific configs. ** Reads the measure specific configs.
** **
*/ */
void CMeasureTime::ReadConfig(CConfigParser& parser, const WCHAR* section) void CMeasureTime::ReadOptions(CConfigParser& parser, const WCHAR* section)
{ {
CMeasure::ReadConfig(parser, section); CMeasure::ReadOptions(parser, section);
m_Format = parser.ReadString(section, L"Format", L""); m_Format = parser.ReadString(section, L"Format", L"");

View File

@ -32,7 +32,7 @@ public:
virtual const WCHAR* GetStringValue(AUTOSCALE autoScale, double scale, int decimals, bool percentual); virtual const WCHAR* GetStringValue(AUTOSCALE autoScale, double scale, int decimals, bool percentual);
protected: protected:
virtual void ReadConfig(CConfigParser& parser, const WCHAR* section); virtual void ReadOptions(CConfigParser& parser, const WCHAR* section);
virtual void UpdateValue(); virtual void UpdateValue();
private: private:

View File

@ -42,9 +42,9 @@ CMeasureUptime::~CMeasureUptime()
** Reads the measure specific configs. ** Reads the measure specific configs.
** **
*/ */
void CMeasureUptime::ReadConfig(CConfigParser& parser, const WCHAR* section) void CMeasureUptime::ReadOptions(CConfigParser& parser, const WCHAR* section)
{ {
CMeasure::ReadConfig(parser, section); CMeasure::ReadOptions(parser, section);
m_Format = parser.ReadString(section, L"Format", L"%4!i!d %3!i!:%2!02i!"); m_Format = parser.ReadString(section, L"Format", L"%4!i!d %3!i!:%2!02i!");

View File

@ -32,7 +32,7 @@ public:
virtual const WCHAR* GetStringValue(AUTOSCALE autoScale, double scale, int decimals, bool percentual); virtual const WCHAR* GetStringValue(AUTOSCALE autoScale, double scale, int decimals, bool percentual);
protected: protected:
virtual void ReadConfig(CConfigParser& parser, const WCHAR* section); virtual void ReadOptions(CConfigParser& parser, const WCHAR* section);
virtual void UpdateValue(); virtual void UpdateValue();
private: private:

View File

@ -60,9 +60,9 @@ void CMeasureVirtualMemory::UpdateValue()
** Reads the measure specific configs. ** Reads the measure specific configs.
** **
*/ */
void CMeasureVirtualMemory::ReadConfig(CConfigParser& parser, const WCHAR* section) void CMeasureVirtualMemory::ReadOptions(CConfigParser& parser, const WCHAR* section)
{ {
CMeasure::ReadConfig(parser, section); CMeasure::ReadOptions(parser, section);
m_Total = (1 == parser.ReadInt(section, L"Total", 0)); m_Total = (1 == parser.ReadInt(section, L"Total", 0));

View File

@ -30,7 +30,7 @@ public:
virtual UINT GetTypeID() { return TypeID<CMeasureVirtualMemory>(); } virtual UINT GetTypeID() { return TypeID<CMeasureVirtualMemory>(); }
protected: protected:
virtual void ReadConfig(CConfigParser& parser, const WCHAR* section); virtual void ReadOptions(CConfigParser& parser, const WCHAR* section);
virtual void UpdateValue(); virtual void UpdateValue();
private: private:

View File

@ -253,7 +253,7 @@ void CMeter::Hide()
** the base implementation if they overwrite this method. ** the base implementation if they overwrite this method.
** **
*/ */
void CMeter::ReadConfig(CConfigParser& parser, const WCHAR* section) void CMeter::ReadOptions(CConfigParser& parser, const WCHAR* section)
{ {
// The MeterStyle defines a template where the values are read if the meter doesn't have it itself // The MeterStyle defines a template where the values are read if the meter doesn't have it itself
const std::wstring& style = parser.ReadString(section, L"MeterStyle", L""); const std::wstring& style = parser.ReadString(section, L"MeterStyle", L"");

View File

@ -38,7 +38,7 @@ public:
virtual UINT GetTypeID() = 0; virtual UINT GetTypeID() = 0;
void ReadConfig(CConfigParser& parser) { ReadConfig(parser, GetName()); parser.ClearStyleTemplate(); } void ReadOptions(CConfigParser& parser) { ReadOptions(parser, GetName()); parser.ClearStyleTemplate(); }
virtual void Initialize(); virtual void Initialize();
virtual bool Update(); virtual bool Update();
@ -127,7 +127,7 @@ protected:
POSITION_RELATIVE_BR POSITION_RELATIVE_BR
}; };
virtual void ReadConfig(CConfigParser& parser, const WCHAR* section); virtual void ReadOptions(CConfigParser& parser, const WCHAR* section);
void SetAllMeasures(CMeasure* measure); void SetAllMeasures(CMeasure* measure);
void SetAllMeasures(const std::vector<CMeasure*>& measures); void SetAllMeasures(const std::vector<CMeasure*>& measures);

View File

@ -82,7 +82,7 @@ void CMeterBar::Initialize()
** Read the meter-specific configs from the ini-file. ** Read the meter-specific configs from the ini-file.
** **
*/ */
void CMeterBar::ReadConfig(CConfigParser& parser, const WCHAR* section) void CMeterBar::ReadOptions(CConfigParser& parser, const WCHAR* section)
{ {
// Store the current values so we know if the image needs to be updated // Store the current values so we know if the image needs to be updated
std::wstring oldImageName = m_ImageName; std::wstring oldImageName = m_ImageName;
@ -90,7 +90,7 @@ void CMeterBar::ReadConfig(CConfigParser& parser, const WCHAR* section)
int oldH = m_H; int oldH = m_H;
// Read common configs // Read common configs
CMeter::ReadConfig(parser, section); CMeter::ReadOptions(parser, section);
m_Color = parser.ReadColor(section, L"BarColor", Color::Green); m_Color = parser.ReadColor(section, L"BarColor", Color::Green);
@ -100,7 +100,7 @@ void CMeterBar::ReadConfig(CConfigParser& parser, const WCHAR* section)
m_MeterWindow->MakePathAbsolute(m_ImageName); m_MeterWindow->MakePathAbsolute(m_ImageName);
// Read tinting configs // Read tinting configs
m_Image.ReadConfig(parser, section); m_Image.ReadOptions(parser, section);
} }
else else
{ {

View File

@ -35,7 +35,7 @@ public:
virtual bool Draw(Gdiplus::Graphics& graphics); virtual bool Draw(Gdiplus::Graphics& graphics);
protected: protected:
virtual void ReadConfig(CConfigParser& parser, const WCHAR* section); virtual void ReadOptions(CConfigParser& parser, const WCHAR* section);
private: private:
enum ORIENTATION enum ORIENTATION

View File

@ -154,7 +154,7 @@ bool CMeterBitmap::HitTest(int x, int y)
** Read the meter-specific configs from the ini-file. ** Read the meter-specific configs from the ini-file.
** **
*/ */
void CMeterBitmap::ReadConfig(CConfigParser& parser, const WCHAR* section) void CMeterBitmap::ReadOptions(CConfigParser& parser, const WCHAR* section)
{ {
// Store the current values so we know if the image needs to be updated // Store the current values so we know if the image needs to be updated
std::wstring oldImageName = m_ImageName; std::wstring oldImageName = m_ImageName;
@ -162,7 +162,7 @@ void CMeterBitmap::ReadConfig(CConfigParser& parser, const WCHAR* section)
int oldH = m_H; int oldH = m_H;
// Read common configs // Read common configs
CMeter::ReadConfig(parser, section); CMeter::ReadOptions(parser, section);
m_ImageName = parser.ReadString(section, L"BitmapImage", L""); m_ImageName = parser.ReadString(section, L"BitmapImage", L"");
if (!m_ImageName.empty()) if (!m_ImageName.empty())
@ -170,7 +170,7 @@ void CMeterBitmap::ReadConfig(CConfigParser& parser, const WCHAR* section)
m_MeterWindow->MakePathAbsolute(m_ImageName); m_MeterWindow->MakePathAbsolute(m_ImageName);
// Read tinting configs // Read tinting configs
m_Image.ReadConfig(parser, section); m_Image.ReadOptions(parser, section);
} }
else else
{ {

View File

@ -38,7 +38,7 @@ public:
virtual bool HasActiveTransition(); virtual bool HasActiveTransition();
protected: protected:
virtual void ReadConfig(CConfigParser& parser, const WCHAR* section); virtual void ReadOptions(CConfigParser& parser, const WCHAR* section);
private: private:
CTintedImage m_Image; CTintedImage m_Image;

View File

@ -126,7 +126,7 @@ void CMeterButton::Initialize()
** Read the meter-specific configs from the ini-file. ** Read the meter-specific configs from the ini-file.
** **
*/ */
void CMeterButton::ReadConfig(CConfigParser& parser, const WCHAR* section) void CMeterButton::ReadOptions(CConfigParser& parser, const WCHAR* section)
{ {
// Store the current values so we know if the image needs to be updated // Store the current values so we know if the image needs to be updated
std::wstring oldImageName = m_ImageName; std::wstring oldImageName = m_ImageName;
@ -134,7 +134,7 @@ void CMeterButton::ReadConfig(CConfigParser& parser, const WCHAR* section)
int oldH = m_H; int oldH = m_H;
// Read common configs // Read common configs
CMeter::ReadConfig(parser, section); CMeter::ReadOptions(parser, section);
m_ImageName = parser.ReadString(section, L"ButtonImage", L""); m_ImageName = parser.ReadString(section, L"ButtonImage", L"");
if (!m_ImageName.empty()) if (!m_ImageName.empty())
@ -142,7 +142,7 @@ void CMeterButton::ReadConfig(CConfigParser& parser, const WCHAR* section)
m_MeterWindow->MakePathAbsolute(m_ImageName); m_MeterWindow->MakePathAbsolute(m_ImageName);
// Read tinting configs // Read tinting configs
m_Image.ReadConfig(parser, section); m_Image.ReadOptions(parser, section);
} }
else else
{ {

View File

@ -44,7 +44,7 @@ public:
void SetFocus(bool f) { m_Focus = f; } void SetFocus(bool f) { m_Focus = f; }
protected: protected:
virtual void ReadConfig(CConfigParser& parser, const WCHAR* section); virtual void ReadOptions(CConfigParser& parser, const WCHAR* section);
private: private:
bool HitTest2(int px, int py, bool checkAlpha); bool HitTest2(int px, int py, bool checkAlpha);

View File

@ -182,7 +182,7 @@ void CMeterHistogram::Initialize()
** Read the meter-specific configs from the ini-file. ** Read the meter-specific configs from the ini-file.
** **
*/ */
void CMeterHistogram::ReadConfig(CConfigParser& parser, const WCHAR* section) void CMeterHistogram::ReadOptions(CConfigParser& parser, const WCHAR* section)
{ {
// Store the current values so we know if the image needs to be updated // Store the current values so we know if the image needs to be updated
std::wstring oldPrimaryImageName = m_PrimaryImageName; std::wstring oldPrimaryImageName = m_PrimaryImageName;
@ -192,7 +192,7 @@ void CMeterHistogram::ReadConfig(CConfigParser& parser, const WCHAR* section)
int oldH = m_H; int oldH = m_H;
// Read common configs // Read common configs
CMeter::ReadConfig(parser, section); CMeter::ReadOptions(parser, section);
m_PrimaryColor = parser.ReadColor(section, L"PrimaryColor", Color::Green); m_PrimaryColor = parser.ReadColor(section, L"PrimaryColor", Color::Green);
m_SecondaryColor = parser.ReadColor(section, L"SecondaryColor", Color::Red); m_SecondaryColor = parser.ReadColor(section, L"SecondaryColor", Color::Red);
@ -213,7 +213,7 @@ void CMeterHistogram::ReadConfig(CConfigParser& parser, const WCHAR* section)
m_MeterWindow->MakePathAbsolute(m_PrimaryImageName); m_MeterWindow->MakePathAbsolute(m_PrimaryImageName);
// Read tinting configs // Read tinting configs
m_PrimaryImage.ReadConfig(parser, section); m_PrimaryImage.ReadOptions(parser, section);
} }
else else
{ {
@ -226,7 +226,7 @@ void CMeterHistogram::ReadConfig(CConfigParser& parser, const WCHAR* section)
m_MeterWindow->MakePathAbsolute(m_SecondaryImageName); m_MeterWindow->MakePathAbsolute(m_SecondaryImageName);
// Read tinting configs // Read tinting configs
m_SecondaryImage.ReadConfig(parser, section); m_SecondaryImage.ReadOptions(parser, section);
} }
else else
{ {
@ -239,7 +239,7 @@ void CMeterHistogram::ReadConfig(CConfigParser& parser, const WCHAR* section)
m_MeterWindow->MakePathAbsolute(m_OverlapImageName); m_MeterWindow->MakePathAbsolute(m_OverlapImageName);
// Read tinting configs // Read tinting configs
m_OverlapImage.ReadConfig(parser, section); m_OverlapImage.ReadOptions(parser, section);
} }
else else
{ {

View File

@ -36,7 +36,7 @@ public:
virtual void BindMeasure(const std::list<CMeasure*>& measures); virtual void BindMeasure(const std::list<CMeasure*>& measures);
protected: protected:
virtual void ReadConfig(CConfigParser& parser, const WCHAR* section); virtual void ReadOptions(CConfigParser& parser, const WCHAR* section);
private: private:
void DisposeBuffer(); void DisposeBuffer();

View File

@ -106,10 +106,10 @@ void CMeterImage::LoadImage(const std::wstring& imageName, bool bLoadAlways)
** Read the meter-specific configs from the ini-file. ** Read the meter-specific configs from the ini-file.
** **
*/ */
void CMeterImage::ReadConfig(CConfigParser& parser, const WCHAR* section) void CMeterImage::ReadOptions(CConfigParser& parser, const WCHAR* section)
{ {
// Read common configs // Read common configs
CMeter::ReadConfig(parser, section); CMeter::ReadOptions(parser, section);
// Check for extra measures // Check for extra measures
if (!m_Initialized && !m_MeasureName.empty()) if (!m_Initialized && !m_MeasureName.empty())
@ -135,7 +135,7 @@ void CMeterImage::ReadConfig(CConfigParser& parser, const WCHAR* section)
m_ScaleMargins = parser.ReadRECT(section, L"ScaleMargins", defMargins); m_ScaleMargins = parser.ReadRECT(section, L"ScaleMargins", defMargins);
// Read tinting configs // Read tinting configs
m_Image.ReadConfig(parser, section); m_Image.ReadOptions(parser, section);
if (m_Initialized && if (m_Initialized &&
!m_Measure && !m_DynamicVariables) !m_Measure && !m_DynamicVariables)

View File

@ -36,7 +36,7 @@ public:
virtual void BindMeasure(const std::list<CMeasure*>& measures); virtual void BindMeasure(const std::list<CMeasure*>& measures);
protected: protected:
virtual void ReadConfig(CConfigParser& parser, const WCHAR* section); virtual void ReadOptions(CConfigParser& parser, const WCHAR* section);
private: private:
void LoadImage(const std::wstring& imageName, bool bLoadAlways); void LoadImage(const std::wstring& imageName, bool bLoadAlways);

View File

@ -99,7 +99,7 @@ void CMeterLine::Initialize()
** Read the meter-specific configs from the ini-file. ** Read the meter-specific configs from the ini-file.
** **
*/ */
void CMeterLine::ReadConfig(CConfigParser& parser, const WCHAR* section) void CMeterLine::ReadOptions(CConfigParser& parser, const WCHAR* section)
{ {
WCHAR tmpName[64]; WCHAR tmpName[64];
@ -108,7 +108,7 @@ void CMeterLine::ReadConfig(CConfigParser& parser, const WCHAR* section)
int oldW = m_W; int oldW = m_W;
// Read common configs // Read common configs
CMeter::ReadConfig(parser, section); CMeter::ReadOptions(parser, section);
int lineCount = parser.ReadInt(section, L"LineCount", 1); int lineCount = parser.ReadInt(section, L"LineCount", 1);

View File

@ -35,7 +35,7 @@ public:
virtual void BindMeasure(const std::list<CMeasure*>& measures); virtual void BindMeasure(const std::list<CMeasure*>& measures);
protected: protected:
virtual void ReadConfig(CConfigParser& parser, const WCHAR* section); virtual void ReadOptions(CConfigParser& parser, const WCHAR* section);
private: private:
std::vector<std::wstring> m_MeasureNames; std::vector<std::wstring> m_MeasureNames;

View File

@ -76,13 +76,13 @@ void CMeterRotator::Initialize()
** Read the meter-specific configs from the ini-file. ** Read the meter-specific configs from the ini-file.
** **
*/ */
void CMeterRotator::ReadConfig(CConfigParser& parser, const WCHAR* section) void CMeterRotator::ReadOptions(CConfigParser& parser, const WCHAR* section)
{ {
// Store the current values so we know if the image needs to be updated // Store the current values so we know if the image needs to be updated
std::wstring oldImageName = m_ImageName; std::wstring oldImageName = m_ImageName;
// Read common configs // Read common configs
CMeter::ReadConfig(parser, section); CMeter::ReadOptions(parser, section);
m_ImageName = parser.ReadString(section, L"ImageName", L""); m_ImageName = parser.ReadString(section, L"ImageName", L"");
if (!m_ImageName.empty()) if (!m_ImageName.empty())
@ -90,7 +90,7 @@ void CMeterRotator::ReadConfig(CConfigParser& parser, const WCHAR* section)
m_MeterWindow->MakePathAbsolute(m_ImageName); m_MeterWindow->MakePathAbsolute(m_ImageName);
// Read tinting configs // Read tinting configs
m_Image.ReadConfig(parser, section); m_Image.ReadOptions(parser, section);
} }
else else
{ {

View File

@ -35,7 +35,7 @@ public:
virtual bool Draw(Gdiplus::Graphics& graphics); virtual bool Draw(Gdiplus::Graphics& graphics);
protected: protected:
virtual void ReadConfig(CConfigParser& parser, const WCHAR* section); virtual void ReadOptions(CConfigParser& parser, const WCHAR* section);
private: private:
CTintedImage m_Image; CTintedImage m_Image;

View File

@ -60,10 +60,10 @@ CMeterRoundLine::~CMeterRoundLine()
** Read the meter-specific configs from the ini-file. ** Read the meter-specific configs from the ini-file.
** **
*/ */
void CMeterRoundLine::ReadConfig(CConfigParser& parser, const WCHAR* section) void CMeterRoundLine::ReadOptions(CConfigParser& parser, const WCHAR* section)
{ {
// Read common configs // Read common configs
CMeter::ReadConfig(parser, section); CMeter::ReadOptions(parser, section);
m_LineWidth = parser.ReadFloat(section, L"LineWidth", 1.0); m_LineWidth = parser.ReadFloat(section, L"LineWidth", 1.0);
m_LineLength = parser.ReadFloat(section, L"LineLength", 20.0); m_LineLength = parser.ReadFloat(section, L"LineLength", 20.0);

View File

@ -33,7 +33,7 @@ public:
virtual bool Draw(Gdiplus::Graphics& graphics); virtual bool Draw(Gdiplus::Graphics& graphics);
protected: protected:
virtual void ReadConfig(CConfigParser& parser, const WCHAR* section); virtual void ReadOptions(CConfigParser& parser, const WCHAR* section);
private: private:
bool m_Solid; bool m_Solid;

View File

@ -310,7 +310,7 @@ void CMeterString::Initialize()
** Read the meter-specific configs from the ini-file. ** Read the meter-specific configs from the ini-file.
** **
*/ */
void CMeterString::ReadConfig(CConfigParser& parser, const WCHAR* section) void CMeterString::ReadOptions(CConfigParser& parser, const WCHAR* section)
{ {
// Store the current font values so we know if the font needs to be updated // Store the current font values so we know if the font needs to be updated
std::wstring oldFontFace = m_FontFace; std::wstring oldFontFace = m_FontFace;
@ -318,7 +318,7 @@ void CMeterString::ReadConfig(CConfigParser& parser, const WCHAR* section)
TEXTSTYLE oldStyle = m_Style; TEXTSTYLE oldStyle = m_Style;
// Read common configs // Read common configs
CMeter::ReadConfig(parser, section); CMeter::ReadOptions(parser, section);
// Check for extra measures // Check for extra measures
if (!m_Initialized && !m_MeasureName.empty()) if (!m_Initialized && !m_MeasureName.empty())

View File

@ -45,7 +45,7 @@ public:
static void EnumerateInstalledFontFamilies(); static void EnumerateInstalledFontFamilies();
protected: protected:
virtual void ReadConfig(CConfigParser& parser, const WCHAR* section); virtual void ReadOptions(CConfigParser& parser, const WCHAR* section);
private: private:
enum TEXTSTYLE enum TEXTSTYLE

View File

@ -394,7 +394,7 @@ void CMeterWindow::Refresh(bool init, bool all)
ZPOSITION oldZPos = m_WindowZPosition; ZPOSITION oldZPos = m_WindowZPosition;
//TODO: Should these be moved to a Reload command instead of hitting the disk on every refresh //TODO: Should these be moved to a Reload command instead of hitting the disk on every refresh
ReadConfig(); // Read the general settings ReadOptions(); // Read the general settings
if (!ReadSkin()) if (!ReadSkin())
{ {
Rainmeter->DeactivateConfig(this, -1); Rainmeter->DeactivateConfig(this, -1);
@ -1361,7 +1361,7 @@ void CMeterWindow::SetOption(const std::wstring& section, const std::wstring& op
{ {
if ((*j)->BelongsToGroup(section)) if ((*j)->BelongsToGroup(section))
{ {
// Force DynamicVariables temporarily (it will reset back to original setting in ReadConfig()) // Force DynamicVariables temporarily (it will reset back to original setting in ReadOptions())
(*j)->SetDynamicVariables(true); (*j)->SetDynamicVariables(true);
if (value.empty()) if (value.empty())
@ -1379,7 +1379,7 @@ void CMeterWindow::SetOption(const std::wstring& section, const std::wstring& op
{ {
if ((*i)->BelongsToGroup(section)) if ((*i)->BelongsToGroup(section))
{ {
// Force DynamicVariables temporarily (it will reset back to original setting in ReadConfig()) // Force DynamicVariables temporarily (it will reset back to original setting in ReadOptions())
(*i)->SetDynamicVariables(true); (*i)->SetDynamicVariables(true);
if (value.empty()) if (value.empty())
@ -1398,7 +1398,7 @@ void CMeterWindow::SetOption(const std::wstring& section, const std::wstring& op
CMeter* meter = GetMeter(section); CMeter* meter = GetMeter(section);
if (meter) if (meter)
{ {
// Force DynamicVariables temporarily (it will reset back to original setting in ReadConfig()) // Force DynamicVariables temporarily (it will reset back to original setting in ReadOptions())
meter->SetDynamicVariables(true); meter->SetDynamicVariables(true);
if (value.empty()) if (value.empty())
@ -1416,7 +1416,7 @@ void CMeterWindow::SetOption(const std::wstring& section, const std::wstring& op
CMeasure* measure = GetMeasure(section); CMeasure* measure = GetMeasure(section);
if (measure) if (measure)
{ {
// Force DynamicVariables temporarily (it will reset back to original setting in ReadConfig()) // Force DynamicVariables temporarily (it will reset back to original setting in ReadOptions())
measure->SetDynamicVariables(true); measure->SetDynamicVariables(true);
if (value.empty()) if (value.empty())
@ -1776,7 +1776,7 @@ void CMeterWindow::ScreenToWindow()
** Reads the current config ** Reads the current config
** **
*/ */
void CMeterWindow::ReadConfig() void CMeterWindow::ReadOptions()
{ {
WCHAR buffer[32]; WCHAR buffer[32];
const std::wstring& iniFile = Rainmeter->GetIniFile(); const std::wstring& iniFile = Rainmeter->GetIniFile();
@ -2170,7 +2170,7 @@ bool CMeterWindow::ReadSkin()
measure = CMeasure::Create(measureName.c_str(), this, section); measure = CMeasure::Create(measureName.c_str(), this, section);
if (measure) if (measure)
{ {
measure->ReadConfig(m_Parser); measure->ReadOptions(m_Parser);
m_Measures.push_back(measure); m_Measures.push_back(measure);
m_Parser.AddMeasure(measure); m_Parser.AddMeasure(measure);
@ -2202,7 +2202,7 @@ bool CMeterWindow::ReadSkin()
meter = CMeter::Create(meterName.c_str(), this, section); meter = CMeter::Create(meterName.c_str(), this, section);
if (meter) if (meter)
{ {
meter->ReadConfig(m_Parser); meter->ReadOptions(m_Parser);
m_Meters.push_back(meter); m_Meters.push_back(meter);
@ -2338,7 +2338,7 @@ bool CMeterWindow::ResizeWindow(bool reset)
{ {
// Load the background // Load the background
CTintedImage* tintedBackground = new CTintedImage(L"Background"); CTintedImage* tintedBackground = new CTintedImage(L"Background");
tintedBackground->ReadConfig(m_Parser, L"Rainmeter"); tintedBackground->ReadOptions(m_Parser, L"Rainmeter");
tintedBackground->LoadImage(m_BackgroundName, true); tintedBackground->LoadImage(m_BackgroundName, true);
if (!tintedBackground->IsLoaded()) if (!tintedBackground->IsLoaded())
@ -2652,7 +2652,7 @@ bool CMeterWindow::UpdateMeasure(CMeasure* measure, bool force)
{ {
try try
{ {
measure->ReadConfig(m_Parser); measure->ReadOptions(m_Parser);
} }
catch (CError& error) catch (CError& error)
{ {
@ -2690,7 +2690,7 @@ bool CMeterWindow::UpdateMeter(CMeter* meter, bool& bActiveTransition, bool forc
{ {
try try
{ {
meter->ReadConfig(m_Parser); meter->ReadOptions(m_Parser);
} }
catch (CError& error) catch (CError& error)
{ {

View File

@ -322,7 +322,7 @@ private:
bool UpdateMeter(CMeter* meter, bool& bActiveTransition, bool force); bool UpdateMeter(CMeter* meter, bool& bActiveTransition, bool force);
void Update(bool refresh); void Update(bool refresh);
void UpdateWindow(int alpha, bool reset); void UpdateWindow(int alpha, bool reset);
void ReadConfig(); void ReadOptions();
void WriteConfig(INT setting = SETTING_ALL); void WriteConfig(INT setting = SETTING_ALL);
bool ReadSkin(); bool ReadSkin();
void InitializeMeasures(); void InitializeMeasures();

View File

@ -2174,7 +2174,7 @@ void CRainmeter::ReadGeneralSettings(const std::wstring& iniFile)
if (m_TrayWindow) if (m_TrayWindow)
{ {
m_TrayWindow->ReadConfig(parser); m_TrayWindow->ReadOptions(parser);
} }
m_GlobalConfig.netInSpeed = parser.ReadFloat(L"Rainmeter", L"NetInSpeed", 0.0); m_GlobalConfig.netInSpeed = parser.ReadFloat(L"Rainmeter", L"NetInSpeed", 0.0);

View File

@ -566,7 +566,7 @@ void CTintedImage::ApplyTransform()
** Read the meter-specific configs from the ini-file. ** Read the meter-specific configs from the ini-file.
** **
*/ */
void CTintedImage::ReadConfig(CConfigParser& parser, const WCHAR* section) void CTintedImage::ReadOptions(CConfigParser& parser, const WCHAR* section)
{ {
// Store the current values so we know if the image needs to be tinted or transformed // Store the current values so we know if the image needs to be tinted or transformed
Rect oldCrop = m_Crop; Rect oldCrop = m_Crop;

View File

@ -68,7 +68,7 @@ public:
CTintedImage(const WCHAR* name = L"Image", const WCHAR** configArray = c_DefaultOptionArray, bool disableTransform = false); CTintedImage(const WCHAR* name = L"Image", const WCHAR** configArray = c_DefaultOptionArray, bool disableTransform = false);
~CTintedImage(); ~CTintedImage();
void ReadConfig(CConfigParser& parser, const WCHAR* section); void ReadOptions(CConfigParser& parser, const WCHAR* section);
bool IsLoaded() { return (m_Bitmap != NULL); } bool IsLoaded() { return (m_Bitmap != NULL); }
bool IsTinted() { return (m_BitmapTint != NULL); } bool IsTinted() { return (m_BitmapTint != NULL); }

View File

@ -301,7 +301,7 @@ void CTrayWindow::ShowUpdateNotification(const WCHAR* newVersion)
ShowNotification(TRAY_NOTIFICATION_UPDATE, GetString(ID_STR_UPDATEAVAILABLE), text.c_str()); ShowNotification(TRAY_NOTIFICATION_UPDATE, GetString(ID_STR_UPDATEAVAILABLE), text.c_str());
} }
void CTrayWindow::ReadConfig(CConfigParser& parser) void CTrayWindow::ReadOptions(CConfigParser& parser)
{ {
// Clear old Settings // Clear old Settings
KillTimer(m_Window, TIMER_TRAY); KillTimer(m_Window, TIMER_TRAY);
@ -337,7 +337,7 @@ void CTrayWindow::ReadConfig(CConfigParser& parser)
m_Measure = CMeasure::Create(measureName.c_str(), NULL, L"TrayMeasure"); m_Measure = CMeasure::Create(measureName.c_str(), NULL, L"TrayMeasure");
if (m_Measure) if (m_Measure)
{ {
m_Measure->ReadConfig(parser); m_Measure->ReadOptions(parser);
} }
} }
catch (CError& error) catch (CError& error)

View File

@ -44,7 +44,7 @@ public:
void Initialize(); void Initialize();
void ReadConfig(CConfigParser& parser); void ReadOptions(CConfigParser& parser);
HWND GetWindow() { return m_Window; } HWND GetWindow() { return m_Window; }
bool IsTrayIconEnabled() { return m_IconEnabled; } bool IsTrayIconEnabled() { return m_IconEnabled; }