From b1ac2547316dca56f32d238d50dc2dc6c8e8aedf Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 5 Apr 2018 17:59:29 +0300 Subject: CLIST_INTERFACE::pfnGetStatusModeDescription => Clist_GetStatusModeDescription --- src/mir_app/src/clc.h | 1 - src/mir_app/src/clistcore.cpp | 1 - src/mir_app/src/clistmod.cpp | 2 +- src/mir_app/src/clisttray.cpp | 4 ++-- src/mir_app/src/clui.cpp | 2 +- src/mir_app/src/cluiservices.cpp | 2 +- src/mir_app/src/menu_clist.cpp | 8 ++++---- src/mir_app/src/meta_services.cpp | 3 ++- src/mir_app/src/meta_utils.cpp | 3 ++- src/mir_app/src/mir_app.def | 1 + src/mir_app/src/mir_app64.def | 1 + src/mir_app/src/skinicons.cpp | 4 +++- 12 files changed, 18 insertions(+), 14 deletions(-) (limited to 'src/mir_app') diff --git a/src/mir_app/src/clc.h b/src/mir_app/src/clc.h index 7ebafd6aa4..b451b55a12 100644 --- a/src/mir_app/src/clc.h +++ b/src/mir_app/src/clc.h @@ -143,7 +143,6 @@ int fnRemoveEvent(MCONTACT hContact, MEVENT dbEvent); int fnIconFromStatusMode(const char *szProto, int status, MCONTACT hContact); int fnShowHide(void); HICON fnGetIconFromStatusMode(MCONTACT hContact, const char *szProto, int status); -wchar_t* fnGetStatusModeDescription(int wParam, int lParam); int fnGetWindowVisibleState(HWND hWnd, int iStepX, int iStepY); /* clisttray.c */ diff --git a/src/mir_app/src/clistcore.cpp b/src/mir_app/src/clistcore.cpp index 84322e7bd5..8a3da4abc4 100644 --- a/src/mir_app/src/clistcore.cpp +++ b/src/mir_app/src/clistcore.cpp @@ -174,7 +174,6 @@ void InitClistCore() cli.pfnGetWindowVisibleState = fnGetWindowVisibleState; cli.pfnIconFromStatusMode = fnIconFromStatusMode; cli.pfnShowHide = fnShowHide; - cli.pfnGetStatusModeDescription = fnGetStatusModeDescription; cli.pfnTrayCalcChanged = fnTrayCalcChanged; cli.pfnSetContactCheckboxes = fnSetContactCheckboxes; diff --git a/src/mir_app/src/clistmod.cpp b/src/mir_app/src/clistmod.cpp index a4d841cc82..11760fbd2b 100644 --- a/src/mir_app/src/clistmod.cpp +++ b/src/mir_app/src/clistmod.cpp @@ -52,7 +52,7 @@ struct ProtoIconIndex OBJLIST protoIconIndex(5, PtrKeySortT); -wchar_t* fnGetStatusModeDescription(int mode, int flags) +MIR_APP_DLL(wchar_t*) Clist_GetStatusModeDescription(int mode, int flags) { static wchar_t szMode[64]; wchar_t* descr; diff --git a/src/mir_app/src/clisttray.cpp b/src/mir_app/src/clisttray.cpp index 9ae7938ae9..09b07d7506 100644 --- a/src/mir_app/src/clisttray.cpp +++ b/src/mir_app/src/clisttray.cpp @@ -100,7 +100,7 @@ wchar_t* fnTrayIconMakeTooltip(const wchar_t *szPrefix, const char *szProto) if (!pa->IsVisible()) continue; - wchar_t *szStatus = cli.pfnGetStatusModeDescription(CallProtoServiceInt(0, pa->szModuleName, PS_GETSTATUS, 0, 0), 0); + wchar_t *szStatus = Clist_GetStatusModeDescription(CallProtoServiceInt(0, pa->szModuleName, PS_GETSTATUS, 0, 0), 0); if (!szStatus) continue; @@ -125,7 +125,7 @@ wchar_t* fnTrayIconMakeTooltip(const wchar_t *szPrefix, const char *szProto) PROTOACCOUNT *pa = Proto_GetAccount(szProto); if (pa != nullptr) { ptrW ProtoXStatus(sttGetXStatus(szProto)); - wchar_t *szStatus = cli.pfnGetStatusModeDescription(CallProtoServiceInt(0, szProto, PS_GETSTATUS, 0, 0), 0); + wchar_t *szStatus = Clist_GetStatusModeDescription(CallProtoServiceInt(0, szProto, PS_GETSTATUS, 0, 0), 0); if (szPrefix && szPrefix[0]) { if (db_get_b(0, "CList", "AlwaysStatus", SETTING_ALWAYSSTATUS_DEFAULT)) { if (hasTips()) { diff --git a/src/mir_app/src/clui.cpp b/src/mir_app/src/clui.cpp index 34214a3c1b..74f6341ea0 100644 --- a/src/mir_app/src/clui.cpp +++ b/src/mir_app/src/clui.cpp @@ -989,7 +989,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM x += textSize.cx; } if (showOpts & 4) { - wchar_t* szStatus = cli.pfnGetStatusModeDescription(status, 0); + wchar_t* szStatus = Clist_GetStatusModeDescription(status, 0); if (!szStatus) szStatus = L""; GetTextExtentPoint32(dis->hDC, szStatus, (int)mir_wstrlen(szStatus), &textSize); diff --git a/src/mir_app/src/cluiservices.cpp b/src/mir_app/src/cluiservices.cpp index 2d0f9a71f8..a38b9db7c4 100644 --- a/src/mir_app/src/cluiservices.cpp +++ b/src/mir_app/src/cluiservices.cpp @@ -125,7 +125,7 @@ void fnCluiProtocolStatusChanged(int, const char*) x += GetSystemMetrics(SM_CXBORDER) * 4; // The SB panel doesnt allocate enough room } if (showOpts & 4) { - wchar_t* modeDescr = cli.pfnGetStatusModeDescription(CallProtoServiceInt(0, g_menuProtos[i].szProto, PS_GETSTATUS, 0, 0), 0); + wchar_t* modeDescr = Clist_GetStatusModeDescription(CallProtoServiceInt(0, g_menuProtos[i].szProto, PS_GETSTATUS, 0, 0), 0); GetTextExtentPoint32(hdc, modeDescr, (int)mir_wstrlen(modeDescr), &textSize); x += textSize.cx; x += GetSystemMetrics(SM_CXBORDER) * 4; // The SB panel doesnt allocate enough room diff --git a/src/mir_app/src/menu_clist.cpp b/src/mir_app/src/menu_clist.cpp index cc4fde0bad..adb2decf95 100644 --- a/src/mir_app/src/menu_clist.cpp +++ b/src/mir_app/src/menu_clist.cpp @@ -817,7 +817,7 @@ void RebuildMenuOrder(void) mi.flags |= CMIF_CHECKED; mi.root = rootmenu; mi.position = pos++; - mi.name.w = cli.pfnGetStatusModeDescription(statusModeList[j], GSMDF_UNTRANSLATED); + mi.name.w = Clist_GetStatusModeDescription(statusModeList[j], GSMDF_UNTRANSLATED); mi.hIcon = Skin_LoadProtoIcon(pa->szModuleName, statusModeList[j]); // owner data @@ -866,7 +866,7 @@ void RebuildMenuOrder(void) wchar_t buf[256], hotkeyName[100]; WORD hotKey = GetHotkeyValue(statusHotkeys[j]); HotkeyToName(hotkeyName, _countof(hotkeyName), HIBYTE(hotKey), LOBYTE(hotKey)); - mir_snwprintf(buf, L"%s\t%s", cli.pfnGetStatusModeDescription(statusModeList[j], 0), hotkeyName); + mir_snwprintf(buf, L"%s\t%s", Clist_GetStatusModeDescription(statusModeList[j], 0), hotkeyName); mi.name.w = buf; hStatusMainMenuHandles[j] = Menu_AddItem(hStatusMenuObject, &mi, smep); @@ -923,7 +923,7 @@ static int sttRebuildHotkeys(WPARAM, LPARAM) wchar_t buf[256], hotkeyName[100]; WORD hotKey = GetHotkeyValue(statusHotkeys[j]); HotkeyToName(hotkeyName, _countof(hotkeyName), HIBYTE(hotKey), LOBYTE(hotKey)); - mir_snwprintf(buf, L"%s\t%s", cli.pfnGetStatusModeDescription(statusModeList[j], 0), hotkeyName); + mir_snwprintf(buf, L"%s\t%s", Clist_GetStatusModeDescription(statusModeList[j], 0), hotkeyName); Menu_ModifyItem(hStatusMainMenuHandles[j], buf); hStatusMainMenuHandles[j]->hotKey = MAKELONG(HIBYTE(hotKey), LOBYTE(hotKey)); @@ -1113,7 +1113,7 @@ void InitCustomMenus(void) mir_snprintf(szName, "StatusHotKey_%d", i); hkd.pszName = szName; hkd.lParam = statusModeList[i]; - hkd.szDescription.w = fnGetStatusModeDescription(hkd.lParam, 0); + hkd.szDescription.w = Clist_GetStatusModeDescription(hkd.lParam, 0); hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, '0' + i) | HKF_MIRANDA_LOCAL; hkd.pszService = MS_CLIST_HKSTATUS; statusHotkeys[i] = Hotkey_Register(&hkd); diff --git a/src/mir_app/src/meta_services.cpp b/src/mir_app/src/meta_services.cpp index 604b3064dc..90401e1e58 100644 --- a/src/mir_app/src/meta_services.cpp +++ b/src/mir_app/src/meta_services.cpp @@ -24,6 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include +#include "clc.h" #include "metacontacts.h" extern "C" MIR_CORE_DLL(void) db_mc_notifyDefChange(WPARAM wParam, LPARAM lParam); @@ -424,7 +425,7 @@ int Meta_SettingChanged(WPARAM hContact, LPARAM lParam) db_set_w(ccMeta->contactID, META_PROTO, buffer, dcws->value.wVal); mir_snprintf(buffer, "StatusString%d", contact_number); - db_set_ws(ccMeta->contactID, META_PROTO, buffer, cli.pfnGetStatusModeDescription(dcws->value.wVal, 0)); + db_set_ws(ccMeta->contactID, META_PROTO, buffer, Clist_GetStatusModeDescription(dcws->value.wVal, 0)); // set status to that of most online contact MCONTACT hMostOnline = Meta_GetMostOnline(ccMeta); diff --git a/src/mir_app/src/meta_utils.cpp b/src/mir_app/src/meta_utils.cpp index 7a1b8565a0..6fe1980936 100644 --- a/src/mir_app/src/meta_utils.cpp +++ b/src/mir_app/src/meta_utils.cpp @@ -22,6 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h" +#include "clc.h" #include "metacontacts.h" HANDLE invisiGroup; @@ -140,7 +141,7 @@ BOOL Meta_Assign(MCONTACT hSub, MCONTACT hMeta, BOOL set_as_default) // write status string mir_snprintf(buffer, "StatusString%d", ccDest->nSubs); - wchar_t *szStatus = cli.pfnGetStatusModeDescription(status, 0); + wchar_t *szStatus = Clist_GetStatusModeDescription(status, 0); db_set_ws(hMeta, META_PROTO, buffer, szStatus); // Write the link in the contact diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def index d8d6ae9a11..73871eaabc 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -542,3 +542,4 @@ Menu_ReloadProtoMenus @561 Menu_GetProtocolMenu @562 ExtraIcon_Reload @563 ExtraIcon_SetAll @564 +Clist_GetStatusModeDescription @565 diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def index 333e4fc5f8..11abf96af6 100644 --- a/src/mir_app/src/mir_app64.def +++ b/src/mir_app/src/mir_app64.def @@ -542,3 +542,4 @@ Menu_ReloadProtoMenus @561 Menu_GetProtocolMenu @562 ExtraIcon_Reload @563 ExtraIcon_SetAll @564 +Clist_GetStatusModeDescription @565 diff --git a/src/mir_app/src/skinicons.cpp b/src/mir_app/src/skinicons.cpp index c54dea3dcd..3f289f3eb6 100644 --- a/src/mir_app/src/skinicons.cpp +++ b/src/mir_app/src/skinicons.cpp @@ -24,6 +24,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h" #include +#include "clc.h" + struct StandardIconDescription { int id; @@ -317,7 +319,7 @@ MIR_APP_DLL(HICON) Skin_LoadProtoIcon(const char *szProto, int status, bool big) // format: core_%s%d mir_snprintf(iconName, "%s%s%d", statusIconsFmt, szProto, i); sid.pszName = iconName; - sid.description.w = cli.pfnGetStatusModeDescription(statusIcons[i].id, 0); + sid.description.w = Clist_GetStatusModeDescription(statusIcons[i].id, 0); sid.iDefaultIndex = statusIcons[i].resource_id; IcoLib_AddIcon(&sid, 0); } -- cgit v1.2.3