mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-04-22 05:25:03 -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:
parent
ab70bda4c7
commit
5390aef3fc
@ -2506,6 +2506,8 @@ GtkWidget *layout_ctrls(
|
|||||||
*/
|
*/
|
||||||
uc->text = w = gtk_label_new(uc->ctrl->label);
|
uc->text = w = gtk_label_new(uc->ctrl->label);
|
||||||
#endif
|
#endif
|
||||||
|
gtk_label_set_selectable(GTK_LABEL(w), true);
|
||||||
|
gtk_widget_set_can_focus(w, false);
|
||||||
align_label_left(GTK_LABEL(w));
|
align_label_left(GTK_LABEL(w));
|
||||||
gtk_label_set_line_wrap(GTK_LABEL(w), true);
|
gtk_label_set_line_wrap(GTK_LABEL(w), true);
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user