diff options
author | George Hazan <george.hazan@gmail.com> | 2016-09-01 12:48:54 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-09-01 12:48:54 +0000 |
commit | 11ab7716e9d48c7505fbcf4fe1deba33b494cdc1 (patch) | |
tree | 795bb05caa502ed8e1f4fc7064563e112b077197 /plugins/UserInfoEx | |
parent | ecfe7288fee11443d9a0f48ca38daa2aabf955c5 (diff) |
- MS_CLIST_SETHIDEOFFLINE replaced with pcli->pfnSetHideOffline();
- MS_CLIST_TOGGLEHIDEOFFLINE added to cover the only case with service call;
git-svn-id: http://svn.miranda-ng.org/main/trunk@17237 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/UserInfoEx')
-rw-r--r-- | plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp | 45 |
1 files changed, 19 insertions, 26 deletions
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp index 078f0ee27d..f18d2a2d1b 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp @@ -161,42 +161,35 @@ INT_PTR SvcExImport_Import(lpExImParam ExImContact, HWND hwndParent) // create the filename to suggest the user for the to export contact
DisplayNameToFileName(ExImContact, szFileName, _countof(szFileName));
- int nIndex = DlgExIm_OpenFileName(hwndParent,
+ int nIndex = DlgExIm_OpenFileName(hwndParent,
Translate("Import User Details from VCard"),
FilterString(ExImContact),
szFileName);
-// Stop during develop
-if (ExImContact->Typ == EXIM_ACCOUNT ||
- ExImContact->Typ == EXIM_GROUP) return 1;
+ // Stop during develop
+ if (ExImContact->Typ == EXIM_ACCOUNT ||
+ ExImContact->Typ == EXIM_GROUP) return 1;
switch (nIndex) {
- case 1:
- {
- CFileXml xmlFile;
- CallService(MS_CLIST_SETHIDEOFFLINE, -1, 0); //workarround to refresh the clist....
- xmlFile.Import(ExImContact->hContact, szFileName);
- CallService(MS_CLIST_SETHIDEOFFLINE, -1, 0); //...after import.
- //Clist_Broadcast(CLM_AUTOREBUILD, 0, 0); //does not work
- return 0;
- }
+ case 1:
+ CFileXml().Import(ExImContact->hContact, szFileName);
+ Clist_BroadcastAsync(CLM_AUTOREBUILD, 0, 0);
+ return 0;
+
// .ini
- case 2:
- return SvcExImINI_Import(ExImContact->hContact, szFileName);
+ case 2:
+ return SvcExImINI_Import(ExImContact->hContact, szFileName);
// .vcf
- case 3:
- {
- CVCardFileVCF vcfFile;
-
- if (vcfFile.Open(ExImContact->hContact, szFileName, "rt")) {
- SetCursor(LoadCursor(NULL, IDC_WAIT));
- vcfFile.Import();
- vcfFile.Close();
- SetCursor(LoadCursor(NULL, IDC_ARROW));
- }
- return 0;
+ case 3:
+ CVCardFileVCF vcfFile;
+ if (vcfFile.Open(ExImContact->hContact, szFileName, "rt")) {
+ SetCursor(LoadCursor(NULL, IDC_WAIT));
+ vcfFile.Import();
+ vcfFile.Close();
+ SetCursor(LoadCursor(NULL, IDC_ARROW));
}
+ return 0;
}
return 1;
}
|