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

Fix GTK1 build.

Commit 5390aef3fc broke it, because GTK1 has neither
gtk_label_set_selectable nor gtk_widget_set_can_focus. Happily, those
are both more or less optional (only a minor UI awkwardness arises
from not having them), so I'll just condition them out.
This commit is contained in:
Simon Tatham 2022-05-12 19:57:10 +01:00
parent 80a87df618
commit 386b094e3f

View File

@ -2506,8 +2506,10 @@ GtkWidget *layout_ctrls(
*/
uc->text = w = gtk_label_new(uc->ctrl->label);
#endif
#if GTK_CHECK_VERSION(2,0,0)
gtk_label_set_selectable(GTK_LABEL(w), true);
gtk_widget_set_can_focus(w, false);
#endif
align_label_left(GTK_LABEL(w));
gtk_label_set_line_wrap(GTK_LABEL(w), ctrl->text.wrap);
if (!ctrl->text.wrap) {
@ -2518,7 +2520,9 @@ GtkWidget *layout_ctrls(
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(w),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_NEVER);
#if GTK_CHECK_VERSION(2,0,0)
gtk_widget_set_can_focus(w, false);
#endif
}
break;
}