diff options
author | George Hazan <george.hazan@gmail.com> | 2014-03-06 11:30:40 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-03-06 11:30:40 +0000 |
commit | 8dabe06ba2c2e42aedaadc9f712190e239a17f28 (patch) | |
tree | 75cfc289e51db97352278ba8b6b2aa5899fe63fd /src/modules/metacontacts/meta_menu.cpp | |
parent | 58d6ac34a9cea9499948f06aee6c011a2fc9bf7f (diff) |
methods for meta-history merging & splitting
git-svn-id: http://svn.miranda-ng.org/main/trunk@8428 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/metacontacts/meta_menu.cpp')
-rw-r--r-- | src/modules/metacontacts/meta_menu.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/modules/metacontacts/meta_menu.cpp b/src/modules/metacontacts/meta_menu.cpp index 8c42b1539c..fe5ac94efa 100644 --- a/src/modules/metacontacts/meta_menu.cpp +++ b/src/modules/metacontacts/meta_menu.cpp @@ -48,14 +48,7 @@ static HGENMENU INT_PTR Meta_Convert(WPARAM wParam, LPARAM lParam)
{
- DBVARIANT dbv;
- char *group = 0;
-
- // Get some information about the selected contact.
- if (!db_get_utf(wParam, "CList", "Group", &dbv)) {
- group = _strdup(dbv.pszVal);
- db_free(&dbv);
- }
+ ptrT tszGroup(db_get_tsa(wParam, "CList", "Group"));
// Create a new metacontact
MCONTACT hMetaContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
@@ -70,8 +63,8 @@ INT_PTR Meta_Convert(WPARAM wParam, LPARAM lParam) // Add the MetaContact protocol to the new meta contact
CallService(MS_PROTO_ADDTOCONTACT, hMetaContact, (LPARAM)META_PROTO);
- if (group)
- db_set_utf(hMetaContact, "CList", "Group", group);
+ if (tszGroup)
+ db_set_ts(hMetaContact, "CList", "Group", tszGroup);
// Assign the contact to the MetaContact just created (and make default).
if (!Meta_Assign(wParam, hMetaContact, TRUE)) {
@@ -85,8 +78,7 @@ INT_PTR Meta_Convert(WPARAM wParam, LPARAM lParam) db_set_b(hMetaContact, "CList", "Hidden", 1);
}
- free(group);
- return (INT_PTR)hMetaContact;
+ return hMetaContact;
}
void Meta_RemoveContactNumber(DBCachedContact *ccMeta, int number, bool bUpdateInfo)
|