[APPWIZ][SYSSETUP]
authorSylvain Petreolle <spetreolle@yahoo.fr>
Thu, 30 Oct 2014 20:50:30 +0000 (20:50 +0000)
committerSylvain Petreolle <spetreolle@yahoo.fr>
Thu, 30 Oct 2014 20:50:30 +0000 (20:50 +0000)
Enforce focus of the Wine Gecko download prompt in second stage.
Patch by Ismael Ferreras Morezuelas (swyter)

svn path=/trunk/; revision=65128

reactos/dll/cpl/appwiz/addons.c
reactos/dll/cpl/appwiz/appwiz.c
reactos/dll/cpl/appwiz/appwiz.h
reactos/dll/win32/syssetup/classinst.c
reactos/dll/win32/syssetup/wizard.c

index d050535..60f7cd7 100644 (file)
@@ -397,7 +397,7 @@ static INT_PTR CALLBACK installer_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARA
     return FALSE;
 }
 
-BOOL install_addon(addon_t addon_type)
+BOOL install_addon(addon_t addon_type, HWND hwnd_parent)
 {
 
     if(!*ARCH_STRING)
@@ -411,7 +411,7 @@ BOOL install_addon(addon_t addon_type)
      * - download the package
      */
     if (install_from_registered_dir() == INSTALL_NEXT)
-        DialogBoxW(hApplet, addon->dialog_template, 0, installer_proc);
+        DialogBoxW(hApplet, addon->dialog_template, hwnd_parent, installer_proc);
 
     return TRUE;
 }
index 44a49f3..2022b53 100644 (file)
@@ -14,7 +14,7 @@
 
 HINSTANCE hApplet = NULL;
 
-static LONG start_params(const WCHAR *params)
+static LONG start_params(const WCHAR *params, HWND hwnd_parent)
 {
     static const WCHAR install_geckoW[] = {'i','n','s','t','a','l','l','_','g','e','c','k','o',0};
     static const WCHAR install_monoW[] = {'i','n','s','t','a','l','l','_','m','o','n','o',0};
@@ -23,12 +23,12 @@ static LONG start_params(const WCHAR *params)
         return FALSE;
 
     if(!strcmpW(params, install_geckoW)) {
-        install_addon(ADDON_GECKO);
+        install_addon(ADDON_GECKO, hwnd_parent);
         return TRUE;
     }
 
     if(!strcmpW(params, install_monoW)) {
-        install_addon(ADDON_MONO);
+        install_addon(ADDON_MONO, hwnd_parent);
         return TRUE;
     }
 
@@ -51,7 +51,7 @@ CPlApplet(HWND hwndCPl, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
             return 1;
 
         case CPL_STARTWPARMSW:
-            return start_params((const WCHAR *)lParam2);
+            return start_params((const WCHAR *)lParam2, hwndCPl);
 
         case CPL_INQUIRE:
             CPlInfo = (CPLINFO*)lParam2;
index d27224f..d24f25a 100644 (file)
@@ -50,7 +50,7 @@ typedef enum {
     ADDON_MONO
 } addon_t;
 
-BOOL install_addon(addon_t) DECLSPEC_HIDDEN;
+BOOL install_addon(addon_t, HWND hwnd_parent) DECLSPEC_HIDDEN;
 
 extern HINSTANCE hInst DECLSPEC_HIDDEN;
 
index 8e04321..21d20d4 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "precomp.h"
 
-#define NDEBUG
+//#define NDEBUG
 #include <debug.h>
 
 /*
index 1559c58..15682c1 100644 (file)
@@ -1984,7 +1984,7 @@ FinishDlgProc(HWND hwndDlg,
             PSETUPDATA SetupData = (PSETUPDATA)((LPPROPSHEETPAGE)lParam)->lParam;
 
             /* Run the Wine Gecko prompt */
-            Control_RunDLLW(GetDesktopWindow(), 0, L"appwiz.cpl install_gecko", SW_SHOW);
+            Control_RunDLLW(hwndDlg, 0, L"appwiz.cpl install_gecko", SW_SHOW);
 
             /* Set title font */
             SendDlgItemMessage(hwndDlg,