diff options
author | George Hazan <george.hazan@gmail.com> | 2014-12-21 17:52:29 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-12-21 17:52:29 +0000 |
commit | 11354effc08a8d1b1b0fc95b5c473256f33c8ec3 (patch) | |
tree | 0b404c3b617605c13d02a3a0bedc06dbd0b1fb31 /plugins/Import | |
parent | 45216fbba8af5d8e9d4173808741df52fb5ded11 (diff) |
- MS_PROTO_ISPROTOCOLLOADED now switched back to protocols instead of accounts;
- calls of MS_PROTO_ISPROTOCOLLOADED replaced with ProtoGetAccount() wherever possible
git-svn-id: http://svn.miranda-ng.org/main/trunk@11558 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Import')
-rw-r--r-- | plugins/Import/src/import.cpp | 7 | ||||
-rw-r--r-- | plugins/Import/src/import.h | 1 | ||||
-rw-r--r-- | plugins/Import/src/utils.cpp | 7 |
3 files changed, 6 insertions, 9 deletions
diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp index a7a1b89984..fc479769b2 100644 --- a/plugins/Import/src/import.cpp +++ b/plugins/Import/src/import.cpp @@ -482,6 +482,11 @@ bool ImportAccounts() if (p.pa != NULL || p.szBaseProto == NULL || !mir_strcmp(p.szSrcAcc, META_PROTO))
continue;
+ if (!IsProtocolLoaded(p.szBaseProto)) {
+ AddMessage(LPGENT("Protocol %S is not loaded, skipping account %s creation"), p.szBaseProto, p.tszSrcName);
+ continue;
+ }
+
ACC_CREATE newacc;
newacc.pszBaseProto = p.szBaseProto;
newacc.pszInternal = NULL;
@@ -781,7 +786,7 @@ static MCONTACT ImportContact(MCONTACT hSrc) return NULL;
}
- if (!IsProtocolLoaded(pda->pa->szModuleName)) {
+ if (!ProtoGetAccount(pda->pa->szModuleName)) {
AddMessage(LPGENT("Skipping contact, %S not installed."), cc->szProto);
return NULL;
}
diff --git a/plugins/Import/src/import.h b/plugins/Import/src/import.h index 12f08d7f59..42335132e0 100644 --- a/plugins/Import/src/import.h +++ b/plugins/Import/src/import.h @@ -101,7 +101,6 @@ INT_PTR CALLBACK MirandaOptionsPageProc(HWND hdlg, UINT message, WPARAM wParam, INT_PTR CALLBACK MirandaAdvOptionsPageProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK FinishedPageProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam);
-bool IsProtocolLoaded(const char* pszProtocolName);
bool IsDuplicateEvent(MCONTACT hContact, DBEVENTINFO dbei);
int CreateGroup(const TCHAR* name, MCONTACT hContact);
diff --git a/plugins/Import/src/utils.cpp b/plugins/Import/src/utils.cpp index 35a5406b04..de6deb1c76 100644 --- a/plugins/Import/src/utils.cpp +++ b/plugins/Import/src/utils.cpp @@ -23,13 +23,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "import.h"
/////////////////////////////////////////////////////////////////////////////////////////
-
-bool IsProtocolLoaded(const char *pszProtocolName)
-{
- return CallService(MS_PROTO_ISPROTOCOLLOADED, 0, (LPARAM)pszProtocolName) != 0;
-}
-
-// ------------------------------------------------
// Creates a group with a specified name in the
// Miranda contact list.
// If contact is specified adds it to group
|