diff options
author | Robert Pösel <robyer@seznam.cz> | 2013-06-14 11:46:49 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2013-06-14 11:46:49 +0000 |
commit | 5e54283e7ab71e94e7df98253a00c53c6d470e77 (patch) | |
tree | cf4c3f3b424dcf865b12a48bb745fcfdf361634d /src/core | |
parent | 986c890a4362d01a9fd3fb102723b7125546302a (diff) |
Fixed Cancel button on Restarting dialog
git-svn-id: http://svn.miranda-ng.org/main/trunk@4930 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/miranda.cpp | 10 | ||||
-rw-r--r-- | src/core/modules.cpp | 4 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/core/miranda.cpp b/src/core/miranda.cpp index 4af88f95a6..20d841f528 100644 --- a/src/core/miranda.cpp +++ b/src/core/miranda.cpp @@ -187,25 +187,27 @@ static INT_PTR CALLBACK WaitForProcessDlgProc(HWND hwnd, UINT msg, WPARAM wParam break;
case WM_COMMAND:
- if ( HIWORD(wParam) == IDCANCEL) {
+ if ( LOWORD(wParam) == IDCANCEL) {
SendDlgItemMessage(hwnd, IDC_PROGRESSBAR, PBM_SETPOS, MIRANDA_PROCESS_WAIT_STEPS, 0);
- EndDialog(hwnd, 0);
+ EndDialog(hwnd, 1);
}
break;
}
return FALSE;
}
-void CheckRestart()
+int CheckRestart()
{
+ int result = 0;
LPCTSTR tszPID = CmdLine_GetOption( _T("restart"));
if (tszPID) {
HANDLE hProcess = OpenProcess(SYNCHRONIZE, FALSE, _ttol(tszPID));
if (hProcess) {
- DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_WAITRESTART), NULL, WaitForProcessDlgProc, (LPARAM)hProcess);
+ result = DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_WAITRESTART), NULL, WaitForProcessDlgProc, (LPARAM)hProcess);
CloseHandle(hProcess);
}
}
+ return result;
}
static void crtErrorHandler(const wchar_t*, const wchar_t*, const wchar_t*, unsigned, uintptr_t)
diff --git a/src/core/modules.cpp b/src/core/modules.cpp index b36a6812cc..cc1e59b113 100644 --- a/src/core/modules.cpp +++ b/src/core/modules.cpp @@ -29,7 +29,7 @@ static DWORD mainThreadId; static HANDLE hMainThread;
static HANDLE hMissingService;
-void CheckRestart(); // core: IDD_WAITRESTART
+int CheckRestart(); // core: IDD_WAITRESTART
int LoadSystemModule(void); // core: m_system.h services
int LoadNewPluginsModuleInfos(void); // core: preloading plugins
@@ -95,7 +95,7 @@ int LoadDefaultModules(void) //load order is very important for these
if ( LoadSystemModule()) return 1;
if ( LoadLangpackModule()) return 1; // langpack will be a system module in the new order so this is moved here
- CheckRestart();
+ if ( CheckRestart()) return 1;
if ( LoadUtilsModule()) return 1; //order not important for this, but no dependencies and no point in pluginising
if ( LoadIcoTabsModule()) return 1;
if ( LoadHeaderbarModule()) return 1;
|