1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-25 01:02:24 +00:00

Another GTK3 fix for GtkEntry width.

When I committed 5e738877b the other day, I missed another case of the
same thing in the file/font selector handling.
This commit is contained in:
Simon Tatham 2015-08-24 19:04:37 +01:00
parent a98b1cc03b
commit 3e86aa1bc6

View File

@ -2146,7 +2146,6 @@ GtkWidget *layout_ctrls(struct dlgparam *dp, struct Shortcuts *scs,
case CTRL_FONTSELECT:
{
GtkWidget *ww;
GtkRequisition req;
const char *browsebtn =
(ctrl->generic.type == CTRL_FILESELECT ?
"Browse..." : "Change...");
@ -2169,8 +2168,15 @@ GtkWidget *layout_ctrls(struct dlgparam *dp, struct Shortcuts *scs,
}
uc->entry = ww = gtk_entry_new();
gtk_widget_size_request(ww, &req);
gtk_widget_set_size_request(ww, 10, req.height);
#if !GTK_CHECK_VERSION(3,0,0)
{
GtkRequisition req;
gtk_widget_size_request(ww, &req);
gtk_widget_set_size_request(ww, 10, req.height);
}
#else
gtk_entry_set_width_chars(GTK_ENTRY(ww), 1);
#endif
columns_add(COLUMNS(w), ww, 0, 1);
gtk_widget_show(ww);