From 262639d5ce246e94aeab96260d6c0d2fa5f9fdc0 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 25 Aug 2020 13:50:24 +0200 Subject: Local backend: read number of processes --- src/gui_backend_local.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src') 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); + } + } } -- cgit v1.2.3