diff options
author | Thomas White <taw@physics.org> | 2020-08-26 15:43:15 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2020-08-26 15:43:15 +0200 |
commit | f249385feb6799c913f3eba13d79dfd507c72c04 (patch) | |
tree | 43bdddb004f749f6bb3cc749f7af2d7dfbbf2412 | |
parent | def8f985760d3f2b9a40e02fc4a971d82e8acbea (diff) |
Set backend options on focus out event
See 76ff5be0 for more details. Fortunately, there is no speed problem
this time.
-rw-r--r-- | src/gui_backend_local.c | 10 | ||||
-rw-r--r-- | src/gui_backend_slurm.c | 30 |
2 files changed, 40 insertions, 0 deletions
diff --git a/src/gui_backend_local.c b/src/gui_backend_local.c index 41be3c33..6d4ac66c 100644 --- a/src/gui_backend_local.c +++ b/src/gui_backend_local.c @@ -295,6 +295,13 @@ static void n_processes_activate_sig(GtkEntry *entry, gpointer data) } +static void n_processes_focus_sig(GtkEntry *entry, GdkEvent *event, + gpointer data) +{ + n_processes_activate_sig(entry, data); +} + + static GtkWidget *make_indexing_parameters_widget(void *opts_priv) { struct local_indexing_opts *opts = opts_priv; @@ -322,6 +329,9 @@ static GtkWidget *make_indexing_parameters_widget(void *opts_priv) g_signal_connect(G_OBJECT(entry), "activate", G_CALLBACK(n_processes_activate_sig), opts); + g_signal_connect(G_OBJECT(entry), "focus-out-event", + G_CALLBACK(n_processes_focus_sig), + opts); return vbox; } diff --git a/src/gui_backend_slurm.c b/src/gui_backend_slurm.c index 545e0acb..684bcbaa 100644 --- a/src/gui_backend_slurm.c +++ b/src/gui_backend_slurm.c @@ -88,6 +88,13 @@ static void block_size_activate_sig(GtkEntry *entry, gpointer data) } +static void block_size_focus_sig(GtkEntry *entry, GdkEvent *event, + gpointer data) +{ + block_size_activate_sig(entry, data); +} + + static void partition_activate_sig(GtkEntry *entry, gpointer data) { struct slurm_indexing_opts *opts = data; @@ -95,6 +102,13 @@ static void partition_activate_sig(GtkEntry *entry, gpointer data) } +static void partition_focus_sig(GtkEntry *entry, GdkEvent *event, + gpointer data) +{ + partition_activate_sig(entry, data); +} + + static void email_activate_sig(GtkEntry *entry, gpointer data) { struct slurm_indexing_opts *opts = data; @@ -102,6 +116,13 @@ static void email_activate_sig(GtkEntry *entry, gpointer data) } +static void email_focus_sig(GtkEntry *entry, GdkEvent *event, + gpointer data) +{ + email_activate_sig(entry, data); +} + + static GtkWidget *make_indexing_parameters_widget(void *opts_priv) { struct slurm_indexing_opts *opts = opts_priv; @@ -129,6 +150,9 @@ static GtkWidget *make_indexing_parameters_widget(void *opts_priv) g_signal_connect(G_OBJECT(entry), "activate", G_CALLBACK(partition_activate_sig), opts); + g_signal_connect(G_OBJECT(entry), "focus-out-event", + G_CALLBACK(partition_focus_sig), + opts); hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 8); gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(hbox), @@ -144,6 +168,9 @@ static GtkWidget *make_indexing_parameters_widget(void *opts_priv) g_signal_connect(G_OBJECT(entry), "activate", G_CALLBACK(block_size_activate_sig), opts); + g_signal_connect(G_OBJECT(entry), "focus-out-event", + G_CALLBACK(block_size_focus_sig), + opts); label = gtk_label_new("frames"); gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(label), FALSE, FALSE, 0); @@ -165,6 +192,9 @@ static GtkWidget *make_indexing_parameters_widget(void *opts_priv) g_signal_connect(G_OBJECT(entry), "activate", G_CALLBACK(email_activate_sig), opts); + g_signal_connect(G_OBJECT(entry), "focus-out-event", + G_CALLBACK(email_focus_sig), + opts); return vbox; } |