aboutsummaryrefslogtreecommitdiff
path: root/src/displaywindow.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/displaywindow.c')
-rw-r--r--src/displaywindow.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/displaywindow.c b/src/displaywindow.c
index 0eed64c..25a48a4 100644
--- a/src/displaywindow.c
+++ b/src/displaywindow.c
@@ -948,6 +948,10 @@ static void displaywindow_dirax_stop(GtkWidget *widget, DisplayWindow *dw) {
dirax_stop(dw->ctx);
}
+static void displaywindow_dirax_rerun(GtkWidget *widget, DisplayWindow *dw) {
+ dirax_rerun(dw->ctx);
+}
+
static void displaywindow_addui_callback(GtkUIManager *ui, GtkWidget *widget, GtkContainer *container) {
gtk_box_pack_start(GTK_BOX(container), widget, FALSE, FALSE, 0);
@@ -1105,7 +1109,8 @@ static void displaywindow_addmenubar(DisplayWindow *dw) {
{ "ToolsAction", NULL, "_Tools", NULL, NULL, NULL },
{ "DirAxAction", GTK_STOCK_EXECUTE, "Start _DirAx", "<Ctrl>D", NULL, G_CALLBACK(displaywindow_dirax) },
- { "StopDirAxAction", GTK_STOCK_CLOSE, "Stop DirAx", NULL, NULL, G_CALLBACK(displaywindow_dirax_stop) },
+ { "DirAxReRunAction", NULL, "Run another DirAx cycle", NULL, NULL, G_CALLBACK(displaywindow_dirax_rerun) },
+ { "StopDirAxAction", NULL, "Stop DirAx", NULL, NULL, G_CALLBACK(displaywindow_dirax_stop) },
{ "ReprojectAction", NULL, "_Reproject Diffraction Patterns", NULL, NULL, G_CALLBACK(displaywindow_reproject) },
{ "RefineAction", GTK_STOCK_EXECUTE, "Refine Reconstruction", NULL, NULL, G_CALLBACK(displaywindow_refine) },
{ "SetAxisAction", NULL, "Set Tilt Axis Position", NULL, NULL, G_CALLBACK(displaywindow_setaxis) },
@@ -1227,16 +1232,20 @@ void displaywindow_update_dirax(ControlContext *ctx, DisplayWindow *dw) {
GtkWidget *start;
GtkWidget *stop;
+ GtkWidget *rerun;
start = gtk_ui_manager_get_widget(dw->ui, "/ui/displaywindow/tools/dirax");
stop = gtk_ui_manager_get_widget(dw->ui, "/ui/displaywindow/tools/diraxstop");
+ rerun = gtk_ui_manager_get_widget(dw->ui, "/ui/displaywindow/tools/diraxrerun");
if ( ctx->dirax ) {
gtk_widget_set_sensitive(GTK_WIDGET(start), FALSE);
gtk_widget_set_sensitive(GTK_WIDGET(stop), TRUE);
+ gtk_widget_set_sensitive(GTK_WIDGET(rerun), TRUE);
} else {
gtk_widget_set_sensitive(GTK_WIDGET(start), TRUE);
gtk_widget_set_sensitive(GTK_WIDGET(stop), FALSE);
+ gtk_widget_set_sensitive(GTK_WIDGET(rerun), FALSE);
}
}