Juan Lang : cryptui: Ensure that a destination store is selected in CryptUIWizImport.

Alexandre Julliard julliard at winehq.org
Tue Dec 23 13:41:28 CST 2008


Module: wine
Branch: master
Commit: 91deb95ed5402085110c89e07f56e25e3f8a3c62
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=91deb95ed5402085110c89e07f56e25e3f8a3c62

Author: Juan Lang <juan.lang at gmail.com>
Date:   Mon Dec 22 19:20:04 2008 -0800

cryptui: Ensure that a destination store is selected in CryptUIWizImport.

---

 dlls/cryptui/cryptui_En.rc |    1 +
 dlls/cryptui/cryptuires.h  |    1 +
 dlls/cryptui/main.c        |   13 +++++++++++++
 3 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/dlls/cryptui/cryptui_En.rc b/dlls/cryptui/cryptui_En.rc
index df420bc..4dc6ed9 100644
--- a/dlls/cryptui/cryptui_En.rc
+++ b/dlls/cryptui/cryptui_En.rc
@@ -80,6 +80,7 @@ STRINGTABLE DISCARDABLE
     IDS_IMPORT_BAD_FORMAT "The file format is not recognized.  Please select another file."
     IDS_IMPORT_OPEN_FAILED "Could not open "
     IDS_IMPORT_DEST_DETERMINED "Determined by the program"
+    IDS_IMPORT_SELECT_STORE "Please select a store"
     IDS_PURPOSE_SERVER_AUTH "Ensures the identify of a remote computer"
     IDS_PURPOSE_CLIENT_AUTH "Proves your identity to a remote computer"
     IDS_PURPOSE_CODE_SIGNING "Ensures software came from software publisher\nProtects software from alteration after publication"
diff --git a/dlls/cryptui/cryptuires.h b/dlls/cryptui/cryptuires.h
index df7fc8a..e9f7554 100644
--- a/dlls/cryptui/cryptuires.h
+++ b/dlls/cryptui/cryptuires.h
@@ -77,6 +77,7 @@
 #define IDS_IMPORT_BAD_FORMAT 1057
 #define IDS_IMPORT_OPEN_FAILED 1058
 #define IDS_IMPORT_DEST_DETERMINED 1059
+#define IDS_IMPORT_SELECT_STORE 1060
 
 #define IDS_PURPOSE_SERVER_AUTH 1100
 #define IDS_PURPOSE_CLIENT_AUTH 1101
diff --git a/dlls/cryptui/main.c b/dlls/cryptui/main.c
index a762129..b2bff30 100644
--- a/dlls/cryptui/main.c
+++ b/dlls/cryptui/main.c
@@ -3983,6 +3983,19 @@ static LRESULT CALLBACK import_store_dlg_proc(HWND hwnd, UINT msg, WPARAM wp,
              PSWIZB_BACK | PSWIZB_NEXT);
             ret = TRUE;
             break;
+        case PSN_WIZNEXT:
+        {
+            data = (struct ImportWizData *)GetWindowLongPtrW(hwnd, DWLP_USER);
+            if (IsDlgButtonChecked(hwnd, IDC_IMPORT_SPECIFY_STORE) &&
+             !data->hDestCertStore)
+            {
+                import_warning(data->dwFlags, hwnd, data->pwszWizardTitle,
+                 IDS_IMPORT_SELECT_STORE);
+                SetWindowLongPtrW(hwnd, DWLP_MSGRESULT, 1);
+                ret = 1;
+            }
+            break;
+        }
         }
         break;
     }




More information about the wine-cvs mailing list