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

Add some missing GTK focus-in event handlers.

Fixes a behaviour which I intended all along but apparently didn't
work before on GTK: if you start PuTTY, _select_ a saved session in
the list box but don't hit Load, and then just hit Open, then it will
be implicitly loaded and run for you, as a special case to save you an
extra button-press.

This depends on noticing that the saved-sessions list box last had the
focus, for which I need my widget_focus() handler to be called for
basically all config widgets so that I can track what _did_ last have
focus. Unfortunately, I missed a couple out.
This commit is contained in:
Simon Tatham 2015-09-26 11:48:21 +01:00
parent 9458377275
commit 81152e5f38

View File

@ -2294,6 +2294,9 @@ GtkWidget *layout_ctrls(struct dlgparam *dp, struct Shortcuts *scs,
*/
g_signal_connect(G_OBJECT(w), "changed",
G_CALLBACK(droplist_selchange), dp);
g_signal_connect(G_OBJECT(w), "focus_in_event",
G_CALLBACK(widget_focus), dp);
#endif
} else {
#if !GTK_CHECK_VERSION(2,0,0)
@ -2400,6 +2403,8 @@ GtkWidget *layout_ctrls(struct dlgparam *dp, struct Shortcuts *scs,
uc->treeview = w;
g_signal_connect(G_OBJECT(w), "row-activated",
G_CALLBACK(listbox_doubleclick), dp);
g_signal_connect(G_OBJECT(w), "focus_in_event",
G_CALLBACK(widget_focus), dp);
g_signal_connect(G_OBJECT(sel), "changed",
G_CALLBACK(listbox_selchange), dp);