/[winpt]/trunk/Src/wptSigTreeDlg.cpp
ViewVC logotype

Diff of /trunk/Src/wptSigTreeDlg.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 192 by twoaday, Mon Mar 27 10:05:14 2006 UTC revision 193 by twoaday, Sat Apr 1 12:36:35 2006 UTC
# Line 29  Line 29 
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. */
# Line 106  static void Line 107  static void
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);
# Line 156  sigtree_dlg_proc (HWND dlg, UINT msg, WP Line 147  sigtree_dlg_proc (HWND dlg, UINT msg, WP
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:
# Line 168  sigtree_dlg_proc (HWND dlg, UINT msg, WP Line 159  sigtree_dlg_proc (HWND dlg, UINT msg, WP
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);

Legend:
Removed from v.192  
changed lines
  Added in v.193

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26