summaryrefslogtreecommitdiff
path: root/plugins/Import/src/main.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-10-07 12:50:40 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-10-07 12:50:40 +0000
commitc6fb861d7159279b6ee4a4dd678d4693ee56bac6 (patch)
treedf911e6eaf7bd944081aae96f5df9c2ef84c2476 /plugins/Import/src/main.cpp
parent95da57c8e9cf894adf3afae124a29d292b085c5e (diff)
death of old nasty clutch with MS_PROTO_ENUMPROTOCOLS & PROTOACCOUNT::type
git-svn-id: http://svn.miranda-ng.org/main/trunk@1799 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Import/src/main.cpp')
-rw-r--r--plugins/Import/src/main.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/plugins/Import/src/main.cpp b/plugins/Import/src/main.cpp
index 025ad8ef4d..f16a875b3a 100644
--- a/plugins/Import/src/main.cpp
+++ b/plugins/Import/src/main.cpp
@@ -91,14 +91,12 @@ static int ModulesLoaded(WPARAM wParam, LPARAM lParam)
// Only autorun import wizard if at least one protocol is installed
int nProtocols = 0;
- PROTOCOLDESCRIPTOR **ppProtos = NULL;
- CallService(MS_PROTO_ENUMPROTOCOLS, (WPARAM)&nProtocols, (LPARAM)&ppProtos);
- for (int n=0; n < nProtocols; n++) {
- if (ppProtos[n]->type == PROTOTYPE_PROTOCOL) {
- CallService(IMPORT_SERVICE, 0, 0);
- DBWriteContactSettingByte(NULL, IMPORT_MODULE, IMP_KEY_FR, 1);
- break;
- } }
+ PROTOACCOUNT **ppProtos = NULL;
+ ProtoEnumAccounts(&nProtocols, &ppProtos);
+ if (nProtocols > 0) {
+ CallService(IMPORT_SERVICE, 0, 0);
+ DBWriteContactSettingByte(NULL, IMPORT_MODULE, IMP_KEY_FR, 1);
+ }
return 0;
}