29 |
#include "wptCommonCtl.h" |
#include "wptCommonCtl.h" |
30 |
#include "wptContext.h" |
#include "wptContext.h" |
31 |
#include "wptUTF8.h" |
#include "wptUTF8.h" |
32 |
|
#include "wptW32API.h" |
33 |
|
|
34 |
|
|
35 |
/* ID to display signature properties. */ |
/* ID to display signature properties. */ |
107 |
create_popup (HWND dlg) |
create_popup (HWND dlg) |
108 |
{ |
{ |
109 |
HMENU hm; |
HMENU hm; |
|
MENUITEMINFO mi; |
|
110 |
POINT p; |
POINT p; |
|
char *s; |
|
111 |
|
|
112 |
hm = CreatePopupMenu (); |
hm = CreatePopupMenu (); |
113 |
if (!hm) |
if (!hm) |
114 |
BUG( NULL ); |
BUG (0); |
115 |
memset (&mi, 0, sizeof mi); |
insert_menu_item (hm, 0, _ID_SIGCTX_PROPS, _("Signature &Properties")); |
|
mi.cbSize = sizeof mi; |
|
|
s = (char *)_("Signature &Properties"); |
|
|
mi.fType = MF_STRING; |
|
|
mi.dwTypeData = s; |
|
|
mi.cch = strlen (s); |
|
|
mi.fMask = MIIM_DATA | MIIM_ID | MIIM_TYPE; |
|
|
mi.wID = _ID_SIGCTX_PROPS; |
|
|
InsertMenuItem (hm, 0, FALSE, &mi); |
|
116 |
GetCursorPos (&p); |
GetCursorPos (&p); |
117 |
TrackPopupMenu (hm, 0, p.x, p.y, 0, dlg, NULL); |
TrackPopupMenu (hm, 0, p.x, p.y, 0, dlg, NULL); |
118 |
DestroyMenu (hm); |
DestroyMenu (hm); |
147 |
static HIMAGELIST hil; |
static HIMAGELIST hil; |
148 |
HICON ico[2]; |
HICON ico[2]; |
149 |
NMHDR *nft; |
NMHDR *nft; |
150 |
char inf[256], *p; |
char inf[300], *p; |
151 |
|
|
152 |
switch (msg) { |
switch (msg) { |
153 |
case WM_INITDIALOG: |
case WM_INITDIALOG: |
159 |
tree = GetDlgItem (dlg, IDC_VKEYSIG_TREE); |
tree = GetDlgItem (dlg, IDC_VKEYSIG_TREE); |
160 |
hil = treeview_set_image_list (tree, ico, 2); |
hil = treeview_set_image_list (tree, ico, 2); |
161 |
sigtree_load (tree, key->ctx); |
sigtree_load (tree, key->ctx); |
162 |
p = utf8_to_native (key->ctx->uids->uid); |
p = utf8_to_native (key->ctx->uids->name); |
163 |
_snprintf (inf, sizeof (inf)-1, _("Signature Tree for \"%s\""), p); |
_snprintf (inf, sizeof (inf)-1, |
164 |
|
_("Signature Tree for \"%s\" (0x%s)"), |
165 |
|
p, key->ctx->subkeys->keyid+8); |
166 |
safe_free (p); |
safe_free (p); |
167 |
SetDlgItemText (dlg, IDC_VKEYSIG_EDIT, _("Edit...")); |
SetDlgItemText (dlg, IDC_VKEYSIG_EDIT, _("Edit...")); |
168 |
SetWindowText (dlg, inf); |
SetWindowText (dlg, inf); |