Juan Lang : cryptui: If an input file name is given to CryptUIWizImport, show it in the wizard.
Alexandre Julliard
julliard at winehq.org
Tue Apr 28 07:53:00 CDT 2009
Module: wine
Branch: master
Commit: b6682f96f7ff042b04ce6883b7873ff9cb0118ee
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b6682f96f7ff042b04ce6883b7873ff9cb0118ee
Author: Juan Lang <juan.lang at gmail.com>
Date: Mon Apr 27 18:10:54 2009 -0700
cryptui: If an input file name is given to CryptUIWizImport, show it in the wizard.
---
dlls/cryptui/main.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/dlls/cryptui/main.c b/dlls/cryptui/main.c
index f29f1e6..f6fb60c 100644
--- a/dlls/cryptui/main.c
+++ b/dlls/cryptui/main.c
@@ -4993,6 +4993,12 @@ static LRESULT CALLBACK import_file_dlg_proc(HWND hwnd, UINT msg, WPARAM wp,
data = (struct ImportWizData *)page->lParam;
SetWindowLongPtrW(hwnd, DWLP_USER, (LPARAM)data);
+ if (data->fileName)
+ {
+ HWND fileNameEdit = GetDlgItem(hwnd, IDC_IMPORT_FILENAME);
+
+ SendMessageW(fileNameEdit, WM_SETTEXT, 0, (LPARAM)data->fileName);
+ }
break;
}
case WM_NOTIFY:
@@ -5383,10 +5389,15 @@ static BOOL show_import_ui(DWORD dwFlags, HWND hwndParent,
data.dwFlags = dwFlags;
data.pwszWizardTitle = pwszWizardTitle;
if (pImportSrc)
+ {
memcpy(&data.importSrc, pImportSrc, sizeof(data.importSrc));
+ data.fileName = (LPWSTR)pImportSrc->u.pwszFileName;
+ }
else
+ {
memset(&data.importSrc, 0, sizeof(data.importSrc));
- data.fileName = NULL;
+ data.fileName = NULL;
+ }
data.freeSource = FALSE;
data.hDestCertStore = hDestCertStore;
data.freeDest = FALSE;
@@ -5470,7 +5481,8 @@ static BOOL show_import_ui(DWORD dwFlags, HWND hwndParent,
hdr.u4.pszbmWatermark = MAKEINTRESOURCEW(IDB_CERT_WATERMARK);
hdr.u5.pszbmHeader = MAKEINTRESOURCEW(IDB_CERT_HEADER);
PropertySheetW(&hdr);
- HeapFree(GetProcessHeap(), 0, data.fileName);
+ if (data.fileName != data.importSrc.u.pwszFileName)
+ HeapFree(GetProcessHeap(), 0, data.fileName);
if (data.freeSource &&
data.importSrc.dwSubjectChoice == CRYPTUI_WIZ_IMPORT_SUBJECT_CERT_STORE)
CertCloseStore(data.importSrc.u.hCertStore, 0);
More information about the wine-cvs
mailing list