diff options
author | George Hazan <ghazan@miranda.im> | 2017-10-09 18:56:03 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-10-09 18:56:03 +0300 |
commit | eec98453479bf86999060565ad90a63ff8f74942 (patch) | |
tree | c2dcb22ac74920b3cbcc96d2376dfcd77e9dcffc | |
parent | 09c39492686b504391db1bda59d3a3c246435534 (diff) |
MS_CLIST_SETSTATUSMODE => Clist_SetStatusMode()
dunno how I could miss it
-rw-r--r-- | include/delphi/m_clist.inc | 7 | ||||
-rw-r--r-- | include/m_clist.h | 2 | ||||
-rw-r--r-- | libs/win32/mir_app.lib | bin | 120420 -> 119118 bytes | |||
-rw-r--r-- | libs/win64/mir_app.lib | bin | 115710 -> 115930 bytes | |||
-rw-r--r-- | plugins/AutoShutdown/src/shutdownsvc.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_keyboard.cpp | 2 | ||||
-rw-r--r-- | plugins/CmdLine/src/mimcmd_handlers.cpp | 2 | ||||
-rw-r--r-- | plugins/MyDetails/src/data.cpp | 2 | ||||
-rw-r--r-- | plugins/NewAwaySysMod/src/Services.cpp | 4 | ||||
-rw-r--r-- | plugins/SimpleStatusMsg/src/main.cpp | 2 | ||||
-rw-r--r-- | plugins/StatusManager/src/KeepStatus/keepstatus.cpp | 2 | ||||
-rw-r--r-- | plugins/StatusManager/src/StartupStatus/startupstatus.cpp | 8 | ||||
-rw-r--r-- | plugins/StatusManager/src/commonstatus.cpp | 6 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_rc.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/menu_clist.cpp | 10 | ||||
-rw-r--r-- | src/mir_app/src/mir_app.def | 1 | ||||
-rw-r--r-- | src/mir_app/src/mir_app64.def | 1 |
17 files changed, 19 insertions, 34 deletions
diff --git a/include/delphi/m_clist.inc b/include/delphi/m_clist.inc index f4af29552d..32906e9ba2 100644 --- a/include/delphi/m_clist.inc +++ b/include/delphi/m_clist.inc @@ -18,13 +18,6 @@ const ME_CLIST_STATUSMODECHANGE:PAnsiChar = 'CList/StatusModeChange';
{
- wParam : new_status
- lParam : 0
- Affect : Force a change of status mode, see statusmodes.inc
- }
- MS_CLIST_SETSTATUSMODE:PAnsiChar = 'CList/SetStatusMode';
-
- {
wParam : 0
lParam : 0
Affect : Get the current status mode, see notes
diff --git a/include/m_clist.h b/include/m_clist.h index f5421a0bda..ad95ff19a6 100644 --- a/include/m_clist.h +++ b/include/m_clist.h @@ -51,7 +51,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // force a change of status mode
// wParam = new status, from statusmodes.h
-#define MS_CLIST_SETSTATUSMODE "CList/SetStatusMode"
+EXTERN_C MIR_APP_DLL(void) Clist_SetStatusMode(int iStatus);
/////////////////////////////////////////////////////////////////////////////////////////
// get the current status mode
diff --git a/libs/win32/mir_app.lib b/libs/win32/mir_app.lib Binary files differindex 1ba03af018..7796651583 100644 --- a/libs/win32/mir_app.lib +++ b/libs/win32/mir_app.lib diff --git a/libs/win64/mir_app.lib b/libs/win64/mir_app.lib Binary files differindex d9414d1ac8..15f2c8f7a6 100644 --- a/libs/win64/mir_app.lib +++ b/libs/win64/mir_app.lib diff --git a/plugins/AutoShutdown/src/shutdownsvc.cpp b/plugins/AutoShutdown/src/shutdownsvc.cpp index 547efe82fa..095c55d25b 100644 --- a/plugins/AutoShutdown/src/shutdownsvc.cpp +++ b/plugins/AutoShutdown/src/shutdownsvc.cpp @@ -155,7 +155,7 @@ static DWORD ShutdownNow(BYTE shutdownType) case SDSDT_SETMIRANDAOFFLINE:
/* set global status mode to offline (is remembered by Miranda on exit) */
- CallService(MS_CLIST_SETSTATUSMODE, (WPARAM)ID_STATUS_OFFLINE, 0);
+ Clist_SetStatusMode(ID_STATUS_OFFLINE);
break;
case SDSDT_STANDBY:
diff --git a/plugins/Clist_modern/src/modern_keyboard.cpp b/plugins/Clist_modern/src/modern_keyboard.cpp index 5166ec57de..96e4c7a098 100644 --- a/plugins/Clist_modern/src/modern_keyboard.cpp +++ b/plugins/Clist_modern/src/modern_keyboard.cpp @@ -35,7 +35,7 @@ INT_PTR hkCloseMiranda(WPARAM, LPARAM) INT_PTR hkRestoreStatus(WPARAM, LPARAM)
{
int nStatus = db_get_w(0, "CList", "Status", ID_STATUS_OFFLINE);
- CallService(MS_CLIST_SETSTATUSMODE, nStatus, 0);
+ Clist_SetStatusMode(nStatus);
return 0;
}
diff --git a/plugins/CmdLine/src/mimcmd_handlers.cpp b/plugins/CmdLine/src/mimcmd_handlers.cpp index ca84413487..d50af580e2 100644 --- a/plugins/CmdLine/src/mimcmd_handlers.cpp +++ b/plugins/CmdLine/src/mimcmd_handlers.cpp @@ -247,7 +247,7 @@ void HandleStatusCommand(PCommand command, TArgument *argv, int argc, PReply rep }
PrettyStatusMode(old, po, sizeof(po));
- CallService(MS_CLIST_SETSTATUSMODE, status, 0);
+ Clist_SetStatusMode(status);
char pn[128];
PrettyStatusMode(status, pn, sizeof(pn));
diff --git a/plugins/MyDetails/src/data.cpp b/plugins/MyDetails/src/data.cpp index 79a2cf47bd..7454b175b8 100644 --- a/plugins/MyDetails/src/data.cpp +++ b/plugins/MyDetails/src/data.cpp @@ -469,7 +469,7 @@ void ProtocolArray::SetNicks(const wchar_t *nick) void ProtocolArray::SetStatus(int aStatus)
{
- CallService(MS_CLIST_SETSTATUSMODE, aStatus, 0);
+ Clist_SetStatusMode(aStatus);
}
void ProtocolArray::SetStatusMsgs(const wchar_t *message)
diff --git a/plugins/NewAwaySysMod/src/Services.cpp b/plugins/NewAwaySysMod/src/Services.cpp index 36ecd5a7ab..f2884ee947 100644 --- a/plugins/NewAwaySysMod/src/Services.cpp +++ b/plugins/NewAwaySysMod/src/Services.cpp @@ -41,7 +41,7 @@ __inline void PSSetStatus(char *szProto, WORD Status, int bNoClistSetStatusMode CallProtoService(szProto, PS_SETSTATUS, Status, 0);
else if (!bNoClistSetStatusMode) { // global status
g_fNoProcessing = true;
- CallService(MS_CLIST_SETSTATUSMODE, Status, 0);
+ Clist_SetStatusMode(Status);
_ASSERT(!g_fNoProcessing && g_ProtoStates[(char*)NULL].m_status == Status);
g_fNoProcessing = false;
}
@@ -64,7 +64,7 @@ INT_PTR SetStatusMode(WPARAM wParam, LPARAM lParam) // called by GamerStatus and {
LogMessage("MS_AWAYSYS_SETSTATUSMODE called. status=%d, szMsg:\n%s", wParam, lParam ? (char*)lParam : "NULL");
g_fNoProcessing = true;
- CallService(MS_CLIST_SETSTATUSMODE, wParam, 0);
+ Clist_SetStatusMode(wParam);
_ASSERT(!g_fNoProcessing && g_ProtoStates[(char*)NULL].m_status == wParam);
g_fNoProcessing = false;
diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp index a6bcbb866f..7f64a3b6eb 100644 --- a/plugins/SimpleStatusMsg/src/main.cpp +++ b/plugins/SimpleStatusMsg/src/main.cpp @@ -811,7 +811,7 @@ void SetStatusMessage(const char *szProto, int iInitialStatus, int iStatus, wcha {
// not so nice...
UnhookEvent(h_statusmodechange);
- CallService(MS_CLIST_SETSTATUSMODE, (WPARAM)iStatus, 0);
+ Clist_SetStatusMode(iStatus);
h_statusmodechange = HookEvent(ME_CLIST_STATUSMODECHANGE, ChangeStatusMessage);
}
}
diff --git a/plugins/StatusManager/src/KeepStatus/keepstatus.cpp b/plugins/StatusManager/src/KeepStatus/keepstatus.cpp index 01b63728a0..d518b47edc 100644 --- a/plugins/StatusManager/src/KeepStatus/keepstatus.cpp +++ b/plugins/StatusManager/src/KeepStatus/keepstatus.cpp @@ -1125,7 +1125,7 @@ static DWORD CALLBACK MessageWndProc(HWND, UINT msg, WPARAM wParam, LPARAM lPara EnableProtocolService(0, (LPARAM)ps[i]->szName); // set proto's offline, the clist will not try to reconnect in that case - CallService(MS_CLIST_SETSTATUSMODE, (WPARAM)ID_STATUS_OFFLINE, 0); + Clist_SetStatusMode(ID_STATUS_OFFLINE); } break; diff --git a/plugins/StatusManager/src/StartupStatus/startupstatus.cpp b/plugins/StatusManager/src/StartupStatus/startupstatus.cpp index 442c707f9d..f2614903f6 100644 --- a/plugins/StatusManager/src/StartupStatus/startupstatus.cpp +++ b/plugins/StatusManager/src/StartupStatus/startupstatus.cpp @@ -327,12 +327,8 @@ static int OnOkToExit(WPARAM, LPARAM) } } - if (db_get_b(NULL, SSMODULENAME, SETTING_SETPROFILE, 1) || db_get_b(NULL, SSMODULENAME, SETTING_OFFLINECLOSE, 0)) { - if (ServiceExists(MS_CLIST_SETSTATUSMODE)) - CallService(MS_CLIST_SETSTATUSMODE, ID_STATUS_OFFLINE, 0); - else - log_debugA("StartupStatus: MS_CLIST_SETSTATUSMODE not available!"); - } + if (db_get_b(NULL, SSMODULENAME, SETTING_SETPROFILE, 1) || db_get_b(NULL, SSMODULENAME, SETTING_OFFLINECLOSE, 0)) + Clist_SetStatusMode(ID_STATUS_OFFLINE); return 0; } diff --git a/plugins/StatusManager/src/commonstatus.cpp b/plugins/StatusManager/src/commonstatus.cpp index c016f4d3ba..bea099864e 100644 --- a/plugins/StatusManager/src/commonstatus.cpp +++ b/plugins/StatusManager/src/commonstatus.cpp @@ -246,12 +246,8 @@ INT_PTR SetStatusEx(WPARAM wParam, LPARAM) } if (globStatus != 0) { - if (!ServiceExists(MS_CLIST_SETSTATUSMODE)) { - log_debugA("CommonStatus: MS_CLIST_SETSTATUSMODE not available!"); - return -1; - } log_debugA("CommonStatus: setting global status %u", globStatus); - CallService(MS_CLIST_SETSTATUSMODE, globStatus, 0); + Clist_SetStatusMode(globStatus); } return 0; diff --git a/protocols/JabberG/src/jabber_rc.cpp b/protocols/JabberG/src/jabber_rc.cpp index 51abb95c94..2d873ad70a 100644 --- a/protocols/JabberG/src/jabber_rc.cpp +++ b/protocols/JabberG/src/jabber_rc.cpp @@ -380,7 +380,7 @@ int CJabberProto::AdhocSetStatusHandler(HXML, CJabberIqInfo *pInfo, CJabberAdhoc fieldNode = XmlGetChildByTag(xNode, "field", "var", L"status-global");
if (fieldNode && (valueNode = XmlGetChild(fieldNode , "value"))) {
if ((ptszValue = XmlGetText(valueNode)) != nullptr && _wtoi(ptszValue))
- CallService(MS_CLIST_SETSTATUSMODE, status, 0);
+ Clist_SetStatusMode(status);
else
CallProtoService(m_szModuleName, PS_SETSTATUS, status, 0);
}
diff --git a/src/mir_app/src/menu_clist.cpp b/src/mir_app/src/menu_clist.cpp index 9012ecc183..631944a56a 100644 --- a/src/mir_app/src/menu_clist.cpp +++ b/src/mir_app/src/menu_clist.cpp @@ -722,12 +722,11 @@ static int MenuIconsChanged(WPARAM, LPARAM) return 0;
}
-static INT_PTR SetStatusMode(WPARAM wParam, LPARAM)
+MIR_APP_DLL(void) Clist_SetStatusMode(int iStatus)
{
prochotkey = true;
- Clist_MenuProcessCommand(LOWORD(wParam), MPCF_MAINMENU, 0);
+ Clist_MenuProcessCommand(iStatus, MPCF_MAINMENU, 0);
prochotkey = false;
- return 0;
}
int fnGetProtocolVisibility(const char *accName)
@@ -1062,7 +1061,8 @@ HGENMENU fnGetProtocolMenu(const char* proto) static INT_PTR HotkeySetStatus(WPARAM, LPARAM lParam)
{
- return SetStatusMode(lParam, 0);
+ Clist_SetStatusMode(lParam);
+ return 0;
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -1102,8 +1102,6 @@ void InitCustomMenus(void) CreateServiceFunction("CLISTMENUS/FreeOwnerDataContactMenu", FreeOwnerDataContactMenu);
CreateServiceFunction("CLISTMENUS/FreeOwnerDataStatusMenu", FreeOwnerDataStatusMenu);
- CreateServiceFunction(MS_CLIST_SETSTATUSMODE, SetStatusMode);
-
hPreBuildContactMenuEvent = CreateHookableEvent(ME_CLIST_PREBUILDCONTACTMENU);
hPreBuildMainMenuEvent = CreateHookableEvent(ME_CLIST_PREBUILDMAINMENU);
cli.hPreBuildStatusMenuEvent = CreateHookableEvent(ME_CLIST_PREBUILDSTATUSMENU);
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def index f810bb6e0e..4e00ffee6a 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -456,3 +456,4 @@ Srmm_SetStatusText @460 Skin_AddSound @461
Skin_PlaySound @462
Skin_PlaySoundFile @463
+Clist_SetStatusMode @464
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def index ec9a39feb2..fc4fd13ffe 100644 --- a/src/mir_app/src/mir_app64.def +++ b/src/mir_app/src/mir_app64.def @@ -456,3 +456,4 @@ Srmm_SetStatusText @460 Skin_AddSound @461
Skin_PlaySound @462
Skin_PlaySoundFile @463
+Clist_SetStatusMode @464
|