diff options
author | George Hazan <ghazan@miranda.im> | 2018-05-07 17:50:35 +0200 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-05-07 18:07:33 +0200 |
commit | 1732a6b13f52b573cc4af91c2d9120c596e6bf78 (patch) | |
tree | 57e853c70f4bf51bfedbd8a50874746e5a3bc971 /plugins/Clist_nicer/src/statusbar.cpp | |
parent | d1c9c916887e91a32d7794c83c37ff1c512660d9 (diff) |
PROTOACCOUNT::bIsLocked: lock status to be stored in memory
PROTOACCOUNT became a normal class with constructor & destructor
Diffstat (limited to 'plugins/Clist_nicer/src/statusbar.cpp')
-rw-r--r-- | plugins/Clist_nicer/src/statusbar.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/Clist_nicer/src/statusbar.cpp b/plugins/Clist_nicer/src/statusbar.cpp index c8b5d443ed..47ddaf4948 100644 --- a/plugins/Clist_nicer/src/statusbar.cpp +++ b/plugins/Clist_nicer/src/statusbar.cpp @@ -155,11 +155,12 @@ 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)) {
- int wStatus = Proto_GetStatus(PD->RealName);
- BYTE isLocked = db_get_b(NULL, PD->RealName, "LockMainStatus", 0);
+ PROTOACCOUNT *pa = Proto_GetAccount(PD->RealName);
+ if (pa == nullptr)
+ break;
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(pa->iRealStatus, 0), pa->bIsLocked ? L" (LOCKED)" : L"");
CLCINFOTIP ti = { sizeof(ti) };
ti.isTreeFocused = (GetFocus() == pcli->hwndContactList);
|