Commit 9f6c5433 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

cryptui: Skip the file page in CryptUIWizImport when the import source isn't a file.

parent b9917661
...@@ -4006,6 +4006,7 @@ static BOOL show_import_ui(DWORD dwFlags, HWND hwndParent, ...@@ -4006,6 +4006,7 @@ static BOOL show_import_ui(DWORD dwFlags, HWND hwndParent,
PROPSHEETHEADERW hdr; PROPSHEETHEADERW hdr;
PROPSHEETPAGEW pages[4]; PROPSHEETPAGEW pages[4];
struct ImportWizData data; struct ImportWizData data;
int nPages = 0;
FIXME("\n"); FIXME("\n");
...@@ -4019,34 +4020,44 @@ static BOOL show_import_ui(DWORD dwFlags, HWND hwndParent, ...@@ -4019,34 +4020,44 @@ static BOOL show_import_ui(DWORD dwFlags, HWND hwndParent,
data.hDestCertStore = hDestCertStore; data.hDestCertStore = hDestCertStore;
memset(&pages, 0, sizeof(pages)); memset(&pages, 0, sizeof(pages));
pages[0].dwSize = sizeof(pages[0]); pages[nPages].dwSize = sizeof(pages[0]);
pages[0].hInstance = hInstance; pages[nPages].hInstance = hInstance;
pages[0].u.pszTemplate = MAKEINTRESOURCEW(IDD_IMPORT_WELCOME); pages[nPages].u.pszTemplate = MAKEINTRESOURCEW(IDD_IMPORT_WELCOME);
pages[0].pfnDlgProc = import_welcome_dlg_proc; pages[nPages].pfnDlgProc = import_welcome_dlg_proc;
pages[0].dwFlags = PSP_HIDEHEADER; pages[nPages].dwFlags = PSP_HIDEHEADER;
nPages++;
pages[1].dwSize = sizeof(pages[1]);
pages[1].hInstance = hInstance; if (!pImportSrc ||
pages[1].u.pszTemplate = MAKEINTRESOURCEW(IDD_IMPORT_FILE); pImportSrc->dwSubjectChoice == CRYPTUI_WIZ_IMPORT_SUBJECT_FILE)
pages[1].pfnDlgProc = import_file_dlg_proc; {
pages[1].dwFlags = PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE; pages[nPages].dwSize = sizeof(pages[0]);
pages[1].pszHeaderTitle = MAKEINTRESOURCEW(IDS_IMPORT_FILE_TITLE); pages[nPages].hInstance = hInstance;
pages[1].pszHeaderSubTitle = MAKEINTRESOURCEW(IDS_IMPORT_FILE_SUBTITLE); pages[nPages].u.pszTemplate = MAKEINTRESOURCEW(IDD_IMPORT_FILE);
pages[1].lParam = (LPARAM)&data; pages[nPages].pfnDlgProc = import_file_dlg_proc;
pages[nPages].dwFlags = PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
pages[2].dwSize = sizeof(pages[2]); pages[nPages].pszHeaderTitle = MAKEINTRESOURCEW(IDS_IMPORT_FILE_TITLE);
pages[2].hInstance = hInstance; pages[nPages].pszHeaderSubTitle =
pages[2].u.pszTemplate = MAKEINTRESOURCEW(IDD_IMPORT_STORE); MAKEINTRESOURCEW(IDS_IMPORT_FILE_SUBTITLE);
pages[2].pfnDlgProc = import_store_dlg_proc; pages[nPages].lParam = (LPARAM)&data;
pages[2].dwFlags = PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE; nPages++;
pages[2].pszHeaderTitle = MAKEINTRESOURCEW(IDS_IMPORT_STORE_TITLE); }
pages[2].pszHeaderSubTitle = MAKEINTRESOURCEW(IDS_IMPORT_STORE_SUBTITLE);
pages[nPages].dwSize = sizeof(pages[0]);
pages[3].dwSize = sizeof(pages[3]); pages[nPages].hInstance = hInstance;
pages[3].hInstance = hInstance; pages[nPages].u.pszTemplate = MAKEINTRESOURCEW(IDD_IMPORT_STORE);
pages[3].u.pszTemplate = MAKEINTRESOURCEW(IDD_IMPORT_FINISH); pages[nPages].pfnDlgProc = import_store_dlg_proc;
pages[3].pfnDlgProc = import_finish_dlg_proc; pages[nPages].dwFlags = PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
pages[3].dwFlags = PSP_HIDEHEADER; pages[nPages].pszHeaderTitle = MAKEINTRESOURCEW(IDS_IMPORT_STORE_TITLE);
pages[nPages].pszHeaderSubTitle =
MAKEINTRESOURCEW(IDS_IMPORT_STORE_SUBTITLE);
nPages++;
pages[nPages].dwSize = sizeof(pages[0]);
pages[nPages].hInstance = hInstance;
pages[nPages].u.pszTemplate = MAKEINTRESOURCEW(IDD_IMPORT_FINISH);
pages[nPages].pfnDlgProc = import_finish_dlg_proc;
pages[nPages].dwFlags = PSP_HIDEHEADER;
nPages++;
memset(&hdr, 0, sizeof(hdr)); memset(&hdr, 0, sizeof(hdr));
hdr.dwSize = sizeof(hdr); hdr.dwSize = sizeof(hdr);
...@@ -4058,7 +4069,7 @@ static BOOL show_import_ui(DWORD dwFlags, HWND hwndParent, ...@@ -4058,7 +4069,7 @@ static BOOL show_import_ui(DWORD dwFlags, HWND hwndParent,
else else
hdr.pszCaption = MAKEINTRESOURCEW(IDS_IMPORT_WIZARD); hdr.pszCaption = MAKEINTRESOURCEW(IDS_IMPORT_WIZARD);
hdr.u3.ppsp = pages; hdr.u3.ppsp = pages;
hdr.nPages = 4; hdr.nPages = nPages;
PropertySheetW(&hdr); PropertySheetW(&hdr);
if (data.freeSource && if (data.freeSource &&
data.importSrc.dwSubjectChoice == CRYPTUI_WIZ_IMPORT_SUBJECT_CERT_STORE) data.importSrc.dwSubjectChoice == CRYPTUI_WIZ_IMPORT_SUBJECT_CERT_STORE)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment