diff options
author | George Hazan <george.hazan@gmail.com> | 2013-10-10 15:13:20 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-10-10 15:13:20 +0000 |
commit | 45a5b1f9b7709f8d93b57abea7ba46b44eac5707 (patch) | |
tree | 03f5a5db7a5e8a951951710a3d383a936a14ce74 /plugins/Clist_nicer/src/cluiservices.cpp | |
parent | eb25a0d7ed0da6bd4630c553be933df5bd46b6b9 (diff) |
- 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
Diffstat (limited to 'plugins/Clist_nicer/src/cluiservices.cpp')
-rw-r--r-- | plugins/Clist_nicer/src/cluiservices.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
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)) {
|