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

Diff of /trunk/Src/wptKeyEditCB.cpp

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

revision 160 by twoaday, Thu Jan 19 09:22:09 2006 UTC revision 170 by twoaday, Mon Jan 30 12:42:57 2006 UTC
# Line 49  cmd_keyserv_handler (GpgKeyEdit *ctx, gp Line 49  cmd_keyserv_handler (GpgKeyEdit *ctx, gp
49    
50      if (!ctx->cmd_sent && !strcmp (key, "keyedit.prompt")) {      if (!ctx->cmd_sent && !strcmp (key, "keyedit.prompt")) {
51          ctx->cmd_sent = 1;          ctx->cmd_sent = 1;
52          sprintf (buf, "uid %d", ctx->uid_index);          sprintf (buf, "uid %d", ctx->getUseridIndex ());
53          return buf;          return buf;
54      }      }
55      if (!strcmp (key, "keyedit.prompt") && !ctx->cnt) {      if (!strcmp (key, "keyedit.prompt") && !ctx->cnt) {
# Line 77  cmd_sign_handler (GpgKeyEdit *ctx, gpgme Line 77  cmd_sign_handler (GpgKeyEdit *ctx, gpgme
77  {  {
78      static char buf[32];      static char buf[32];
79    
80        if (ctx->getUseridIndex () != -1 &&
81            ctx->cnt == 0 && !strcmp (key, "keyedit.prompt")) {
82            ctx->cnt++;
83            sprintf (buf, "uid %d", ctx->getUseridIndex ());
84            return buf;
85        }
86    
87      if (!ctx->cmd_sent && !strcmp (key, "keyedit.prompt")) {      if (!ctx->cmd_sent && !strcmp (key, "keyedit.prompt")) {
88          ctx->cmd_sent = 1;          ctx->cmd_sent = 1;
89          switch (ctx->getType ()) {          switch (ctx->getType ()) {
# Line 177  cmd_deluid_handler (GpgKeyEdit *ctx, gpg Line 184  cmd_deluid_handler (GpgKeyEdit *ctx, gpg
184      int step = *r_step;      int step = *r_step;
185    
186      if (step == 0 && !strcmp (key, "keyedit.prompt")) {      if (step == 0 && !strcmp (key, "keyedit.prompt")) {
187          sprintf (buf, "uid %d", ctx->uid_index);          sprintf (buf, "uid %d", ctx->getUseridIndex ());
188          *r_step = step = 1;          *r_step = step = 1;
189          return buf;          return buf;
190      }      }
# Line 199  cmd_deluid_handler (GpgKeyEdit *ctx, gpg Line 206  cmd_deluid_handler (GpgKeyEdit *ctx, gpg
206  }  }
207    
208    
209  static const char *  static const char*
210  cmd_delsig_handler (GpgKeyEdit *ctx, gpgme_status_code_t code, const char * key,  cmd_delsig_handler (GpgKeyEdit *ctx, gpgme_status_code_t code, const char *key,
211                      int * r_step)                      int *r_step)
212  {  {
213      static char buf[64];      static char buf[64];
214      int step = *r_step;      int step = *r_step;
215    
216      if (step == 0 && !strcmp (key, "keyedit.prompt")) {      if (step == 0 && !strcmp (key, "keyedit.prompt")) {
217          sprintf (buf, "uid %d", ctx->uid_index);          sprintf (buf, "uid %d", ctx->getUseridIndex ());
218          *r_step = step = 1;          *r_step = step = 1;
219          return buf;          return buf;
220      }      }
# Line 217  cmd_delsig_handler (GpgKeyEdit *ctx, gpg Line 224  cmd_delsig_handler (GpgKeyEdit *ctx, gpg
224      }      }
225      if (!strcmp (key, "keyedit.delsig.unknown") ||      if (!strcmp (key, "keyedit.delsig.unknown") ||
226          !strcmp (key, "keyedit.delsig.valid")) {          !strcmp (key, "keyedit.delsig.valid")) {
227          if (++ctx->cnt == ctx->sig_index)          if (++ctx->cnt == ctx->getSigIndex ())
228              return "Y";              return "Y";
229          else          else
230              return "N";              return "N";
# Line 242  cmd_delkey_handler (GpgKeyEdit *ctx, gpg Line 249  cmd_delkey_handler (GpgKeyEdit *ctx, gpg
249      int step = *r_step;      int step = *r_step;
250    
251      if (step == 0 && !strcmp (key, "keyedit.prompt")) {      if (step == 0 && !strcmp (key, "keyedit.prompt")) {
252          sprintf (buf, "key %d", ctx->key_index);          sprintf (buf, "key %d", ctx->getKeyIndex ());
253          *r_step = step = 1;          *r_step = step = 1;
254          return buf;          return buf;
255      }      }
# Line 364  cmd_primary_handler (GpgKeyEdit *ctx, gp Line 371  cmd_primary_handler (GpgKeyEdit *ctx, gp
371      int step = *r_step;      int step = *r_step;
372    
373      if (step == 0 && !strcmp (key, "keyedit.prompt")) {      if (step == 0 && !strcmp (key, "keyedit.prompt")) {
374          sprintf (buf, "uid %d", ctx->uid_index);          sprintf (buf, "uid %d", ctx->getUseridIndex ());
375          *r_step = step = 1;          *r_step = step = 1;
376          return buf;          return buf;
377      }      }
# Line 393  cmd_expire_handler (GpgKeyEdit *ctx, gpg Line 400  cmd_expire_handler (GpgKeyEdit *ctx, gpg
400      int step = *r_step;      int step = *r_step;
401    
402      if (step == 0 && !strcmp (key, "keyedit.prompt")) {      if (step == 0 && !strcmp (key, "keyedit.prompt")) {
403          sprintf (buf, "key %d", ctx->key_index);          sprintf (buf, "key %d", ctx->getKeyIndex ());
404          *r_step = step = 1;          *r_step = step = 1;
405          return buf;          return buf;
406      }      }
# Line 430  cmd_revuid_handler (GpgKeyEdit *ctx, gpg Line 437  cmd_revuid_handler (GpgKeyEdit *ctx, gpg
437            
438      if (step == 0 && !strcmp (key, "keyedit.prompt")) {      if (step == 0 && !strcmp (key, "keyedit.prompt")) {
439          *r_step = step = 1;          *r_step = step = 1;
440          sprintf (buf, "uid %d", ctx->uid_index);          sprintf (buf, "uid %d", ctx->getUseridIndex ());
441          return buf;          return buf;
442      }      }
443      else if (step == 1 && !strcmp (key, "keyedit.prompt")) {      else if (step == 1 && !strcmp (key, "keyedit.prompt")) {
# Line 474  cmd_revsig_handler (GpgKeyEdit *ctx, gpg Line 481  cmd_revsig_handler (GpgKeyEdit *ctx, gpg
481      int step = *r_step;      int step = *r_step;
482            
483      if( step == 0 && !strcmp ( key, "keyedit.prompt" ) ) {      if( step == 0 && !strcmp ( key, "keyedit.prompt" ) ) {
484          sprintf( buf, "uid %d", ctx->uid_index);          sprintf( buf, "uid %d", ctx->getUseridIndex ());
485          *r_step = step = 1;          *r_step = step = 1;
486          return buf;          return buf;
487      }      }
# Line 525  cmd_revkey_handler (GpgKeyEdit *ctx, gpg Line 532  cmd_revkey_handler (GpgKeyEdit *ctx, gpg
532      static char buf[64];      static char buf[64];
533    
534      if( step == 0 && !strcmp ( key, "keyedit.prompt" ) ) {      if( step == 0 && !strcmp ( key, "keyedit.prompt" ) ) {
535          sprintf( buf, "key %d", ctx->key_index);          sprintf( buf, "key %d", ctx->getKeyIndex ());
536          *r_step = step = 1;          *r_step = step = 1;
537          return buf;          return buf;
538      }      }

Legend:
Removed from v.160  
changed lines
  Added in v.170

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26