- Small fix for Russian translation
authorDmitry Chapyshev <dmitry@reactos.org>
Tue, 6 Jan 2009 19:28:04 +0000 (19:28 +0000)
committerDmitry Chapyshev <dmitry@reactos.org>
Tue, 6 Jan 2009 19:28:04 +0000 (19:28 +0000)
- More dialogs implement
- LPTSTR -> LPWSTR

svn path=/trunk/; revision=38614

reactos/dll/cpl/hdwwiz/hdwwiz.c
reactos/dll/cpl/hdwwiz/hdwwiz.rbuild
reactos/dll/cpl/hdwwiz/hdwwiz.spec
reactos/dll/cpl/hdwwiz/lang/ru-RU.rc

index 69ce421..8275b7a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * ReactOS New devices installation
- * Copyright (C) 2005 ReactOS Team
+ * Copyright (C) 2005, 2008 ReactOS Team
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
 #include <tchar.h>
 #include <stdio.h>
 
+#define NDEBUG
+#include <debug.h>
+
 #include "resource.h"
 #include "hdwwiz.h"
 
+
 HINSTANCE hApplet = NULL;
 
 typedef BOOL (WINAPI *PINSTALL_NEW_DEVICE)(HWND, LPGUID, PDWORD);
@@ -60,12 +64,67 @@ SearchPageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 static INT_PTR CALLBACK
 IsConnctedPageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
+    switch (uMsg)
+    {
+        case WM_COMMAND:
+        {
+            if(HIWORD(wParam) == BN_CLICKED)
+            {
+                if ((SendDlgItemMessage(hwndDlg, IDC_CONNECTED, BM_GETCHECK, 0, 0) == BST_CHECKED) ||
+                    (SendDlgItemMessage(hwndDlg, IDC_NOTCONNECTED, BM_GETCHECK, 0, 0) == BST_CHECKED))
+                {
+                    PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_NEXT | PSWIZB_BACK);
+                }
+                else
+                {
+                    PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_BACK);
+                }
+            }
+        }
+        break;
+
+        case WM_NOTIFY:
+        {
+            LPNMHDR lpnm = (LPNMHDR)lParam;
+
+            switch (lpnm->code)
+            {
+                case PSN_SETACTIVE:
+                {
+                    /* Disable "Next" button */
+                    PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_BACK);
+                }
+                break;
+            }
+        }
+        break;
+    }
+
     return FALSE;
 }
 
 static INT_PTR CALLBACK
 FinishPageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
+    switch (uMsg)
+    {
+        case WM_NOTIFY:
+        {
+            LPNMHDR lpnm = (LPNMHDR)lParam;
+
+            switch (lpnm->code)
+            {
+                case PSN_SETACTIVE:
+                {
+                    /* Only "Finish" button */
+                    PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_FINISH);
+                }
+                break;
+            }
+        }
+        break;
+    }
+
     return FALSE;
 }
 
@@ -133,8 +192,14 @@ HardwareWizardInit(HWND hwnd)
 }
 
 VOID CALLBACK
-AddHardwareWizard(HWND hwnd, LPTSTR lpName)
+AddHardwareWizard(HWND hwnd, LPWSTR lpName)
 {
+    if (lpName != NULL)
+    {
+        DPRINT1("No support of remote installation yet!\n");
+        return;
+    }
+
     HardwareWizardInit(hwnd);
 }
 
index 7ce8c2e..0a36d90 100644 (file)
@@ -6,6 +6,7 @@
        <library>setupapi</library>
        <library>kernel32</library>
        <library>comctl32</library>
+       <library>user32</library>
        <file>hdwwiz.c</file>
        <file>hdwwiz.rc</file>
 </module>
index 77a2685..18e8394 100644 (file)
@@ -1,3 +1,3 @@
-@ stdcall AddHardwareWizard(ptr str)
+@ stdcall AddHardwareWizard(ptr wstr)
 @ stdcall CPlApplet(ptr long ptr ptr)
 @ stdcall InstallNewDevice(ptr ptr ptr)
index e7bf472..937be6d 100644 (file)
@@ -41,7 +41,7 @@ BEGIN
        LTEXT "Ìàñòåð óñòàíîâêè îáîðóäîâàíèÿ", IDC_FINISHTITLE, 114, 8, 203, 24
        LTEXT "Ðàáîòà ìàñòåðà óñòàíîâêè îáîðóäîâàíèÿ óñïåøíî çàâåðøåíà.", -1, 114, 32, 193, 19
        LTEXT "", IDC_STATUSTEXT, 114, 70, 193, 92
-       LTEXT "Äëÿ çàêðûòèÿ ìàñòåðà íàæìèòå êíîïêó ""Ãîòîâî"".", -1, 114, 166, 132, 8
+       LTEXT "Äëÿ çàêðûòèÿ ìàñòåðà íàæìèòå êíîïêó ""Ãîòîâî"".", -1, 114, 166, 190, 8
 END
 
 STRINGTABLE