summaryrefslogtreecommitdiff
path: root/plugins/NewXstatusNotify/src/xstatus.cpp
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2012-12-10 20:38:35 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2012-12-10 20:38:35 +0000
commitd2528d31bac20ff2f7f41355cd398d929d83136a (patch)
tree0255b613a37fea391b1e3b3e74ed66a943f60d80 /plugins/NewXstatusNotify/src/xstatus.cpp
parent4d4710c1749592ec32b5adec4d2c974ebc5fa4ce (diff)
-fixed status message notification for hidden contacts (reported by Andrzej Aleksiejuk)
-removed the deprecated & bizarre aliases git-svn-id: http://svn.miranda-ng.org/main/trunk@2715 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NewXstatusNotify/src/xstatus.cpp')
-rw-r--r--plugins/NewXstatusNotify/src/xstatus.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/plugins/NewXstatusNotify/src/xstatus.cpp b/plugins/NewXstatusNotify/src/xstatus.cpp
index 48897840dc..feb214f93a 100644
--- a/plugins/NewXstatusNotify/src/xstatus.cpp
+++ b/plugins/NewXstatusNotify/src/xstatus.cpp
@@ -142,9 +142,9 @@ void ShowPopup(XSTATUSCHANGE *xsc)
case TYPE_JABBER_MOOD:
case TYPE_JABBER_ACTIVITY:
mir_snprintf(szSetting, SIZEOF(szSetting), "%s/%s/%s", xsc->szProto, (xsc->type == TYPE_JABBER_MOOD) ? "mood" : "activity", "icon");
- if (!DBGetContactSettingString(xsc->hContact, "AdvStatus", szSetting, &dbv)) {
+ if (!db_get_s(xsc->hContact, "AdvStatus", szSetting, &dbv)) {
ppd.lchIcon = Skin_GetIcon(dbv.pszVal);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
break;
@@ -156,7 +156,7 @@ void ShowPopup(XSTATUSCHANGE *xsc)
}
if (ppd.lchIcon == NULL)
- ppd.lchIcon = LoadSkinnedProtoIcon(xsc->szProto, DBGetContactSettingWord(xsc->hContact, xsc->szProto, "Status", ID_STATUS_ONLINE));
+ ppd.lchIcon = LoadSkinnedProtoIcon(xsc->szProto, db_get_w(xsc->hContact, xsc->szProto, "Status", ID_STATUS_ONLINE));
switch (opt.Colors) {
case POPUP_COLOR_OWN:
@@ -175,9 +175,9 @@ void ShowPopup(XSTATUSCHANGE *xsc)
TCHAR *ptszGroup = NULL,
*ptszNick = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)xsc->hContact, GSMDF_TCHAR);
if (opt.ShowGroup) { //add group name to popup title
- if (!DBGetContactSettingTString(xsc->hContact, "CList", "Group", &dbv)) {
+ if (!db_get_ts(xsc->hContact, "CList", "Group", &dbv)) {
ptszGroup = NEWTSTR_ALLOCA(dbv.ptszVal);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
}
@@ -318,7 +318,7 @@ void ExtraStatusChanged(XSTATUSCHANGE *xsc)
wsprintfA(buff, "%d", ID_STATUS_EXTRASTATUS);
if (( db_get_b(0, MODULE, buff, 1) == 0)
- || (DBGetContactSettingWord(xsc->hContact, xsc->szProto, "Status", ID_STATUS_OFFLINE) == ID_STATUS_OFFLINE)
+ || (db_get_w(xsc->hContact, xsc->szProto, "Status", ID_STATUS_OFFLINE) == ID_STATUS_OFFLINE)
|| (!opt.HiddenContactsToo && db_get_b(xsc->hContact, "CList", "Hidden", 0))
|| (opt.TempDisabled))
return;
@@ -387,14 +387,14 @@ TCHAR *GetIcqXStatus(HANDLE hContact, char *szProto, char *szValue, TCHAR *buff,
int statusID = db_get_b(hContact, szProto, "XStatusId", -1);
if (statusID != -1) {
- if (!DBGetContactSettingTString(hContact, szProto, szValue, &dbv)) {
+ if (!db_get_ts(hContact, szProto, szValue, &dbv)) {
if ((strcmp(szValue, "XStatusName") == 0) && dbv.ptszVal[0] == 0)
GetDefaultXstatusName(statusID, szProto, buff, bufflen);
else
_tcsncpy(buff, dbv.ptszVal, bufflen);
buff[bufflen - 1] = 0;
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
}
@@ -408,10 +408,10 @@ TCHAR *GetJabberAdvStatusText(HANDLE hContact, char *szProto, char *szSlot, char
buff[0] = 0;
mir_snprintf(szSetting, SIZEOF(szSetting), "%s/%s/%s", szProto, szSlot, szValue);
- if ( !DBGetContactSettingTString(hContact, "AdvStatus", szSetting, &dbv)) {
+ if ( !db_get_ts(hContact, "AdvStatus", szSetting, &dbv)) {
_tcsncpy(buff, dbv.ptszVal, bufflen);
buff[bufflen - 1] = 0;
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
return buff;