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
8 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
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)
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 * $Id: preferences_interface.c,v 1.2 2008-10-09 14:43:37 gerber Exp $
38 #include "preferences.h"
39 #include "preferences_interface.h"
40 #include "console_menus.h"
46 create_preferences (GpivConsole
*gpiv
48 /*-----------------------------------------------------------------------------
51 Pref
*pref
= g_new0 (Pref
, 1);
52 GdkPixbuf
*logo
= NULL
;
55 logo
= gdk_pixbuf_new_from_file(PIXMAPSDIR
"gpiv_logo.png", NULL
);
56 pref
->preferences
= GTK_DIALOG( gtk_dialog_new_with_buttons(
59 GTK_DIALOG_DESTROY_WITH_PARENT
,
60 GTK_STOCK_CANCEL
, GTK_RESPONSE_CANCEL
,
61 GTK_STOCK_APPLY
, GTK_RESPONSE_APPLY
,
62 GTK_STOCK_OK
, GTK_RESPONSE_OK
,
65 gtk_widget_show(GTK_WIDGET (pref
->preferences
));
66 gtk_object_set_data (GTK_OBJECT (pref
->preferences
),
69 g_signal_connect( pref
->preferences
,
71 G_CALLBACK(on_preferences_response
),
73 gtk_window_set_icon(GTK_WINDOW( pref
->preferences
), logo
);
74 if (logo
!= NULL
) g_object_unref (logo
);
78 pref
->notebook
= gtk_notebook_new ();
79 gtk_widget_ref (pref
->notebook
);
80 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
83 (GtkDestroyNotify
) gtk_widget_unref
);
84 gtk_widget_show (pref
->notebook
);
85 gtk_container_add (GTK_CONTAINER (GTK_DIALOG(pref
->preferences
)->vbox
),
92 pref
->table1
= gtk_table_new (2,
95 gtk_widget_ref (pref
->table1
);
96 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
99 (GtkDestroyNotify
) gtk_widget_unref
);
100 gtk_widget_show (pref
->table1
);
101 gtk_container_add (GTK_CONTAINER (pref
->notebook
),
106 pref
->frame_view
= gtk_frame_new (_("View options"));
107 gtk_widget_ref (pref
->frame_view
);
108 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
111 (GtkDestroyNotify
) gtk_widget_unref
);
112 gtk_widget_show (pref
->frame_view
);
113 gtk_table_attach (GTK_TABLE (pref
->table1
),
119 (GtkAttachOptions
) (GTK_EXPAND
| GTK_FILL
),
120 (GtkAttachOptions
) (GTK_FILL
),
126 pref
->vbox1
= gtk_vbox_new (FALSE
, 0);
127 gtk_widget_ref (pref
->vbox1
);
128 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
131 (GtkDestroyNotify
) gtk_widget_unref
);
132 gtk_widget_show (pref
->vbox1
);
133 gtk_container_add (GTK_CONTAINER (pref
->frame_view
),
138 pref
->checkbutton_gpivbuttons
=
139 gtk_check_button_new_with_label (_("gpiv buttons"));
140 gtk_widget_ref (pref
->checkbutton_gpivbuttons
);
141 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
142 "checkbutton_gpivbuttons",
143 pref
->checkbutton_gpivbuttons
,
144 (GtkDestroyNotify
) gtk_widget_unref
);
145 if (default_par
->console__view_gpivbuttons
== 1) {
146 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
147 (pref
->checkbutton_gpivbuttons
),
150 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
151 (pref
->checkbutton_gpivbuttons
),
154 gtk_widget_show (pref
->checkbutton_gpivbuttons
);
155 gtk_box_pack_start (GTK_BOX (pref
->vbox1
),
156 pref
->checkbutton_gpivbuttons
,
161 g_signal_connect (GTK_OBJECT (pref
->checkbutton_gpivbuttons
),
163 G_CALLBACK (on_checkbutton_gpivbuttons_activate
),
168 pref
->checkbutton_tab
= gtk_check_button_new_with_label (_("tabulator"));
169 gtk_widget_ref (pref
->checkbutton_tab
);
170 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
172 pref
->checkbutton_tab
,
173 (GtkDestroyNotify
) gtk_widget_unref
);
174 if (default_par
->console__view_tabulator
== 1) {
175 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
176 (pref
->checkbutton_tab
),
179 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
180 (pref
->checkbutton_tab
),
183 gtk_widget_show (pref
->checkbutton_tab
);
184 gtk_box_pack_start (GTK_BOX (pref
->vbox1
),
185 pref
->checkbutton_tab
,
190 g_signal_connect (GTK_OBJECT (pref
->checkbutton_tab
),
192 G_CALLBACK (on_checkbutton_tab_activate
),
198 pref
->frame_io
= gtk_frame_new (_("In/output"));
199 gtk_widget_ref (pref
->frame_io
);
200 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
203 (GtkDestroyNotify
) gtk_widget_unref
);
204 gtk_widget_show (pref
->frame_io
);
205 gtk_table_attach (GTK_TABLE (pref
->table1
),
211 (GtkAttachOptions
) (GTK_EXPAND
| GTK_FILL
),
212 (GtkAttachOptions
) (GTK_FILL
),
218 pref
->vbox_io
= gtk_vbox_new (FALSE
, 0);
219 gtk_widget_ref (pref
->vbox_io
);
220 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
223 (GtkDestroyNotify
) gtk_widget_unref
);
224 gtk_widget_show (pref
->vbox_io
);
225 gtk_container_add (GTK_CONTAINER (pref
->frame_io
),
232 pref
->radiobutton_imgfmt_0
=
233 gtk_radio_button_new_with_label (pref
->imgformat_sel_group
,
234 _("PNG image format (.png)"));
235 pref
->imgformat_sel_group
=
236 gtk_radio_button_group (GTK_RADIO_BUTTON (pref
->radiobutton_imgfmt_0
));
237 gtk_widget_ref (pref
->radiobutton_imgfmt_0
);
238 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
239 "radiobutton_imgfmt_0",
240 pref
->radiobutton_imgfmt_0
,
241 (GtkDestroyNotify
) gtk_widget_unref
);
242 gtk_widget_show (pref
->radiobutton_imgfmt_0
);
243 gtk_box_pack_start (GTK_BOX (pref
->vbox_io
),
244 pref
->radiobutton_imgfmt_0
,
249 if (default_par
->img_fmt
== IMG_FMT_PNG
) {
250 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
251 (pref
->radiobutton_imgfmt_0
),
254 /* g_snprintf(data, sizeof(IMG_FMT_PNG), "%s", IMG_FMT_PNG); */
255 gtk_object_set_data (GTK_OBJECT (pref
->radiobutton_imgfmt_0
),
257 (int *) IMG_FMT_PNG
);
258 g_signal_connect (GTK_OBJECT (pref
->radiobutton_imgfmt_0
),
260 G_CALLBACK (on_radiobutton_imgfmt
),
265 pref
->radiobutton_imgfmt_1
=
266 gtk_radio_button_new_with_label (pref
->imgformat_sel_group
,
267 _("HDF5 image format (.h5)"));
268 pref
->imgformat_sel_group
=
269 gtk_radio_button_group (GTK_RADIO_BUTTON (pref
->radiobutton_imgfmt_1
));
270 gtk_widget_ref (pref
->radiobutton_imgfmt_1
);
271 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
272 "radiobutton_imgfmt_1",
273 pref
->radiobutton_imgfmt_1
,
274 (GtkDestroyNotify
) gtk_widget_unref
);
275 gtk_widget_show (pref
->radiobutton_imgfmt_1
);
276 gtk_box_pack_start (GTK_BOX (pref
->vbox_io
),
277 pref
->radiobutton_imgfmt_1
,
282 if (default_par
->img_fmt
== IMG_FMT_HDF
) {
283 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
284 (pref
->radiobutton_imgfmt_1
),
287 /* g_snprintf(data, sizeof(IMG_FMT_PNG), "%s", IMG_FMT_PNG); */
288 gtk_object_set_data (GTK_OBJECT (pref
->radiobutton_imgfmt_1
),
290 (int *) IMG_FMT_HDF
);
291 g_signal_connect (GTK_OBJECT (pref
->radiobutton_imgfmt_1
),
293 G_CALLBACK (on_radiobutton_imgfmt
),
298 pref
->radiobutton_imgfmt_2
=
299 gtk_radio_button_new_with_label (pref
->imgformat_sel_group
,
300 _("RAW image format (.h .r)"));
301 pref
->imgformat_sel_group
=
302 gtk_radio_button_group (GTK_RADIO_BUTTON (pref
->radiobutton_imgfmt_2
));
303 gtk_widget_ref (pref
->radiobutton_imgfmt_2
);
304 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
305 "radiobutton_imgfmt_2",
306 pref
->radiobutton_imgfmt_2
,
307 (GtkDestroyNotify
) gtk_widget_unref
);
308 gtk_widget_show (pref
->radiobutton_imgfmt_2
);
309 gtk_box_pack_start (GTK_BOX (pref
->vbox_io
),
310 pref
->radiobutton_imgfmt_2
,
315 if (default_par
->img_fmt
== IMG_FMT_RAW
) {
316 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
317 (pref
->radiobutton_imgfmt_2
),
320 /* g_snprintf(data, sizeof(IMG_FMT_PNG), "%s", IMG_FMT_PNG); */
321 gtk_object_set_data (GTK_OBJECT (pref
->radiobutton_imgfmt_2
),
323 (int *) IMG_FMT_RAW
);
324 g_signal_connect (GTK_OBJECT (pref
->radiobutton_imgfmt_2
),
326 G_CALLBACK (on_radiobutton_imgfmt
),
333 pref
->checkbutton_xcorr
=
334 gtk_check_button_new_with_label (_("cross-correlation"));
335 gtk_widget_ref (pref
->checkbutton_xcorr
);
336 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
338 pref
->checkbutton_xcorr
,
339 (GtkDestroyNotify
) gtk_widget_unref
);
340 if (default_par
->x_corr
== 1) {
341 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
342 (pref
->checkbutton_xcorr
),
345 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
346 (pref
->checkbutton_xcorr
),
349 gtk_widget_show (pref
->checkbutton_xcorr
);
350 gtk_box_pack_start (GTK_BOX (pref
->vbox_io
),
351 pref
->checkbutton_xcorr
,
356 g_signal_connect (GTK_OBJECT (pref
->checkbutton_xcorr
),
358 G_CALLBACK (on_checkbutton_xcorr_activate
),
363 * PIV and PIV-derived Data format
365 pref
->radiobutton_datafmt_0
=
366 gtk_radio_button_new_with_label (pref
->dataformat_sel_group
,
367 _("ASCII data format (.piv)"));
368 pref
->dataformat_sel_group
=
369 gtk_radio_button_group (GTK_RADIO_BUTTON (pref
->radiobutton_datafmt_0
));
370 gtk_widget_ref (pref
->radiobutton_datafmt_0
);
371 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
372 "radiobutton_datafmt_0",
373 pref
->radiobutton_datafmt_0
,
374 (GtkDestroyNotify
) gtk_widget_unref
);
375 gtk_widget_show (pref
->radiobutton_datafmt_0
);
376 gtk_box_pack_start (GTK_BOX (pref
->vbox_io
),
377 pref
->radiobutton_datafmt_0
,
382 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
383 (pref
->radiobutton_datafmt_0
),
385 gtk_object_set_data (GTK_OBJECT (pref
->radiobutton_datafmt_0
),
387 "0" /* (int *) FALSE */);
388 g_signal_connect (GTK_OBJECT (pref
->radiobutton_datafmt_0
),
390 G_CALLBACK (on_radiobutton_datafmt
),
395 pref
->radiobutton_datafmt_1
=
396 gtk_radio_button_new_with_label (pref
->dataformat_sel_group
,
397 _("HDF data format (.h5)"));
398 pref
->dataformat_sel_group
=
399 gtk_radio_button_group (GTK_RADIO_BUTTON (pref
->radiobutton_datafmt_1
));
400 gtk_widget_ref (pref
->radiobutton_datafmt_1
);
401 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
402 "radiobutton_datafmt_1",
403 pref
->radiobutton_datafmt_1
,
404 (GtkDestroyNotify
) gtk_widget_unref
);
405 gtk_widget_show (pref
->radiobutton_datafmt_1
);
406 gtk_box_pack_start (GTK_BOX (pref
->vbox_io
),
407 pref
->radiobutton_datafmt_1
,
412 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
413 (pref
->radiobutton_datafmt_1
),
415 gtk_object_set_data (GTK_OBJECT (pref
->radiobutton_datafmt_1
),
418 g_signal_connect (GTK_OBJECT (pref
->radiobutton_datafmt_1
),
420 G_CALLBACK (on_radiobutton_datafmt
),
425 * General; tooltips, histogram bins, cluster nodes
427 pref
->checkbutton_tooltips
= gtk_check_button_new_with_label (_("tooltips"));
428 gtk_widget_ref (pref
->checkbutton_tooltips
);
429 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
430 "checkbutton_tooltips",
431 pref
->checkbutton_tooltips
,
432 (GtkDestroyNotify
) gtk_widget_unref
);
433 if (default_par
->console__show_tooltips
== 1) {
434 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
435 (pref
->checkbutton_tooltips
),
438 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
439 (pref
->checkbutton_tooltips
),
442 gtk_widget_show (pref
->checkbutton_tooltips
);
443 gtk_table_attach (GTK_TABLE (pref
->table1
),
444 pref
->checkbutton_tooltips
,
449 (GtkAttachOptions
) (GTK_FILL
),
450 (GtkAttachOptions
) (0),
454 g_signal_connect (GTK_OBJECT (pref
->checkbutton_tooltips
),
456 G_CALLBACK (on_checkbutton_tooltips_activate
),
462 pref
->frame_processes
= gtk_frame_new (_("processes"));
463 gtk_widget_ref (pref
->frame_processes
);
464 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
466 pref
->frame_processes
,
467 (GtkDestroyNotify
) gtk_widget_unref
);
468 gtk_widget_show (pref
->frame_processes
);
469 gtk_table_attach (GTK_TABLE (pref
->table1
),
470 pref
->frame_processes
,
475 (GtkAttachOptions
) (GTK_FILL
),
476 (GtkAttachOptions
) (GTK_FILL
),
482 pref
->vbox2
= gtk_vbox_new (FALSE
,
484 gtk_widget_ref (pref
->vbox2
);
485 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
488 (GtkDestroyNotify
) gtk_widget_unref
);
489 gtk_widget_show (pref
->vbox2
);
490 gtk_container_add (GTK_CONTAINER (pref
->frame_processes
),
497 pref
->checkbutton_process_cam
= gtk_check_button_new_with_label (_("camera"));
498 gtk_widget_ref (pref
->checkbutton_process_cam
);
499 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
500 "checkbutton_process_cam",
501 pref
->checkbutton_process_cam
,
502 (GtkDestroyNotify
) gtk_widget_unref
);
503 if (default_par
->process__cam
) {
504 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
505 (pref
->checkbutton_process_cam
),
508 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
509 (pref
->checkbutton_process_cam
),
512 gtk_widget_show (pref
->checkbutton_process_cam
);
513 gtk_box_pack_start (GTK_BOX (pref
->vbox2
),
514 pref
->checkbutton_process_cam
,
519 gtk_signal_connect (GTK_OBJECT (pref
->checkbutton_process_cam
),
521 GTK_SIGNAL_FUNC (on_checkbutton_process_cam_activate
),
523 #endif /* ENABLE_CAM */
528 pref
->checkbutton_process_trig
= gtk_check_button_new_with_label (_("trigger"));
529 gtk_widget_ref (pref
->checkbutton_process_trig
);
530 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
531 "checkbutton_process_trig",
532 pref
->checkbutton_process_trig
,
533 (GtkDestroyNotify
) gtk_widget_unref
);
534 if (default_par
->process__trig
) {
535 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
536 (pref
->checkbutton_process_trig
),
539 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
540 (pref
->checkbutton_process_trig
),
543 gtk_widget_show (pref
->checkbutton_process_trig
);
544 gtk_box_pack_start (GTK_BOX (pref
->vbox2
),
545 pref
->checkbutton_process_trig
,
550 gtk_signal_connect (GTK_OBJECT (pref
->checkbutton_process_trig
),
552 GTK_SIGNAL_FUNC (on_checkbutton_process_trig_activate
),
554 #endif /* ENABLE_TRIG */
558 #ifdef ENABLE_IMGPROC
559 pref
->checkbutton_process_imgproc
= gtk_check_button_new_with_label (_("image processing"));
560 gtk_widget_ref (pref
->checkbutton_process_imgproc
);
561 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
562 "checkbutton_process_imgproc",
563 pref
->checkbutton_process_imgproc
,
564 (GtkDestroyNotify
) gtk_widget_unref
);
565 if (default_par
->process__imgproc
) {
566 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
567 (pref
->checkbutton_process_imgproc
),
570 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
571 (pref
->checkbutton_process_imgproc
),
574 gtk_widget_show (pref
->checkbutton_process_imgproc
);
575 gtk_box_pack_start (GTK_BOX (pref
->vbox2
),
576 pref
->checkbutton_process_imgproc
,
581 gtk_signal_connect (GTK_OBJECT (pref
->checkbutton_process_imgproc
),
583 GTK_SIGNAL_FUNC (on_checkbutton_process_imgproc_activate
),
585 #endif /* ENABLE_IMGPROC */
589 pref
->checkbutton_process_piv
= gtk_check_button_new_with_label (_("piv"));
590 gtk_widget_ref (pref
->checkbutton_process_piv
);
591 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
592 "checkbutton_process_piv",
593 pref
->checkbutton_process_piv
,
594 (GtkDestroyNotify
) gtk_widget_unref
);
595 if (default_par
->process__piv
) {
596 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
597 (pref
->checkbutton_process_piv
),
600 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
601 (pref
->checkbutton_process_piv
),
604 gtk_widget_show (pref
->checkbutton_process_piv
);
605 gtk_box_pack_start (GTK_BOX (pref
->vbox2
),
606 pref
->checkbutton_process_piv
,
611 g_signal_connect (GTK_OBJECT (pref
->checkbutton_process_piv
),
613 G_CALLBACK (on_checkbutton_process_piv_activate
),
619 pref
->checkbutton_process_gradient
=
620 gtk_check_button_new_with_label (_("gradient"));
621 gtk_widget_ref (pref
->checkbutton_process_gradient
);
622 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
623 "checkbutton_process_gradient",
624 pref
->checkbutton_process_gradient
,
625 (GtkDestroyNotify
) gtk_widget_unref
);
626 if (default_par
->process__gradient
) {
627 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
628 (pref
->checkbutton_process_gradient
),
631 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
632 (pref
->checkbutton_process_gradient
),
635 gtk_widget_show (pref
->checkbutton_process_gradient
);
636 gtk_box_pack_start (GTK_BOX (pref
->vbox2
),
637 pref
->checkbutton_process_gradient
,
642 g_signal_connect (GTK_OBJECT (pref
->checkbutton_process_gradient
),
644 G_CALLBACK (on_checkbutton_process_gradient_activate
),
650 pref
->checkbutton_process_resstats
=
651 gtk_check_button_new_with_label (_("residu stats"));
652 gtk_widget_ref (pref
->checkbutton_process_resstats
);
653 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
654 "checkbutton_process_resstats",
655 pref
->checkbutton_process_resstats
,
656 (GtkDestroyNotify
) gtk_widget_unref
);
657 if (default_par
->process__resstats
) {
658 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
659 (pref
->checkbutton_process_resstats
),
662 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
663 (pref
->checkbutton_process_resstats
),
666 gtk_widget_show (pref
->checkbutton_process_resstats
);
667 gtk_box_pack_start (GTK_BOX (pref
->vbox2
),
668 pref
->checkbutton_process_resstats
,
673 g_signal_connect (GTK_OBJECT (pref
->checkbutton_process_resstats
),
675 G_CALLBACK (on_checkbutton_process_resstats_activate
),
681 pref
->checkbutton_process_errvec
=
682 gtk_check_button_new_with_label (_("validate"));
683 gtk_widget_ref (pref
->checkbutton_process_errvec
);
684 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
685 "checkbutton_process_errvec",
686 pref
->checkbutton_process_errvec
,
687 (GtkDestroyNotify
) gtk_widget_unref
);
688 if (default_par
->process__errvec
) {
689 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
690 (pref
->checkbutton_process_errvec
),
693 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
694 (pref
->checkbutton_process_errvec
),
697 gtk_widget_show (pref
->checkbutton_process_errvec
);
698 gtk_box_pack_start (GTK_BOX (pref
->vbox2
),
699 pref
->checkbutton_process_errvec
,
704 g_signal_connect (GTK_OBJECT (pref
->checkbutton_process_errvec
),
706 G_CALLBACK (on_checkbutton_process_errvec_activate
),
712 pref
->checkbutton_process_peaklck
=
713 gtk_check_button_new_with_label (_("peaklock"));
714 gtk_widget_ref (pref
->checkbutton_process_peaklck
);
715 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
716 "checkbutton_process_peaklck",
717 pref
->checkbutton_process_peaklck
,
718 (GtkDestroyNotify
) gtk_widget_unref
);
719 if (default_par
->process__peaklock
) {
720 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
721 (pref
->checkbutton_process_peaklck
),
724 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
725 (pref
->checkbutton_process_peaklck
),
728 gtk_widget_show (pref
->checkbutton_process_peaklck
);
729 gtk_box_pack_start (GTK_BOX (pref
->vbox2
),
730 pref
->checkbutton_process_peaklck
,
735 g_signal_connect (GTK_OBJECT (pref
->checkbutton_process_peaklck
),
737 G_CALLBACK (on_checkbutton_process_peaklck_activate
),
742 pref
->checkbutton_process_scale
=
743 gtk_check_button_new_with_label (_("scaling"));
744 gtk_widget_ref (pref
->checkbutton_process_scale
);
745 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
746 "checkbutton_process_scale",
747 pref
->checkbutton_process_scale
,
748 (GtkDestroyNotify
) gtk_widget_unref
);
749 if (default_par
->process__scale
) {
750 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
751 (pref
->checkbutton_process_scale
),
754 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
755 (pref
->checkbutton_process_scale
),
758 gtk_widget_show (pref
->checkbutton_process_scale
);
759 gtk_box_pack_start (GTK_BOX (pref
->vbox2
),
760 pref
->checkbutton_process_scale
,
765 g_signal_connect (GTK_OBJECT (pref
->checkbutton_process_scale
),
767 G_CALLBACK (on_checkbutton_process_scale_activate
),
773 pref
->checkbutton_process_avg
=
774 gtk_check_button_new_with_label (_("average"));
775 gtk_widget_ref (pref
->checkbutton_process_avg
);
776 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
777 "checkbutton_process_avg",
778 pref
->checkbutton_process_avg
,
779 (GtkDestroyNotify
) gtk_widget_unref
);
780 if (default_par
->process__average
) {
781 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
782 (pref
->checkbutton_process_avg
),
785 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
786 (pref
->checkbutton_process_avg
),
789 gtk_widget_show (pref
->checkbutton_process_avg
);
790 gtk_box_pack_start (GTK_BOX (pref
->vbox2
),
791 pref
->checkbutton_process_avg
,
796 g_signal_connect (GTK_OBJECT (pref
->checkbutton_process_avg
),
798 G_CALLBACK (on_checkbutton_process_avg_activate
),
804 pref
->checkbutton_process_subtract
=
805 gtk_check_button_new_with_label (_("subtract"));
806 gtk_widget_ref (pref
->checkbutton_process_subtract
);
807 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
808 "checkbutton_process_subtract",
809 pref
->checkbutton_process_subtract
,
810 (GtkDestroyNotify
) gtk_widget_unref
);
811 if (default_par
->process__subtract
) {
812 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
813 (pref
->checkbutton_process_subtract
),
816 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
817 (pref
->checkbutton_process_subtract
),
820 gtk_widget_show (pref
->checkbutton_process_subtract
);
821 gtk_box_pack_start (GTK_BOX (pref
->vbox2
),
822 pref
->checkbutton_process_subtract
,
827 g_signal_connect (GTK_OBJECT (pref
->checkbutton_process_subtract
),
829 G_CALLBACK (on_checkbutton_process_subtract_activate
),
835 pref
->checkbutton_process_vorstra
=
836 gtk_check_button_new_with_label (_("vorticity"));
837 gtk_widget_ref (pref
->checkbutton_process_vorstra
);
838 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
839 "checkbutton_process_vorstra",
840 pref
->checkbutton_process_vorstra
,
841 (GtkDestroyNotify
) gtk_widget_unref
);
842 if (default_par
->process__vorstra
) {
843 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
844 (pref
->checkbutton_process_vorstra
),
847 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
848 (pref
->checkbutton_process_vorstra
),
851 gtk_widget_show (pref
->checkbutton_process_vorstra
);
852 gtk_box_pack_start (GTK_BOX (pref
->vbox2
),
853 pref
->checkbutton_process_vorstra
,
858 g_signal_connect (GTK_OBJECT (pref
->checkbutton_process_vorstra
),
860 G_CALLBACK (on_checkbutton_process_vorstra_activate
),
866 pref
->hbox1
= gtk_hbox_new (FALSE
,
868 gtk_widget_ref (pref
->hbox1
);
869 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
872 (GtkDestroyNotify
) gtk_widget_unref
);
873 gtk_widget_show (pref
->hbox1
);
874 gtk_table_attach (GTK_TABLE (pref
->table1
),
880 (GtkAttachOptions
) (GTK_FILL
),
881 (GtkAttachOptions
) (GTK_FILL
),
887 pref
->label_spinner_bins
= gtk_label_new (_("number of histogram bins: "));
888 gtk_widget_ref (pref
->label_spinner_bins
);
889 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
890 "label_spinner_bins",
891 pref
->label_spinner_bins
,
892 (GtkDestroyNotify
) gtk_widget_unref
);
893 gtk_widget_show (pref
->label_spinner_bins
);
894 gtk_box_pack_start (GTK_BOX (pref
->hbox1
),
895 pref
->label_spinner_bins
,
902 pref
->spinbutton_bins_adj
= gtk_adjustment_new (10,
908 pref
->spinbutton_bins
=
909 gtk_spin_button_new (GTK_ADJUSTMENT (pref
->spinbutton_bins_adj
),
912 gtk_widget_ref (pref
->spinbutton_bins
);
913 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
915 pref
->spinbutton_bins
,
916 (GtkDestroyNotify
) gtk_widget_unref
);
917 gtk_widget_show (pref
->spinbutton_bins
);
918 gtk_box_pack_start (GTK_BOX (pref
->hbox1
),
919 pref
->spinbutton_bins
,
924 g_signal_connect (GTK_OBJECT (pref
->spinbutton_bins
),
926 G_CALLBACK (on_spinbutton_bins_activate
),
932 pref
->hbox2
= gtk_hbox_new (FALSE
,
934 gtk_widget_ref (pref
->hbox2
);
935 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
938 (GtkDestroyNotify
) gtk_widget_unref
);
939 gtk_widget_show (pref
->hbox2
);
940 gtk_table_attach (GTK_TABLE (pref
->table1
),
946 (GtkAttachOptions
) (GTK_FILL
),
947 (GtkAttachOptions
) (GTK_FILL
),
951 pref
->label_spinner_nodes
= gtk_label_new (_("number of cluster nodes: "));
952 gtk_widget_ref (pref
->label_spinner_nodes
);
953 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
954 "label_spinner_nodes",
955 pref
->label_spinner_nodes
,
956 (GtkDestroyNotify
) gtk_widget_unref
);
957 gtk_widget_show (pref
->label_spinner_nodes
);
958 gtk_box_pack_start (GTK_BOX (pref
->hbox2
),
959 pref
->label_spinner_nodes
,
966 pref
->spinbutton_nodes_adj
= gtk_adjustment_new (4,
972 pref
->spinbutton_nodes
=
973 gtk_spin_button_new (GTK_ADJUSTMENT (pref
->spinbutton_nodes_adj
),
976 gtk_widget_ref (pref
->spinbutton_nodes
);
977 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
979 pref
->spinbutton_nodes
,
980 (GtkDestroyNotify
) gtk_widget_unref
);
981 gtk_widget_show (pref
->spinbutton_nodes
);
982 gtk_box_pack_start (GTK_BOX (pref
->hbox2
),
983 pref
->spinbutton_nodes
,
988 g_signal_connect (GTK_OBJECT (pref
->spinbutton_nodes
),
990 G_CALLBACK (on_spinbutton_nodes
),
996 pref->tab1 = gtk_label_new (_("console"));
997 gtk_widget_ref (pref->tab1);
998 gtk_object_set_data_full (GTK_OBJECT (pref->preferences),
1001 (GtkDestroyNotify) gtk_widget_unref);
1002 gtk_widget_show (pref->tab1);
1003 gtk_notebook_set_tab_label (GTK_NOTEBOOK (pref->notebook),
1004 gtk_notebook_get_nth_page
1005 (GTK_NOTEBOOK (pref->notebook),
1015 pref
->table2
= gtk_table_new (3,
1018 gtk_widget_ref (pref
->table2
);
1019 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
1022 (GtkDestroyNotify
) gtk_widget_unref
);
1023 gtk_widget_show (pref
->table2
);
1024 gtk_container_add (GTK_CONTAINER (pref
->notebook
),
1031 pref
->frame_display_vecscale
= gtk_frame_new (_("vector scale"));
1032 gtk_widget_ref (pref
->frame_display_vecscale
);
1033 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
1034 "frame_display_vecscale",
1035 pref
->frame_display_vecscale
,
1036 (GtkDestroyNotify
) gtk_widget_unref
);
1037 gtk_widget_show (pref
->frame_display_vecscale
);
1038 gtk_table_attach (GTK_TABLE (pref
->table2
),
1039 pref
->frame_display_vecscale
,
1044 (GtkAttachOptions
) (GTK_EXPAND
| GTK_FILL
),
1045 (GtkAttachOptions
) (GTK_EXPAND
| GTK_FILL
),
1050 pref
->vbox_display_vecscale
= gtk_vbox_new(FALSE
,
1052 gtk_widget_ref(pref
->vbox_display_vecscale
);
1053 gtk_object_set_data_full(GTK_OBJECT(gpiv
->console
),
1054 "vbox_display_vecscale",
1055 pref
->vbox_display_vecscale
,
1056 (GtkDestroyNotify
) gtk_widget_unref
);
1057 gtk_widget_show(pref
->vbox_display_vecscale
);
1058 gtk_container_add(GTK_CONTAINER(pref
->frame_display_vecscale
),
1059 pref
->vbox_display_vecscale
);
1063 pref
->radiobutton_display_vecscale1
=
1064 gtk_radio_button_new_with_label(pref
->vecscale_group
,
1066 pref
->vecscale_group
=
1067 gtk_radio_button_group(GTK_RADIO_BUTTON
1068 (pref
->radiobutton_display_vecscale1
));
1069 gtk_widget_ref(pref
->radiobutton_display_vecscale1
);
1070 gtk_object_set_data_full(GTK_OBJECT(gpiv
->console
),
1071 "radiobutton_display_vecscale1",
1072 pref
->radiobutton_display_vecscale1
,
1073 (GtkDestroyNotify
) gtk_widget_unref
);
1074 if (default_par
->display__vector_scale
== 1) {
1075 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1076 (pref
->radiobutton_display_vecscale1
),
1079 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1080 (pref
->radiobutton_display_vecscale1
),
1084 gtk_widget_show(pref
->radiobutton_display_vecscale1
);
1085 gtk_box_pack_start(GTK_BOX(pref
->vbox_display_vecscale
),
1086 pref
->radiobutton_display_vecscale1
,
1090 gtk_object_set_data(GTK_OBJECT(pref
->radiobutton_display_vecscale1
),
1097 pref
->radiobutton_display_vecscale2
=
1098 gtk_radio_button_new_with_label(pref
->vecscale_group
, _("2"));
1099 pref
->vecscale_group
=
1100 gtk_radio_button_group(GTK_RADIO_BUTTON
1101 (pref
->radiobutton_display_vecscale2
));
1102 gtk_widget_ref(pref
->radiobutton_display_vecscale2
);
1103 gtk_object_set_data_full(GTK_OBJECT(gpiv
->console
),
1104 "radiobutton_display_vecscale2",
1105 pref
->radiobutton_display_vecscale2
,
1106 (GtkDestroyNotify
) gtk_widget_unref
);
1107 if (default_par
->display__vector_scale
== 2) {
1108 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1109 (pref
->radiobutton_display_vecscale2
),
1112 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1113 (pref
->radiobutton_display_vecscale2
),
1116 gtk_widget_show(pref
->radiobutton_display_vecscale2
);
1117 gtk_box_pack_start(GTK_BOX(pref
->vbox_display_vecscale
),
1118 pref
->radiobutton_display_vecscale2
,
1122 gtk_object_set_data(GTK_OBJECT(pref
->radiobutton_display_vecscale2
),
1129 pref
->radiobutton_display_vecscale3
=
1130 gtk_radio_button_new_with_label(pref
->vecscale_group
, _("4"));
1131 pref
->vecscale_group
=
1132 gtk_radio_button_group(GTK_RADIO_BUTTON
1133 (pref
->radiobutton_display_vecscale3
));
1134 gtk_widget_ref(pref
->radiobutton_display_vecscale3
);
1135 gtk_object_set_data_full(GTK_OBJECT(gpiv
->console
),
1136 "radiobutton_display_vecscale3",
1137 pref
->radiobutton_display_vecscale3
,
1138 (GtkDestroyNotify
) gtk_widget_unref
);
1139 if (default_par
->display__vector_scale
== 4) {
1140 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1141 (pref
->radiobutton_display_vecscale3
),
1144 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1145 (pref
->radiobutton_display_vecscale3
),
1148 gtk_widget_show(pref
->radiobutton_display_vecscale3
);
1149 gtk_box_pack_start(GTK_BOX(pref
->vbox_display_vecscale
),
1150 pref
->radiobutton_display_vecscale3
,
1154 gtk_object_set_data(GTK_OBJECT(pref
->radiobutton_display_vecscale3
),
1161 pref
->radiobutton_display_vecscale4
=
1162 gtk_radio_button_new_with_label(pref
->vecscale_group
, _("8"));
1163 pref
->vecscale_group
=
1164 gtk_radio_button_group(GTK_RADIO_BUTTON
1165 (pref
->radiobutton_display_vecscale4
));
1166 gtk_widget_ref(pref
->radiobutton_display_vecscale4
);
1167 gtk_object_set_data_full(GTK_OBJECT(gpiv
->console
),
1168 "radiobutton_display_vecscale4",
1169 pref
->radiobutton_display_vecscale4
,
1170 (GtkDestroyNotify
) gtk_widget_unref
);
1171 if (default_par
->display__vector_scale
== 8) {
1172 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1173 (pref
->radiobutton_display_vecscale4
),
1176 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1177 (pref
->radiobutton_display_vecscale4
),
1180 gtk_widget_show(pref
->radiobutton_display_vecscale4
);
1181 gtk_box_pack_start(GTK_BOX(pref
->vbox_display_vecscale
),
1182 pref
->radiobutton_display_vecscale4
,
1186 gtk_object_set_data(GTK_OBJECT(pref
->radiobutton_display_vecscale4
),
1193 pref
->radiobutton_display_vecscale5
=
1194 gtk_radio_button_new_with_label(pref
->vecscale_group
, _("16"));
1195 pref
->vecscale_group
=
1196 gtk_radio_button_group(GTK_RADIO_BUTTON
1197 (pref
->radiobutton_display_vecscale5
));
1198 gtk_widget_ref(pref
->radiobutton_display_vecscale5
);
1199 gtk_object_set_data_full(GTK_OBJECT(gpiv
->console
),
1200 "radiobutton_display_vecscale5",
1201 pref
->radiobutton_display_vecscale5
,
1202 (GtkDestroyNotify
) gtk_widget_unref
);
1203 if (default_par
->display__vector_scale
== 16) {
1204 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1205 (pref
->radiobutton_display_vecscale5
),
1208 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1209 (pref
->radiobutton_display_vecscale5
),
1212 gtk_widget_show(pref
->radiobutton_display_vecscale5
);
1213 gtk_box_pack_start(GTK_BOX(pref
->vbox_display_vecscale
),
1214 pref
->radiobutton_display_vecscale5
, FALSE
, FALSE
, 0);
1215 gtk_object_set_data(GTK_OBJECT(pref
->radiobutton_display_vecscale5
),
1222 pref
->radiobutton_display_vecscale6
=
1223 gtk_radio_button_new_with_label(pref
->vecscale_group
, _("32"));
1224 pref
->vecscale_group
=
1225 gtk_radio_button_group(GTK_RADIO_BUTTON
1226 (pref
->radiobutton_display_vecscale6
));
1227 gtk_widget_ref(pref
->radiobutton_display_vecscale6
);
1228 gtk_object_set_data_full(GTK_OBJECT(gpiv
->console
),
1229 "radiobutton_display_vecscale6",
1230 pref
->radiobutton_display_vecscale6
,
1231 (GtkDestroyNotify
) gtk_widget_unref
);
1232 if (default_par
->display__vector_scale
== 32) {
1233 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1234 (pref
->radiobutton_display_vecscale6
),
1237 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1238 (pref
->radiobutton_display_vecscale6
),
1241 gtk_widget_show(pref
->radiobutton_display_vecscale6
);
1242 gtk_box_pack_start(GTK_BOX(pref
->vbox_display_vecscale
),
1243 pref
->radiobutton_display_vecscale6
, FALSE
, FALSE
, 0);
1244 gtk_object_set_data(GTK_OBJECT(pref
->radiobutton_display_vecscale6
),
1251 pref
->radiobutton_display_vecscale7
=
1252 gtk_radio_button_new_with_label(pref
->vecscale_group
, _("64"));
1253 pref
->vecscale_group
=
1254 gtk_radio_button_group(GTK_RADIO_BUTTON
1255 (pref
->radiobutton_display_vecscale7
));
1256 gtk_widget_ref(pref
->radiobutton_display_vecscale7
);
1257 gtk_object_set_data_full(GTK_OBJECT(gpiv
->console
),
1258 "radiobutton_display_vecscale7",
1259 pref
->radiobutton_display_vecscale7
,
1260 (GtkDestroyNotify
) gtk_widget_unref
);
1261 if (default_par
->display__vector_scale
== 64) {
1262 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1263 (pref
->radiobutton_display_vecscale7
),
1266 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1267 (pref
->radiobutton_display_vecscale7
),
1270 gtk_widget_show(pref
->radiobutton_display_vecscale7
);
1271 gtk_box_pack_start(GTK_BOX(pref
->vbox_display_vecscale
),
1272 pref
->radiobutton_display_vecscale7
, FALSE
, FALSE
, 0);
1273 gtk_object_set_data(GTK_OBJECT(pref
->radiobutton_display_vecscale7
),
1281 pref
->frame_display_veccolor
= gtk_frame_new (_("vector color"));
1282 gtk_widget_ref (pref
->frame_display_veccolor
);
1283 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
1284 "frame_display_veccolor",
1285 pref
->frame_display_veccolor
,
1286 (GtkDestroyNotify
) gtk_widget_unref
);
1287 gtk_widget_show (pref
->frame_display_veccolor
);
1288 gtk_table_attach (GTK_TABLE (pref
->table2
),
1289 pref
->frame_display_veccolor
,
1294 (GtkAttachOptions
) (GTK_EXPAND
| GTK_FILL
),
1295 (GtkAttachOptions
) (GTK_EXPAND
| GTK_FILL
),
1300 pref
->vbox_display_veccolor
= gtk_vbox_new(FALSE
,
1302 gtk_widget_ref(pref
->vbox_display_veccolor
);
1303 gtk_object_set_data_full(GTK_OBJECT(gpiv
->console
),
1304 "vbox_display_veccolor",
1305 pref
->vbox_display_veccolor
,
1306 (GtkDestroyNotify
) gtk_widget_unref
);
1307 gtk_widget_show(pref
->vbox_display_veccolor
);
1308 gtk_container_add(GTK_CONTAINER(pref
->frame_display_veccolor
),
1309 pref
->vbox_display_veccolor
);
1313 pref
->radiobutton_display_veccolor1
=
1314 gtk_radio_button_new_with_label(pref
->veccolor_group
,
1316 pref
->veccolor_group
=
1317 gtk_radio_button_group(GTK_RADIO_BUTTON
1318 (pref
->radiobutton_display_veccolor1
));
1319 gtk_widget_ref(pref
->radiobutton_display_veccolor1
);
1320 gtk_object_set_data_full(GTK_OBJECT(gpiv
->console
),
1321 "radiobutton_display_veccolor1",
1322 pref
->radiobutton_display_veccolor1
,
1323 (GtkDestroyNotify
) gtk_widget_unref
);
1324 if (default_par
->display__vector_color
== SHOW_PEAKNR
) {
1325 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1326 (pref
->radiobutton_display_veccolor1
),
1329 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1330 (pref
->radiobutton_display_veccolor1
),
1334 gtk_widget_show(pref
->radiobutton_display_veccolor1
);
1335 gtk_box_pack_start(GTK_BOX(pref
->vbox_display_veccolor
),
1336 pref
->radiobutton_display_veccolor1
,
1340 gtk_object_set_data(GTK_OBJECT(pref
->radiobutton_display_veccolor1
),
1342 (int *) SHOW_PEAKNR
);
1347 pref
->radiobutton_display_veccolor2
=
1348 gtk_radio_button_new_with_label(pref
->veccolor_group
,
1350 pref
->veccolor_group
=
1351 gtk_radio_button_group(GTK_RADIO_BUTTON
1352 (pref
->radiobutton_display_veccolor2
));
1353 gtk_widget_ref(pref
->radiobutton_display_veccolor2
);
1354 gtk_object_set_data_full(GTK_OBJECT(gpiv
->console
),
1355 "radiobutton_display_veccolor2",
1356 pref
->radiobutton_display_veccolor2
,
1357 (GtkDestroyNotify
) gtk_widget_unref
);
1358 if (default_par
->display__vector_color
== SHOW_SNR
) {
1359 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1360 (pref
->radiobutton_display_veccolor2
),
1363 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1364 (pref
->radiobutton_display_veccolor2
),
1368 gtk_widget_show(pref
->radiobutton_display_veccolor2
);
1369 gtk_box_pack_start(GTK_BOX(pref
->vbox_display_veccolor
),
1370 pref
->radiobutton_display_veccolor2
,
1374 gtk_object_set_data(GTK_OBJECT(pref
->radiobutton_display_veccolor2
),
1381 pref
->radiobutton_display_veccolor3
=
1382 gtk_radio_button_new_with_label(pref
->veccolor_group
,
1383 _("Magnitude gray"));
1384 pref
->veccolor_group
=
1385 gtk_radio_button_group(GTK_RADIO_BUTTON
1386 (pref
->radiobutton_display_veccolor3
));
1387 gtk_widget_ref(pref
->radiobutton_display_veccolor3
);
1388 gtk_object_set_data_full(GTK_OBJECT(gpiv
->console
),
1389 "radiobutton_display_veccolor3",
1390 pref
->radiobutton_display_veccolor3
,
1391 (GtkDestroyNotify
) gtk_widget_unref
);
1392 if (default_par
->display__vector_color
== SHOW_MAGNITUDE_GRAY
) {
1393 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1394 (pref
->radiobutton_display_veccolor3
),
1397 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1398 (pref
->radiobutton_display_veccolor3
),
1402 gtk_widget_show(pref
->radiobutton_display_veccolor3
);
1403 gtk_box_pack_start(GTK_BOX(pref
->vbox_display_veccolor
),
1404 pref
->radiobutton_display_veccolor3
,
1408 gtk_object_set_data(GTK_OBJECT(pref
->radiobutton_display_veccolor3
),
1410 (int *) SHOW_MAGNITUDE_GRAY
);
1415 pref
->radiobutton_display_veccolor4
=
1416 gtk_radio_button_new_with_label(pref
->veccolor_group
,
1417 _("Magnitude color"));
1418 pref
->veccolor_group
=
1419 gtk_radio_button_group(GTK_RADIO_BUTTON
1420 (pref
->radiobutton_display_veccolor4
));
1421 gtk_widget_ref(pref
->radiobutton_display_veccolor4
);
1422 gtk_object_set_data_full(GTK_OBJECT(gpiv
->console
),
1423 "radiobutton_display_veccolor4",
1424 pref
->radiobutton_display_veccolor4
,
1425 (GtkDestroyNotify
) gtk_widget_unref
);
1426 if (default_par
->display__vector_color
== SHOW_MAGNITUDE
) {
1427 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1428 (pref
->radiobutton_display_veccolor4
),
1431 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1432 (pref
->radiobutton_display_veccolor4
),
1436 gtk_widget_show(pref
->radiobutton_display_veccolor4
);
1437 gtk_box_pack_start(GTK_BOX(pref
->vbox_display_veccolor
),
1438 pref
->radiobutton_display_veccolor4
,
1442 gtk_object_set_data(GTK_OBJECT(pref
->radiobutton_display_veccolor4
),
1444 (int *) SHOW_MAGNITUDE
);
1452 pref
->frame_display_zoomscale
= gtk_frame_new (_("zoom scale"));
1453 gtk_widget_ref (pref
->frame_display_zoomscale
);
1454 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
1455 "frame_display_zoomscale",
1456 pref
->frame_display_zoomscale
,
1457 (GtkDestroyNotify
) gtk_widget_unref
);
1458 gtk_widget_show (pref
->frame_display_zoomscale
);
1459 gtk_table_attach (GTK_TABLE (pref
->table2
), pref
->frame_display_zoomscale
,
1464 (GtkAttachOptions
) (GTK_EXPAND
| GTK_FILL
),
1465 (GtkAttachOptions
) (GTK_EXPAND
| GTK_FILL
),
1470 pref
->vbox_display_zoomscale
= gtk_vbox_new(FALSE
, 0);
1471 gtk_widget_ref(pref
->vbox_display_zoomscale
);
1472 gtk_object_set_data_full(GTK_OBJECT(gpiv
->console
),
1473 "vbox_display_zoomscale",
1474 pref
->vbox_display_zoomscale
,
1475 (GtkDestroyNotify
) gtk_widget_unref
);
1476 gtk_widget_show(pref
->vbox_display_zoomscale
);
1477 gtk_container_add(GTK_CONTAINER(pref
->frame_display_zoomscale
),
1478 pref
->vbox_display_zoomscale
);
1483 pref
->radiobutton_display_zoomscale0
=
1484 gtk_radio_button_new_with_label(pref
->zoomscale_group
, _("0.25"));
1485 pref
->zoomscale_group
=
1486 gtk_radio_button_group(GTK_RADIO_BUTTON
1487 (pref
->radiobutton_display_zoomscale0
));
1488 gtk_widget_ref(pref
->radiobutton_display_zoomscale0
);
1489 gtk_object_set_data_full(GTK_OBJECT(gpiv
->console
),
1490 "radiobutton_display_zoomscale0",
1491 pref
->radiobutton_display_zoomscale0
,
1492 (GtkDestroyNotify
) gtk_widget_unref
);
1493 if (default_par
->display__zoom_index
== ZOOM_0
) {
1494 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1495 (pref
->radiobutton_display_zoomscale0
),
1498 gtk_widget_show(pref
->radiobutton_display_zoomscale0
);
1499 gtk_box_pack_start(GTK_BOX(pref
->vbox_display_zoomscale
),
1500 pref
->radiobutton_display_zoomscale0
,
1504 gtk_object_set_data(GTK_OBJECT(pref
->radiobutton_display_zoomscale0
),
1511 pref
->radiobutton_display_zoomscale1
=
1512 gtk_radio_button_new_with_label(pref
->zoomscale_group
, _("0.5"));
1513 pref
->zoomscale_group
=
1514 gtk_radio_button_group(GTK_RADIO_BUTTON
1515 (pref
->radiobutton_display_zoomscale1
));
1516 gtk_widget_ref(pref
->radiobutton_display_zoomscale1
);
1517 gtk_object_set_data_full(GTK_OBJECT(gpiv
->console
),
1518 "radiobutton_display_zoomscale1",
1519 pref
->radiobutton_display_zoomscale1
,
1520 (GtkDestroyNotify
) gtk_widget_unref
);
1521 if (default_par
->display__zoom_index
== ZOOM_1
) {
1522 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1523 (pref
->radiobutton_display_zoomscale1
),
1526 gtk_widget_show(pref
->radiobutton_display_zoomscale1
);
1527 gtk_box_pack_start(GTK_BOX(pref
->vbox_display_zoomscale
),
1528 pref
->radiobutton_display_zoomscale1
,
1532 gtk_object_set_data(GTK_OBJECT(pref
->radiobutton_display_zoomscale1
),
1539 pref
->radiobutton_display_zoomscale2
=
1540 gtk_radio_button_new_with_label(pref
->zoomscale_group
, _("0.83"));
1541 pref
->zoomscale_group
=
1542 gtk_radio_button_group(GTK_RADIO_BUTTON
1543 (pref
->radiobutton_display_zoomscale2
));
1544 gtk_widget_ref(pref
->radiobutton_display_zoomscale2
);
1545 gtk_object_set_data_full(GTK_OBJECT(gpiv
->console
),
1546 "radiobutton_display_zoomscale2",
1547 pref
->radiobutton_display_zoomscale2
,
1548 (GtkDestroyNotify
) gtk_widget_unref
);
1549 if (default_par
->display__zoom_index
== ZOOM_2
) {
1550 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1551 (pref
->radiobutton_display_zoomscale2
),
1554 gtk_widget_show(pref
->radiobutton_display_zoomscale2
);
1555 gtk_box_pack_start(GTK_BOX(pref
->vbox_display_zoomscale
),
1556 pref
->radiobutton_display_zoomscale2
,
1560 gtk_object_set_data(GTK_OBJECT(pref
->radiobutton_display_zoomscale2
),
1567 pref
->radiobutton_display_zoomscale3
=
1568 gtk_radio_button_new_with_label(pref
->zoomscale_group
, _("1.0"));
1569 pref
->zoomscale_group
=
1570 gtk_radio_button_group(GTK_RADIO_BUTTON
1571 (pref
->radiobutton_display_zoomscale3
));
1572 gtk_widget_ref(pref
->radiobutton_display_zoomscale3
);
1573 gtk_object_set_data_full(GTK_OBJECT(gpiv
->console
),
1574 "radiobutton_display_zoomscale3",
1575 pref
->radiobutton_display_zoomscale3
,
1576 (GtkDestroyNotify
) gtk_widget_unref
);
1577 if (default_par
->display__zoom_index
== ZOOM_3
) {
1578 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1579 (pref
->radiobutton_display_zoomscale3
),
1582 gtk_widget_show(pref
->radiobutton_display_zoomscale3
);
1583 gtk_box_pack_start(GTK_BOX(pref
->vbox_display_zoomscale
),
1584 pref
->radiobutton_display_zoomscale3
,
1588 gtk_object_set_data(GTK_OBJECT(pref
->radiobutton_display_zoomscale3
),
1595 pref
->radiobutton_display_zoomscale4
=
1596 gtk_radio_button_new_with_label(pref
->zoomscale_group
, _("1.3"));
1597 pref
->zoomscale_group
=
1598 gtk_radio_button_group(GTK_RADIO_BUTTON
1599 (pref
->radiobutton_display_zoomscale4
));
1600 gtk_widget_ref(pref
->radiobutton_display_zoomscale4
);
1601 gtk_object_set_data_full(GTK_OBJECT(gpiv
->console
),
1602 "radiobutton_display_zoomscale4",
1603 pref
->radiobutton_display_zoomscale4
,
1604 (GtkDestroyNotify
) gtk_widget_unref
);
1605 if (default_par
->display__zoom_index
== ZOOM_4
) {
1606 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1607 (pref
->radiobutton_display_zoomscale4
),
1610 gtk_widget_show(pref
->radiobutton_display_zoomscale4
);
1611 gtk_box_pack_start(GTK_BOX(pref
->vbox_display_zoomscale
),
1612 pref
->radiobutton_display_zoomscale4
,
1616 gtk_object_set_data(GTK_OBJECT(pref
->radiobutton_display_zoomscale4
),
1623 pref
->radiobutton_display_zoomscale5
=
1624 gtk_radio_button_new_with_label(pref
->zoomscale_group
, _("1.6"));
1625 pref
->zoomscale_group
=
1626 gtk_radio_button_group(GTK_RADIO_BUTTON
1627 (pref
->radiobutton_display_zoomscale5
));
1628 gtk_widget_ref(pref
->radiobutton_display_zoomscale5
);
1629 gtk_object_set_data_full(GTK_OBJECT(gpiv
->console
),
1630 "radiobutton_display_zoomscale5",
1631 pref
->radiobutton_display_zoomscale5
,
1632 (GtkDestroyNotify
) gtk_widget_unref
);
1633 if (default_par
->display__zoom_index
== ZOOM_5
) {
1634 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1635 (pref
->radiobutton_display_zoomscale5
),
1638 gtk_widget_show(pref
->radiobutton_display_zoomscale5
);
1639 gtk_box_pack_start(GTK_BOX(pref
->vbox_display_zoomscale
),
1640 pref
->radiobutton_display_zoomscale5
,
1644 gtk_object_set_data(GTK_OBJECT(pref
->radiobutton_display_zoomscale5
),
1651 pref
->radiobutton_display_zoomscale6
=
1652 gtk_radio_button_new_with_label(pref
->zoomscale_group
, _("2.0"));
1653 pref
->zoomscale_group
=
1654 gtk_radio_button_group(GTK_RADIO_BUTTON
1655 (pref
->radiobutton_display_zoomscale6
));
1656 gtk_widget_ref(pref
->radiobutton_display_zoomscale6
);
1657 gtk_object_set_data_full(GTK_OBJECT(gpiv
->console
),
1658 "radiobutton_display_zoomscale6",
1659 pref
->radiobutton_display_zoomscale6
,
1660 (GtkDestroyNotify
) gtk_widget_unref
);
1661 if (default_par
->display__zoom_index
== ZOOM_6
) {
1662 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1663 (pref
->radiobutton_display_zoomscale6
),
1666 gtk_widget_show(pref
->radiobutton_display_zoomscale6
);
1667 gtk_box_pack_start(GTK_BOX(pref
->vbox_display_zoomscale
),
1668 pref
->radiobutton_display_zoomscale6
,
1672 gtk_object_set_data(GTK_OBJECT(pref
->radiobutton_display_zoomscale6
),
1677 pref
->radiobutton_display_zoomscale7
=
1678 gtk_radio_button_new_with_label(pref
->zoomscale_group
, _("4.0"));
1679 pref
->zoomscale_group
=
1680 gtk_radio_button_group(GTK_RADIO_BUTTON
1681 (pref
->radiobutton_display_zoomscale7
));
1682 gtk_widget_ref(pref
->radiobutton_display_zoomscale7
);
1683 gtk_object_set_data_full(GTK_OBJECT(gpiv
->console
),
1684 "radiobutton_display_zoomscale7",
1685 pref
->radiobutton_display_zoomscale7
,
1686 (GtkDestroyNotify
) gtk_widget_unref
);
1687 if (default_par
->display__zoom_index
== ZOOM_7
) {
1688 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1689 (pref
->radiobutton_display_zoomscale7
),
1692 gtk_widget_show(pref
->radiobutton_display_zoomscale7
);
1693 gtk_box_pack_start(GTK_BOX(pref
->vbox_display_zoomscale
),
1694 pref
->radiobutton_display_zoomscale7
,
1698 gtk_object_set_data(GTK_OBJECT(pref
->radiobutton_display_zoomscale7
),
1707 pref
->frame_display_backgroundcolor
= gtk_frame_new (_("background"));
1708 gtk_widget_ref (pref
->frame_display_backgroundcolor
);
1709 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
1710 "frame_display_backgroundcolor",
1711 pref
->frame_display_backgroundcolor
,
1712 (GtkDestroyNotify
) gtk_widget_unref
);
1713 gtk_widget_show (pref
->frame_display_backgroundcolor
);
1714 gtk_table_attach (GTK_TABLE (pref
->table2
),
1715 pref
->frame_display_backgroundcolor
,
1720 (GtkAttachOptions
) (GTK_EXPAND
| GTK_FILL
),
1721 (GtkAttachOptions
) (GTK_EXPAND
| GTK_FILL
),
1726 pref
->vbox_display_backgroundcolor
= gtk_vbox_new(FALSE
,
1728 gtk_widget_ref(pref
->vbox_display_backgroundcolor
);
1729 gtk_object_set_data_full(GTK_OBJECT(gpiv
->console
),
1730 "vbox_display_backgroundcolor",
1731 pref
->vbox_display_backgroundcolor
,
1732 (GtkDestroyNotify
) gtk_widget_unref
);
1733 gtk_widget_show(pref
->vbox_display_backgroundcolor
);
1734 gtk_container_add(GTK_CONTAINER(pref
->frame_display_backgroundcolor
),
1735 pref
->vbox_display_backgroundcolor
);
1739 pref
->radiobutton_display_backgroundcolor1
=
1740 gtk_radio_button_new_with_label(pref
->backgroundcolor_group
,
1742 pref
->backgroundcolor_group
=
1743 gtk_radio_button_group(GTK_RADIO_BUTTON
1744 (pref
->radiobutton_display_backgroundcolor1
));
1745 gtk_widget_ref(pref
->radiobutton_display_backgroundcolor1
);
1746 gtk_object_set_data_full(GTK_OBJECT(gpiv
->console
),
1747 "radiobutton_display_backgroundcolor1",
1748 pref
->radiobutton_display_backgroundcolor1
,
1749 (GtkDestroyNotify
) gtk_widget_unref
);
1750 if (default_par
->display__backgrnd
== SHOW_BG_DARKBLUE
) {
1751 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1752 (pref
->radiobutton_display_backgroundcolor1
),
1755 gtk_widget_show(pref
->radiobutton_display_backgroundcolor1
);
1756 gtk_box_pack_start(GTK_BOX(pref
->vbox_display_backgroundcolor
),
1757 pref
->radiobutton_display_backgroundcolor1
,
1761 gtk_object_set_data(GTK_OBJECT(pref
->radiobutton_display_backgroundcolor1
),
1763 (int *) SHOW_BG_DARKBLUE
);
1767 pref
->radiobutton_display_backgroundcolor2
=
1768 gtk_radio_button_new_with_label(pref
->backgroundcolor_group
,
1770 pref
->backgroundcolor_group
=
1771 gtk_radio_button_group(GTK_RADIO_BUTTON
1772 (pref
->radiobutton_display_backgroundcolor2
));
1773 gtk_widget_ref(pref
->radiobutton_display_backgroundcolor2
);
1774 gtk_object_set_data_full(GTK_OBJECT(gpiv
->console
),
1775 "radiobutton_display_backgroundcolor2",
1776 pref
->radiobutton_display_backgroundcolor2
,
1777 (GtkDestroyNotify
) gtk_widget_unref
);
1778 if (default_par
->display__backgrnd
== SHOW_BG_BLACK
) {
1779 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1780 (pref
->radiobutton_display_backgroundcolor2
),
1783 gtk_widget_show(pref
->radiobutton_display_backgroundcolor2
);
1784 gtk_box_pack_start(GTK_BOX(pref
->vbox_display_backgroundcolor
),
1785 pref
->radiobutton_display_backgroundcolor2
,
1789 gtk_object_set_data(GTK_OBJECT(pref
->radiobutton_display_backgroundcolor2
),
1791 (int *) SHOW_BG_BLACK
);
1795 pref
->radiobutton_display_background_img1
=
1796 gtk_radio_button_new_with_label(pref
->backgroundcolor_group
,
1798 pref
->backgroundcolor_group
=
1799 gtk_radio_button_group(GTK_RADIO_BUTTON
1800 (pref
->radiobutton_display_background_img1
));
1801 gtk_widget_ref (pref
->radiobutton_display_background_img1
);
1802 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
1803 "radiobutton_display_background_img1",
1804 pref
->radiobutton_display_background_img1
,
1805 (GtkDestroyNotify
) gtk_widget_unref
);
1806 if (default_par
->display__backgrnd
== SHOW_BG_IMG1
) {
1807 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1808 (pref
->radiobutton_display_background_img1
),
1811 gtk_widget_show (pref
->radiobutton_display_background_img1
);
1812 gtk_box_pack_start (GTK_BOX (pref
->vbox_display_backgroundcolor
),
1813 pref
->radiobutton_display_background_img1
,
1817 gtk_object_set_data(GTK_OBJECT(pref
->radiobutton_display_background_img1
),
1819 (int *) SHOW_BG_IMG1
);
1823 pref
->radiobutton_display_background_img2
=
1824 gtk_radio_button_new_with_label(pref
->backgroundcolor_group
,
1826 pref
->backgroundcolor_group
=
1827 gtk_radio_button_group(GTK_RADIO_BUTTON
1828 (pref
->radiobutton_display_background_img2
));
1829 gtk_widget_ref (pref
->radiobutton_display_background_img2
);
1830 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
1831 "radiobutton_display_background_img2",
1832 pref
->radiobutton_display_background_img2
,
1833 (GtkDestroyNotify
) gtk_widget_unref
);
1834 if (default_par
->display__backgrnd
== SHOW_BG_IMG2
) {
1835 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1836 (pref
->radiobutton_display_background_img2
),
1839 gtk_widget_show (pref
->radiobutton_display_background_img2
);
1840 gtk_box_pack_start (GTK_BOX (pref
->vbox_display_backgroundcolor
),
1841 pref
->radiobutton_display_background_img2
,
1845 gtk_object_set_data(GTK_OBJECT(pref
->radiobutton_display_background_img2
),
1847 (int *) SHOW_BG_IMG2
);
1852 * Hide and display PIV data
1855 pref
->frame_display_display
= gtk_frame_new (_("hide/display PIV data"));
1856 gtk_widget_ref (pref
->frame_display_display
);
1857 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
1858 "frame_display_display",
1859 pref
->frame_display_display
,
1860 (GtkDestroyNotify
) gtk_widget_unref
);
1861 gtk_widget_show (pref
->frame_display_display
);
1862 gtk_table_attach (GTK_TABLE (pref
->table2
),
1863 pref
->frame_display_display
,
1868 (GtkAttachOptions
) (GTK_EXPAND
| GTK_FILL
),
1869 (GtkAttachOptions
) (GTK_FILL
),
1873 pref
->vbox_display_display
= gtk_vbox_new (FALSE
, 0);
1874 gtk_widget_ref (pref
->vbox_display_display
);
1875 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
1876 "vbox_display_display",
1877 pref
->vbox_display_display
,
1878 (GtkDestroyNotify
) gtk_widget_unref
);
1879 gtk_widget_show (pref
->vbox_display_display
);
1880 gtk_container_add (GTK_CONTAINER (pref
->frame_display_display
),
1881 pref
->vbox_display_display
);
1885 pref
->checkbutton_display_display_intregs
=
1886 gtk_check_button_new_with_label (_("Interrogation area's"));
1887 gtk_widget_ref (pref
->checkbutton_display_display_intregs
);
1888 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
1889 "checkbutton_display_display_intregs",
1890 pref
->checkbutton_display_display_intregs
,
1891 (GtkDestroyNotify
) gtk_widget_unref
);
1892 if (default_par
->display__intregs
== 1) {
1893 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1894 (pref
->checkbutton_display_display_intregs
),
1897 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1898 (pref
->checkbutton_display_display_intregs
),
1901 gtk_widget_show (pref
->checkbutton_display_display_intregs
);
1902 gtk_box_pack_start (GTK_BOX (pref
->vbox_display_display
),
1903 pref
->checkbutton_display_display_intregs
,
1910 pref
->checkbutton_display_display_piv
=
1911 gtk_check_button_new_with_label (_("Velocity vectors"));
1912 gtk_widget_ref (pref
->checkbutton_display_display_piv
);
1913 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
1914 "checkbutton_display_display_piv",
1915 pref
->checkbutton_display_display_piv
,
1916 (GtkDestroyNotify
) gtk_widget_unref
);
1917 if (default_par
->display__piv
) {
1918 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1919 (pref
->checkbutton_display_display_piv
),
1922 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1923 (pref
->checkbutton_display_display_piv
),
1926 gtk_widget_show (pref
->checkbutton_display_display_piv
);
1927 gtk_box_pack_start (GTK_BOX (pref
->vbox_display_display
),
1928 pref
->checkbutton_display_display_piv
,
1936 * Hide and display PIV-derived data
1939 pref
->frame_display_pivderived_display
= gtk_frame_new (_("PIV-derived data"));
1940 gtk_widget_ref (pref
->frame_display_pivderived_display
);
1941 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
1942 "frame_display_pivderived_display",
1943 pref
->frame_display_pivderived_display
,
1944 (GtkDestroyNotify
) gtk_widget_unref
);
1945 gtk_widget_show (pref
->frame_display_pivderived_display
);
1946 gtk_table_attach (GTK_TABLE (pref
->table2
),
1947 pref
->frame_display_pivderived_display
,
1952 (GtkAttachOptions
) (GTK_EXPAND
| GTK_FILL
),
1953 (GtkAttachOptions
) (GTK_FILL
),
1957 /* gtk_box_pack_start (GTK_BOX (pref->vbox_display_display), */
1958 /* pref->frame_display_pivderived_display, */
1965 pref
->vbox_display_pivderived_display
= gtk_vbox_new (FALSE
, 0);
1966 gtk_widget_ref (pref
->vbox_display_pivderived_display
);
1967 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
1968 "vbox_display_pivderived_display",
1969 pref
->vbox_display_pivderived_display
,
1970 (GtkDestroyNotify
) gtk_widget_unref
);
1971 gtk_widget_show (pref
->vbox_display_pivderived_display
);
1972 gtk_container_add (GTK_CONTAINER (pref
->frame_display_pivderived_display
),
1973 pref
->vbox_display_pivderived_display
);
1977 pref
->radiobutton_display_display_none
=
1978 gtk_radio_button_new_with_label (pref
->scalardata_group
,
1980 pref
->scalardata_group
= gtk_radio_button_group(GTK_RADIO_BUTTON
1981 (pref
->radiobutton_display_display_none
));
1982 gtk_widget_ref (pref
->radiobutton_display_display_none
);
1983 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
1984 "radiobutton_display_display_none",
1985 pref
->radiobutton_display_display_none
,
1986 (GtkDestroyNotify
) gtk_widget_unref
);
1987 if (default_par
->display__scalar
== SHOW_SC_NONE
) {
1988 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
1989 (pref
->radiobutton_display_display_none
),
1992 gtk_widget_show (pref
->radiobutton_display_display_none
);
1993 gtk_box_pack_start (GTK_BOX (pref
->vbox_display_pivderived_display
),
1994 pref
->radiobutton_display_display_none
,
1998 gtk_object_set_data(GTK_OBJECT(pref
->radiobutton_display_display_none
),
2000 (int *) SHOW_SC_NONE
);
2004 pref
->radiobutton_display_display_vor
=
2005 gtk_radio_button_new_with_label (pref
->scalardata_group
,
2007 pref
->scalardata_group
= gtk_radio_button_group(GTK_RADIO_BUTTON
2008 (pref
->radiobutton_display_display_vor
));
2009 gtk_widget_ref (pref
->radiobutton_display_display_vor
);
2010 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
2011 "radiobutton_display_display_vor",
2012 pref
->radiobutton_display_display_vor
,
2013 (GtkDestroyNotify
) gtk_widget_unref
);
2014 if (default_par
->display__scalar
== SHOW_SC_VORTICITY
) {
2015 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
2016 (pref
->radiobutton_display_display_vor
),
2019 gtk_widget_show (pref
->radiobutton_display_display_vor
);
2020 gtk_box_pack_start (GTK_BOX (pref
->vbox_display_pivderived_display
),
2021 pref
->radiobutton_display_display_vor
,
2025 gtk_object_set_data(GTK_OBJECT(pref
->radiobutton_display_display_vor
),
2027 (int *) SHOW_SC_VORTICITY
);
2031 pref
->radiobutton_display_display_sstrain
=
2032 gtk_radio_button_new_with_label (pref
->scalardata_group
,
2034 pref
->scalardata_group
= gtk_radio_button_group(GTK_RADIO_BUTTON
2035 (pref
->radiobutton_display_display_sstrain
));
2036 gtk_widget_ref (pref
->radiobutton_display_display_sstrain
);
2037 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
2038 "radiobutton_display_display_sstrain",
2039 pref
->radiobutton_display_display_sstrain
,
2040 (GtkDestroyNotify
) gtk_widget_unref
);
2041 if (default_par
->display__scalar
== SHOW_SC_SSTRAIN
) {
2042 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
2043 (pref
->radiobutton_display_display_sstrain
),
2046 gtk_widget_show (pref
->radiobutton_display_display_sstrain
);
2047 gtk_box_pack_start (GTK_BOX (pref
->vbox_display_pivderived_display
),
2048 pref
->radiobutton_display_display_sstrain
,
2052 gtk_object_set_data(GTK_OBJECT(pref
->radiobutton_display_display_sstrain
),
2054 (int *) SHOW_SC_SSTRAIN
);
2058 pref
->radiobutton_display_display_nstrain
=
2059 gtk_radio_button_new_with_label (pref
->scalardata_group
,
2060 _("Normal strain"));
2061 pref
->scalardata_group
= gtk_radio_button_group(GTK_RADIO_BUTTON
2062 (pref
->radiobutton_display_display_nstrain
));
2063 gtk_widget_ref (pref
->radiobutton_display_display_nstrain
);
2064 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
2065 "radiobutton_display_display_nstrain",
2066 pref
->radiobutton_display_display_nstrain
,
2067 (GtkDestroyNotify
) gtk_widget_unref
);
2068 if (default_par
->display__scalar
== SHOW_SC_NSTRAIN
) {
2069 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
2070 (pref
->radiobutton_display_display_nstrain
),
2073 gtk_widget_show (pref
->radiobutton_display_display_nstrain
);
2074 gtk_box_pack_start (GTK_BOX (pref
->vbox_display_pivderived_display
),
2075 pref
->radiobutton_display_display_nstrain
,
2079 gtk_object_set_data(GTK_OBJECT(pref
->radiobutton_display_display_nstrain
),
2081 (int *) SHOW_SC_NSTRAIN
);
2087 * View menubar and rulers in the display
2090 pref
->frame_display_view
= gtk_frame_new (_("View options"));
2091 gtk_widget_ref (pref
->frame_display_view
);
2092 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
2093 "frame_display_view",
2094 pref
->frame_display_view
,
2095 (GtkDestroyNotify
) gtk_widget_unref
);
2096 gtk_widget_show (pref
->frame_display_view
);
2097 gtk_table_attach (GTK_TABLE (pref
->table2
),
2098 pref
->frame_display_view
,
2103 (GtkAttachOptions
) (GTK_EXPAND
| GTK_FILL
),
2104 (GtkAttachOptions
) (GTK_FILL
),
2110 pref
->vbox_display_view
= gtk_vbox_new (FALSE
, 0);
2111 gtk_widget_ref (pref
->vbox_display_view
);
2112 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
2113 "vbox_display_view",
2114 pref
->vbox_display_view
,
2115 (GtkDestroyNotify
) gtk_widget_unref
);
2116 gtk_widget_show (pref
->vbox_display_view
);
2117 gtk_container_add (GTK_CONTAINER (pref
->frame_display_view
),
2118 pref
->vbox_display_view
);
2124 pref
->checkbutton_display_view_menubar
=
2125 gtk_check_button_new_with_label (_("menubar"));
2126 gtk_widget_ref (pref
->checkbutton_display_view_menubar
);
2127 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
2128 "checkbutton_display_view_menubar",
2129 pref
->checkbutton_display_view_menubar
,
2130 (GtkDestroyNotify
) gtk_widget_unref
);
2131 if (default_par
->display__view_menubar
== 1) {
2132 gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON
2133 (pref
->checkbutton_display_view_menubar
),
2136 gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON
2137 (pref
->checkbutton_display_view_menubar
),
2140 gtk_widget_show (pref
->checkbutton_display_view_menubar
);
2141 gtk_box_pack_start (GTK_BOX (pref
->vbox_display_view
),
2142 pref
->checkbutton_display_view_menubar
,
2147 g_signal_connect (GTK_OBJECT (pref
->checkbutton_display_view_menubar
),
2149 G_CALLBACK (on_checkbutton_display_view_menubar_activate
),
2154 pref
->checkbutton_display_view_rulers
=
2155 gtk_check_button_new_with_label (_("rulers"));
2156 gtk_widget_ref (pref
->checkbutton_display_view_rulers
);
2157 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
2158 "checkbutton_display_view_rulers",
2159 pref
->checkbutton_display_view_rulers
,
2160 (GtkDestroyNotify
) gtk_widget_unref
);
2161 if (default_par
->display__view_rulers
== 1) {
2162 gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON
2163 (pref
->checkbutton_display_view_rulers
),
2166 gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON
2167 (pref
->checkbutton_display_view_rulers
),
2170 gtk_widget_show (pref
->checkbutton_display_view_rulers
);
2171 gtk_box_pack_start (GTK_BOX (pref
->vbox_display_view
),
2172 pref
->checkbutton_display_view_rulers
,
2177 g_signal_connect (GTK_OBJECT (pref
->checkbutton_display_view_rulers
),
2179 G_CALLBACK (on_checkbutton_display_view_rulers_activate
),
2184 pref
->checkbutton_display_stretch_auto
=
2185 gtk_check_button_new_with_label (_("stretch auto"));
2186 gtk_widget_ref (pref
->checkbutton_display_stretch_auto
);
2187 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
2188 "checkbutton_display_stretch_auto",
2189 pref
->checkbutton_display_stretch_auto
,
2190 (GtkDestroyNotify
) gtk_widget_unref
);
2191 if (default_par
->display__stretch_auto
== 1) {
2192 gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON
2193 (pref
->checkbutton_display_stretch_auto
),
2196 gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON
2197 (pref
->checkbutton_display_stretch_auto
),
2200 gtk_widget_show (pref
->checkbutton_display_stretch_auto
);
2201 gtk_box_pack_start (GTK_BOX (pref
->vbox_display_view
),
2202 pref
->checkbutton_display_stretch_auto
,
2207 g_signal_connect (GTK_OBJECT (pref
->checkbutton_display_stretch_auto
),
2209 G_CALLBACK (on_checkbutton_display_stretch_auto_activate
),
2215 * Tabulator for display
2217 pref
->tab2
= gtk_label_new (_("display"));
2218 gtk_widget_ref (pref
->tab2
);
2219 gtk_object_set_data_full (GTK_OBJECT (pref
->preferences
),
2222 (GtkDestroyNotify
) gtk_widget_unref
);
2223 gtk_widget_show (pref
->tab2
);
2224 gtk_notebook_set_tab_label (GTK_NOTEBOOK (pref
->notebook
),
2225 gtk_notebook_get_nth_page
2226 (GTK_NOTEBOOK (pref
->notebook
), 1),
2232 * Font selection tabulator
2235 /* fontselection = gtk_font_selection_new (); */
2236 /* gtk_widget_ref (fontselection); */
2237 /* gtk_object_set_data_full (GTK_OBJECT (pref->preferences), "fontselection", fontselection, */
2238 /* (GtkDestroyNotify) gtk_widget_unref); */
2239 /* gtk_widget_show (fontselection); */
2240 /* gtk_container_add (GTK_CONTAINER (pref->notebook), fontselection); */
2242 /* pref_tab3 = gtk_label_new (_("fonts")); */
2243 /* gtk_widget_ref (pref_tab3); */
2244 /* gtk_object_set_data_full (GTK_OBJECT (pref->preferences), "pref_tab3", pref_tab3, */
2245 /* (GtkDestroyNotify) gtk_widget_unref); */
2246 /* gtk_widget_show (pref_tab3); */
2247 /* gtk_notebook_set_tab_label (GTK_NOTEBOOK (pref->notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), 2), pref_tab3); */
2251 * Dialog area with "OK", "Apply and "Cancel" buttons
2254 /* pref->dialog_action_area1 = GTK_DIALOG (pref->preferences)->action_area; */
2255 /* gtk_object_set_data (GTK_OBJECT (pref->preferences), */
2256 /* "dialog_action_area1", */
2257 /* pref->dialog_action_area1); */
2258 /* gtk_widget_show (pref->dialog_action_area1); */
2259 /* gtk_button_box_set_layout (GTK_BUTTON_BOX (pref->dialog_action_area1), */
2260 /* GTK_BUTTONBOX_END); */
2261 /* gtk_button_box_set_spacing (GTK_BUTTON_BOX (pref->dialog_action_area1), */
2267 /* (GtkWidget*) gtk_tool_button_new_from_stock ("gtk-ok"); */
2268 /* gtk_box_pack_start (GTK_BOX (GTK_DIALOG (pref->preferences)->action_area), */
2269 /* button_ok, TRUE, TRUE, 0); */
2270 /* gtk_widget_ref (button_ok); */
2271 /* gtk_object_set_data_full (GTK_OBJECT (pref->preferences), */
2274 /* (GtkDestroyNotify) gtk_widget_unref); */
2275 /* gtk_widget_show (button_ok); */
2276 /* GTK_WIDGET_SET_FLAGS (button_ok, */
2277 /* GTK_CAN_DEFAULT); */
2278 /* gtk_tooltips_set_tip(gpiv->tooltips, button_ok, */
2279 /* _("Updates parameters and save as defaults"), */
2282 /* gtk_object_set_data(GTK_OBJECT(button_ok), */
2285 /* g_signal_connect (GTK_OBJECT (button_ok), "clicked", */
2286 /* G_CALLBACK (on_button_ok), */
2291 /* button_apply = */
2292 /* (GtkWidget*) gtk_tool_button_new_from_stock ("gtk-apply"); */
2293 /* gtk_box_pack_start (GTK_BOX (GTK_DIALOG (pref->preferences)->action_area), */
2294 /* button_apply, TRUE, TRUE, 0); */
2295 /* gtk_widget_ref (button_apply); */
2296 /* gtk_object_set_data_full (GTK_OBJECT (pref->preferences), */
2297 /* "button_apply", */
2299 /* (GtkDestroyNotify) gtk_widget_unref); */
2300 /* gtk_widget_show (button_apply); */
2301 /* GTK_WIDGET_SET_FLAGS (button_apply, GTK_CAN_DEFAULT); */
2302 /* gtk_tooltips_set_tip(gpiv->tooltips, button_apply, */
2303 /* _("Updates actual parameters, do not store as defaults"), */
2306 /* gtk_object_set_data(GTK_OBJECT(button_apply), */
2309 /* g_signal_connect (GTK_OBJECT (button_apply), "clicked", */
2310 /* G_CALLBACK (on_button_apply), */
2315 /* button_cancel = */
2316 /* (GtkWidget*) gtk_tool_button_new_from_stock ("gtk-cancel"); */
2317 /* gtk_box_pack_start (GTK_BOX (GTK_DIALOG (pref->preferences)->action_area), */
2318 /* button_cancel, TRUE, TRUE, 0); */
2319 /* gtk_widget_ref (button_cancel); */
2320 /* gtk_object_set_data_full (GTK_OBJECT (pref->preferences), */
2321 /* "button_cancel", */
2322 /* button_cancel, */
2323 /* (GtkDestroyNotify) gtk_widget_unref); */
2324 /* gtk_widget_show (button_cancel); */
2325 /* GTK_WIDGET_SET_FLAGS (button_cancel, */
2326 /* GTK_CAN_DEFAULT); */
2327 /* gtk_tooltips_set_tip(gpiv->tooltips, */
2328 /* button_cancel, */
2329 /* _("Close pref->preferences window"), */
2332 /* g_signal_connect (GTK_OBJECT (button_cancel), */
2334 /* G_CALLBACK (on_button_cancel), */
2339 * Display callback functions
2343 g_signal_connect (GTK_OBJECT(pref
->radiobutton_display_vecscale1
),
2345 G_CALLBACK(on_radiobutton_display_vecscale
),
2347 g_signal_connect (GTK_OBJECT(pref
->radiobutton_display_vecscale2
),
2349 G_CALLBACK(on_radiobutton_display_vecscale
),
2351 g_signal_connect (GTK_OBJECT(pref
->radiobutton_display_vecscale3
),
2353 G_CALLBACK(on_radiobutton_display_vecscale
),
2355 g_signal_connect (GTK_OBJECT(pref
->radiobutton_display_vecscale4
),
2357 G_CALLBACK(on_radiobutton_display_vecscale
),
2359 g_signal_connect (GTK_OBJECT(pref
->radiobutton_display_vecscale5
),
2361 G_CALLBACK(on_radiobutton_display_vecscale
),
2363 g_signal_connect (GTK_OBJECT(pref
->radiobutton_display_vecscale6
),
2365 G_CALLBACK(on_radiobutton_display_vecscale
),
2367 g_signal_connect (GTK_OBJECT(pref
->radiobutton_display_vecscale7
),
2369 G_CALLBACK(on_radiobutton_display_vecscale
),
2375 g_signal_connect (GTK_OBJECT(pref
->radiobutton_display_veccolor1
),
2377 G_CALLBACK(on_radiobutton_display_veccolor
),
2379 g_signal_connect (GTK_OBJECT(pref
->radiobutton_display_veccolor2
),
2381 G_CALLBACK(on_radiobutton_display_veccolor
),
2383 g_signal_connect (GTK_OBJECT(pref
->radiobutton_display_veccolor3
),
2385 G_CALLBACK(on_radiobutton_display_veccolor
),
2387 g_signal_connect (GTK_OBJECT(pref
->radiobutton_display_veccolor4
),
2389 G_CALLBACK(on_radiobutton_display_veccolor
),
2394 g_signal_connect (GTK_OBJECT(pref
->radiobutton_display_zoomscale0
),
2396 G_CALLBACK(on_radiobutton_display_zoomscale
),
2398 g_signal_connect (GTK_OBJECT(pref
->radiobutton_display_zoomscale1
),
2400 G_CALLBACK(on_radiobutton_display_zoomscale
),
2402 g_signal_connect (GTK_OBJECT(pref
->radiobutton_display_zoomscale2
),
2404 G_CALLBACK(on_radiobutton_display_zoomscale
),
2406 g_signal_connect (GTK_OBJECT(pref
->radiobutton_display_zoomscale3
),
2408 G_CALLBACK(on_radiobutton_display_zoomscale
),
2410 g_signal_connect (GTK_OBJECT(pref
->radiobutton_display_zoomscale4
),
2412 G_CALLBACK(on_radiobutton_display_zoomscale
),
2414 g_signal_connect (GTK_OBJECT(pref
->radiobutton_display_zoomscale5
),
2416 G_CALLBACK(on_radiobutton_display_zoomscale
),
2418 g_signal_connect (GTK_OBJECT(pref
->radiobutton_display_zoomscale6
),
2420 G_CALLBACK(on_radiobutton_display_zoomscale
),
2422 g_signal_connect (GTK_OBJECT(pref
->radiobutton_display_zoomscale6
),
2424 G_CALLBACK(on_radiobutton_display_zoomscale
),
2426 g_signal_connect (GTK_OBJECT(pref
->radiobutton_display_zoomscale7
),
2428 G_CALLBACK(on_radiobutton_display_zoomscale
),
2434 g_signal_connect (GTK_OBJECT(pref
->radiobutton_display_backgroundcolor1
),
2436 G_CALLBACK(on_radiobutton_display_background
),
2438 g_signal_connect (GTK_OBJECT(pref
->radiobutton_display_backgroundcolor2
),
2440 G_CALLBACK(on_radiobutton_display_background
),
2442 g_signal_connect (GTK_OBJECT(pref
->radiobutton_display_background_img1
),
2444 G_CALLBACK(on_radiobutton_display_background
),
2446 g_signal_connect (GTK_OBJECT(pref
->radiobutton_display_background_img2
),
2448 G_CALLBACK(on_radiobutton_display_background
),
2453 /* g_signal_connect (GTK_OBJECT(checkbutton_display_display_img1), */
2455 /* G_CALLBACK(on_checkbutton_display_display_img1), */
2457 /* g_signal_connect (GTK_OBJECT(checkbutton_display_display_img2), */
2459 /* G_CALLBACK(on_checkbutton_display_display_img2), */
2461 g_signal_connect (GTK_OBJECT(pref
->checkbutton_display_display_intregs
), "toggled",
2462 G_CALLBACK(on_checkbutton_display_display_intregs
),
2464 g_signal_connect (GTK_OBJECT(pref
->checkbutton_display_display_piv
),
2466 G_CALLBACK(on_checkbutton_display_display_piv
),
2468 g_signal_connect (GTK_OBJECT(pref
->radiobutton_display_display_none
),
2470 G_CALLBACK(on_radiobutton_display_scalar
),
2472 g_signal_connect (GTK_OBJECT(pref
->radiobutton_display_display_vor
),
2474 G_CALLBACK(on_radiobutton_display_scalar
),
2476 g_signal_connect (GTK_OBJECT(pref
->radiobutton_display_display_sstrain
),
2478 G_CALLBACK(on_radiobutton_display_scalar
),
2480 g_signal_connect (GTK_OBJECT(pref
->radiobutton_display_display_nstrain
),
2482 G_CALLBACK(on_radiobutton_display_scalar
),
2485 return pref
->preferences
;