summaryrefslogtreecommitdiff
path: root/plugins/SimpleStatusMsg
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-12-10 15:24:14 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-12-10 15:24:14 +0300
commitc9265783b1bf4a9cea1fd63e633ced6e66a154fc (patch)
treee64e3ec5b96adcb0121e2e6395f0767766bc5195 /plugins/SimpleStatusMsg
parent926a493a89fbe3d56b7f2b5a3160dc949b401529 (diff)
Miranda idle code cleaning
Diffstat (limited to 'plugins/SimpleStatusMsg')
-rw-r--r--plugins/SimpleStatusMsg/src/main.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp
index fae0b03fcd..ea0e1a8725 100644
--- a/plugins/SimpleStatusMsg/src/main.cpp
+++ b/plugins/SimpleStatusMsg/src/main.cpp
@@ -204,9 +204,8 @@ wchar_t* InsertBuiltinVarsIntoMsg(wchar_t *in, const char *szProto, int)
}
else if (!wcsnicmp(msg + i, L"%time%", 6))
{
- MIRANDA_IDLE_INFO mii = {0};
- mii.cbSize = sizeof(mii);
- CallService(MS_IDLE_GETIDLEINFO, 0, (LPARAM)&mii);
+ MIRANDA_IDLE_INFO mii;
+ Idle_GetInfo(mii);
if (mii.idleType)
{
@@ -1268,9 +1267,8 @@ VOID CALLBACK SetStartupStatusProc(HWND hwnd, UINT, UINT_PTR idEvent, DWORD)
VOID CALLBACK UpdateMsgTimerProc(HWND, UINT, UINT_PTR, DWORD)
{
- MIRANDA_IDLE_INFO mii = {0};
- mii.cbSize = sizeof(mii);
- CallService(MS_IDLE_GETIDLEINFO, 0, (LPARAM)&mii);
+ MIRANDA_IDLE_INFO mii;
+ Idle_GetInfo(mii);
if (db_get_b(NULL, "SimpleStatusMsg", "NoUpdateOnIdle", 1) && mii.idleType)
return;
@@ -1436,9 +1434,9 @@ static int OnIdleChanged(WPARAM, LPARAM lParam)
if (!(lParam & IDF_ISIDLE))
g_iIdleTime = -1;
- MIRANDA_IDLE_INFO mii = {0};
- mii.cbSize = sizeof(mii);
- CallService(MS_IDLE_GETIDLEINFO, 0, (LPARAM)&mii);
+ MIRANDA_IDLE_INFO mii;
+ Idle_GetInfo(mii);
+
if (mii.aaStatus == 0)
{
#ifdef _DEBUG