X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=unix%2Fgtkdlg.c;h=573111aeede967676f5f2d6c4a86c87c43226046;hb=48eafd66aa274c32fc8169a0d36619663905c210;hp=9c16235095f0c089bc9667e36bbbceaeeed2e7ed;hpb=612534a4b42aacdc35a9b786915156f558ef359a;p=PuTTY.git diff --git a/unix/gtkdlg.c b/unix/gtkdlg.c index 9c162350..573111ae 100644 --- a/unix/gtkdlg.c +++ b/unix/gtkdlg.c @@ -3520,7 +3520,8 @@ int askalg(void *frontend, const char *algtype, const char *algname, 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); @@ -3585,6 +3586,15 @@ static void about_close_clicked(GtkButton *button, gpointer data) 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; @@ -3673,6 +3683,9 @@ void about_box(void *window) 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));