diff options
author | Thomas White <taw@physics.org> | 2020-08-19 16:29:30 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2020-08-19 16:29:30 +0200 |
commit | a0e9410fae73b1c91e21f8748a39164691895c6f (patch) | |
tree | eacae5071ea65f772836c97abff46103a60d5023 /src | |
parent | 10e1c93f65c1d47432c96d9c2ba0fcb3f5b7e33f (diff) |
Disable indexing method chooser when auto mode is selected
Diffstat (limited to 'src')
-rw-r--r-- | src/crystfelindexingopts.c | 18 | ||||
-rw-r--r-- | src/crystfelindexingopts.h | 1 |
2 files changed, 14 insertions, 5 deletions
diff --git a/src/crystfelindexingopts.c b/src/crystfelindexingopts.c index 1d0ffa2b..23866786 100644 --- a/src/crystfelindexingopts.c +++ b/src/crystfelindexingopts.c @@ -233,6 +233,14 @@ static void cell_file_clear_sig(GtkButton *buton, } +static void auto_indm_toggle_sig(GtkToggleButton *togglebutton, + CrystFELIndexingOpts *io) +{ + gtk_widget_set_sensitive(GTK_WIDGET(io->indm_chooser), + !gtk_toggle_button_get_active(togglebutton)); +} + + static GtkWidget *indexing_parameters(CrystFELIndexingOpts *io) { GtkWidget *box; @@ -240,7 +248,6 @@ static GtkWidget *indexing_parameters(CrystFELIndexingOpts *io) GtkWidget *label; GtkWidget *expander; GtkWidget *frame; - GtkWidget *indexing_methods; GtkWidget *tolerances; GtkWidget *button; @@ -271,14 +278,15 @@ static GtkWidget *indexing_parameters(CrystFELIndexingOpts *io) io->auto_indm = gtk_check_button_new_with_label("Automatically choose the indexing methods"); gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(io->auto_indm), FALSE, FALSE, 0); + g_signal_connect(G_OBJECT(io->auto_indm), "toggled", + G_CALLBACK(auto_indm_toggle_sig), io); expander = gtk_expander_new("Select indexing methods and prior information"); frame = gtk_frame_new(NULL); gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN); - gtk_container_add(GTK_CONTAINER(expander), - GTK_WIDGET(frame)); - indexing_methods = make_indexing_methods(io); + gtk_container_add(GTK_CONTAINER(expander), GTK_WIDGET(frame)); + io->indm_chooser = make_indexing_methods(io); gtk_container_add(GTK_CONTAINER(frame), - GTK_WIDGET(indexing_methods)); + GTK_WIDGET(io->indm_chooser)); gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(expander), FALSE, FALSE, 0); gtk_container_set_border_width(GTK_CONTAINER(frame), 6); diff --git a/src/crystfelindexingopts.h b/src/crystfelindexingopts.h index cebba103..58ba39bf 100644 --- a/src/crystfelindexingopts.h +++ b/src/crystfelindexingopts.h @@ -56,6 +56,7 @@ struct _crystfelindexingopts /*< private >*/ GtkWidget *cell_chooser; GtkWidget *auto_indm; + GtkWidget *indm_chooser; GtkListStore *indm_store; GtkWidget *multi; GtkWidget *refine; |