summaryrefslogtreecommitdiff
path: root/src/modules/metacontacts
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/metacontacts')
-rw-r--r--src/modules/metacontacts/meta_menu.cpp16
-rw-r--r--src/modules/metacontacts/meta_services.cpp12
-rw-r--r--src/modules/metacontacts/meta_utils.cpp22
3 files changed, 25 insertions, 25 deletions
diff --git a/src/modules/metacontacts/meta_menu.cpp b/src/modules/metacontacts/meta_menu.cpp
index 9f17f423f5..e2a78aff38 100644
--- a/src/modules/metacontacts/meta_menu.cpp
+++ b/src/modules/metacontacts/meta_menu.cpp
@@ -111,25 +111,25 @@ void Meta_RemoveContactNumber(DBCachedContact *ccMeta, int number, bool bUpdateI
// remove the last one
int id = ccMeta->nSubs - 1;
char buffer[512];
- mir_snprintf(buffer, SIZEOF(buffer), "Handle%d", id);
+ mir_snprintf(buffer, "Handle%d", id);
db_unset(ccMeta->contactID, META_PROTO, buffer);
- mir_snprintf(buffer, SIZEOF(buffer), "Protocol%d", id);
+ mir_snprintf(buffer, "Protocol%d", id);
db_unset(ccMeta->contactID, META_PROTO, buffer);
- mir_snprintf(buffer, SIZEOF(buffer), "Status%d", id);
+ mir_snprintf(buffer, "Status%d", id);
db_unset(ccMeta->contactID, META_PROTO, buffer);
- mir_snprintf(buffer, SIZEOF(buffer), "StatusString%d", id);
+ mir_snprintf(buffer, "StatusString%d", id);
db_unset(ccMeta->contactID, META_PROTO, buffer);
- mir_snprintf(buffer, SIZEOF(buffer), "Login%d", id);
+ mir_snprintf(buffer, "Login%d", id);
db_unset(ccMeta->contactID, META_PROTO, buffer);
- mir_snprintf(buffer, SIZEOF(buffer), "Nick%d", id);
+ mir_snprintf(buffer, "Nick%d", id);
db_unset(ccMeta->contactID, META_PROTO, buffer);
- mir_snprintf(buffer, SIZEOF(buffer), "CListName%d", id);
+ mir_snprintf(buffer, "CListName%d", id);
db_unset(ccMeta->contactID, META_PROTO, buffer);
if (ccSub != NULL) {
@@ -425,7 +425,7 @@ void InitMenus()
mi.pszName = "";
char buffer[512];
- mir_snprintf(buffer, SIZEOF(buffer), "MetaContacts/MenuFunc%d", i);
+ mir_snprintf(buffer, "MetaContacts/MenuFunc%d", i);
mi.pszService = buffer;
mi.position++;
hMenuContact[i] = Menu_AddContactMenuItem(&mi);
diff --git a/src/modules/metacontacts/meta_services.cpp b/src/modules/metacontacts/meta_services.cpp
index 7a7ef09b80..72f60c5f71 100644
--- a/src/modules/metacontacts/meta_services.cpp
+++ b/src/modules/metacontacts/meta_services.cpp
@@ -374,12 +374,12 @@ int Meta_SettingChanged(WPARAM hContact, LPARAM lParam)
}
else if (!mir_strcmp(dcws->szSetting, "Nick") && dcws->value.type != DBVT_DELETED) {
// subcontact nick has changed - update metacontact
- mir_snprintf(buffer, SIZEOF(buffer), "Nick%d", contact_number);
+ mir_snprintf(buffer, "Nick%d", contact_number);
db_set(ccMeta->contactID, META_PROTO, buffer, &dcws->value);
ptrT tszMyhandle(db_get_tsa(hContact, "CList", "MyHandle"));
if (tszMyhandle == NULL) {
- mir_snprintf(buffer, SIZEOF(buffer), "CListName%d", contact_number);
+ mir_snprintf(buffer, "CListName%d", contact_number);
db_set(ccMeta->contactID, META_PROTO, buffer, &dcws->value);
}
@@ -402,7 +402,7 @@ int Meta_SettingChanged(WPARAM hContact, LPARAM lParam)
else if (!mir_strcmp(dcws->szModule, "CList") && !mir_strcmp(dcws->szSetting, "MyHandle")) {
if (dcws->value.type == DBVT_DELETED) {
char *proto = GetContactProto(hContact);
- mir_snprintf(buffer, SIZEOF(buffer), "CListName%d", contact_number);
+ mir_snprintf(buffer, "CListName%d", contact_number);
DBVARIANT dbv;
if (proto && !db_get_ts(hContact, proto, "Nick", &dbv)) {
@@ -413,7 +413,7 @@ int Meta_SettingChanged(WPARAM hContact, LPARAM lParam)
}
else {
// subcontact clist displayname has changed - update metacontact
- mir_snprintf(buffer, SIZEOF(buffer), "CListName%d", contact_number);
+ mir_snprintf(buffer, "CListName%d", contact_number);
db_set(ccMeta->contactID, META_PROTO, buffer, &dcws->value);
}
@@ -423,10 +423,10 @@ int Meta_SettingChanged(WPARAM hContact, LPARAM lParam)
// subcontact changing status
else if (!mir_strcmp(dcws->szSetting, "Status") && dcws->value.type != DBVT_DELETED) {
// update subcontact status setting
- mir_snprintf(buffer, SIZEOF(buffer), "Status%d", contact_number);
+ mir_snprintf(buffer, "Status%d", contact_number);
db_set_w(ccMeta->contactID, META_PROTO, buffer, dcws->value.wVal);
- mir_snprintf(buffer, SIZEOF(buffer), "StatusString%d", contact_number);
+ mir_snprintf(buffer, "StatusString%d", contact_number);
db_set_ts(ccMeta->contactID, META_PROTO, buffer, cli.pfnGetStatusModeDescription(dcws->value.wVal, 0));
// set status to that of most online contact
diff --git a/src/modules/metacontacts/meta_utils.cpp b/src/modules/metacontacts/meta_utils.cpp
index 9bf3aff72e..e58f509fcf 100644
--- a/src/modules/metacontacts/meta_utils.cpp
+++ b/src/modules/metacontacts/meta_utils.cpp
@@ -116,7 +116,7 @@ BOOL Meta_Assign(MCONTACT hSub, MCONTACT hMeta, BOOL set_as_default)
// write the contact's protocol
char buffer[512];
- mir_snprintf(buffer, SIZEOF(buffer), "Protocol%d", ccDest->nSubs);
+ mir_snprintf(buffer, "Protocol%d", ccDest->nSubs);
if (db_set_s(hMeta, META_PROTO, buffer, szProto)) {
MessageBox(0, TranslateT("Could not write contact protocol to metacontact"), TranslateT("Assignment error"), MB_OK | MB_ICONWARNING);
db_free(&dbv);
@@ -124,7 +124,7 @@ BOOL Meta_Assign(MCONTACT hSub, MCONTACT hMeta, BOOL set_as_default)
}
// write the login
- mir_snprintf(buffer, SIZEOF(buffer), "Login%d", ccDest->nSubs);
+ mir_snprintf(buffer, "Login%d", ccDest->nSubs);
if (db_set(hMeta, META_PROTO, buffer, &dbv)) {
MessageBox(0, TranslateT("Could not write unique ID of contact to metacontact"), TranslateT("Assignment error"), MB_OK | MB_ICONWARNING);
db_free(&dbv);
@@ -136,7 +136,7 @@ BOOL Meta_Assign(MCONTACT hSub, MCONTACT hMeta, BOOL set_as_default)
// If we can get the nickname of the subcontact...
if (!db_get(hSub, szProto, "Nick", &dbv)) {
// write the nickname
- mir_snprintf(buffer, SIZEOF(buffer), "Nick%d", ccDest->nSubs);
+ mir_snprintf(buffer, "Nick%d", ccDest->nSubs);
if (db_set(hMeta, META_PROTO, buffer, &dbv)) {
MessageBox(0, TranslateT("Could not write nickname of contact to metacontact"), TranslateT("Assignment error"), MB_OK | MB_ICONWARNING);
db_free(&dbv);
@@ -147,22 +147,22 @@ BOOL Meta_Assign(MCONTACT hSub, MCONTACT hMeta, BOOL set_as_default)
}
// write the display name
- mir_snprintf(buffer, SIZEOF(buffer), "CListName%d", ccDest->nSubs);
+ mir_snprintf(buffer, "CListName%d", ccDest->nSubs);
db_set_ts(hMeta, META_PROTO, buffer, cli.pfnGetContactDisplayName(hSub, 0));
// Get the status
WORD status = db_get_w(hSub, szProto, "Status", ID_STATUS_OFFLINE);
// write the status
- mir_snprintf(buffer, SIZEOF(buffer), "Status%d", ccDest->nSubs);
+ mir_snprintf(buffer, "Status%d", ccDest->nSubs);
db_set_w(hMeta, META_PROTO, buffer, status);
// write the handle
- mir_snprintf(buffer, SIZEOF(buffer), "Handle%d", ccDest->nSubs);
+ mir_snprintf(buffer, "Handle%d", ccDest->nSubs);
db_set_dw(hMeta, META_PROTO, buffer, hSub);
// write status string
- mir_snprintf(buffer, SIZEOF(buffer), "StatusString%d", ccDest->nSubs);
+ mir_snprintf(buffer, "StatusString%d", ccDest->nSubs);
TCHAR *szStatus = cli.pfnGetStatusModeDescription(status, 0);
db_set_ts(hMeta, META_PROTO, buffer, szStatus);
@@ -362,7 +362,7 @@ int Meta_HideLinkedContacts(void)
continue;
// update metacontact's record of status for this contact
- mir_snprintf(buffer, SIZEOF(buffer), "Status%d",contact_number);
+ mir_snprintf(buffer, "Status%d",contact_number);
// prepare to update metacontact record of subcontat status
char *szProto = GetContactProto(hContact);
@@ -372,10 +372,10 @@ int Meta_HideLinkedContacts(void)
// update metacontact's record of nick for this contact
if (szProto && !db_get(hContact, szProto, "Nick", &dbv)) {
- mir_snprintf(buffer, SIZEOF(buffer), "Nick%d",contact_number);
+ mir_snprintf(buffer, "Nick%d",contact_number);
db_set(ccMeta->contactID, META_PROTO, buffer, &dbv);
- mir_snprintf(buffer, SIZEOF(buffer), "CListName%d",contact_number);
+ mir_snprintf(buffer, "CListName%d",contact_number);
if (db_get(hContact, "CList", "MyHandle", &dbv2))
db_set(ccMeta->contactID, META_PROTO, buffer, &dbv);
else {
@@ -387,7 +387,7 @@ int Meta_HideLinkedContacts(void)
}
else {
if (!db_get(hContact, "CList", "MyHandle", &dbv)) {
- mir_snprintf(buffer, SIZEOF(buffer),"CListName%d",contact_number);
+ mir_snprintf(buffer,"CListName%d",contact_number);
db_set(ccMeta->contactID, META_PROTO, buffer, &dbv);
db_free(&dbv);
}