Net: Removed TrafficAction (broken since 0.14)

This commit is contained in:
Birunthan Mohanathas 2012-09-21 13:13:02 +03:00
parent 797fd26fa8
commit 48f06677c4
2 changed files with 0 additions and 30 deletions

View File

@ -36,8 +36,6 @@ extern CRainmeter* Rainmeter;
** **
*/ */
CMeasureNet::CMeasureNet(CMeterWindow* meterWindow, const WCHAR* name) : CMeasure(meterWindow, name), CMeasureNet::CMeasureNet(CMeterWindow* meterWindow, const WCHAR* name) : CMeasure(meterWindow, name),
m_CurrentTraffic(),
m_TrafficValue(),
m_Interface(), m_Interface(),
m_Cumulative(false) m_Cumulative(false)
{ {
@ -51,27 +49,6 @@ CMeasureNet::~CMeasureNet()
{ {
} }
/*
** Checks if Action should be executed.
**
*/
void CMeasureNet::UpdateValue()
{
if (m_MeterWindow)
{
if (!m_TrafficAction.empty())
{
if (m_CurrentTraffic > m_TrafficValue)
{
m_CurrentTraffic = 0;
Rainmeter->ExecuteCommand(m_TrafficAction.c_str(), m_MeterWindow);
}
m_CurrentTraffic += m_Value;
}
}
}
/* /*
** Reads the tables for all net interfaces ** Reads the tables for all net interfaces
** **
@ -473,9 +450,6 @@ void CMeasureNet::ReadOptions(CConfigParser& parser, const WCHAR* section, NET n
Rainmeter->SetNetworkStatisticsTimer(); Rainmeter->SetNetworkStatisticsTimer();
} }
m_TrafficValue = parser.ReadFloat(section, L"TrafficValue", 0.0);
m_TrafficAction = parser.ReadString(section, L"TrafficAction", L"", false);
if (maxValue == 0) if (maxValue == 0)
{ {
m_MaxValue = 1; m_MaxValue = 1;

View File

@ -54,16 +54,12 @@ public:
protected: protected:
void ReadOptions(CConfigParser& parser, const WCHAR* section, CMeasureNet::NET net); void ReadOptions(CConfigParser& parser, const WCHAR* section, CMeasureNet::NET net);
void UpdateValue();
ULONG64 GetNetOctets(NET net); ULONG64 GetNetOctets(NET net);
ULONG64 GetNetStatsValue(NET net); ULONG64 GetNetStatsValue(NET net);
double m_CurrentTraffic;
double m_TrafficValue;
UINT m_Interface; UINT m_Interface;
bool m_Cumulative; bool m_Cumulative;
std::wstring m_TrafficAction;
static std::vector<ULONG64> c_OldStatValues; static std::vector<ULONG64> c_OldStatValues;
static std::vector<ULONG64> c_StatValues; static std::vector<ULONG64> c_StatValues;