From 03a0b643b94d5aa7f9c129fe73eea314d099cf56 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 7 Sep 2013 12:09:27 +0000 Subject: 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 --- plugins/DbEditorPP/src/exportimport.cpp | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) (limited to 'plugins/DbEditorPP') 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); -- cgit v1.2.3