X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/bfcd86603c6bc91605bf5cf98c21170d8bd93726..de2eadb094ac7359227015ae46771b54c6adf61f:/unix/gtkdlg.c diff --git a/unix/gtkdlg.c b/unix/gtkdlg.c index eb93d335..053c6210 100644 --- a/unix/gtkdlg.c +++ b/unix/gtkdlg.c @@ -3262,7 +3262,7 @@ int messagebox(GtkWidget *parentwin, char *title, char *msg, int minwid, ...) return dp.retval; } -static int string_width(char *text) +int string_width(char *text) { GtkWidget *label = gtk_label_new(text); GtkRequisition req; @@ -3389,6 +3389,13 @@ void fatal_message_box(void *window, char *msg) "OK", 'o', 1, 1, NULL); } +void nonfatal_message_box(void *window, char *msg) +{ + messagebox(window, "PuTTY Error", msg, + string_width("REASONABLY LONG LINE OF TEXT FOR BASIC SANITY"), + "OK", 'o', 1, 1, NULL); +} + void fatalbox(char *p, ...) { va_list ap; @@ -3401,6 +3408,17 @@ void fatalbox(char *p, ...) cleanup_exit(1); } +void nonfatal(char *p, ...) +{ + va_list ap; + char *msg; + va_start(ap, p); + msg = dupvprintf(p, ap); + va_end(ap); + fatal_message_box(NULL, msg); + sfree(msg); +} + static GtkWidget *aboutbox = NULL; static void about_close_clicked(GtkButton *button, gpointer data) @@ -3414,7 +3432,7 @@ static void licence_clicked(GtkButton *button, gpointer data) char *title; char *licence = - "Copyright 1997-2012 Simon Tatham.\n\n" + "Copyright 1997-2013 Simon Tatham.\n\n" "Portions copyright Robert de Bath, Joris van Rantwijk, Delian " "Delchev, Andreas Schultz, Jeroen Massar, Wez Furlong, Nicolas " @@ -3495,7 +3513,7 @@ void about_box(void *window) w, FALSE, FALSE, 5); gtk_widget_show(w); - w = gtk_label_new("Copyright 1997-2012 Simon Tatham. All rights reserved"); + w = gtk_label_new("Copyright 1997-2013 Simon Tatham. All rights reserved"); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(aboutbox)->vbox), w, FALSE, FALSE, 5); gtk_widget_show(w);