/*
 * 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 <stdio.h>

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

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

#define GLADE_HOOKUP_OBJECT(component,widget,name) \
  g_object_set_data_full (G_OBJECT (component), name, \
    gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref)

#define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \
  g_object_set_data (G_OBJECT (component), name, widget)

GtkWidget*
create_window_main (void)
{
  GtkWidget *window_main;
  GtkWidget *vbox1;
  GtkWidget *menubar1;
  GtkWidget *file;
  GtkWidget *file_menu;
  GtkWidget *load_session;
  GtkWidget *save_session;
  GtkWidget *separatore4;
  GtkWidget *add_an_image;
  GtkWidget *add_a_difference;
  GtkWidget *separatore9;
  GtkWidget *quit1;
  GtkWidget *edit;
  GtkWidget *edit_menu;
  GtkWidget *view_images1;
  GtkWidget *show_mag;
  GtkWidget *separator4;
  GtkWidget *resulting_image_size;
  GtkWidget *show_morph_factors;
  GtkWidget *settings_menu;
  GtkWidget *morph;
  GtkWidget *morph_menu;
  GtkWidget *interpolate_meshes1;
  GtkWidget *morph_images1;
  GtkWidget *separatore1;
  GtkWidget *adjust_all_meshes;
  GtkWidget *wavelet_equalize;
  GtkWidget *separator13;
  GtkWidget *restore_morph_factors1;
  GtkWidget *restore_morph_factors1_menu;
  GtkWidget *startr;
  GtkWidget *endr;
  GtkWidget *equal;
  GtkWidget *store_morph_factors;
  GtkWidget *store_morph_factors_menu;
  GtkWidget *starts;
  GtkWidget *ende;
  GtkWidget *morph_sequence1;
  GtkWidget *separator3;
  GtkWidget *help;
  GtkWidget *help_menu;
  GtkWidget *guide;
  GtkWidget *load_example_session;
  GtkWidget *separator2;
  GtkWidget *help_sub;
  GtkWidget *help_sub_menu;
  GtkWidget *generic_help;
  GtkWidget *warp_help;
  GtkWidget *mesh_tips;
  GtkWidget *morph_help1;
  GtkWidget *feature_help;
  GtkWidget *separator11;
  GtkWidget *why_the_beep_1;
  GtkWidget *vbox3;
  GtkWidget *hbox3;
  GtkWidget *load_image;
  GtkWidget *load_mesh;
  GtkWidget *save_mesh;
  GtkWidget *optionmenu_editview;
  GtkWidget *convertwidget1;
  GtkWidget *convertwidget2;
  GtkWidget *convertwidget3;
  GtkWidget *convertwidget4;
  GtkWidget *convertwidget5;
  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;
  GtkIconSize tmp_toolbar_icon_size;
  GSList *tool_edit_group = NULL;
  GtkWidget *tmp_image;
  GtkWidget *tool_edit;
  GtkWidget *tool_move;
  GtkWidget *tool_stretch;
  GtkWidget *toolitem1;
  GtkWidget *label20;
  GtkWidget *tool_select;
  GtkWidget *tool_unselect;
  GtkWidget *tool_assign;
  GtkWidget *scrolledwindow_image;
  GtkWidget *viewport4;
  GtkWidget *image_frame;
  GtkWidget *drawingarea;
  GtkWidget *label21;
  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;
  GtkWidget *label22;
  GtkWidget *main_info_label;
  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_window_set_title (GTK_WINDOW (window_main), _("gtkmorph"));

  vbox1 = gtk_vbox_new (FALSE, 0);
  gtk_widget_set_name (vbox1, "vbox1");
  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_show (menubar1);
  gtk_box_pack_start (GTK_BOX (vbox1), menubar1, FALSE, FALSE, 0);

  file = gtk_menu_item_new_with_mnemonic (_("File"));
  gtk_widget_set_name (file, "file");
  gtk_widget_show (file);
  gtk_container_add (GTK_CONTAINER (menubar1), file);

  file_menu = gtk_menu_new ();
  gtk_widget_set_name (file_menu, "file_menu");
  gtk_menu_item_set_submenu (GTK_MENU_ITEM (file), file_menu);

  load_session = gtk_menu_item_new_with_mnemonic (_("load session"));
  gtk_widget_set_name (load_session, "load_session");
  gtk_widget_show (load_session);
  gtk_container_add (GTK_CONTAINER (file_menu), load_session);

  save_session = gtk_menu_item_new_with_mnemonic (_("save session"));
  gtk_widget_set_name (save_session, "save_session");
  gtk_widget_show (save_session);
  gtk_container_add (GTK_CONTAINER (file_menu), save_session);

  separatore4 = gtk_separator_menu_item_new ();
  gtk_widget_set_name (separatore4, "separatore4");
  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_mnemonic (_("add an image"));
  gtk_widget_set_name (add_an_image, "add_an_image");
  gtk_widget_show (add_an_image);
  gtk_container_add (GTK_CONTAINER (file_menu), add_an_image);

  add_a_difference = gtk_menu_item_new_with_mnemonic (_("load a difference"));
  gtk_widget_set_name (add_a_difference, "add_a_difference");
  gtk_widget_show (add_a_difference);
  gtk_container_add (GTK_CONTAINER (file_menu), add_a_difference);
  gtk_tooltips_set_tip (tooltips, add_a_difference, _("load a \"differential mesh\", that is a mesh representing the difference of two meshes"), NULL);

  separatore9 = gtk_separator_menu_item_new ();
  gtk_widget_set_name (separatore9, "separatore9");
  gtk_widget_show (separatore9);
  gtk_container_add (GTK_CONTAINER (file_menu), separatore9);
  gtk_widget_set_sensitive (separatore9, FALSE);

  quit1 = gtk_menu_item_new_with_mnemonic (_("Quit"));
  gtk_widget_set_name (quit1, "quit1");
  gtk_widget_show (quit1);
  gtk_container_add (GTK_CONTAINER (file_menu), quit1);
  gtk_widget_add_accelerator (quit1, "activate", accel_group,
                              GDK_q, (GdkModifierType) GDK_MOD1_MASK,
                              GTK_ACCEL_VISIBLE);

  edit = gtk_menu_item_new_with_mnemonic (_("Edit"));
  gtk_widget_set_name (edit, "edit");
  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_menu_item_set_submenu (GTK_MENU_ITEM (edit), edit_menu);

  view_images1 = gtk_menu_item_new_with_mnemonic (_("show all images"));
  gtk_widget_set_name (view_images1, "view_images1");
  gtk_widget_show (view_images1);
  gtk_container_add (GTK_CONTAINER (edit_menu), view_images1);

  show_mag = gtk_menu_item_new_with_mnemonic (_("show mag"));
  gtk_widget_set_name (show_mag, "show_mag");
  gtk_widget_show (show_mag);
  gtk_container_add (GTK_CONTAINER (edit_menu), show_mag);

  separator4 = gtk_separator_menu_item_new ();
  gtk_widget_set_name (separator4, "separator4");
  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_mnemonic (_("resulting image size..."));
  gtk_widget_set_name (resulting_image_size, "resulting_image_size");
  gtk_widget_show (resulting_image_size);
  gtk_container_add (GTK_CONTAINER (edit_menu), resulting_image_size);

  show_morph_factors = gtk_menu_item_new_with_mnemonic (_("show morph factors"));
  gtk_widget_set_name (show_morph_factors, "show_morph_factors");
  gtk_widget_show (show_morph_factors);
  gtk_container_add (GTK_CONTAINER (edit_menu), show_morph_factors);

  settings_menu = gtk_menu_item_new_with_mnemonic (_("Settings"));
  gtk_widget_set_name (settings_menu, "settings_menu");
  gtk_widget_show (settings_menu);
  gtk_container_add (GTK_CONTAINER (menubar1), settings_menu);

  morph = gtk_menu_item_new_with_mnemonic (_("Morph"));
  gtk_widget_set_name (morph, "morph");
  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_menu_item_set_submenu (GTK_MENU_ITEM (morph), morph_menu);

  interpolate_meshes1 = gtk_menu_item_new_with_mnemonic (_("interpolate meshes"));
  gtk_widget_set_name (interpolate_meshes1, "interpolate_meshes1");
  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_mnemonic (_("morph images"));
  gtk_widget_set_name (morph_images1, "morph_images1");
  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, (GdkModifierType) GDK_CONTROL_MASK,
                              GTK_ACCEL_VISIBLE);

  separatore1 = gtk_separator_menu_item_new ();
  gtk_widget_set_name (separatore1, "separatore1");
  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_mnemonic (_("adjust all meshes"));
  gtk_widget_set_name (adjust_all_meshes, "adjust_all_meshes");
  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_mnemonic (_("wavelet equalize"));
  gtk_widget_set_name (wavelet_equalize, "wavelet_equalize");
  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);

  separator13 = gtk_separator_menu_item_new ();
  gtk_widget_set_name (separator13, "separator13");
  gtk_widget_show (separator13);
  gtk_container_add (GTK_CONTAINER (morph_menu), separator13);
  gtk_widget_set_sensitive (separator13, FALSE);

  restore_morph_factors1 = gtk_menu_item_new_with_mnemonic (_("restore morph coefficients..."));
  gtk_widget_set_name (restore_morph_factors1, "restore_morph_factors1");
  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_menu_item_set_submenu (GTK_MENU_ITEM (restore_morph_factors1), restore_morph_factors1_menu);

  startr = gtk_menu_item_new_with_mnemonic (_("start"));
  gtk_widget_set_name (startr, "startr");
  gtk_widget_show (startr);
  gtk_container_add (GTK_CONTAINER (restore_morph_factors1_menu), startr);

  endr = gtk_menu_item_new_with_mnemonic (_("end"));
  gtk_widget_set_name (endr, "endr");
  gtk_widget_show (endr);
  gtk_container_add (GTK_CONTAINER (restore_morph_factors1_menu), endr);

  equal = gtk_menu_item_new_with_mnemonic (_("equal"));
  gtk_widget_set_name (equal, "equal");
  gtk_widget_show (equal);
  gtk_container_add (GTK_CONTAINER (restore_morph_factors1_menu), equal);

  store_morph_factors = gtk_menu_item_new_with_mnemonic (_("store morph coefficients..."));
  gtk_widget_set_name (store_morph_factors, "store_morph_factors");
  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_menu_item_set_submenu (GTK_MENU_ITEM (store_morph_factors), store_morph_factors_menu);

  starts = gtk_menu_item_new_with_mnemonic (_("start"));
  gtk_widget_set_name (starts, "starts");
  gtk_widget_show (starts);
  gtk_container_add (GTK_CONTAINER (store_morph_factors_menu), starts);

  ende = gtk_menu_item_new_with_mnemonic (_("end"));
  gtk_widget_set_name (ende, "ende");
  gtk_widget_show (ende);
  gtk_container_add (GTK_CONTAINER (store_morph_factors_menu), ende);

  morph_sequence1 = gtk_menu_item_new_with_mnemonic (_("morph sequence"));
  gtk_widget_set_name (morph_sequence1, "morph_sequence1");
  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_separator_menu_item_new ();
  gtk_widget_set_name (separator3, "separator3");
  gtk_widget_show (separator3);
  gtk_container_add (GTK_CONTAINER (menubar1), separator3);
  gtk_widget_set_sensitive (separator3, FALSE);

  help = gtk_menu_item_new_with_mnemonic (_("Help"));
  gtk_widget_set_name (help, "help");
  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_menu_item_set_submenu (GTK_MENU_ITEM (help), help_menu);

  guide = gtk_menu_item_new_with_mnemonic (_("guide..."));
  gtk_widget_set_name (guide, "guide");
  gtk_widget_show (guide);
  gtk_container_add (GTK_CONTAINER (help_menu), guide);

  load_example_session = gtk_menu_item_new_with_mnemonic (_("load example session"));
  gtk_widget_set_name (load_example_session, "load_example_session");
  gtk_widget_show (load_example_session);
  gtk_container_add (GTK_CONTAINER (help_menu), load_example_session);

  separator2 = gtk_separator_menu_item_new ();
  gtk_widget_set_name (separator2, "separator2");
  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_mnemonic (_("help..."));
  gtk_widget_set_name (help_sub, "help_sub");
  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_menu_item_set_submenu (GTK_MENU_ITEM (help_sub), help_sub_menu);

  generic_help = gtk_menu_item_new_with_mnemonic (_("generic help"));
  gtk_widget_set_name (generic_help, "generic_help");
  gtk_widget_show (generic_help);
  gtk_container_add (GTK_CONTAINER (help_sub_menu), generic_help);

  warp_help = gtk_menu_item_new_with_mnemonic (_("warp help"));
  gtk_widget_set_name (warp_help, "warp_help");
  gtk_widget_show (warp_help);
  gtk_container_add (GTK_CONTAINER (help_sub_menu), warp_help);

  mesh_tips = gtk_menu_item_new_with_mnemonic (_("mesh tips"));
  gtk_widget_set_name (mesh_tips, "mesh_tips");
  gtk_widget_show (mesh_tips);
  gtk_container_add (GTK_CONTAINER (help_sub_menu), mesh_tips);

  morph_help1 = gtk_menu_item_new_with_mnemonic (_("morph help"));
  gtk_widget_set_name (morph_help1, "morph_help1");
  gtk_widget_show (morph_help1);
  gtk_container_add (GTK_CONTAINER (help_sub_menu), morph_help1);

  feature_help = gtk_menu_item_new_with_mnemonic (_("feature help"));
  gtk_widget_set_name (feature_help, "feature_help");
  gtk_widget_show (feature_help);
  gtk_container_add (GTK_CONTAINER (help_sub_menu), feature_help);

  separator11 = gtk_separator_menu_item_new ();
  gtk_widget_set_name (separator11, "separator11");
  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_mnemonic (_("why the beep?"));
  gtk_widget_set_name (why_the_beep_1, "why_the_beep_1");
  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_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_show (hbox3);
  gtk_box_pack_start (GTK_BOX (vbox3), hbox3, FALSE, FALSE, 0);

  load_image = gtk_button_new_with_mnemonic (_("load\nimage"));
  gtk_widget_set_name (load_image, "load_image");
  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_mnemonic (_("load\nmesh"));
  gtk_widget_set_name (load_mesh, "load_mesh");
  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_mnemonic (_("save\nmesh"));
  gtk_widget_set_name (save_mesh, "save_mesh");
  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_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);

  convertwidget1 = gtk_menu_new ();
  gtk_widget_set_name (convertwidget1, "convertwidget1");

  convertwidget2 = gtk_menu_item_new_with_mnemonic (_("edit template"));
  gtk_widget_set_name (convertwidget2, "convertwidget2");
  gtk_widget_show (convertwidget2);
  gtk_container_add (GTK_CONTAINER (convertwidget1), convertwidget2);

  convertwidget3 = gtk_menu_item_new_with_mnemonic (_("view morph"));
  gtk_widget_set_name (convertwidget3, "convertwidget3");
  gtk_widget_show (convertwidget3);
  gtk_container_add (GTK_CONTAINER (convertwidget1), convertwidget3);

  convertwidget4 = gtk_menu_item_new_with_mnemonic (_("v morph&meshes"));
  gtk_widget_set_name (convertwidget4, "convertwidget4");
  gtk_widget_show (convertwidget4);
  gtk_container_add (GTK_CONTAINER (convertwidget1), convertwidget4);

  convertwidget5 = gtk_menu_item_new_with_mnemonic (_("edit eyes points"));
  gtk_widget_set_name (convertwidget5, "convertwidget5");
  gtk_widget_show (convertwidget5);
  gtk_container_add (GTK_CONTAINER (convertwidget1), convertwidget5);

  gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu_editview), convertwidget1);

  settings_button = gtk_button_new_with_mnemonic (_("settings"));
  gtk_widget_set_name (settings_button, "settings_button");
  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_mnemonic (_("interpol.\nmeshes"));
  gtk_widget_set_name (button_interp_meshes, "button_interp_meshes");
  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_mnemonic (_("do\nblending"));
  gtk_widget_set_name (do_mixing, "do_mixing");
  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_mnemonic (_("do\nmorph"));
  gtk_widget_set_name (button_do_morph, "button_do_morph");
  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_mnemonic (_("save\nimage"));
  gtk_widget_set_name (save_image, "save_image");
  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_mnemonic (_("guide"));
  gtk_widget_set_name (back_to_guide, "back_to_guide");
  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_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_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_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_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_show (drawingarea_color);
  gtk_container_add (GTK_CONTAINER (color_feature), drawingarea_color);
  gtk_widget_set_size_request (drawingarea_color, 15, 10);

  combo_feature = gtk_combo_new ();
  g_object_set_data (G_OBJECT (GTK_COMBO (combo_feature)->popwin),
                     "GladeParentKey", combo_feature);
  gtk_widget_set_name (combo_feature, "combo_feature");
  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);
  gtk_combo_set_case_sensitive (GTK_COMBO (combo_feature), TRUE);

  combo_entry_feature = GTK_COMBO (combo_feature)->entry;
  gtk_widget_set_name (combo_entry_feature, "combo_entry_feature");
  gtk_widget_show (combo_entry_feature);

  new_feature = gtk_button_new_with_mnemonic (_("new"));
  gtk_widget_set_name (new_feature, "new_feature");
  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_mnemonic (_("rename"));
  gtk_widget_set_name (rename_feature, "rename_feature");
  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_mnemonic (_("pack"));
  gtk_widget_set_name (pack_feature, "pack_feature");
  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_mnemonic (_("unpack"));
  gtk_widget_set_name (unpack_feature, "unpack_feature");
  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_mnemonic (_("delete"));
  gtk_widget_set_name (delete_feature, "delete_feature");
  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_widget_set_name (toolbar, "toolbar");
  gtk_widget_show (toolbar);
  gtk_box_pack_start (GTK_BOX (vbox7), toolbar, FALSE, FALSE, 0);
  gtk_toolbar_set_style (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_BOTH);
  tmp_toolbar_icon_size = gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar));

  tool_edit = (GtkWidget*) gtk_radio_tool_button_new (NULL);
  gtk_tool_button_set_label (GTK_TOOL_BUTTON (tool_edit), _("edit"));
  tmp_image = create_pixmap (window_main, "cursor_left.xpm");
  gtk_widget_show (tmp_image);
  gtk_tool_button_set_icon_widget (GTK_TOOL_BUTTON (tool_edit), tmp_image);
  gtk_widget_set_name (tool_edit, "tool_edit");
  gtk_widget_show (tool_edit);
  gtk_container_add (GTK_CONTAINER (toolbar), tool_edit);
  gtk_container_set_border_width (GTK_CONTAINER (tool_edit), 2);
  gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (tool_edit), tooltips, _("move single point"), NULL);
  gtk_radio_tool_button_set_group (GTK_RADIO_TOOL_BUTTON (tool_edit), tool_edit_group);
  tool_edit_group = gtk_radio_tool_button_get_group (GTK_RADIO_TOOL_BUTTON (tool_edit));
  gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (tool_edit), TRUE);

  tool_move = (GtkWidget*) gtk_radio_tool_button_new (NULL);
  gtk_tool_button_set_label (GTK_TOOL_BUTTON (tool_move), _("move"));
  tmp_image = create_pixmap (window_main, "hand01.xpm");
  gtk_widget_show (tmp_image);
  gtk_tool_button_set_icon_widget (GTK_TOOL_BUTTON (tool_move), tmp_image);
  gtk_widget_set_name (tool_move, "tool_move");
  gtk_widget_show (tool_move);
  gtk_container_add (GTK_CONTAINER (toolbar), tool_move);
  gtk_container_set_border_width (GTK_CONTAINER (tool_move), 2);
  gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (tool_move), tooltips, _("move whole feature"), NULL);
  gtk_radio_tool_button_set_group (GTK_RADIO_TOOL_BUTTON (tool_move), tool_edit_group);
  tool_edit_group = gtk_radio_tool_button_get_group (GTK_RADIO_TOOL_BUTTON (tool_move));

  tool_stretch = (GtkWidget*) gtk_radio_tool_button_new (NULL);
  gtk_tool_button_set_label (GTK_TOOL_BUTTON (tool_stretch), _("stretch"));
  tmp_image = create_pixmap (window_main, "transform.xpm");
  gtk_widget_show (tmp_image);
  gtk_tool_button_set_icon_widget (GTK_TOOL_BUTTON (tool_stretch), tmp_image);
  gtk_widget_set_name (tool_stretch, "tool_stretch");
  gtk_widget_show (tool_stretch);
  gtk_container_add (GTK_CONTAINER (toolbar), tool_stretch);
  gtk_container_set_border_width (GTK_CONTAINER (tool_stretch), 2);
  gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (tool_stretch), tooltips, _("stretch whole feature"), NULL);
  gtk_radio_tool_button_set_group (GTK_RADIO_TOOL_BUTTON (tool_stretch), tool_edit_group);
  tool_edit_group = gtk_radio_tool_button_get_group (GTK_RADIO_TOOL_BUTTON (tool_stretch));

  toolitem1 = (GtkWidget*) gtk_tool_item_new ();
  gtk_widget_set_name (toolitem1, "toolitem1");
  gtk_widget_show (toolitem1);
  gtk_container_add (GTK_CONTAINER (toolbar), toolitem1);

  label20 = gtk_label_new (_("-"));
  gtk_widget_set_name (label20, "label20");
  gtk_widget_show (label20);
  gtk_container_add (GTK_CONTAINER (toolitem1), label20);
  gtk_label_set_justify (GTK_LABEL (label20), GTK_JUSTIFY_CENTER);

  tool_select = (GtkWidget*) gtk_radio_tool_button_new (NULL);
  gtk_tool_button_set_label (GTK_TOOL_BUTTON (tool_select), _("select"));
  tmp_image = create_pixmap (window_main, "pencil_y.xpm");
  gtk_widget_show (tmp_image);
  gtk_tool_button_set_icon_widget (GTK_TOOL_BUTTON (tool_select), tmp_image);
  gtk_widget_set_name (tool_select, "tool_select");
  gtk_widget_show (tool_select);
  gtk_container_add (GTK_CONTAINER (toolbar), tool_select);
  gtk_container_set_border_width (GTK_CONTAINER (tool_select), 2);
  gtk_radio_tool_button_set_group (GTK_RADIO_TOOL_BUTTON (tool_select), tool_edit_group);
  tool_edit_group = gtk_radio_tool_button_get_group (GTK_RADIO_TOOL_BUTTON (tool_select));

  tool_unselect = (GtkWidget*) gtk_radio_tool_button_new (NULL);
  gtk_tool_button_set_label (GTK_TOOL_BUTTON (tool_unselect), _("unselect"));
  tmp_image = create_pixmap (window_main, "eraser.xpm");
  gtk_widget_show (tmp_image);
  gtk_tool_button_set_icon_widget (GTK_TOOL_BUTTON (tool_unselect), tmp_image);
  gtk_widget_set_name (tool_unselect, "tool_unselect");
  gtk_widget_show (tool_unselect);
  gtk_container_add (GTK_CONTAINER (toolbar), tool_unselect);
  gtk_container_set_border_width (GTK_CONTAINER (tool_unselect), 2);
  gtk_radio_tool_button_set_group (GTK_RADIO_TOOL_BUTTON (tool_unselect), tool_edit_group);
  tool_edit_group = gtk_radio_tool_button_get_group (GTK_RADIO_TOOL_BUTTON (tool_unselect));

  tool_assign = (GtkWidget*) gtk_radio_tool_button_new (NULL);
  gtk_tool_button_set_label (GTK_TOOL_BUTTON (tool_assign), _("assign"));
  tmp_image = create_pixmap (window_main, "pencil.xpm");
  gtk_widget_show (tmp_image);
  gtk_tool_button_set_icon_widget (GTK_TOOL_BUTTON (tool_assign), tmp_image);
  gtk_widget_set_name (tool_assign, "tool_assign");
  gtk_widget_show (tool_assign);
  gtk_container_add (GTK_CONTAINER (toolbar), tool_assign);
  gtk_container_set_border_width (GTK_CONTAINER (tool_assign), 2);
  gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (tool_assign), tooltips, _("assign point to feature"), NULL);
  gtk_radio_tool_button_set_group (GTK_RADIO_TOOL_BUTTON (tool_assign), tool_edit_group);
  tool_edit_group = gtk_radio_tool_button_get_group (GTK_RADIO_TOOL_BUTTON (tool_assign));

  scrolledwindow_image = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_set_name (scrolledwindow_image, "scrolledwindow_image");
  gtk_widget_show (scrolledwindow_image);
  gtk_box_pack_start (GTK_BOX (vbox3), scrolledwindow_image, TRUE, TRUE, 0);
  GTK_WIDGET_UNSET_FLAGS (scrolledwindow_image, GTK_CAN_FOCUS);
  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_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 (NULL);
  gtk_widget_set_name (image_frame, "image_frame");
  gtk_widget_show (image_frame);
  gtk_container_add (GTK_CONTAINER (viewport4), image_frame);

  drawingarea = gtk_drawing_area_new ();
  gtk_widget_set_name (drawingarea, "drawingarea");
  gtk_widget_show (drawingarea);
  gtk_container_add (GTK_CONTAINER (image_frame), drawingarea);
  gtk_widget_set_events (drawingarea, GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);

  label21 = gtk_label_new (_("error"));
  gtk_widget_set_name (label21, "label21");
  gtk_widget_show (label21);
  gtk_frame_set_label_widget (GTK_FRAME (image_frame), label21);

  handlebox_res_size = gtk_handle_box_new ();
  gtk_widget_set_name (handlebox_res_size, "handlebox_res_size");
  gtk_widget_show (handlebox_res_size);
  gtk_box_pack_start (GTK_BOX (vbox3), handlebox_res_size, FALSE, FALSE, 0);

  frame3 = gtk_frame_new (NULL);
  gtk_widget_set_name (frame3, "frame3");
  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);

  hbox4 = gtk_hbox_new (TRUE, 0);
  gtk_widget_set_name (hbox4, "hbox4");
  gtk_widget_show (hbox4);
  gtk_container_add (GTK_CONTAINER (frame3), hbox4);

  label16 = gtk_label_new (_("width"));
  gtk_widget_set_name (label16, "label16");
  gtk_widget_show (label16);
  gtk_box_pack_start (GTK_BOX (hbox4), label16, TRUE, TRUE, 0);
  gtk_label_set_justify (GTK_LABEL (label16), GTK_JUSTIFY_CENTER);
  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_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);

  label17 = gtk_label_new (_("height"));
  gtk_widget_set_name (label17, "label17");
  gtk_widget_show (label17);
  gtk_box_pack_start (GTK_BOX (hbox4), label17, FALSE, TRUE, 0);
  gtk_label_set_justify (GTK_LABEL (label17), GTK_JUSTIFY_CENTER);
  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_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);

  double_size = gtk_button_new_with_mnemonic (_("x2"));
  gtk_widget_set_name (double_size, "double_size");
  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_mnemonic (_("/2"));
  gtk_widget_set_name (halve_size, "halve_size");
  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_mnemonic (_("apply"));
  gtk_widget_set_name (resulting_apply, "resulting_apply");
  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);

  label22 = gtk_label_new (_("resulting image size"));
  gtk_widget_set_name (label22, "label22");
  gtk_widget_show (label22);
  gtk_frame_set_label_widget (GTK_FRAME (frame3), label22);

  main_info_label = gtk_label_new (_("welcome"));
  gtk_widget_set_name (main_info_label, "main_info_label");
  gtk_widget_show (main_info_label);
  gtk_box_pack_start (GTK_BOX (vbox1), main_info_label, FALSE, TRUE, 0);
  gtk_label_set_line_wrap (GTK_LABEL (main_info_label), TRUE);
  gtk_misc_set_alignment (GTK_MISC (main_info_label), 0, 0);
  gtk_misc_set_padding (GTK_MISC (main_info_label), 1, 1);

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

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (window_main, window_main, "window_main");
  GLADE_HOOKUP_OBJECT (window_main, vbox1, "vbox1");
  GLADE_HOOKUP_OBJECT (window_main, menubar1, "menubar1");
  GLADE_HOOKUP_OBJECT (window_main, file, "file");
  GLADE_HOOKUP_OBJECT (window_main, file_menu, "file_menu");
  GLADE_HOOKUP_OBJECT (window_main, load_session, "load_session");
  GLADE_HOOKUP_OBJECT (window_main, save_session, "save_session");
  GLADE_HOOKUP_OBJECT (window_main, separatore4, "separatore4");
  GLADE_HOOKUP_OBJECT (window_main, add_an_image, "add_an_image");
  GLADE_HOOKUP_OBJECT (window_main, add_a_difference, "add_a_difference");
  GLADE_HOOKUP_OBJECT (window_main, separatore9, "separatore9");
  GLADE_HOOKUP_OBJECT (window_main, quit1, "quit1");
  GLADE_HOOKUP_OBJECT (window_main, edit, "edit");
  GLADE_HOOKUP_OBJECT (window_main, edit_menu, "edit_menu");
  GLADE_HOOKUP_OBJECT (window_main, view_images1, "view_images1");
  GLADE_HOOKUP_OBJECT (window_main, show_mag, "show_mag");
  GLADE_HOOKUP_OBJECT (window_main, separator4, "separator4");
  GLADE_HOOKUP_OBJECT (window_main, resulting_image_size, "resulting_image_size");
  GLADE_HOOKUP_OBJECT (window_main, show_morph_factors, "show_morph_factors");
  GLADE_HOOKUP_OBJECT (window_main, settings_menu, "settings_menu");
  GLADE_HOOKUP_OBJECT (window_main, morph, "morph");
  GLADE_HOOKUP_OBJECT (window_main, morph_menu, "morph_menu");
  GLADE_HOOKUP_OBJECT (window_main, interpolate_meshes1, "interpolate_meshes1");
  GLADE_HOOKUP_OBJECT (window_main, morph_images1, "morph_images1");
  GLADE_HOOKUP_OBJECT (window_main, separatore1, "separatore1");
  GLADE_HOOKUP_OBJECT (window_main, adjust_all_meshes, "adjust_all_meshes");
  GLADE_HOOKUP_OBJECT (window_main, wavelet_equalize, "wavelet_equalize");
  GLADE_HOOKUP_OBJECT (window_main, separator13, "separator13");
  GLADE_HOOKUP_OBJECT (window_main, restore_morph_factors1, "restore_morph_factors1");
  GLADE_HOOKUP_OBJECT (window_main, restore_morph_factors1_menu, "restore_morph_factors1_menu");
  GLADE_HOOKUP_OBJECT (window_main, startr, "startr");
  GLADE_HOOKUP_OBJECT (window_main, endr, "endr");
  GLADE_HOOKUP_OBJECT (window_main, equal, "equal");
  GLADE_HOOKUP_OBJECT (window_main, store_morph_factors, "store_morph_factors");
  GLADE_HOOKUP_OBJECT (window_main, store_morph_factors_menu, "store_morph_factors_menu");
  GLADE_HOOKUP_OBJECT (window_main, starts, "starts");
  GLADE_HOOKUP_OBJECT (window_main, ende, "ende");
  GLADE_HOOKUP_OBJECT (window_main, morph_sequence1, "morph_sequence1");
  GLADE_HOOKUP_OBJECT (window_main, separator3, "separator3");
  GLADE_HOOKUP_OBJECT (window_main, help, "help");
  GLADE_HOOKUP_OBJECT (window_main, help_menu, "help_menu");
  GLADE_HOOKUP_OBJECT (window_main, guide, "guide");
  GLADE_HOOKUP_OBJECT (window_main, load_example_session, "load_example_session");
  GLADE_HOOKUP_OBJECT (window_main, separator2, "separator2");
  GLADE_HOOKUP_OBJECT (window_main, help_sub, "help_sub");
  GLADE_HOOKUP_OBJECT (window_main, help_sub_menu, "help_sub_menu");
  GLADE_HOOKUP_OBJECT (window_main, generic_help, "generic_help");
  GLADE_HOOKUP_OBJECT (window_main, warp_help, "warp_help");
  GLADE_HOOKUP_OBJECT (window_main, mesh_tips, "mesh_tips");
  GLADE_HOOKUP_OBJECT (window_main, morph_help1, "morph_help1");
  GLADE_HOOKUP_OBJECT (window_main, feature_help, "feature_help");
  GLADE_HOOKUP_OBJECT (window_main, separator11, "separator11");
  GLADE_HOOKUP_OBJECT (window_main, why_the_beep_1, "why_the_beep_1");
  GLADE_HOOKUP_OBJECT (window_main, vbox3, "vbox3");
  GLADE_HOOKUP_OBJECT (window_main, hbox3, "hbox3");
  GLADE_HOOKUP_OBJECT (window_main, load_image, "load_image");
  GLADE_HOOKUP_OBJECT (window_main, load_mesh, "load_mesh");
  GLADE_HOOKUP_OBJECT (window_main, save_mesh, "save_mesh");
  GLADE_HOOKUP_OBJECT (window_main, optionmenu_editview, "optionmenu_editview");
  GLADE_HOOKUP_OBJECT (window_main, convertwidget1, "convertwidget1");
  GLADE_HOOKUP_OBJECT (window_main, convertwidget2, "convertwidget2");
  GLADE_HOOKUP_OBJECT (window_main, convertwidget3, "convertwidget3");
  GLADE_HOOKUP_OBJECT (window_main, convertwidget4, "convertwidget4");
  GLADE_HOOKUP_OBJECT (window_main, convertwidget5, "convertwidget5");
  GLADE_HOOKUP_OBJECT (window_main, settings_button, "settings_button");
  GLADE_HOOKUP_OBJECT (window_main, button_interp_meshes, "button_interp_meshes");
  GLADE_HOOKUP_OBJECT (window_main, do_mixing, "do_mixing");
  GLADE_HOOKUP_OBJECT (window_main, button_do_morph, "button_do_morph");
  GLADE_HOOKUP_OBJECT (window_main, save_image, "save_image");
  GLADE_HOOKUP_OBJECT (window_main, back_to_guide, "back_to_guide");
  GLADE_HOOKUP_OBJECT (window_main, handlebox_tools, "handlebox_tools");
  GLADE_HOOKUP_OBJECT (window_main, vbox7, "vbox7");
  GLADE_HOOKUP_OBJECT (window_main, hbox_feature, "hbox_feature");
  GLADE_HOOKUP_OBJECT (window_main, color_feature, "color_feature");
  GLADE_HOOKUP_OBJECT (window_main, drawingarea_color, "drawingarea_color");
  GLADE_HOOKUP_OBJECT (window_main, combo_feature, "combo_feature");
  GLADE_HOOKUP_OBJECT (window_main, combo_entry_feature, "combo_entry_feature");
  GLADE_HOOKUP_OBJECT (window_main, new_feature, "new_feature");
  GLADE_HOOKUP_OBJECT (window_main, rename_feature, "rename_feature");
  GLADE_HOOKUP_OBJECT (window_main, pack_feature, "pack_feature");
  GLADE_HOOKUP_OBJECT (window_main, unpack_feature, "unpack_feature");
  GLADE_HOOKUP_OBJECT (window_main, delete_feature, "delete_feature");
  GLADE_HOOKUP_OBJECT (window_main, toolbar, "toolbar");
  GLADE_HOOKUP_OBJECT (window_main, tool_edit, "tool_edit");
  GLADE_HOOKUP_OBJECT (window_main, tool_move, "tool_move");
  GLADE_HOOKUP_OBJECT (window_main, tool_stretch, "tool_stretch");
  GLADE_HOOKUP_OBJECT (window_main, toolitem1, "toolitem1");
  GLADE_HOOKUP_OBJECT (window_main, label20, "label20");
  GLADE_HOOKUP_OBJECT (window_main, tool_select, "tool_select");
  GLADE_HOOKUP_OBJECT (window_main, tool_unselect, "tool_unselect");
  GLADE_HOOKUP_OBJECT (window_main, tool_assign, "tool_assign");
  GLADE_HOOKUP_OBJECT (window_main, scrolledwindow_image, "scrolledwindow_image");
  GLADE_HOOKUP_OBJECT (window_main, viewport4, "viewport4");
  GLADE_HOOKUP_OBJECT (window_main, image_frame, "image_frame");
  GLADE_HOOKUP_OBJECT (window_main, drawingarea, "drawingarea");
  GLADE_HOOKUP_OBJECT (window_main, label21, "label21");
  GLADE_HOOKUP_OBJECT (window_main, handlebox_res_size, "handlebox_res_size");
  GLADE_HOOKUP_OBJECT (window_main, frame3, "frame3");
  GLADE_HOOKUP_OBJECT (window_main, hbox4, "hbox4");
  GLADE_HOOKUP_OBJECT (window_main, label16, "label16");
  GLADE_HOOKUP_OBJECT (window_main, spinbutton_reswidth, "spinbutton_reswidth");
  GLADE_HOOKUP_OBJECT (window_main, label17, "label17");
  GLADE_HOOKUP_OBJECT (window_main, spinbutton_resheight, "spinbutton_resheight");
  GLADE_HOOKUP_OBJECT (window_main, double_size, "double_size");
  GLADE_HOOKUP_OBJECT (window_main, halve_size, "halve_size");
  GLADE_HOOKUP_OBJECT (window_main, resulting_apply, "resulting_apply");
  GLADE_HOOKUP_OBJECT (window_main, label22, "label22");
  GLADE_HOOKUP_OBJECT (window_main, main_info_label, "main_info_label");
  GLADE_HOOKUP_OBJECT_NO_REF (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_container_set_border_width (GTK_CONTAINER (imageselection1), 10);
  gtk_window_set_type_hint (GTK_WINDOW (imageselection1), GDK_WINDOW_TYPE_HINT_DIALOG);

  ok_button1 = GTK_FILE_SELECTION (imageselection1)->ok_button;
  gtk_widget_set_name (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_widget_show (cancel_button1);
  GTK_WIDGET_SET_FLAGS (cancel_button1, GTK_CAN_DEFAULT);

  g_signal_connect ((gpointer) imageselection1, "destroy_event",
                    G_CALLBACK (on_imageselection1_destroy_event),
                    NULL);
  g_signal_connect ((gpointer) imageselection1, "delete_event",
                    G_CALLBACK (on_imageselection1_destroy_event),
                    NULL);
  g_signal_connect ((gpointer) ok_button1, "realize",
                    G_CALLBACK (on_ok_button1_realize),
                    NULL);
  g_signal_connect ((gpointer) ok_button1, "clicked",
                    G_CALLBACK (on_ok_button1_clicked),
                    NULL);
  g_signal_connect_swapped ((gpointer) cancel_button1, "clicked",
                            G_CALLBACK (gtk_widget_destroy),
                            GTK_OBJECT (imageselection1));

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (imageselection1, imageselection1, "imageselection1");
  GLADE_HOOKUP_OBJECT_NO_REF (imageselection1, ok_button1, "ok_button1");
  GLADE_HOOKUP_OBJECT_NO_REF (imageselection1, cancel_button1, "cancel_button1");
  GLADE_HOOKUP_OBJECT_NO_REF (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 *save_diff;
  GtkWidget *optionmenu_editview;
  GtkWidget *convertwidget11;
  GtkWidget *convertwidget12;
  GtkWidget *convertwidget13;
  GtkWidget *convertwidget14;
  GtkWidget *convertwidget15;
  GtkWidget *settings_button;
  GtkWidget *do_warp;
  GtkWidget *save_image;
  GtkWidget *back_to_guide;
  GtkWidget *scrolledwindow_image;
  GtkWidget *viewport3;
  GtkWidget *image_frame;
  GtkWidget *drawingarea;
  GtkWidget *label23;
  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 *label24;
  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;
  GtkWidget *label25;
  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_window_set_title (GTK_WINDOW (image_win_1), _("error!"));

  vbox2 = gtk_vbox_new (FALSE, 0);
  gtk_widget_set_name (vbox2, "vbox2");
  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_show (hbox1);
  gtk_box_pack_start (GTK_BOX (vbox2), hbox1, FALSE, FALSE, 0);

  load_image = gtk_button_new_with_mnemonic (_("load\nimage"));
  gtk_widget_set_name (load_image, "load_image");
  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_mnemonic (_("load\nmesh"));
  gtk_widget_set_name (load_mesh, "load_mesh");
  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_mnemonic (_("save\nmesh"));
  gtk_widget_set_name (save_mesh, "save_mesh");
  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);

  save_diff = gtk_button_new_with_mnemonic (_("save\ndiff"));
  gtk_widget_set_name (save_diff, "save_diff");
  gtk_widget_show (save_diff);
  gtk_box_pack_start (GTK_BOX (hbox1), save_diff, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (save_diff), 4);
  gtk_tooltips_set_tip (tooltips, save_diff, _("save difference from this mesh to other mesh"), NULL);

  optionmenu_editview = gtk_option_menu_new ();
  gtk_widget_set_name (optionmenu_editview, "optionmenu_editview");
  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);

  convertwidget11 = gtk_menu_new ();
  gtk_widget_set_name (convertwidget11, "convertwidget11");

  convertwidget12 = gtk_menu_item_new_with_mnemonic (_("edit mesh"));
  gtk_widget_set_name (convertwidget12, "convertwidget12");
  gtk_widget_show (convertwidget12);
  gtk_container_add (GTK_CONTAINER (convertwidget11), convertwidget12);

  convertwidget13 = gtk_menu_item_new_with_mnemonic (_("view warp"));
  gtk_widget_set_name (convertwidget13, "convertwidget13");
  gtk_widget_show (convertwidget13);
  gtk_container_add (GTK_CONTAINER (convertwidget11), convertwidget13);

  convertwidget14 = gtk_menu_item_new_with_mnemonic (_("v. warp&meshes"));
  gtk_widget_set_name (convertwidget14, "convertwidget14");
  gtk_widget_show (convertwidget14);
  gtk_container_add (GTK_CONTAINER (convertwidget11), convertwidget14);

  convertwidget15 = gtk_menu_item_new_with_mnemonic (_("choose subimage"));
  gtk_widget_set_name (convertwidget15, "convertwidget15");
  gtk_widget_show (convertwidget15);
  gtk_container_add (GTK_CONTAINER (convertwidget11), convertwidget15);

  gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu_editview), convertwidget11);

  settings_button = gtk_button_new_with_mnemonic (_("settings"));
  gtk_widget_set_name (settings_button, "settings_button");
  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_mnemonic (_("do\nwarp"));
  gtk_widget_set_name (do_warp, "do_warp");
  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_mnemonic (_("save\nimage"));
  gtk_widget_set_name (save_image, "save_image");
  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_mnemonic (_("guide"));
  gtk_widget_set_name (back_to_guide, "back_to_guide");
  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_show (scrolledwindow_image);
  gtk_box_pack_start (GTK_BOX (vbox2), scrolledwindow_image, TRUE, TRUE, 0);
  GTK_WIDGET_UNSET_FLAGS (scrolledwindow_image, GTK_CAN_FOCUS);
  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_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 (NULL);
  gtk_widget_set_name (image_frame, "image_frame");
  gtk_widget_show (image_frame);
  gtk_container_add (GTK_CONTAINER (viewport3), image_frame);

  drawingarea = gtk_drawing_area_new ();
  gtk_widget_set_name (drawingarea, "drawingarea");
  gtk_widget_show (drawingarea);
  gtk_container_add (GTK_CONTAINER (image_frame), drawingarea);
  GTK_WIDGET_SET_FLAGS (drawingarea, GTK_CAN_FOCUS);
  GTK_WIDGET_SET_FLAGS (drawingarea, GTK_CAN_DEFAULT);
  gtk_widget_set_events (drawingarea, GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON2_MOTION_MASK | GDK_BUTTON3_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);

  label23 = gtk_label_new (_("error"));
  gtk_widget_set_name (label23, "label23");
  gtk_widget_show (label23);
  gtk_frame_set_label_widget (GTK_FRAME (image_frame), label23);

  handlebox_factors = gtk_handle_box_new ();
  gtk_widget_set_name (handlebox_factors, "handlebox_factors");
  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 (NULL);
  gtk_widget_set_name (frame5, "frame5");
  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_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_show (label6);
  gtk_table_attach (GTK_TABLE (table2), label6, 0, 1, 1, 2,
                    (GtkAttachOptions) (0),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_justify (GTK_LABEL (label6), GTK_JUSTIFY_CENTER);

  label7 = gtk_label_new (_("mesh\ninterp."));
  gtk_widget_set_name (label7, "label7");
  gtk_widget_show (label7);
  gtk_table_attach (GTK_TABLE (table2), label7, 0, 1, 0, 1,
                    (GtkAttachOptions) (0),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_justify (GTK_LABEL (label7), GTK_JUSTIFY_CENTER);

  hscale_mesh = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (40, -100, 200, 1, 10, 10)));
  gtk_widget_set_name (hscale_mesh, "hscale_mesh");
  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_WIDGET_UNSET_FLAGS (hscale_mesh, GTK_CAN_FOCUS);
  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_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_WIDGET_UNSET_FLAGS (hscale_image, GTK_CAN_FOCUS);
  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_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_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);

  label24 = gtk_label_new (_("coefficients"));
  gtk_widget_set_name (label24, "label24");
  gtk_widget_show (label24);
  gtk_frame_set_label_widget (GTK_FRAME (frame5), label24);

  handleboxsubimage = gtk_handle_box_new ();
  gtk_widget_set_name (handleboxsubimage, "handleboxsubimage");
  gtk_widget_show (handleboxsubimage);
  gtk_box_pack_start (GTK_BOX (vbox2), handleboxsubimage, FALSE, FALSE, 0);

  frame1 = gtk_frame_new (NULL);
  gtk_widget_set_name (frame1, "frame1");
  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_show (hbox2);
  gtk_container_add (GTK_CONTAINER (frame1), hbox2);

  eyessubimage = gtk_button_new_with_mnemonic (_("reset"));
  gtk_widget_set_name (eyessubimage, "eyessubimage");
  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_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_show (label8);
  gtk_container_add (GTK_CONTAINER (eventbox1), label8);
  gtk_label_set_justify (GTK_LABEL (label8), GTK_JUSTIFY_CENTER);
  gtk_misc_set_alignment (GTK_MISC (label8), 0.75, 0.5);

  spinbuttonx_adj = gtk_adjustment_new (0, -4000, 4000, 1, 10, 10);
  spinbuttonx = gtk_spin_button_new (GTK_ADJUSTMENT (spinbuttonx_adj), 1, 0);
  gtk_widget_set_name (spinbuttonx, "spinbuttonx");
  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);
  gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (spinbuttonx), GTK_UPDATE_IF_VALID);

  eventbox2 = gtk_event_box_new ();
  gtk_widget_set_name (eventbox2, "eventbox2");
  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_show (label9);
  gtk_container_add (GTK_CONTAINER (eventbox2), label9);
  gtk_label_set_justify (GTK_LABEL (label9), GTK_JUSTIFY_CENTER);
  gtk_misc_set_alignment (GTK_MISC (label9), 0.75, 0.5);

  spinbuttony_adj = gtk_adjustment_new (0, -4000, 4000, 1, 10, 10);
  spinbuttony = gtk_spin_button_new (GTK_ADJUSTMENT (spinbuttony_adj), 1, 0);
  gtk_widget_set_name (spinbuttony, "spinbuttony");
  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);
  gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (spinbuttony), GTK_UPDATE_IF_VALID);

  label10 = gtk_label_new (_("width"));
  gtk_widget_set_name (label10, "label10");
  gtk_widget_show (label10);
  gtk_box_pack_start (GTK_BOX (hbox2), label10, TRUE, FALSE, 0);
  gtk_label_set_justify (GTK_LABEL (label10), GTK_JUSTIFY_CENTER);

  spinbuttonw_adj = gtk_adjustment_new (420, 8, 8000, 1, 100, 100);
  spinbuttonw = gtk_spin_button_new (GTK_ADJUSTMENT (spinbuttonw_adj), 1, 0);
  gtk_widget_set_name (spinbuttonw, "spinbuttonw");
  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);
  gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (spinbuttonw), GTK_UPDATE_IF_VALID);

  label11 = gtk_label_new (_("height"));
  gtk_widget_set_name (label11, "label11");
  gtk_widget_show (label11);
  gtk_box_pack_start (GTK_BOX (hbox2), label11, TRUE, FALSE, 0);
  gtk_label_set_justify (GTK_LABEL (label11), GTK_JUSTIFY_CENTER);

  spinbuttonh_adj = gtk_adjustment_new (300, 8, 8000, 1, 100, 100);
  spinbuttonh = gtk_spin_button_new (GTK_ADJUSTMENT (spinbuttonh_adj), 1, 0);
  gtk_widget_set_name (spinbuttonh, "spinbuttonh");
  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);
  gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (spinbuttonh), GTK_UPDATE_IF_VALID);

  subimage_apply = gtk_button_new_with_mnemonic (_("apply"));
  gtk_widget_set_name (subimage_apply, "subimage_apply");
  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);

  label25 = gtk_label_new (_("subimage position"));
  gtk_widget_set_name (label25, "label25");
  gtk_widget_show (label25);
  gtk_frame_set_label_widget (GTK_FRAME (frame1), label25);

  g_signal_connect ((gpointer) image_win_1, "delete_event",
                    G_CALLBACK (on_image_win_1_delete_event),
                    NULL);
  g_signal_connect ((gpointer) load_image, "clicked",
                    G_CALLBACK (on_loadimage_clicked),
                    NULL);
  g_signal_connect ((gpointer) load_mesh, "clicked",
                    G_CALLBACK (on_loadmesh_clicked),
                    NULL);
  g_signal_connect ((gpointer) save_mesh, "clicked",
                    G_CALLBACK (on_savemesh_clicked),
                    NULL);
  g_signal_connect ((gpointer) save_diff, "clicked",
                    G_CALLBACK (on_save_diff_clicked),
                    NULL);
  g_signal_connect ((gpointer) settings_button, "clicked",
                    G_CALLBACK (on_settings_clicked),
                    NULL);
  g_signal_connect ((gpointer) do_warp, "clicked",
                    G_CALLBACK (on_do_warp_clicked),
                    NULL);
  g_signal_connect ((gpointer) save_image, "clicked",
                    G_CALLBACK (on_save_image_clicked),
                    NULL);
  g_signal_connect ((gpointer) back_to_guide, "clicked",
                    G_CALLBACK (on_back_to_guide_activate),
                    NULL);
  g_signal_connect ((gpointer) drawingarea, "motion_notify_event",
                    G_CALLBACK (on_motion_notify_event),
                    NULL);
  g_signal_connect ((gpointer) drawingarea, "button_press_event",
                    G_CALLBACK (on_button_press_event),
                    NULL);
  g_signal_connect ((gpointer) drawingarea, "expose_event",
                    G_CALLBACK (on_expose_event),
                    NULL);
  g_signal_connect ((gpointer) drawingarea, "realize",
                    G_CALLBACK (on_drawingarea_realize),
                    NULL);
  g_signal_connect ((gpointer) drawingarea, "button_release_event",
                    G_CALLBACK (on_drawingarea_button_release_event),
                    NULL);
  g_signal_connect ((gpointer) drawingarea, "key_press_event",
                    G_CALLBACK (on_drawingarea_key_press_event),
                    NULL);
  g_signal_connect_after ((gpointer) handlebox_factors, "show",
                          G_CALLBACK (on_handlebox_factors_show),
                          NULL);
  g_signal_connect ((gpointer) hscale_mesh, "value_changed",
                    G_CALLBACK (on_hscale_mesh_changed),
                    NULL);
  g_signal_connect ((gpointer) hscale_image, "value_changed",
                    G_CALLBACK (on_hscale_image_changed),
                    NULL);
  g_signal_connect ((gpointer) spinbutton_image, "value_changed",
                    G_CALLBACK (on_spinbutton_image_changed),
                    NULL);
  g_signal_connect ((gpointer) spinbutton_mesh, "value_changed",
                    G_CALLBACK (on_spinbutton_mesh_changed),
                    NULL);
  g_signal_connect_after ((gpointer) handleboxsubimage, "show",
                          G_CALLBACK (on_handleboxsubimage_show),
                          NULL);
  g_signal_connect ((gpointer) eyessubimage, "clicked",
                    G_CALLBACK (on_reset_subimage_clicked),
                    NULL);
  g_signal_connect ((gpointer) spinbuttonx, "value_changed",
                    G_CALLBACK (on_spinbuttonx_changed),
                    NULL);
  g_signal_connect ((gpointer) spinbuttony, "value_changed",
                    G_CALLBACK (on_spinbuttony_changed),
                    NULL);
  g_signal_connect ((gpointer) spinbuttonw, "value_changed",
                    G_CALLBACK (on_spinbuttonw_changed),
                    NULL);
  g_signal_connect ((gpointer) spinbuttonh, "value_changed",
                    G_CALLBACK (on_spinbuttonh_changed),
                    NULL);
  g_signal_connect ((gpointer) subimage_apply, "clicked",
                    G_CALLBACK (on_subimage_apply_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (image_win_1, image_win_1, "image_win_1");
  GLADE_HOOKUP_OBJECT (image_win_1, vbox2, "vbox2");
  GLADE_HOOKUP_OBJECT (image_win_1, hbox1, "hbox1");
  GLADE_HOOKUP_OBJECT (image_win_1, load_image, "load_image");
  GLADE_HOOKUP_OBJECT (image_win_1, load_mesh, "load_mesh");
  GLADE_HOOKUP_OBJECT (image_win_1, save_mesh, "save_mesh");
  GLADE_HOOKUP_OBJECT (image_win_1, save_diff, "save_diff");
  GLADE_HOOKUP_OBJECT (image_win_1, optionmenu_editview, "optionmenu_editview");
  GLADE_HOOKUP_OBJECT (image_win_1, convertwidget11, "convertwidget11");
  GLADE_HOOKUP_OBJECT (image_win_1, convertwidget12, "convertwidget12");
  GLADE_HOOKUP_OBJECT (image_win_1, convertwidget13, "convertwidget13");
  GLADE_HOOKUP_OBJECT (image_win_1, convertwidget14, "convertwidget14");
  GLADE_HOOKUP_OBJECT (image_win_1, convertwidget15, "convertwidget15");
  GLADE_HOOKUP_OBJECT (image_win_1, settings_button, "settings_button");
  GLADE_HOOKUP_OBJECT (image_win_1, do_warp, "do_warp");
  GLADE_HOOKUP_OBJECT (image_win_1, save_image, "save_image");
  GLADE_HOOKUP_OBJECT (image_win_1, back_to_guide, "back_to_guide");
  GLADE_HOOKUP_OBJECT (image_win_1, scrolledwindow_image, "scrolledwindow_image");
  GLADE_HOOKUP_OBJECT (image_win_1, viewport3, "viewport3");
  GLADE_HOOKUP_OBJECT (image_win_1, image_frame, "image_frame");
  GLADE_HOOKUP_OBJECT (image_win_1, drawingarea, "drawingarea");
  GLADE_HOOKUP_OBJECT (image_win_1, label23, "label23");
  GLADE_HOOKUP_OBJECT (image_win_1, handlebox_factors, "handlebox_factors");
  GLADE_HOOKUP_OBJECT (image_win_1, frame5, "frame5");
  GLADE_HOOKUP_OBJECT (image_win_1, table2, "table2");
  GLADE_HOOKUP_OBJECT (image_win_1, label6, "label6");
  GLADE_HOOKUP_OBJECT (image_win_1, label7, "label7");
  GLADE_HOOKUP_OBJECT (image_win_1, hscale_mesh, "hscale_mesh");
  GLADE_HOOKUP_OBJECT (image_win_1, hscale_image, "hscale_image");
  GLADE_HOOKUP_OBJECT (image_win_1, spinbutton_image, "spinbutton_image");
  GLADE_HOOKUP_OBJECT (image_win_1, spinbutton_mesh, "spinbutton_mesh");
  GLADE_HOOKUP_OBJECT (image_win_1, label24, "label24");
  GLADE_HOOKUP_OBJECT (image_win_1, handleboxsubimage, "handleboxsubimage");
  GLADE_HOOKUP_OBJECT (image_win_1, frame1, "frame1");
  GLADE_HOOKUP_OBJECT (image_win_1, hbox2, "hbox2");
  GLADE_HOOKUP_OBJECT (image_win_1, eyessubimage, "eyessubimage");
  GLADE_HOOKUP_OBJECT (image_win_1, eventbox1, "eventbox1");
  GLADE_HOOKUP_OBJECT (image_win_1, label8, "label8");
  GLADE_HOOKUP_OBJECT (image_win_1, spinbuttonx, "spinbuttonx");
  GLADE_HOOKUP_OBJECT (image_win_1, eventbox2, "eventbox2");
  GLADE_HOOKUP_OBJECT (image_win_1, label9, "label9");
  GLADE_HOOKUP_OBJECT (image_win_1, spinbuttony, "spinbuttony");
  GLADE_HOOKUP_OBJECT (image_win_1, label10, "label10");
  GLADE_HOOKUP_OBJECT (image_win_1, spinbuttonw, "spinbuttonw");
  GLADE_HOOKUP_OBJECT (image_win_1, label11, "label11");
  GLADE_HOOKUP_OBJECT (image_win_1, spinbuttonh, "spinbuttonh");
  GLADE_HOOKUP_OBJECT (image_win_1, subimage_apply, "subimage_apply");
  GLADE_HOOKUP_OBJECT (image_win_1, label25, "label25");
  GLADE_HOOKUP_OBJECT_NO_REF (image_win_1, tooltips, "tooltips");

  gtk_widget_grab_focus (drawingarea);
  gtk_widget_grab_default (drawingarea);
  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_window_set_title (GTK_WINDOW (dialogwarning), _("warning"));
  gtk_window_set_type_hint (GTK_WINDOW (dialogwarning), GDK_WINDOW_TYPE_HINT_DIALOG);

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

  labelwarning = gtk_label_new (_("warning!"));
  gtk_widget_set_name (labelwarning, "labelwarning");
  gtk_widget_show (labelwarning);
  gtk_box_pack_start (GTK_BOX (dialog_vbox1), labelwarning, TRUE, TRUE, 0);
  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_widget_show (dialog_action_area1);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);

  ok = gtk_button_new_with_mnemonic (_("ok"));
  gtk_widget_set_name (ok, "ok");
  gtk_widget_show (ok);
  gtk_dialog_add_action_widget (GTK_DIALOG (dialogwarning), ok, 0);
  gtk_container_set_border_width (GTK_CONTAINER (ok), 2);
  GTK_WIDGET_SET_FLAGS (ok, GTK_CAN_DEFAULT);

  g_signal_connect ((gpointer) dialogwarning, "delete_event",
                    G_CALLBACK (on_dialogwarning_delete_event),
                    NULL);
  g_signal_connect ((gpointer) labelwarning, "show",
                    G_CALLBACK (on_labelwarning_show),
                    NULL);
  g_signal_connect ((gpointer) labelwarning, "realize",
                    G_CALLBACK (on_labelwarning_realize),
                    NULL);
  g_signal_connect_swapped ((gpointer) ok, "clicked",
                            G_CALLBACK (gtk_widget_destroy),
                            GTK_OBJECT (dialogwarning));

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (dialogwarning, dialogwarning, "dialogwarning");
  GLADE_HOOKUP_OBJECT_NO_REF (dialogwarning, dialog_vbox1, "dialog_vbox1");
  GLADE_HOOKUP_OBJECT (dialogwarning, labelwarning, "labelwarning");
  GLADE_HOOKUP_OBJECT_NO_REF (dialogwarning, dialog_action_area1, "dialog_action_area1");
  GLADE_HOOKUP_OBJECT (dialogwarning, ok, "ok");

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

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

  window_warped = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_widget_set_name (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);

  warped_frame = gtk_frame_new (NULL);
  gtk_widget_set_name (warped_frame, "warped_frame");
  gtk_widget_show (warped_frame);
  gtk_container_add (GTK_CONTAINER (window_warped), warped_frame);
  gtk_frame_set_shadow_type (GTK_FRAME (warped_frame), GTK_SHADOW_NONE);

  alignment1 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_set_name (alignment1, "alignment1");
  gtk_widget_show (alignment1);
  gtk_container_add (GTK_CONTAINER (warped_frame), alignment1);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment1), 0, 0, 12, 0);

  scrolledwindow6 = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_set_name (scrolledwindow6, "scrolledwindow6");
  gtk_widget_show (scrolledwindow6);
  gtk_container_add (GTK_CONTAINER (alignment1), scrolledwindow6);
  GTK_WIDGET_UNSET_FLAGS (scrolledwindow6, GTK_CAN_FOCUS);
  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_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_show (drawingarea_warped);
  gtk_container_add (GTK_CONTAINER (viewport5), drawingarea_warped);

  label27 = gtk_label_new (_("<b>frame6</b>"));
  gtk_widget_set_name (label27, "label27");
  gtk_widget_show (label27);
  gtk_frame_set_label_widget (GTK_FRAME (warped_frame), label27);
  gtk_label_set_use_markup (GTK_LABEL (label27), TRUE);

  g_signal_connect ((gpointer) window_warped, "delete_event",
                    G_CALLBACK (on_window_warped_delete_event),
                    NULL);
  g_signal_connect ((gpointer) drawingarea_warped, "expose_event",
                    G_CALLBACK (on_drawingarea_warped_expose_event),
                    NULL);
  g_signal_connect ((gpointer) drawingarea_warped, "configure_event",
                    G_CALLBACK (on_drawingarea_warped_configure_event),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (window_warped, window_warped, "window_warped");
  GLADE_HOOKUP_OBJECT (window_warped, warped_frame, "warped_frame");
  GLADE_HOOKUP_OBJECT (window_warped, alignment1, "alignment1");
  GLADE_HOOKUP_OBJECT (window_warped, scrolledwindow6, "scrolledwindow6");
  GLADE_HOOKUP_OBJECT (window_warped, viewport5, "viewport5");
  GLADE_HOOKUP_OBJECT (window_warped, drawingarea_warped, "drawingarea_warped");
  GLADE_HOOKUP_OBJECT (window_warped, label27, "label27");

  return window_warped;
}

GtkWidget*
create_menuEditMesh (void)
{
  GtkWidget *menuEditMesh;
  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 *separator12;
  GtkWidget *smooth;
  GtkAccelGroup *accel_group;
  GtkTooltips *tooltips;

  tooltips = gtk_tooltips_new ();

  accel_group = gtk_accel_group_new ();

  menuEditMesh = gtk_menu_new ();
  gtk_widget_set_name (menuEditMesh, "menuEditMesh");

  unselect_point = gtk_menu_item_new_with_mnemonic (_("unselect point"));
  gtk_widget_set_name (unselect_point, "unselect_point");
  gtk_widget_show (unselect_point);
  gtk_container_add (GTK_CONTAINER (menuEditMesh), unselect_point);

  select_point = gtk_menu_item_new_with_mnemonic (_("select point"));
  gtk_widget_set_name (select_point, "select_point");
  gtk_widget_show (select_point);
  gtk_container_add (GTK_CONTAINER (menuEditMesh), select_point);

  assign_point = gtk_menu_item_new_with_mnemonic (_("assign point"));
  gtk_widget_set_name (assign_point, "assign_point");
  gtk_widget_show (assign_point);
  gtk_container_add (GTK_CONTAINER (menuEditMesh), assign_point);

  adjust = gtk_menu_item_new_with_mnemonic (_("adjust"));
  gtk_widget_set_name (adjust, "adjust");
  gtk_widget_show (adjust);
  gtk_container_add (GTK_CONTAINER (menuEditMesh), adjust);
  gtk_tooltips_set_tip (tooltips, adjust, _("adjust mesh point position w.r.t. previous image"), NULL);

  separator5 = gtk_separator_menu_item_new ();
  gtk_widget_set_name (separator5, "separator5");
  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_mnemonic (_("add horizontal line"));
  gtk_widget_set_name (add_horizontal_line, "add_horizontal_line");
  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, (GdkModifierType) 0,
                              GTK_ACCEL_VISIBLE);

  add_vertical_line = gtk_menu_item_new_with_mnemonic (_("add vertical line"));
  gtk_widget_set_name (add_vertical_line, "add_vertical_line");
  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, (GdkModifierType) 0,
                              GTK_ACCEL_VISIBLE);

  del_horizontal_line = gtk_menu_item_new_with_mnemonic (_("del horizontal line"));
  gtk_widget_set_name (del_horizontal_line, "del_horizontal_line");
  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, (GdkModifierType) GDK_CONTROL_MASK,
                              GTK_ACCEL_VISIBLE);

  del_vertical_line = gtk_menu_item_new_with_mnemonic (_("del vertical line"));
  gtk_widget_set_name (del_vertical_line, "del_vertical_line");
  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, (GdkModifierType) GDK_CONTROL_MASK,
                              GTK_ACCEL_VISIBLE);

  separator12 = gtk_separator_menu_item_new ();
  gtk_widget_set_name (separator12, "separator12");
  gtk_widget_show (separator12);
  gtk_container_add (GTK_CONTAINER (menuEditMesh), separator12);
  gtk_widget_set_sensitive (separator12, FALSE);

  smooth = gtk_menu_item_new_with_mnemonic (_("smooth"));
  gtk_widget_set_name (smooth, "smooth");
  gtk_widget_show (smooth);
  gtk_container_add (GTK_CONTAINER (menuEditMesh), smooth);

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

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (menuEditMesh, menuEditMesh, "menuEditMesh");
  GLADE_HOOKUP_OBJECT (menuEditMesh, unselect_point, "unselect_point");
  GLADE_HOOKUP_OBJECT (menuEditMesh, select_point, "select_point");
  GLADE_HOOKUP_OBJECT (menuEditMesh, assign_point, "assign_point");
  GLADE_HOOKUP_OBJECT (menuEditMesh, adjust, "adjust");
  GLADE_HOOKUP_OBJECT (menuEditMesh, separator5, "separator5");
  GLADE_HOOKUP_OBJECT (menuEditMesh, add_horizontal_line, "add_horizontal_line");
  GLADE_HOOKUP_OBJECT (menuEditMesh, add_vertical_line, "add_vertical_line");
  GLADE_HOOKUP_OBJECT (menuEditMesh, del_horizontal_line, "del_horizontal_line");
  GLADE_HOOKUP_OBJECT (menuEditMesh, del_vertical_line, "del_vertical_line");
  GLADE_HOOKUP_OBJECT (menuEditMesh, separator12, "separator12");
  GLADE_HOOKUP_OBJECT (menuEditMesh, smooth, "smooth");
  GLADE_HOOKUP_OBJECT_NO_REF (menuEditMesh, tooltips, "tooltips");

  gtk_menu_set_accel_group (GTK_MENU (menuEditMesh), accel_group);

  return menuEditMesh;
}

GtkWidget*
create_window_movie (void)
{
  GtkWidget *window_movie;
  GtkWidget *vbox4;
  GtkWidget *hbox11;
  GtkWidget *hbox5;
  GtkWidget *eventbox4;
  GtkWidget *label19;
  GtkObject *spinbutton_n_files_adj;
  GtkWidget *spinbutton_n_files;
  GtkWidget *pixmap2;
  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 *avi;
  GtkWidget *information_label;
  GtkWidget *label26;
  GtkWidget *hbox8;
  GtkWidget *ok;
  GtkWidget *stop;
  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_window_set_title (GTK_WINDOW (window_movie), _("gtkmorph movie"));

  vbox4 = gtk_vbox_new (FALSE, 0);
  gtk_widget_set_name (vbox4, "vbox4");
  gtk_widget_show (vbox4);
  gtk_container_add (GTK_CONTAINER (window_movie), vbox4);

  hbox11 = gtk_hbox_new (FALSE, 0);
  gtk_widget_set_name (hbox11, "hbox11");
  gtk_widget_show (hbox11);
  gtk_box_pack_start (GTK_BOX (vbox4), hbox11, TRUE, TRUE, 0);

  hbox5 = gtk_hbox_new (FALSE, 0);
  gtk_widget_set_name (hbox5, "hbox5");
  gtk_widget_show (hbox5);
  gtk_box_pack_start (GTK_BOX (hbox11), hbox5, TRUE, TRUE, 0);

  eventbox4 = gtk_event_box_new ();
  gtk_widget_set_name (eventbox4, "eventbox4");
  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_show (label19);
  gtk_container_add (GTK_CONTAINER (eventbox4), label19);
  gtk_label_set_justify (GTK_LABEL (label19), GTK_JUSTIFY_CENTER);
  gtk_misc_set_alignment (GTK_MISC (label19), 0, 0.5);

  spinbutton_n_files_adj = gtk_adjustment_new (10, 2, 500, 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_show (spinbutton_n_files);
  gtk_box_pack_start (GTK_BOX (hbox5), spinbutton_n_files, FALSE, TRUE, 3);

  pixmap2 = create_pixmap (window_movie, "howmany.xpm");
  gtk_widget_set_name (pixmap2, "pixmap2");
  gtk_widget_show (pixmap2);
  gtk_box_pack_start (GTK_BOX (hbox11), pixmap2, TRUE, TRUE, 0);

  hbox6 = gtk_hbox_new (FALSE, 0);
  gtk_widget_set_name (hbox6, "hbox6");
  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_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_show (label18);
  gtk_container_add (GTK_CONTAINER (eventbox3), label18);
  gtk_label_set_justify (GTK_LABEL (label18), GTK_JUSTIFY_CENTER);
  gtk_misc_set_alignment (GTK_MISC (label18), 0, 0.5);

  spinbutton_first_file_adj = gtk_adjustment_new (1, -2500, 2500, 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_show (spinbutton_first_file);
  gtk_box_pack_start (GTK_BOX (hbox6), spinbutton_first_file, FALSE, FALSE, 4);

  hbox7 = gtk_hbox_new (FALSE, 0);
  gtk_widget_set_name (hbox7, "hbox7");
  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_show (labelfile);
  gtk_box_pack_start (GTK_BOX (hbox7), labelfile, FALSE, FALSE, 4);
  gtk_label_set_justify (GTK_LABEL (labelfile), GTK_JUSTIFY_CENTER);
  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_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 (NULL);
  gtk_widget_set_name (frame4, "frame4");
  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_show (table5);
  gtk_container_add (GTK_CONTAINER (frame4), table5);

  animated_gif = gtk_check_button_new_with_mnemonic (_("create animated gif"));
  gtk_widget_set_name (animated_gif, "animated_gif");
  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_mnemonic (_("animate sequence"));
  gtk_widget_set_name (animate, "animate");
  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  (on some platforms, it may need 'animate' command from imagemagick)"), NULL);

  replay = gtk_button_new_with_mnemonic (_("replay"));
  gtk_widget_set_name (replay, "replay");
  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_mnemonic (_("creates mpeg"));
  gtk_widget_set_name (animated_mpeg, "animated_mpeg");
  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);

  avi = gtk_check_button_new_with_mnemonic (_("creati AVI MPEG4"));
  gtk_widget_set_name (avi, "avi");
  gtk_widget_show (avi);
  gtk_table_attach (GTK_TABLE (table5), avi, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, avi, _("creates an AVI file in MPEG4 format (needs 'mplayer' and 'mencoder')"), NULL);

  information_label = gtk_label_new ("");
  gtk_widget_set_name (information_label, "information_label");
  gtk_widget_show (information_label);
  gtk_table_attach (GTK_TABLE (table5), information_label, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (information_label), 0, 0.5);

  label26 = gtk_label_new (_("animations"));
  gtk_widget_set_name (label26, "label26");
  gtk_widget_show (label26);
  gtk_frame_set_label_widget (GTK_FRAME (frame4), label26);

  hbox8 = gtk_hbox_new (TRUE, 2);
  gtk_widget_set_name (hbox8, "hbox8");
  gtk_widget_show (hbox8);
  gtk_box_pack_start (GTK_BOX (vbox4), hbox8, TRUE, TRUE, 6);

  ok = gtk_button_new_from_stock ("gtk-media-play");
  gtk_widget_set_name (ok, "ok");
  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, (GdkModifierType) 0,
                              GTK_ACCEL_VISIBLE);

  stop = gtk_button_new_from_stock ("gtk-stop");
  gtk_widget_set_name (stop, "stop");
  gtk_widget_show (stop);
  gtk_box_pack_start (GTK_BOX (hbox8), stop, FALSE, FALSE, 0);
  gtk_widget_set_sensitive (stop, FALSE);
  gtk_tooltips_set_tip (tooltips, stop, _("stops the computation of frames"), NULL);

  cancel = gtk_button_new_from_stock ("gtk-cancel");
  gtk_widget_set_name (cancel, "cancel");
  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, (GdkModifierType) 0,
                              GTK_ACCEL_VISIBLE);

  help = gtk_button_new_from_stock ("gtk-help");
  gtk_widget_set_name (help, "help");
  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, (GdkModifierType) 0,
                              GTK_ACCEL_VISIBLE);

  g_signal_connect ((gpointer) replay, "clicked",
                    G_CALLBACK (on_movie_replay_clicked),
                    NULL);
  g_signal_connect ((gpointer) ok, "clicked",
                    G_CALLBACK (on_movie_ok_clicked),
                    NULL);
  g_signal_connect ((gpointer) stop, "clicked",
                    G_CALLBACK (on_stop_clicked),
                    NULL);
  g_signal_connect_swapped ((gpointer) cancel, "clicked",
                            G_CALLBACK (gtk_widget_hide),
                            GTK_OBJECT (window_movie));
  g_signal_connect ((gpointer) help, "clicked",
                    G_CALLBACK (on_movie_help_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (window_movie, window_movie, "window_movie");
  GLADE_HOOKUP_OBJECT (window_movie, vbox4, "vbox4");
  GLADE_HOOKUP_OBJECT (window_movie, hbox11, "hbox11");
  GLADE_HOOKUP_OBJECT (window_movie, hbox5, "hbox5");
  GLADE_HOOKUP_OBJECT (window_movie, eventbox4, "eventbox4");
  GLADE_HOOKUP_OBJECT (window_movie, label19, "label19");
  GLADE_HOOKUP_OBJECT (window_movie, spinbutton_n_files, "spinbutton_n_files");
  GLADE_HOOKUP_OBJECT (window_movie, pixmap2, "pixmap2");
  GLADE_HOOKUP_OBJECT (window_movie, hbox6, "hbox6");
  GLADE_HOOKUP_OBJECT (window_movie, eventbox3, "eventbox3");
  GLADE_HOOKUP_OBJECT (window_movie, label18, "label18");
  GLADE_HOOKUP_OBJECT (window_movie, spinbutton_first_file, "spinbutton_first_file");
  GLADE_HOOKUP_OBJECT (window_movie, hbox7, "hbox7");
  GLADE_HOOKUP_OBJECT (window_movie, labelfile, "labelfile");
  GLADE_HOOKUP_OBJECT (window_movie, file_base_name, "file_base_name");
  GLADE_HOOKUP_OBJECT (window_movie, frame4, "frame4");
  GLADE_HOOKUP_OBJECT (window_movie, table5, "table5");
  GLADE_HOOKUP_OBJECT (window_movie, animated_gif, "animated_gif");
  GLADE_HOOKUP_OBJECT (window_movie, animate, "animate");
  GLADE_HOOKUP_OBJECT (window_movie, replay, "replay");
  GLADE_HOOKUP_OBJECT (window_movie, animated_mpeg, "animated_mpeg");
  GLADE_HOOKUP_OBJECT (window_movie, avi, "avi");
  GLADE_HOOKUP_OBJECT (window_movie, information_label, "information_label");
  GLADE_HOOKUP_OBJECT (window_movie, label26, "label26");
  GLADE_HOOKUP_OBJECT (window_movie, hbox8, "hbox8");
  GLADE_HOOKUP_OBJECT (window_movie, ok, "ok");
  GLADE_HOOKUP_OBJECT (window_movie, stop, "stop");
  GLADE_HOOKUP_OBJECT (window_movie, cancel, "cancel");
  GLADE_HOOKUP_OBJECT (window_movie, help, "help");
  GLADE_HOOKUP_OBJECT_NO_REF (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_window_set_title (GTK_WINDOW (guide), _("gtkmorph guide"));

  vbox5 = gtk_vbox_new (FALSE, 0);
  gtk_widget_set_name (vbox5, "vbox5");
  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_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_show (scrolledwindow7);
  gtk_box_pack_start (GTK_BOX (vbox5), scrolledwindow7, TRUE, TRUE, 0);
  GTK_WIDGET_UNSET_FLAGS (scrolledwindow7, GTK_CAN_FOCUS);
  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow7), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow7), GTK_SHADOW_IN);

  text = gtk_text_view_new ();
  gtk_widget_set_name (text, "text");
  gtk_widget_show (text);
  gtk_container_add (GTK_CONTAINER (scrolledwindow7), text);
  gtk_text_view_set_editable (GTK_TEXT_VIEW (text), FALSE);
  gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (text), GTK_WRAP_WORD);

  hbox9 = gtk_hbox_new (TRUE, 0);
  gtk_widget_set_name (hbox9, "hbox9");
  gtk_widget_show (hbox9);
  gtk_box_pack_start (GTK_BOX (vbox5), hbox9, FALSE, TRUE, 0);

  prev = gtk_button_new_with_mnemonic (_("prev"));
  gtk_widget_set_name (prev, "prev");
  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_mnemonic (_("do it"));
  gtk_widget_set_name (do_it, "do_it");
  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_mnemonic (_("next"));
  gtk_widget_set_name (next, "next");
  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);

  g_signal_connect ((gpointer) guide, "delete_event",
                    G_CALLBACK (on_guide_delete_event),
                    NULL);
  g_signal_connect ((gpointer) guide, "destroy",
                    G_CALLBACK (on_guide_destroy),
                    NULL);
  g_signal_connect ((gpointer) text, "expose_event",
                    G_CALLBACK (on_guide_text_expose_event),
                    NULL);
  g_signal_connect ((gpointer) prev, "clicked",
                    G_CALLBACK (on_guide_prev_clicked),
                    NULL);
  g_signal_connect ((gpointer) do_it, "clicked",
                    G_CALLBACK (on_guide_do_it_clicked),
                    NULL);
  g_signal_connect ((gpointer) next, "clicked",
                    G_CALLBACK (on_guide_next_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (guide, guide, "guide");
  GLADE_HOOKUP_OBJECT (guide, vbox5, "vbox5");
  GLADE_HOOKUP_OBJECT (guide, guide_pixmap, "guide_pixmap");
  GLADE_HOOKUP_OBJECT (guide, scrolledwindow7, "scrolledwindow7");
  GLADE_HOOKUP_OBJECT (guide, text, "text");
  GLADE_HOOKUP_OBJECT (guide, hbox9, "hbox9");
  GLADE_HOOKUP_OBJECT (guide, prev, "prev");
  GLADE_HOOKUP_OBJECT (guide, do_it, "do_it");
  GLADE_HOOKUP_OBJECT (guide, next, "next");
  GLADE_HOOKUP_OBJECT_NO_REF (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_window_set_title (GTK_WINDOW (question), _("question"));
  gtk_window_set_type_hint (GTK_WINDOW (question), GDK_WINDOW_TYPE_HINT_DIALOG);

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

  questionlabel = gtk_label_new (_("question?"));
  gtk_widget_set_name (questionlabel, "questionlabel");
  gtk_widget_show (questionlabel);
  gtk_box_pack_start (GTK_BOX (dialog_vbox2), questionlabel, TRUE, TRUE, 0);
  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_widget_show (dialog_action_area2);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area2), GTK_BUTTONBOX_END);

  hbox10 = gtk_hbox_new (FALSE, 0);
  gtk_widget_set_name (hbox10, "hbox10");
  gtk_widget_show (hbox10);
  gtk_container_add (GTK_CONTAINER (dialog_action_area2), hbox10);

  yes = gtk_button_new_with_mnemonic (_("Yes"));
  gtk_widget_set_name (yes, "yes");
  gtk_widget_show (yes);
  gtk_box_pack_start (GTK_BOX (hbox10), yes, TRUE, FALSE, 0);

  no = gtk_button_new_with_mnemonic (_("No"));
  gtk_widget_set_name (no, "no");
  gtk_widget_show (no);
  gtk_box_pack_start (GTK_BOX (hbox10), no, TRUE, FALSE, 2);

  g_signal_connect ((gpointer) question, "delete_event",
                    G_CALLBACK (on_question_delete_event),
                    NULL);
  g_signal_connect ((gpointer) yes, "clicked",
                    G_CALLBACK (on_yes_clicked),
                    NULL);
  g_signal_connect ((gpointer) no, "clicked",
                    G_CALLBACK (on_no_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (question, question, "question");
  GLADE_HOOKUP_OBJECT_NO_REF (question, dialog_vbox2, "dialog_vbox2");
  GLADE_HOOKUP_OBJECT (question, questionlabel, "questionlabel");
  GLADE_HOOKUP_OBJECT_NO_REF (question, dialog_action_area2, "dialog_action_area2");
  GLADE_HOOKUP_OBJECT (question, hbox10, "hbox10");
  GLADE_HOOKUP_OBJECT (question, yes, "yes");
  GLADE_HOOKUP_OBJECT (question, no, "no");

  return question;
}

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

  colorselectiondialog = gtk_color_selection_dialog_new (_("Select Color"));
  gtk_widget_set_name (colorselectiondialog, "colorselectiondialog");
  gtk_container_set_border_width (GTK_CONTAINER (colorselectiondialog), 10);
  gtk_window_set_resizable (GTK_WINDOW (colorselectiondialog), FALSE);
  gtk_window_set_type_hint (GTK_WINDOW (colorselectiondialog), GDK_WINDOW_TYPE_HINT_DIALOG);

  ok_button_color = GTK_COLOR_SELECTION_DIALOG (colorselectiondialog)->ok_button;
  gtk_widget_set_name (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_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_widget_show (help_button1);
  GTK_WIDGET_SET_FLAGS (help_button1, GTK_CAN_DEFAULT);

  colorselection1 = GTK_COLOR_SELECTION_DIALOG (colorselectiondialog)->colorsel;
  gtk_widget_set_name (colorselection1, "colorselection1");
  gtk_widget_show (colorselection1);
  gtk_color_selection_set_has_opacity_control (GTK_COLOR_SELECTION (colorselection1), FALSE);

  g_signal_connect ((gpointer) ok_button_color, "clicked",
                    G_CALLBACK (on_ok_button_color_clicked),
                    NULL);
  g_signal_connect_swapped ((gpointer) cancel_button_csd, "clicked",
                            G_CALLBACK (gtk_widget_destroy),
                            GTK_OBJECT (colorselectiondialog));

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (colorselectiondialog, colorselectiondialog, "colorselectiondialog");
  GLADE_HOOKUP_OBJECT_NO_REF (colorselectiondialog, ok_button_color, "ok_button_color");
  GLADE_HOOKUP_OBJECT_NO_REF (colorselectiondialog, cancel_button_csd, "cancel_button_csd");
  GLADE_HOOKUP_OBJECT_NO_REF (colorselectiondialog, help_button1, "help_button1");
  GLADE_HOOKUP_OBJECT_NO_REF (colorselectiondialog, colorselection1, "colorselection1");

  return colorselectiondialog;
}

GtkWidget*
create_unused (void)
{
  GtkWidget *unused;
  GtkWidget *vbox6;
  GtkWidget *handlebox_tools;
  GtkWidget *toolbar_image_tools;
  GtkIconSize tmp_toolbar_icon_size;
  GSList *tool_edit_group = NULL;
  GtkWidget *tmp_image;
  GtkWidget *tool_edit;
  GtkWidget *tool_move;
  GtkWidget *tool_stretch;
  GtkTooltips *tooltips;

  tooltips = gtk_tooltips_new ();

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

  vbox6 = gtk_vbox_new (FALSE, 0);
  gtk_widget_set_name (vbox6, "vbox6");
  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_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_widget_set_name (toolbar_image_tools, "toolbar_image_tools");
  gtk_widget_show (toolbar_image_tools);
  gtk_container_add (GTK_CONTAINER (handlebox_tools), toolbar_image_tools);
  gtk_toolbar_set_style (GTK_TOOLBAR (toolbar_image_tools), GTK_TOOLBAR_BOTH);
  tmp_toolbar_icon_size = gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar_image_tools));

  tool_edit = (GtkWidget*) gtk_radio_tool_button_new (NULL);
  gtk_tool_button_set_label (GTK_TOOL_BUTTON (tool_edit), _("edit"));
  tmp_image = create_pixmap (unused, "cursor_left.xpm");
  gtk_widget_show (tmp_image);
  gtk_tool_button_set_icon_widget (GTK_TOOL_BUTTON (tool_edit), tmp_image);
  gtk_widget_set_name (tool_edit, "tool_edit");
  gtk_widget_show (tool_edit);
  gtk_container_add (GTK_CONTAINER (toolbar_image_tools), tool_edit);
  gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (tool_edit), tooltips, _("move single point"), NULL);
  gtk_radio_tool_button_set_group (GTK_RADIO_TOOL_BUTTON (tool_edit), tool_edit_group);
  tool_edit_group = gtk_radio_tool_button_get_group (GTK_RADIO_TOOL_BUTTON (tool_edit));

  tool_move = (GtkWidget*) gtk_radio_tool_button_new (NULL);
  gtk_tool_button_set_label (GTK_TOOL_BUTTON (tool_move), _("move"));
  tmp_image = create_pixmap (unused, "hand01.xpm");
  gtk_widget_show (tmp_image);
  gtk_tool_button_set_icon_widget (GTK_TOOL_BUTTON (tool_move), tmp_image);
  gtk_widget_set_name (tool_move, "tool_move");
  gtk_widget_show (tool_move);
  gtk_container_add (GTK_CONTAINER (toolbar_image_tools), tool_move);
  gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (tool_move), tooltips, _("move whole feature"), NULL);
  gtk_radio_tool_button_set_group (GTK_RADIO_TOOL_BUTTON (tool_move), tool_edit_group);
  tool_edit_group = gtk_radio_tool_button_get_group (GTK_RADIO_TOOL_BUTTON (tool_move));
  gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (tool_move), TRUE);

  tool_stretch = (GtkWidget*) gtk_radio_tool_button_new (NULL);
  gtk_tool_button_set_label (GTK_TOOL_BUTTON (tool_stretch), _("stretch"));
  tmp_image = create_pixmap (unused, "transform.xpm");
  gtk_widget_show (tmp_image);
  gtk_tool_button_set_icon_widget (GTK_TOOL_BUTTON (tool_stretch), tmp_image);
  gtk_widget_set_name (tool_stretch, "tool_stretch");
  gtk_widget_show (tool_stretch);
  gtk_container_add (GTK_CONTAINER (toolbar_image_tools), tool_stretch);
  gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (tool_stretch), tooltips, _("stretch whole feature"), NULL);
  gtk_radio_tool_button_set_group (GTK_RADIO_TOOL_BUTTON (tool_stretch), tool_edit_group);
  tool_edit_group = gtk_radio_tool_button_get_group (GTK_RADIO_TOOL_BUTTON (tool_stretch));

  g_signal_connect ((gpointer) tool_edit, "clicked",
                    G_CALLBACK (on_tool_edit_clicked),
                    NULL);
  g_signal_connect ((gpointer) tool_move, "clicked",
                    G_CALLBACK (on_tool_move_clicked),
                    NULL);
  g_signal_connect ((gpointer) tool_stretch, "clicked",
                    G_CALLBACK (on_tool_stretch_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (unused, unused, "unused");
  GLADE_HOOKUP_OBJECT (unused, vbox6, "vbox6");
  GLADE_HOOKUP_OBJECT (unused, handlebox_tools, "handlebox_tools");
  GLADE_HOOKUP_OBJECT (unused, toolbar_image_tools, "toolbar_image_tools");
  GLADE_HOOKUP_OBJECT (unused, tool_edit, "tool_edit");
  GLADE_HOOKUP_OBJECT (unused, tool_move, "tool_move");
  GLADE_HOOKUP_OBJECT (unused, tool_stretch, "tool_stretch");
  GLADE_HOOKUP_OBJECT_NO_REF (unused, tooltips, "tooltips");

  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_window_set_title (GTK_WINDOW (mag), _("gtkmorph mag"));
  gtk_window_set_default_size (GTK_WINDOW (mag), 200, 200);

  mag_vbox = gtk_vbox_new (FALSE, 0);
  gtk_widget_set_name (mag_vbox, "mag_vbox");
  gtk_widget_show (mag_vbox);
  gtk_container_add (GTK_CONTAINER (mag), mag_vbox);

  mag_hbox = gtk_hbox_new (TRUE, 0);
  gtk_widget_set_name (mag_hbox, "mag_hbox");
  gtk_widget_show (mag_hbox);
  gtk_box_pack_start (GTK_BOX (mag_vbox), mag_hbox, FALSE, FALSE, 0);

  mag_label = gtk_label_new (_("1"));
  gtk_widget_set_name (mag_label, "mag_label");
  gtk_widget_show (mag_label);
  gtk_box_pack_start (GTK_BOX (mag_hbox), mag_label, FALSE, FALSE, 0);

  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_show (mag_spinbutton);
  gtk_box_pack_start (GTK_BOX (mag_hbox), mag_spinbutton, TRUE, TRUE, 0);

  mag_track = gtk_check_button_new_with_mnemonic (_("track"));
  gtk_widget_set_name (mag_track, "mag_track");
  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_show (mag_drawingarea);
  gtk_box_pack_start (GTK_BOX (mag_vbox), mag_drawingarea, TRUE, TRUE, 0);

  g_signal_connect ((gpointer) mag, "unrealize",
                    G_CALLBACK (on_mag_unrealize),
                    NULL);
  g_signal_connect ((gpointer) mag_spinbutton, "activate",
                    G_CALLBACK (on_mag_spinbutton_activate),
                    NULL);
  g_signal_connect ((gpointer) mag_spinbutton, "changed",
                    G_CALLBACK (on_mag_spinbutton_changed),
                    NULL);
  g_signal_connect ((gpointer) mag_track, "toggled",
                    G_CALLBACK (on_mag_track_toggled),
                    NULL);
  g_signal_connect ((gpointer) mag_drawingarea, "configure_event",
                    G_CALLBACK (on_mag_drawingarea_configure_event),
                    NULL);
  g_signal_connect ((gpointer) mag_drawingarea, "expose_event",
                    G_CALLBACK (on_mag_drawingarea_expose_event),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (mag, mag, "mag");
  GLADE_HOOKUP_OBJECT (mag, mag_vbox, "mag_vbox");
  GLADE_HOOKUP_OBJECT (mag, mag_hbox, "mag_hbox");
  GLADE_HOOKUP_OBJECT (mag, mag_label, "mag_label");
  GLADE_HOOKUP_OBJECT (mag, mag_spinbutton, "mag_spinbutton");
  GLADE_HOOKUP_OBJECT (mag, mag_track, "mag_track");
  GLADE_HOOKUP_OBJECT (mag, mag_drawingarea, "mag_drawingarea");

  return mag;
}

GtkWidget*
create_diff_window (void)
{
  GtkWidget *diff_window;
  GtkWidget *hbox12;
  GtkWidget *label28;
  GtkWidget *hscale_mesh;
  GtkObject *spinbutton_mesh_adj;
  GtkWidget *spinbutton_mesh;
  GtkTooltips *tooltips;

  tooltips = gtk_tooltips_new ();

  diff_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_widget_set_name (diff_window, "diff_window");
  gtk_window_set_title (GTK_WINDOW (diff_window), _("differential mesh"));
  gtk_window_set_default_size (GTK_WINDOW (diff_window), 300, -1);

  hbox12 = gtk_hbox_new (FALSE, 0);
  gtk_widget_set_name (hbox12, "hbox12");
  gtk_widget_show (hbox12);
  gtk_container_add (GTK_CONTAINER (diff_window), hbox12);

  label28 = gtk_label_new (_("mesh\ninterp."));
  gtk_widget_set_name (label28, "label28");
  gtk_widget_show (label28);
  gtk_box_pack_start (GTK_BOX (hbox12), label28, FALSE, FALSE, 0);
  gtk_label_set_justify (GTK_LABEL (label28), GTK_JUSTIFY_CENTER);

  hscale_mesh = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (0, -100, 100, 1, 10, 10)));
  gtk_widget_set_name (hscale_mesh, "hscale_mesh");
  gtk_widget_show (hscale_mesh);
  gtk_box_pack_start (GTK_BOX (hbox12), hscale_mesh, TRUE, TRUE, 0);
  GTK_WIDGET_UNSET_FLAGS (hscale_mesh, GTK_CAN_FOCUS);
  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);

  spinbutton_mesh_adj = gtk_adjustment_new (0, -100, 100, 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_show (spinbutton_mesh);
  gtk_box_pack_start (GTK_BOX (hbox12), spinbutton_mesh, FALSE, FALSE, 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);

  g_signal_connect ((gpointer) diff_window, "delete_event",
                    G_CALLBACK (on_diff_window_delete_event),
                    NULL);
  g_signal_connect ((gpointer) hscale_mesh, "value_changed",
                    G_CALLBACK (on_hscale_mesh_changed),
                    NULL);
  g_signal_connect ((gpointer) spinbutton_mesh, "value_changed",
                    G_CALLBACK (on_spinbutton_mesh_changed),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (diff_window, diff_window, "diff_window");
  GLADE_HOOKUP_OBJECT (diff_window, hbox12, "hbox12");
  GLADE_HOOKUP_OBJECT (diff_window, label28, "label28");
  GLADE_HOOKUP_OBJECT (diff_window, hscale_mesh, "hscale_mesh");
  GLADE_HOOKUP_OBJECT (diff_window, spinbutton_mesh, "spinbutton_mesh");
  GLADE_HOOKUP_OBJECT_NO_REF (diff_window, tooltips, "tooltips");

  return diff_window;
}

