diff options
author | George Hazan <george.hazan@gmail.com> | 2014-10-17 18:13:59 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-10-17 18:13:59 +0000 |
commit | 0f371258568d4c1e9515f4a8e9abe53e393717cd (patch) | |
tree | 4c19ef5eb3d6db3a7be24d5be2951a54fb8f2247 /plugins/Import | |
parent | eeec3bae194a4b0dc0a1cd83c29686374030d38a (diff) |
account name added to a search
git-svn-id: http://svn.miranda-ng.org/main/trunk@10817 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Import')
-rw-r--r-- | plugins/Import/src/import.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp index e30610416f..adf7609965 100644 --- a/plugins/Import/src/import.cpp +++ b/plugins/Import/src/import.cpp @@ -210,7 +210,7 @@ static bool FindDestAccount(const char *szProto) return false;
}
-static PROTOACCOUNT* FindMyAccount(const char *szProto, const char *szBaseProto)
+static PROTOACCOUNT* FindMyAccount(const char *szProto, const char *szBaseProto, const TCHAR *ptszName)
{
int destProtoCount;
PROTOACCOUNT **destAccs;
@@ -231,6 +231,9 @@ static PROTOACCOUNT* FindMyAccount(const char *szProto, const char *szBaseProto) if (pa->bOldProto || pa->bIsVirtual || pa->bDynDisabled)
return pa;
+ if (ptszName && !_tcscmp(pa->tszAccountName, ptszName))
+ return pa;
+
char *pszUniqueSetting = (char*)CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
if (!pszUniqueSetting || INT_PTR(pszUniqueSetting) == CALLSERVICE_NOTFOUND) {
pProto = pa;
@@ -273,7 +276,10 @@ void ImportAccounts() continue;
}
- PROTOACCOUNT *pa = FindMyAccount(szProto, szBaseProto);
+ itoa(800+i, szSetting, 10);
+ ptrT tszName(myGetWs(NULL, "Protocols", szSetting));
+
+ PROTOACCOUNT *pa = FindMyAccount(szProto, szBaseProto, tszName);
if (pa) {
arAccountMap.insert(new AccountMap(szProto, pa->szModuleName));
continue;
|