]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Slightly improve layout in GTK3 Pageant passphrase prompts.
authorSimon Tatham <anakin@pobox.com>
Mon, 31 Aug 2015 14:45:27 +0000 (15:45 +0100)
committerSimon Tatham <anakin@pobox.com>
Mon, 31 Aug 2015 14:48:07 +0000 (15:48 +0100)
Now I've moved align_label_left() into gtkmisc.c where gtkask.c can
get at it, we can use it to fix the alignment of the prompt label.
Also, use gtk_label_set_width_chars() to give the label a more or less
sensible width.

unix/gtkask.c

index 8d984a3528e8194840fd6428ab62fbe941af01fa..c247a925b8fb8886ffd3e080c1cc47d971a3b16e 100644 (file)
@@ -303,7 +303,11 @@ static const char *gtk_askpass_setup(struct askpass_ctx *ctx,
     gtk_window_set_title(GTK_WINDOW(ctx->dialog), window_title);
     gtk_window_set_position(GTK_WINDOW(ctx->dialog), GTK_WIN_POS_CENTER);
     ctx->promptlabel = gtk_label_new(prompt_text);
+    align_label_left(GTK_LABEL(ctx->promptlabel));
     gtk_label_set_line_wrap(GTK_LABEL(ctx->promptlabel), TRUE);
+#if GTK_CHECK_VERSION(3,0,0)
+    gtk_label_set_width_chars(GTK_LABEL(ctx->promptlabel), 48);
+#endif
     our_dialog_add_to_content_area(GTK_WINDOW(ctx->dialog),
                                    ctx->promptlabel, TRUE, TRUE, 0);
 #if GTK_CHECK_VERSION(2,0,0)