summaryrefslogtreecommitdiff
path: root/plugins/TipperYM
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-04-03 13:37:13 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-04-03 13:37:13 +0300
commit66b61f42871089f3962920924f9030cd6dff2ad8 (patch)
treebfa19d1db1c84a841dd1e6ea258ae1d9212d2ada /plugins/TipperYM
parentdfe4c13573386072b6fcf177e8f52fafc81891f1 (diff)
CLIST_INTERFACE:
- unused members removed (requires new History++ for people who compile Miranda themselves); - useless helpers Proto_IsAccountEnabled & Proto_IsProtocolLocked replaced with direct calls of PROTOACCOUNT members IsEnabled & IsLocked respectively; - static interface member pfnGetProtocolVisibility replaced with static function Clist_GetProtocolVisibility or PROTOACCOUNT::IsVisible when possible
Diffstat (limited to 'plugins/TipperYM')
-rw-r--r--plugins/TipperYM/src/popwin.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp
index 5425e098aa..9fa2057686 100644
--- a/plugins/TipperYM/src/popwin.cpp
+++ b/plugins/TipperYM/src/popwin.cpp
@@ -72,14 +72,12 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
pwd->iSidebarWidth = opt.iSidebarWidth;
PROTOACCOUNT *pa = Proto_GetAccount(pwd->clcit.szProto);
- if (pa)
+ if (pa) {
mir_wstrcpy(pwd->swzTitle, pa->tszAccountName);
-
- if (mir_wstrlen(pwd->swzTitle) == 0)
- a2t(pwd->clcit.szProto, pwd->swzTitle, TITLE_TEXT_LEN);
-
- if (Proto_IsAccountLocked(pa))
- mir_snwprintf(pwd->swzTitle, TranslateT("%s (locked)"), pwd->swzTitle);
+ if (pa->IsLocked())
+ mir_snwprintf(pwd->swzTitle, TranslateT("%s (locked)"), pwd->swzTitle);
+ }
+ else a2t(pwd->clcit.szProto, pwd->swzTitle, TITLE_TEXT_LEN);
// protocol status
WORD wStatus = (WORD)CallProtoService(pwd->clcit.szProto, PS_GETSTATUS, 0, 0);
@@ -1465,7 +1463,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
if (opt.bHideOffline && wStatus == ID_STATUS_OFFLINE)
continue;
- if (!Proto_IsAccountEnabled(pa) || !IsTrayProto(pa->tszAccountName, (BOOL)wParam))
+ if (!pa->IsEnabled() || !IsTrayProto(pa->tszAccountName, (BOOL)wParam))
continue;
if (dwItems & TRAYTIP_NUMCONTACTS) {
@@ -1482,7 +1480,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
wchar_t swzProto[256];
mir_wstrcpy(swzProto, pa->tszAccountName);
if (dwItems & TRAYTIP_LOCKSTATUS)
- if (Proto_IsAccountLocked(pa))
+ if (pa->IsLocked())
mir_snwprintf(swzProto, TranslateT("%s (locked)"), pa->tszAccountName);
AddRow(pwd, swzProto, buff, nullptr, false, false, !bFirstItem, true, Skin_LoadProtoIcon(pa->szModuleName, wStatus));