summaryrefslogtreecommitdiff
path: root/plugins/StatusManager/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-01-29 12:54:59 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-01-29 12:54:59 +0300
commit1eb15995edb840fb9823d9e8a0c1ca381c174141 (patch)
treeb859b00a3e4521679b5c9f533f9b1823b0d9617e /plugins/StatusManager/src
parentfdc92c8ba80ac410b2c03226d1a60365faf17745 (diff)
unused code cleaned
Diffstat (limited to 'plugins/StatusManager/src')
-rw-r--r--plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.cpp6
-rw-r--r--plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.h9
2 files changed, 9 insertions, 6 deletions
diff --git a/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.cpp b/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.cpp
index 50cf03813d..81cff37ffd 100644
--- a/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.cpp
+++ b/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.cpp
@@ -51,7 +51,6 @@ TAAAProtoSetting::~TAAAProtoSetting()
int AAALangPack;
-static HANDLE hStateChangedEvent = nullptr;
static HANDLE hEvents[4];
static BOOL ignoreLockKeys = FALSE;
@@ -227,7 +226,6 @@ static int changeState(TAAAProtoSetting &setting, STATES newState)
log_debugA("%s state change: %s -> %s", setting.m_szName, status2descr(setting.oldState), status2descr(setting.curState));
- NotifyEventHooks(hStateChangedEvent, 0, (LPARAM)&setting);
if (setting.curState != SET_ORGSTATUS && setting.curState != ACTIVE && setting.statusChanged) {
/* change the awaymessage */
if (setting.m_szMsg != nullptr) {
@@ -588,8 +586,6 @@ void AdvancedAutoAwayLoad()
AutoAwayOptInitialise(0, 0);
}
else HookEvent(ME_SYSTEM_MODULESLOADED, AAAModuleLoaded);
-
- hStateChangedEvent = CreateHookableEvent(ME_AAA_STATECHANGED);
}
void AdvancedAutoAwayUnload()
@@ -604,7 +600,5 @@ void AdvancedAutoAwayUnload()
it = nullptr;
}
- DestroyHookableEvent(hStateChangedEvent); hStateChangedEvent = nullptr;
-
autoAwaySettings.destroy();
}
diff --git a/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.h b/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.h
index 43f9637d79..8ba6e3f606 100644
--- a/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.h
+++ b/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.h
@@ -50,6 +50,15 @@
#define FLAG_ONLOCK 0x0080 // db: on work station lock
#define FLAG_FULLSCREEN 0x0100 // db: on full screen
+typedef enum
+{
+ ACTIVE, // user is active
+ STATUS1_SET, // first status change happened
+ STATUS2_SET, // second status change happened
+ SET_ORGSTATUS, // user was active again, original status will be restored
+ HIDDEN_ACTIVE // user is active, but this is not shown to the outside world
+} STATES;
+
struct TAAAProtoSetting : public PROTOCOLSETTINGEX, public MZeroedObject
{
TAAAProtoSetting(PROTOACCOUNT *pa);