Juan Lang : cryptui: Set appropriate radio button in CryptUIWizImport if the destination store is specified .
Alexandre Julliard
julliard at winehq.org
Fri Jan 9 09:52:33 CST 2009
Module: wine
Branch: master
Commit: ed5d0d8894ff6285ef722ad8800144ced24f8ba2
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ed5d0d8894ff6285ef722ad8800144ced24f8ba2
Author: Juan Lang <juan.lang at gmail.com>
Date: Thu Jan 8 09:43:47 2009 -0800
cryptui: Set appropriate radio button in CryptUIWizImport if the destination store is specified.
---
dlls/cryptui/main.c | 26 ++++++++++++++++++++++----
1 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/dlls/cryptui/main.c b/dlls/cryptui/main.c
index 86d3f17..f7c8650 100644
--- a/dlls/cryptui/main.c
+++ b/dlls/cryptui/main.c
@@ -5001,11 +5001,29 @@ static LRESULT CALLBACK import_store_dlg_proc(HWND hwnd, UINT msg, WPARAM wp,
data = (struct ImportWizData *)page->lParam;
SetWindowLongPtrW(hwnd, DWLP_USER, (LPARAM)data);
- SendMessageW(GetDlgItem(hwnd, IDC_IMPORT_AUTO_STORE), BM_CLICK, 0, 0);
- if (data->dwFlags & CRYPTUI_WIZ_IMPORT_NO_CHANGE_DEST_STORE)
+ if (!data->hDestCertStore)
+ {
+ SendMessageW(GetDlgItem(hwnd, IDC_IMPORT_AUTO_STORE), BM_CLICK,
+ 0, 0);
+ EnableWindow(GetDlgItem(hwnd, IDC_IMPORT_STORE), FALSE);
+ EnableWindow(GetDlgItem(hwnd, IDC_IMPORT_BROWSE_STORE), FALSE);
EnableWindow(GetDlgItem(hwnd, IDC_IMPORT_SPECIFY_STORE), FALSE);
- EnableWindow(GetDlgItem(hwnd, IDC_IMPORT_STORE), FALSE);
- EnableWindow(GetDlgItem(hwnd, IDC_IMPORT_BROWSE_STORE), FALSE);
+ }
+ else
+ {
+ WCHAR storeTitle[MAX_STRING_LEN];
+
+ SendMessageW(GetDlgItem(hwnd, IDC_IMPORT_SPECIFY_STORE), BM_CLICK,
+ 0, 0);
+ EnableWindow(GetDlgItem(hwnd, IDC_IMPORT_STORE), TRUE);
+ EnableWindow(GetDlgItem(hwnd, IDC_IMPORT_BROWSE_STORE), TRUE);
+ EnableWindow(GetDlgItem(hwnd, IDC_IMPORT_SPECIFY_STORE),
+ !(data->dwFlags & CRYPTUI_WIZ_IMPORT_NO_CHANGE_DEST_STORE));
+ LoadStringW(hInstance, IDS_IMPORT_DEST_DETERMINED,
+ storeTitle, sizeof(storeTitle) / sizeof(storeTitle[0]));
+ SendMessageW(GetDlgItem(hwnd, IDC_IMPORT_STORE), WM_SETTEXT,
+ 0, (LPARAM)storeTitle);
+ }
break;
}
case WM_NOTIFY:
More information about the wine-cvs
mailing list