aboutsummaryrefslogtreecommitdiff
path: root/src/gui_backend_local.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-08-25 13:50:24 +0200
committerThomas White <taw@physics.org>2020-08-25 13:50:24 +0200
commit262639d5ce246e94aeab96260d6c0d2fa5f9fdc0 (patch)
treeaad69dca067d4cfa4ee4047024fbd1819f1bbd98 /src/gui_backend_local.c
parentf2f35c529e31d42927ff9d0e6a1e55d4237ee8bb (diff)
Local backend: read number of processes
Diffstat (limited to 'src/gui_backend_local.c')
-rw-r--r--src/gui_backend_local.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gui_backend_local.c b/src/gui_backend_local.c
index c82e2f2b..451ca253 100644
--- a/src/gui_backend_local.c
+++ b/src/gui_backend_local.c
@@ -313,6 +313,7 @@ static GtkWidget *make_indexing_parameters_widget(void *opts_priv)
FALSE, FALSE, 0);
entry = gtk_entry_new();
snprintf(tmp, 63, "%i", opts->n_processes);
+ gtk_entry_set_text(GTK_ENTRY(entry), tmp);
gtk_entry_set_width_chars(GTK_ENTRY(entry), 5);
gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(entry),
FALSE, FALSE, 0);
@@ -348,10 +349,13 @@ static void read_indexing_opt(void *opts_priv,
const char *key,
const char *val)
{
- //struct local_indexing_opts *opts = opts_priv;
+ struct local_indexing_opts *opts = opts_priv;
- STATUS("Local got %s = '%s'\n", key, val);
- /* FIXME: Parse and set */
+ if ( strcmp(key, "indexing.local.n_processes") == 0 ) {
+ if ( convert_int(val, &opts->n_processes) ) {
+ ERROR("Invalid number of threads: %s\n", val);
+ }
+ }
}