aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authortaw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1>2007-08-28 16:07:32 +0000
committertaw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1>2007-08-28 16:07:32 +0000
commit85b8978beedd0142560573a92442a5ed907b0ed2 (patch)
treea5fb149aa94b540a568ac6c7b2831a8065e53959 /src/main.c
parent49ad910255546917c22a1d0ef01b4109c7772b16 (diff)
Be a lot more clear about which things are properties of images and which
belong to the control context. git-svn-id: svn://cook.msm.cam.ac.uk:745/diff-tomo/dtr@81 bf6ca9ba-c028-0410-8290-897cf20841d1
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 5df4bcf..125909b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -60,6 +60,12 @@ static gint main_method_window_response(GtkWidget *method_window, gint response,
ctx->prealign = FALSE;
}
+ if ( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(ctx->checkbox_savecache)) ) {
+ ctx->savecache = TRUE;
+ } else {
+ ctx->savecache = FALSE;
+ }
+
gtk_widget_destroy(method_window);
while ( gtk_events_pending() ) gtk_main_iteration();
@@ -81,7 +87,7 @@ static gint main_method_window_response(GtkWidget *method_window, gint response,
mapping_create(ctx);
}
- if ( (ctx->inputfiletype != INPUT_CACHE) && !val && (ctx->reflectionctx) ) {
+ if ( (ctx->inputfiletype != INPUT_CACHE) && !val && ctx->reflectionctx && ctx->savecache ) {
cache_save(ctx->filename, ctx->reflectionctx);
}
@@ -149,6 +155,9 @@ void main_method_dialog_open(ControlContext *ctx) {
ctx->checkbox_prealign = gtk_check_button_new_with_label("Pre-align image stack");
gtk_table_attach_defaults(GTK_TABLE(table), ctx->checkbox_prealign, 1, 3, 3, 4);
+ ctx->checkbox_savecache = gtk_check_button_new_with_label("Save 3D mapping cache file");
+ gtk_table_attach_defaults(GTK_TABLE(table), ctx->checkbox_savecache, 1, 3, 4, 5);
+
if ( ctx->inputfiletype == INPUT_CACHE ) {
gtk_combo_box_append_text(GTK_COMBO_BOX(ctx->combo_peaksearch), "Get from cache file");
gtk_widget_set_sensitive(GTK_WIDGET(ctx->combo_peaksearch), FALSE);