summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-07-13 12:27:43 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-07-13 12:27:43 +0000
commit90a99f237d2332a5d882c0dcd3e2b4572b04944f (patch)
tree8bb85f56bc112a48873f42e9c9d0ede4be4dc34a /src
parent5df94ff719eccd04c7450df35fb5e3f2b36e2ee7 (diff)
fixes #736 (Converting a contact into metacontact sometimes renames it)
git-svn-id: http://svn.miranda-ng.org/main/trunk@9786 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r--src/modules/metacontacts/meta_options.cpp2
-rw-r--r--src/modules/metacontacts/meta_services.cpp5
2 files changed, 3 insertions, 4 deletions
diff --git a/src/modules/metacontacts/meta_options.cpp b/src/modules/metacontacts/meta_options.cpp
index 70738937b8..2dbcfd32c2 100644
--- a/src/modules/metacontacts/meta_options.cpp
+++ b/src/modules/metacontacts/meta_options.cpp
@@ -162,7 +162,7 @@ int Meta_ReadOptions(MetaOptions *opt)
opt->bSuppressStatus = db_get_b(NULL, META_PROTO, "SuppressStatus", true) != 0;
opt->menu_contact_label = (int)db_get_w(NULL, META_PROTO, "MenuContactLabel", DNT_UID);
opt->menu_function = (int)db_get_w(NULL, META_PROTO, "MenuContactFunction", FT_MENU);
- opt->clist_contact_name = (int)db_get_w(NULL, META_PROTO, "CListContactName", CNNT_NICK);
+ opt->clist_contact_name = (int)db_get_w(NULL, META_PROTO, "CListContactName", CNNT_DISPLAYNAME);
opt->days_history = (int)db_get_dw(NULL, META_PROTO, "DaysHistory", 0);
opt->set_status_from_offline_delay = (int)db_get_dw(NULL, META_PROTO, "SetStatusFromOfflineDelay", DEFAULT_SET_STATUS_SLEEP_TIME);
opt->bLockHandle = db_get_b(NULL, META_PROTO, "LockHandle", false) != 0;
diff --git a/src/modules/metacontacts/meta_services.cpp b/src/modules/metacontacts/meta_services.cpp
index 5c28a2bf66..1e83790031 100644
--- a/src/modules/metacontacts/meta_services.cpp
+++ b/src/modules/metacontacts/meta_services.cpp
@@ -380,12 +380,11 @@ int Meta_SettingChanged(WPARAM hContact, LPARAM lParam)
mir_snprintf(buffer, SIZEOF(buffer), "Nick%d", contact_number);
db_set(ccMeta->contactID, META_PROTO, buffer, &dcws->value);
- DBVARIANT dbv;
- if (db_get_s(hContact, "CList", "MyHandle", &dbv, 0)) {
+ ptrT tszMyhandle(db_get_tsa(hContact, "CList", "MyHandle"));
+ if (tszMyhandle == NULL) {
mir_snprintf(buffer, SIZEOF(buffer), "CListName%d", contact_number);
db_set(ccMeta->contactID, META_PROTO, buffer, &dcws->value);
}
- else db_free(&dbv);
// copy nick to metacontact, if it's the most online
MCONTACT hMostOnline = Meta_GetMostOnline(ccMeta);