/*
 * DO NOT EDIT THIS FILE - it is generated by Glade.
 */

#ifdef HAVE_CONFIG_H
#  include <config.h>
#endif

#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <string.h>

#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>

#include "callbacks.h"
#include "interface.h"
#include "support.h"

GtkWidget*
create_window_main (void)
{
  GtkWidget *window_main;
  GtkWidget *vbox1;
  GtkWidget *menubar1;
  GtkWidget *file;
  GtkWidget *file_menu;
  GtkAccelGroup *file_menu_accels;
  GtkWidget *load_session;
  GtkWidget *save_session;
  GtkWidget *separatore4;
  GtkWidget *add_an_image;
  GtkWidget *separatore9;
  GtkWidget *quit1;
  GtkWidget *edit;
  GtkWidget *edit_menu;
  GtkAccelGroup *edit_menu_accels;
  GtkWidget *view_images1;
  GtkWidget *show_mag;
  GtkWidget *separator4;
  GtkWidget *resulting_image_size;
  GtkWidget *show_morph_factors;
  GtkWidget *settings_menu;
  GtkWidget *morph;
  GtkWidget *morph_menu;
  GtkAccelGroup *morph_menu_accels;
  GtkWidget *interpolate_meshes1;
  GtkWidget *morph_images1;
  GtkWidget *separatore1;
  GtkWidget *adjust_all_meshes;
  GtkWidget *wavelet_equalize;
  GtkWidget *separator12;
  GtkWidget *restore_morph_factors1;
  GtkWidget *restore_morph_factors1_menu;
  GtkAccelGroup *restore_morph_factors1_menu_accels;
  GtkWidget *startr;
  GtkWidget *endr;
  GtkWidget *equalr;
  GtkWidget *store_morph_factors;
  GtkWidget *store_morph_factors_menu;
  GtkAccelGroup *store_morph_factors_menu_accels;
  GtkWidget *starts;
  GtkWidget *ende;
  GtkWidget *morph_sequence1;
  GtkWidget *separator3;
  GtkWidget *help;
  GtkWidget *help_menu;
  GtkAccelGroup *help_menu_accels;
  GtkWidget *guide;
  GtkWidget *separator2;
  GtkWidget *help_sub;
  GtkWidget *help_sub_menu;
  GtkAccelGroup *help_sub_menu_accels;
  GtkWidget *generic_help;
  GtkWidget *warp_help;
  GtkWidget *morph_help1;
  GtkWidget *separator11;
  GtkWidget *why_the_beep_1;
  GtkWidget *vbox3;
  GtkWidget *hbox3;
  GtkWidget *load_image;
  GtkWidget *load_mesh;
  GtkWidget *save_mesh;
  GtkWidget *optionmenu_editview;
  GtkWidget *optionmenu_editview_menu;
  GtkWidget *glade_menuitem;
  GtkWidget *settings_button;
  GtkWidget *button_interp_meshes;
  GtkWidget *do_mixing;
  GtkWidget *button_do_morph;
  GtkWidget *save_image;
  GtkWidget *back_to_guide;
  GtkWidget *handlebox_tools;
  GtkWidget *vbox7;
  GtkWidget *hbox_feature;
  GtkWidget *color_feature;
  GtkWidget *drawingarea_color;
  GtkWidget *combo_feature;
  GtkWidget *combo_entry_feature;
  GtkWidget *new_feature;
  GtkWidget *rename_feature;
  GtkWidget *pack_feature;
  GtkWidget *unpack_feature;
  GtkWidget *delete_feature;
  GtkWidget *toolbar;
  GtkWidget *tmp_toolbar_icon;
  GtkWidget *tool_edit;
  GtkWidget *tool_move;
  GtkWidget *tool_stretch;
  GtkWidget *label20;
  GtkWidget *tool_select;
  GtkWidget *tool_unselect;
  GtkWidget *tool_assign;
  GtkWidget *scrolledwindow_image;
  GtkWidget *viewport4;
  GtkWidget *image_frame;
  GtkWidget *drawingarea2;
  GtkWidget *handlebox_res_size;
  GtkWidget *frame3;
  GtkWidget *hbox4;
  GtkWidget *label16;
  GtkObject *spinbutton_reswidth_adj;
  GtkWidget *spinbutton_reswidth;
  GtkWidget *label17;
  GtkObject *spinbutton_resheight_adj;
  GtkWidget *spinbutton_resheight;
  GtkWidget *double_size;
  GtkWidget *halve_size;
  GtkWidget *resulting_apply;
  GtkAccelGroup *accel_group;
  GtkTooltips *tooltips;

  tooltips = gtk_tooltips_new ();

  accel_group = gtk_accel_group_new ();

  window_main = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_widget_set_name (window_main, "window_main");
  gtk_object_set_data (GTK_OBJECT (window_main), "window_main", window_main);
  gtk_window_set_title (GTK_WINDOW (window_main), _("gtkmorph"));
  gtk_window_set_wmclass (GTK_WINDOW (window_main), "gtkmorph", "gtkmorph");

  vbox1 = gtk_vbox_new (FALSE, 0);
  gtk_widget_set_name (vbox1, "vbox1");
  gtk_widget_ref (vbox1);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "vbox1", vbox1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (vbox1);
  gtk_container_add (GTK_CONTAINER (window_main), vbox1);

  menubar1 = gtk_menu_bar_new ();
  gtk_widget_set_name (menubar1, "menubar1");
  gtk_widget_ref (menubar1);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "menubar1", menubar1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (menubar1);
  gtk_box_pack_start (GTK_BOX (vbox1), menubar1, FALSE, FALSE, 0);

  file = gtk_menu_item_new_with_label (_("File"));
  gtk_widget_set_name (file, "file");
  gtk_widget_ref (file);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "file", file,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (file);
  gtk_container_add (GTK_CONTAINER (menubar1), file);
  gtk_tooltips_set_tip (tooltips, file, _("File menu"), NULL);

  file_menu = gtk_menu_new ();
  gtk_widget_set_name (file_menu, "file_menu");
  gtk_widget_ref (file_menu);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "file_menu", file_menu,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_menu_item_set_submenu (GTK_MENU_ITEM (file), file_menu);
  file_menu_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (file_menu));

  load_session = gtk_menu_item_new_with_label (_("load session"));
  gtk_widget_set_name (load_session, "load_session");
  gtk_widget_ref (load_session);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "load_session", load_session,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (load_session);
  gtk_container_add (GTK_CONTAINER (file_menu), load_session);

  save_session = gtk_menu_item_new_with_label (_("save session"));
  gtk_widget_set_name (save_session, "save_session");
  gtk_widget_ref (save_session);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "save_session", save_session,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (save_session);
  gtk_container_add (GTK_CONTAINER (file_menu), save_session);

  separatore4 = gtk_menu_item_new ();
  gtk_widget_set_name (separatore4, "separatore4");
  gtk_widget_ref (separatore4);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "separatore4", separatore4,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (separatore4);
  gtk_container_add (GTK_CONTAINER (file_menu), separatore4);
  gtk_widget_set_sensitive (separatore4, FALSE);

  add_an_image = gtk_menu_item_new_with_label (_("add an image"));
  gtk_widget_set_name (add_an_image, "add_an_image");
  gtk_widget_ref (add_an_image);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "add_an_image", add_an_image,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (add_an_image);
  gtk_container_add (GTK_CONTAINER (file_menu), add_an_image);

  separatore9 = gtk_menu_item_new ();
  gtk_widget_set_name (separatore9, "separatore9");
  gtk_widget_ref (separatore9);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "separatore9", separatore9,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (separatore9);
  gtk_container_add (GTK_CONTAINER (file_menu), separatore9);
  gtk_widget_set_sensitive (separatore9, FALSE);

  quit1 = gtk_menu_item_new_with_label (_("Quit"));
  gtk_widget_set_name (quit1, "quit1");
  gtk_widget_ref (quit1);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "quit1", quit1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (quit1);
  gtk_container_add (GTK_CONTAINER (file_menu), quit1);
  gtk_widget_add_accelerator (quit1, "activate", accel_group,
                              GDK_q, GDK_MOD1_MASK,
                              GTK_ACCEL_VISIBLE);

  edit = gtk_menu_item_new_with_label (_("Edit"));
  gtk_widget_set_name (edit, "edit");
  gtk_widget_ref (edit);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "edit", edit,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (edit);
  gtk_container_add (GTK_CONTAINER (menubar1), edit);

  edit_menu = gtk_menu_new ();
  gtk_widget_set_name (edit_menu, "edit_menu");
  gtk_widget_ref (edit_menu);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "edit_menu", edit_menu,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_menu_item_set_submenu (GTK_MENU_ITEM (edit), edit_menu);
  edit_menu_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (edit_menu));

  view_images1 = gtk_menu_item_new_with_label (_("show all images"));
  gtk_widget_set_name (view_images1, "view_images1");
  gtk_widget_ref (view_images1);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "view_images1", view_images1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (view_images1);
  gtk_container_add (GTK_CONTAINER (edit_menu), view_images1);

  show_mag = gtk_menu_item_new_with_label (_("show mag"));
  gtk_widget_set_name (show_mag, "show_mag");
  gtk_widget_ref (show_mag);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "show_mag", show_mag,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (show_mag);
  gtk_container_add (GTK_CONTAINER (edit_menu), show_mag);

  separator4 = gtk_menu_item_new ();
  gtk_widget_set_name (separator4, "separator4");
  gtk_widget_ref (separator4);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "separator4", separator4,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (separator4);
  gtk_container_add (GTK_CONTAINER (edit_menu), separator4);
  gtk_widget_set_sensitive (separator4, FALSE);

  resulting_image_size = gtk_menu_item_new_with_label (_("resulting image size..."));
  gtk_widget_set_name (resulting_image_size, "resulting_image_size");
  gtk_widget_ref (resulting_image_size);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "resulting_image_size", resulting_image_size,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (resulting_image_size);
  gtk_container_add (GTK_CONTAINER (edit_menu), resulting_image_size);

  show_morph_factors = gtk_menu_item_new_with_label (_("show morph factors"));
  gtk_widget_set_name (show_morph_factors, "show_morph_factors");
  gtk_widget_ref (show_morph_factors);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "show_morph_factors", show_morph_factors,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (show_morph_factors);
  gtk_container_add (GTK_CONTAINER (edit_menu), show_morph_factors);

  settings_menu = gtk_menu_item_new_with_label (_("Settings"));
  gtk_widget_set_name (settings_menu, "settings_menu");
  gtk_widget_ref (settings_menu);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "settings_menu", settings_menu,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (settings_menu);
  gtk_container_add (GTK_CONTAINER (menubar1), settings_menu);

  morph = gtk_menu_item_new_with_label (_("Morph"));
  gtk_widget_set_name (morph, "morph");
  gtk_widget_ref (morph);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "morph", morph,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (morph);
  gtk_container_add (GTK_CONTAINER (menubar1), morph);

  morph_menu = gtk_menu_new ();
  gtk_widget_set_name (morph_menu, "morph_menu");
  gtk_widget_ref (morph_menu);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "morph_menu", morph_menu,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_menu_item_set_submenu (GTK_MENU_ITEM (morph), morph_menu);
  morph_menu_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (morph_menu));

  interpolate_meshes1 = gtk_menu_item_new_with_label (_("interpolate meshes"));
  gtk_widget_set_name (interpolate_meshes1, "interpolate_meshes1");
  gtk_widget_ref (interpolate_meshes1);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "interpolate_meshes1", interpolate_meshes1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (interpolate_meshes1);
  gtk_container_add (GTK_CONTAINER (morph_menu), interpolate_meshes1);
  gtk_tooltips_set_tip (tooltips, interpolate_meshes1, _("the mesh of the resulting image is set to an interpolation of the input images' meshes, weighted by the ``mesh factors''"), NULL);

  morph_images1 = gtk_menu_item_new_with_label (_("morph images"));
  gtk_widget_set_name (morph_images1, "morph_images1");
  gtk_widget_ref (morph_images1);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "morph_images1", morph_images1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (morph_images1);
  gtk_container_add (GTK_CONTAINER (morph_menu), morph_images1);
  gtk_tooltips_set_tip (tooltips, morph_images1, _("the input images are warped to the resulting mesh and blended using ``image blending factors'' as weights. It has the same effect as if you hit all the ``do warp'' buttons and then you hit the ``do blending'' button"), NULL);
  gtk_widget_add_accelerator (morph_images1, "activate", accel_group,
                              GDK_j, GDK_CONTROL_MASK,
                              GTK_ACCEL_VISIBLE);

  separatore1 = gtk_menu_item_new ();
  gtk_widget_set_name (separatore1, "separatore1");
  gtk_widget_ref (separatore1);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "separatore1", separatore1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (separatore1);
  gtk_container_add (GTK_CONTAINER (morph_menu), separatore1);
  gtk_widget_set_sensitive (separatore1, FALSE);

  adjust_all_meshes = gtk_menu_item_new_with_label (_("adjust all meshes"));
  gtk_widget_set_name (adjust_all_meshes, "adjust_all_meshes");
  gtk_widget_ref (adjust_all_meshes);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "adjust_all_meshes", adjust_all_meshes,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (adjust_all_meshes);
  gtk_container_add (GTK_CONTAINER (morph_menu), adjust_all_meshes);
  gtk_tooltips_set_tip (tooltips, adjust_all_meshes, _("adjust points of meshes confronting original images and the morph"), NULL);

  wavelet_equalize = gtk_menu_item_new_with_label (_("wavelet equalize"));
  gtk_widget_set_name (wavelet_equalize, "wavelet_equalize");
  gtk_widget_ref (wavelet_equalize);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "wavelet_equalize", wavelet_equalize,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (wavelet_equalize);
  gtk_container_add (GTK_CONTAINER (morph_menu), wavelet_equalize);
  gtk_tooltips_set_tip (tooltips, wavelet_equalize, _("equalize input images so that the subband of wavelet transform have the same energies"), NULL);

  separator12 = gtk_menu_item_new ();
  gtk_widget_set_name (separator12, "separator12");
  gtk_widget_ref (separator12);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "separator12", separator12,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (separator12);
  gtk_container_add (GTK_CONTAINER (morph_menu), separator12);
  gtk_widget_set_sensitive (separator12, FALSE);

  restore_morph_factors1 = gtk_menu_item_new_with_label (_("restore morph coefficients..."));
  gtk_widget_set_name (restore_morph_factors1, "restore_morph_factors1");
  gtk_widget_ref (restore_morph_factors1);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "restore_morph_factors1", restore_morph_factors1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (restore_morph_factors1);
  gtk_container_add (GTK_CONTAINER (morph_menu), restore_morph_factors1);

  restore_morph_factors1_menu = gtk_menu_new ();
  gtk_widget_set_name (restore_morph_factors1_menu, "restore_morph_factors1_menu");
  gtk_widget_ref (restore_morph_factors1_menu);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "restore_morph_factors1_menu", restore_morph_factors1_menu,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_menu_item_set_submenu (GTK_MENU_ITEM (restore_morph_factors1), restore_morph_factors1_menu);
  restore_morph_factors1_menu_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (restore_morph_factors1_menu));

  startr = gtk_menu_item_new_with_label (_("start"));
  gtk_widget_set_name (startr, "startr");
  gtk_widget_ref (startr);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "startr", startr,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (startr);
  gtk_container_add (GTK_CONTAINER (restore_morph_factors1_menu), startr);

  endr = gtk_menu_item_new_with_label (_("end"));
  gtk_widget_set_name (endr, "endr");
  gtk_widget_ref (endr);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "endr", endr,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (endr);
  gtk_container_add (GTK_CONTAINER (restore_morph_factors1_menu), endr);

  equalr = gtk_menu_item_new_with_label (_("equal"));
  gtk_widget_set_name (equalr, "equalr");
  gtk_widget_ref (equalr);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "equalr", equalr,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (equalr);
  gtk_container_add (GTK_CONTAINER (restore_morph_factors1_menu), equalr);

  store_morph_factors = gtk_menu_item_new_with_label (_("store morph coefficients..."));
  gtk_widget_set_name (store_morph_factors, "store_morph_factors");
  gtk_widget_ref (store_morph_factors);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "store_morph_factors", store_morph_factors,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (store_morph_factors);
  gtk_container_add (GTK_CONTAINER (morph_menu), store_morph_factors);
  gtk_tooltips_set_tip (tooltips, store_morph_factors, _("stores internally the state of all mesh and image-blending factors (to make morph sequences)"), NULL);

  store_morph_factors_menu = gtk_menu_new ();
  gtk_widget_set_name (store_morph_factors_menu, "store_morph_factors_menu");
  gtk_widget_ref (store_morph_factors_menu);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "store_morph_factors_menu", store_morph_factors_menu,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_menu_item_set_submenu (GTK_MENU_ITEM (store_morph_factors), store_morph_factors_menu);
  store_morph_factors_menu_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (store_morph_factors_menu));

  starts = gtk_menu_item_new_with_label (_("start"));
  gtk_widget_set_name (starts, "starts");
  gtk_widget_ref (starts);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "starts", starts,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (starts);
  gtk_container_add (GTK_CONTAINER (store_morph_factors_menu), starts);

  ende = gtk_menu_item_new_with_label (_("end"));
  gtk_widget_set_name (ende, "ende");
  gtk_widget_ref (ende);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "ende", ende,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (ende);
  gtk_container_add (GTK_CONTAINER (store_morph_factors_menu), ende);

  morph_sequence1 = gtk_menu_item_new_with_label (_("morph sequence"));
  gtk_widget_set_name (morph_sequence1, "morph_sequence1");
  gtk_widget_ref (morph_sequence1);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "morph_sequence1", morph_sequence1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (morph_sequence1);
  gtk_container_add (GTK_CONTAINER (morph_menu), morph_sequence1);
  gtk_tooltips_set_tip (tooltips, morph_sequence1, _("create and save many morphs, equally spaced between the morph start and the morph end (that you have already stored with the above menu)"), NULL);

  separator3 = gtk_menu_item_new ();
  gtk_widget_set_name (separator3, "separator3");
  gtk_widget_ref (separator3);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "separator3", separator3,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (separator3);
  gtk_container_add (GTK_CONTAINER (menubar1), separator3);
  gtk_widget_set_sensitive (separator3, FALSE);

  help = gtk_menu_item_new_with_label (_("Help"));
  gtk_widget_set_name (help, "help");
  gtk_widget_ref (help);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "help", help,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (help);
  gtk_container_add (GTK_CONTAINER (menubar1), help);

  help_menu = gtk_menu_new ();
  gtk_widget_set_name (help_menu, "help_menu");
  gtk_widget_ref (help_menu);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "help_menu", help_menu,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_menu_item_set_submenu (GTK_MENU_ITEM (help), help_menu);
  help_menu_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (help_menu));

  guide = gtk_menu_item_new_with_label (_("guide..."));
  gtk_widget_set_name (guide, "guide");
  gtk_widget_ref (guide);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "guide", guide,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (guide);
  gtk_container_add (GTK_CONTAINER (help_menu), guide);

  separator2 = gtk_menu_item_new ();
  gtk_widget_set_name (separator2, "separator2");
  gtk_widget_ref (separator2);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "separator2", separator2,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (separator2);
  gtk_container_add (GTK_CONTAINER (help_menu), separator2);
  gtk_widget_set_sensitive (separator2, FALSE);

  help_sub = gtk_menu_item_new_with_label (_("help..."));
  gtk_widget_set_name (help_sub, "help_sub");
  gtk_widget_ref (help_sub);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "help_sub", help_sub,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (help_sub);
  gtk_container_add (GTK_CONTAINER (help_menu), help_sub);

  help_sub_menu = gtk_menu_new ();
  gtk_widget_set_name (help_sub_menu, "help_sub_menu");
  gtk_widget_ref (help_sub_menu);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "help_sub_menu", help_sub_menu,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_menu_item_set_submenu (GTK_MENU_ITEM (help_sub), help_sub_menu);
  help_sub_menu_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (help_sub_menu));

  generic_help = gtk_menu_item_new_with_label (_("generic help"));
  gtk_widget_set_name (generic_help, "generic_help");
  gtk_widget_ref (generic_help);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "generic_help", generic_help,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (generic_help);
  gtk_container_add (GTK_CONTAINER (help_sub_menu), generic_help);

  warp_help = gtk_menu_item_new_with_label (_("warp help"));
  gtk_widget_set_name (warp_help, "warp_help");
  gtk_widget_ref (warp_help);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "warp_help", warp_help,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (warp_help);
  gtk_container_add (GTK_CONTAINER (help_sub_menu), warp_help);

  morph_help1 = gtk_menu_item_new_with_label (_("morph help"));
  gtk_widget_set_name (morph_help1, "morph_help1");
  gtk_widget_ref (morph_help1);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "morph_help1", morph_help1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (morph_help1);
  gtk_container_add (GTK_CONTAINER (help_sub_menu), morph_help1);

  separator11 = gtk_menu_item_new ();
  gtk_widget_set_name (separator11, "separator11");
  gtk_widget_ref (separator11);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "separator11", separator11,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (separator11);
  gtk_container_add (GTK_CONTAINER (help_menu), separator11);
  gtk_widget_set_sensitive (separator11, FALSE);

  why_the_beep_1 = gtk_menu_item_new_with_label (_("why the beep?"));
  gtk_widget_set_name (why_the_beep_1, "why_the_beep_1");
  gtk_widget_ref (why_the_beep_1);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "why_the_beep_1", why_the_beep_1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (why_the_beep_1);
  gtk_container_add (GTK_CONTAINER (help_menu), why_the_beep_1);

  vbox3 = gtk_vbox_new (FALSE, 0);
  gtk_widget_set_name (vbox3, "vbox3");
  gtk_widget_ref (vbox3);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "vbox3", vbox3,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (vbox3);
  gtk_box_pack_start (GTK_BOX (vbox1), vbox3, TRUE, TRUE, 0);

  hbox3 = gtk_hbox_new (FALSE, 0);
  gtk_widget_set_name (hbox3, "hbox3");
  gtk_widget_ref (hbox3);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "hbox3", hbox3,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbox3);
  gtk_box_pack_start (GTK_BOX (vbox3), hbox3, FALSE, FALSE, 0);

  load_image = gtk_button_new_with_label (_("load\nimage"));
  gtk_widget_set_name (load_image, "load_image");
  gtk_widget_ref (load_image);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "load_image", load_image,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (load_image);
  gtk_box_pack_start (GTK_BOX (hbox3), load_image, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (load_image), 3);
  gtk_tooltips_set_tip (tooltips, load_image, _("load the image. This image may not be warped or morphed, but it may help in setting the resulting mesh"), NULL);

  load_mesh = gtk_button_new_with_label (_("load\nmesh"));
  gtk_widget_set_name (load_mesh, "load_mesh");
  gtk_widget_ref (load_mesh);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "load_mesh", load_mesh,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (load_mesh);
  gtk_box_pack_start (GTK_BOX (hbox3), load_mesh, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (load_mesh), 3);

  save_mesh = gtk_button_new_with_label (_("save\nmesh"));
  gtk_widget_set_name (save_mesh, "save_mesh");
  gtk_widget_ref (save_mesh);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "save_mesh", save_mesh,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (save_mesh);
  gtk_box_pack_start (GTK_BOX (hbox3), save_mesh, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (save_mesh), 3);

  optionmenu_editview = gtk_option_menu_new ();
  gtk_widget_set_name (optionmenu_editview, "optionmenu_editview");
  gtk_widget_ref (optionmenu_editview);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "optionmenu_editview", optionmenu_editview,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (optionmenu_editview);
  gtk_box_pack_start (GTK_BOX (hbox3), optionmenu_editview, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (optionmenu_editview), 3);
  gtk_tooltips_set_tip (tooltips, optionmenu_editview, _("``edit template'': view the loaded image and edit the mesh on it. \\n ``view morphed'': view the result of morphing.     ``v.morph&mesh'' as above but with the mesh.  ``edit eyes points'' sets the reference position of the eyes"), NULL);
  optionmenu_editview_menu = gtk_menu_new ();
  glade_menuitem = gtk_menu_item_new_with_label (_("edit template"));
  gtk_widget_show (glade_menuitem);
  gtk_menu_append (GTK_MENU (optionmenu_editview_menu), glade_menuitem);
  glade_menuitem = gtk_menu_item_new_with_label (_("view morph"));
  gtk_widget_show (glade_menuitem);
  gtk_menu_append (GTK_MENU (optionmenu_editview_menu), glade_menuitem);
  glade_menuitem = gtk_menu_item_new_with_label (_("v morph&meshes"));
  gtk_widget_show (glade_menuitem);
  gtk_menu_append (GTK_MENU (optionmenu_editview_menu), glade_menuitem);
  glade_menuitem = gtk_menu_item_new_with_label (_("edit eyes points"));
  gtk_widget_show (glade_menuitem);
  gtk_menu_append (GTK_MENU (optionmenu_editview_menu), glade_menuitem);
  gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu_editview), optionmenu_editview_menu);

  settings_button = gtk_button_new_with_label (_("settings"));
  gtk_widget_set_name (settings_button, "settings_button");
  gtk_widget_ref (settings_button);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "settings_button", settings_button,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (settings_button);
  gtk_box_pack_start (GTK_BOX (hbox3), settings_button, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (settings_button), 3);

  button_interp_meshes = gtk_button_new_with_label (_("interpol.\nmeshes"));
  gtk_widget_set_name (button_interp_meshes, "button_interp_meshes");
  gtk_widget_ref (button_interp_meshes);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "button_interp_meshes", button_interp_meshes,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (button_interp_meshes);
  gtk_box_pack_start (GTK_BOX (hbox3), button_interp_meshes, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (button_interp_meshes), 3);
  gtk_tooltips_set_tip (tooltips, button_interp_meshes, _("set this mesh to be an interpolation of all other meshes, using ``mesh factors'' as weights"), NULL);

  do_mixing = gtk_button_new_with_label (_("do\nblending"));
  gtk_widget_set_name (do_mixing, "do_mixing");
  gtk_widget_ref (do_mixing);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "do_mixing", do_mixing,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (do_mixing);
  gtk_box_pack_start (GTK_BOX (hbox3), do_mixing, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (do_mixing), 3);
  gtk_tooltips_set_tip (tooltips, do_mixing, _("mix all the warped images in the ``resulting image'' using ``image blending factors'' as weights"), NULL);

  button_do_morph = gtk_button_new_with_label (_("do\nmorph"));
  gtk_widget_set_name (button_do_morph, "button_do_morph");
  gtk_widget_ref (button_do_morph);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "button_do_morph", button_do_morph,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (button_do_morph);
  gtk_box_pack_start (GTK_BOX (hbox3), button_do_morph, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (button_do_morph), 3);
  gtk_tooltips_set_tip (tooltips, button_do_morph, _("the input images are warped to the resulting mesh and blended using ``image blending factors'' as weights.  It has the same effect as if you hit all the ``do warp'' buttons and then you hit the ``do blending'' button."), NULL);

  save_image = gtk_button_new_with_label (_("save\nimage"));
  gtk_widget_set_name (save_image, "save_image");
  gtk_widget_ref (save_image);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "save_image", save_image,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (save_image);
  gtk_box_pack_start (GTK_BOX (hbox3), save_image, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (save_image), 3);
  gtk_tooltips_set_tip (tooltips, save_image, _("it saves whatever image is currently shown in the window"), NULL);

  back_to_guide = gtk_button_new_with_label (_("guide"));
  gtk_widget_set_name (back_to_guide, "back_to_guide");
  gtk_widget_ref (back_to_guide);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "back_to_guide", back_to_guide,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (back_to_guide);
  gtk_box_pack_start (GTK_BOX (hbox3), back_to_guide, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (back_to_guide), 3);
  gtk_tooltips_set_tip (tooltips, back_to_guide, _("back to guide"), NULL);

  handlebox_tools = gtk_handle_box_new ();
  gtk_widget_set_name (handlebox_tools, "handlebox_tools");
  gtk_widget_ref (handlebox_tools);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "handlebox_tools", handlebox_tools,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (handlebox_tools);
  gtk_box_pack_start (GTK_BOX (vbox3), handlebox_tools, FALSE, TRUE, 0);

  vbox7 = gtk_vbox_new (FALSE, 0);
  gtk_widget_set_name (vbox7, "vbox7");
  gtk_widget_ref (vbox7);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "vbox7", vbox7,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (vbox7);
  gtk_container_add (GTK_CONTAINER (handlebox_tools), vbox7);

  hbox_feature = gtk_hbox_new (FALSE, 0);
  gtk_widget_set_name (hbox_feature, "hbox_feature");
  gtk_widget_ref (hbox_feature);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "hbox_feature", hbox_feature,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbox_feature);
  gtk_box_pack_start (GTK_BOX (vbox7), hbox_feature, FALSE, FALSE, 0);

  color_feature = gtk_button_new ();
  gtk_widget_set_name (color_feature, "color_feature");
  gtk_widget_ref (color_feature);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "color_feature", color_feature,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (color_feature);
  gtk_box_pack_start (GTK_BOX (hbox_feature), color_feature, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (color_feature), 2);

  drawingarea_color = gtk_drawing_area_new ();
  gtk_widget_set_name (drawingarea_color, "drawingarea_color");
  gtk_widget_ref (drawingarea_color);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "drawingarea_color", drawingarea_color,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (drawingarea_color);
  gtk_container_add (GTK_CONTAINER (color_feature), drawingarea_color);
  gtk_widget_set_usize (drawingarea_color, 25, -2);

  combo_feature = gtk_combo_new ();
  gtk_widget_set_name (combo_feature, "combo_feature");
  gtk_widget_ref (combo_feature);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "combo_feature", combo_feature,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (combo_feature);
  gtk_box_pack_start (GTK_BOX (hbox_feature), combo_feature, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (combo_feature), 2);

  combo_entry_feature = GTK_COMBO (combo_feature)->entry;
  gtk_widget_set_name (combo_entry_feature, "combo_entry_feature");
  gtk_widget_ref (combo_entry_feature);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "combo_entry_feature", combo_entry_feature,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (combo_entry_feature);

  new_feature = gtk_button_new_with_label (_("new"));
  gtk_widget_set_name (new_feature, "new_feature");
  gtk_widget_ref (new_feature);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "new_feature", new_feature,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (new_feature);
  gtk_box_pack_start (GTK_BOX (hbox_feature), new_feature, FALSE, FALSE, 2);
  gtk_container_set_border_width (GTK_CONTAINER (new_feature), 2);
  gtk_tooltips_set_tip (tooltips, new_feature, _("add new feature to the end of list"), NULL);

  rename_feature = gtk_button_new_with_label (_("rename"));
  gtk_widget_set_name (rename_feature, "rename_feature");
  gtk_widget_ref (rename_feature);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "rename_feature", rename_feature,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (rename_feature);
  gtk_box_pack_start (GTK_BOX (hbox_feature), rename_feature, FALSE, FALSE, 2);
  gtk_container_set_border_width (GTK_CONTAINER (rename_feature), 2);

  pack_feature = gtk_button_new_with_label (_("pack"));
  gtk_widget_set_name (pack_feature, "pack_feature");
  gtk_widget_ref (pack_feature);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "pack_feature", pack_feature,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (pack_feature);
  gtk_box_pack_start (GTK_BOX (hbox_feature), pack_feature, FALSE, FALSE, 2);
  gtk_container_set_border_width (GTK_CONTAINER (pack_feature), 2);
  gtk_tooltips_set_tip (tooltips, pack_feature, _("pack the selected points in this feature"), NULL);

  unpack_feature = gtk_button_new_with_label (_("unpack"));
  gtk_widget_set_name (unpack_feature, "unpack_feature");
  gtk_widget_ref (unpack_feature);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "unpack_feature", unpack_feature,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (unpack_feature);
  gtk_box_pack_start (GTK_BOX (hbox_feature), unpack_feature, FALSE, FALSE, 2);
  gtk_container_set_border_width (GTK_CONTAINER (unpack_feature), 2);
  gtk_tooltips_set_tip (tooltips, unpack_feature, _("unpack this feature and transforms all points of it to selected points"), NULL);

  delete_feature = gtk_button_new_with_label (_("delete"));
  gtk_widget_set_name (delete_feature, "delete_feature");
  gtk_widget_ref (delete_feature);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "delete_feature", delete_feature,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (delete_feature);
  gtk_box_pack_start (GTK_BOX (hbox_feature), delete_feature, FALSE, FALSE, 2);
  gtk_container_set_border_width (GTK_CONTAINER (delete_feature), 2);
  gtk_tooltips_set_tip (tooltips, delete_feature, _("delete last feature"), NULL);

  toolbar = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH);
  gtk_widget_set_name (toolbar, "toolbar");
  gtk_widget_ref (toolbar);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "toolbar", toolbar,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (toolbar);
  gtk_box_pack_start (GTK_BOX (vbox7), toolbar, FALSE, FALSE, 0);

  tmp_toolbar_icon = create_pixmap (window_main, "cursor_left.xpm");
  tool_edit = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
                                GTK_TOOLBAR_CHILD_RADIOBUTTON,
                                NULL,
                                _("edit"),
                                _("move single point"), NULL,
                                tmp_toolbar_icon, NULL, NULL);
  gtk_widget_set_name (tool_edit, "tool_edit");
  gtk_widget_ref (tool_edit);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "tool_edit", tool_edit,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (tool_edit);
  gtk_container_set_border_width (GTK_CONTAINER (tool_edit), 2);
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tool_edit), TRUE);
  gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (tool_edit), FALSE);

  tmp_toolbar_icon = create_pixmap (window_main, "hand01.xpm");
  tool_move = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
                                GTK_TOOLBAR_CHILD_RADIOBUTTON,
                                tool_edit,
                                _("move"),
                                _("move whole feature"), NULL,
                                tmp_toolbar_icon, NULL, NULL);
  gtk_widget_set_name (tool_move, "tool_move");
  gtk_widget_ref (tool_move);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "tool_move", tool_move,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (tool_move);
  gtk_container_set_border_width (GTK_CONTAINER (tool_move), 2);
  gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (tool_move), FALSE);

  tmp_toolbar_icon = create_pixmap (window_main, "transform.xpm");
  tool_stretch = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
                                GTK_TOOLBAR_CHILD_RADIOBUTTON,
                                tool_edit,
                                _("stretch"),
                                _("stretch whole feature"), NULL,
                                tmp_toolbar_icon, NULL, NULL);
  gtk_widget_set_name (tool_stretch, "tool_stretch");
  gtk_widget_ref (tool_stretch);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "tool_stretch", tool_stretch,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (tool_stretch);
  gtk_container_set_border_width (GTK_CONTAINER (tool_stretch), 2);
  gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (tool_stretch), FALSE);

  label20 = gtk_label_new (_("-"));
  gtk_widget_set_name (label20, "label20");
  gtk_widget_ref (label20);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "label20", label20,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label20);
  gtk_toolbar_append_widget (GTK_TOOLBAR (toolbar), label20, NULL, NULL);

  tmp_toolbar_icon = create_pixmap (window_main, "pencil_y.xpm");
  tool_select = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
                                GTK_TOOLBAR_CHILD_RADIOBUTTON,
                                tool_edit,
                                _("select"),
                                NULL, NULL,
                                tmp_toolbar_icon, NULL, NULL);
  gtk_widget_set_name (tool_select, "tool_select");
  gtk_widget_ref (tool_select);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "tool_select", tool_select,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (tool_select);
  gtk_container_set_border_width (GTK_CONTAINER (tool_select), 2);
  gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (tool_select), FALSE);

  tmp_toolbar_icon = create_pixmap (window_main, "eraser.xpm");
  tool_unselect = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
                                GTK_TOOLBAR_CHILD_RADIOBUTTON,
                                tool_edit,
                                _("unselect"),
                                NULL, NULL,
                                tmp_toolbar_icon, NULL, NULL);
  gtk_widget_set_name (tool_unselect, "tool_unselect");
  gtk_widget_ref (tool_unselect);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "tool_unselect", tool_unselect,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (tool_unselect);
  gtk_container_set_border_width (GTK_CONTAINER (tool_unselect), 2);
  gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (tool_unselect), FALSE);

  tmp_toolbar_icon = create_pixmap (window_main, "pencil.xpm");
  tool_assign = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
                                GTK_TOOLBAR_CHILD_RADIOBUTTON,
                                tool_edit,
                                _("assign"),
                                _("assign point to feature"), NULL,
                                tmp_toolbar_icon, NULL, NULL);
  gtk_widget_set_name (tool_assign, "tool_assign");
  gtk_widget_ref (tool_assign);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "tool_assign", tool_assign,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (tool_assign);
  gtk_container_set_border_width (GTK_CONTAINER (tool_assign), 2);
  gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (tool_assign), FALSE);

  scrolledwindow_image = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_set_name (scrolledwindow_image, "scrolledwindow_image");
  gtk_widget_ref (scrolledwindow_image);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "scrolledwindow_image", scrolledwindow_image,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (scrolledwindow_image);
  gtk_box_pack_start (GTK_BOX (vbox3), scrolledwindow_image, TRUE, TRUE, 0);
  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow_image), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);

  viewport4 = gtk_viewport_new (NULL, NULL);
  gtk_widget_set_name (viewport4, "viewport4");
  gtk_widget_ref (viewport4);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "viewport4", viewport4,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (viewport4);
  gtk_container_add (GTK_CONTAINER (scrolledwindow_image), viewport4);
  gtk_viewport_set_shadow_type (GTK_VIEWPORT (viewport4), GTK_SHADOW_ETCHED_OUT);

  image_frame = gtk_frame_new (_("error"));
  gtk_widget_set_name (image_frame, "image_frame");
  gtk_widget_ref (image_frame);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "image_frame", image_frame,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (image_frame);
  gtk_container_add (GTK_CONTAINER (viewport4), image_frame);

  drawingarea2 = gtk_drawing_area_new ();
  gtk_widget_set_name (drawingarea2, "drawingarea2");
  gtk_widget_ref (drawingarea2);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "drawingarea2", drawingarea2,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (drawingarea2);
  gtk_container_add (GTK_CONTAINER (image_frame), drawingarea2);
  gtk_widget_set_events (drawingarea2, GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);

  handlebox_res_size = gtk_handle_box_new ();
  gtk_widget_set_name (handlebox_res_size, "handlebox_res_size");
  gtk_widget_ref (handlebox_res_size);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "handlebox_res_size", handlebox_res_size,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (handlebox_res_size);
  gtk_box_pack_start (GTK_BOX (vbox3), handlebox_res_size, FALSE, FALSE, 0);

  frame3 = gtk_frame_new (_("resulting image size"));
  gtk_widget_set_name (frame3, "frame3");
  gtk_widget_ref (frame3);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "frame3", frame3,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (frame3);
  gtk_container_add (GTK_CONTAINER (handlebox_res_size), frame3);
  gtk_frame_set_label_align (GTK_FRAME (frame3), 0.02, 0.5);
  gtk_frame_set_shadow_type (GTK_FRAME (frame3), GTK_SHADOW_ETCHED_OUT);

  hbox4 = gtk_hbox_new (TRUE, 0);
  gtk_widget_set_name (hbox4, "hbox4");
  gtk_widget_ref (hbox4);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "hbox4", hbox4,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbox4);
  gtk_container_add (GTK_CONTAINER (frame3), hbox4);

  label16 = gtk_label_new (_("width"));
  gtk_widget_set_name (label16, "label16");
  gtk_widget_ref (label16);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "label16", label16,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label16);
  gtk_box_pack_start (GTK_BOX (hbox4), label16, TRUE, TRUE, 0);
  gtk_misc_set_alignment (GTK_MISC (label16), 0.7, 0.5);

  spinbutton_reswidth_adj = gtk_adjustment_new (400, 16, 4000, 1, 10, 10);
  spinbutton_reswidth = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton_reswidth_adj), 1, 0);
  gtk_widget_set_name (spinbutton_reswidth, "spinbutton_reswidth");
  gtk_widget_ref (spinbutton_reswidth);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "spinbutton_reswidth", spinbutton_reswidth,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (spinbutton_reswidth);
  gtk_box_pack_start (GTK_BOX (hbox4), spinbutton_reswidth, TRUE, TRUE, 1);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton_reswidth), TRUE);
  gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (spinbutton_reswidth), GTK_UPDATE_IF_VALID);

  label17 = gtk_label_new (_("height"));
  gtk_widget_set_name (label17, "label17");
  gtk_widget_ref (label17);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "label17", label17,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label17);
  gtk_box_pack_start (GTK_BOX (hbox4), label17, FALSE, TRUE, 0);
  gtk_misc_set_alignment (GTK_MISC (label17), 0.7, 0.5);

  spinbutton_resheight_adj = gtk_adjustment_new (300, 16, 4000, 1, 50, 50);
  spinbutton_resheight = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton_resheight_adj), 1, 0);
  gtk_widget_set_name (spinbutton_resheight, "spinbutton_resheight");
  gtk_widget_ref (spinbutton_resheight);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "spinbutton_resheight", spinbutton_resheight,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (spinbutton_resheight);
  gtk_box_pack_start (GTK_BOX (hbox4), spinbutton_resheight, TRUE, TRUE, 0);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton_resheight), TRUE);
  gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (spinbutton_resheight), GTK_UPDATE_IF_VALID);

  double_size = gtk_button_new_with_label (_("x2"));
  gtk_widget_set_name (double_size, "double_size");
  gtk_widget_ref (double_size);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "double_size", double_size,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (double_size);
  gtk_box_pack_start (GTK_BOX (hbox4), double_size, FALSE, FALSE, 1);
  gtk_container_set_border_width (GTK_CONTAINER (double_size), 2);

  halve_size = gtk_button_new_with_label (_("/2"));
  gtk_widget_set_name (halve_size, "halve_size");
  gtk_widget_ref (halve_size);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "halve_size", halve_size,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (halve_size);
  gtk_box_pack_start (GTK_BOX (hbox4), halve_size, FALSE, FALSE, 1);
  gtk_container_set_border_width (GTK_CONTAINER (halve_size), 2);

  resulting_apply = gtk_button_new_with_label (_("apply"));
  gtk_widget_set_name (resulting_apply, "resulting_apply");
  gtk_widget_ref (resulting_apply);
  gtk_object_set_data_full (GTK_OBJECT (window_main), "resulting_apply", resulting_apply,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (resulting_apply);
  gtk_box_pack_start (GTK_BOX (hbox4), resulting_apply, FALSE, FALSE, 6);
  gtk_container_set_border_width (GTK_CONTAINER (resulting_apply), 2);

  gtk_signal_connect (GTK_OBJECT (window_main), "delete_event",
                      GTK_SIGNAL_FUNC (on_window_main_delete),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (load_session), "activate",
                      GTK_SIGNAL_FUNC (on_load_session_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (save_session), "activate",
                      GTK_SIGNAL_FUNC (on_save_session_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (add_an_image), "activate",
                      GTK_SIGNAL_FUNC (on_add_an_image_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (quit1), "activate",
                      GTK_SIGNAL_FUNC (on_quit1_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (view_images1), "activate",
                      GTK_SIGNAL_FUNC (on_view_images1_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (show_mag), "activate",
                      GTK_SIGNAL_FUNC (on_show_mag_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (resulting_image_size), "activate",
                      GTK_SIGNAL_FUNC (on_resulting_image_size_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (show_morph_factors), "activate",
                      GTK_SIGNAL_FUNC (on_show_morph_factors_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (interpolate_meshes1), "activate",
                      GTK_SIGNAL_FUNC (on_interpolate_meshes1_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (morph_images1), "activate",
                      GTK_SIGNAL_FUNC (on_morph_images1_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (adjust_all_meshes), "activate",
                      GTK_SIGNAL_FUNC (on_adjust_all_meshes_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (wavelet_equalize), "activate",
                      GTK_SIGNAL_FUNC (on_wavelet_equalize_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (restore_morph_factors1), "activate",
                      GTK_SIGNAL_FUNC (on_restore_morph_factors1_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (startr), "activate",
                      GTK_SIGNAL_FUNC (on_restore_start_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (endr), "activate",
                      GTK_SIGNAL_FUNC (on_restore_end_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (equalr), "activate",
                      GTK_SIGNAL_FUNC (on_restore_equal_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (store_morph_factors), "activate",
                      GTK_SIGNAL_FUNC (on_store_morph_factors_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (starts), "activate",
                      GTK_SIGNAL_FUNC (on_store_start_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (ende), "activate",
                      GTK_SIGNAL_FUNC (on_store_end_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (morph_sequence1), "activate",
                      GTK_SIGNAL_FUNC (on_morph_sequence1_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (guide), "activate",
                      GTK_SIGNAL_FUNC (on_guide_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (generic_help), "activate",
                      GTK_SIGNAL_FUNC (on_generic_help_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (warp_help), "activate",
                      GTK_SIGNAL_FUNC (on_warp_help_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (morph_help1), "activate",
                      GTK_SIGNAL_FUNC (on_morph_help_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (why_the_beep_1), "activate",
                      GTK_SIGNAL_FUNC (on_why_the_beep_1_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (load_image), "clicked",
                      GTK_SIGNAL_FUNC (on_loadimage_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (load_mesh), "clicked",
                      GTK_SIGNAL_FUNC (on_loadmesh_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (save_mesh), "clicked",
                      GTK_SIGNAL_FUNC (on_savemesh_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (optionmenu_editview), "released",
                      GTK_SIGNAL_FUNC (on_optionmenu_editview_released),
                      optionmenu_editview_menu);
  gtk_signal_connect (GTK_OBJECT (optionmenu_editview), "clicked",
                      GTK_SIGNAL_FUNC (on_optionmenu_editview_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (settings_button), "clicked",
                      GTK_SIGNAL_FUNC (on_settings_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (button_interp_meshes), "clicked",
                      GTK_SIGNAL_FUNC (on_interpolate_meshes1_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (do_mixing), "clicked",
                      GTK_SIGNAL_FUNC (on_do_mixing_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (button_do_morph), "clicked",
                      GTK_SIGNAL_FUNC (on_morph_images1_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (save_image), "clicked",
                      GTK_SIGNAL_FUNC (on_save_image_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (back_to_guide), "clicked",
                      GTK_SIGNAL_FUNC (on_back_to_guide_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (color_feature), "clicked",
                      GTK_SIGNAL_FUNC (on_color_feature_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (drawingarea_color), "expose_event",
                      GTK_SIGNAL_FUNC (on_drawingarea_color_expose_event),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (combo_entry_feature), "activate",
                      GTK_SIGNAL_FUNC (on_combo_entry_feature_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (combo_entry_feature), "changed",
                      GTK_SIGNAL_FUNC (on_combo_entry_feature_changed),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (new_feature), "clicked",
                      GTK_SIGNAL_FUNC (on_new_feature_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (rename_feature), "clicked",
                      GTK_SIGNAL_FUNC (on_rename_feature_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (pack_feature), "clicked",
                      GTK_SIGNAL_FUNC (on_pack_feature_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (unpack_feature), "clicked",
                      GTK_SIGNAL_FUNC (on_unpack_feature_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (delete_feature), "clicked",
                      GTK_SIGNAL_FUNC (on_delete_feature_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (tool_edit), "clicked",
                      GTK_SIGNAL_FUNC (on_tool_edit_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (tool_move), "clicked",
                      GTK_SIGNAL_FUNC (on_tool_move_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (tool_stretch), "clicked",
                      GTK_SIGNAL_FUNC (on_tool_stretch_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (tool_select), "clicked",
                      GTK_SIGNAL_FUNC (on_tool_select_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (tool_unselect), "clicked",
                      GTK_SIGNAL_FUNC (on_tool_unselect_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (tool_assign), "clicked",
                      GTK_SIGNAL_FUNC (on_tool_assign_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (viewport4), "realize",
                      GTK_SIGNAL_FUNC (on_viewport3_realize),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (drawingarea2), "motion_notify_event",
                      GTK_SIGNAL_FUNC (on_motion_notify_event),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (drawingarea2), "button_press_event",
                      GTK_SIGNAL_FUNC (on_button_press_event),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (drawingarea2), "expose_event",
                      GTK_SIGNAL_FUNC (on_expose_event),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (drawingarea2), "realize",
                      GTK_SIGNAL_FUNC (on_drawingarea_realize),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (drawingarea2), "button_release_event",
                      GTK_SIGNAL_FUNC (on_drawingarea_button_release_event),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (drawingarea2), "configure_event",
                      GTK_SIGNAL_FUNC (on_drawingarea_configure_event),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (spinbutton_reswidth), "changed",
                      GTK_SIGNAL_FUNC (on_spinbutton_reswidth_changed),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (spinbutton_resheight), "changed",
                      GTK_SIGNAL_FUNC (on_spinbutton_resheight_changed),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (double_size), "clicked",
                      GTK_SIGNAL_FUNC (on_double_size_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (halve_size), "clicked",
                      GTK_SIGNAL_FUNC (on_halve_size_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (resulting_apply), "clicked",
                      GTK_SIGNAL_FUNC (on_resulting_apply_clicked),
                      NULL);

  gtk_object_set_data (GTK_OBJECT (window_main), "tooltips", tooltips);

  gtk_window_add_accel_group (GTK_WINDOW (window_main), accel_group);

  return window_main;
}

GtkWidget*
create_imageselection1 (void)
{
  GtkWidget *imageselection1;
  GtkWidget *ok_button1;
  GtkWidget *cancel_button1;
  GtkTooltips *tooltips;

  tooltips = gtk_tooltips_new ();

  imageselection1 = gtk_file_selection_new (_("error!"));
  gtk_widget_set_name (imageselection1, "imageselection1");
  gtk_object_set_data (GTK_OBJECT (imageselection1), "imageselection1", imageselection1);
  gtk_container_set_border_width (GTK_CONTAINER (imageselection1), 10);
  GTK_WINDOW (imageselection1)->type = GTK_WINDOW_DIALOG;
  gtk_window_set_wmclass (GTK_WINDOW (imageselection1), "gtkmorph", "gtkmorph");

  ok_button1 = GTK_FILE_SELECTION (imageselection1)->ok_button;
  gtk_widget_set_name (ok_button1, "ok_button1");
  gtk_object_set_data (GTK_OBJECT (imageselection1), "ok_button1", ok_button1);
  gtk_widget_show (ok_button1);
  GTK_WIDGET_SET_FLAGS (ok_button1, GTK_CAN_DEFAULT);
  gtk_tooltips_set_tip (tooltips, ok_button1, _("load the selected image"), NULL);

  cancel_button1 = GTK_FILE_SELECTION (imageselection1)->cancel_button;
  gtk_widget_set_name (cancel_button1, "cancel_button1");
  gtk_object_set_data (GTK_OBJECT (imageselection1), "cancel_button1", cancel_button1);
  gtk_widget_show (cancel_button1);
  GTK_WIDGET_SET_FLAGS (cancel_button1, GTK_CAN_DEFAULT);

  gtk_signal_connect (GTK_OBJECT (imageselection1), "destroy_event",
                      GTK_SIGNAL_FUNC (on_imageselection1_destroy_event),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (ok_button1), "realize",
                      GTK_SIGNAL_FUNC (on_ok_button1_realize),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (ok_button1), "clicked",
                      GTK_SIGNAL_FUNC (on_ok_button1_clicked),
                      NULL);
  gtk_signal_connect_object (GTK_OBJECT (cancel_button1), "clicked",
                             GTK_SIGNAL_FUNC (gtk_widget_destroy),
                             GTK_OBJECT (imageselection1));

  gtk_object_set_data (GTK_OBJECT (imageselection1), "tooltips", tooltips);

  return imageselection1;
}

GtkWidget*
create_image_win_1 (void)
{
  GtkWidget *image_win_1;
  GtkWidget *vbox2;
  GtkWidget *hbox1;
  GtkWidget *load_image;
  GtkWidget *load_mesh;
  GtkWidget *save_mesh;
  GtkWidget *optionmenu_editview;
  GtkWidget *optionmenu_editview_menu;
  GtkWidget *glade_menuitem;
  GtkWidget *settings_button;
  GtkWidget *do_warp;
  GtkWidget *save_image;
  GtkWidget *back_to_guide;
  GtkWidget *scrolledwindow_image;
  GtkWidget *viewport3;
  GtkWidget *image_frame;
  GtkWidget *drawingarea1;
  GtkWidget *handlebox_factors;
  GtkWidget *frame5;
  GtkWidget *table2;
  GtkWidget *label6;
  GtkWidget *label7;
  GtkWidget *hscale_mesh;
  GtkWidget *hscale_image;
  GtkObject *spinbutton_image_adj;
  GtkWidget *spinbutton_image;
  GtkObject *spinbutton_mesh_adj;
  GtkWidget *spinbutton_mesh;
  GtkWidget *handleboxsubimage;
  GtkWidget *frame1;
  GtkWidget *hbox2;
  GtkWidget *eyessubimage;
  GtkWidget *eventbox1;
  GtkWidget *label8;
  GtkObject *spinbuttonx_adj;
  GtkWidget *spinbuttonx;
  GtkWidget *eventbox2;
  GtkWidget *label9;
  GtkObject *spinbuttony_adj;
  GtkWidget *spinbuttony;
  GtkWidget *label10;
  GtkObject *spinbuttonw_adj;
  GtkWidget *spinbuttonw;
  GtkWidget *label11;
  GtkObject *spinbuttonh_adj;
  GtkWidget *spinbuttonh;
  GtkWidget *subimage_apply;
  GtkTooltips *tooltips;

  tooltips = gtk_tooltips_new ();

  image_win_1 = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_widget_set_name (image_win_1, "image_win_1");
  gtk_object_set_data (GTK_OBJECT (image_win_1), "image_win_1", image_win_1);
  gtk_window_set_title (GTK_WINDOW (image_win_1), _("error!"));
  gtk_window_set_wmclass (GTK_WINDOW (image_win_1), "gtkmorph", "gtkmorph");

  vbox2 = gtk_vbox_new (FALSE, 0);
  gtk_widget_set_name (vbox2, "vbox2");
  gtk_widget_ref (vbox2);
  gtk_object_set_data_full (GTK_OBJECT (image_win_1), "vbox2", vbox2,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (vbox2);
  gtk_container_add (GTK_CONTAINER (image_win_1), vbox2);

  hbox1 = gtk_hbox_new (FALSE, 0);
  gtk_widget_set_name (hbox1, "hbox1");
  gtk_widget_ref (hbox1);
  gtk_object_set_data_full (GTK_OBJECT (image_win_1), "hbox1", hbox1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbox1);
  gtk_box_pack_start (GTK_BOX (vbox2), hbox1, FALSE, FALSE, 0);

  load_image = gtk_button_new_with_label (_("load\nimage"));
  gtk_widget_set_name (load_image, "load_image");
  gtk_widget_ref (load_image);
  gtk_object_set_data_full (GTK_OBJECT (image_win_1), "load_image", load_image,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (load_image);
  gtk_box_pack_start (GTK_BOX (hbox1), load_image, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (load_image), 4);

  load_mesh = gtk_button_new_with_label (_("load\nmesh"));
  gtk_widget_set_name (load_mesh, "load_mesh");
  gtk_widget_ref (load_mesh);
  gtk_object_set_data_full (GTK_OBJECT (image_win_1), "load_mesh", load_mesh,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (load_mesh);
  gtk_box_pack_start (GTK_BOX (hbox1), load_mesh, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (load_mesh), 4);

  save_mesh = gtk_button_new_with_label (_("save\nmesh"));
  gtk_widget_set_name (save_mesh, "save_mesh");
  gtk_widget_ref (save_mesh);
  gtk_object_set_data_full (GTK_OBJECT (image_win_1), "save_mesh", save_mesh,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (save_mesh);
  gtk_box_pack_start (GTK_BOX (hbox1), save_mesh, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (save_mesh), 4);

  optionmenu_editview = gtk_option_menu_new ();
  gtk_widget_set_name (optionmenu_editview, "optionmenu_editview");
  gtk_widget_ref (optionmenu_editview);
  gtk_object_set_data_full (GTK_OBJECT (image_win_1), "optionmenu_editview", optionmenu_editview,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (optionmenu_editview);
  gtk_box_pack_start (GTK_BOX (hbox1), optionmenu_editview, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (optionmenu_editview), 3);
  gtk_tooltips_set_tip (tooltips, optionmenu_editview, _("``edit mesh'': view the loaded image and edit the mesh on it.         ``view warp'': view the result of warping the loaded image from this mesh to the resulting mesh.               ``v. warp&meshes'' as before but with both meshes on.              ``choose subimage'' choose which subimage of the loaded image you wish to use.            You can also use the 'settings' button to change these settings more finely."), NULL);
  optionmenu_editview_menu = gtk_menu_new ();
  glade_menuitem = gtk_menu_item_new_with_label (_("edit mesh"));
  gtk_widget_show (glade_menuitem);
  gtk_menu_append (GTK_MENU (optionmenu_editview_menu), glade_menuitem);
  glade_menuitem = gtk_menu_item_new_with_label (_("view warp"));
  gtk_widget_show (glade_menuitem);
  gtk_menu_append (GTK_MENU (optionmenu_editview_menu), glade_menuitem);
  glade_menuitem = gtk_menu_item_new_with_label (_("v. warp&meshes"));
  gtk_widget_show (glade_menuitem);
  gtk_menu_append (GTK_MENU (optionmenu_editview_menu), glade_menuitem);
  glade_menuitem = gtk_menu_item_new_with_label (_("choose subimage"));
  gtk_widget_show (glade_menuitem);
  gtk_menu_append (GTK_MENU (optionmenu_editview_menu), glade_menuitem);
  gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu_editview), optionmenu_editview_menu);

  settings_button = gtk_button_new_with_label (_("settings"));
  gtk_widget_set_name (settings_button, "settings_button");
  gtk_widget_ref (settings_button);
  gtk_object_set_data_full (GTK_OBJECT (image_win_1), "settings_button", settings_button,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (settings_button);
  gtk_box_pack_start (GTK_BOX (hbox1), settings_button, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (settings_button), 4);

  do_warp = gtk_button_new_with_label (_("do\nwarp"));
  gtk_widget_set_name (do_warp, "do_warp");
  gtk_widget_ref (do_warp);
  gtk_object_set_data_full (GTK_OBJECT (image_win_1), "do_warp", do_warp,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (do_warp);
  gtk_box_pack_start (GTK_BOX (hbox1), do_warp, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (do_warp), 4);
  gtk_tooltips_set_tip (tooltips, do_warp, _("warp this image from this mesh to the resulting mesh, and show the result in this window or an accessory window"), NULL);

  save_image = gtk_button_new_with_label (_("save\nimage"));
  gtk_widget_set_name (save_image, "save_image");
  gtk_widget_ref (save_image);
  gtk_object_set_data_full (GTK_OBJECT (image_win_1), "save_image", save_image,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (save_image);
  gtk_box_pack_start (GTK_BOX (hbox1), save_image, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (save_image), 4);
  gtk_tooltips_set_tip (tooltips, save_image, _("it saves whatever image is currently shown in the window"), NULL);

  back_to_guide = gtk_button_new_with_label (_("guide"));
  gtk_widget_set_name (back_to_guide, "back_to_guide");
  gtk_widget_ref (back_to_guide);
  gtk_object_set_data_full (GTK_OBJECT (image_win_1), "back_to_guide", back_to_guide,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (back_to_guide);
  gtk_box_pack_start (GTK_BOX (hbox1), back_to_guide, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (back_to_guide), 4);
  gtk_tooltips_set_tip (tooltips, back_to_guide, _("back to guide"), NULL);

  scrolledwindow_image = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_set_name (scrolledwindow_image, "scrolledwindow_image");
  gtk_widget_ref (scrolledwindow_image);
  gtk_object_set_data_full (GTK_OBJECT (image_win_1), "scrolledwindow_image", scrolledwindow_image,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (scrolledwindow_image);
  gtk_box_pack_start (GTK_BOX (vbox2), scrolledwindow_image, TRUE, TRUE, 0);
  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow_image), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);

  viewport3 = gtk_viewport_new (NULL, NULL);
  gtk_widget_set_name (viewport3, "viewport3");
  gtk_widget_ref (viewport3);
  gtk_object_set_data_full (GTK_OBJECT (image_win_1), "viewport3", viewport3,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (viewport3);
  gtk_container_add (GTK_CONTAINER (scrolledwindow_image), viewport3);
  gtk_viewport_set_shadow_type (GTK_VIEWPORT (viewport3), GTK_SHADOW_ETCHED_OUT);

  image_frame = gtk_frame_new (_("error"));
  gtk_widget_set_name (image_frame, "image_frame");
  gtk_widget_ref (image_frame);
  gtk_object_set_data_full (GTK_OBJECT (image_win_1), "image_frame", image_frame,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (image_frame);
  gtk_container_add (GTK_CONTAINER (viewport3), image_frame);

  drawingarea1 = gtk_drawing_area_new ();
  gtk_widget_set_name (drawingarea1, "drawingarea1");
  gtk_widget_ref (drawingarea1);
  gtk_object_set_data_full (GTK_OBJECT (image_win_1), "drawingarea1", drawingarea1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (drawingarea1);
  gtk_container_add (GTK_CONTAINER (image_frame), drawingarea1);
  GTK_WIDGET_SET_FLAGS (drawingarea1, GTK_CAN_FOCUS);
  gtk_widget_set_events (drawingarea1, GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_FOCUS_CHANGE_MASK);
  gtk_widget_set_extension_events (drawingarea1, GDK_EXTENSION_EVENTS_ALL);

  handlebox_factors = gtk_handle_box_new ();
  gtk_widget_set_name (handlebox_factors, "handlebox_factors");
  gtk_widget_ref (handlebox_factors);
  gtk_object_set_data_full (GTK_OBJECT (image_win_1), "handlebox_factors", handlebox_factors,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (handlebox_factors);
  gtk_box_pack_start (GTK_BOX (vbox2), handlebox_factors, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, handlebox_factors, _("these coefficents decide how much this image/mesh will influence the final morph"), NULL);

  frame5 = gtk_frame_new (_("coefficients"));
  gtk_widget_set_name (frame5, "frame5");
  gtk_widget_ref (frame5);
  gtk_object_set_data_full (GTK_OBJECT (image_win_1), "frame5", frame5,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (frame5);
  gtk_container_add (GTK_CONTAINER (handlebox_factors), frame5);

  table2 = gtk_table_new (2, 3, FALSE);
  gtk_widget_set_name (table2, "table2");
  gtk_widget_ref (table2);
  gtk_object_set_data_full (GTK_OBJECT (image_win_1), "table2", table2,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (table2);
  gtk_container_add (GTK_CONTAINER (frame5), table2);
  gtk_container_set_border_width (GTK_CONTAINER (table2), 5);
  gtk_table_set_row_spacings (GTK_TABLE (table2), 5);
  gtk_table_set_col_spacings (GTK_TABLE (table2), 6);

  label6 = gtk_label_new (_("image\nblending"));
  gtk_widget_set_name (label6, "label6");
  gtk_widget_ref (label6);
  gtk_object_set_data_full (GTK_OBJECT (image_win_1), "label6", label6,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label6);
  gtk_table_attach (GTK_TABLE (table2), label6, 0, 1, 1, 2,
                    (GtkAttachOptions) (0),
                    (GtkAttachOptions) (0), 0, 0);

  label7 = gtk_label_new (_("mesh\ninterp."));
  gtk_widget_set_name (label7, "label7");
  gtk_widget_ref (label7);
  gtk_object_set_data_full (GTK_OBJECT (image_win_1), "label7", label7,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label7);
  gtk_table_attach (GTK_TABLE (table2), label7, 0, 1, 0, 1,
                    (GtkAttachOptions) (0),
                    (GtkAttachOptions) (0), 0, 0);

  hscale_mesh = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (20, -100, 200, 1, 10, 10)));
  gtk_widget_set_name (hscale_mesh, "hscale_mesh");
  gtk_widget_ref (hscale_mesh);
  gtk_object_set_data_full (GTK_OBJECT (image_win_1), "hscale_mesh", hscale_mesh,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hscale_mesh);
  gtk_table_attach (GTK_TABLE (table2), hscale_mesh, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_scale_set_value_pos (GTK_SCALE (hscale_mesh), GTK_POS_BOTTOM);
  gtk_scale_set_digits (GTK_SCALE (hscale_mesh), 0);
  gtk_range_set_update_policy (GTK_RANGE (hscale_mesh), GTK_UPDATE_DELAYED);

  hscale_image = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (20, -100, 200, 1, 10, 10)));
  gtk_widget_set_name (hscale_image, "hscale_image");
  gtk_widget_ref (hscale_image);
  gtk_object_set_data_full (GTK_OBJECT (image_win_1), "hscale_image", hscale_image,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hscale_image);
  gtk_table_attach (GTK_TABLE (table2), hscale_image, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_scale_set_value_pos (GTK_SCALE (hscale_image), GTK_POS_BOTTOM);
  gtk_scale_set_digits (GTK_SCALE (hscale_image), 0);
  gtk_range_set_update_policy (GTK_RANGE (hscale_image), GTK_UPDATE_DELAYED);

  spinbutton_image_adj = gtk_adjustment_new (20, -100, 200, 1, 10, 10);
  spinbutton_image = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton_image_adj), 1, 0);
  gtk_widget_set_name (spinbutton_image, "spinbutton_image");
  gtk_widget_ref (spinbutton_image);
  gtk_object_set_data_full (GTK_OBJECT (image_win_1), "spinbutton_image", spinbutton_image,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (spinbutton_image);
  gtk_table_attach (GTK_TABLE (table2), spinbutton_image, 2, 3, 1, 2,
                    (GtkAttachOptions) (0),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, spinbutton_image, _("when you morph the images, or you ``do mixing'', this factor will measure how much this image will show in the mixing in the resulting image"), NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton_image), TRUE);
  gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (spinbutton_image), GTK_UPDATE_IF_VALID);

  spinbutton_mesh_adj = gtk_adjustment_new (20, -100, 200, 1, 10, 10);
  spinbutton_mesh = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton_mesh_adj), 1, 0);
  gtk_widget_set_name (spinbutton_mesh, "spinbutton_mesh");
  gtk_widget_ref (spinbutton_mesh);
  gtk_object_set_data_full (GTK_OBJECT (image_win_1), "spinbutton_mesh", spinbutton_mesh,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (spinbutton_mesh);
  gtk_table_attach (GTK_TABLE (table2), spinbutton_mesh, 2, 3, 0, 1,
                    (GtkAttachOptions) (0),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, spinbutton_mesh, _("when you use the ``interpolate meshes'' function, the ``mesh factor'' measures how much this mesh will influence the resulting image's mesh"), NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton_mesh), TRUE);
  gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (spinbutton_mesh), GTK_UPDATE_IF_VALID);

  handleboxsubimage = gtk_handle_box_new ();
  gtk_widget_set_name (handleboxsubimage, "handleboxsubimage");
  gtk_widget_ref (handleboxsubimage);
  gtk_object_set_data_full (GTK_OBJECT (image_win_1), "handleboxsubimage", handleboxsubimage,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (handleboxsubimage);
  gtk_box_pack_start (GTK_BOX (vbox2), handleboxsubimage, FALSE, FALSE, 0);

  frame1 = gtk_frame_new (_("subimage position"));
  gtk_widget_set_name (frame1, "frame1");
  gtk_widget_ref (frame1);
  gtk_object_set_data_full (GTK_OBJECT (image_win_1), "frame1", frame1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (frame1);
  gtk_container_add (GTK_CONTAINER (handleboxsubimage), frame1);

  hbox2 = gtk_hbox_new (FALSE, 0);
  gtk_widget_set_name (hbox2, "hbox2");
  gtk_widget_ref (hbox2);
  gtk_object_set_data_full (GTK_OBJECT (image_win_1), "hbox2", hbox2,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbox2);
  gtk_container_add (GTK_CONTAINER (frame1), hbox2);

  eyessubimage = gtk_button_new_with_label (_("reset"));
  gtk_widget_set_name (eyessubimage, "eyessubimage");
  gtk_widget_ref (eyessubimage);
  gtk_object_set_data_full (GTK_OBJECT (image_win_1), "eyessubimage", eyessubimage,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (eyessubimage);
  gtk_box_pack_start (GTK_BOX (hbox2), eyessubimage, FALSE, FALSE, 1);
  gtk_tooltips_set_tip (tooltips, eyessubimage, _("infer the subimage from the eyes position"), NULL);

  eventbox1 = gtk_event_box_new ();
  gtk_widget_set_name (eventbox1, "eventbox1");
  gtk_widget_ref (eventbox1);
  gtk_object_set_data_full (GTK_OBJECT (image_win_1), "eventbox1", eventbox1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (eventbox1);
  gtk_box_pack_start (GTK_BOX (hbox2), eventbox1, TRUE, TRUE, 2);
  gtk_tooltips_set_tip (tooltips, eventbox1, _("x coordinate of center"), NULL);

  label8 = gtk_label_new (_("c x"));
  gtk_widget_set_name (label8, "label8");
  gtk_widget_ref (label8);
  gtk_object_set_data_full (GTK_OBJECT (image_win_1), "label8", label8,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label8);
  gtk_container_add (GTK_CONTAINER (eventbox1), label8);
  gtk_misc_set_alignment (GTK_MISC (label8), 0.75, 0.5);

  spinbuttonx_adj = gtk_adjustment_new (0, -800, 800, 1, 10, 10);
  spinbuttonx = gtk_spin_button_new (GTK_ADJUSTMENT (spinbuttonx_adj), 1, 0);
  gtk_widget_set_name (spinbuttonx, "spinbuttonx");
  gtk_widget_ref (spinbuttonx);
  gtk_object_set_data_full (GTK_OBJECT (image_win_1), "spinbuttonx", spinbuttonx,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (spinbuttonx);
  gtk_box_pack_start (GTK_BOX (hbox2), spinbuttonx, TRUE, TRUE, 0);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbuttonx), TRUE);

  eventbox2 = gtk_event_box_new ();
  gtk_widget_set_name (eventbox2, "eventbox2");
  gtk_widget_ref (eventbox2);
  gtk_object_set_data_full (GTK_OBJECT (image_win_1), "eventbox2", eventbox2,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (eventbox2);
  gtk_box_pack_start (GTK_BOX (hbox2), eventbox2, TRUE, TRUE, 2);
  gtk_tooltips_set_tip (tooltips, eventbox2, _("y coordinate of center"), NULL);

  label9 = gtk_label_new (_("c y"));
  gtk_widget_set_name (label9, "label9");
  gtk_widget_ref (label9);
  gtk_object_set_data_full (GTK_OBJECT (image_win_1), "label9", label9,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label9);
  gtk_container_add (GTK_CONTAINER (eventbox2), label9);
  gtk_misc_set_alignment (GTK_MISC (label9), 0.75, 0.5);

  spinbuttony_adj = gtk_adjustment_new (0, -800, 800, 1, 10, 10);
  spinbuttony = gtk_spin_button_new (GTK_ADJUSTMENT (spinbuttony_adj), 1, 0);
  gtk_widget_set_name (spinbuttony, "spinbuttony");
  gtk_widget_ref (spinbuttony);
  gtk_object_set_data_full (GTK_OBJECT (image_win_1), "spinbuttony", spinbuttony,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (spinbuttony);
  gtk_box_pack_start (GTK_BOX (hbox2), spinbuttony, TRUE, TRUE, 0);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbuttony), TRUE);

  label10 = gtk_label_new (_("width"));
  gtk_widget_set_name (label10, "label10");
  gtk_widget_ref (label10);
  gtk_object_set_data_full (GTK_OBJECT (image_win_1), "label10", label10,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label10);
  gtk_box_pack_start (GTK_BOX (hbox2), label10, TRUE, FALSE, 0);

  spinbuttonw_adj = gtk_adjustment_new (400, 8, 1600, 1, 100, 100);
  spinbuttonw = gtk_spin_button_new (GTK_ADJUSTMENT (spinbuttonw_adj), 1, 0);
  gtk_widget_set_name (spinbuttonw, "spinbuttonw");
  gtk_widget_ref (spinbuttonw);
  gtk_object_set_data_full (GTK_OBJECT (image_win_1), "spinbuttonw", spinbuttonw,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (spinbuttonw);
  gtk_box_pack_start (GTK_BOX (hbox2), spinbuttonw, TRUE, TRUE, 0);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbuttonw), TRUE);

  label11 = gtk_label_new (_("height"));
  gtk_widget_set_name (label11, "label11");
  gtk_widget_ref (label11);
  gtk_object_set_data_full (GTK_OBJECT (image_win_1), "label11", label11,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label11);
  gtk_box_pack_start (GTK_BOX (hbox2), label11, TRUE, FALSE, 0);

  spinbuttonh_adj = gtk_adjustment_new (300, 8, 1600, 1, 100, 100);
  spinbuttonh = gtk_spin_button_new (GTK_ADJUSTMENT (spinbuttonh_adj), 1, 0);
  gtk_widget_set_name (spinbuttonh, "spinbuttonh");
  gtk_widget_ref (spinbuttonh);
  gtk_object_set_data_full (GTK_OBJECT (image_win_1), "spinbuttonh", spinbuttonh,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (spinbuttonh);
  gtk_box_pack_start (GTK_BOX (hbox2), spinbuttonh, TRUE, TRUE, 0);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbuttonh), TRUE);

  subimage_apply = gtk_button_new_with_label (_("apply"));
  gtk_widget_set_name (subimage_apply, "subimage_apply");
  gtk_widget_ref (subimage_apply);
  gtk_object_set_data_full (GTK_OBJECT (image_win_1), "subimage_apply", subimage_apply,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (subimage_apply);
  gtk_box_pack_start (GTK_BOX (hbox2), subimage_apply, FALSE, FALSE, 7);
  gtk_container_set_border_width (GTK_CONTAINER (subimage_apply), 1);

  gtk_signal_connect (GTK_OBJECT (image_win_1), "delete_event",
                      GTK_SIGNAL_FUNC (on_image_win_1_delete_event),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (load_image), "clicked",
                      GTK_SIGNAL_FUNC (on_loadimage_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (load_mesh), "clicked",
                      GTK_SIGNAL_FUNC (on_loadmesh_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (save_mesh), "clicked",
                      GTK_SIGNAL_FUNC (on_savemesh_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (optionmenu_editview), "released",
                      GTK_SIGNAL_FUNC (on_optionmenu_editview_released),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (optionmenu_editview), "pressed",
                      GTK_SIGNAL_FUNC (on_optionmenu_editview_pressed),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (settings_button), "clicked",
                      GTK_SIGNAL_FUNC (on_settings_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (do_warp), "clicked",
                      GTK_SIGNAL_FUNC (on_do_warp_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (save_image), "clicked",
                      GTK_SIGNAL_FUNC (on_save_image_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (back_to_guide), "clicked",
                      GTK_SIGNAL_FUNC (on_back_to_guide_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (viewport3), "realize",
                      GTK_SIGNAL_FUNC (on_viewport3_realize),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (drawingarea1), "motion_notify_event",
                      GTK_SIGNAL_FUNC (on_motion_notify_event),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (drawingarea1), "button_press_event",
                      GTK_SIGNAL_FUNC (on_button_press_event),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (drawingarea1), "expose_event",
                      GTK_SIGNAL_FUNC (on_expose_event),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (drawingarea1), "realize",
                      GTK_SIGNAL_FUNC (on_drawingarea_realize),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (drawingarea1), "button_release_event",
                      GTK_SIGNAL_FUNC (on_drawingarea_button_release_event),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (drawingarea1), "configure_event",
                      GTK_SIGNAL_FUNC (on_drawingarea_configure_event),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (drawingarea1), "key_press_event",
                      GTK_SIGNAL_FUNC (on_drawingarea_key_press_event),
                      NULL);
  gtk_signal_connect_after (GTK_OBJECT (handlebox_factors), "show",
                            GTK_SIGNAL_FUNC (on_handlebox_factors_show),
                            NULL);
  gtk_signal_connect (GTK_OBJECT (hscale_mesh), "button_release_event",
                      GTK_SIGNAL_FUNC (on_hscale_mesh_button_release_event),
                      spinbutton_mesh);
  gtk_signal_connect (GTK_OBJECT (hscale_image), "button_release_event",
                      GTK_SIGNAL_FUNC (on_hscale_image_button_release_event),
                      spinbutton_image);
  gtk_signal_connect (GTK_OBJECT (spinbutton_image), "changed",
                      GTK_SIGNAL_FUNC (on_spinbutton_image_changed),
                      hscale_image);
  gtk_signal_connect (GTK_OBJECT (spinbutton_mesh), "changed",
                      GTK_SIGNAL_FUNC (on_spinbutton_mesh_changed),
                      hscale_mesh);
  gtk_signal_connect_after (GTK_OBJECT (handleboxsubimage), "show",
                            GTK_SIGNAL_FUNC (on_handleboxsubimage_show),
                            NULL);
  gtk_signal_connect (GTK_OBJECT (eyessubimage), "clicked",
                      GTK_SIGNAL_FUNC (on_reset_subimage_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (spinbuttonx), "changed",
                      GTK_SIGNAL_FUNC (on_spinbuttonx_changed),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (spinbuttony), "changed",
                      GTK_SIGNAL_FUNC (on_spinbuttony_changed),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (spinbuttonw), "changed",
                      GTK_SIGNAL_FUNC (on_spinbuttonw_changed),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (spinbuttonh), "changed",
                      GTK_SIGNAL_FUNC (on_spinbuttonh_changed),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (subimage_apply), "clicked",
                      GTK_SIGNAL_FUNC (on_subimage_apply_clicked),
                      NULL);

  gtk_object_set_data (GTK_OBJECT (image_win_1), "tooltips", tooltips);

  return image_win_1;
}

GtkWidget*
create_dialogwarning (void)
{
  GtkWidget *dialogwarning;
  GtkWidget *dialog_vbox1;
  GtkWidget *labelwarning;
  GtkWidget *dialog_action_area1;
  GtkWidget *ok;

  dialogwarning = gtk_dialog_new ();
  gtk_widget_set_name (dialogwarning, "dialogwarning");
  gtk_object_set_data (GTK_OBJECT (dialogwarning), "dialogwarning", dialogwarning);
  gtk_window_set_title (GTK_WINDOW (dialogwarning), _("warning"));
  GTK_WINDOW (dialogwarning)->type = GTK_WINDOW_DIALOG;
  gtk_window_set_position (GTK_WINDOW (dialogwarning), GTK_WIN_POS_MOUSE);
  gtk_window_set_policy (GTK_WINDOW (dialogwarning), TRUE, TRUE, FALSE);
  gtk_window_set_wmclass (GTK_WINDOW (dialogwarning), "xmorph-gtk", "xmorph-gtk");

  dialog_vbox1 = GTK_DIALOG (dialogwarning)->vbox;
  gtk_widget_set_name (dialog_vbox1, "dialog_vbox1");
  gtk_object_set_data (GTK_OBJECT (dialogwarning), "dialog_vbox1", dialog_vbox1);
  gtk_widget_show (dialog_vbox1);

  labelwarning = gtk_label_new (_("warning!"));
  gtk_widget_set_name (labelwarning, "labelwarning");
  gtk_widget_ref (labelwarning);
  gtk_object_set_data_full (GTK_OBJECT (dialogwarning), "labelwarning", labelwarning,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (labelwarning);
  gtk_box_pack_start (GTK_BOX (dialog_vbox1), labelwarning, TRUE, TRUE, 0);
  gtk_label_set_justify (GTK_LABEL (labelwarning), GTK_JUSTIFY_LEFT);
  gtk_label_set_line_wrap (GTK_LABEL (labelwarning), TRUE);

  dialog_action_area1 = GTK_DIALOG (dialogwarning)->action_area;
  gtk_widget_set_name (dialog_action_area1, "dialog_action_area1");
  gtk_object_set_data (GTK_OBJECT (dialogwarning), "dialog_action_area1", dialog_action_area1);
  gtk_widget_show (dialog_action_area1);
  gtk_container_set_border_width (GTK_CONTAINER (dialog_action_area1), 10);

  ok = gtk_button_new_with_label (_("ok"));
  gtk_widget_set_name (ok, "ok");
  gtk_widget_ref (ok);
  gtk_object_set_data_full (GTK_OBJECT (dialogwarning), "ok", ok,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (ok);
  gtk_box_pack_start (GTK_BOX (dialog_action_area1), ok, FALSE, TRUE, 6);
  gtk_container_set_border_width (GTK_CONTAINER (ok), 2);
  GTK_WIDGET_SET_FLAGS (ok, GTK_CAN_DEFAULT);

  gtk_signal_connect (GTK_OBJECT (dialogwarning), "delete_event",
                      GTK_SIGNAL_FUNC (on_dialogwarning_delete_event),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (labelwarning), "show",
                      GTK_SIGNAL_FUNC (on_labelwarning_show),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (labelwarning), "realize",
                      GTK_SIGNAL_FUNC (on_labelwarning_realize),
                      NULL);
  gtk_signal_connect_object (GTK_OBJECT (ok), "clicked",
                             GTK_SIGNAL_FUNC (gtk_widget_destroy),
                             GTK_OBJECT (dialogwarning));

  gtk_widget_grab_focus (ok);
  gtk_widget_grab_default (ok);
  return dialogwarning;
}

GtkWidget*
create_window_warped (void)
{
  GtkWidget *window_warped;
  GtkWidget *scrolledwindow6;
  GtkWidget *viewport5;
  GtkWidget *drawingarea_warped;

  window_warped = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_widget_set_name (window_warped, "window_warped");
  gtk_object_set_data (GTK_OBJECT (window_warped), "window_warped", window_warped);
  gtk_window_set_title (GTK_WINDOW (window_warped), _("warped image"));
  gtk_window_set_default_size (GTK_WINDOW (window_warped), 200, 200);

  scrolledwindow6 = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_set_name (scrolledwindow6, "scrolledwindow6");
  gtk_widget_ref (scrolledwindow6);
  gtk_object_set_data_full (GTK_OBJECT (window_warped), "scrolledwindow6", scrolledwindow6,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (scrolledwindow6);
  gtk_container_add (GTK_CONTAINER (window_warped), scrolledwindow6);
  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow6), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);

  viewport5 = gtk_viewport_new (NULL, NULL);
  gtk_widget_set_name (viewport5, "viewport5");
  gtk_widget_ref (viewport5);
  gtk_object_set_data_full (GTK_OBJECT (window_warped), "viewport5", viewport5,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (viewport5);
  gtk_container_add (GTK_CONTAINER (scrolledwindow6), viewport5);

  drawingarea_warped = gtk_drawing_area_new ();
  gtk_widget_set_name (drawingarea_warped, "drawingarea_warped");
  gtk_widget_ref (drawingarea_warped);
  gtk_object_set_data_full (GTK_OBJECT (window_warped), "drawingarea_warped", drawingarea_warped,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (drawingarea_warped);
  gtk_container_add (GTK_CONTAINER (viewport5), drawingarea_warped);

  gtk_signal_connect (GTK_OBJECT (window_warped), "delete_event",
                      GTK_SIGNAL_FUNC (on_window_warped_delete_event),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (drawingarea_warped), "expose_event",
                      GTK_SIGNAL_FUNC (on_drawingarea_warped_expose_event),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (drawingarea_warped), "configure_event",
                      GTK_SIGNAL_FUNC (on_drawingarea_warped_configure_event),
                      NULL);

  return window_warped;
}

GtkWidget*
create_menuEditMesh (void)
{
  GtkWidget *menuEditMesh;
  GtkAccelGroup *menuEditMesh_accels;
  GtkWidget *unselect_point;
  GtkWidget *select_point;
  GtkWidget *assign_point;
  GtkWidget *adjust;
  GtkWidget *separator5;
  GtkWidget *add_horizontal_line;
  GtkWidget *add_vertical_line;
  GtkWidget *del_horizontal_line;
  GtkWidget *del_vertical_line;
  GtkWidget *separator13;
  GtkWidget *smooth;
  GtkAccelGroup *accel_group;

  accel_group = gtk_accel_group_new ();

  menuEditMesh = gtk_menu_new ();
  gtk_widget_set_name (menuEditMesh, "menuEditMesh");
  gtk_object_set_data (GTK_OBJECT (menuEditMesh), "menuEditMesh", menuEditMesh);
  menuEditMesh_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (menuEditMesh));

  unselect_point = gtk_menu_item_new_with_label (_("unselect point"));
  gtk_widget_set_name (unselect_point, "unselect_point");
  gtk_widget_ref (unselect_point);
  gtk_object_set_data_full (GTK_OBJECT (menuEditMesh), "unselect_point", unselect_point,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (unselect_point);
  gtk_container_add (GTK_CONTAINER (menuEditMesh), unselect_point);

  select_point = gtk_menu_item_new_with_label (_("select point"));
  gtk_widget_set_name (select_point, "select_point");
  gtk_widget_ref (select_point);
  gtk_object_set_data_full (GTK_OBJECT (menuEditMesh), "select_point", select_point,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (select_point);
  gtk_container_add (GTK_CONTAINER (menuEditMesh), select_point);

  assign_point = gtk_menu_item_new_with_label (_("assign point"));
  gtk_widget_set_name (assign_point, "assign_point");
  gtk_widget_ref (assign_point);
  gtk_object_set_data_full (GTK_OBJECT (menuEditMesh), "assign_point", assign_point,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (assign_point);
  gtk_container_add (GTK_CONTAINER (menuEditMesh), assign_point);

  adjust = gtk_menu_item_new_with_label (_("adjust"));
  gtk_widget_set_name (adjust, "adjust");
  gtk_widget_ref (adjust);
  gtk_object_set_data_full (GTK_OBJECT (menuEditMesh), "adjust", adjust,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (adjust);
  gtk_container_add (GTK_CONTAINER (menuEditMesh), adjust);

  separator5 = gtk_menu_item_new ();
  gtk_widget_set_name (separator5, "separator5");
  gtk_widget_ref (separator5);
  gtk_object_set_data_full (GTK_OBJECT (menuEditMesh), "separator5", separator5,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (separator5);
  gtk_container_add (GTK_CONTAINER (menuEditMesh), separator5);
  gtk_widget_set_sensitive (separator5, FALSE);

  add_horizontal_line = gtk_menu_item_new_with_label (_("add horizontal line"));
  gtk_widget_set_name (add_horizontal_line, "add_horizontal_line");
  gtk_widget_ref (add_horizontal_line);
  gtk_object_set_data_full (GTK_OBJECT (menuEditMesh), "add_horizontal_line", add_horizontal_line,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (add_horizontal_line);
  gtk_container_add (GTK_CONTAINER (menuEditMesh), add_horizontal_line);
  gtk_widget_add_accelerator (add_horizontal_line, "activate", accel_group,
                              GDK_H, 0,
                              GTK_ACCEL_VISIBLE);

  add_vertical_line = gtk_menu_item_new_with_label (_("add vertical line"));
  gtk_widget_set_name (add_vertical_line, "add_vertical_line");
  gtk_widget_ref (add_vertical_line);
  gtk_object_set_data_full (GTK_OBJECT (menuEditMesh), "add_vertical_line", add_vertical_line,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (add_vertical_line);
  gtk_container_add (GTK_CONTAINER (menuEditMesh), add_vertical_line);
  gtk_widget_add_accelerator (add_vertical_line, "activate", accel_group,
                              GDK_V, 0,
                              GTK_ACCEL_VISIBLE);

  del_horizontal_line = gtk_menu_item_new_with_label (_("del horizontal line"));
  gtk_widget_set_name (del_horizontal_line, "del_horizontal_line");
  gtk_widget_ref (del_horizontal_line);
  gtk_object_set_data_full (GTK_OBJECT (menuEditMesh), "del_horizontal_line", del_horizontal_line,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (del_horizontal_line);
  gtk_container_add (GTK_CONTAINER (menuEditMesh), del_horizontal_line);
  gtk_widget_add_accelerator (del_horizontal_line, "activate", accel_group,
                              GDK_H, GDK_CONTROL_MASK,
                              GTK_ACCEL_VISIBLE);

  del_vertical_line = gtk_menu_item_new_with_label (_("del vertical line"));
  gtk_widget_set_name (del_vertical_line, "del_vertical_line");
  gtk_widget_ref (del_vertical_line);
  gtk_object_set_data_full (GTK_OBJECT (menuEditMesh), "del_vertical_line", del_vertical_line,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (del_vertical_line);
  gtk_container_add (GTK_CONTAINER (menuEditMesh), del_vertical_line);
  gtk_widget_add_accelerator (del_vertical_line, "activate", accel_group,
                              GDK_V, GDK_CONTROL_MASK,
                              GTK_ACCEL_VISIBLE);

  separator13 = gtk_menu_item_new ();
  gtk_widget_set_name (separator13, "separator13");
  gtk_widget_ref (separator13);
  gtk_object_set_data_full (GTK_OBJECT (menuEditMesh), "separator13", separator13,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (separator13);
  gtk_container_add (GTK_CONTAINER (menuEditMesh), separator13);
  gtk_widget_set_sensitive (separator13, FALSE);

  smooth = gtk_menu_item_new_with_label (_("smooth"));
  gtk_widget_set_name (smooth, "smooth");
  gtk_widget_ref (smooth);
  gtk_object_set_data_full (GTK_OBJECT (menuEditMesh), "smooth", smooth,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (smooth);
  gtk_container_add (GTK_CONTAINER (menuEditMesh), smooth);

  gtk_signal_connect (GTK_OBJECT (unselect_point), "activate",
                      GTK_SIGNAL_FUNC (on_unselect_point_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (select_point), "activate",
                      GTK_SIGNAL_FUNC (on_select_point_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (assign_point), "activate",
                      GTK_SIGNAL_FUNC (on_assign_point_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (adjust), "activate",
                      GTK_SIGNAL_FUNC (on_adjust_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (add_horizontal_line), "activate",
                      GTK_SIGNAL_FUNC (on_add_horizontal_line_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (add_vertical_line), "activate",
                      GTK_SIGNAL_FUNC (on_add_vertical_line_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (del_horizontal_line), "activate",
                      GTK_SIGNAL_FUNC (on_del_horizontal_line_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (del_vertical_line), "activate",
                      GTK_SIGNAL_FUNC (on_del_vertical_line_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (smooth), "activate",
                      GTK_SIGNAL_FUNC (on_menu_smooth_activate),
                      NULL);

  gtk_menu_set_accel_group (GTK_MENU (menuEditMesh), accel_group);

  return menuEditMesh;
}

GtkWidget*
create_window_movie (void)
{
  GtkWidget *window_movie;
  GtkWidget *vbox4;
  GtkWidget *hbox5;
  GtkWidget *eventbox4;
  GtkWidget *label19;
  GtkObject *spinbutton_n_files_adj;
  GtkWidget *spinbutton_n_files;
  GtkWidget *hbox6;
  GtkWidget *eventbox3;
  GtkWidget *label18;
  GtkObject *spinbutton_first_file_adj;
  GtkWidget *spinbutton_first_file;
  GtkWidget *hbox7;
  GtkWidget *labelfile;
  GtkWidget *file_base_name;
  GtkWidget *frame4;
  GtkWidget *table5;
  GtkWidget *animated_gif;
  GtkWidget *animate;
  GtkWidget *replay;
  GtkWidget *animated_mpeg;
  GtkWidget *pixmap2;
  GtkWidget *hseparator1;
  GtkWidget *hbox8;
  GtkWidget *ok;
  GtkWidget *cancel;
  GtkWidget *help;
  GtkAccelGroup *accel_group;
  GtkTooltips *tooltips;

  tooltips = gtk_tooltips_new ();

  accel_group = gtk_accel_group_new ();

  window_movie = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_widget_set_name (window_movie, "window_movie");
  gtk_object_set_data (GTK_OBJECT (window_movie), "window_movie", window_movie);
  gtk_window_set_title (GTK_WINDOW (window_movie), _("gtkmorph movie"));

  vbox4 = gtk_vbox_new (FALSE, 0);
  gtk_widget_set_name (vbox4, "vbox4");
  gtk_widget_ref (vbox4);
  gtk_object_set_data_full (GTK_OBJECT (window_movie), "vbox4", vbox4,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (vbox4);
  gtk_container_add (GTK_CONTAINER (window_movie), vbox4);

  hbox5 = gtk_hbox_new (FALSE, 0);
  gtk_widget_set_name (hbox5, "hbox5");
  gtk_widget_ref (hbox5);
  gtk_object_set_data_full (GTK_OBJECT (window_movie), "hbox5", hbox5,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbox5);
  gtk_box_pack_start (GTK_BOX (vbox4), hbox5, TRUE, TRUE, 0);

  eventbox4 = gtk_event_box_new ();
  gtk_widget_set_name (eventbox4, "eventbox4");
  gtk_widget_ref (eventbox4);
  gtk_object_set_data_full (GTK_OBJECT (window_movie), "eventbox4", eventbox4,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (eventbox4);
  gtk_box_pack_start (GTK_BOX (hbox5), eventbox4, FALSE, FALSE, 4);
  gtk_tooltips_set_tip (tooltips, eventbox4, _("how many frames will be saved; each will be saved in a file"), NULL);

  label19 = gtk_label_new (_("how many frames"));
  gtk_widget_set_name (label19, "label19");
  gtk_widget_ref (label19);
  gtk_object_set_data_full (GTK_OBJECT (window_movie), "label19", label19,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label19);
  gtk_container_add (GTK_CONTAINER (eventbox4), label19);
  gtk_misc_set_alignment (GTK_MISC (label19), 0, 0.5);

  spinbutton_n_files_adj = gtk_adjustment_new (10, 2, 100, 1, 10, 10);
  spinbutton_n_files = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton_n_files_adj), 1, 0);
  gtk_widget_set_name (spinbutton_n_files, "spinbutton_n_files");
  gtk_widget_ref (spinbutton_n_files);
  gtk_object_set_data_full (GTK_OBJECT (window_movie), "spinbutton_n_files", spinbutton_n_files,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (spinbutton_n_files);
  gtk_box_pack_start (GTK_BOX (hbox5), spinbutton_n_files, FALSE, TRUE, 3);
  gtk_widget_set_usize (spinbutton_n_files, 60, -2);

  hbox6 = gtk_hbox_new (FALSE, 0);
  gtk_widget_set_name (hbox6, "hbox6");
  gtk_widget_ref (hbox6);
  gtk_object_set_data_full (GTK_OBJECT (window_movie), "hbox6", hbox6,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbox6);
  gtk_box_pack_start (GTK_BOX (vbox4), hbox6, TRUE, TRUE, 5);

  eventbox3 = gtk_event_box_new ();
  gtk_widget_set_name (eventbox3, "eventbox3");
  gtk_widget_ref (eventbox3);
  gtk_object_set_data_full (GTK_OBJECT (window_movie), "eventbox3", eventbox3,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (eventbox3);
  gtk_box_pack_start (GTK_BOX (hbox6), eventbox3, FALSE, FALSE, 4);
  gtk_tooltips_set_tip (tooltips, eventbox3, _("the files of the frames will be numbered sequentially starting from this number"), NULL);

  label18 = gtk_label_new (_("number of first file"));
  gtk_widget_set_name (label18, "label18");
  gtk_widget_ref (label18);
  gtk_object_set_data_full (GTK_OBJECT (window_movie), "label18", label18,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label18);
  gtk_container_add (GTK_CONTAINER (eventbox3), label18);
  gtk_misc_set_alignment (GTK_MISC (label18), 0, 0.5);

  spinbutton_first_file_adj = gtk_adjustment_new (1, -100, 100, 1, 10, 10);
  spinbutton_first_file = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton_first_file_adj), 1, 0);
  gtk_widget_set_name (spinbutton_first_file, "spinbutton_first_file");
  gtk_widget_ref (spinbutton_first_file);
  gtk_object_set_data_full (GTK_OBJECT (window_movie), "spinbutton_first_file", spinbutton_first_file,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (spinbutton_first_file);
  gtk_box_pack_start (GTK_BOX (hbox6), spinbutton_first_file, FALSE, FALSE, 4);
  gtk_widget_set_usize (spinbutton_first_file, 60, -2);

  hbox7 = gtk_hbox_new (FALSE, 0);
  gtk_widget_set_name (hbox7, "hbox7");
  gtk_widget_ref (hbox7);
  gtk_object_set_data_full (GTK_OBJECT (window_movie), "hbox7", hbox7,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbox7);
  gtk_box_pack_start (GTK_BOX (vbox4), hbox7, TRUE, TRUE, 4);

  labelfile = gtk_label_new (_("file base name"));
  gtk_widget_set_name (labelfile, "labelfile");
  gtk_widget_ref (labelfile);
  gtk_object_set_data_full (GTK_OBJECT (window_movie), "labelfile", labelfile,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (labelfile);
  gtk_box_pack_start (GTK_BOX (hbox7), labelfile, FALSE, FALSE, 4);
  gtk_misc_set_alignment (GTK_MISC (labelfile), 0, 0.5);

  file_base_name = gtk_entry_new ();
  gtk_widget_set_name (file_base_name, "file_base_name");
  gtk_widget_ref (file_base_name);
  gtk_object_set_data_full (GTK_OBJECT (window_movie), "file_base_name", file_base_name,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (file_base_name);
  gtk_box_pack_start (GTK_BOX (hbox7), file_base_name, TRUE, TRUE, 3);
  gtk_entry_set_text (GTK_ENTRY (file_base_name), _("frame"));

  frame4 = gtk_frame_new (_("animations"));
  gtk_widget_set_name (frame4, "frame4");
  gtk_widget_ref (frame4);
  gtk_object_set_data_full (GTK_OBJECT (window_movie), "frame4", frame4,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (frame4);
  gtk_box_pack_start (GTK_BOX (vbox4), frame4, TRUE, TRUE, 2);

  table5 = gtk_table_new (3, 2, TRUE);
  gtk_widget_set_name (table5, "table5");
  gtk_widget_ref (table5);
  gtk_object_set_data_full (GTK_OBJECT (window_movie), "table5", table5,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (table5);
  gtk_container_add (GTK_CONTAINER (frame4), table5);

  animated_gif = gtk_check_button_new_with_label (_("create animated gif"));
  gtk_widget_set_name (animated_gif, "animated_gif");
  gtk_widget_ref (animated_gif);
  gtk_object_set_data_full (GTK_OBJECT (window_movie), "animated_gif", animated_gif,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (animated_gif);
  gtk_table_attach (GTK_TABLE (table5), animated_gif, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, animated_gif, _("creates an animated gif (needs 'convert' from imagemagick) and plays it (needs 'animate' from imagemagick)"), NULL);

  animate = gtk_check_button_new_with_label (_("animate sequence"));
  gtk_widget_set_name (animate, "animate");
  gtk_widget_ref (animate);
  gtk_object_set_data_full (GTK_OBJECT (window_movie), "animate", animate,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (animate);
  gtk_table_attach (GTK_TABLE (table5), animate, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, animate, _("show animated sequence after saving it all  (needs 'animate' command from imagemagick)"), NULL);

  replay = gtk_button_new_with_label (_("replay"));
  gtk_widget_set_name (replay, "replay");
  gtk_widget_ref (replay);
  gtk_object_set_data_full (GTK_OBJECT (window_movie), "replay", replay,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (replay);
  gtk_table_attach (GTK_TABLE (table5), replay, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (replay), 2);
  GTK_WIDGET_SET_FLAGS (replay, GTK_CAN_DEFAULT);
  gtk_tooltips_set_tip (tooltips, replay, _("resaves and replays animations"), NULL);

  animated_mpeg = gtk_check_button_new_with_label (_("creates mpeg"));
  gtk_widget_set_name (animated_mpeg, "animated_mpeg");
  gtk_widget_ref (animated_mpeg);
  gtk_object_set_data_full (GTK_OBJECT (window_movie), "animated_mpeg", animated_mpeg,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (animated_mpeg);
  gtk_table_attach (GTK_TABLE (table5), animated_mpeg, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, animated_mpeg, _("creates an mpeg file and plays it; will use a parameter file (see help) (needs 'mpeg_encode' and 'mpeg_play')"), NULL);

  pixmap2 = create_pixmap (window_movie, "howmany.xpm");
  gtk_widget_set_name (pixmap2, "pixmap2");
  gtk_widget_ref (pixmap2);
  gtk_object_set_data_full (GTK_OBJECT (window_movie), "pixmap2", pixmap2,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (pixmap2);
  gtk_table_attach (GTK_TABLE (table5), pixmap2, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);

  hseparator1 = gtk_hseparator_new ();
  gtk_widget_set_name (hseparator1, "hseparator1");
  gtk_widget_ref (hseparator1);
  gtk_object_set_data_full (GTK_OBJECT (window_movie), "hseparator1", hseparator1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hseparator1);
  gtk_table_attach (GTK_TABLE (table5), hseparator1, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);

  hbox8 = gtk_hbox_new (TRUE, 2);
  gtk_widget_set_name (hbox8, "hbox8");
  gtk_widget_ref (hbox8);
  gtk_object_set_data_full (GTK_OBJECT (window_movie), "hbox8", hbox8,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbox8);
  gtk_box_pack_start (GTK_BOX (vbox4), hbox8, TRUE, TRUE, 6);

  ok = gtk_button_new_with_label (_(" ok "));
  gtk_widget_set_name (ok, "ok");
  gtk_widget_ref (ok);
  gtk_object_set_data_full (GTK_OBJECT (window_movie), "ok", ok,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (ok);
  gtk_box_pack_start (GTK_BOX (hbox8), ok, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (ok), 2);
  GTK_WIDGET_SET_FLAGS (ok, GTK_CAN_DEFAULT);
  gtk_tooltips_set_tip (tooltips, ok, _("creates and saves all morphs, builds animations"), NULL);
  gtk_widget_add_accelerator (ok, "clicked", accel_group,
                              GDK_Return, 0,
                              GTK_ACCEL_VISIBLE);

  cancel = gtk_button_new_with_label (_("cancel"));
  gtk_widget_set_name (cancel, "cancel");
  gtk_widget_ref (cancel);
  gtk_object_set_data_full (GTK_OBJECT (window_movie), "cancel", cancel,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (cancel);
  gtk_box_pack_start (GTK_BOX (hbox8), cancel, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (cancel), 2);
  GTK_WIDGET_SET_FLAGS (cancel, GTK_CAN_DEFAULT);
  gtk_widget_add_accelerator (cancel, "clicked", accel_group,
                              GDK_Escape, 0,
                              GTK_ACCEL_VISIBLE);

  help = gtk_button_new_with_label (_("help"));
  gtk_widget_set_name (help, "help");
  gtk_widget_ref (help);
  gtk_object_set_data_full (GTK_OBJECT (window_movie), "help", help,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (help);
  gtk_box_pack_start (GTK_BOX (hbox8), help, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (help), 2);
  GTK_WIDGET_SET_FLAGS (help, GTK_CAN_DEFAULT);
  gtk_widget_add_accelerator (help, "clicked", accel_group,
                              GDK_Help, 0,
                              GTK_ACCEL_VISIBLE);

  gtk_signal_connect (GTK_OBJECT (replay), "clicked",
                      GTK_SIGNAL_FUNC (on_movie_replay_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (ok), "clicked",
                      GTK_SIGNAL_FUNC (on_movie_ok_clicked),
                      NULL);
  gtk_signal_connect_object (GTK_OBJECT (cancel), "clicked",
                             GTK_SIGNAL_FUNC (gtk_widget_hide),
                             GTK_OBJECT (window_movie));
  gtk_signal_connect (GTK_OBJECT (help), "clicked",
                      GTK_SIGNAL_FUNC (on_movie_help_clicked),
                      NULL);

  gtk_object_set_data (GTK_OBJECT (window_movie), "tooltips", tooltips);

  gtk_window_add_accel_group (GTK_WINDOW (window_movie), accel_group);

  return window_movie;
}

GtkWidget*
create_guide (void)
{
  GtkWidget *guide;
  GtkWidget *vbox5;
  GtkWidget *guide_pixmap;
  GtkWidget *scrolledwindow7;
  GtkWidget *text;
  GtkWidget *hbox9;
  GtkWidget *prev;
  GtkWidget *do_it;
  GtkWidget *next;
  GtkTooltips *tooltips;

  tooltips = gtk_tooltips_new ();

  guide = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_widget_set_name (guide, "guide");
  gtk_object_set_data (GTK_OBJECT (guide), "guide", guide);
  gtk_window_set_title (GTK_WINDOW (guide), _("gtkmorph guide"));

  vbox5 = gtk_vbox_new (FALSE, 0);
  gtk_widget_set_name (vbox5, "vbox5");
  gtk_widget_ref (vbox5);
  gtk_object_set_data_full (GTK_OBJECT (guide), "vbox5", vbox5,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (vbox5);
  gtk_container_add (GTK_CONTAINER (guide), vbox5);

  guide_pixmap = create_pixmap (guide, "example.xpm");
  gtk_widget_set_name (guide_pixmap, "guide_pixmap");
  gtk_widget_ref (guide_pixmap);
  gtk_object_set_data_full (GTK_OBJECT (guide), "guide_pixmap", guide_pixmap,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (guide_pixmap);
  gtk_box_pack_start (GTK_BOX (vbox5), guide_pixmap, FALSE, TRUE, 0);

  scrolledwindow7 = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_set_name (scrolledwindow7, "scrolledwindow7");
  gtk_widget_ref (scrolledwindow7);
  gtk_object_set_data_full (GTK_OBJECT (guide), "scrolledwindow7", scrolledwindow7,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (scrolledwindow7);
  gtk_box_pack_start (GTK_BOX (vbox5), scrolledwindow7, TRUE, TRUE, 0);
  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow7), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);

  text = gtk_text_new (NULL, NULL);
  gtk_widget_set_name (text, "text");
  gtk_widget_ref (text);
  gtk_object_set_data_full (GTK_OBJECT (guide), "text", text,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (text);
  gtk_container_add (GTK_CONTAINER (scrolledwindow7), text);

  hbox9 = gtk_hbox_new (TRUE, 0);
  gtk_widget_set_name (hbox9, "hbox9");
  gtk_widget_ref (hbox9);
  gtk_object_set_data_full (GTK_OBJECT (guide), "hbox9", hbox9,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbox9);
  gtk_box_pack_start (GTK_BOX (vbox5), hbox9, FALSE, TRUE, 0);

  prev = gtk_button_new_with_label (_("prev"));
  gtk_widget_set_name (prev, "prev");
  gtk_widget_ref (prev);
  gtk_object_set_data_full (GTK_OBJECT (guide), "prev", prev,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (prev);
  gtk_box_pack_start (GTK_BOX (hbox9), prev, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (prev), 2);
  gtk_tooltips_set_tip (tooltips, prev, _("go back to previous guide pane"), NULL);

  do_it = gtk_button_new_with_label (_("do it"));
  gtk_widget_set_name (do_it, "do_it");
  gtk_widget_ref (do_it);
  gtk_object_set_data_full (GTK_OBJECT (guide), "do_it", do_it,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (do_it);
  gtk_box_pack_start (GTK_BOX (hbox9), do_it, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (do_it), 2);
  gtk_tooltips_set_tip (tooltips, do_it, _("do what is proposed in this pane"), NULL);

  next = gtk_button_new_with_label (_("next"));
  gtk_widget_set_name (next, "next");
  gtk_widget_ref (next);
  gtk_object_set_data_full (GTK_OBJECT (guide), "next", next,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (next);
  gtk_box_pack_start (GTK_BOX (hbox9), next, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (next), 2);
  gtk_tooltips_set_tip (tooltips, next, _("skip this and go to next guide pane"), NULL);

  gtk_signal_connect (GTK_OBJECT (guide), "delete_event",
                      GTK_SIGNAL_FUNC (on_guide_delete_event),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (guide), "destroy",
                      GTK_SIGNAL_FUNC (on_guide_destroy),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (text), "expose_event",
                      GTK_SIGNAL_FUNC (on_guide_text_expose_event),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (prev), "clicked",
                      GTK_SIGNAL_FUNC (on_guide_prev_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (do_it), "clicked",
                      GTK_SIGNAL_FUNC (on_guide_do_it_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (next), "clicked",
                      GTK_SIGNAL_FUNC (on_guide_next_clicked),
                      NULL);

  gtk_object_set_data (GTK_OBJECT (guide), "tooltips", tooltips);

  return guide;
}

GtkWidget*
create_question (void)
{
  GtkWidget *question;
  GtkWidget *dialog_vbox2;
  GtkWidget *questionlabel;
  GtkWidget *dialog_action_area2;
  GtkWidget *hbox10;
  GtkWidget *yes;
  GtkWidget *no;

  question = gtk_dialog_new ();
  gtk_widget_set_name (question, "question");
  gtk_object_set_data (GTK_OBJECT (question), "question", question);
  gtk_window_set_title (GTK_WINDOW (question), _("question"));
  gtk_window_set_policy (GTK_WINDOW (question), TRUE, TRUE, FALSE);

  dialog_vbox2 = GTK_DIALOG (question)->vbox;
  gtk_widget_set_name (dialog_vbox2, "dialog_vbox2");
  gtk_object_set_data (GTK_OBJECT (question), "dialog_vbox2", dialog_vbox2);
  gtk_widget_show (dialog_vbox2);

  questionlabel = gtk_label_new (_("question?"));
  gtk_widget_set_name (questionlabel, "questionlabel");
  gtk_widget_ref (questionlabel);
  gtk_object_set_data_full (GTK_OBJECT (question), "questionlabel", questionlabel,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (questionlabel);
  gtk_box_pack_start (GTK_BOX (dialog_vbox2), questionlabel, TRUE, TRUE, 0);
  gtk_label_set_justify (GTK_LABEL (questionlabel), GTK_JUSTIFY_LEFT);
  gtk_label_set_line_wrap (GTK_LABEL (questionlabel), TRUE);

  dialog_action_area2 = GTK_DIALOG (question)->action_area;
  gtk_widget_set_name (dialog_action_area2, "dialog_action_area2");
  gtk_object_set_data (GTK_OBJECT (question), "dialog_action_area2", dialog_action_area2);
  gtk_widget_show (dialog_action_area2);
  gtk_container_set_border_width (GTK_CONTAINER (dialog_action_area2), 10);

  hbox10 = gtk_hbox_new (FALSE, 0);
  gtk_widget_set_name (hbox10, "hbox10");
  gtk_widget_ref (hbox10);
  gtk_object_set_data_full (GTK_OBJECT (question), "hbox10", hbox10,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbox10);
  gtk_box_pack_start (GTK_BOX (dialog_action_area2), hbox10, TRUE, TRUE, 0);

  yes = gtk_button_new_with_label (_("Yes"));
  gtk_widget_set_name (yes, "yes");
  gtk_widget_ref (yes);
  gtk_object_set_data_full (GTK_OBJECT (question), "yes", yes,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (yes);
  gtk_box_pack_start (GTK_BOX (hbox10), yes, TRUE, FALSE, 0);

  no = gtk_button_new_with_label (_("No"));
  gtk_widget_set_name (no, "no");
  gtk_widget_ref (no);
  gtk_object_set_data_full (GTK_OBJECT (question), "no", no,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (no);
  gtk_box_pack_start (GTK_BOX (hbox10), no, TRUE, FALSE, 2);

  gtk_signal_connect (GTK_OBJECT (question), "delete_event",
                      GTK_SIGNAL_FUNC (on_question_delete_event),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (yes), "clicked",
                      GTK_SIGNAL_FUNC (on_yes_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (no), "clicked",
                      GTK_SIGNAL_FUNC (on_no_clicked),
                      NULL);

  return question;
}

GtkWidget*
create_colorselectiondialog (void)
{
  GtkWidget *colorselectiondialog;
  GtkWidget *ok_button_color;
  GtkWidget *cancel_button_csd;
  GtkWidget *help_button1;

  colorselectiondialog = gtk_color_selection_dialog_new (_("Select Color"));
  gtk_widget_set_name (colorselectiondialog, "colorselectiondialog");
  gtk_object_set_data (GTK_OBJECT (colorselectiondialog), "colorselectiondialog", colorselectiondialog);
  gtk_container_set_border_width (GTK_CONTAINER (colorselectiondialog), 10);

  ok_button_color = GTK_COLOR_SELECTION_DIALOG (colorselectiondialog)->ok_button;
  gtk_widget_set_name (ok_button_color, "ok_button_color");
  gtk_object_set_data (GTK_OBJECT (colorselectiondialog), "ok_button_color", ok_button_color);
  gtk_widget_show (ok_button_color);
  GTK_WIDGET_SET_FLAGS (ok_button_color, GTK_CAN_DEFAULT);

  cancel_button_csd = GTK_COLOR_SELECTION_DIALOG (colorselectiondialog)->cancel_button;
  gtk_widget_set_name (cancel_button_csd, "cancel_button_csd");
  gtk_object_set_data (GTK_OBJECT (colorselectiondialog), "cancel_button_csd", cancel_button_csd);
  gtk_widget_show (cancel_button_csd);
  GTK_WIDGET_SET_FLAGS (cancel_button_csd, GTK_CAN_DEFAULT);

  help_button1 = GTK_COLOR_SELECTION_DIALOG (colorselectiondialog)->help_button;
  gtk_widget_set_name (help_button1, "help_button1");
  gtk_object_set_data (GTK_OBJECT (colorselectiondialog), "help_button1", help_button1);
  gtk_widget_show (help_button1);
  GTK_WIDGET_SET_FLAGS (help_button1, GTK_CAN_DEFAULT);

  gtk_signal_connect (GTK_OBJECT (ok_button_color), "clicked",
                      GTK_SIGNAL_FUNC (on_ok_button_color_clicked),
                      NULL);
  gtk_signal_connect_object (GTK_OBJECT (cancel_button_csd), "clicked",
                             GTK_SIGNAL_FUNC (gtk_widget_destroy),
                             GTK_OBJECT (colorselectiondialog));

  return colorselectiondialog;
}

GtkWidget*
create_unused (void)
{
  GtkWidget *unused;
  GtkWidget *vbox6;
  GtkWidget *handlebox_tools;
  GtkWidget *toolbar_image_tools;
  GtkWidget *tmp_toolbar_icon;
  GtkWidget *tool_edit;
  GtkWidget *tool_move;
  GtkWidget *tool_stretch;

  unused = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_widget_set_name (unused, "unused");
  gtk_object_set_data (GTK_OBJECT (unused), "unused", unused);
  gtk_window_set_title (GTK_WINDOW (unused), _("window1"));

  vbox6 = gtk_vbox_new (FALSE, 0);
  gtk_widget_set_name (vbox6, "vbox6");
  gtk_widget_ref (vbox6);
  gtk_object_set_data_full (GTK_OBJECT (unused), "vbox6", vbox6,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (vbox6);
  gtk_container_add (GTK_CONTAINER (unused), vbox6);

  handlebox_tools = gtk_handle_box_new ();
  gtk_widget_set_name (handlebox_tools, "handlebox_tools");
  gtk_widget_ref (handlebox_tools);
  gtk_object_set_data_full (GTK_OBJECT (unused), "handlebox_tools", handlebox_tools,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (handlebox_tools);
  gtk_box_pack_start (GTK_BOX (vbox6), handlebox_tools, TRUE, TRUE, 0);
  gtk_handle_box_set_snap_edge (GTK_HANDLE_BOX (handlebox_tools), GTK_POS_BOTTOM);

  toolbar_image_tools = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH);
  gtk_widget_set_name (toolbar_image_tools, "toolbar_image_tools");
  gtk_widget_ref (toolbar_image_tools);
  gtk_object_set_data_full (GTK_OBJECT (unused), "toolbar_image_tools", toolbar_image_tools,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (toolbar_image_tools);
  gtk_container_add (GTK_CONTAINER (handlebox_tools), toolbar_image_tools);

  tmp_toolbar_icon = create_pixmap (unused, "cursor_left.xpm");
  tool_edit = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar_image_tools),
                                GTK_TOOLBAR_CHILD_RADIOBUTTON,
                                NULL,
                                _("edit"),
                                _("move single point"), NULL,
                                tmp_toolbar_icon, NULL, NULL);
  gtk_widget_set_name (tool_edit, "tool_edit");
  gtk_widget_ref (tool_edit);
  gtk_object_set_data_full (GTK_OBJECT (unused), "tool_edit", tool_edit,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (tool_edit);
  gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (tool_edit), FALSE);

  tmp_toolbar_icon = create_pixmap (unused, "hand01.xpm");
  tool_move = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar_image_tools),
                                GTK_TOOLBAR_CHILD_RADIOBUTTON,
                                tool_edit,
                                _("move"),
                                _("move whole feature"), NULL,
                                tmp_toolbar_icon, NULL, NULL);
  gtk_widget_set_name (tool_move, "tool_move");
  gtk_widget_ref (tool_move);
  gtk_object_set_data_full (GTK_OBJECT (unused), "tool_move", tool_move,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (tool_move);
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tool_move), TRUE);
  gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (tool_move), FALSE);

  tmp_toolbar_icon = create_pixmap (unused, "transform.xpm");
  tool_stretch = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar_image_tools),
                                GTK_TOOLBAR_CHILD_RADIOBUTTON,
                                tool_edit,
                                _("stretch"),
                                _("stretch whole feature"), NULL,
                                tmp_toolbar_icon, NULL, NULL);
  gtk_widget_set_name (tool_stretch, "tool_stretch");
  gtk_widget_ref (tool_stretch);
  gtk_object_set_data_full (GTK_OBJECT (unused), "tool_stretch", tool_stretch,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (tool_stretch);
  gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (tool_stretch), FALSE);

  gtk_signal_connect (GTK_OBJECT (tool_edit), "clicked",
                      GTK_SIGNAL_FUNC (on_tool_edit_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (tool_move), "clicked",
                      GTK_SIGNAL_FUNC (on_tool_move_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (tool_stretch), "clicked",
                      GTK_SIGNAL_FUNC (on_tool_stretch_clicked),
                      NULL);

  return unused;
}

GtkWidget*
create_mag (void)
{
  GtkWidget *mag;
  GtkWidget *mag_vbox;
  GtkWidget *mag_hbox;
  GtkWidget *mag_label;
  GtkObject *mag_spinbutton_adj;
  GtkWidget *mag_spinbutton;
  GtkWidget *mag_track;
  GtkWidget *mag_drawingarea;

  mag = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_widget_set_name (mag, "mag");
  gtk_object_set_data (GTK_OBJECT (mag), "mag", mag);
  gtk_window_set_title (GTK_WINDOW (mag), _("gtkmorph mag"));

  mag_vbox = gtk_vbox_new (FALSE, 0);
  gtk_widget_set_name (mag_vbox, "mag_vbox");
  gtk_widget_ref (mag_vbox);
  gtk_object_set_data_full (GTK_OBJECT (mag), "mag_vbox", mag_vbox,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (mag_vbox);
  gtk_container_add (GTK_CONTAINER (mag), mag_vbox);

  mag_hbox = gtk_hbox_new (FALSE, 4);
  gtk_widget_set_name (mag_hbox, "mag_hbox");
  gtk_widget_ref (mag_hbox);
  gtk_object_set_data_full (GTK_OBJECT (mag), "mag_hbox", mag_hbox,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (mag_hbox);
  gtk_box_pack_start (GTK_BOX (mag_vbox), mag_hbox, FALSE, TRUE, 0);

  mag_label = gtk_label_new (_("1"));
  gtk_widget_set_name (mag_label, "mag_label");
  gtk_widget_ref (mag_label);
  gtk_object_set_data_full (GTK_OBJECT (mag), "mag_label", mag_label,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (mag_label);
  gtk_box_pack_start (GTK_BOX (mag_hbox), mag_label, TRUE, TRUE, 1);

  mag_spinbutton_adj = gtk_adjustment_new (300, 50, 1000, 10, 50, 50);
  mag_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (mag_spinbutton_adj), 1, 0);
  gtk_widget_set_name (mag_spinbutton, "mag_spinbutton");
  gtk_widget_ref (mag_spinbutton);
  gtk_object_set_data_full (GTK_OBJECT (mag), "mag_spinbutton", mag_spinbutton,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (mag_spinbutton);
  gtk_box_pack_start (GTK_BOX (mag_hbox), mag_spinbutton, TRUE, TRUE, 1);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (mag_spinbutton), TRUE);

  mag_track = gtk_check_button_new_with_label (_("track"));
  gtk_widget_set_name (mag_track, "mag_track");
  gtk_widget_ref (mag_track);
  gtk_object_set_data_full (GTK_OBJECT (mag), "mag_track", mag_track,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (mag_track);
  gtk_box_pack_start (GTK_BOX (mag_hbox), mag_track, FALSE, FALSE, 0);
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (mag_track), TRUE);

  mag_drawingarea = gtk_drawing_area_new ();
  gtk_widget_set_name (mag_drawingarea, "mag_drawingarea");
  gtk_widget_ref (mag_drawingarea);
  gtk_object_set_data_full (GTK_OBJECT (mag), "mag_drawingarea", mag_drawingarea,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (mag_drawingarea);
  gtk_box_pack_start (GTK_BOX (mag_vbox), mag_drawingarea, TRUE, TRUE, 0);
  gtk_widget_set_usize (mag_drawingarea, 180, 180);

  gtk_signal_connect (GTK_OBJECT (mag), "unrealize",
                      GTK_SIGNAL_FUNC (on_mag_unrealize),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (mag_spinbutton), "activate",
                      GTK_SIGNAL_FUNC (on_mag_spinbutton_activate),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (mag_spinbutton), "changed",
                      GTK_SIGNAL_FUNC (on_mag_spinbutton_changed),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (mag_track), "toggled",
                      GTK_SIGNAL_FUNC (on_mag_track_toggled),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (mag_drawingarea), "expose_event",
                      GTK_SIGNAL_FUNC (on_mag_drawingarea_expose_event),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (mag_drawingarea), "configure_event",
                      GTK_SIGNAL_FUNC (on_mag_drawingarea_configure_event),
                      NULL);

  return mag;
}

