mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 18:07:59 +00:00
Remove a mysterious GTK size-request tweak.
In shortcut_add(), when we add an underlined letter to a GtkLabel, we were fetching the label's height before changing its text, and restoring it afterwards. I've no idea why - I can see no difference with and without the code. That code's been there since 2003 without explanation. My best guess is that it was working around a GTK bug of the day, but since no difference is visible even in current GTK1, I think I'm just going to remove it. If any problems show up later, I can put it back, with an actual comment!
This commit is contained in:
parent
7193e930de
commit
856a0ecc4a
@ -2841,14 +2841,8 @@ static void shortcut_highlight(GtkWidget *labelw, int chr)
|
|||||||
|
|
||||||
for (i = 0; currstr[i]; i++)
|
for (i = 0; currstr[i]; i++)
|
||||||
if (tolower((unsigned char)currstr[i]) == chr) {
|
if (tolower((unsigned char)currstr[i]) == chr) {
|
||||||
GtkRequisition req;
|
|
||||||
|
|
||||||
pattern = dupprintf("%*s_", i, "");
|
pattern = dupprintf("%*s_", i, "");
|
||||||
|
|
||||||
gtk_widget_size_request(GTK_WIDGET(label), &req);
|
|
||||||
gtk_label_set_pattern(label, pattern);
|
gtk_label_set_pattern(label, pattern);
|
||||||
gtk_widget_set_size_request(GTK_WIDGET(label), -1, req.height);
|
|
||||||
|
|
||||||
sfree(pattern);
|
sfree(pattern);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user