text = dupprintf(msg, algtype, algname);
ret = messagebox(GTK_WIDGET(get_window(frontend)),
"PuTTY Security Alert", text,
- string_width("Continue with connection?"),
+ string_width("Reasonably long line of text as a width"
+ " template"),
"Yes", 'y', 0, 1,
"No", 'n', 0, 0,
NULL);
aboutbox = NULL;
}
+static void about_key_press(GtkWidget *widget, GdkEventKey *event,
+ gpointer data)
+{
+ if (event->keyval == GDK_KEY_Escape && aboutbox) {
+ gtk_widget_destroy(aboutbox);
+ aboutbox = NULL;
+ }
+}
+
static void licence_clicked(GtkButton *button, gpointer data)
{
char *title;
our_dialog_add_to_content_area(GTK_WINDOW(aboutbox), w, FALSE, FALSE, 5);
gtk_widget_show(w);
+ g_signal_connect(G_OBJECT(aboutbox), "key_press_event",
+ G_CALLBACK(about_key_press), NULL);
+
set_transient_window_pos(GTK_WIDGET(window), aboutbox);
gtk_window_set_transient_for(GTK_WINDOW(aboutbox),
GTK_WINDOW(window));