diff options
author | Thomas White <taw@physics.org> | 2014-08-18 13:54:37 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2014-08-18 14:38:50 +0200 |
commit | 30e5adcee376d20ae9cc622d2cf3675b3fac3c5b (patch) | |
tree | 49c2682296fa55878432123f8cf8c8004dc1bbf3 | |
parent | 293221385fc367f2584d4cea2ee590c607d0ea3e (diff) |
hdfsee: Disable calibration mode option when appropriate
-rw-r--r-- | src/dw-hdfsee.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/dw-hdfsee.c b/src/dw-hdfsee.c index 20ef2e04..d59c6784 100644 --- a/src/dw-hdfsee.c +++ b/src/dw-hdfsee.c @@ -1143,6 +1143,10 @@ static int load_geometry_file(DisplayWindow *dw, struct image *image, gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(w), TRUE); dw->use_geom = 1; + w = gtk_ui_manager_get_widget(dw->ui, + "/ui/displaywindow/tools/calibmode"); + gtk_widget_set_sensitive(GTK_WIDGET(w), TRUE); + return 0; } @@ -1822,10 +1826,15 @@ static gint displaywindow_newhdf(GtkMenuItem *item, struct newhdf *nh) w = gtk_ui_manager_get_widget(nh->dw->ui, "/ui/displaywindow/view/usegeom"); gtk_widget_set_sensitive(GTK_WIDGET(w), FALSE); + gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(w), FALSE); nh->dw->use_geom = 0; nh->dw->image->det = nh->dw->simple_geom; + w = gtk_ui_manager_get_widget(nh->dw->ui, + "/ui/displaywindow/tools/calibmode"); + gtk_widget_set_sensitive(GTK_WIDGET(w), FALSE); + } if ( nh->dw->use_geom ) { @@ -2556,6 +2565,10 @@ DisplayWindow *displaywindow_open(const char *filename, const char *peaks, if ( dw->use_geom ) { dw->calib_mode = calibmode; + } else { + w = gtk_ui_manager_get_widget(dw->ui, + "/ui/displaywindow/tools/calibmode"); + gtk_widget_set_sensitive(GTK_WIDGET(w), FALSE); } if ( dw->calib_mode ) { |