From 856a0ecc4a89ee113b54612b51678baca7af5d97 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Tue, 25 Aug 2015 19:55:38 +0100 Subject: [PATCH] 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! --- unix/gtkdlg.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/unix/gtkdlg.c b/unix/gtkdlg.c index 0db347d8..c044c062 100644 --- a/unix/gtkdlg.c +++ b/unix/gtkdlg.c @@ -2841,14 +2841,8 @@ static void shortcut_highlight(GtkWidget *labelw, int chr) for (i = 0; currstr[i]; i++) if (tolower((unsigned char)currstr[i]) == chr) { - GtkRequisition req; - pattern = dupprintf("%*s_", i, ""); - - gtk_widget_size_request(GTK_WIDGET(label), &req); gtk_label_set_pattern(label, pattern); - gtk_widget_set_size_request(GTK_WIDGET(label), -1, req.height); - sfree(pattern); break; }