diff options
author | George Hazan <george.hazan@gmail.com> | 2012-11-22 21:22:07 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-11-22 21:22:07 +0000 |
commit | f7e80ddad2316fe652eeaa5c908f8406239c6d4e (patch) | |
tree | b9492456f4325b90da029911b5f9c50da7b621e3 /plugins/Clist_modern/src/modern_statusbar.cpp | |
parent | fbebb01d84355a39cb462ad1c094a108200fef34 (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
Diffstat (limited to 'plugins/Clist_modern/src/modern_statusbar.cpp')
-rw-r--r-- | plugins/Clist_modern/src/modern_statusbar.cpp | 20 |
1 files changed, 6 insertions, 14 deletions
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)) {
|