From 45a5b1f9b7709f8d93b57abea7ba46b44eac5707 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 10 Oct 2013 15:13:20 +0000 Subject: - MS_CLIST_GETSTATUSMODEDESCRIPTION replaced with the direct clist call - crazy & obsolete constant GSMDF_PREFIXONLINE removed git-svn-id: http://svn.miranda-ng.org/main/trunk@6428 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_nicer/src/cluiservices.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'plugins/Clist_nicer/src/cluiservices.cpp') diff --git a/plugins/Clist_nicer/src/cluiservices.cpp b/plugins/Clist_nicer/src/cluiservices.cpp index 8e373e9138..d6e5939c86 100644 --- a/plugins/Clist_nicer/src/cluiservices.cpp +++ b/plugins/Clist_nicer/src/cluiservices.cpp @@ -210,29 +210,27 @@ void CluiProtocolStatusChanged( int parStatus, const char* szProto ) iIcon = IconFromStatusMode(dbv.pszVal, (int) wStatus, 0, &hIcon); } mir_free(dbv.pszVal); - } else { + } + else { wStatus = maxStatus; iIcon = IconFromStatusMode((wStatus >= ID_STATUS_CONNECTING && wStatus < ID_STATUS_OFFLINE) ? szMaxProto : NULL, (int) wStatus, 0, &hIcon); g_maxStatus = (int)wStatus; - if (szMaxProto) { - lstrcpynA(g_maxProto, szMaxProto, 100); - g_maxProto[99] = 0; - } + if (szMaxProto) + strncpy_s(g_maxProto, SIZEOF(g_maxProto), szMaxProto, _TRUNCATE); } + /* * this is used globally (actually, by the clist control only) to determine if * any protocol is "in connection" state. If true, then the clist discards redraws * and uses timer based sort and redraw handling. This can improve performance * when connecting multiple protocols significantly. */ - //g_isConnecting = (wStatus >= ID_STATUS_CONNECTING && wStatus < ID_STATUS_OFFLINE); - szStatus = (TCHAR *)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM) wStatus, GSMDF_TCHAR); + szStatus = pcli->pfnGetStatusModeDescription(wStatus, 0); /* * set the global status icon and display the global (most online) status mode on the * status mode button */ - if (szStatus && pcli->hwndContactList) { HWND hwndClistBtn = GetDlgItem(pcli->hwndContactList, IDC_TBGLOBALSTATUS); if ( IsWindow(hwndClistBtn)) { -- cgit v1.2.3