summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-11-22 21:22:07 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-11-22 21:22:07 +0000
commitf7e80ddad2316fe652eeaa5c908f8406239c6d4e (patch)
treeb9492456f4325b90da029911b5f9c50da7b621e3
parentfbebb01d84355a39cb462ad1c094a108200fef34 (diff)
and the same damned problem in clist modern
git-svn-id: http://svn.miranda-ng.org/main/trunk@2436 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/Clist_modern/src/hdr/modern_commonheaders.h1
-rw-r--r--plugins/Clist_modern/src/modern_statusbar.cpp20
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 <m_timezones.h>
#include <m_toptoolbar.h>
#include <m_extraicons.h>
+#include <m_xstatus.h>
#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)) {