cryptui: Add selections to field selection list in details page.
This commit is contained in:
parent
b7afe1740b
commit
a4d362805b
|
@ -34,6 +34,13 @@ STRINGTABLE DISCARDABLE
|
||||||
IDS_ISSUER_HEADING "Issued by: "
|
IDS_ISSUER_HEADING "Issued by: "
|
||||||
IDS_VALID_FROM "Valid from "
|
IDS_VALID_FROM "Valid from "
|
||||||
IDS_VALID_TO " to "
|
IDS_VALID_TO " to "
|
||||||
|
IDS_FIELD "Field"
|
||||||
|
IDS_VALUE "Value"
|
||||||
|
IDS_FIELDS_ALL "<All>"
|
||||||
|
IDS_FIELDS_V1 "Version 1 Fields Only"
|
||||||
|
IDS_FIELDS_EXTENSIONS "Extensions Only"
|
||||||
|
IDS_FIELDS_CRITICAL_EXTENSIONS "Critical Extensions Only"
|
||||||
|
IDS_FIELDS_PROPERTIES "Properties Only"
|
||||||
IDS_PURPOSE_SERVER_AUTH "Ensures the identify of a remote computer"
|
IDS_PURPOSE_SERVER_AUTH "Ensures the identify of a remote computer"
|
||||||
IDS_PURPOSE_CLIENT_AUTH "Proves your identity to 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"
|
IDS_PURPOSE_CODE_SIGNING "Ensures software came from software publisher\nProtects software from alteration after publication"
|
||||||
|
|
|
@ -31,6 +31,13 @@
|
||||||
#define IDS_ISSUER_HEADING 1011
|
#define IDS_ISSUER_HEADING 1011
|
||||||
#define IDS_VALID_FROM 1012
|
#define IDS_VALID_FROM 1012
|
||||||
#define IDS_VALID_TO 1013
|
#define IDS_VALID_TO 1013
|
||||||
|
#define IDS_FIELD 1019
|
||||||
|
#define IDS_VALUE 1020
|
||||||
|
#define IDS_FIELDS_ALL 1021
|
||||||
|
#define IDS_FIELDS_V1 1022
|
||||||
|
#define IDS_FIELDS_EXTENSIONS 1023
|
||||||
|
#define IDS_FIELDS_CRITICAL_EXTENSIONS 1024
|
||||||
|
#define IDS_FIELDS_PROPERTIES 1025
|
||||||
|
|
||||||
#define IDS_PURPOSE_SERVER_AUTH 1100
|
#define IDS_PURPOSE_SERVER_AUTH 1100
|
||||||
#define IDS_PURPOSE_CLIENT_AUTH 1101
|
#define IDS_PURPOSE_CLIENT_AUTH 1101
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include "richedit.h"
|
#include "richedit.h"
|
||||||
#include "ole2.h"
|
#include "ole2.h"
|
||||||
#include "richole.h"
|
#include "richole.h"
|
||||||
|
#include "commctrl.h"
|
||||||
#include "cryptuiapi.h"
|
#include "cryptuiapi.h"
|
||||||
#include "cryptuires.h"
|
#include "cryptuires.h"
|
||||||
#include "urlmon.h"
|
#include "urlmon.h"
|
||||||
|
@ -1007,6 +1008,62 @@ struct detail_data
|
||||||
BOOL *pfPropertiesChanged;
|
BOOL *pfPropertiesChanged;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct selection_list_item
|
||||||
|
{
|
||||||
|
int id;
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct selection_list_item listItems[] = {
|
||||||
|
{ IDS_FIELDS_ALL },
|
||||||
|
{ IDS_FIELDS_V1 },
|
||||||
|
{ IDS_FIELDS_EXTENSIONS },
|
||||||
|
{ IDS_FIELDS_CRITICAL_EXTENSIONS },
|
||||||
|
{ IDS_FIELDS_PROPERTIES },
|
||||||
|
};
|
||||||
|
|
||||||
|
static void create_show_list(HWND hwnd, struct detail_data *data)
|
||||||
|
{
|
||||||
|
HWND cb = GetDlgItem(hwnd, IDC_DETAIL_SELECT);
|
||||||
|
WCHAR buf[MAX_STRING_LEN];
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < sizeof(listItems) / sizeof(listItems[0]); i++)
|
||||||
|
{
|
||||||
|
int index;
|
||||||
|
|
||||||
|
LoadStringW(hInstance, listItems[i].id, buf,
|
||||||
|
sizeof(buf) / sizeof(buf[0]));
|
||||||
|
index = SendMessageW(cb, CB_INSERTSTRING, -1, (LPARAM)buf);
|
||||||
|
SendMessageW(cb, CB_SETITEMDATA, index, (LPARAM)data);
|
||||||
|
}
|
||||||
|
SendMessageW(cb, CB_SETCURSEL, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void create_listview_columns(HWND hwnd)
|
||||||
|
{
|
||||||
|
HWND lv = GetDlgItem(hwnd, IDC_DETAIL_LIST);
|
||||||
|
RECT rc;
|
||||||
|
WCHAR buf[MAX_STRING_LEN];
|
||||||
|
LVCOLUMNW column;
|
||||||
|
|
||||||
|
SendMessageW(lv, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT);
|
||||||
|
GetWindowRect(lv, &rc);
|
||||||
|
LoadStringW(hInstance, IDS_FIELD, buf, sizeof(buf) / sizeof(buf[0]));
|
||||||
|
column.mask = LVCF_WIDTH | LVCF_TEXT;
|
||||||
|
column.cx = (rc.right - rc.left) / 2 - 2;
|
||||||
|
column.pszText = buf;
|
||||||
|
SendMessageW(lv, LVM_INSERTCOLUMNW, 0, (LPARAM)&column);
|
||||||
|
LoadStringW(hInstance, IDS_VALUE, buf, sizeof(buf) / sizeof(buf[0]));
|
||||||
|
SendMessageW(lv, LVM_INSERTCOLUMNW, 1, (LPARAM)&column);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void create_cert_details_list(HWND hwnd, struct detail_data *data)
|
||||||
|
{
|
||||||
|
create_show_list(hwnd, data);
|
||||||
|
create_listview_columns(hwnd);
|
||||||
|
FIXME("add cert details\n");
|
||||||
|
}
|
||||||
|
|
||||||
static LRESULT CALLBACK detail_dlg_proc(HWND hwnd, UINT msg, WPARAM wp,
|
static LRESULT CALLBACK detail_dlg_proc(HWND hwnd, UINT msg, WPARAM wp,
|
||||||
LPARAM lp)
|
LPARAM lp)
|
||||||
{
|
{
|
||||||
|
@ -1020,7 +1077,7 @@ static LRESULT CALLBACK detail_dlg_proc(HWND hwnd, UINT msg, WPARAM wp,
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
page = (PROPSHEETPAGEW *)lp;
|
page = (PROPSHEETPAGEW *)lp;
|
||||||
data = (struct detail_data *)page->lParam;
|
data = (struct detail_data *)page->lParam;
|
||||||
FIXME("add cert details\n");
|
create_cert_details_list(hwnd, data);
|
||||||
if (!(data->pCertViewInfo->dwFlags & CRYPTUI_ENABLE_EDITPROPERTIES))
|
if (!(data->pCertViewInfo->dwFlags & CRYPTUI_ENABLE_EDITPROPERTIES))
|
||||||
EnableWindow(GetDlgItem(hwnd, IDC_EDITPROPERTIES), FALSE);
|
EnableWindow(GetDlgItem(hwnd, IDC_EDITPROPERTIES), FALSE);
|
||||||
if (data->pCertViewInfo->dwFlags & CRYPTUI_DISABLE_EXPORT)
|
if (data->pCertViewInfo->dwFlags & CRYPTUI_DISABLE_EXPORT)
|
||||||
|
|
Loading…
Reference in New Issue