From 6df974bc3fa6657b37fb039fc77458463629326a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 29 Feb 2016 07:16:26 +0000 Subject: - compiilation fix; - code cleaning; - version bump. git-svn-id: http://svn.miranda-ng.org/main/trunk@16376 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Import/src/import.cpp | 4 +--- plugins/Import/src/main.cpp | 8 +++++--- plugins/Import/src/stdafx.h | 1 + plugins/Import/src/version.h | 2 +- plugins/Import/src/wizard.cpp | 3 +-- 5 files changed, 9 insertions(+), 9 deletions(-) (limited to 'plugins') diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp index 6bf2ca229d..b6d6f4ab98 100644 --- a/plugins/Import/src/import.cpp +++ b/plugins/Import/src/import.cpp @@ -554,7 +554,7 @@ struct ImportContactData const char *szBaseProto; }; -int ModulesEnumProc(const char *szModuleName, DWORD ofsModuleName, LPARAM lParam) +int ModulesEnumProc(const char *szModuleName, DWORD, LPARAM lParam) { ImportContactData *icd = (ImportContactData*)lParam; if (!mir_strcmp(icd->szBaseProto, szModuleName)) @@ -568,8 +568,6 @@ void ImportContactSettings(AccountMap *pda, MCONTACT hSrc, MCONTACT hDst) if (pda->pa == NULL) return; - char *szDstAcc = pda->pa->szModuleName; - ImportContactData icd = { hSrc, hDst, pda->szSrcAcc }; CallService(MS_DB_MODULES_ENUM, (WPARAM)&icd, (LPARAM)ModulesEnumProc); diff --git a/plugins/Import/src/main.cpp b/plugins/Import/src/main.cpp index b7dde39442..d89b51fdcf 100644 --- a/plugins/Import/src/main.cpp +++ b/plugins/Import/src/main.cpp @@ -29,6 +29,7 @@ static HANDLE hImportService = NULL; HINSTANCE hInst; INT_PTR CALLBACK WizardDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam); +bool g_bServiceMode = false; HWND hwndWizard, hwndAccMerge; int hLangpack; @@ -75,7 +76,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) ///////////////////////////////////////////////////////////////////////////////////////// // MirandaInterfaces - returns the protocol interface to the core -extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = {MIID_IMPORT, MIID_SERVICEMODE, MIID_LAST}; +extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_IMPORT, MIID_SERVICEMODE, MIID_LAST }; ///////////////////////////////////////////////////////////////////////////////////////// // Performs a primary set of actions upon plugin loading @@ -107,13 +108,14 @@ static int OnExit(WPARAM, LPARAM) static INT_PTR ServiceMode(WPARAM, LPARAM) { - CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_WIZARD), NULL, WizardDlgProc, 1); + g_bServiceMode = true; + CreateDialog(hInst, MAKEINTRESOURCE(IDD_WIZARD), NULL, WizardDlgProc); return SERVICE_ONLYDB; } extern "C" __declspec(dllexport) int Load(void) { - mir_getLP( &pluginInfo ); + mir_getLP(&pluginInfo); hImportService = CreateServiceFunction(IMPORT_SERVICE, ImportCommand); CreateServiceFunction(MS_SERVICEMODE_LAUNCH, ServiceMode); diff --git a/plugins/Import/src/stdafx.h b/plugins/Import/src/stdafx.h index f6c36825b8..2be67303d6 100644 --- a/plugins/Import/src/stdafx.h +++ b/plugins/Import/src/stdafx.h @@ -103,6 +103,7 @@ extern HWND hwndAccMerge; extern int nImportOptions; extern TCHAR importFile[]; extern time_t dwSinceDate; +extern bool g_bServiceMode; HICON GetIcon(int iIconId, bool size = false); HANDLE GetIconHandle(int iIconId); diff --git a/plugins/Import/src/version.h b/plugins/Import/src/version.h index c43585a7b0..40b25e3d84 100644 --- a/plugins/Import/src/version.h +++ b/plugins/Import/src/version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 0 #define __MINOR_VERSION 95 #define __RELEASE_NUM 4 -#define __BUILD_NUM 2 +#define __BUILD_NUM 3 #include diff --git a/plugins/Import/src/wizard.cpp b/plugins/Import/src/wizard.cpp index fc0c4a89aa..2c22254df5 100644 --- a/plugins/Import/src/wizard.cpp +++ b/plugins/Import/src/wizard.cpp @@ -94,7 +94,6 @@ INT_PTR CALLBACK WizardDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lP switch (message) { case WM_INITDIALOG: - SetWindowLong(hdlg, GWL_USERDATA, lParam); TranslateDialogDefault(hdlg); hwndPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_WIZARDINTRO), hdlg, WizardIntroPageProc); SetWindowPos(hwndPage, 0, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOSIZE); @@ -160,7 +159,7 @@ INT_PTR CALLBACK WizardDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lP DestroyWindow(hdlg); break; case WM_DESTROY: - if (GetWindowLong(hdlg, GWL_USERDATA)) + if (g_bServiceMode) PostQuitMessage(0); } -- cgit v1.2.3