diff options
author | George Hazan <george.hazan@gmail.com> | 2013-09-07 12:09:27 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-09-07 12:09:27 +0000 |
commit | 03a0b643b94d5aa7f9c129fe73eea314d099cf56 (patch) | |
tree | 221081ffe0602905765815d302b02d1f761cf100 /plugins/DbEditorPP/src/exportimport.cpp | |
parent | 0ac4b544972fb011e7c7c69e60a1d5d180ada0ac (diff) |
shameful end of the group processing zoo, part 1
git-svn-id: http://svn.miranda-ng.org/main/trunk@5994 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/DbEditorPP/src/exportimport.cpp')
-rw-r--r-- | plugins/DbEditorPP/src/exportimport.cpp | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/plugins/DbEditorPP/src/exportimport.cpp b/plugins/DbEditorPP/src/exportimport.cpp index f1e24cfc7c..23cea2f5dd 100644 --- a/plugins/DbEditorPP/src/exportimport.cpp +++ b/plugins/DbEditorPP/src/exportimport.cpp @@ -339,30 +339,6 @@ HANDLE CheckNewContact(char *myProto, char *uid, char *myName) return INVALID_HANDLE_VALUE;
}
-HANDLE Clist_GroupExists(WCHAR *tszGroup)
-{
- unsigned int i = 0;
- WCHAR *_t = 0;
- char str[10];
- INT_PTR result = 0;
- DBVARIANT dbv = {0};
- int match;
-
- do {
- _itoa(i, str, 10);
- result = db_get_ts(0, "CListGroups", str, &dbv);
- if (!result) {
- match = (!lstrcmpW(tszGroup, (LPCWSTR)&dbv.ptszVal[1]) && (lstrlenW(tszGroup) == lstrlenW((LPCWSTR)&dbv.ptszVal[1])));
- db_free(&dbv);
- if(match)
- return((HANDLE)(i + 1));
- }
- i++;
- }
- while(result == 0);
- return(0);
-}
-
void importSettings(HANDLE hContact, char *importstring )
{
char module[256] = "", setting[256] = "", *end;
@@ -463,7 +439,7 @@ void importSettings(HANDLE hContact, char *importstring ) WCHAR* GroupName = mir_a2u(end+2);
if (!GroupName)
continue;
- HANDLE GroupHandle = Clist_GroupExists(GroupName);
+ HANDLE GroupHandle = (HANDLE)CallService(MS_CLIST_GROUPEXISTS, 0, LPARAM(GroupName));
if(GroupHandle == 0) {
GroupHandle = (HANDLE)CallService(MS_CLIST_GROUPCREATE, 0, (LPARAM)GroupName);
|