From e8a8c2535dc198b16569f405caa96f895fce6824 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Thu, 23 Jun 2022 19:04:43 +0100 Subject: [PATCH] GTK: remove 'entrysig' in struct uctrl. The only *use* of it was removed in commit 6a743399b03e3d6, where instead of blocking the GTK signal that caused a string to be overwritten, I switched to making a temporary copy of the string. But I didn't notice that the declaration and assignments could be cleaned up too. --- unix/dialog.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/unix/dialog.c b/unix/dialog.c index c30c79e8..eda622f1 100644 --- a/unix/dialog.c +++ b/unix/dialog.c @@ -71,7 +71,6 @@ struct uctrl { GtkWidget *label; /* for dlg_label_change */ GtkAdjustment *adj; /* for the scrollbar in a list box */ struct selparam *sp; /* which switchable pane of the box we're in */ - guint entrysig; guint textsig; int nclicks; const char *textvalue; /* temporary, for button-only file selectors */ @@ -2055,9 +2054,8 @@ GtkWidget *layout_ctrls( uc->entry = w; signalobject = w; } - uc->entrysig = - g_signal_connect(G_OBJECT(signalobject), "changed", - G_CALLBACK(editbox_changed), dp); + g_signal_connect(G_OBJECT(signalobject), "changed", + G_CALLBACK(editbox_changed), dp); g_signal_connect(G_OBJECT(signalobject), "key_press_event", G_CALLBACK(editbox_key), dp); g_signal_connect(G_OBJECT(signalobject), "focus_in_event", @@ -2167,9 +2165,8 @@ GtkWidget *layout_ctrls( g_signal_connect(G_OBJECT(uc->entry), "key_press_event", G_CALLBACK(editbox_key), dp); - uc->entrysig = - g_signal_connect(G_OBJECT(uc->entry), "changed", - G_CALLBACK(editbox_changed), dp); + g_signal_connect(G_OBJECT(uc->entry), "changed", + G_CALLBACK(editbox_changed), dp); g_signal_connect(G_OBJECT(uc->entry), "focus_in_event", G_CALLBACK(widget_focus), dp); } else {