summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-08-30 12:58:02 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-08-30 12:58:02 +0300
commitf6f0238e4b6d36fbc4d523382d55ebbfe08ed31a (patch)
treeb5d64c00e12d120b4c192b9fbb958108e22301c2
parent5e0f2f99192c6cc28e077800371bc0e25fb246de (diff)
fix of wrong status change processing, caused by a patch for #1304
fixes #1321 (When connecting to only some protocols, the notification area icon shows offline icon)
-rw-r--r--plugins/Clist_nicer/src/cluiservices.cpp2
-rw-r--r--src/mir_app/src/clc.cpp9
2 files changed, 6 insertions, 5 deletions
diff --git a/plugins/Clist_nicer/src/cluiservices.cpp b/plugins/Clist_nicer/src/cluiservices.cpp
index 66ca240586..98c87934b2 100644
--- a/plugins/Clist_nicer/src/cluiservices.cpp
+++ b/plugins/Clist_nicer/src/cluiservices.cpp
@@ -173,7 +173,7 @@ void CluiProtocolStatusChanged(int, const char*)
char *szMaxProto = nullptr;
wStatus = Clist_GetGeneralizedStatus(&szMaxProto);
iIcon = IconFromStatusMode(szMaxProto, wStatus, 0);
- g_maxStatus = (int)wStatus;
+ g_maxStatus = wStatus;
}
/*
diff --git a/src/mir_app/src/clc.cpp b/src/mir_app/src/clc.cpp
index 40f6b5e6cb..6758a23958 100644
--- a/src/mir_app/src/clc.cpp
+++ b/src/mir_app/src/clc.cpp
@@ -136,14 +136,15 @@ static int ClcProtoAck(WPARAM, LPARAM lParam)
if (ack->type == ACKTYPE_STATUS) {
if (ack->result == ACKRESULT_SUCCESS) {
PROTOACCOUNT *pa = Proto_GetAccount(ack->szModule);
- if (pa) {
+ if (pa)
pa->iRealStatus = ack->lParam;
- Clist_TrayIconUpdateBase(ack->szModule);
- }
}
-
+
g_clistApi.pfnCluiProtocolStatusChanged(lParam, ack->szModule);
+ if (ack->result == ACKRESULT_SUCCESS)
+ Clist_TrayIconUpdateBase(ack->szModule);
+
if ((INT_PTR)ack->hProcess < ID_STATUS_ONLINE && ack->lParam >= ID_STATUS_ONLINE) {
// if we're going offline, kill all contacts scheduled for deletion
DWORD caps = (DWORD)CallProtoServiceInt(0, ack->szModule, PS_GETCAPS, PFLAGNUM_1, 0);