diff options
author | Thomas White <taw@physics.org> | 2020-08-13 15:33:04 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2020-08-13 16:38:20 +0200 |
commit | 4bdd170078ad5eaa930d71bc1ccbf735aebf731b (patch) | |
tree | 49c19d3290946f1c90132466bb6851e3e0061693 /src | |
parent | 8a4d8431d70785d3c016cec5ce1e4ac3b6a9dfd4 (diff) |
GUI: Sketch out indexing options etc
Diffstat (limited to 'src')
-rw-r--r-- | src/crystfel_gui.c | 10 | ||||
-rw-r--r-- | src/crystfelindexingopts.c | 340 | ||||
-rw-r--r-- | src/crystfelindexingopts.h | 72 | ||||
-rw-r--r-- | src/gui_index.c | 136 | ||||
-rw-r--r-- | src/gui_index.h | 9 | ||||
-rw-r--r-- | src/gui_project.c | 1 | ||||
-rw-r--r-- | src/gui_project.h | 2 |
7 files changed, 513 insertions, 57 deletions
diff --git a/src/crystfel_gui.c b/src/crystfel_gui.c index a8f3be03..04658ea4 100644 --- a/src/crystfel_gui.c +++ b/src/crystfel_gui.c @@ -747,10 +747,12 @@ static void add_task_buttons(GtkWidget *vbox, struct crystfelproject *proj) G_CALLBACK(finddata_sig), proj); add_button(vbox, "Peak detection", "edit-find", G_CALLBACK(peaksearch_sig), proj); - add_button(vbox, "Determine unit cell", "document-page-setup", - G_CALLBACK(unitcell_sig), proj); - add_button(vbox, "Index and integrate", "system-run", - G_CALLBACK(NULL), proj); + add_button(vbox, "Index this frame", "system-run", + G_CALLBACK(index_one_sig), proj); + add_button(vbox, "Index all frames", "view-grid", + G_CALLBACK(index_all_sig), proj); + add_button(vbox, "Determine unit cell", "applications-engineering", + G_CALLBACK(cell_explorer_sig), proj); add_button(vbox, "Merge", "applications-science", G_CALLBACK(NULL), proj); add_button(vbox, "Figures of merit", "trophy-gold", diff --git a/src/crystfelindexingopts.c b/src/crystfelindexingopts.c new file mode 100644 index 00000000..6d13c8d3 --- /dev/null +++ b/src/crystfelindexingopts.c @@ -0,0 +1,340 @@ +/* + * crystfelindexingopts.h + * + * A GTK widget to set indexing options + * + * Copyright © 2020 Deutsches Elektronen-Synchrotron DESY, + * a research centre of the Helmholtz Association. + * + * Authors: + * 2020 Thomas White <taw@physics.org> + * + * This file is part of CrystFEL. + * + * CrystFEL is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * CrystFEL is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with CrystFEL. If not, see <http://www.gnu.org/licenses/>. + * + */ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <assert.h> +#include <gtk/gtk.h> +#include <glib-object.h> + +#include "crystfelindexingopts.h" + + +G_DEFINE_TYPE(CrystFELIndexingOpts, + crystfel_indexing_opts, + GTK_TYPE_NOTEBOOK) + + +static void crystfel_indexing_opts_class_init(CrystFELIndexingOptsClass *klass) +{ +} + + +static void crystfel_indexing_opts_init(CrystFELIndexingOpts *io) +{ +} + + +static void add_method(GtkListStore *store, const char *name) +{ + GtkTreeIter iter; + gtk_list_store_append(store, &iter); + gtk_list_store_set(store, &iter, + 0, FALSE, + 1, name, + 2, FALSE, + 3, FALSE, + -1); +} + + +static void add_tol(GtkGrid *grid, const char *spec_t, + const char *unit_t, gint left, gint top) +{ + GtkWidget *spec; + GtkWidget *entry; + GtkWidget *unit; + + spec = gtk_label_new(spec_t); + g_object_set(G_OBJECT(spec), "margin-left", 12, NULL); + gtk_grid_attach(grid, spec, left, top, 1, 1); + + entry = gtk_entry_new(); + gtk_entry_set_width_chars(GTK_ENTRY(entry), 5); + gtk_grid_attach(grid, entry, left+1, top, 1, 1); + + unit = gtk_label_new(unit_t); + g_object_set(G_OBJECT(unit), "margin-right", 12, NULL); + gtk_grid_attach(grid, unit, left+2, top, 1, 1); +} + + +static GtkWidget *make_tolerances(CrystFELIndexingOpts *io) +{ + GtkWidget *grid; + + grid = gtk_grid_new(); + gtk_grid_set_row_spacing(GTK_GRID(grid), 4); + gtk_grid_set_column_spacing(GTK_GRID(grid), 4); + gtk_container_set_border_width(GTK_CONTAINER(grid), 6); + + add_tol(GTK_GRID(grid), "a", "%", 0, 0); + add_tol(GTK_GRID(grid), "b", "%", 4, 0); + add_tol(GTK_GRID(grid), "c", "%", 8, 0); + add_tol(GTK_GRID(grid), "α", "°", 0, 1); + add_tol(GTK_GRID(grid), "β", "°", 4, 1); + add_tol(GTK_GRID(grid), "ɣ", "°", 8, 1); + + return grid; +} + + +static GtkWidget *make_indexing_methods(CrystFELIndexingOpts *io) +{ + GtkWidget *treeview; + GtkListStore *store; + GtkCellRenderer *renderer; + GtkTreeViewColumn *column; + + store = gtk_list_store_new(4, + G_TYPE_BOOLEAN, /* Algo on */ + G_TYPE_STRING, /* Algo name */ + G_TYPE_BOOLEAN, /* Prior cell */ + G_TYPE_BOOLEAN); /* Prior latt */ + + add_method(store, "DirAx"); + add_method(store, "MOSFLM"); + add_method(store, "XDS"); + add_method(store, "XGANDALF"); + add_method(store, "PinkIndexer"); + add_method(store, "TakeTwo"); + add_method(store, "ASDF"); + add_method(store, "Felix"); + + treeview = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store)); + + renderer = gtk_cell_renderer_toggle_new(); + column = gtk_tree_view_column_new_with_attributes(NULL, + renderer, + "active", 0, + NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column); + + renderer = gtk_cell_renderer_text_new(); + column = gtk_tree_view_column_new_with_attributes("Method", + renderer, + "text", 1, + NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column); + + renderer = gtk_cell_renderer_toggle_new(); + column = gtk_tree_view_column_new_with_attributes("Prior unit cell", + renderer, + "active", 2, + NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column); + + renderer = gtk_cell_renderer_toggle_new(); + column = gtk_tree_view_column_new_with_attributes("Prior lattice type", + renderer, + "active", 3, + NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column); + + return treeview; +} + + +static GtkWidget *indexing_parameters(CrystFELIndexingOpts *io) +{ + GtkWidget *box; + GtkWidget *hbox; + GtkWidget *label; + GtkWidget *entry; + GtkWidget *check; + GtkWidget *filechooser; + GtkWidget *expander; + GtkWidget *frame; + GtkWidget *indexing_methods; + GtkWidget *tolerances; + + box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); + gtk_container_set_border_width(GTK_CONTAINER(box), 8); + + /* Use unit cell / Cell file chooser */ + hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 8); + gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(hbox), + FALSE, FALSE, 0); + check = gtk_check_button_new_with_label("Use unit cell"); + gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(check), + FALSE, FALSE, 0); + filechooser = gtk_file_chooser_button_new("Unit cell file", + GTK_FILE_CHOOSER_ACTION_OPEN); + gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(filechooser), + FALSE, FALSE, 0); + + /* Indexing method selector */ + check = gtk_check_button_new_with_label("Automatically choose the indexing methods"); + gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(check), + FALSE, FALSE, 0); + 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(frame), + GTK_WIDGET(indexing_methods)); + gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(expander), + FALSE, FALSE, 0); + gtk_container_set_border_width(GTK_CONTAINER(frame), 6); + + /* --multi */ + check = gtk_check_button_new_with_label("Attempt to find multiple lattices per frame"); + gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(check), + FALSE, FALSE, 0); + + /* --no-refine (NB inverse) */ + check = gtk_check_button_new_with_label("Refine the indexing solution"); + gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(check), + FALSE, FALSE, 0); + + /* --no-retry (NB inverse) */ + check = gtk_check_button_new_with_label("Retry indexing if unsuccessful"); + gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(check), + FALSE, FALSE, 0); + + /* --no-check-peaks (NB inverse) */ + check = gtk_check_button_new_with_label("Check indexing solutions match peaks"); + gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(check), + FALSE, FALSE, 0); + + /* --no-check-cell (NB inverse) and --tolerance */ + check = gtk_check_button_new_with_label("Check indexing solutions against reference cell"); + gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(check), + FALSE, FALSE, 0); + expander = gtk_expander_new("Unit cell tolerances"); + gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(expander), + FALSE, FALSE, 0); + tolerances = make_tolerances(io); + gtk_container_add(GTK_CONTAINER(expander), tolerances); + + /* --min-peaks (NB add one) */ + hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 8); + gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(hbox), + FALSE, FALSE, 0); + check = gtk_check_button_new_with_label("Skip frames with fewer than"); + gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(check), + FALSE, FALSE, 0); + entry = gtk_entry_new(); + gtk_entry_set_width_chars(GTK_ENTRY(entry), 4); + gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(entry), + FALSE, FALSE, 0); + label = gtk_label_new("peaks"); + gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(label), + FALSE, FALSE, 0); + + return box; +} + + +static GtkWidget *integration_parameters(CrystFELIndexingOpts *io) +{ + GtkWidget *box; + GtkWidget *combo; + GtkWidget *check; + GtkWidget *label; + GtkWidget *entry; + GtkWidget *hbox; + + box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 8); + gtk_container_set_border_width(GTK_CONTAINER(box), 8); + + /* --integration=method */ + hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 8); + gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(hbox), + FALSE, FALSE, 0); + label = gtk_label_new("Integration method:"); + gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(label), + FALSE, FALSE, 0); + combo = gtk_combo_box_text_new(); + gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(combo), + FALSE, FALSE, 0); + gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(combo), "none", + "No integration (only spot prediction)"); + gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(combo), "rings", + "Ring summation"); + gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(combo), "prof2d", + "Two dimensional profile fitting"); + + /* -cen */ + check = gtk_check_button_new_with_label("Center integration boxes on observed reflections"); + gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(check), + FALSE, FALSE, 0); + + /* --overpredict */ + check = gtk_check_button_new_with_label("Over-predict reflections (for post-refinement)"); + gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(check), + FALSE, FALSE, 0); + + /* --push-res */ + hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 8); + gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(hbox), + FALSE, FALSE, 0); + check = gtk_check_button_new_with_label("Limit prediction to"); + gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(check), + FALSE, FALSE, 0); + entry = gtk_entry_new(); + gtk_entry_set_width_chars(GTK_ENTRY(entry), 4); + gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(entry), + FALSE, FALSE, 0); + label = gtk_label_new("nm-1 above apparent resolution limit"); + gtk_label_set_markup(GTK_LABEL(label), + "nm<sup>-1</sup> above apparent resolution limit"); + gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(label), + FALSE, FALSE, 0); + + /* FIXME: fix-bandwidth, divergence, profile-radius */ + /* FIXME: --int-radius */ + + return box; +} + + +GtkWidget *crystfel_indexing_opts_new() +{ + CrystFELIndexingOpts *io; + + io = g_object_new(CRYSTFEL_TYPE_INDEXING_OPTS, NULL); + + gtk_notebook_append_page(GTK_NOTEBOOK(io), + indexing_parameters(io), + gtk_label_new("Indexing")); + + gtk_notebook_append_page(GTK_NOTEBOOK(io), + integration_parameters(io), + gtk_label_new("Integration")); + + gtk_widget_show_all(GTK_WIDGET(io)); + return GTK_WIDGET(io); +} diff --git a/src/crystfelindexingopts.h b/src/crystfelindexingopts.h new file mode 100644 index 00000000..2af709e0 --- /dev/null +++ b/src/crystfelindexingopts.h @@ -0,0 +1,72 @@ +/* + * crystfelindexingopts.h + * + * A GTK widget to set indexing options + * + * Copyright © 2020 Deutsches Elektronen-Synchrotron DESY, + * a research centre of the Helmholtz Association. + * + * Authors: + * 2020 Thomas White <taw@physics.org> + * + * This file is part of CrystFEL. + * + * CrystFEL is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * CrystFEL is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with CrystFEL. If not, see <http://www.gnu.org/licenses/>. + * + */ + +#ifndef CRYSTFELINDEXINGOPTS_H +#define CRYSTFELINDEXINGOPTS_H + +#include <gtk/gtk.h> +#include <glib-object.h> + +#define CRYSTFEL_TYPE_INDEXING_OPTS (crystfel_indexing_opts_get_type()) + +#define CRYSTFEL_INDEXING_OPTS(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), \ + CRYSTFEL_TYPE_INDEXING_OPTS, CrystFELIndexingOpts)) + +#define CRYSTFEL_IS_INDEXING_OPTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), \ + CRYSTFEL_TYPE_INDEXING_OPTS)) + +#define CRYSTFEL_INDEXING_OPTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((obj), \ + CRYSTFEL_TYPE_INDEXING_OPTS, CrystFELIndexingOpts)) + +#define CRYSTFEL_IS_INDEXING_OPTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((obj), \ + CRYSTFEL_TYPE_INDEXING_OPTS)) + +#define CRYSTFEL_INDEXING_OPTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), \ + CRYSTFEL_TYPE_INDEXING_OPTS, CrystFELIndexingOpts)) + +struct _crystfelindexingopts +{ + GtkNotebook parent_instance; + + /*< private >*/ + int dummy; +}; + +struct _crystfelindexingoptsclass +{ + GtkNotebookClass parent_class; + int dummy; +}; + +typedef struct _crystfelindexingopts CrystFELIndexingOpts; +typedef struct _crystfelindexingoptsclass CrystFELIndexingOptsClass; + +extern GType crystfel_indexing_opts_get_type(void); +extern GtkWidget *crystfel_indexing_opts_new(void); + +#endif /* CRYSTFELINDEXINGOPTS_H */ diff --git a/src/gui_index.c b/src/gui_index.c index e42a9aae..fff453ba 100644 --- a/src/gui_index.c +++ b/src/gui_index.c @@ -44,8 +44,9 @@ #include "crystfel_gui.h" #include "crystfelimageview.h" +#include "crystfelindexingopts.h" -static void cell_explorer_sig(struct crystfelproject *proj) +void cell_explorer_sig(struct crystfelproject *proj) { GSubprocess *sp; GError *error = NULL; @@ -63,43 +64,102 @@ static void cell_explorer_sig(struct crystfelproject *proj) } -static void unitcell_response_sig(GtkWidget *dialog, gint resp, - struct crystfelproject *proj) +static void index_all_response_sig(GtkWidget *dialog, gint resp, + struct crystfelproject *proj) { - const char *algo; - - algo = gtk_combo_box_get_active_id(GTK_COMBO_BOX(proj->unitcell_combo)); + if ( resp == GTK_RESPONSE_OK ) { + STATUS("OK!\n"); + } gtk_widget_destroy(dialog); - if ( resp != GTK_RESPONSE_OK ) { - proj->unitcell_combo = NULL; - return; - } +} - if ( proj->backend->run_unitcell(proj, algo) == 0 ) { - proj->unitcell_combo = NULL; +static GtkWidget *make_backend_opts(struct crystfelproject *proj) +{ + GtkWidget *box; + GtkWidget *hbox; + GtkWidget *label; + GtkWidget *combo; - create_infobar(proj, - "Indexing (determine unit cell parameters)", - "Show cell histograms", cell_explorer_sig); + box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 8); + gtk_container_set_border_width(GTK_CONTAINER(box), 8); - } + hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 8); + gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(hbox), + FALSE, FALSE, 0); + label = gtk_label_new("Batch system:"); + gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(label), + FALSE, FALSE, 0); + combo = gtk_combo_box_text_new(); + gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(combo), + FALSE, FALSE, 0); + gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(combo), "local", + "Local (run on this computer)"); + gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(combo), "slurm", + "SLURM"); + + return box; } -gint unitcell_sig(GtkWidget *widget, struct crystfelproject *proj) +gint index_all_sig(GtkWidget *widget, struct crystfelproject *proj) { GtkWidget *dialog; GtkWidget *content_area; GtkWidget *vbox; - GtkWidget *hbox; - GtkWidget *label; - GtkWidget *combo; + GtkWidget *indexing_opts; + + dialog = gtk_dialog_new_with_buttons("Index all frames", + GTK_WINDOW(proj->window), + GTK_DIALOG_DESTROY_WITH_PARENT, + "Cancel", GTK_RESPONSE_CANCEL, + "Run", GTK_RESPONSE_OK, + NULL); - if ( proj->unitcell_combo != NULL ) return FALSE; + g_signal_connect(G_OBJECT(dialog), "response", + G_CALLBACK(index_all_response_sig), proj); - dialog = gtk_dialog_new_with_buttons("Determine unit cell", + vbox = gtk_vbox_new(FALSE, 0.0); + content_area = gtk_dialog_get_content_area(GTK_DIALOG(dialog)); + gtk_container_add(GTK_CONTAINER(content_area), vbox); + gtk_container_set_border_width(GTK_CONTAINER(content_area), 8); + + indexing_opts = crystfel_indexing_opts_new(); + gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(indexing_opts), + FALSE, FALSE, 8.0); + + gtk_notebook_append_page(GTK_NOTEBOOK(indexing_opts), + make_backend_opts(proj), + gtk_label_new("Cluster/batch system")); + + gtk_dialog_set_default_response(GTK_DIALOG(dialog), + GTK_RESPONSE_OK); + gtk_widget_show_all(dialog); + + return FALSE; +} + + +static void index_one_response_sig(GtkWidget *dialog, gint resp, + struct crystfelproject *proj) +{ + if ( resp == GTK_RESPONSE_OK ) { + STATUS("OK!\n"); + } + + gtk_widget_destroy(dialog); +} + + +gint index_one_sig(GtkWidget *widget, struct crystfelproject *proj) +{ + GtkWidget *dialog; + GtkWidget *content_area; + GtkWidget *vbox; + GtkWidget *indexing_opts; + + dialog = gtk_dialog_new_with_buttons("Index one frame", GTK_WINDOW(proj->window), GTK_DIALOG_DESTROY_WITH_PARENT, "Cancel", GTK_RESPONSE_CANCEL, @@ -107,39 +167,19 @@ gint unitcell_sig(GtkWidget *widget, struct crystfelproject *proj) NULL); g_signal_connect(G_OBJECT(dialog), "response", - G_CALLBACK(unitcell_response_sig), proj); + G_CALLBACK(index_one_response_sig), proj); vbox = gtk_vbox_new(FALSE, 0.0); content_area = gtk_dialog_get_content_area(GTK_DIALOG(dialog)); gtk_container_add(GTK_CONTAINER(content_area), vbox); gtk_container_set_border_width(GTK_CONTAINER(content_area), 8); - proj->peak_vbox = vbox; - hbox = gtk_hbox_new(FALSE, 0.0); - gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(hbox), FALSE, FALSE, 8.0); - label = gtk_label_new("Unit cell determination algorithm"); - gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); - gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(label), FALSE, FALSE, 2.0); - combo = gtk_combo_box_text_new(); - gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(combo), TRUE, TRUE, 2.0); - gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(combo), - "mosflm-nocell-nolatt", - "MOSFLM"); - gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(combo), - "dirax", - "DirAx"); - gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(combo), - "asdf-nocell", - "ASDF"); - gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(combo), - "xds-nocell-nolatt", - "xds"); - gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(combo), - "xgandalf-nocell", - "XGANDALF"); - gtk_combo_box_set_active(GTK_COMBO_BOX(combo), 0); - proj->unitcell_combo = combo; + indexing_opts = crystfel_indexing_opts_new(); + gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(indexing_opts), + FALSE, FALSE, 8.0); + gtk_dialog_set_default_response(GTK_DIALOG(dialog), + GTK_RESPONSE_OK); gtk_widget_show_all(dialog); return FALSE; diff --git a/src/gui_index.h b/src/gui_index.h index de228725..474e7c0b 100644 --- a/src/gui_index.h +++ b/src/gui_index.h @@ -33,7 +33,12 @@ #include "crystfel_gui.h" -extern gint unitcell_sig(GtkWidget *widget, - struct crystfelproject *proj); +extern gint index_one_sig(GtkWidget *widget, + struct crystfelproject *proj); + +extern gint index_all_sig(GtkWidget *widget, + struct crystfelproject *proj); + +extern void cell_explorer_sig(struct crystfelproject *proj); #endif diff --git a/src/gui_project.c b/src/gui_project.c index ca550795..c8868486 100644 --- a/src/gui_project.c +++ b/src/gui_project.c @@ -416,7 +416,6 @@ void default_project(struct crystfelproject *proj) proj->filenames = NULL; proj->events = NULL; proj->peak_params = NULL; - proj->unitcell_combo = NULL; proj->info_bar = NULL; proj->backend_private = NULL; proj->data_top_folder = NULL; diff --git a/src/gui_project.h b/src/gui_project.h index 33f1271b..bd4904fd 100644 --- a/src/gui_project.h +++ b/src/gui_project.h @@ -104,8 +104,6 @@ struct crystfelproject { GtkWidget *peak_params; /* Peak search parameter widgets */ struct peak_params original_params; - GtkWidget *unitcell_combo; - GtkWidget *info_bar; void (*infobar_callback)(struct crystfelproject *proj); GtkWidget *progressbar; |