diff options
author | George Hazan <ghazan@miranda.im> | 2018-04-07 20:14:21 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-04-07 20:14:21 +0300 |
commit | f60c78abfbd5f279b30de729046b805bba8e00b0 (patch) | |
tree | 1120bba828b2151604e98163aa7a3fe221264068 /plugins/Clist_nicer/src | |
parent | 26a653ecae7edbeefb7966e08714e152c73b78eb (diff) |
Proto_GetStatus is used everywhere instead of PS_GETSTATUS
Diffstat (limited to 'plugins/Clist_nicer/src')
-rw-r--r-- | plugins/Clist_nicer/src/clisttray.cpp | 6 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clui.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/cluiservices.cpp | 4 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/statusbar.cpp | 5 |
4 files changed, 8 insertions, 9 deletions
diff --git a/plugins/Clist_nicer/src/clisttray.cpp b/plugins/Clist_nicer/src/clisttray.cpp index f17dcb99ba..0b16733917 100644 --- a/plugins/Clist_nicer/src/clisttray.cpp +++ b/plugins/Clist_nicer/src/clisttray.cpp @@ -62,7 +62,7 @@ int TrayCalcChanged(const char *szChangedProto, int averageMode, int netProtoCou switch (db_get_b(NULL, "CList", "TrayIcon", SETTING_TRAYICON_DEFAULT)) {
case SETTING_TRAYICON_CYCLE:
Clist_TraySetTimer();
- iIcon = IconFromStatusMode(szChangedProto, CallProtoService(szChangedProto, PS_GETSTATUS, 0, 0), 0, &hIcon);
+ iIcon = IconFromStatusMode(szChangedProto, Proto_GetStatus(szChangedProto), 0, &hIcon);
hIcon = (hIcon) ? CopyIcon(hIcon) : ImageList_GetIcon(hCListImages, iIcon, ILD_NORMAL);
return Clist_TrayIconSetBaseInfo(hIcon, nullptr);
@@ -70,7 +70,7 @@ int TrayCalcChanged(const char *szChangedProto, int averageMode, int netProtoCou if (!pcli->trayIcon)
Clist_TrayIconRemove(nullptr, nullptr);
else if (db_get_b(NULL, "CList", "AlwaysMulti", SETTING_ALWAYSMULTI_DEFAULT)) {
- iIcon = IconFromStatusMode(szChangedProto, CallProtoService(szChangedProto, PS_GETSTATUS, 0, 0), 0, &hIcon);
+ iIcon = IconFromStatusMode(szChangedProto, Proto_GetStatus(szChangedProto), 0, &hIcon);
hIcon = (hIcon) ? CopyIcon(hIcon) : ImageList_GetIcon(hCListImages, iIcon, ILD_NORMAL);
return Clist_TrayIconSetBaseInfo(hIcon, szChangedProto);
}
@@ -80,7 +80,7 @@ int TrayCalcChanged(const char *szChangedProto, int averageMode, int netProtoCou case SETTING_TRAYICON_SINGLE:
ptrA szProto(db_get_sa(NULL, "CList", "PrimaryStatus"));
- iIcon = IconFromStatusMode(szProto, szProto ? CallProtoService(szProto, PS_GETSTATUS, 0, 0) : CallService(MS_CLIST_GETSTATUSMODE, 0, 0), 0, &hIcon);
+ iIcon = IconFromStatusMode(szProto, szProto ? Proto_GetStatus(szProto) : CallService(MS_CLIST_GETSTATUSMODE, 0, 0), 0, &hIcon);
hIcon = (hIcon) ? CopyIcon(hIcon) : ImageList_GetIcon(hCListImages, iIcon, ILD_NORMAL);
return Clist_TrayIconSetBaseInfo(hIcon, nullptr);
}
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index 9df0da77e5..8346228903 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -1638,7 +1638,7 @@ buttons_done: SIZE textSize; BYTE showOpts = db_get_b(NULL, "CLUI", "SBarShow", 1); char *szProto = pd->RealName; - int status = CallProtoService(szProto, PS_GETSTATUS, 0, 0); + int status = Proto_GetStatus(szProto); SetBkMode(dis->hDC, TRANSPARENT); int x = dis->rcItem.left; diff --git a/plugins/Clist_nicer/src/cluiservices.cpp b/plugins/Clist_nicer/src/cluiservices.cpp index 512917ed51..7da688f714 100644 --- a/plugins/Clist_nicer/src/cluiservices.cpp +++ b/plugins/Clist_nicer/src/cluiservices.cpp @@ -167,10 +167,10 @@ void CluiProtocolStatusChanged(int, const char*) }
// update the clui button
- WORD wStatus = 0;
+ int wStatus = 0;
if (!db_get(NULL, "CList", "PrimaryStatus", &dbv)) {
if (dbv.type == DBVT_ASCIIZ && mir_strlen(dbv.pszVal) > 1) {
- wStatus = (WORD)CallProtoService(dbv.pszVal, PS_GETSTATUS, 0, 0);
+ wStatus = Proto_GetStatus(dbv.pszVal);
iIcon = IconFromStatusMode(dbv.pszVal, (int)wStatus, 0, &hIcon);
}
mir_free(dbv.pszVal);
diff --git a/plugins/Clist_nicer/src/statusbar.cpp b/plugins/Clist_nicer/src/statusbar.cpp index d1e1789c81..c8b5d443ed 100644 --- a/plugins/Clist_nicer/src/statusbar.cpp +++ b/plugins/Clist_nicer/src/statusbar.cpp @@ -155,12 +155,11 @@ LRESULT CALLBACK NewStatusBarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM if (NotifyEventHooks(hStatusBarShowToolTipEvent, (WPARAM)PD->RealName, 0) > 0) // a plugin handled this event
tooltip_active = TRUE;
else if (db_get_dw(NULL, "mToolTip", "ShowStatusTip", 0)) {
- WORD wStatus = (WORD)CallProtoService(PD->RealName, PS_GETSTATUS, 0, 0);
+ int wStatus = Proto_GetStatus(PD->RealName);
BYTE isLocked = db_get_b(NULL, PD->RealName, "LockMainStatus", 0);
wchar_t szTipText[256];
- mir_snwprintf(szTipText, L"<b>%s</b>: %s%s",
- PD->RealName, Clist_GetStatusModeDescription(wStatus, 0), isLocked ? L" (LOCKED)" : L"");
+ mir_snwprintf(szTipText, L"<b>%s</b>: %s%s", PD->RealName, Clist_GetStatusModeDescription(wStatus, 0), isLocked ? L" (LOCKED)" : L"");
CLCINFOTIP ti = { sizeof(ti) };
ti.isTreeFocused = (GetFocus() == pcli->hwndContactList);
|