diff options
author | George Hazan <george.hazan@gmail.com> | 2013-06-18 14:12:13 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-06-18 14:12:13 +0000 |
commit | 81337e86426dd4a79836554342bdc2e7e6195769 (patch) | |
tree | 4854edef6130b994f3611eb1a035b5de8b37f5cc /plugins/Clist_mw/src | |
parent | 4f14e4f86d5855d75c0941f9b8495e5a2e522087 (diff) |
massive extinction of stupid service name's buffers
git-svn-id: http://svn.miranda-ng.org/main/trunk@5010 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_mw/src')
-rw-r--r-- | plugins/Clist_mw/src/clcitems.cpp | 8 | ||||
-rw-r--r-- | plugins/Clist_mw/src/clistmod.cpp | 6 | ||||
-rw-r--r-- | plugins/Clist_mw/src/commonheaders.h | 1 |
3 files changed, 6 insertions, 9 deletions
diff --git a/plugins/Clist_mw/src/clcitems.cpp b/plugins/Clist_mw/src/clcitems.cpp index 53656dcf4b..19c9c139aa 100644 --- a/plugins/Clist_mw/src/clcitems.cpp +++ b/plugins/Clist_mw/src/clcitems.cpp @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include "commonheaders.h"
#include "clc.h"
#include "clist.h"
@@ -116,7 +117,6 @@ static struct ClcContact * AddContactToGroup(struct ClcData *dat,ClcGroup *group HANDLE hContact;
DBVARIANT dbv;
int i;
- char AdvancedService[255] = {0};
int img = -1;
int basicIcon = 0;
@@ -134,10 +134,8 @@ static struct ClcContact * AddContactToGroup(struct ClcData *dat,ClcGroup *group group->cl.items[i]->isSubcontact = 0;
group->cl.items[i]->subcontacts = NULL;
- _snprintf(AdvancedService,sizeof(AdvancedService),"%s%s",cacheEntry->szProto,"/GetAdvancedStatusIcon");
-
- if (ServiceExists(AdvancedService))
- img = CallService(AdvancedService,(WPARAM)hContact, 0);
+ if ( ProtoServiceExists(cacheEntry->szProto, PS_GETADVANCEDSTATUSICON))
+ img = CallProtoService(cacheEntry->szProto, PS_GETADVANCEDSTATUSICON, (WPARAM)hContact, 0);
if (img == -1 || !(LOWORD(img)))
img = CallService(MS_CLIST_GETCONTACTICON,(WPARAM)hContact,0);
diff --git a/plugins/Clist_mw/src/clistmod.cpp b/plugins/Clist_mw/src/clistmod.cpp index b6879662c7..1b3181d095 100644 --- a/plugins/Clist_mw/src/clistmod.cpp +++ b/plugins/Clist_mw/src/clistmod.cpp @@ -45,7 +45,6 @@ int cli_IconFromStatusMode(const char *szProto,int nStatus, HANDLE hContact) int result = -1;
if (hContact && szProto) {
char * szActProto = (char*)szProto;
- char AdvancedService[255] = {0};
int nActStatus = nStatus;
HANDLE hActContact = hContact;
if ( !db_get_b(NULL,"CLC","Meta",0) && !strcmp(szActProto,"MetaContacts")) {
@@ -61,10 +60,9 @@ int cli_IconFromStatusMode(const char *szProto,int nStatus, HANDLE hContact) }
}
}
- _snprintf(AdvancedService,sizeof(AdvancedService),"%s%s",szActProto,"/GetAdvancedStatusIcon");
- if (ServiceExists(AdvancedService))
- result = CallService(AdvancedService,(WPARAM)hActContact, 0);
+ if ( ProtoServiceExists(szActProto, PS_GETADVANCEDSTATUSICON))
+ result = CallProtoService(szActProto, PS_GETADVANCEDSTATUSICON, (WPARAM)hActContact, 0);
if (result == -1 || !(LOWORD(result)))
// result == -1 means no Advanced icon. LOWORD(result) == 0 happens when Advanced icon returned by ICQ (i.e. no transpot)
diff --git a/plugins/Clist_mw/src/commonheaders.h b/plugins/Clist_mw/src/commonheaders.h index f20960a1cf..b26ebe94a9 100644 --- a/plugins/Clist_mw/src/commonheaders.h +++ b/plugins/Clist_mw/src/commonheaders.h @@ -47,6 +47,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <m_icolib.h>
#include <m_cluiframes.h>
#include <m_fontservice.h>
+#include <m_xstatus.h>
#include <m_metacontacts.h>
|