bugrepair VFS, update autotools files
[gpiv.git] / src / preferences.c
blob0e6461809cbc4beddedebded19451e1fb6506f2c
1 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 c-style: "K&R" -*- */
3 /*----------------------------------------------------------------------
5 gpiv - Graphic program for Particle Image Velocimetry, based on gtk/gnome
6 libraries.
8 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
9 Gerber van der Graaf
11 This file is part of gpiv.
13 Gpiv is free software; you can redistribute it and/or modify
14 it under the terms of the GNU General Public License as published by
15 the Free Software Foundation; either version 2, or (at your option)
16 any later version.
18 This program is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
23 You should have received a copy of the GNU General Public License
24 along with this program; if not, write to the Free Software Foundation,
25 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 ----------------------------------------------------------------------*/
30 * $Log: preferences.c,v $
31 * Revision 1.18 2008-10-09 14:43:37 gerber
32 * paralellized with OMP and MPI
34 * Revision 1.17 2008-04-28 12:00:58 gerber
35 * hdf-formatted files are now with .hdf extension (previously: .gpi)
37 * Revision 1.16 2007-12-19 08:42:35 gerber
38 * debugged
40 * Revision 1.15 2007-11-23 16:24:08 gerber
41 * release 0.5.0: Kafka
43 * Revision 1.14 2007-03-22 16:00:32 gerber
44 * Added image processing tabulator
46 * Revision 1.13 2007/02/05 15:17:09 gerber
47 * auto stretching, broadcast display settings to buffers from preferences
49 * Revision 1.12 2007-01-29 11:27:44 gerber
50 * added image formats png, gif, tif png, bmp, improved buffer display
52 * Revision 1.11 2006-09-18 07:27:06 gerber
53 * *** empty log message ***
55 * Revision 1.10 2006/01/31 14:28:13 gerber
56 * version 0.3.0
58 * Revision 1.8 2005/01/19 15:53:42 gerber
59 * Initiation of Data Acquisition (DAC); trigerring of lasers and camera
60 * by using RTAI and Realtime Linux, recording images from IEEE1394
61 * (Firewire) IIDC compliant camera's
63 * Revision 1.7 2004/10/15 19:24:05 gerber
64 * GPIV_ and Gpiv prefix to defines and structure names of libgpiv
66 * Revision 1.6 2004/06/14 21:19:23 gerber
67 * Image depth up to 16 bits.
68 * Improvement "single int" and "drag int" in Eval tab.
69 * Viewer's pop-up menu.
70 * Adaption for gpiv_matrix_* and gpiv_vector_*.
71 * Resizing console.
72 * See Changelog for further info.
74 * Revision 1.5 2003/09/01 11:17:15 gerber
75 * improved monitoring of interrogation process
77 * Revision 1.4 2003/08/22 15:24:52 gerber
78 * interactive spatial scaling
80 * Revision 1.3 2003/07/25 15:40:24 gerber
81 * removed/disabled setting of correlation in Eval tab, Correlation type in Image info tab
83 * Revision 1.2 2003/06/27 13:47:26 gerber
84 * display ruler, line/point evaluation
86 * Revision 1.1.1.1 2003/06/17 17:10:52 gerber
87 * Imported gpiv
91 #ifdef HAVE_CONFIG_H
92 # include <config.h>
93 #endif /* HAVE_CONFIG_H */
94 #include "support.h"
96 #include "gpiv_gui.h"
97 #include "utils.h"
98 #include "preferences.h"
99 #include "preferences_interface.h"
102 static void
103 apply_gpivpar_console (GpivConsole * gpiv);
105 static void
106 apply_gpivpar_display ();
109 void
110 on_checkbutton_gpivbuttons_activate(GtkWidget *widget,
111 gpointer data
113 /*-----------------------------------------------------------------------------
116 if (GTK_TOGGLE_BUTTON(widget)->active) {
117 default_par->console__view_gpivbuttons = 1;
118 } else {
119 default_par->console__view_gpivbuttons = 0;
125 void
126 on_checkbutton_tab_activate(GtkWidget *widget,
127 gpointer data
129 /*-----------------------------------------------------------------------------
132 if (GTK_TOGGLE_BUTTON(widget)->active) {
133 default_par->console__view_tabulator = 1;
134 } else {
135 default_par->console__view_tabulator = 0;
141 void
142 on_checkbutton_hdf_activate(GtkWidget *widget,
143 gpointer data
145 /*-----------------------------------------------------------------------------
148 if (GTK_TOGGLE_BUTTON(widget)->active) {
149 default_par->hdf = 1;
150 } else {
151 default_par->hdf = 0;
157 void
158 on_radiobutton_datafmt(GtkWidget *widget,
159 gpointer data
161 /*-----------------------------------------------------------------------------
164 gint select = atoi(gtk_object_get_data(GTK_OBJECT(widget),
165 "data_format"));
166 default_par->hdf = select;
167 if (gpiv_par->verbose) g_message("on_radiobutton_datafmt:: %d", default_par->hdf);
172 void
173 on_radiobutton_imgfmt(GtkWidget *widget,
174 gpointer data
176 /*-----------------------------------------------------------------------------
179 gint fmt_select = atoi(gtk_object_get_data(GTK_OBJECT(widget),
180 "image_format"));
181 gpiv_par->img_fmt = fmt_select;
183 if (fmt_select == IMG_FMT_PNG) {
184 if (gpiv_par->verbose) g_message("on_radiobutton_imgfmt:: img_fmt = IMG_FMT_PNG");
185 } else if (fmt_select == IMG_FMT_HDF) {
186 if (gpiv_par->verbose) g_message("on_radiobutton_imgfmt:: img_fmt = IMG_FMT_HDF");
187 } else if (fmt_select == IMG_FMT_RAW) {
188 if (gpiv_par->verbose) g_message("on_radiobutton_imgfmt:: img_fmt = IMG_FMT_RAW");
189 } else {
190 g_message("INVALID IMG_FMT");
196 void
197 on_checkbutton_xcorr_activate(GtkWidget *widget,
198 gpointer data
200 /*-----------------------------------------------------------------------------
203 if (GTK_TOGGLE_BUTTON(widget)->active) {
204 default_par->x_corr = 1;
205 } else {
206 default_par->x_corr = 0;
212 void
213 on_checkbutton_tooltips_activate(GtkWidget *widget,
214 gpointer data
216 /*-----------------------------------------------------------------------------
219 if (GTK_TOGGLE_BUTTON(widget)->active) {
220 default_par->console__show_tooltips = 1;
221 } else {
222 default_par->console__show_tooltips = 0;
228 #ifdef ENABLE_CAM
229 void
230 on_checkbutton_process_cam_activate(GtkWidget *widget,
231 gpointer data
233 /*-----------------------------------------------------------------------------
236 if (GTK_TOGGLE_BUTTON(widget)->active) {
237 default_par->process__cam = TRUE;
238 } else {
239 default_par->process__cam = FALSE;
242 #endif /* ENABLE_CAM */
245 #ifdef ENABLE_TRIG
246 void
247 on_checkbutton_process_trig_activate(GtkWidget *widget,
248 gpointer data
250 /*-----------------------------------------------------------------------------
253 if (GTK_TOGGLE_BUTTON(widget)->active) {
254 default_par->process__trig = TRUE;
255 } else {
256 default_par->process__trig = FALSE;
259 #endif /* ENABLE_TRIG */
262 #ifdef ENABLE_IMGPROC
263 void
264 on_checkbutton_process_imgproc_activate(GtkWidget *widget,
265 gpointer data
267 /*-----------------------------------------------------------------------------
270 if (GTK_TOGGLE_BUTTON(widget)->active) {
271 default_par->process__imgproc = TRUE;
272 } else {
273 default_par->process__imgproc = FALSE;
276 #endif /* ENABLE_IMGPROC */
279 void
280 on_checkbutton_process_piv_activate(GtkWidget *widget,
281 gpointer data
283 /*-----------------------------------------------------------------------------
286 if (GTK_TOGGLE_BUTTON(widget)->active) {
287 default_par->process__piv = TRUE;
288 } else {
289 default_par->process__piv = FALSE;
295 void
296 on_checkbutton_process_gradient_activate(GtkWidget *widget,
297 gpointer data
299 /*-----------------------------------------------------------------------------
302 if (GTK_TOGGLE_BUTTON(widget)->active) {
303 default_par->process__gradient = TRUE;
304 } else {
305 default_par->process__gradient = FALSE;
311 void
312 on_checkbutton_process_resstats_activate(GtkWidget *widget,
313 gpointer data
315 /*-----------------------------------------------------------------------------
318 if (GTK_TOGGLE_BUTTON(widget)->active) {
319 default_par->process__resstats = TRUE;
320 } else {
321 default_par->process__resstats = FALSE;
327 void
328 on_checkbutton_process_errvec_activate(GtkWidget *widget,
329 gpointer data
331 /*-----------------------------------------------------------------------------
334 if (GTK_TOGGLE_BUTTON(widget)->active) {
335 default_par->process__errvec = TRUE;
336 } else {
337 default_par->process__errvec = FALSE;
343 void
344 on_checkbutton_process_peaklck_activate(GtkWidget *widget,
345 gpointer data
347 /*-----------------------------------------------------------------------------
350 if (GTK_TOGGLE_BUTTON(widget)->active) {
351 default_par->process__peaklock = TRUE;
352 } else {
353 default_par->process__peaklock = FALSE;
359 void
360 on_checkbutton_process_subtract_activate(GtkWidget *widget,
361 gpointer data
363 /*-----------------------------------------------------------------------------
366 if (GTK_TOGGLE_BUTTON(widget)->active) {
367 default_par->process__subtract = TRUE;
368 } else {
369 default_par->process__subtract = FALSE;
375 void
376 on_checkbutton_process_scale_activate(GtkWidget *widget,
377 gpointer data
379 /*-----------------------------------------------------------------------------
382 if (GTK_TOGGLE_BUTTON(widget)->active) {
383 default_par->process__scale = TRUE;
384 } else {
385 default_par->process__scale = FALSE;
391 void
392 on_checkbutton_process_avg_activate(GtkWidget *widget,
393 gpointer data
395 /*-----------------------------------------------------------------------------
398 if (GTK_TOGGLE_BUTTON(widget)->active) {
399 default_par->process__average = TRUE;
400 } else {
401 default_par->process__average = FALSE;
407 void
408 on_checkbutton_process_vorstra_activate(GtkWidget *widget,
409 gpointer data
411 /*-----------------------------------------------------------------------------
414 if (GTK_TOGGLE_BUTTON(widget)->active) {
415 default_par->process__vorstra = TRUE;
416 } else {
417 default_par->process__vorstra = FALSE;
423 void
424 on_spinbutton_bins_activate(GtkWidget *widget,
425 gpointer data
427 /*-----------------------------------------------------------------------------
433 #ifdef ENABLE_MPI
434 void
435 on_spinbutton_nodes(GtkSpinButton *widget,
436 GtkWidget *entry
438 /*-----------------------------------------------------------------------------
441 default_par->mpi_nodes = gtk_spin_button_get_value_as_int (widget);
443 #endif
446 void
447 on_radiobutton_display_vecscale(GtkWidget *widget,
448 gpointer data
450 /*-----------------------------------------------------------------------------
453 default_par->display__vector_scale =
454 atoi(gtk_object_get_data(GTK_OBJECT(widget),
455 "vscale"));
460 void
461 on_radiobutton_display_veccolor(GtkWidget *widget,
462 gpointer data
464 /*-----------------------------------------------------------------------------
467 default_par->display__vector_color =
468 atoi(gtk_object_get_data(GTK_OBJECT(widget),
469 "vcolor"));
474 void
475 on_radiobutton_display_zoomscale(GtkWidget *widget,
476 gpointer data
478 /*-----------------------------------------------------------------------------
481 default_par->display__zoom_index =
482 atoi(gtk_object_get_data(GTK_OBJECT(widget),
483 "zscale"));
488 void
489 on_radiobutton_display_background(GtkWidget *widget,
490 gpointer data
492 /*-----------------------------------------------------------------------------
495 default_par->display__backgrnd =
496 atoi (gtk_object_get_data (GTK_OBJECT (widget), "bgcolor"));
497 if (gpiv_par->verbose) g_message ("on_radiobutton_display_background:: display__backgrnd = %d",
498 default_par->display__backgrnd);
503 void
504 on_checkbutton_display_display_intregs(GtkWidget *widget,
505 gpointer data
507 /*-----------------------------------------------------------------------------
511 if (GTK_TOGGLE_BUTTON(widget)->active) {
512 default_par->display__intregs = TRUE;
513 } else {
514 default_par->display__intregs = FALSE;
520 void
521 on_checkbutton_display_display_piv(GtkWidget *widget,
522 gpointer data
524 /*-----------------------------------------------------------------------------
527 if (GTK_TOGGLE_BUTTON(widget)->active) {
528 default_par->display__piv = TRUE;
529 } else {
530 default_par->display__piv = FALSE;
536 void
537 on_radiobutton_display_scalar(GtkWidget *widget,
538 gpointer data
540 /*-----------------------------------------------------------------------------
543 default_par->display__scalar =
544 atoi (gtk_object_get_data (GTK_OBJECT (widget), "scalar"));
545 if (gpiv_par->verbose) g_message ("on_radiobutton_display_scalar:: display__scalar = %d",
546 default_par->display__scalar);
551 void
552 on_checkbutton_display_view_menubar_activate (GtkWidget *widget,
553 gpointer data
555 /*-----------------------------------------------------------------------------
558 if (GTK_TOGGLE_BUTTON(widget)->active) {
559 default_par->display__view_menubar = 1;
560 } else {
561 default_par->display__view_menubar = 0;
567 void
568 on_checkbutton_display_view_rulers_activate (GtkWidget *widget,
569 gpointer data
571 /*-----------------------------------------------------------------------------
574 if (GTK_TOGGLE_BUTTON(widget)->active) {
575 default_par->display__view_rulers = 1;
576 } else {
577 default_par->display__view_rulers = 0;
583 void
584 on_checkbutton_display_stretch_auto_activate (GtkWidget *widget,
585 gpointer data
587 /*-----------------------------------------------------------------------------
590 if (GTK_TOGGLE_BUTTON(widget)->active) {
591 default_par->display__stretch_auto = TRUE;
592 } else {
593 default_par->display__stretch_auto = FALSE;
599 void
600 on_preferences_response(GtkDialog *dialog,
601 gint response,
602 gpointer data
604 /*-----------------------------------------------------------------------------
607 GpivConsole *gpiv = gtk_object_get_data(GTK_OBJECT(dialog), "gpiv");
608 Pref *pref = gtk_object_get_data(GTK_OBJECT(dialog), "pref");
609 g_assert( response == GTK_RESPONSE_OK
610 || response == GTK_RESPONSE_APPLY
611 || response == GTK_RESPONSE_CANCEL);
613 switch (response) {
614 case GTK_RESPONSE_OK:
615 apply_gpivpar(gpiv);
616 store_defaultpar();
617 gtk_widget_destroy(GTK_WIDGET (dialog));
618 break;
620 case GTK_RESPONSE_APPLY:
621 apply_gpivpar(gpiv);
622 break;
624 case GTK_RESPONSE_CANCEL:
625 gtk_widget_destroy(GTK_WIDGET (dialog));
626 break;
628 default:
629 g_warning("on_preferences_response: should not arrive here");
630 break;
637 void
638 apply_gpivpar (GpivConsole * gpiv)
639 /* ----------------------------------------------------------------------------
640 * Updates actual parameters
643 gint i;
645 apply_gpivpar_console(gpiv);
647 for (i = 0; i < nbufs; i++) {
648 display_act = display[i];
649 if (display_act != NULL) {
650 if (gpiv_par->verbose) g_message("apply_gpivpar:: ibuf = %d apply_gpivpar_display", i);
651 apply_gpivpar_display ();
656 static void
657 apply_gpivpar_console(GpivConsole *gpiv)
658 /* ----------------------------------------------------------------------------
659 * Updates actual parameters for the console
662 GtkWidget *settings_menu_gpiv0 =
663 gtk_object_get_data (GTK_OBJECT (gpiv->console), "settings_menu_gpiv0");
664 GtkWidget *settings_menu_gpiv1 =
665 gtk_object_get_data (GTK_OBJECT (gpiv->console), "settings_menu_gpiv1");
666 GtkWidget *help_menu_gpiv0 =
667 gtk_object_get_data (GTK_OBJECT (gpiv->console), "help_menu_gpiv0");
668 GtkWidget *help_menu_gpiv_popup0 =
669 gtk_object_get_data (GTK_OBJECT (gpiv->console), "help_menu_gpiv_popup0");
672 parameters_set(gpiv_par, FALSE);
673 cp_undef_parameters(default_par, gpiv_par);
676 if (default_par->console__view_gpivbuttons == 1) {
677 gtk_widget_show(gpiv->handlebox1);
678 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM
679 (settings_menu_gpiv0), TRUE);
680 } else {
681 gtk_widget_hide(gpiv->handlebox1);
682 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM
683 (settings_menu_gpiv0), FALSE);
686 if (default_par->console__view_tabulator == 1) {
687 gtk_widget_show(gpiv->notebook);
688 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM
689 (settings_menu_gpiv1), TRUE);
690 } else {
691 gtk_widget_hide(gpiv->notebook);
692 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM
693 (settings_menu_gpiv1), FALSE);
696 if (default_par->console__show_tooltips == 1) {
697 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM
698 (help_menu_gpiv0), TRUE);
699 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM
700 (help_menu_gpiv_popup0), TRUE);
701 } else {
702 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM
703 (help_menu_gpiv0), FALSE);
704 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM
705 (help_menu_gpiv_popup0), FALSE);
708 gtk_spin_button_set_value(GTK_SPIN_BUTTON
709 (gpiv->pivvalid->spinbutton_histo_bins),
710 default_par->console__nbins);
715 #ifdef ENABLE_CAM
716 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
717 (gpiv->button_toolbar_cam),
718 default_par->process__cam);
719 #endif /* ENABLE_CAM */
721 #ifdef ENABLE_TRIG
722 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
723 (gpiv->button_toolbar_trig),
724 default_par->process__trig);
725 #endif /* ENABLE_TRIG */
727 #ifdef ENABLE_IMGPROC
728 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
729 (gpiv->button_toolbar_imgproc),
730 default_par->process__imgproc);
731 #endif /* ENABLE_IMGPROC */
733 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
734 (gpiv->button_toolbar_piv),
735 default_par->process__piv);
737 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
738 (gpiv->button_toolbar_gradient),
739 default_par->process__gradient);
741 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
742 (gpiv->button_toolbar_resstats),
743 default_par->process__resstats);
745 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
746 (gpiv->button_toolbar_errvec),
747 default_par->process__errvec);
749 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
750 (gpiv->button_toolbar_peaklock),
751 default_par->process__peaklock);
753 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
754 (gpiv->button_toolbar_scale),
755 default_par->process__scale);
757 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
758 (gpiv->button_toolbar_average),
759 default_par->process__average);
761 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
762 (gpiv->button_toolbar_subavg),
763 default_par->process__subtract);
765 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
766 (gpiv->button_toolbar_vorstra),
767 default_par->process__vorstra);
772 static void
773 apply_gpivpar_display (void)
774 /* ----------------------------------------------------------------------------
775 * Updates actual parameters for the actual display
778 GtkWidget *view_menubar_popup_menu =
779 gtk_object_get_data(GTK_OBJECT(display_act->mwin),
780 "view_menubar_popup_menu");
781 GtkWidget *view_rulers_popup_menu =
782 gtk_object_get_data(GTK_OBJECT(display_act->mwin),
783 "view_rulers_popup_menu");
785 GtkWidget *stretch_auto_popup_menu =
786 gtk_object_get_data(GTK_OBJECT(display_act->mwin),
787 "stretch_auto_popup_menu");
791 /* for (i = 0; i < nbufs; i++) { */
792 /* display_act = display[i]; */
793 /* if (display_act != NULL) { */
794 if (display_act->pida->exist_piv
795 && display_act->display_piv) {
796 update_all_vectors(display_act->pida);
800 if (display_act->display_intregs) {
801 if (default_par->display__intregs == 1) {
802 create_all_intregs2(display_act);
803 create_all_intregs1(display_act);
804 } else {
805 hide_all_intregs1(display_act);
806 hide_all_intregs2(display_act);
811 if (display_act->pida->exist_piv) {
812 if (default_par->display__piv) {
813 create_all_vectors(display_act->pida);
814 } else {
815 hide_all_vectors(display_act->pida);
820 if (display_act->pida->exist_vor) {
821 if (default_par->display__scalar == SHOW_SC_VORTICITY) {
822 create_all_scalars (display_act, GPIV_VORTICITY);
823 } else {
824 hide_all_scalars (display_act, GPIV_VORTICITY);
829 if (display_act->pida->exist_sstrain) {
830 if (default_par->display__scalar == SHOW_SC_SSTRAIN) {
831 create_all_scalars (display_act, GPIV_S_STRAIN);
832 } else {
833 hide_all_scalars (display_act, GPIV_S_STRAIN);
838 if (display_act->pida->exist_nstrain) {
839 if (default_par->display__scalar == SHOW_SC_NSTRAIN) {
840 create_all_scalars (display_act, GPIV_N_STRAIN);
841 } else {
842 hide_all_scalars (display_act, GPIV_N_STRAIN);
846 if (default_par->display__view_menubar == 1) {
847 gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM
848 (view_menubar_popup_menu),
849 TRUE);
850 } else {
851 gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM
852 (view_menubar_popup_menu),
853 FALSE);
856 if (default_par->display__view_rulers == 1) {
857 gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM
858 (view_rulers_popup_menu),
859 TRUE);
860 } else {
861 gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM
862 (view_rulers_popup_menu),
863 FALSE);
866 if (default_par->display__stretch_auto == TRUE) {
867 gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM
868 (stretch_auto_popup_menu),
869 TRUE);
870 } else {
871 gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM
872 (stretch_auto_popup_menu),
873 FALSE);
880 void
881 store_defaultpar (void
883 /* ----------------------------------------------------------------------------
884 * Store parameters as defaults
887 gnome_config_push_prefix ("/gpiv/General/");
888 /* gnome_config_set_bool ("print_par", print_par); */
889 gnome_config_set_bool ("console__show_tooltips", default_par->console__show_tooltips);
890 gnome_config_set_bool ("console__view_gpivbuttons", default_par->console__view_gpivbuttons);
891 gnome_config_set_bool ("console__view_tabulator", default_par->console__view_tabulator);
892 gnome_config_set_int ("console__nbins", default_par->console__nbins);
893 gnome_config_set_bool ("img_fmt", default_par->img_fmt);
894 gnome_config_set_bool ("hdf", default_par->hdf);
895 #ifdef ENABLE_MPI
896 gnome_config_set_int ("mpi_nodes", default_par->mpi_nodes);
897 #endif /* ENABLE_MPI */
900 gnome_config_pop_prefix ();
901 gnome_config_push_prefix ("/gpiv/Image/");
902 gnome_config_set_bool ("x_corr", default_par->x_corr);
905 gnome_config_pop_prefix ();
906 gnome_config_push_prefix ("/gpiv/Processes/");
907 #ifdef ENABLE_CAM
908 gnome_config_set_bool ("process__cam", default_par->process__cam);
909 #endif /* ENABLE_CAM */
910 #ifdef ENABLE_TRIG
911 gnome_config_set_bool ("process__trig", default_par->process__trig);
912 #endif /* ENABLE_TRIG */
913 #ifdef ENABLE_IMGPROC
914 gnome_config_set_bool ("process__imgproc", default_par->process__imgproc);
915 #endif /* ENABLE_IMGPROC */
916 gnome_config_set_bool ("process__piv", default_par->process__piv);
917 gnome_config_set_bool ("process__gradient", default_par->process__gradient);
918 gnome_config_set_bool ("process__resstats", default_par->process__resstats);
919 gnome_config_set_bool ("process__errvec", default_par->process__errvec);
920 gnome_config_set_bool ("process__peaklock", default_par->process__peaklock);
921 gnome_config_set_bool ("process__scale", default_par->process__scale);
922 gnome_config_set_bool ("process__average", default_par->process__average);
923 gnome_config_set_bool ("process__subtract", default_par->process__subtract);
924 gnome_config_set_bool ("process__vorstra", default_par->process__vorstra);
927 gnome_config_pop_prefix ();
928 gnome_config_push_prefix ("/gpiv/Display/");
929 gnome_config_set_bool ("display__view_menubar", default_par->display__view_menubar);
930 gnome_config_set_bool ("display__view_rulers", default_par->display__view_rulers);
931 gnome_config_set_bool ("display__stretch_auto", default_par->display__stretch_auto);
932 gnome_config_set_int ("display__vector_scale", default_par->display__vector_scale);
933 gnome_config_set_int ("display__vector_color", default_par->display__vector_color);
934 gnome_config_set_int ("display__zoom_index", default_par->display__zoom_index);
935 gnome_config_set_int ("display__backgrnd", default_par->display__backgrnd);
936 gnome_config_set_bool ("display__intregs", default_par->display__intregs);
937 gnome_config_set_bool ("display__piv", default_par->display__piv);
938 gnome_config_set_int ("display__scalar", default_par->display__scalar);
941 gnome_config_pop_prefix ();
942 gnome_config_sync ();