From f7e80ddad2316fe652eeaa5c908f8406239c6d4e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 22 Nov 2012 21:22:07 +0000 Subject: and the same damned problem in clist modern git-svn-id: http://svn.miranda-ng.org/main/trunk@2436 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_modern/src/hdr/modern_commonheaders.h | 1 + plugins/Clist_modern/src/modern_statusbar.cpp | 20 ++++++-------------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/plugins/Clist_modern/src/hdr/modern_commonheaders.h b/plugins/Clist_modern/src/hdr/modern_commonheaders.h index ed9690a1b1..9735c0787f 100644 --- a/plugins/Clist_modern/src/hdr/modern_commonheaders.h +++ b/plugins/Clist_modern/src/hdr/modern_commonheaders.h @@ -113,6 +113,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include #include +#include #include "modern_clc.h" #include "modern_clist.h" diff --git a/plugins/Clist_modern/src/modern_statusbar.cpp b/plugins/Clist_modern/src/modern_statusbar.cpp index c344dc31a6..dc0c5f0932 100644 --- a/plugins/Clist_modern/src/modern_statusbar.cpp +++ b/plugins/Clist_modern/src/modern_statusbar.cpp @@ -371,20 +371,12 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC) p.extraIcon = NULL; if ((p.xStatusMode & 8) && p.ProtoStatus > ID_STATUS_OFFLINE) { - char str[MAXMODULELABELLENGTH]; - mir_snprintf(str, SIZEOF(str), "%s/GetXStatus", p.AccountName); - if ( ServiceExists(str)) { - char *dbTitle = "XStatusName"; - char *dbTitle2 = NULL; - xstatus = CallProtoService(p.AccountName,"/GetXStatus",(WPARAM)&dbTitle,(LPARAM)&dbTitle2); - if (dbTitle && xstatus) { - DBVARIANT dbv = {0}; - if ( !DBGetContactSettingTString(NULL, p.AccountName, dbTitle, &dbv)) { - p.ProtoXStatus = mir_tstrdup(dbv.ptszVal); - db_free(&dbv); - } - } - } + TCHAR str[512]; + CUSTOM_STATUS cs = { sizeof(cs) }; + cs.flags = CSSF_MASK_MESSAGE | CSSF_TCHAR; + cs.ptszMessage = str; + if ( CallProtoService(p.AccountName, PS_GETCUSTOMSTATUSEX, 0, (LPARAM)&cs) == 0) + p.ProtoXStatus = mir_tstrdup(str); } if ((p.xStatusMode & 3)) { -- cgit v1.2.3