1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-04-09 23:28:06 -05:00

GTK: make explicit text controls selectable.

This doesn't apply to every GtkLabel I instantiate: only the ones
constructed as part of implementing the cross-platform CTRL_TEXT.
Those labels contain information that the dialog box is deliberately
communicating to the user, so it seems a sensible idea to make sure
they can be copy-pasted.

By default, this also seems to cause them to become able to take the
input focus, so I've reverted that. You can select them with the
mouse, but I think having them appear in the tab order is an
awkwardness too far, since they're not active in any other way.
This commit is contained in:
Simon Tatham 2022-05-07 11:00:19 +01:00
parent ab70bda4c7
commit 5390aef3fc

View File

@ -2506,6 +2506,8 @@ GtkWidget *layout_ctrls(
*/
uc->text = w = gtk_label_new(uc->ctrl->label);
#endif
gtk_label_set_selectable(GTK_LABEL(w), true);
gtk_widget_set_can_focus(w, false);
align_label_left(GTK_LABEL(w));
gtk_label_set_line_wrap(GTK_LABEL(w), true);
break;