diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/crystfel_gui.c | 42 |
1 files changed, 18 insertions, 24 deletions
diff --git a/src/crystfel_gui.c b/src/crystfel_gui.c index 6268d64c..165ed666 100644 --- a/src/crystfel_gui.c +++ b/src/crystfel_gui.c @@ -887,8 +887,8 @@ int main(int argc, char *argv[]) GtkWidget *results_toolbar; GtkWidget *button; GtkWidget *label; - GtkWidget *w; int load_result; + GtkAction *act; /* Long options */ const struct option longopts[] = { @@ -1082,7 +1082,6 @@ int main(int argc, char *argv[]) if ( load_result == 0 ) { DataTemplate *dtempl; - GtkAction *act; proj.cur_frame = 0; if ( proj.geom_filename != NULL ) { @@ -1093,33 +1092,28 @@ int main(int argc, char *argv[]) } } - act = gtk_ui_manager_get_action(proj.ui, "/mainwindow/view/centre"); - gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(act), - proj.show_centre); + update_imageview(&proj); + } - act = gtk_ui_manager_get_action(proj.ui, "/mainwindow/view/peaks"); - gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(act), - proj.show_peaks); + act = gtk_ui_manager_get_action(proj.ui, "/mainwindow/view/centre"); + gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(act), + proj.show_centre); - act = gtk_ui_manager_get_action(proj.ui, "/mainwindow/view/refls"); - gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(act), - proj.show_refls); + act = gtk_ui_manager_get_action(proj.ui, "/mainwindow/view/peaks"); + gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(act), + proj.show_peaks); - act = gtk_ui_manager_get_action(proj.ui, "/mainwindow/view/labelrefls"); - gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(act), - proj.label_refls); + act = gtk_ui_manager_get_action(proj.ui, "/mainwindow/view/refls"); + gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(act), + proj.show_refls); - update_imageview(&proj); - } + act = gtk_ui_manager_get_action(proj.ui, "/mainwindow/view/labelrefls"); + gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(act), + proj.label_refls); - w = gtk_ui_manager_get_widget(proj.ui, "/ui/mainwindow/view/centre"); - gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(w), proj.show_centre); - w = gtk_ui_manager_get_widget(proj.ui, "/ui/mainwindow/view/peaks"); - gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(w), proj.show_peaks); - w = gtk_ui_manager_get_widget(proj.ui, "/ui/mainwindow/view/refls"); - gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(w), proj.show_refls); - w = gtk_ui_manager_get_widget(proj.ui, "/ui/mainwindow/view/labelrefls"); - gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(w), proj.label_refls); + act = gtk_ui_manager_get_action(proj.ui, "/mainwindow/tools/rescanonchange"); + gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(act), + proj.rescan_on_change); gtk_window_set_default_size(GTK_WINDOW(proj.window), 1024, 768); gtk_paned_set_position(GTK_PANED(hpaned), 172); |