Try to make our PGP signing more useful:
[u/mdw/putty] / unix / gtkwin.c
index 93cc68e..c93aeda 100644 (file)
@@ -95,6 +95,7 @@ struct gui_data {
     char *progname, **gtkargvstart;
     int ngtkargs;
     guint32 input_event_time; /* Timestamp of the most recent input event. */
+    int reconfiguring;
 };
 
 struct draw_ctx {
@@ -2560,7 +2561,11 @@ int do_cmdline(int argc, char **argv, int do_everything,
        } else if(!strcmp(p, "-help") || !strcmp(p, "--help")) {
            help(stdout);
            exit(0);
-           
+
+        } else if (!strcmp(p, "-pgpfp")) {
+            pgp_fingerprints();
+            exit(1);
+
        } else if(p[0] != '-' && (!do_everything ||
                                   process_nonoption_arg(p, cfg))) {
             /* do nothing */
@@ -2878,6 +2883,11 @@ void change_settings_menuitem(GtkMenuItem *item, gpointer data)
 
     assert(lenof(ww) == NCFGCOLOURS);
 
+    if (inst->reconfiguring)
+      return;
+    else
+      inst->reconfiguring = TRUE;
+
     cfg2 = inst->cfg;                  /* structure copy */
 
     if (do_config_box(title, &cfg2, 1,
@@ -2995,6 +3005,7 @@ void change_settings_menuitem(GtkMenuItem *item, gpointer data)
        gtk_widget_queue_draw(inst->area);
     }
     sfree(title);
+    inst->reconfiguring = FALSE;
 }
 
 void fork_and_exec_self(struct gui_data *inst, int fd_to_close, ...)