2 /*----------------------------------------------------------------------
4 gpiv - Graphic program for Particle Image Velocimetry, based on gtk/gnome
7 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
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)
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 * PIV Validation interface
30 * $Log: pivvalid_interface.c,v $
31 * Revision 1.11 2007-12-19 08:42:35 gerber
34 * Revision 1.10 2007-11-23 16:24:08 gerber
35 * release 0.5.0: Kafka
37 * Revision 1.9 2007-01-29 11:27:44 gerber
38 * added image formats png, gif, tif png, bmp, improved buffer display
40 * Revision 1.8 2006/01/31 14:28:13 gerber
43 * Revision 1.6 2005/02/12 14:12:12 gerber
44 * Changed tabular names and titles
46 * Revision 1.5 2005/01/19 15:53:42 gerber
47 * Initiation of Data Acquisition (DAC); trigerring of lasers and camera
48 * by using RTAI and Realtime Linux, recording images from IEEE1394
49 * (Firewire) IIDC compliant camera's
51 * Revision 1.4 2004/10/15 19:24:05 gerber
52 * GPIV_ and Gpiv prefix to defines and structure names of libgpiv
54 * Revision 1.3 2004/06/14 21:19:23 gerber
55 * Image depth up to 16 bits.
56 * Improvement "single int" and "drag int" in Eval tab.
57 * Viewer's pop-up menu.
58 * Adaption for gpiv_matrix_* and gpiv_vector_*.
60 * See Changelog for further info.
62 * Revision 1.2 2003/08/22 15:24:52 gerber
63 * interactive spatial scaling
65 * Revision 1.1.1.1 2003/06/17 17:10:52 gerber
75 /* #include "console.h" */
77 #include "pivvalid_interface.h"
81 create_pivvalid (GnomeApp
*main_window
,
84 /*-----------------------------------------------------------------------------
87 GpivConsole
* gpiv
= gtk_object_get_data (GTK_OBJECT (main_window
), "gpiv");
88 PivValid
*valid
= g_new0(PivValid
, 1);
92 valid
->vbox_label
= gtk_vbox_new (FALSE
,
94 gtk_widget_ref(valid
->vbox_label
);
95 gtk_object_set_data_full (GTK_OBJECT (main_window
),
98 (GtkDestroyNotify
) gtk_widget_unref
);
99 gtk_widget_show(valid
->vbox_label
);
100 gtk_container_add (GTK_CONTAINER (container
),
103 valid
->label_title
= gtk_label_new( _("Piv data validation"));
104 gtk_widget_ref(valid
->label_title
);
105 gtk_object_set_data_full (GTK_OBJECT (main_window
),
108 (GtkDestroyNotify
) gtk_widget_unref
);
109 gtk_widget_show (valid
->label_title
);
110 gtk_box_pack_start (GTK_BOX (valid
->vbox_label
),
120 valid
->vbox_scroll
= gtk_vbox_new (FALSE
,
122 gtk_widget_ref (valid
->vbox_scroll
);
123 gtk_object_set_data_full (GTK_OBJECT (main_window
),
126 (GtkDestroyNotify
) gtk_widget_unref
);
127 gtk_widget_show (valid
->vbox_scroll
);
128 gtk_box_pack_start (GTK_BOX (valid
->vbox_label
),
135 valid
->scrolledwindow
= gtk_scrolled_window_new (NULL
,
137 gtk_widget_ref (valid
->scrolledwindow
);
138 gtk_object_set_data_full (GTK_OBJECT (main_window
),
140 valid
->scrolledwindow
,
141 (GtkDestroyNotify
) gtk_widget_unref
);
142 gtk_widget_show (valid
->scrolledwindow
);
143 gtk_box_pack_start (GTK_BOX (valid
->vbox_scroll
),
144 valid
->scrolledwindow
,
148 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW
149 (valid
->scrolledwindow
),
151 GTK_POLICY_AUTOMATIC
);
156 valid
->viewport
= gtk_viewport_new (NULL
,
158 gtk_widget_ref (valid
->viewport
);
159 gtk_object_set_data_full (GTK_OBJECT (main_window
),
162 (GtkDestroyNotify
) gtk_widget_unref
);
163 gtk_widget_show (valid
->viewport
);
164 gtk_container_add (GTK_CONTAINER (valid
->scrolledwindow
),
168 * main table for validation
170 valid
->table
= gtk_table_new (2,
173 gtk_widget_ref (valid
->table
);
174 gtk_object_set_data_full (GTK_OBJECT (main_window
),
177 (GtkDestroyNotify
) gtk_widget_unref
);
178 gtk_widget_show (valid
->table
);
179 gtk_container_add (GTK_CONTAINER (valid
->viewport
),
185 * Enable / Disable frame
188 valid
->frame_disable
= gtk_frame_new ( _("Disable data"));
189 gtk_widget_ref (valid
->frame_disable
);
190 gtk_object_set_data_full (GTK_OBJECT (main_window
),
192 valid
->frame_disable
,
195 gtk_widget_show (valid
->frame_disable
);
196 gtk_table_attach (GTK_TABLE (valid
->table
),
197 valid
->frame_disable
,
202 (GtkAttachOptions
) (GTK_FILL
),
203 (GtkAttachOptions
) (GTK_SHRINK
),
209 valid
->vbox_disable
= gtk_vbox_new (FALSE
,
211 gtk_widget_ref (valid
->vbox_disable
);
212 gtk_object_set_data_full (GTK_OBJECT (main_window
),
215 (GtkDestroyNotify
) gtk_widget_unref
);
216 gtk_widget_show (valid
->vbox_disable
);
217 gtk_container_add (GTK_CONTAINER (valid
->frame_disable
),
218 valid
->vbox_disable
);
222 valid
->radiobutton_disable_0
=
223 gtk_radio_button_new_with_label (gpiv
->mouse_sel_group
,
225 gpiv
->mouse_sel_group
=
226 gtk_radio_button_group (GTK_RADIO_BUTTON
227 (valid
->radiobutton_disable_0
));
228 gtk_widget_ref (valid
->radiobutton_disable_0
);
229 gtk_object_set_data_full (GTK_OBJECT (main_window
),
230 "radiobutton_disable_0",
231 valid
->radiobutton_disable_0
,
232 (GtkDestroyNotify
) gtk_widget_unref
);
233 gtk_widget_show (valid
->radiobutton_disable_0
);
234 gtk_box_pack_start (GTK_BOX (valid
->vbox_disable
),
235 valid
->radiobutton_disable_0
,
241 gtk_object_set_data (GTK_OBJECT (valid
->radiobutton_disable_0
),
244 gtk_object_set_data (GTK_OBJECT (valid
->radiobutton_disable_0
),
248 g_signal_connect (GTK_OBJECT (valid
->radiobutton_disable_0
),
250 G_CALLBACK (on_radiobutton_valid_disable_0_enter
),
252 g_signal_connect (GTK_OBJECT (valid
->radiobutton_disable_0
),
254 G_CALLBACK (on_widget_leave
),
256 g_signal_connect (GTK_OBJECT (valid
->radiobutton_disable_0
),
258 G_CALLBACK (on_radiobutton_valid_disable
),
264 valid
->radiobutton_disable_1
=
265 gtk_radio_button_new_with_label (gpiv
->mouse_sel_group
,
267 gpiv
->mouse_sel_group
=
268 gtk_radio_button_group (GTK_RADIO_BUTTON
269 (valid
->radiobutton_disable_1
));
270 gtk_widget_ref (valid
->radiobutton_disable_1
);
271 gtk_object_set_data_full (GTK_OBJECT (main_window
),
272 "radiobutton_valid_disable_1",
273 valid
->radiobutton_disable_1
,
274 (GtkDestroyNotify
) gtk_widget_unref
);
275 gtk_widget_show (valid
->radiobutton_disable_1
);
276 gtk_box_pack_start (GTK_BOX (valid
->vbox_disable
),
277 valid
->radiobutton_disable_1
,
282 gtk_object_set_data (GTK_OBJECT (valid
->radiobutton_disable_1
),
285 gtk_object_set_data (GTK_OBJECT (valid
->radiobutton_disable_1
),
287 "7" /* ENABLE_POINT_MS */);
288 g_signal_connect (GTK_OBJECT (valid
->radiobutton_disable_1
),
290 G_CALLBACK (on_radiobutton_valid_disable_1_enter
),
292 g_signal_connect (GTK_OBJECT (valid
->radiobutton_disable_1
),
294 G_CALLBACK (on_widget_leave
),
296 g_signal_connect (GTK_OBJECT (valid
->radiobutton_disable_1
),
298 G_CALLBACK (on_radiobutton_valid_disable
),
303 valid
->radiobutton_disable_2
=
304 gtk_radio_button_new_with_label (gpiv
->mouse_sel_group
,
306 gpiv
->mouse_sel_group
=
307 gtk_radio_button_group (GTK_RADIO_BUTTON
308 (valid
->radiobutton_disable_2
));
309 gtk_widget_ref (valid
->radiobutton_disable_2
);
310 gtk_object_set_data_full (GTK_OBJECT (main_window
),
311 "radiobutton_disable_2",
312 valid
->radiobutton_disable_2
,
313 (GtkDestroyNotify
) gtk_widget_unref
);
314 gtk_widget_show (valid
->radiobutton_disable_2
);
315 gtk_box_pack_start (GTK_BOX (valid
->vbox_disable
),
316 valid
->radiobutton_disable_2
,
321 gtk_object_set_data (GTK_OBJECT (valid
->radiobutton_disable_2
),
324 gtk_object_set_data (GTK_OBJECT (valid
->radiobutton_disable_2
),
326 "8" /* DISABLE_POINT_MS */);
327 g_signal_connect (GTK_OBJECT (valid
->radiobutton_disable_2
),
329 G_CALLBACK (on_radiobutton_valid_disable_2_enter
),
331 g_signal_connect (GTK_OBJECT (valid
->radiobutton_disable_2
),
333 G_CALLBACK (on_widget_leave
),
335 g_signal_connect (GTK_OBJECT (valid
->radiobutton_disable_2
),
337 G_CALLBACK (on_radiobutton_valid_disable
),
342 valid
->radiobutton_disable_3
=
343 gtk_radio_button_new_with_label (gpiv
->mouse_sel_group
,
345 gpiv
->mouse_sel_group
=
346 gtk_radio_button_group (GTK_RADIO_BUTTON
347 (valid
->radiobutton_disable_3
));
348 gtk_widget_ref (valid
->radiobutton_disable_3
);
349 gtk_object_set_data_full (GTK_OBJECT (main_window
),
350 "radiobutton_disable_3",
351 valid
->radiobutton_disable_3
,
352 (GtkDestroyNotify
) gtk_widget_unref
);
353 gtk_widget_show (valid
->radiobutton_disable_3
);
354 gtk_box_pack_start (GTK_BOX (valid
->vbox_disable
),
355 valid
->radiobutton_disable_3
,
360 gtk_object_set_data (GTK_OBJECT (valid
->radiobutton_disable_3
),
363 gtk_object_set_data (GTK_OBJECT (valid
->radiobutton_disable_3
),
365 "9" /* ENABLE_AREA_MS */);
366 g_signal_connect (GTK_OBJECT (valid
->radiobutton_disable_3
),
368 G_CALLBACK (on_radiobutton_valid_disable_3_enter
),
370 g_signal_connect (GTK_OBJECT (valid
->radiobutton_disable_3
),
372 G_CALLBACK (on_widget_leave
),
374 g_signal_connect (GTK_OBJECT (valid
->radiobutton_disable_3
),
376 G_CALLBACK (on_radiobutton_valid_disable
),
381 valid
->radiobutton_disable_4
=
382 gtk_radio_button_new_with_label (gpiv
->mouse_sel_group
,
384 gpiv
->mouse_sel_group
=
385 gtk_radio_button_group (GTK_RADIO_BUTTON
386 (valid
->radiobutton_disable_4
));
387 gtk_widget_ref (valid
->radiobutton_disable_4
);
388 gtk_object_set_data_full (GTK_OBJECT (main_window
),
389 "radiobutton_disable_4",
390 valid
->radiobutton_disable_4
,
391 (GtkDestroyNotify
) gtk_widget_unref
);
392 gtk_widget_show (valid
->radiobutton_disable_4
);
393 gtk_box_pack_start (GTK_BOX (valid
->vbox_disable
),
394 valid
->radiobutton_disable_4
,
399 gtk_object_set_data (GTK_OBJECT (valid
->radiobutton_disable_4
),
402 gtk_object_set_data (GTK_OBJECT (valid
->radiobutton_disable_4
),
404 "10" /* DISABLE_AREA_MS */);
405 g_signal_connect (GTK_OBJECT (valid
->radiobutton_disable_4
),
407 G_CALLBACK (on_radiobutton_valid_disable_4_enter
),
409 g_signal_connect (GTK_OBJECT (valid
->radiobutton_disable_4
),
411 G_CALLBACK (on_widget_leave
),
413 g_signal_connect (GTK_OBJECT (valid
->radiobutton_disable_4
),
415 G_CALLBACK (on_radiobutton_valid_disable
),
421 * Button for testing on velocity gradients
423 valid
->button_gradient
=
424 gtk_button_new_with_label ( _("validate on velocity gradient "));
425 gtk_widget_ref (valid
->button_gradient
);
426 gtk_object_set_data_full (GTK_OBJECT (main_window
),
428 valid
->button_gradient
,
429 (GtkDestroyNotify
) gtk_widget_unref
);
430 gtk_widget_show (valid
->button_gradient
);
431 gtk_table_attach (GTK_TABLE (valid
->table
),
432 valid
->button_gradient
,
437 (GtkAttachOptions
)(GTK_SHRINK
/*FILL*/),
438 (GtkAttachOptions
)(GTK_SHRINK
),
442 gtk_tooltips_set_tip(gpiv
->tooltips
,
443 valid
->button_gradient
,
444 _("Disables PIV data that have a too large velocity "
445 "gradient over the Interrogation Area"),
448 gtk_object_set_data (GTK_OBJECT (valid
->button_gradient
),
451 g_signal_connect (GTK_OBJECT (valid
->button_gradient
),
453 G_CALLBACK (on_button_valid_gradient_enter
),
455 g_signal_connect (GTK_OBJECT (valid
->button_gradient
),
457 G_CALLBACK (on_widget_leave
),
459 g_signal_connect (GTK_OBJECT (valid
->button_gradient
),
461 G_CALLBACK (on_button_valid_gradient
),
468 * Frame for histogram of sub-pixel values (used to test on peak-locking
472 valid
->frame_histo
= gtk_frame_new ( _("Histograms"));
473 gtk_widget_ref (valid
->frame_histo
);
474 gtk_object_set_data_full (GTK_OBJECT (main_window
),
477 (GtkDestroyNotify
) gtk_widget_unref
);
478 gtk_widget_show (valid
->frame_histo
);
479 gtk_table_attach (GTK_TABLE (valid
->table
),
485 (GtkAttachOptions
)(GTK_EXPAND
| GTK_FILL
),
486 (GtkAttachOptions
) /* (GTK_SHRINK) */
487 (GTK_EXPAND
| GTK_FILL
),
493 valid
->vbox_histo
= gtk_vbox_new (FALSE
,
495 gtk_widget_ref (valid
->vbox_histo
);
496 gtk_object_set_data_full (GTK_OBJECT (main_window
),
499 (GtkDestroyNotify
) gtk_widget_unref
);
500 gtk_widget_show (valid
->vbox_histo
);
501 gtk_container_add (GTK_CONTAINER (valid
->frame_histo
),
507 valid
->hbox_histo_spin
= gtk_hbox_new (FALSE
,
509 gtk_widget_ref (valid
->hbox_histo_spin
);
510 gtk_object_set_data_full (GTK_OBJECT (main_window
),
512 valid
->hbox_histo_spin
,
513 (GtkDestroyNotify
) gtk_widget_unref
);
514 gtk_widget_show (valid
->hbox_histo_spin
);
515 gtk_box_pack_start (GTK_BOX (valid
->vbox_histo
),
516 valid
->hbox_histo_spin
,
523 valid
->label_histo_bins
= gtk_label_new ( _("# bins: "));
524 gtk_widget_ref (valid
->label_histo_bins
);
525 gtk_object_set_data_full (GTK_OBJECT (main_window
),
527 valid
->label_histo_bins
,
528 (GtkDestroyNotify
) gtk_widget_unref
);
529 gtk_widget_show (valid
->label_histo_bins
);
530 gtk_box_pack_start (GTK_BOX (valid
->hbox_histo_spin
),
531 valid
->label_histo_bins
,
539 * NBINS_DEFAULT defined in gpiv.h
541 valid
->spinbutton_adj_histo_bins
=
542 gtk_adjustment_new (GPIV_NBINS_DEFAULT
,
548 valid
->spinbutton_histo_bins
=
549 gtk_spin_button_new (GTK_ADJUSTMENT
550 (valid
->spinbutton_adj_histo_bins
),
553 gtk_widget_ref (valid
->spinbutton_histo_bins
);
554 gtk_object_set_data_full (GTK_OBJECT (main_window
),
555 "spinbutton_histo_bins",
556 valid
->spinbutton_histo_bins
,
557 (GtkDestroyNotify
) gtk_widget_unref
);
558 gtk_widget_show (valid
->spinbutton_histo_bins
);
559 gtk_box_pack_start (GTK_BOX (valid
->hbox_histo_spin
),
560 valid
->spinbutton_histo_bins
,
565 gtk_object_set_data (GTK_OBJECT (valid
->spinbutton_histo_bins
),
568 g_signal_connect (GTK_OBJECT (valid
->spinbutton_histo_bins
),
570 G_CALLBACK (on_spinbutton_valid_peaklck_bins
),
571 valid
->spinbutton_histo_bins
);
580 /* gtk_widget_push_colormap (GdkColormap *cmap) */
581 /* gtk_widget_push_visual (gdk_imlib_get_visual ()); */
582 /* gtk_widget_push_colormap (gdk_imlib_get_colormap ()); */
583 valid
->canvas_histo
= gnome_canvas_new ();
584 gtk_widget_pop_colormap ();
585 gtk_widget_pop_visual ();
586 gtk_widget_ref (valid
->canvas_histo
);
587 gtk_object_set_data_full (GTK_OBJECT (main_window
),
590 (GtkDestroyNotify
) gtk_widget_unref
);
591 gtk_box_pack_start (GTK_BOX (valid
->vbox_histo
),
596 gtk_widget_show (valid
->canvas_histo
);
601 valid
->hbox_histo_buttons
= gtk_hbox_new (FALSE
,
603 gtk_widget_ref (valid
->hbox_histo_buttons
);
604 gtk_object_set_data_full (GTK_OBJECT (main_window
),
605 "hbox_histo_buttons",
606 valid
->hbox_histo_buttons
,
607 (GtkDestroyNotify
) gtk_widget_unref
);
608 gtk_widget_show (valid
->hbox_histo_buttons
);
609 gtk_box_pack_start (GTK_BOX (valid
->vbox_histo
),
610 valid
->hbox_histo_buttons
,
618 valid
->button_errvec_resstats
=
619 gtk_button_new_with_label ( _("residu"));
620 gtk_widget_ref (valid
->button_errvec_resstats
);
621 gtk_object_set_data_full (GTK_OBJECT (main_window
),
622 "button_errvec_resstats",
623 valid
->button_errvec_resstats
,
624 (GtkDestroyNotify
) gtk_widget_unref
);
625 gtk_widget_show (valid
->button_errvec_resstats
);
626 gtk_box_pack_start (GTK_BOX (valid
->hbox_histo_buttons
),
627 valid
->button_errvec_resstats
,
631 gtk_tooltips_set_tip(gpiv
->tooltips
,
632 valid
->button_errvec_resstats
,
633 _("calculates residus of displacements "
634 "and displays in a histogram"),
637 gtk_object_set_data (GTK_OBJECT (valid
->button_errvec_resstats
),
640 g_signal_connect (GTK_OBJECT (valid
->button_errvec_resstats
),
642 G_CALLBACK (on_button_valid_errvec_resstats_enter
),
644 g_signal_connect (GTK_OBJECT (valid
->button_errvec_resstats
),
646 G_CALLBACK (on_widget_leave
),
648 g_signal_connect (GTK_OBJECT (valid
->button_errvec_resstats
),
650 G_CALLBACK (on_button_valid_errvec_resstats
),
655 valid
->button_peaklck
= gtk_button_new_with_label ( _("sub-pixel"));
656 gtk_widget_ref (valid
->button_peaklck
);
657 gtk_object_set_data_full (GTK_OBJECT (main_window
),
659 valid
->button_peaklck
,
660 (GtkDestroyNotify
) gtk_widget_unref
);
661 gtk_widget_show (valid
->button_peaklck
);
662 gtk_box_pack_start (GTK_BOX (valid
->hbox_histo_buttons
),
663 valid
->button_peaklck
,
667 gtk_tooltips_set_tip(gpiv
->tooltips
,
668 valid
->button_peaklck
,
669 _("shows histogram of sub-pixel displacements "
670 "to check on peak-locking effects"),
673 gtk_object_set_data (GTK_OBJECT (valid
->button_peaklck
),
676 g_signal_connect (GTK_OBJECT (valid
->button_peaklck
),
678 G_CALLBACK (on_button_valid_peaklck_enter
),
679 valid
->button_peaklck
);
680 g_signal_connect (GTK_OBJECT (valid
->button_peaklck
),
682 G_CALLBACK (on_widget_leave
),
683 valid
->button_peaklck
);
684 g_signal_connect (GTK_OBJECT (valid
->button_peaklck
),
686 G_CALLBACK (on_button_valid_peaklck
),
687 valid
->button_peaklck
);
692 valid
->button_uhisto
= gtk_button_new_with_label ( _("U-comp"));
693 gtk_widget_ref (valid
->button_uhisto
);
694 gtk_object_set_data_full (GTK_OBJECT (main_window
),
696 valid
->button_uhisto
,
697 (GtkDestroyNotify
) gtk_widget_unref
);
698 gtk_widget_show (valid
->button_uhisto
);
699 gtk_box_pack_start (GTK_BOX (valid
->hbox_histo_buttons
),
700 valid
->button_uhisto
,
704 gtk_tooltips_set_tip(gpiv
->tooltips
,
705 valid
->button_uhisto
,
706 _("shows histogram of horizontal displacements.\n\
707 Only this histogram will be saved"),
710 gtk_object_set_data (GTK_OBJECT (valid
->button_uhisto
),
713 g_signal_connect (GTK_OBJECT (valid
->button_uhisto
),
715 G_CALLBACK (on_button_valid_uhisto_enter
),
716 valid
->button_uhisto
);
717 g_signal_connect (GTK_OBJECT (valid
->button_uhisto
),
719 G_CALLBACK (on_widget_leave
),
720 valid
->button_uhisto
);
721 g_signal_connect (GTK_OBJECT (valid
->button_uhisto
),
723 G_CALLBACK (on_button_valid_uhisto
),
724 valid
->button_uhisto
);
728 valid
->button_vhisto
= gtk_button_new_with_label ( _("V-comp"));
729 gtk_widget_ref (valid
->button_vhisto
);
730 gtk_object_set_data_full (GTK_OBJECT (main_window
),
732 valid
->button_vhisto
,
733 (GtkDestroyNotify
) gtk_widget_unref
);
734 gtk_widget_show (valid
->button_vhisto
);
735 gtk_box_pack_start (GTK_BOX (valid
->hbox_histo_buttons
),
736 valid
->button_vhisto
,
740 gtk_tooltips_set_tip(gpiv
->tooltips
,
741 valid
->button_vhisto
,
742 _("shows histogram of vertical displacements.\n\
743 Only this histogram will be saved"),
746 gtk_object_set_data (GTK_OBJECT (valid
->button_vhisto
),
749 g_signal_connect (GTK_OBJECT (valid
->button_vhisto
),
751 G_CALLBACK (on_button_valid_vhisto_enter
),
752 valid
->button_vhisto
);
753 g_signal_connect (GTK_OBJECT (valid
->button_vhisto
),
755 G_CALLBACK (on_widget_leave
),
756 valid
->button_vhisto
);
757 g_signal_connect (GTK_OBJECT (valid
->button_vhisto
),
759 G_CALLBACK (on_button_valid_vhisto
),
760 valid
->button_vhisto
);
768 valid
->frame_errvec
= gtk_frame_new ( _("Outliers"));
769 gtk_widget_ref (valid
->frame_errvec
);
770 gtk_object_set_data_full (GTK_OBJECT (main_window
),
775 gtk_widget_show (valid
->frame_errvec
);
776 gtk_table_attach (GTK_TABLE (valid
->table
),
782 (GtkAttachOptions
)(GTK_FILL
),
783 (GtkAttachOptions
)(GTK_SHRINK
),
789 valid
->vbox_errvec
= gtk_vbox_new (FALSE
,
791 gtk_widget_ref (valid
->vbox_errvec
);
792 gtk_object_set_data_full (GTK_OBJECT (main_window
),
795 (GtkDestroyNotify
) gtk_widget_unref
);
796 gtk_widget_show (valid
->vbox_errvec
);
797 gtk_container_add (GTK_CONTAINER (valid
->frame_errvec
),
803 * Spinner for array length of neighboring PIV data
805 valid
->hbox_errvec_neighbors_spin
= gtk_hbox_new (FALSE
,
807 gtk_widget_ref (valid
->hbox_errvec_neighbors_spin
);
808 gtk_object_set_data_full (GTK_OBJECT (main_window
),
809 "hbox_errvec_neighbors_spin",
810 valid
->hbox_errvec_neighbors_spin
,
811 (GtkDestroyNotify
) gtk_widget_unref
);
812 gtk_widget_show (valid
->hbox_errvec_neighbors_spin
);
813 gtk_box_pack_start (GTK_BOX (valid
->vbox_errvec
),
814 valid
->hbox_errvec_neighbors_spin
,
821 valid
->label_errvec_neighbors
= gtk_label_new ( _("Neighbors: "));
822 gtk_widget_ref (valid
->label_errvec_neighbors
);
823 gtk_object_set_data_full (GTK_OBJECT (main_window
),
824 "label_errvec_neighbors",
825 valid
->label_errvec_neighbors
,
826 (GtkDestroyNotify
) gtk_widget_unref
);
827 gtk_widget_show (valid
->label_errvec_neighbors
);
828 gtk_box_pack_start (GTK_BOX (valid
->hbox_errvec_neighbors_spin
),
829 valid
->label_errvec_neighbors
,
836 valid
->spinbutton_adj_errvec_neighbors
=
837 gtk_adjustment_new (gl_valid_par
->neighbors
,
839 GPIV_VALIDPAR_MAX__NEIGHBORS
,
843 valid
->spinbutton_errvec_neighbors
=
844 gtk_spin_button_new (GTK_ADJUSTMENT (valid
->spinbutton_adj_errvec_neighbors
),
847 gtk_widget_ref (valid
->spinbutton_errvec_neighbors
);
848 gtk_object_set_data_full (GTK_OBJECT (main_window
),
849 "spinbutton_errvec_neighbors",
850 valid
->spinbutton_errvec_neighbors
,
851 (GtkDestroyNotify
) gtk_widget_unref
);
852 gtk_widget_show (valid
->spinbutton_errvec_neighbors
);
853 gtk_box_pack_start (GTK_BOX (valid
->hbox_errvec_neighbors_spin
),
854 valid
->spinbutton_errvec_neighbors
,
859 gtk_object_set_data (GTK_OBJECT (valid
->spinbutton_errvec_neighbors
),
862 g_signal_connect (GTK_OBJECT (valid
->spinbutton_errvec_neighbors
),
864 G_CALLBACK (on_spinbutton_valid_errvec_neighbors
),
871 * Spinner for data yield
873 valid
->hbox_errvec_yield_spin
= gtk_hbox_new (FALSE
,
875 gtk_widget_ref (valid
->hbox_errvec_yield_spin
);
876 gtk_object_set_data_full (GTK_OBJECT (main_window
),
877 "hbox_errvec_yield_spin",
878 valid
->hbox_errvec_yield_spin
,
879 (GtkDestroyNotify
) gtk_widget_unref
);
880 gtk_widget_show (valid
->hbox_errvec_yield_spin
);
881 gtk_box_pack_start (GTK_BOX (valid
->vbox_errvec
),
882 valid
->hbox_errvec_yield_spin
,
889 valid
->label_errvec_yield
= gtk_label_new ( _("Data yield: "));
890 gtk_widget_ref (valid
->label_errvec_yield
);
891 gtk_object_set_data_full (GTK_OBJECT (main_window
),
892 "label_errvec_yield",
893 valid
->label_errvec_yield
,
894 (GtkDestroyNotify
) gtk_widget_unref
);
895 gtk_widget_show (valid
->label_errvec_yield
);
896 gtk_box_pack_start (GTK_BOX (valid
->hbox_errvec_yield_spin
),
897 valid
->label_errvec_yield
,
904 valid
->spinbutton_adj_errvec_yield
=
905 gtk_adjustment_new (gl_valid_par
->data_yield
,
911 valid
->spinbutton_errvec_yield
=
912 gtk_spin_button_new (GTK_ADJUSTMENT (valid
->spinbutton_adj_errvec_yield
),
915 gtk_widget_ref (valid
->spinbutton_errvec_yield
);
916 gtk_object_set_data_full (GTK_OBJECT (main_window
),
917 "spinbutton_errvec_yield",
918 valid
->spinbutton_errvec_yield
,
919 (GtkDestroyNotify
) gtk_widget_unref
);
920 gtk_widget_show (valid
->spinbutton_errvec_yield
);
921 gtk_box_pack_start (GTK_BOX (valid
->hbox_errvec_yield_spin
),
922 valid
->spinbutton_errvec_yield
,
927 gtk_object_set_data (GTK_OBJECT (valid
->spinbutton_errvec_yield
),
930 g_signal_connect (GTK_OBJECT (valid
->spinbutton_errvec_yield
),
932 G_CALLBACK (on_spinbutton_valid_errvec_yield
),
939 * Spinner for threshold residu
940 */ valid
->hbox_errvec_residu_spin
= gtk_hbox_new (FALSE
,
942 gtk_widget_ref (valid
->hbox_errvec_residu_spin
);
943 gtk_object_set_data_full (GTK_OBJECT (main_window
),
944 "hbox_errvec_residu_spin",
945 valid
->hbox_errvec_residu_spin
,
946 (GtkDestroyNotify
) gtk_widget_unref
);
947 gtk_widget_show (valid
->hbox_errvec_residu_spin
);
948 gtk_box_pack_start (GTK_BOX (valid
->vbox_errvec
),
949 valid
->hbox_errvec_residu_spin
,
956 valid
->label_errvec_res
= gtk_label_new ( _("Threshold: "));
957 gtk_widget_ref (valid
->label_errvec_res
);
958 gtk_object_set_data_full (GTK_OBJECT (main_window
),
960 valid
->label_errvec_res
,
961 (GtkDestroyNotify
) gtk_widget_unref
);
962 gtk_widget_show (valid
->label_errvec_res
);
963 gtk_box_pack_start (GTK_BOX (valid
->hbox_errvec_residu_spin
),
964 valid
->label_errvec_res
,
971 valid
->spinbutton_adj_errvec_res
=
972 gtk_adjustment_new (gl_valid_par
->residu_max
,
978 valid
->spinbutton_errvec_res
=
979 gtk_spin_button_new (GTK_ADJUSTMENT (valid
->spinbutton_adj_errvec_res
),
982 gtk_widget_ref (valid
->spinbutton_errvec_res
);
983 gtk_object_set_data_full (GTK_OBJECT (main_window
),
984 "spinbutton_errvec_res",
985 valid
->spinbutton_errvec_res
,
986 (GtkDestroyNotify
) gtk_widget_unref
);
987 gtk_widget_show (valid
->spinbutton_errvec_res
);
988 gtk_box_pack_start (GTK_BOX (valid
->hbox_errvec_residu_spin
),
989 valid
->spinbutton_errvec_res
,
994 gtk_object_set_data (GTK_OBJECT (valid
->spinbutton_errvec_res
),
997 g_signal_connect (GTK_OBJECT (valid
->spinbutton_errvec_res
),
999 G_CALLBACK (on_spinbutton_valid_errvec_res
),
1005 valid
->checkbutton_errvec_disres
=
1006 gtk_check_button_new_with_label ( _("Show SNR values"));
1007 gtk_widget_ref (valid
->checkbutton_errvec_disres
);
1008 gtk_object_set_data_full (GTK_OBJECT (main_window
),
1009 "checkbutton_errvec_disres",
1010 valid
->checkbutton_errvec_disres
,
1011 (GtkDestroyNotify
) gtk_widget_unref
);
1012 gtk_widget_show (valid
->checkbutton_errvec_disres
);
1013 gtk_box_pack_start (GTK_BOX (valid
->vbox_errvec
),
1014 valid
->checkbutton_errvec_disres
,
1019 gtk_object_set_data (GTK_OBJECT (valid
->checkbutton_errvec_disres
),
1022 g_signal_connect (GTK_OBJECT (valid
->checkbutton_errvec_disres
),
1025 (on_checkbutton_valid_errvec_disres_enter
),
1027 g_signal_connect (GTK_OBJECT (valid
->checkbutton_errvec_disres
),
1029 G_CALLBACK (on_widget_leave
),
1031 g_signal_connect (GTK_OBJECT (valid
->checkbutton_errvec_disres
),
1033 G_CALLBACK (on_checkbutton_valid_errvec_disres
),
1035 if (v_color
== SHOW_SNR
) {
1036 gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON
1037 (valid
->checkbutton_errvec_disres
),
1043 valid
->frame_errvec_residu
= gtk_frame_new ( _("Residu type:"));
1044 gtk_widget_ref (valid
->frame_errvec_residu
);
1045 gtk_object_set_data_full (GTK_OBJECT (main_window
),
1046 "frame_errvec_residu",
1047 valid
->frame_errvec_residu
,
1048 (GtkDestroyNotify
) gtk_widget_unref
);
1049 gtk_widget_show (valid
->frame_errvec_residu
);
1050 gtk_box_pack_start (GTK_BOX (valid
->vbox_errvec
),
1051 valid
->frame_errvec_residu
,
1055 gtk_frame_set_shadow_type (GTK_FRAME (valid
->frame_errvec_residu
),
1060 valid
->vbox_errvec_residu
= gtk_vbox_new (FALSE
,
1062 gtk_widget_ref (valid
->vbox_errvec_residu
);
1063 gtk_object_set_data_full (GTK_OBJECT (main_window
),
1064 "vbox_errvec_residu",
1065 valid
->vbox_errvec_residu
,
1066 (GtkDestroyNotify
) gtk_widget_unref
);
1067 gtk_widget_show (valid
->vbox_errvec_residu
);
1068 gtk_container_add (GTK_CONTAINER (valid
->frame_errvec_residu
),
1069 valid
->vbox_errvec_residu
);
1073 valid
->radiobutton_errvec_residu_normmedian
=
1074 gtk_radio_button_new_with_label (valid
->vbox_errvec_residu_group
,
1075 _("Normalized median"));
1076 valid
->vbox_errvec_residu_group
=
1077 gtk_radio_button_group (GTK_RADIO_BUTTON
1078 (valid
->radiobutton_errvec_residu_normmedian
));
1079 gtk_widget_ref (valid
->radiobutton_errvec_residu_normmedian
);
1080 gtk_object_set_data_full (GTK_OBJECT (main_window
),
1081 "radiobutton_errvec_residu_normmedian",
1082 valid
->radiobutton_errvec_residu_normmedian
,
1083 (GtkDestroyNotify
) gtk_widget_unref
);
1084 gtk_object_set_data (GTK_OBJECT (valid
->radiobutton_errvec_residu_normmedian
),
1087 gtk_object_set_data (GTK_OBJECT (valid
->radiobutton_errvec_residu_normmedian
),
1090 gtk_widget_show (valid
->radiobutton_errvec_residu_normmedian
);
1091 gtk_box_pack_start (GTK_BOX (valid
->vbox_errvec_residu
),
1092 valid
->radiobutton_errvec_residu_normmedian
,
1096 g_signal_connect (GTK_OBJECT (valid
->radiobutton_errvec_residu_normmedian
),
1099 (on_radiobutton_valid_errvec_residu_enter
),
1101 g_signal_connect (GTK_OBJECT (valid
->radiobutton_errvec_residu_normmedian
),
1103 G_CALLBACK (on_widget_leave
),
1105 g_signal_connect (GTK_OBJECT (valid
->radiobutton_errvec_residu_normmedian
),
1107 G_CALLBACK (on_radiobutton_valid_errvec_residu
),
1109 if (gl_valid_par
->residu_type
== 2) {
1110 gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON
1111 (valid
->radiobutton_errvec_residu_normmedian
),
1117 valid
->radiobutton_errvec_residu_median
=
1118 gtk_radio_button_new_with_label (valid
->vbox_errvec_residu_group
,
1120 valid
->vbox_errvec_residu_group
=
1121 gtk_radio_button_group (GTK_RADIO_BUTTON
1122 (valid
->radiobutton_errvec_residu_median
));
1123 gtk_widget_ref (valid
->radiobutton_errvec_residu_median
);
1124 gtk_object_set_data_full (GTK_OBJECT (main_window
),
1125 "radiobutton_errvec_residu_median",
1126 valid
->radiobutton_errvec_residu_median
,
1127 (GtkDestroyNotify
) gtk_widget_unref
);
1128 gtk_object_set_data (GTK_OBJECT (valid
->radiobutton_errvec_residu_median
),
1131 gtk_object_set_data (GTK_OBJECT (valid
->radiobutton_errvec_residu_median
),
1134 gtk_widget_show (valid
->radiobutton_errvec_residu_median
);
1135 gtk_box_pack_start (GTK_BOX (valid
->vbox_errvec_residu
),
1136 valid
->radiobutton_errvec_residu_median
,
1140 g_signal_connect (GTK_OBJECT (valid
->radiobutton_errvec_residu_median
),
1143 (on_radiobutton_valid_errvec_residu_enter
),
1145 g_signal_connect (GTK_OBJECT (valid
->radiobutton_errvec_residu_median
),
1147 G_CALLBACK (on_widget_leave
),
1149 g_signal_connect (GTK_OBJECT (valid
->radiobutton_errvec_residu_median
),
1151 G_CALLBACK (on_radiobutton_valid_errvec_residu
),
1153 if (gl_valid_par
->residu_type
== 1) {
1154 gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON
1155 (valid
->radiobutton_errvec_residu_median
),
1161 valid
->radiobutton_errvec_residu_snr
=
1162 gtk_radio_button_new_with_label (valid
->vbox_errvec_residu_group
,
1164 valid
->vbox_errvec_residu_group
=
1165 gtk_radio_button_group (GTK_RADIO_BUTTON
1166 (valid
->radiobutton_errvec_residu_snr
));
1167 gtk_widget_ref (valid
->radiobutton_errvec_residu_snr
);
1168 gtk_object_set_data_full (GTK_OBJECT (main_window
),
1169 "radiobutton_errvec_residu_snr",
1170 valid
->radiobutton_errvec_residu_snr
,
1171 (GtkDestroyNotify
) gtk_widget_unref
);
1172 gtk_widget_show (valid
->radiobutton_errvec_residu_snr
);
1173 gtk_box_pack_start (GTK_BOX (valid
->vbox_errvec_residu
),
1174 valid
->radiobutton_errvec_residu_snr
,
1179 gtk_object_set_data (GTK_OBJECT (valid
->radiobutton_errvec_residu_snr
),
1182 gtk_object_set_data (GTK_OBJECT (valid
->radiobutton_errvec_residu_snr
),
1185 g_signal_connect (GTK_OBJECT (valid
->radiobutton_errvec_residu_snr
),
1188 (on_radiobutton_valid_errvec_residu_enter
),
1190 g_signal_connect (GTK_OBJECT (valid
->radiobutton_errvec_residu_snr
),
1192 G_CALLBACK (on_widget_leave
),
1194 g_signal_connect (GTK_OBJECT (valid
->radiobutton_errvec_residu_snr
),
1196 G_CALLBACK (on_radiobutton_valid_errvec_residu
),
1198 if (gl_valid_par
->residu_type
== 0) {
1199 gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON
1200 (valid
->radiobutton_errvec_residu_snr
),
1207 * A long time ago, the GtkWidget valid->button_errvec_resstats was *here*.
1208 * Though it felt in love with valid->button_peaklock.
1209 * Now they are living happily cheeck tot cheeck.
1210 * No, they haven't got child widgets, yet. But maybe, one day ...
1215 * Radio buttons for substitution type
1217 valid
->frame_errvec_subst
= gtk_frame_new ( _("Substituted by:"));
1218 gtk_widget_ref (valid
->frame_errvec_subst
);
1219 gtk_object_set_data_full (GTK_OBJECT (main_window
),
1220 "frame_errvec_subst",
1221 valid
->frame_errvec_subst
,
1222 (GtkDestroyNotify
) gtk_widget_unref
);
1223 gtk_widget_show (valid
->frame_errvec_subst
);
1224 gtk_box_pack_start (GTK_BOX (valid
->vbox_errvec
),
1225 valid
->frame_errvec_subst
,
1229 gtk_frame_set_shadow_type (GTK_FRAME (valid
->frame_errvec_subst
),
1234 valid
->vbox_errvec_subst
= gtk_vbox_new (FALSE
,
1236 gtk_widget_ref (valid
->vbox_errvec_subst
);
1237 gtk_object_set_data_full (GTK_OBJECT (main_window
),
1238 "vbox_errvec_subst",
1239 valid
->vbox_errvec_subst
,
1240 (GtkDestroyNotify
) gtk_widget_unref
);
1241 gtk_widget_show (valid
->vbox_errvec_subst
);
1242 gtk_container_add (GTK_CONTAINER (valid
->frame_errvec_subst
),
1243 valid
->vbox_errvec_subst
);
1248 valid
->radiobutton_errvec_subst_0
=
1249 gtk_radio_button_new_with_label(valid
->vbox_errvec_subst_group
,
1251 valid
->vbox_errvec_subst_group
=
1252 gtk_radio_button_group (GTK_RADIO_BUTTON
1253 (valid
->radiobutton_errvec_subst_0
));
1254 gtk_widget_ref(valid
->radiobutton_errvec_subst_0
);
1255 gtk_object_set_data_full (GTK_OBJECT (main_window
),
1256 "radiobutton_errvec_subst_0",
1257 valid
->radiobutton_errvec_subst_0
,
1258 (GtkDestroyNotify
) gtk_widget_unref
);
1259 gtk_widget_show(valid
->radiobutton_errvec_subst_0
);
1260 gtk_box_pack_start (GTK_BOX(valid
->vbox_errvec_subst
),
1261 valid
->radiobutton_errvec_subst_0
,
1266 gtk_object_set_data (GTK_OBJECT (valid
->radiobutton_errvec_subst_0
),
1269 gtk_object_set_data (GTK_OBJECT (valid
->radiobutton_errvec_subst_0
),
1271 "0" /* GPIV_VALID_SUBSTYPE__NONE */);
1272 g_signal_connect (GTK_OBJECT (valid
->radiobutton_errvec_subst_0
),
1275 (on_radiobutton_valid_errvec_subst_enter
),
1277 g_signal_connect (GTK_OBJECT (valid
->radiobutton_errvec_subst_0
),
1279 G_CALLBACK (on_widget_leave
),
1281 g_signal_connect (GTK_OBJECT (valid
->radiobutton_errvec_subst_0
),
1283 G_CALLBACK (on_radiobutton_valid_errvec_subst
),
1285 if (gl_valid_par
->subst_type
== GPIV_VALID_SUBSTYPE__NONE
) {
1286 gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON
1287 (valid
->radiobutton_errvec_subst_0
),
1294 * Substitute by mean of surroundings
1296 valid
->radiobutton_errvec_subst_1
=
1297 gtk_radio_button_new_with_label (valid
->vbox_errvec_subst_group
,
1298 _("Mean of surroundings"));
1299 valid
->vbox_errvec_subst_group
=
1300 gtk_radio_button_group (GTK_RADIO_BUTTON
1301 (valid
->radiobutton_errvec_subst_1
));
1302 gtk_widget_ref (valid
->radiobutton_errvec_subst_1
);
1303 gtk_object_set_data_full (GTK_OBJECT (main_window
),
1304 "radiobutton_errvec_subst_1",
1305 valid
->radiobutton_errvec_subst_1
,
1306 (GtkDestroyNotify
) gtk_widget_unref
);
1307 gtk_widget_show(valid
->radiobutton_errvec_subst_1
);
1308 gtk_box_pack_start (GTK_BOX(valid
->vbox_errvec_subst
),
1309 valid
->radiobutton_errvec_subst_1
,
1314 gtk_object_set_data (GTK_OBJECT (valid
->radiobutton_errvec_subst_1
),
1317 gtk_object_set_data (GTK_OBJECT (valid
->radiobutton_errvec_subst_1
),
1319 "1" /* GPIV_VALID_SUBSTYPE__L_MEAN */);
1320 g_signal_connect (GTK_OBJECT (valid
->radiobutton_errvec_subst_1
),
1323 (on_radiobutton_valid_errvec_subst_enter
),
1325 g_signal_connect (GTK_OBJECT (valid
->radiobutton_errvec_subst_1
),
1327 G_CALLBACK (on_widget_leave
),
1329 g_signal_connect (GTK_OBJECT (valid
->radiobutton_errvec_subst_1
),
1331 G_CALLBACK (on_radiobutton_valid_errvec_subst
),
1337 * Substitute by median of surroundings
1339 valid
->radiobutton_errvec_subst_2
=
1340 gtk_radio_button_new_with_label (valid
->vbox_errvec_subst_group
,
1342 valid
->vbox_errvec_subst_group
=
1343 gtk_radio_button_group (GTK_RADIO_BUTTON
1344 (valid
->radiobutton_errvec_subst_2
));
1345 gtk_widget_ref (valid
->radiobutton_errvec_subst_2
);
1346 gtk_object_set_data_full (GTK_OBJECT (main_window
),
1347 "radiobutton_errvec_subst_2",
1348 valid
->radiobutton_errvec_subst_2
,
1349 (GtkDestroyNotify
) gtk_widget_unref
);
1350 gtk_widget_show (valid
->radiobutton_errvec_subst_2
);
1351 gtk_box_pack_start (GTK_BOX (valid
->vbox_errvec_subst
),
1352 valid
->radiobutton_errvec_subst_2
,
1357 gtk_object_set_data (GTK_OBJECT (valid
->radiobutton_errvec_subst_2
),
1360 gtk_object_set_data (GTK_OBJECT (valid
->radiobutton_errvec_subst_2
),
1362 "2" /* GPIV_VALID_SUBSTYPE__MEDIAN */);
1363 g_signal_connect (GTK_OBJECT (valid
->radiobutton_errvec_subst_2
),
1365 G_CALLBACK(on_radiobutton_valid_errvec_subst_enter
),
1367 g_signal_connect (GTK_OBJECT (valid
->radiobutton_errvec_subst_2
),
1369 G_CALLBACK (on_widget_leave
),
1371 g_signal_connect (GTK_OBJECT (valid
->radiobutton_errvec_subst_2
),
1373 G_CALLBACK (on_radiobutton_valid_errvec_subst
),
1375 if (gl_valid_par
->subst_type
== GPIV_VALID_SUBSTYPE__MEDIAN
) {
1376 gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON
1377 (valid
->radiobutton_errvec_subst_2
),
1383 valid
->radiobutton_errvec_subst_3
=
1384 gtk_radio_button_new_with_label (valid
->vbox_errvec_subst_group
,
1385 _("Next highest corr. peak"));
1386 valid
->vbox_errvec_subst_group
=
1387 gtk_radio_button_group (GTK_RADIO_BUTTON
1388 (valid
->radiobutton_errvec_subst_3
));
1389 gtk_widget_ref (valid
->radiobutton_errvec_subst_3
);
1390 gtk_object_set_data_full (GTK_OBJECT (main_window
),
1391 "radiobutton_errvec_subst_3",
1392 valid
->radiobutton_errvec_subst_3
,
1393 (GtkDestroyNotify
) gtk_widget_unref
);
1394 gtk_widget_show (valid
->radiobutton_errvec_subst_3
);
1395 gtk_box_pack_start (GTK_BOX (valid
->vbox_errvec_subst
),
1396 valid
->radiobutton_errvec_subst_3
,
1401 gtk_object_set_data (GTK_OBJECT (valid
->radiobutton_errvec_subst_3
),
1404 gtk_object_set_data (GTK_OBJECT (valid
->radiobutton_errvec_subst_3
),
1406 "3" /* GPIV_VALID_SUBSTYPE__COV_PEAK */);
1407 g_signal_connect (GTK_OBJECT (valid
->radiobutton_errvec_subst_3
),
1410 (on_radiobutton_valid_errvec_subst_enter
),
1412 g_signal_connect (GTK_OBJECT (valid
->radiobutton_errvec_subst_3
),
1414 G_CALLBACK (on_widget_leave
),
1416 g_signal_connect (GTK_OBJECT (valid
->radiobutton_errvec_subst_3
),
1418 G_CALLBACK (on_radiobutton_valid_errvec_subst
),
1420 if (gl_valid_par
->subst_type
== GPIV_VALID_SUBSTYPE__COR_PEAK
) {
1421 gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON
1422 (valid
->radiobutton_errvec_subst_3
),
1428 valid
->button_errvec
=
1429 gtk_button_new_with_label ( _("validate on outliers"));
1430 gtk_widget_ref (valid
->button_errvec
);
1431 gtk_object_set_data_full (GTK_OBJECT (main_window
),
1433 valid
->button_errvec
,
1434 (GtkDestroyNotify
) gtk_widget_unref
);
1435 gtk_widget_show (valid
->button_errvec
);
1436 gtk_box_pack_start (GTK_BOX (valid
->vbox_errvec
),
1437 valid
->button_errvec
,
1441 gtk_tooltips_set_tip(gpiv
->tooltips
,
1442 valid
->button_errvec
,
1443 _("substitutes outliers"),
1446 gtk_object_set_data (GTK_OBJECT (valid
->button_errvec
),
1449 g_signal_connect (GTK_OBJECT (valid
->button_errvec
),
1451 G_CALLBACK (on_button_valid_errvec_enter
),
1453 g_signal_connect (GTK_OBJECT (valid
->button_errvec
),
1455 G_CALLBACK (on_widget_leave
),
1457 g_signal_connect (GTK_OBJECT (valid
->button_errvec
),
1459 G_CALLBACK (on_button_valid_errvec
),