mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Net: Removed TrafficAction (broken since 0.14)
This commit is contained in:
parent
797fd26fa8
commit
48f06677c4
@ -36,8 +36,6 @@ extern CRainmeter* Rainmeter;
|
||||
**
|
||||
*/
|
||||
CMeasureNet::CMeasureNet(CMeterWindow* meterWindow, const WCHAR* name) : CMeasure(meterWindow, name),
|
||||
m_CurrentTraffic(),
|
||||
m_TrafficValue(),
|
||||
m_Interface(),
|
||||
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
|
||||
**
|
||||
@ -473,9 +450,6 @@ void CMeasureNet::ReadOptions(CConfigParser& parser, const WCHAR* section, NET n
|
||||
Rainmeter->SetNetworkStatisticsTimer();
|
||||
}
|
||||
|
||||
m_TrafficValue = parser.ReadFloat(section, L"TrafficValue", 0.0);
|
||||
m_TrafficAction = parser.ReadString(section, L"TrafficAction", L"", false);
|
||||
|
||||
if (maxValue == 0)
|
||||
{
|
||||
m_MaxValue = 1;
|
||||
|
@ -54,16 +54,12 @@ public:
|
||||
|
||||
protected:
|
||||
void ReadOptions(CConfigParser& parser, const WCHAR* section, CMeasureNet::NET net);
|
||||
void UpdateValue();
|
||||
|
||||
ULONG64 GetNetOctets(NET net);
|
||||
ULONG64 GetNetStatsValue(NET net);
|
||||
|
||||
double m_CurrentTraffic;
|
||||
double m_TrafficValue;
|
||||
UINT m_Interface;
|
||||
bool m_Cumulative;
|
||||
std::wstring m_TrafficAction;
|
||||
|
||||
static std::vector<ULONG64> c_OldStatValues;
|
||||
static std::vector<ULONG64> c_StatValues;
|
||||
|
Loading…
Reference in New Issue
Block a user