updated copyright statement
[gpiv.git] / src / imgh_interface.c
blobec4b445c828761a1517dab1f7474f05af5294638
1 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 c-style: "K&R" -*- */
3 /*----------------------------------------------------------------------
5 gpiv - Graphic program for Particle Image Velocimetry, based on gtk/gnome
6 libraries.
8 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
9 Gerber van der Graaf
11 This file is part of gpiv.
13 Gpiv is free software; you can redistribute it and/or modify
14 it under the terms of the GNU General Public License as published by
15 the Free Software Foundation; either version 2, or (at your option)
16 any later version.
18 This program is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
23 You should have received a copy of the GNU General Public License
24 along with this program; if not, write to the Free Software Foundation,
25 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 ----------------------------------------------------------------------*/
30 * Image header interface
31 * $Log: imgh_interface.c,v $
32 * Revision 1.13 2007-11-23 16:24:07 gerber
33 * release 0.5.0: Kafka
35 * Revision 1.12 2007-06-06 17:00:48 gerber
36 * Retreives images/data from URI using Gnome Virtual File System.
38 * Revision 1.11 2007-03-22 16:00:32 gerber
39 * Added image processing tabulator
41 * Revision 1.10 2007-01-29 11:27:43 gerber
42 * added image formats png, gif, tif png, bmp, improved buffer display
44 * Revision 1.9 2006-09-18 07:27:06 gerber
45 * *** empty log message ***
47 * Revision 1.8 2006/01/31 14:28:12 gerber
48 * version 0.3.0
50 * Revision 1.6 2005/02/26 09:17:13 gerber
51 * structured of interrogate function by using gpiv_piv_isiadapt
53 * Revision 1.5 2005/01/19 15:53:42 gerber
54 * Initiation of Data Acquisition (DAC); trigerring of lasers and camera
55 * by using RTAI and Realtime Linux, recording images from IEEE1394
56 * (Firewire) IIDC compliant camera's
58 * Revision 1.4 2004/06/14 21:19:23 gerber
59 * Image depth up to 16 bits.
60 * Improvement "single int" and "drag int" in Eval tab.
61 * Viewer's pop-up menu.
62 * Adaption for gpiv_matrix_* and gpiv_vector_*.
63 * Resizing console.
64 * See Changelog for further info.
66 * Revision 1.3 2003/08/22 15:24:52 gerber
67 * interactive spatial scaling
69 * Revision 1.2 2003/07/25 15:40:23 gerber
70 * removed/disabled setting of correlation in Eval tab, Correlation type in Image info tab
72 * Revision 1.1.1.1 2003/06/17 17:10:52 gerber
73 * Imported gpiv
76 #ifdef HAVE_CONFIG_H
77 # include <config.h>
78 #endif
80 #include "gpiv_gui.h"
81 #include "imgh_interface.h"
82 #include "utils.h"
83 #include "console.h"
84 #include "imgh.h"
85 #include "pivpost.h"
89 Imgheader *
90 create_imgh (GnomeApp *main_window,
91 GtkWidget *container
93 /*-----------------------------------------------------------------------------
94 * Image Info window with data from header
97 GpivConsole *gpiv = gtk_object_get_data (GTK_OBJECT (main_window), "gpiv");
98 Imgheader *imgh = g_new0 (Imgheader, 1);
101 imgh->vbox_label = gtk_vbox_new (FALSE,
103 gtk_widget_ref (imgh->vbox_label);
104 gtk_object_set_data_full (GTK_OBJECT (main_window),
105 "imgh_vbox_label",
106 imgh->vbox_label,
107 (GtkDestroyNotify) gtk_widget_unref);
108 gtk_widget_show (imgh->vbox_label);
109 gtk_container_add (GTK_CONTAINER (container),
110 imgh->vbox_label);
114 imgh->label_title = gtk_label_new(_("Image information and settings"));
115 gtk_widget_ref(imgh->label_title);
116 gtk_object_set_data_full(GTK_OBJECT(main_window),
117 "imgh->label_title",
118 imgh->label_title,
119 (GtkDestroyNotify) gtk_widget_unref);
120 gtk_widget_show (imgh->label_title);
121 gtk_box_pack_start (GTK_BOX (imgh->vbox_label),
122 imgh->label_title,
123 FALSE,
124 FALSE,
130 * Scrolled window
132 imgh->vbox_scroll = gtk_vbox_new (FALSE,
134 gtk_widget_ref (imgh->vbox_scroll);
135 gtk_object_set_data_full (GTK_OBJECT (main_window),
136 "imgh_vbox_scroll",
137 imgh->vbox_scroll,
138 (GtkDestroyNotify) gtk_widget_unref);
139 gtk_widget_show (imgh->vbox_scroll);
140 gtk_box_pack_start (GTK_BOX (imgh->vbox_label),
141 imgh->vbox_scroll,
142 TRUE,
143 TRUE,
148 imgh->scrolledwindow = gtk_scrolled_window_new (NULL,
149 NULL);
150 gtk_widget_ref (imgh->scrolledwindow);
151 gtk_object_set_data_full (GTK_OBJECT (main_window),
152 "imgh_scrolledwindow",
153 imgh->scrolledwindow,
154 (GtkDestroyNotify) gtk_widget_unref);
155 gtk_widget_show (imgh->scrolledwindow);
156 gtk_box_pack_start (GTK_BOX (imgh->vbox_scroll),
157 imgh->scrolledwindow,
158 TRUE,
159 TRUE,
161 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW
162 (imgh->scrolledwindow),
163 GTK_POLICY_NEVER,
164 GTK_POLICY_AUTOMATIC);
168 imgh->viewport = gtk_viewport_new (NULL,
169 NULL);
170 gtk_widget_ref (imgh->viewport);
171 gtk_object_set_data_full (GTK_OBJECT (main_window),
172 "imgh_viewport",
173 imgh->viewport,
174 (GtkDestroyNotify) gtk_widget_unref);
175 gtk_widget_show (imgh->viewport);
176 gtk_container_add (GTK_CONTAINER (imgh->scrolledwindow),
177 imgh->viewport);
180 * main table for image header table/window
182 imgh->vbox1 = gtk_vbox_new (FALSE,
184 gtk_widget_ref (imgh->vbox1);
185 gtk_object_set_data_full (GTK_OBJECT (main_window),
186 "imgh->vbox1",
187 imgh->vbox1,
188 (GtkDestroyNotify) gtk_widget_unref);
189 gtk_widget_show (imgh->vbox1);
190 gtk_container_add (GTK_CONTAINER (imgh->viewport),
191 imgh->vbox1);
195 * buffer number
197 imgh->hbox_bufno = gtk_hbox_new (FALSE,
199 gtk_widget_ref (imgh->hbox_bufno);
200 gtk_object_set_data_full (GTK_OBJECT (main_window),
201 "imgh_hbox_bufno",
202 imgh->hbox_bufno,
203 (GtkDestroyNotify) gtk_widget_unref);
204 gtk_widget_show (imgh->hbox_bufno);
205 gtk_box_pack_start (GTK_BOX (imgh->vbox1),
206 imgh->hbox_bufno,
207 TRUE,
208 TRUE,
213 imgh->label_label_bufno = gtk_label_new ( _("buffer #: "));
214 gtk_widget_ref (imgh->label_label_bufno);
215 gtk_object_set_data_full (GTK_OBJECT (main_window),
216 "imgh_label_label_bufno",
217 imgh->label_label_bufno,
218 (GtkDestroyNotify) gtk_widget_unref);
219 gtk_widget_show (imgh->label_label_bufno);
220 gtk_box_pack_start (GTK_BOX (imgh->hbox_bufno),
221 imgh->label_label_bufno,
222 FALSE,
223 FALSE,
228 imgh->label_bufno = gtk_label_new ("");
229 gtk_widget_ref (imgh->label_bufno);
230 gtk_object_set_data_full (GTK_OBJECT (main_window),
231 "imh_label_bufno",
232 imgh->label_bufno,
233 (GtkDestroyNotify) gtk_widget_unref);
234 gtk_widget_show (imgh->label_bufno);
235 gtk_box_pack_start (GTK_BOX (imgh->hbox_bufno),
236 imgh->label_bufno,
237 FALSE,
238 FALSE,
244 * buffer name
246 imgh->hbox_name = gtk_hbox_new (FALSE,
248 gtk_widget_ref (imgh->hbox_name);
249 gtk_object_set_data_full (GTK_OBJECT (main_window),
250 "imgh->hbox_name",
251 imgh->hbox_name,
252 (GtkDestroyNotify) gtk_widget_unref);
253 gtk_widget_show (imgh->hbox_name);
254 gtk_box_pack_start (GTK_BOX (imgh->vbox1),
255 imgh->hbox_name,
256 TRUE,
257 TRUE,
262 imgh->label_label_name = gtk_label_new ( _("file: "));
263 gtk_widget_ref (imgh->label_label_name);
264 gtk_object_set_data_full (GTK_OBJECT (main_window),
265 "imgh_label_label_name",
266 imgh->label_label_name,
267 (GtkDestroyNotify) gtk_widget_unref);
268 gtk_widget_show (imgh->label_label_name);
269 gtk_box_pack_start (GTK_BOX (imgh->hbox_name),
270 imgh->label_label_name,
271 FALSE,
272 FALSE,
277 imgh->label_name = gtk_label_new ("");
278 gtk_widget_ref (imgh->label_name);
279 gtk_object_set_data_full (GTK_OBJECT (main_window),
280 "imgh_label_name",
281 imgh->label_name,
282 (GtkDestroyNotify) gtk_widget_unref);
283 gtk_widget_show (imgh->label_name);
284 gtk_box_pack_start (GTK_BOX (imgh->hbox_name),
285 imgh->label_name,
286 FALSE,
287 FALSE,
292 imgh->table5 = gtk_table_new (9,
294 FALSE);
295 gtk_widget_ref (imgh->table5);
296 gtk_object_set_data_full (GTK_OBJECT (main_window),
297 "imgh->table5",
298 imgh->table5,
299 (GtkDestroyNotify) gtk_widget_unref);
300 gtk_widget_show (imgh->table5);
301 gtk_box_pack_start (GTK_BOX (imgh->vbox1),
302 imgh->table5,
303 TRUE,
304 FALSE,
306 /* viewport_imgh */
309 * label for correlation
311 imgh->label_label_correlation = gtk_label_new ( _("correlation type: "));
312 gtk_widget_ref (imgh->label_label_correlation);
313 gtk_object_set_data_full (GTK_OBJECT (main_window),
314 "imgh_label_label_correlation",
315 imgh->label_label_correlation,
316 (GtkDestroyNotify) gtk_widget_unref);
317 gtk_widget_show (imgh->label_label_correlation);
318 gtk_table_attach (GTK_TABLE (imgh->table5),
319 imgh->label_label_correlation,
324 (GtkAttachOptions) (GTK_EXPAND),
325 (GtkAttachOptions) (0),
331 imgh->label_correlation = gtk_label_new (IMAGE_CORRELATION_LABEL);
332 gtk_widget_ref (imgh->label_correlation);
333 gtk_object_set_data_full (GTK_OBJECT (main_window),
334 "imgh_label_correlation",
335 imgh->label_correlation,
336 (GtkDestroyNotify) gtk_widget_unref);
337 gtk_widget_show (imgh->label_correlation);
338 gtk_table_attach (GTK_TABLE (imgh->table5),
339 imgh->label_correlation,
344 (GtkAttachOptions) (GTK_FILL),
345 (GtkAttachOptions) (0),
351 * label for ncols
353 imgh->label_label_ncols = gtk_label_new ( _("number of columns (pixels): "));
354 gtk_widget_ref (imgh->label_label_ncols);
355 gtk_object_set_data_full (GTK_OBJECT (main_window),
356 "imgh_label_label_ncols",
357 imgh->label_label_ncols,
358 (GtkDestroyNotify) gtk_widget_unref);
359 gtk_widget_show (imgh->label_label_ncols);
360 gtk_table_attach (GTK_TABLE (imgh->table5),
361 imgh->label_label_ncols,
366 (GtkAttachOptions) (GTK_EXPAND),
367 (GtkAttachOptions) (0),
373 imgh->label_ncols = gtk_label_new (IMAGE_WIDTH_LABEL);
374 gtk_widget_ref (imgh->label_ncols);
375 gtk_object_set_data_full (GTK_OBJECT (main_window),
376 "imgh_label_ncols",
377 imgh->label_ncols,
378 (GtkDestroyNotify) gtk_widget_unref);
379 gtk_widget_show (imgh->label_ncols);
380 gtk_table_attach (GTK_TABLE (imgh->table5),
381 imgh->label_ncols,
386 (GtkAttachOptions) (GTK_FILL),
387 (GtkAttachOptions) (0),
393 * label for nrows
395 imgh->label_label_nrows = gtk_label_new ( _("number of rows (pixels): "));
396 gtk_widget_ref (imgh->label_label_nrows);
397 gtk_object_set_data_full (GTK_OBJECT (main_window),
398 "imgh_label_label_nrows",
399 imgh->label_label_nrows,
400 (GtkDestroyNotify) gtk_widget_unref);
401 gtk_widget_show (imgh->label_label_nrows);
402 gtk_table_attach (GTK_TABLE (imgh->table5),
403 imgh->label_label_nrows,
408 (GtkAttachOptions) (GTK_FILL),
409 (GtkAttachOptions) (0),
415 imgh->label_nrows = gtk_label_new (IMAGE_HEIGHT_LABEL);
416 gtk_widget_ref (imgh->label_nrows);
417 gtk_object_set_data_full (GTK_OBJECT (main_window),
418 "imgh_label_nrows",
419 imgh->label_nrows,
420 (GtkDestroyNotify) gtk_widget_unref);
421 gtk_widget_show (imgh->label_nrows);
422 gtk_table_attach (GTK_TABLE (imgh->table5),
423 imgh->label_nrows,
428 (GtkAttachOptions) (GTK_FILL),
429 (GtkAttachOptions) (0),
437 * label for depth
439 imgh->label_label_depth = gtk_label_new ( _("image depth (bits): "));
440 gtk_widget_ref (imgh->label_label_depth);
441 gtk_object_set_data_full (GTK_OBJECT (main_window),
442 "imh_label_label_depth",
443 imgh->label_label_depth,
444 (GtkDestroyNotify) gtk_widget_unref);
445 gtk_widget_show (imgh->label_label_depth);
446 gtk_table_attach (GTK_TABLE (imgh->table5),
447 imgh->label_label_depth,
452 (GtkAttachOptions) (GTK_FILL),
453 (GtkAttachOptions) (0),
459 imgh->label_depth = gtk_label_new (IMAGE_DEPTH_LABEL);
460 gtk_widget_ref (imgh->label_depth);
461 gtk_object_set_data_full (GTK_OBJECT (main_window),
462 "imgh_label_depth",
463 imgh->label_depth,
464 (GtkDestroyNotify) gtk_widget_unref);
465 gtk_widget_show (imgh->label_depth);
466 gtk_table_attach (GTK_TABLE (imgh->table5),
467 imgh->label_depth,
472 (GtkAttachOptions) (GTK_FILL),
473 (GtkAttachOptions) (0),
481 * frame, table and spinners for spatial scale "sscale"
483 * radio buttons and spinners defining spatial scale interactively
484 * with pointer in image
486 imgh->frame_sscale = gtk_frame_new ( _("Define spatial scale"));
487 gtk_widget_ref (imgh->frame_sscale);
488 gtk_object_set_data_full (GTK_OBJECT (main_window),
489 "imgh_frame_sscale",
490 imgh->frame_sscale,
491 (GtkDestroyNotify) gtk_widget_unref);
492 gtk_widget_show (imgh->frame_sscale);
493 gtk_table_attach (GTK_TABLE (imgh->table5),
494 imgh->frame_sscale,
499 (GtkAttachOptions) (GTK_FILL),
500 (GtkAttachOptions) (0),
506 imgh->table_sscale = gtk_table_new (4,
508 FALSE);
509 gtk_widget_ref (imgh->table_sscale);
510 gtk_object_set_data_full (GTK_OBJECT (main_window),
511 "imgh_table_sscale",
512 imgh->table_sscale,
513 (GtkDestroyNotify) gtk_widget_unref);
514 gtk_widget_show (imgh->table_sscale);
515 gtk_container_add (GTK_CONTAINER (imgh->frame_sscale),
516 imgh->table_sscale);
521 imgh->vbox_sscale = gtk_vbox_new (FALSE,
523 gtk_widget_ref (imgh->vbox_sscale);
524 gtk_object_set_data_full (GTK_OBJECT (main_window),
525 "vbox_sscale",
526 imgh->vbox_sscale,
527 (GtkDestroyNotify) gtk_widget_unref);
528 gtk_widget_show (imgh->vbox_sscale);
529 gtk_table_attach (GTK_TABLE (imgh->table_sscale),
530 imgh->vbox_sscale,
535 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
536 (GtkAttachOptions) 0,
541 imgh->radiobutton_mouse_1 =
542 gtk_radio_button_new_with_label (gpiv->mouse_sel_group,
543 _("None"));
544 gpiv->mouse_sel_group =
545 gtk_radio_button_group (GTK_RADIO_BUTTON (imgh->radiobutton_mouse_1));
546 gtk_widget_ref (imgh->radiobutton_mouse_1);
547 gtk_object_set_data_full (GTK_OBJECT (main_window),
548 "radiobutton_mouse_1",
549 imgh->radiobutton_mouse_1,
550 (GtkDestroyNotify) gtk_widget_unref);
551 gtk_widget_show (imgh->radiobutton_mouse_1);
552 gtk_box_pack_start (GTK_BOX (imgh->vbox_sscale),
553 imgh->radiobutton_mouse_1,
554 FALSE,
555 FALSE,
558 gtk_object_set_data (GTK_OBJECT (imgh->radiobutton_mouse_1),
559 "gpiv",
560 gpiv);
561 gtk_object_set_data (GTK_OBJECT (imgh->radiobutton_mouse_1),
562 "mouse_select",
563 "0" /* NO_MS */);
564 g_signal_connect (GTK_OBJECT (imgh->radiobutton_mouse_1),
565 "enter",
566 G_CALLBACK (on_radiobutton_imgh_mouse_1_enter),
567 NULL);
568 g_signal_connect (GTK_OBJECT (imgh->radiobutton_mouse_1),
569 "leave",
570 G_CALLBACK (on_widget_leave),
571 NULL);
572 g_signal_connect (GTK_OBJECT (imgh->radiobutton_mouse_1),
573 "toggled",
574 G_CALLBACK (on_radiobutton_imgh_mouse),
575 NULL);
579 imgh->radiobutton_mouse_2 =
580 gtk_radio_button_new_with_label (gpiv->mouse_sel_group,
581 _("Spanned length"));
582 gpiv->mouse_sel_group =
583 gtk_radio_button_group (GTK_RADIO_BUTTON (imgh->radiobutton_mouse_2));
584 gtk_widget_ref (imgh->radiobutton_mouse_2);
585 gtk_object_set_data_full (GTK_OBJECT (main_window),
586 "radiobutton_mouse_2",
587 imgh->radiobutton_mouse_2,
588 (GtkDestroyNotify) gtk_widget_unref);
589 gtk_widget_show (imgh->radiobutton_mouse_2);
590 gtk_box_pack_start (GTK_BOX (imgh->vbox_sscale),
591 imgh->radiobutton_mouse_2,
592 FALSE,
593 FALSE,
596 gtk_object_set_data (GTK_OBJECT (imgh->radiobutton_mouse_2),
597 "gpiv",
598 gpiv);
599 gtk_object_set_data (GTK_OBJECT (imgh->radiobutton_mouse_2),
600 "mouse_select",
601 "11" /* SPANLENGTH */);
602 g_signal_connect (GTK_OBJECT (imgh->radiobutton_mouse_2),
603 "enter",
604 G_CALLBACK (on_radiobutton_imgh_mouse_2_enter),
605 NULL);
606 g_signal_connect (GTK_OBJECT (imgh->radiobutton_mouse_2),
607 "leave",
608 G_CALLBACK (on_widget_leave),
609 NULL);
610 g_signal_connect (GTK_OBJECT (imgh->radiobutton_mouse_2),
611 "toggled",
612 G_CALLBACK (on_radiobutton_imgh_mouse),
613 NULL);
616 imgh->radiobutton_mouse_3 =
617 gtk_radio_button_new_with_label (gpiv->mouse_sel_group,
618 _("Vertical spanned length"));
619 gpiv->mouse_sel_group =
620 gtk_radio_button_group (GTK_RADIO_BUTTON (imgh->radiobutton_mouse_3));
621 gtk_widget_ref (imgh->radiobutton_mouse_3);
622 gtk_object_set_data_full (GTK_OBJECT (main_window),
623 "radiobutton_mouse_3",
624 imgh->radiobutton_mouse_3,
625 (GtkDestroyNotify) gtk_widget_unref);
626 gtk_widget_show (imgh->radiobutton_mouse_3);
627 gtk_box_pack_start (GTK_BOX (imgh->vbox_sscale),
628 imgh->radiobutton_mouse_3,
629 FALSE,
630 FALSE,
633 gtk_object_set_data (GTK_OBJECT (imgh->radiobutton_mouse_3),
634 "gpiv",
635 gpiv);
636 gtk_object_set_data (GTK_OBJECT (imgh->radiobutton_mouse_3),
637 "mouse_select",
638 "12" /* V_SPANLENGTH */);
639 g_signal_connect (GTK_OBJECT (imgh->radiobutton_mouse_3),
640 "enter",
641 G_CALLBACK (on_radiobutton_imgh_mouse_3_enter),
642 NULL);
643 g_signal_connect (GTK_OBJECT (imgh->radiobutton_mouse_3),
644 "leave",
645 G_CALLBACK (on_widget_leave),
646 NULL);
647 g_signal_connect (GTK_OBJECT (imgh->radiobutton_mouse_3),
648 "toggled",
649 G_CALLBACK (on_radiobutton_imgh_mouse),
650 NULL);
654 imgh->radiobutton_mouse_4 =
655 gtk_radio_button_new_with_label (gpiv->mouse_sel_group,
656 _("Horizontal spanned length"));
657 gpiv->mouse_sel_group =
658 gtk_radio_button_group (GTK_RADIO_BUTTON (imgh->radiobutton_mouse_4));
659 gtk_widget_ref (imgh->radiobutton_mouse_4);
660 gtk_object_set_data_full (GTK_OBJECT (main_window),
661 "radiobutton_mouse_4",
662 imgh->radiobutton_mouse_4,
663 (GtkDestroyNotify) gtk_widget_unref);
664 gtk_widget_show (imgh->radiobutton_mouse_4);
665 gtk_box_pack_start (GTK_BOX (imgh->vbox_sscale),
666 imgh->radiobutton_mouse_4,
667 FALSE,
668 FALSE,
671 gtk_object_set_data (GTK_OBJECT (imgh->radiobutton_mouse_4),
672 "gpiv",
673 gpiv);
674 gtk_object_set_data (GTK_OBJECT (imgh->radiobutton_mouse_4),
675 "mouse_select",
676 "13" /* H_SPANLENGTH */);
677 g_signal_connect (GTK_OBJECT (imgh->radiobutton_mouse_4),
678 "enter",
679 G_CALLBACK (on_radiobutton_imgh_mouse_4_enter),
680 NULL);
681 g_signal_connect (GTK_OBJECT (imgh->radiobutton_mouse_4),
682 "leave",
683 G_CALLBACK (on_widget_leave),
684 NULL);
685 g_signal_connect (GTK_OBJECT (imgh->radiobutton_mouse_4),
686 "toggled",
687 G_CALLBACK (on_radiobutton_imgh_mouse),
688 NULL);
693 imgh->label_sscale_px = gtk_label_new ( _("span (pixels): "));
694 gtk_widget_ref (imgh->label_sscale_px);
695 gtk_object_set_data_full (GTK_OBJECT (main_window),
696 "imgh_label_sscale_px",
697 imgh->label_sscale_px,
698 (GtkDestroyNotify) gtk_widget_unref);
699 gtk_widget_show (imgh->label_sscale_px);
700 gtk_table_attach (GTK_TABLE (imgh->table_sscale),
701 imgh->label_sscale_px,
706 (GtkAttachOptions) (GTK_FILL),
707 (GtkAttachOptions) (0),
714 imgh->spinbutton_adj_sscale_px =
715 gtk_adjustment_new (gpiv_var->img_span_px,
717 IMAGE_WIDTH_MAX,
719 100,
720 IMAGE_WIDTH_MAX);
722 imgh->spinbutton_sscale_px =
723 gtk_spin_button_new (GTK_ADJUSTMENT (imgh->spinbutton_adj_sscale_px),
726 gtk_widget_ref (imgh->spinbutton_sscale_px);
727 gtk_widget_show (imgh->spinbutton_sscale_px);
728 gtk_table_attach (GTK_TABLE (imgh->table_sscale),
729 imgh->spinbutton_sscale_px,
734 (GtkAttachOptions) (GTK_FILL),
735 (GtkAttachOptions) (0),
738 gtk_entry_set_editable (GTK_ENTRY (imgh->spinbutton_sscale_px),
739 TRUE);
740 gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (imgh->spinbutton_sscale_px),
741 TRUE);
743 gtk_object_set_data (GTK_OBJECT (imgh->spinbutton_sscale_px),
744 "gpiv",
745 gpiv);
746 g_signal_connect (GTK_OBJECT (imgh->spinbutton_sscale_px),
747 "changed",
748 G_CALLBACK (on_spinbutton_post_scale_px),
749 imgh->spinbutton_sscale_px);
753 imgh->label_sscale_mm = gtk_label_new ( _("length (mm): "));
754 gtk_widget_ref (imgh->label_sscale_mm);
755 gtk_object_set_data_full (GTK_OBJECT (main_window),
756 "imgh_label_sscale_mm",
757 imgh->label_sscale_mm,
758 (GtkDestroyNotify) gtk_widget_unref);
759 gtk_widget_show (imgh->label_sscale_mm);
760 gtk_table_attach (GTK_TABLE (imgh->table_sscale),
761 imgh->label_sscale_mm,
766 (GtkAttachOptions) (GTK_FILL),
767 (GtkAttachOptions) (0),
774 imgh->spinbutton_adj_sscale_mm =
775 gtk_adjustment_new (gpiv_var->img_length_mm,
776 0.0001,
777 500.0,
778 ADJ_STEP,
779 10.0,
780 500.0);
782 imgh->spinbutton_sscale_mm =
783 gtk_spin_button_new (GTK_ADJUSTMENT (imgh->spinbutton_adj_sscale_mm),
786 gtk_widget_ref (imgh->spinbutton_sscale_mm);
787 gtk_widget_show (imgh->spinbutton_sscale_mm);
788 gtk_table_attach (GTK_TABLE (imgh->table_sscale),
789 imgh->spinbutton_sscale_mm,
794 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
795 (GtkAttachOptions) (0),
798 gtk_entry_set_editable (GTK_ENTRY (imgh->spinbutton_sscale_mm),
799 TRUE);
800 gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (imgh->spinbutton_sscale_mm),
801 TRUE);
803 gtk_object_set_data (GTK_OBJECT (imgh->spinbutton_sscale_mm),
804 "gpiv",
805 gpiv);
806 g_signal_connect (GTK_OBJECT (imgh->spinbutton_sscale_mm),
807 "changed",
808 G_CALLBACK (on_spinbutton_post_scale_mm),
809 imgh->spinbutton_sscale_mm);
814 * spinner for spatial scale "sscale"
816 imgh->label_sscale = gtk_label_new ( _("spatial scale (mm/pixels): "));
817 gtk_widget_ref (imgh->label_sscale);
818 gtk_object_set_data_full (GTK_OBJECT (main_window),
819 "imgh_label_sscale",
820 imgh->label_sscale,
821 (GtkDestroyNotify) gtk_widget_unref);
822 gtk_widget_show (imgh->label_sscale);
823 gtk_table_attach (GTK_TABLE (imgh->table5),
824 imgh->label_sscale,
829 (GtkAttachOptions) (GTK_FILL),
830 (GtkAttachOptions) (0),
837 imgh->spinbutton_adj_sscale =
838 gtk_adjustment_new (gl_image_par->s_scale,
840 ADJ_MAX,
841 ADJ_STEP,
842 ADJ_PAGE,
843 ADJ_MAX);
845 imgh->spinbutton_sscale =
846 gtk_spin_button_new (GTK_ADJUSTMENT (imgh->spinbutton_adj_sscale),
849 gtk_widget_ref (imgh->spinbutton_sscale);
850 gtk_widget_show (imgh->spinbutton_sscale);
851 gtk_table_attach (GTK_TABLE (imgh->table5),
852 imgh->spinbutton_sscale,
857 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
858 (GtkAttachOptions) (0),
861 gtk_entry_set_editable (GTK_ENTRY (imgh->spinbutton_sscale),
862 TRUE);
863 gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (imgh->spinbutton_sscale),
864 TRUE);
866 gtk_object_set_data (GTK_OBJECT (imgh->spinbutton_sscale),
867 "var_type",
868 "3");
869 g_signal_connect (GTK_OBJECT (imgh->spinbutton_sscale),
870 "changed",
871 G_CALLBACK (on_spinbutton_post_scale),
872 imgh->spinbutton_sscale);
877 * spinner for time scale "tscale"
879 imgh->label_tscale = gtk_label_new ( _("time scale (ms): "));
880 gtk_widget_ref (imgh->label_tscale);
881 gtk_object_set_data_full (GTK_OBJECT (main_window),
882 "imgh_label_tscale",
883 imgh->label_tscale,
884 (GtkDestroyNotify) gtk_widget_unref);
885 gtk_widget_show (imgh->label_tscale);
886 gtk_table_attach (GTK_TABLE (imgh->table5),
887 imgh->label_tscale,
892 (GtkAttachOptions) (GTK_FILL),
893 (GtkAttachOptions) (0),
899 imgh->spinbutton_adj_tscale =
900 gtk_adjustment_new (gl_image_par->t_scale,
902 ADJ_MAX,
903 ADJ_STEP,
904 ADJ_PAGE,
905 ADJ_MAX);
909 imgh->spinbutton_tscale =
910 gtk_spin_button_new (GTK_ADJUSTMENT (imgh->spinbutton_adj_tscale),
913 gtk_widget_ref (imgh->spinbutton_tscale);
914 gtk_widget_show (imgh->spinbutton_tscale);
915 gtk_table_attach (GTK_TABLE (imgh->table5),
916 imgh->spinbutton_tscale,
921 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
922 (GtkAttachOptions) (0),
925 gtk_entry_set_editable (GTK_ENTRY (imgh->spinbutton_tscale),
926 TRUE);
927 gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (imgh->spinbutton_tscale),
928 TRUE);
930 gtk_object_set_data (GTK_OBJECT (imgh->spinbutton_tscale),
931 "var_type",
932 "4");
933 g_signal_connect (GTK_OBJECT (imgh->spinbutton_tscale),
934 "changed",
935 G_CALLBACK (on_spinbutton_post_scale),
936 imgh->spinbutton_tscale);
940 imgh->table2 = gtk_table_new (16,
942 FALSE);
943 gtk_widget_ref (imgh->table2);
944 gtk_object_set_data_full (GTK_OBJECT (main_window),
945 "imgh->table2",
946 imgh->table2,
947 (GtkDestroyNotify) gtk_widget_unref);
948 gtk_widget_show (imgh->table2);
949 gtk_box_pack_end (GTK_BOX (imgh->vbox1),
950 imgh->table2,
951 TRUE,
952 FALSE,
956 * spinner for column position
958 imgh->label_colpos = gtk_label_new ( _("position of column #0 (m): "));
959 gtk_widget_ref (imgh->label_colpos);
960 gtk_object_set_data_full (GTK_OBJECT (main_window),
961 "imgh_label_colpos",
962 imgh->label_colpos,
963 (GtkDestroyNotify) gtk_widget_unref);
964 gtk_widget_show (imgh->label_colpos);
965 gtk_table_attach (GTK_TABLE (imgh->table5),
966 imgh->label_colpos,
971 (GtkAttachOptions) (GTK_FILL),
972 (GtkAttachOptions) (0),
979 imgh->spinbutton_adj_colpos =
980 gtk_adjustment_new (gl_image_par->z_off_x,
981 ADJ_MIN,
982 ADJ_MAX,
983 ADJ_STEP,
984 ADJ_PAGE,
985 ADJ_MAX);
989 imgh->spinbutton_colpos =
990 gtk_spin_button_new (GTK_ADJUSTMENT (imgh->spinbutton_adj_colpos),
993 gtk_widget_ref (imgh->spinbutton_colpos);
994 gtk_widget_show (imgh->spinbutton_colpos);
995 gtk_table_attach (GTK_TABLE (imgh->table5),
996 imgh->spinbutton_colpos,
1001 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
1002 (GtkAttachOptions) (0),
1005 gtk_entry_set_editable (GTK_ENTRY (imgh->spinbutton_colpos),
1006 TRUE);
1007 gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (imgh->spinbutton_colpos),
1008 TRUE);
1010 gtk_object_set_data (GTK_OBJECT (imgh->spinbutton_colpos),
1011 "var_type",
1012 "1");
1013 g_signal_connect (GTK_OBJECT (imgh->spinbutton_colpos),
1014 "changed",
1015 G_CALLBACK (on_spinbutton_post_scale),
1016 imgh->spinbutton_colpos);
1021 * spinner for row position
1023 imgh->label_rowpos = gtk_label_new ( _("position of row #0 (m): "));
1024 gtk_widget_ref (imgh->label_rowpos);
1025 gtk_object_set_data_full (GTK_OBJECT (main_window),
1026 "imgh_label_rowpos",
1027 imgh->label_rowpos,
1028 (GtkDestroyNotify) gtk_widget_unref);
1029 gtk_widget_show (imgh->label_rowpos);
1030 gtk_table_attach (GTK_TABLE (imgh->table5),
1031 imgh->label_rowpos,
1036 (GtkAttachOptions) (GTK_FILL),
1037 (GtkAttachOptions) (0),
1043 imgh->spinbutton_adj_rowpos =
1044 gtk_adjustment_new (gl_image_par->z_off_y,
1045 ADJ_MIN,
1046 ADJ_MAX,
1047 ADJ_STEP,
1048 ADJ_PAGE,
1049 ADJ_MAX);
1053 imgh->spinbutton_rowpos =
1054 gtk_spin_button_new (GTK_ADJUSTMENT (imgh->spinbutton_adj_rowpos),
1057 gtk_widget_ref (imgh->spinbutton_rowpos);
1058 gtk_widget_show (imgh->spinbutton_rowpos);
1059 gtk_table_attach (GTK_TABLE (imgh->table5),
1060 imgh->spinbutton_rowpos,
1065 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
1066 (GtkAttachOptions) (0),
1069 gtk_entry_set_editable (GTK_ENTRY (imgh->spinbutton_rowpos),
1070 TRUE);
1071 gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (imgh->spinbutton_rowpos),
1072 TRUE);
1074 gtk_object_set_data (GTK_OBJECT (imgh->spinbutton_rowpos),
1075 "var_type",
1076 "2");
1077 g_signal_connect (GTK_OBJECT (imgh->spinbutton_rowpos),
1078 "changed",
1079 G_CALLBACK (on_spinbutton_post_scale),
1080 imgh->spinbutton_rowpos);
1085 * entry for project
1087 imgh->label_imgtitle = gtk_label_new ( _("Title: "));
1088 gtk_widget_ref (imgh->label_imgtitle);
1089 gtk_object_set_data_full (GTK_OBJECT (main_window),
1090 "imgh_label_imgtitle",
1091 imgh->label_imgtitle,
1092 (GtkDestroyNotify) gtk_widget_unref);
1093 gtk_widget_show (imgh->label_imgtitle);
1094 gtk_table_attach (GTK_TABLE (imgh->table2),
1095 imgh->label_imgtitle,
1100 (GtkAttachOptions) (GTK_FILL),
1101 (GtkAttachOptions) (0),
1104 gtk_misc_set_padding (GTK_MISC (imgh->label_imgtitle),
1110 imgh->entry_imgtitle = gtk_entry_new ();
1111 gtk_widget_ref (imgh->entry_imgtitle);
1112 gtk_object_set_data_full (GTK_OBJECT (main_window),
1113 "imgh_entry_imgtitle",
1114 imgh->entry_imgtitle,
1115 (GtkDestroyNotify) gtk_widget_unref);
1116 gtk_widget_show (imgh->entry_imgtitle);
1117 gtk_table_attach (GTK_TABLE (imgh->table2),
1118 imgh->entry_imgtitle,
1123 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
1124 (GtkAttachOptions) (0),
1128 gtk_object_set_data (GTK_OBJECT (imgh->entry_imgtitle),
1129 "imgh",
1130 imgh);
1131 g_signal_connect (GTK_OBJECT (imgh->entry_imgtitle),
1132 "changed",
1133 G_CALLBACK (on_entry_imgh_title),
1134 imgh->entry_imgtitle);
1135 if (gl_image_par->title__set) {
1136 gtk_entry_set_text(GTK_ENTRY(imgh->entry_imgtitle),
1137 gl_image_par->title);
1141 * entry for creation date
1143 imgh->label_crdate = gtk_label_new ( _("Creation date: "));
1144 gtk_widget_ref (imgh->label_crdate);
1145 gtk_object_set_data_full (GTK_OBJECT (main_window),
1146 "imgh_label_crdate",
1147 imgh->label_crdate,
1148 (GtkDestroyNotify) gtk_widget_unref);
1149 gtk_widget_show (imgh->label_crdate);
1150 gtk_table_attach (GTK_TABLE (imgh->table2),
1151 imgh->label_crdate,
1156 (GtkAttachOptions) (GTK_FILL),
1157 (GtkAttachOptions) (0),
1160 gtk_misc_set_alignment (GTK_MISC (imgh->label_crdate),
1161 2.98023e-07,
1162 0.5);
1163 gtk_misc_set_padding (GTK_MISC (imgh->label_crdate),
1169 imgh->entry_crdate = gtk_entry_new ();
1170 gtk_widget_ref (imgh->entry_crdate);
1171 gtk_object_set_data_full (GTK_OBJECT (main_window),
1172 "imgh_entry_crdate",
1173 imgh->entry_crdate,
1174 (GtkDestroyNotify) gtk_widget_unref);
1175 gtk_widget_show (imgh->entry_crdate);
1176 gtk_table_attach (GTK_TABLE (imgh->table2),
1177 imgh->entry_crdate,
1182 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
1183 (GtkAttachOptions) (0),
1187 gtk_object_set_data (GTK_OBJECT (imgh->entry_crdate),
1188 "imgh",
1189 imgh);
1190 g_signal_connect (GTK_OBJECT (imgh->entry_crdate),
1191 "changed",
1192 G_CALLBACK (on_entry_imgh_crdate),
1193 imgh->entry_crdate);
1194 if (gl_image_par->creation_date__set) {
1195 gtk_entry_set_text(GTK_ENTRY(imgh->entry_crdate),
1196 gl_image_par->creation_date);
1200 * entry for location
1202 imgh->label_location = gtk_label_new ( _("Place: "));
1203 gtk_widget_ref (imgh->label_location);
1204 gtk_object_set_data_full (GTK_OBJECT (main_window),
1205 "imgh_label_location",
1206 imgh->label_location,
1207 (GtkDestroyNotify) gtk_widget_unref);
1208 gtk_widget_show (imgh->label_location);
1209 gtk_table_attach (GTK_TABLE (imgh->table2),
1210 imgh->label_location,
1215 (GtkAttachOptions) (GTK_FILL),
1216 (GtkAttachOptions) (0),
1222 imgh->entry_location = gtk_entry_new ();
1223 gtk_widget_ref (imgh->entry_location);
1224 gtk_object_set_data_full (GTK_OBJECT (main_window),
1225 "imgh_entry_location",
1226 imgh->entry_location,
1227 (GtkDestroyNotify) gtk_widget_unref);
1228 gtk_widget_show (imgh->entry_location);
1229 gtk_table_attach (GTK_TABLE (imgh->table2),
1230 imgh->entry_location,
1235 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
1236 (GtkAttachOptions) (0),
1240 gtk_object_set_data (GTK_OBJECT (imgh->entry_location),
1241 "imgh",
1242 imgh);
1243 g_signal_connect (GTK_OBJECT (imgh->entry_location),
1244 "changed",
1245 G_CALLBACK (on_entry_imgh_location),
1246 imgh->entry_location);
1247 if (gl_image_par->location__set) {
1248 gtk_entry_set_text(GTK_ENTRY(imgh->entry_location),
1249 gl_image_par->location);
1253 * entry for author
1255 imgh->label_author = gtk_label_new ( _("Author: "));
1256 gtk_widget_ref (imgh->label_author);
1257 gtk_object_set_data_full (GTK_OBJECT (main_window),
1258 "imgh_label_author",
1259 imgh->label_author,
1260 (GtkDestroyNotify) gtk_widget_unref);
1261 gtk_widget_show (imgh->label_author);
1262 gtk_table_attach (GTK_TABLE (imgh->table2),
1263 imgh->label_author,
1268 (GtkAttachOptions) (GTK_FILL),
1269 (GtkAttachOptions) (0),
1275 imgh->entry_author = gtk_entry_new ();
1276 gtk_widget_ref (imgh->entry_author);
1277 gtk_object_set_data_full (GTK_OBJECT (main_window),
1278 "imgh_entry_author",
1279 imgh->entry_author,
1280 (GtkDestroyNotify) gtk_widget_unref);
1281 gtk_widget_show (imgh->entry_author);
1282 gtk_table_attach (GTK_TABLE (imgh->table2),
1283 imgh->entry_author,
1288 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
1289 (GtkAttachOptions) (0),
1293 gtk_object_set_data (GTK_OBJECT (imgh->entry_author),
1294 "imgh",
1295 imgh);
1296 g_signal_connect (GTK_OBJECT (imgh->entry_author),
1297 "changed",
1298 G_CALLBACK (on_entry_imgh_author),
1299 imgh->entry_author);
1300 if (gl_image_par->author__set) {
1301 gtk_entry_set_text(GTK_ENTRY(imgh->entry_author),
1302 gl_image_par->author);
1306 * entry for software
1308 imgh->label_software = gtk_label_new ( _("Software: "));
1309 gtk_widget_ref (imgh->label_software);
1310 gtk_object_set_data_full (GTK_OBJECT (main_window),
1311 "imgh_label_software",
1312 imgh->label_software,
1313 (GtkDestroyNotify) gtk_widget_unref);
1314 gtk_widget_show (imgh->label_software);
1315 gtk_table_attach (GTK_TABLE (imgh->table2),
1316 imgh->label_software,
1321 (GtkAttachOptions) (GTK_FILL),
1322 (GtkAttachOptions) (0),
1328 imgh->entry_software = gtk_entry_new ();
1329 gtk_widget_ref (imgh->entry_software);
1330 gtk_object_set_data_full (GTK_OBJECT (main_window),
1331 "imgh_entry_software",
1332 imgh->entry_software,
1333 (GtkDestroyNotify) gtk_widget_unref);
1334 gtk_widget_show (imgh->entry_software);
1335 gtk_table_attach (GTK_TABLE (imgh->table2),
1336 imgh->entry_software,
1341 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
1342 (GtkAttachOptions) (0),
1346 gtk_object_set_data (GTK_OBJECT (imgh->entry_software),
1347 "imgh",
1348 imgh);
1349 g_signal_connect (GTK_OBJECT (imgh->entry_software),
1350 "changed",
1351 G_CALLBACK (on_entry_imgh_software),
1352 imgh->entry_software);
1353 if (gl_image_par->software__set) {
1354 gtk_entry_set_text(GTK_ENTRY(imgh->entry_software),
1355 gl_image_par->software);
1359 * entry for source
1361 imgh->label_source = gtk_label_new ( _("Source: "));
1362 gtk_widget_ref (imgh->label_source);
1363 gtk_object_set_data_full (GTK_OBJECT (main_window),
1364 "imgh_label_source",
1365 imgh->label_source,
1366 (GtkDestroyNotify) gtk_widget_unref);
1367 gtk_widget_show (imgh->label_source);
1368 gtk_table_attach (GTK_TABLE (imgh->table2),
1369 imgh->label_source,
1374 (GtkAttachOptions) (GTK_FILL),
1375 (GtkAttachOptions) (0),
1381 imgh->entry_source = gtk_entry_new ();
1382 gtk_widget_ref (imgh->entry_source);
1383 gtk_object_set_data_full (GTK_OBJECT (main_window),
1384 "imgh_entry_source",
1385 imgh->entry_source,
1386 (GtkDestroyNotify) gtk_widget_unref);
1387 gtk_widget_show (imgh->entry_source);
1388 gtk_table_attach (GTK_TABLE (imgh->table2),
1389 imgh->entry_source,
1394 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
1395 (GtkAttachOptions) (0),
1399 gtk_object_set_data (GTK_OBJECT (imgh->entry_source),
1400 "imgh",
1401 imgh);
1402 g_signal_connect (GTK_OBJECT (imgh->entry_source),
1403 "changed",
1404 G_CALLBACK (on_entry_imgh_source),
1405 imgh->entry_source);
1406 if (gl_image_par->source__set) {
1407 gtk_entry_set_text(GTK_ENTRY(imgh->entry_source),
1408 gl_image_par->source);
1412 * entry for usertext
1414 imgh->label_usertext = gtk_label_new ( _("Usertext: "));
1415 gtk_widget_ref (imgh->label_usertext);
1416 gtk_object_set_data_full (GTK_OBJECT (main_window),
1417 "imgh_label_usertext",
1418 imgh->label_usertext,
1419 (GtkDestroyNotify) gtk_widget_unref);
1420 gtk_widget_show (imgh->label_usertext);
1421 gtk_table_attach (GTK_TABLE (imgh->table2),
1422 imgh->label_usertext,
1427 (GtkAttachOptions) (GTK_FILL),
1428 (GtkAttachOptions) (0),
1434 imgh->entry_usertext = gtk_entry_new ();
1435 gtk_widget_ref (imgh->entry_usertext);
1436 gtk_object_set_data_full (GTK_OBJECT (main_window),
1437 "imgh_entry_usertext",
1438 imgh->entry_usertext,
1439 (GtkDestroyNotify) gtk_widget_unref);
1440 gtk_widget_show (imgh->entry_usertext);
1441 gtk_table_attach (GTK_TABLE (imgh->table2),
1442 imgh->entry_usertext,
1447 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
1448 (GtkAttachOptions) (0),
1452 gtk_object_set_data (GTK_OBJECT (imgh->entry_usertext),
1453 "imgh",
1454 imgh);
1455 g_signal_connect (GTK_OBJECT (imgh->entry_usertext),
1456 "changed",
1457 G_CALLBACK (on_entry_imgh_usertext),
1458 imgh->entry_usertext);
1459 if (gl_image_par->usertext__set) {
1460 gtk_entry_set_text(GTK_ENTRY(imgh->entry_usertext),
1461 gl_image_par->usertext);
1465 * entry for warning
1467 imgh->label_warning = gtk_label_new ( _("Warning: "));
1468 gtk_widget_ref (imgh->label_warning);
1469 gtk_object_set_data_full (GTK_OBJECT (main_window),
1470 "imgh_label_warning",
1471 imgh->label_warning,
1472 (GtkDestroyNotify) gtk_widget_unref);
1473 gtk_widget_show (imgh->label_warning);
1474 gtk_table_attach (GTK_TABLE (imgh->table2),
1475 imgh->label_warning,
1480 (GtkAttachOptions) (GTK_FILL),
1481 (GtkAttachOptions) (0),
1487 imgh->entry_warning = gtk_entry_new ();
1488 gtk_widget_ref (imgh->entry_warning);
1489 gtk_object_set_data_full (GTK_OBJECT (main_window),
1490 "imgh_entry_warning",
1491 imgh->entry_warning,
1492 (GtkDestroyNotify) gtk_widget_unref);
1493 gtk_widget_show (imgh->entry_warning);
1494 gtk_table_attach (GTK_TABLE (imgh->table2),
1495 imgh->entry_warning,
1500 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
1501 (GtkAttachOptions) (0),
1505 gtk_object_set_data (GTK_OBJECT (imgh->entry_warning),
1506 "imgh",
1507 imgh);
1508 g_signal_connect (GTK_OBJECT (imgh->entry_warning),
1509 "changed",
1510 G_CALLBACK (on_entry_imgh_warning),
1511 imgh->entry_warning);
1512 if (gl_image_par->warning__set) {
1513 gtk_entry_set_text(GTK_ENTRY(imgh->entry_warning),
1514 gl_image_par->warning);
1518 * entry for disclaimer
1520 imgh->label_disclaimer = gtk_label_new ( _("Disclaimer: "));
1521 gtk_widget_ref (imgh->label_disclaimer);
1522 gtk_object_set_data_full (GTK_OBJECT (main_window),
1523 "imgh_label_disclaimer",
1524 imgh->label_disclaimer,
1525 (GtkDestroyNotify) gtk_widget_unref);
1526 gtk_widget_show (imgh->label_disclaimer);
1527 gtk_table_attach (GTK_TABLE (imgh->table2),
1528 imgh->label_disclaimer,
1533 (GtkAttachOptions) (GTK_FILL),
1534 (GtkAttachOptions) (0),
1540 imgh->entry_disclaimer = gtk_entry_new ();
1541 gtk_widget_ref (imgh->entry_disclaimer);
1542 gtk_object_set_data_full (GTK_OBJECT (main_window),
1543 "imgh_entry_disclaimer",
1544 imgh->entry_disclaimer,
1545 (GtkDestroyNotify) gtk_widget_unref);
1546 gtk_widget_show (imgh->entry_disclaimer);
1547 gtk_table_attach (GTK_TABLE (imgh->table2),
1548 imgh->entry_disclaimer,
1553 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
1554 (GtkAttachOptions) (0),
1558 gtk_object_set_data (GTK_OBJECT (imgh->entry_disclaimer),
1559 "imgh",
1560 imgh);
1561 g_signal_connect (GTK_OBJECT (imgh->entry_disclaimer),
1562 "changed",
1563 G_CALLBACK (on_entry_imgh_disclaimer),
1564 imgh->entry_disclaimer);
1565 if (gl_image_par->disclaimer__set) {
1566 gtk_entry_set_text(GTK_ENTRY(imgh->entry_disclaimer),
1567 gl_image_par->disclaimer);
1571 * entry for comment
1573 imgh->label_comment = gtk_label_new ( _("Comment: "));
1574 gtk_widget_ref (imgh->label_comment);
1575 gtk_object_set_data_full (GTK_OBJECT (main_window),
1576 "imgh_label_comment",
1577 imgh->label_comment,
1578 (GtkDestroyNotify) gtk_widget_unref);
1579 gtk_widget_show (imgh->label_comment);
1580 gtk_table_attach (GTK_TABLE (imgh->table2),
1581 imgh->label_comment,
1586 (GtkAttachOptions) (GTK_FILL),
1587 (GtkAttachOptions) (0),
1593 imgh->entry_comment = gtk_entry_new ();
1594 gtk_widget_ref (imgh->entry_comment);
1595 gtk_object_set_data_full (GTK_OBJECT (main_window),
1596 "imgh_entry_comment",
1597 imgh->entry_comment,
1598 (GtkDestroyNotify) gtk_widget_unref);
1599 gtk_widget_show (imgh->entry_comment);
1600 gtk_table_attach (GTK_TABLE (imgh->table2),
1601 imgh->entry_comment,
1606 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
1607 (GtkAttachOptions) (0),
1611 gtk_object_set_data (GTK_OBJECT (imgh->entry_comment),
1612 "imgh",
1613 imgh);
1614 g_signal_connect (GTK_OBJECT (imgh->entry_comment),
1615 "changed",
1616 G_CALLBACK (on_entry_imgh_comment),
1617 imgh->entry_comment);
1618 if (gl_image_par->comment__set) {
1619 gtk_entry_set_text(GTK_ENTRY(imgh->entry_comment),
1620 gl_image_par->comment);
1624 * entry for copyright
1626 imgh->label_copyright = gtk_label_new ( _("Copyright: "));
1627 gtk_widget_ref (imgh->label_copyright);
1628 gtk_object_set_data_full (GTK_OBJECT (main_window),
1629 "imgh_label_copyright",
1630 imgh->label_copyright,
1631 (GtkDestroyNotify) gtk_widget_unref);
1632 gtk_widget_show (imgh->label_copyright);
1633 gtk_table_attach (GTK_TABLE (imgh->table2),
1634 imgh->label_copyright,
1637 11,
1639 (GtkAttachOptions) (GTK_FILL),
1640 (GtkAttachOptions) (0),
1646 imgh->entry_copyright = gtk_entry_new ();
1647 gtk_widget_ref (imgh->entry_copyright);
1648 gtk_object_set_data_full (GTK_OBJECT (main_window),
1649 "imgh_entry_copyright",
1650 imgh->entry_copyright,
1651 (GtkDestroyNotify) gtk_widget_unref);
1652 gtk_widget_show (imgh->entry_copyright);
1653 gtk_table_attach (GTK_TABLE (imgh->table2),
1654 imgh->entry_copyright,
1657 11,
1659 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
1660 (GtkAttachOptions) (0),
1664 gtk_object_set_data (GTK_OBJECT (imgh->entry_copyright),
1665 "imgh",
1666 imgh);
1667 g_signal_connect (GTK_OBJECT (imgh->entry_copyright),
1668 "changed",
1669 G_CALLBACK (on_entry_imgh_copyright),
1670 imgh->entry_copyright);
1671 if (gl_image_par->copyright__set) {
1672 gtk_entry_set_text(GTK_ENTRY(imgh->entry_copyright),
1673 gl_image_par->copyright);
1677 * entry for email
1679 imgh->label_email = gtk_label_new ( _("Email: "));
1680 gtk_widget_ref (imgh->label_email);
1681 gtk_object_set_data_full (GTK_OBJECT (main_window),
1682 "imgh_label_email",
1683 imgh->label_email,
1684 (GtkDestroyNotify) gtk_widget_unref);
1685 gtk_widget_show (imgh->label_email);
1686 gtk_table_attach (GTK_TABLE (imgh->table2),
1687 imgh->label_email,
1690 13,
1692 (GtkAttachOptions) (GTK_FILL),
1693 (GtkAttachOptions) (0),
1699 imgh->entry_email = gtk_entry_new ();
1700 gtk_widget_ref (imgh->entry_email);
1701 gtk_object_set_data_full (GTK_OBJECT (main_window),
1702 "imgh_entry_email",
1703 imgh->entry_email,
1704 (GtkDestroyNotify) gtk_widget_unref);
1705 gtk_widget_show (imgh->entry_email);
1706 gtk_table_attach (GTK_TABLE (imgh->table2),
1707 imgh->entry_email,
1710 13,
1712 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
1713 (GtkAttachOptions) (0),
1717 gtk_object_set_data (GTK_OBJECT (imgh->entry_email),
1718 "imgh",
1719 imgh);
1720 g_signal_connect (GTK_OBJECT (imgh->entry_email),
1721 "changed",
1722 G_CALLBACK (on_entry_imgh_email),
1723 imgh->entry_email);
1724 if (gl_image_par->email__set) {
1725 gtk_entry_set_text(GTK_ENTRY(imgh->entry_email),
1726 gl_image_par->email);
1730 * entry for url
1732 imgh->label_url = gtk_label_new ( _("Url: "));
1733 gtk_widget_ref (imgh->label_url);
1734 gtk_object_set_data_full (GTK_OBJECT (main_window),
1735 "imgh_label_url",
1736 imgh->label_url,
1737 (GtkDestroyNotify) gtk_widget_unref);
1738 gtk_widget_show (imgh->label_url);
1739 gtk_table_attach (GTK_TABLE (imgh->table2),
1740 imgh->label_url,
1743 15,
1745 (GtkAttachOptions) (GTK_FILL),
1746 (GtkAttachOptions) (0),
1752 imgh->entry_url = gtk_entry_new ();
1753 gtk_widget_ref (imgh->entry_url);
1754 gtk_object_set_data_full (GTK_OBJECT (main_window),
1755 "imgh_entry_url",
1756 imgh->entry_url,
1757 (GtkDestroyNotify) gtk_widget_unref);
1758 gtk_widget_show (imgh->entry_url);
1759 gtk_table_attach (GTK_TABLE (imgh->table2),
1760 imgh->entry_url,
1763 15,
1765 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
1766 (GtkAttachOptions) (0),
1770 gtk_object_set_data (GTK_OBJECT (imgh->entry_url),
1771 "imgh",
1772 imgh);
1773 g_signal_connect (GTK_OBJECT (imgh->entry_url),
1774 "changed",
1775 G_CALLBACK (on_entry_imgh_url),
1776 imgh->entry_url);
1777 if (gl_image_par->url__set) {
1778 gtk_entry_set_text(GTK_ENTRY(imgh->entry_url),
1779 gl_image_par->url);
1782 return imgh;