Updated because of cvs conflict
[gpiv.git] / src / preferences.c
blobaf92cca7e694cbe000948df0fa9bf376d4fea8b2
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 Gerber van der Graaf
10 This file is part of gpiv.
12 Gpiv is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation; either version 2, or (at your option)
15 any later version.
17 This program is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with this program; if not, write to the Free Software Foundation,
24 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 ----------------------------------------------------------------------*/
29 * $Log: preferences.c,v $
30 * Revision 1.17 2008-04-28 12:00:58 gerber
31 * hdf-formatted files are now with .hdf extension (previously: .gpi)
33 * Revision 1.16 2007-12-19 08:42:35 gerber
34 * debugged
36 * Revision 1.15 2007-11-23 16:24:08 gerber
37 * release 0.5.0: Kafka
39 * Revision 1.14 2007-03-22 16:00:32 gerber
40 * Added image processing tabulator
42 * Revision 1.13 2007/02/05 15:17:09 gerber
43 * auto stretching, broadcast display settings to buffers from preferences
45 * Revision 1.12 2007-01-29 11:27:44 gerber
46 * added image formats png, gif, tif png, bmp, improved buffer display
48 * Revision 1.11 2006-09-18 07:27:06 gerber
49 * *** empty log message ***
51 * Revision 1.10 2006/01/31 14:28:13 gerber
52 * version 0.3.0
54 * Revision 1.8 2005/01/19 15:53:42 gerber
55 * Initiation of Data Acquisition (DAC); trigerring of lasers and camera
56 * by using RTAI and Realtime Linux, recording images from IEEE1394
57 * (Firewire) IIDC compliant camera's
59 * Revision 1.7 2004/10/15 19:24:05 gerber
60 * GPIV_ and Gpiv prefix to defines and structure names of libgpiv
62 * Revision 1.6 2004/06/14 21:19:23 gerber
63 * Image depth up to 16 bits.
64 * Improvement "single int" and "drag int" in Eval tab.
65 * Viewer's pop-up menu.
66 * Adaption for gpiv_matrix_* and gpiv_vector_*.
67 * Resizing console.
68 * See Changelog for further info.
70 * Revision 1.5 2003/09/01 11:17:15 gerber
71 * improved monitoring of interrogation process
73 * Revision 1.4 2003/08/22 15:24:52 gerber
74 * interactive spatial scaling
76 * Revision 1.3 2003/07/25 15:40:24 gerber
77 * removed/disabled setting of correlation in Eval tab, Correlation type in Image info tab
79 * Revision 1.2 2003/06/27 13:47:26 gerber
80 * display ruler, line/point evaluation
82 * Revision 1.1.1.1 2003/06/17 17:10:52 gerber
83 * Imported gpiv
87 #ifdef HAVE_CONFIG_H
88 # include <config.h>
89 #endif /* HAVE_CONFIG_H */
90 #include "support.h"
92 #include "gpiv_gui.h"
93 #include "utils.h"
94 #include "preferences.h"
95 #include "preferences_interface.h"
98 static void
99 apply_gpivpar_console (GpivConsole * gpiv);
101 static void
102 apply_gpivpar_display ();
105 void
106 on_checkbutton_gpivbuttons_activate(GtkWidget *widget,
107 gpointer data
109 /*-----------------------------------------------------------------------------
112 if (GTK_TOGGLE_BUTTON(widget)->active) {
113 default_par->console__view_gpivbuttons = 1;
114 } else {
115 default_par->console__view_gpivbuttons = 0;
121 void
122 on_checkbutton_tab_activate(GtkWidget *widget,
123 gpointer data
125 /*-----------------------------------------------------------------------------
128 if (GTK_TOGGLE_BUTTON(widget)->active) {
129 default_par->console__view_tabulator = 1;
130 } else {
131 default_par->console__view_tabulator = 0;
137 void
138 on_checkbutton_hdf_activate(GtkWidget *widget,
139 gpointer data
141 /*-----------------------------------------------------------------------------
144 if (GTK_TOGGLE_BUTTON(widget)->active) {
145 default_par->hdf = 1;
146 } else {
147 default_par->hdf = 0;
153 void
154 on_radiobutton_datafmt(GtkWidget *widget,
155 gpointer data
157 /*-----------------------------------------------------------------------------
160 gint select = atoi(gtk_object_get_data(GTK_OBJECT(widget),
161 "data_format"));
162 default_par->hdf = select;
163 if (gpiv_par->verbose) g_message("on_radiobutton_datafmt:: %d", default_par->hdf);
168 void
169 on_radiobutton_imgfmt(GtkWidget *widget,
170 gpointer data
172 /*-----------------------------------------------------------------------------
175 gint fmt_select = atoi(gtk_object_get_data(GTK_OBJECT(widget),
176 "image_format"));
177 gpiv_par->img_fmt = fmt_select;
179 if (fmt_select == IMG_FMT_PNG) {
180 if (gpiv_par->verbose) g_message("on_radiobutton_imgfmt:: img_fmt = IMG_FMT_PNG");
181 } else if (fmt_select == IMG_FMT_HDF) {
182 if (gpiv_par->verbose) g_message("on_radiobutton_imgfmt:: img_fmt = IMG_FMT_HDF");
183 } else if (fmt_select == IMG_FMT_RAW) {
184 if (gpiv_par->verbose) g_message("on_radiobutton_imgfmt:: img_fmt = IMG_FMT_RAW");
185 } else {
186 g_message("INVALID IMG_FMT");
192 void
193 on_checkbutton_xcorr_activate(GtkWidget *widget,
194 gpointer data
196 /*-----------------------------------------------------------------------------
199 if (GTK_TOGGLE_BUTTON(widget)->active) {
200 default_par->x_corr = 1;
201 } else {
202 default_par->x_corr = 0;
208 void
209 on_checkbutton_tooltips_activate(GtkWidget *widget,
210 gpointer data
212 /*-----------------------------------------------------------------------------
215 if (GTK_TOGGLE_BUTTON(widget)->active) {
216 default_par->console__show_tooltips = 1;
217 } else {
218 default_par->console__show_tooltips = 0;
224 #ifdef ENABLE_CAM
225 void
226 on_checkbutton_process_cam_activate(GtkWidget *widget,
227 gpointer data
229 /*-----------------------------------------------------------------------------
232 if (GTK_TOGGLE_BUTTON(widget)->active) {
233 default_par->process__cam = TRUE;
234 } else {
235 default_par->process__cam = FALSE;
238 #endif /* ENABLE_CAM */
241 #ifdef ENABLE_TRIG
242 void
243 on_checkbutton_process_trig_activate(GtkWidget *widget,
244 gpointer data
246 /*-----------------------------------------------------------------------------
249 if (GTK_TOGGLE_BUTTON(widget)->active) {
250 default_par->process__trig = TRUE;
251 } else {
252 default_par->process__trig = FALSE;
255 #endif /* ENABLE_TRIG */
258 #ifdef ENABLE_IMGPROC
259 void
260 on_checkbutton_process_imgproc_activate(GtkWidget *widget,
261 gpointer data
263 /*-----------------------------------------------------------------------------
266 if (GTK_TOGGLE_BUTTON(widget)->active) {
267 default_par->process__imgproc = TRUE;
268 } else {
269 default_par->process__imgproc = FALSE;
272 #endif /* ENABLE_IMGPROC */
275 void
276 on_checkbutton_process_piv_activate(GtkWidget *widget,
277 gpointer data
279 /*-----------------------------------------------------------------------------
282 if (GTK_TOGGLE_BUTTON(widget)->active) {
283 default_par->process__piv = TRUE;
284 } else {
285 default_par->process__piv = FALSE;
291 void
292 on_checkbutton_process_gradient_activate(GtkWidget *widget,
293 gpointer data
295 /*-----------------------------------------------------------------------------
298 if (GTK_TOGGLE_BUTTON(widget)->active) {
299 default_par->process__gradient = TRUE;
300 } else {
301 default_par->process__gradient = FALSE;
307 void
308 on_checkbutton_process_resstats_activate(GtkWidget *widget,
309 gpointer data
311 /*-----------------------------------------------------------------------------
314 if (GTK_TOGGLE_BUTTON(widget)->active) {
315 default_par->process__resstats = TRUE;
316 } else {
317 default_par->process__resstats = FALSE;
323 void
324 on_checkbutton_process_errvec_activate(GtkWidget *widget,
325 gpointer data
327 /*-----------------------------------------------------------------------------
330 if (GTK_TOGGLE_BUTTON(widget)->active) {
331 default_par->process__errvec = TRUE;
332 } else {
333 default_par->process__errvec = FALSE;
339 void
340 on_checkbutton_process_peaklck_activate(GtkWidget *widget,
341 gpointer data
343 /*-----------------------------------------------------------------------------
346 if (GTK_TOGGLE_BUTTON(widget)->active) {
347 default_par->process__peaklock = TRUE;
348 } else {
349 default_par->process__peaklock = FALSE;
355 void
356 on_checkbutton_process_subtract_activate(GtkWidget *widget,
357 gpointer data
359 /*-----------------------------------------------------------------------------
362 if (GTK_TOGGLE_BUTTON(widget)->active) {
363 default_par->process__subtract = TRUE;
364 } else {
365 default_par->process__subtract = FALSE;
371 void
372 on_checkbutton_process_scale_activate(GtkWidget *widget,
373 gpointer data
375 /*-----------------------------------------------------------------------------
378 if (GTK_TOGGLE_BUTTON(widget)->active) {
379 default_par->process__scale = TRUE;
380 } else {
381 default_par->process__scale = FALSE;
387 void
388 on_checkbutton_process_avg_activate(GtkWidget *widget,
389 gpointer data
391 /*-----------------------------------------------------------------------------
394 if (GTK_TOGGLE_BUTTON(widget)->active) {
395 default_par->process__average = TRUE;
396 } else {
397 default_par->process__average = FALSE;
403 void
404 on_checkbutton_process_vorstra_activate(GtkWidget *widget,
405 gpointer data
407 /*-----------------------------------------------------------------------------
410 if (GTK_TOGGLE_BUTTON(widget)->active) {
411 default_par->process__vorstra = TRUE;
412 } else {
413 default_par->process__vorstra = FALSE;
419 void
420 on_spinbutton_bins_activate(GtkWidget *widget,
421 gpointer data
423 /*-----------------------------------------------------------------------------
429 void
430 on_radiobutton_display_vecscale(GtkWidget *widget,
431 gpointer data
433 /*-----------------------------------------------------------------------------
436 default_par->display__vector_scale =
437 atoi(gtk_object_get_data(GTK_OBJECT(widget),
438 "vscale"));
443 void
444 on_radiobutton_display_veccolor(GtkWidget *widget,
445 gpointer data
447 /*-----------------------------------------------------------------------------
450 default_par->display__vector_color =
451 atoi(gtk_object_get_data(GTK_OBJECT(widget),
452 "vcolor"));
457 void
458 on_radiobutton_display_zoomscale(GtkWidget *widget,
459 gpointer data
461 /*-----------------------------------------------------------------------------
464 default_par->display__zoom_index =
465 atoi(gtk_object_get_data(GTK_OBJECT(widget),
466 "zscale"));
471 void
472 on_radiobutton_display_background(GtkWidget *widget,
473 gpointer data
475 /*-----------------------------------------------------------------------------
478 default_par->display__backgrnd =
479 atoi (gtk_object_get_data (GTK_OBJECT (widget), "bgcolor"));
480 if (gpiv_par->verbose) g_message ("on_radiobutton_display_background:: display__backgrnd = %d",
481 default_par->display__backgrnd);
486 void
487 on_checkbutton_display_display_intregs(GtkWidget *widget,
488 gpointer data
490 /*-----------------------------------------------------------------------------
494 if (GTK_TOGGLE_BUTTON(widget)->active) {
495 default_par->display__intregs = TRUE;
496 } else {
497 default_par->display__intregs = FALSE;
503 void
504 on_checkbutton_display_display_piv(GtkWidget *widget,
505 gpointer data
507 /*-----------------------------------------------------------------------------
510 if (GTK_TOGGLE_BUTTON(widget)->active) {
511 default_par->display__piv = TRUE;
512 } else {
513 default_par->display__piv = FALSE;
519 void
520 on_radiobutton_display_scalar(GtkWidget *widget,
521 gpointer data
523 /*-----------------------------------------------------------------------------
526 default_par->display__scalar =
527 atoi (gtk_object_get_data (GTK_OBJECT (widget), "scalar"));
528 if (gpiv_par->verbose) g_message ("on_radiobutton_display_scalar:: display__scalar = %d",
529 default_par->display__scalar);
534 void
535 on_checkbutton_display_view_menubar_activate (GtkWidget *widget,
536 gpointer data
538 /*-----------------------------------------------------------------------------
541 if (GTK_TOGGLE_BUTTON(widget)->active) {
542 default_par->display__view_menubar = 1;
543 } else {
544 default_par->display__view_menubar = 0;
550 void
551 on_checkbutton_display_view_rulers_activate (GtkWidget *widget,
552 gpointer data
554 /*-----------------------------------------------------------------------------
557 if (GTK_TOGGLE_BUTTON(widget)->active) {
558 default_par->display__view_rulers = 1;
559 } else {
560 default_par->display__view_rulers = 0;
566 void
567 on_checkbutton_display_stretch_auto_activate (GtkWidget *widget,
568 gpointer data
570 /*-----------------------------------------------------------------------------
573 if (GTK_TOGGLE_BUTTON(widget)->active) {
574 default_par->display__stretch_auto = TRUE;
575 } else {
576 default_par->display__stretch_auto = FALSE;
582 void
583 on_preferences_response(GtkDialog *dialog,
584 gint response,
585 gpointer data
587 /*-----------------------------------------------------------------------------
590 GpivConsole *gpiv = gtk_object_get_data(GTK_OBJECT(dialog), "gpiv");
591 Pref *pref = gtk_object_get_data(GTK_OBJECT(dialog), "pref");
592 g_assert( response == GTK_RESPONSE_OK
593 || response == GTK_RESPONSE_APPLY
594 || response == GTK_RESPONSE_CANCEL);
596 switch (response) {
597 case GTK_RESPONSE_OK:
598 apply_gpivpar(gpiv);
599 store_defaultpar();
600 gtk_widget_destroy(GTK_WIDGET (dialog));
601 break;
603 case GTK_RESPONSE_APPLY:
604 apply_gpivpar(gpiv);
605 break;
607 case GTK_RESPONSE_CANCEL:
608 gtk_widget_destroy(GTK_WIDGET (dialog));
609 break;
611 default:
612 g_warning("on_preferences_response: should not arrive here");
613 break;
620 void
621 apply_gpivpar (GpivConsole * gpiv)
622 /* ----------------------------------------------------------------------------
623 * Updates actual parameters
626 gint i;
628 apply_gpivpar_console(gpiv);
630 for (i = 0; i < nbufs; i++) {
631 display_act = display[i];
632 if (display_act != NULL) {
633 if (gpiv_par->verbose) g_message("apply_gpivpar:: ibuf = %d apply_gpivpar_display", i);
634 apply_gpivpar_display ();
639 static void
640 apply_gpivpar_console(GpivConsole *gpiv)
641 /* ----------------------------------------------------------------------------
642 * Updates actual parameters for the console
645 GtkWidget *settings_menu_gpiv0 =
646 gtk_object_get_data (GTK_OBJECT (gpiv->console), "settings_menu_gpiv0");
647 GtkWidget *settings_menu_gpiv1 =
648 gtk_object_get_data (GTK_OBJECT (gpiv->console), "settings_menu_gpiv1");
649 GtkWidget *help_menu_gpiv0 =
650 gtk_object_get_data (GTK_OBJECT (gpiv->console), "help_menu_gpiv0");
651 GtkWidget *help_menu_gpiv_popup0 =
652 gtk_object_get_data (GTK_OBJECT (gpiv->console), "help_menu_gpiv_popup0");
655 parameters_set(gpiv_par, FALSE);
656 cp_undef_parameters(default_par, gpiv_par);
659 if (default_par->console__view_gpivbuttons == 1) {
660 gtk_widget_show(gpiv->handlebox1);
661 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM
662 (settings_menu_gpiv0), TRUE);
663 } else {
664 gtk_widget_hide(gpiv->handlebox1);
665 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM
666 (settings_menu_gpiv0), FALSE);
669 if (default_par->console__view_tabulator == 1) {
670 gtk_widget_show(gpiv->notebook);
671 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM
672 (settings_menu_gpiv1), TRUE);
673 } else {
674 gtk_widget_hide(gpiv->notebook);
675 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM
676 (settings_menu_gpiv1), FALSE);
679 if (default_par->console__show_tooltips == 1) {
680 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM
681 (help_menu_gpiv0), TRUE);
682 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM
683 (help_menu_gpiv_popup0), TRUE);
684 } else {
685 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM
686 (help_menu_gpiv0), FALSE);
687 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM
688 (help_menu_gpiv_popup0), FALSE);
691 gtk_spin_button_set_value(GTK_SPIN_BUTTON
692 (gpiv->pivvalid->spinbutton_histo_bins),
693 default_par->console__nbins);
698 #ifdef ENABLE_CAM
699 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
700 (gpiv->button_toolbar_cam),
701 default_par->process__cam);
702 #endif /* ENABLE_CAM */
704 #ifdef ENABLE_TRIG
705 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
706 (gpiv->button_toolbar_trig),
707 default_par->process__trig);
708 #endif /* ENABLE_TRIG */
710 #ifdef ENABLE_IMGPROC
711 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
712 (gpiv->button_toolbar_imgproc),
713 default_par->process__imgproc);
714 #endif /* ENABLE_IMGPROC */
716 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
717 (gpiv->button_toolbar_piv),
718 default_par->process__piv);
720 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
721 (gpiv->button_toolbar_gradient),
722 default_par->process__gradient);
724 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
725 (gpiv->button_toolbar_resstats),
726 default_par->process__resstats);
728 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
729 (gpiv->button_toolbar_errvec),
730 default_par->process__errvec);
732 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
733 (gpiv->button_toolbar_peaklock),
734 default_par->process__peaklock);
736 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
737 (gpiv->button_toolbar_scale),
738 default_par->process__scale);
740 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
741 (gpiv->button_toolbar_average),
742 default_par->process__average);
744 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
745 (gpiv->button_toolbar_subavg),
746 default_par->process__subtract);
748 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
749 (gpiv->button_toolbar_vorstra),
750 default_par->process__vorstra);
755 static void
756 apply_gpivpar_display (void)
757 /* ----------------------------------------------------------------------------
758 * Updates actual parameters for the actual display
761 GtkWidget *view_menubar_popup_menu =
762 gtk_object_get_data(GTK_OBJECT(display_act->mwin),
763 "view_menubar_popup_menu");
764 GtkWidget *view_rulers_popup_menu =
765 gtk_object_get_data(GTK_OBJECT(display_act->mwin),
766 "view_rulers_popup_menu");
768 GtkWidget *stretch_auto_popup_menu =
769 gtk_object_get_data(GTK_OBJECT(display_act->mwin),
770 "stretch_auto_popup_menu");
774 /* for (i = 0; i < nbufs; i++) { */
775 /* display_act = display[i]; */
776 /* if (display_act != NULL) { */
777 if (display_act->pida->exist_piv
778 && display_act->display_piv) {
779 update_all_vectors(display_act->pida);
783 if (display_act->display_intregs) {
784 if (default_par->display__intregs == 1) {
785 create_all_intregs2(display_act);
786 create_all_intregs1(display_act);
787 } else {
788 hide_all_intregs1(display_act);
789 hide_all_intregs2(display_act);
794 if (display_act->pida->exist_piv) {
795 if (default_par->display__piv) {
796 create_all_vectors(display_act->pida);
797 } else {
798 hide_all_vectors(display_act->pida);
803 if (display_act->pida->exist_vor) {
804 if (default_par->display__scalar == SHOW_SC_VORTICITY) {
805 create_all_scalars (display_act, GPIV_VORTICITY);
806 } else {
807 hide_all_scalars (display_act, GPIV_VORTICITY);
812 if (display_act->pida->exist_sstrain) {
813 if (default_par->display__scalar == SHOW_SC_SSTRAIN) {
814 create_all_scalars (display_act, GPIV_S_STRAIN);
815 } else {
816 hide_all_scalars (display_act, GPIV_S_STRAIN);
821 if (display_act->pida->exist_nstrain) {
822 if (default_par->display__scalar == SHOW_SC_NSTRAIN) {
823 create_all_scalars (display_act, GPIV_N_STRAIN);
824 } else {
825 hide_all_scalars (display_act, GPIV_N_STRAIN);
829 if (default_par->display__view_menubar == 1) {
830 gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM
831 (view_menubar_popup_menu),
832 TRUE);
833 } else {
834 gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM
835 (view_menubar_popup_menu),
836 FALSE);
839 if (default_par->display__view_rulers == 1) {
840 gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM
841 (view_rulers_popup_menu),
842 TRUE);
843 } else {
844 gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM
845 (view_rulers_popup_menu),
846 FALSE);
849 if (default_par->display__stretch_auto == TRUE) {
850 gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM
851 (stretch_auto_popup_menu),
852 TRUE);
853 } else {
854 gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM
855 (stretch_auto_popup_menu),
856 FALSE);
863 void
864 store_defaultpar (void
866 /* ----------------------------------------------------------------------------
867 * Store parameters as defaults
870 gnome_config_push_prefix ("/gpiv/General/");
871 /* gnome_config_set_bool ("print_par", print_par); */
872 gnome_config_set_bool ("console__show_tooltips", default_par->console__show_tooltips);
873 gnome_config_set_bool ("console__view_gpivbuttons", default_par->console__view_gpivbuttons);
874 gnome_config_set_bool ("console__view_tabulator", default_par->console__view_tabulator);
875 gnome_config_set_int ("console__nbins", default_par->console__nbins);
877 gnome_config_set_bool ("img_fmt", default_par->img_fmt);
878 gnome_config_set_bool ("hdf", default_par->hdf);
881 gnome_config_pop_prefix ();
882 gnome_config_push_prefix ("/gpiv/Image/");
883 gnome_config_set_bool ("x_corr", default_par->x_corr);
886 gnome_config_pop_prefix ();
887 gnome_config_push_prefix ("/gpiv/Processes/");
888 #ifdef ENABLE_CAM
889 gnome_config_set_bool ("process__cam", default_par->process__cam);
890 #endif /* ENABLE_CAM */
891 #ifdef ENABLE_TRIG
892 gnome_config_set_bool ("process__trig", default_par->process__trig);
893 #endif /* ENABLE_TRIG */
894 #ifdef ENABLE_IMGPROC
895 gnome_config_set_bool ("process__imgproc", default_par->process__imgproc);
896 #endif /* ENABLE_IMGPROC */
897 gnome_config_set_bool ("process__piv", default_par->process__piv);
898 gnome_config_set_bool ("process__gradient", default_par->process__gradient);
899 gnome_config_set_bool ("process__resstats", default_par->process__resstats);
900 gnome_config_set_bool ("process__errvec", default_par->process__errvec);
901 gnome_config_set_bool ("process__peaklock", default_par->process__peaklock);
902 gnome_config_set_bool ("process__scale", default_par->process__scale);
903 gnome_config_set_bool ("process__average", default_par->process__average);
904 gnome_config_set_bool ("process__subtract", default_par->process__subtract);
905 gnome_config_set_bool ("process__vorstra", default_par->process__vorstra);
908 gnome_config_pop_prefix ();
909 gnome_config_push_prefix ("/gpiv/Display/");
910 gnome_config_set_bool ("display__view_menubar", default_par->display__view_menubar);
911 gnome_config_set_bool ("display__view_rulers", default_par->display__view_rulers);
912 gnome_config_set_bool ("display__stretch_auto", default_par->display__stretch_auto);
913 gnome_config_set_int ("display__vector_scale", default_par->display__vector_scale);
914 gnome_config_set_int ("display__vector_color", default_par->display__vector_color);
915 gnome_config_set_int ("display__zoom_index", default_par->display__zoom_index);
916 gnome_config_set_int ("display__backgrnd", default_par->display__backgrnd);
917 gnome_config_set_bool ("display__intregs", default_par->display__intregs);
918 gnome_config_set_bool ("display__piv", default_par->display__piv);
919 gnome_config_set_int ("display__scalar", default_par->display__scalar);
921 gnome_config_pop_prefix ();
922 gnome_config_sync ();