diff options
Diffstat (limited to 'src/modules/metacontacts')
-rw-r--r-- | src/modules/metacontacts/meta_options.cpp | 2 | ||||
-rw-r--r-- | src/modules/metacontacts/meta_services.cpp | 5 |
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);
|