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

Diff of /trunk/Src/wptFileStatDlg.cpp

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

revision 226 by twoaday, Mon Jun 12 13:40:21 2006 UTC revision 256 by twoaday, Sat Aug 5 10:31:06 2006 UTC
# Line 35  Line 35 
35  #include "wptUTF8.h"  #include "wptUTF8.h"
36  #include "openpgp.h"  #include "openpgp.h"
37    
38    /* Return the date in locale format. */
39  const char*  const char*
40  get_fmt_date (long timest)  get_fmt_date (long timest)
41  {  {
# Line 46  get_fmt_date (long timest) Line 46  get_fmt_date (long timest)
46  }  }
47    
48    
49    /* Return humand readable public key algo. */
50  static const char*  static const char*
51  get_pubkey_algo (int algo)  get_pubkey_algo (int algo)
52  {        {      
# Line 59  get_pubkey_algo (int algo) Line 60  get_pubkey_algo (int algo)
60  }  }
61    
62    
63    /* Return human readable symmetric algo. */
64  const char*  const char*
65  get_symkey_algo (int algo)  get_symkey_algo (int algo)
66  {  {
# Line 79  get_symkey_algo (int algo) Line 81  get_symkey_algo (int algo)
81  }  }
82    
83    
84    /* Return human readable hash algo. */
85  static const char*  static const char*
86  get_digest_algo (int algo)  get_digest_algo (int algo)
87  {  {
# Line 100  get_digest_algo (int algo) Line 103  get_digest_algo (int algo)
103  }  }
104    
105    
106    /* Return human readable compress algo. */
107  static const char*  static const char*
108  get_compress_algo (int algo)  get_compress_algo (int algo)
109  {  {
# Line 114  get_compress_algo (int algo) Line 118  get_compress_algo (int algo)
118  }  }
119    
120    
121    /* Return human string to key algo. */
122  static const char*  static const char*
123  get_s2k_algo (int algo)  get_s2k_algo (int algo)
124  {  {
# Line 146  do_list_packets (HWND list, const char * Line 151  do_list_packets (HWND list, const char *
151    
152      inp = gpg_iobuf_open (file);      inp = gpg_iobuf_open (file);
153      if (!inp) {      if (!inp) {
154          log_box (_("File Manager"), MB_ERR, "%s: %s", file,          log_box (_("File Manager"), MB_ERR, "%s: %s", file,
155                   winpt_strerror (WPTERR_FILE_OPEN));                   winpt_strerror (WPTERR_FILE_OPEN));
156          return -1;          return -1;
157      }      }
158      gpg_iobuf_ioctl( inp, 3, 1, NULL ); /* disable cache */      gpg_iobuf_ioctl (inp, 3, 1, NULL); /* disable cache */
159      if (gpg_use_armor_filter (inp)) {      if (gpg_use_armor_filter (inp)) {
160          memset (&afx, 0, sizeof (afx));          memset (&afx, 0, sizeof (afx));
161          gpg_iobuf_push_filter (inp, gpg_armor_filter, &afx);          gpg_iobuf_push_filter (inp, gpg_armor_filter, &afx);
# Line 163  do_list_packets (HWND list, const char * Line 168  do_list_packets (HWND list, const char *
168              {PKT_pubkey_enc *enc = pkt->pkt.pubkey_enc; n++;              {PKT_pubkey_enc *enc = pkt->pkt.pubkey_enc; n++;
169              if (!enc)              if (!enc)
170                  break;                  break;
171              _snprintf( inf, sizeof(inf)-1,                    _snprintf (inf, sizeof(inf)-1,
172                  "public key encryted packet: version %d, algo %s, keyid 0x%08X",                  "public key encryted packet: version %d, algo %s, keyid 0x%08X",
173                  enc->version, get_pubkey_algo(enc->pubkey_algo), enc->keyid[1]);                  enc->version, get_pubkey_algo(enc->pubkey_algo), enc->keyid[1]);
174              listbox_add_string (list, inf);}              listbox_add_string (list, inf);}
# Line 269  file_stat_dlg_proc (HWND dlg, UINT msg, Line 274  file_stat_dlg_proc (HWND dlg, UINT msg,
274      int n;      int n;
275            
276      switch (msg) {      switch (msg) {
277      case WM_INITDIALOG:      case WM_INITDIALOG:        
         SetWindowText (dlg, _("File Status"));  
278          file = (const char*)lparam;          file = (const char*)lparam;
279          if (!file)          if (!file)
280              BUG (0);              BUG (0);
# Line 280  file_stat_dlg_proc (HWND dlg, UINT msg, Line 284  file_stat_dlg_proc (HWND dlg, UINT msg,
284              EndDialog (dlg, FALSE);              EndDialog (dlg, FALSE);
285              return TRUE;              return TRUE;
286          }          }
287            SetWindowText (dlg, _("File Status"));
288          SetForegroundWindow (dlg);          SetForegroundWindow (dlg);
289          break;          break;
290                    

Legend:
Removed from v.226  
changed lines
  Added in v.256

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26