/*
 * 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_main_window (void)
{
  GtkWidget *main_window;
  GtkWidget *vbox1;
  GtkWidget *hbox8;
  GtkWidget *menubar1;
  GtkWidget *menuitem1;
  GtkWidget *menuitem1_menu;
  GtkWidget *main_new;
  GtkWidget *main_open_input;
  GtkWidget *nec2_edit;
  GtkWidget *image68;
  GtkWidget *main_save;
  GtkWidget *main_save_as;
  GtkWidget *separator1;
  GtkWidget *main_quit;
  GtkWidget *main_view_menuitem;
  GtkWidget *main_view_menuitem_menu;
  GtkWidget *main_rdpattern;
  GtkWidget *main_freqplots;
  GtkWidget *main_pol_menu;
  GtkWidget *main_pol_menu_menu;
  GSList *rdpattern_total_group = NULL;
  GtkWidget *rdpattern_total;
  GtkWidget *rdpattern_horizontal;
  GtkWidget *rdpattern_vertical;
  GtkWidget *rdpattern_right_hand;
  GtkWidget *rdpattern_left_hand;
  GtkWidget *common_projection;
  GtkWidget *common_freq;
  GtkWidget *menuitem4;
  GtkWidget *menuitem4_menu;
  GtkWidget *about;
  GtkWidget *image69;
  GtkWidget *main_hbox1;
  GtkWidget *main_x_axis;
  GtkWidget *main_y_axis;
  GtkWidget *main_z_axis;
  GtkWidget *main_default_view;
  GtkWidget *image32;
  GtkWidget *vseparator1;
  GtkWidget *image50;
  GtkObject *main_rotate_spinbutton_adj;
  GtkWidget *main_rotate_spinbutton;
  GtkWidget *image51;
  GtkObject *main_incline_spinbutton_adj;
  GtkWidget *main_incline_spinbutton;
  GtkWidget *vseparator2;
  GtkWidget *main_currents_togglebutton;
  GtkWidget *main_charges_togglebutton;
  GtkWidget *label214;
  GtkWidget *main_loop_start;
  GtkWidget *alignment49;
  GtkWidget *hbox47;
  GtkWidget *image52;
  GtkWidget *label213;
  GtkWidget *main_loop_pause;
  GtkWidget *image54;
  GtkWidget *main_loop_reset;
  GtkWidget *image53;
  GtkWidget *hseparator1;
  GtkWidget *main_hbox2;
  GtkWidget *main_colorcode_zerolabel;
  GtkWidget *main_colorcode_drawingarea;
  GtkWidget *main_colorcode_maxlabel;
  GtkWidget *main_gain_entry;
  GtkWidget *label10;
  GtkObject *main_freq_spinbutton_adj;
  GtkWidget *main_freq_spinbutton;
  GtkWidget *main_freq_label;
  GtkWidget *main_freq_checkbutton;
  GtkWidget *main_new_freq_button;
  GtkWidget *image46;
  GtkWidget *frame1;
  GtkWidget *alignment1;
  GtkWidget *structure_drawingarea;
  GtkWidget *struct_label;
  GtkAccelGroup *accel_group;
  GtkTooltips *tooltips;

  tooltips = gtk_tooltips_new ();

  accel_group = gtk_accel_group_new ();

  main_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_container_set_border_width (GTK_CONTAINER (main_window), 4);
  gtk_window_set_title (GTK_WINDOW (main_window), _("Xnec2c: Structure Display"));
  gtk_window_set_gravity (GTK_WINDOW (main_window), GDK_GRAVITY_EAST);

  vbox1 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox1);
  gtk_container_add (GTK_CONTAINER (main_window), vbox1);

  hbox8 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox8);
  gtk_box_pack_start (GTK_BOX (vbox1), hbox8, FALSE, FALSE, 0);

  menubar1 = gtk_menu_bar_new ();
  gtk_widget_show (menubar1);
  gtk_box_pack_start (GTK_BOX (hbox8), menubar1, FALSE, FALSE, 0);

  menuitem1 = gtk_menu_item_new_with_mnemonic (_("_File"));
  gtk_widget_show (menuitem1);
  gtk_container_add (GTK_CONTAINER (menubar1), menuitem1);

  menuitem1_menu = gtk_menu_new ();
  gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem1), menuitem1_menu);

  main_new = gtk_image_menu_item_new_from_stock ("gtk-new", accel_group);
  gtk_widget_show (main_new);
  gtk_container_add (GTK_CONTAINER (menuitem1_menu), main_new);

  main_open_input = gtk_image_menu_item_new_from_stock ("gtk-open", accel_group);
  gtk_widget_show (main_open_input);
  gtk_container_add (GTK_CONTAINER (menuitem1_menu), main_open_input);

  nec2_edit = gtk_image_menu_item_new_with_mnemonic (_("Edit"));
  gtk_widget_show (nec2_edit);
  gtk_container_add (GTK_CONTAINER (menuitem1_menu), nec2_edit);
  gtk_tooltips_set_tip (tooltips, nec2_edit, _("Edit NEC2 Input File"), NULL);
  gtk_widget_add_accelerator (nec2_edit, "activate", accel_group,
                              GDK_E, (GdkModifierType) GDK_CONTROL_MASK,
                              GTK_ACCEL_VISIBLE);

  image68 = gtk_image_new_from_stock ("gtk-edit", GTK_ICON_SIZE_MENU);
  gtk_widget_show (image68);
  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (nec2_edit), image68);

  main_save = gtk_image_menu_item_new_from_stock ("gtk-save", accel_group);
  gtk_widget_show (main_save);
  gtk_container_add (GTK_CONTAINER (menuitem1_menu), main_save);

  main_save_as = gtk_image_menu_item_new_from_stock ("gtk-save-as", accel_group);
  gtk_widget_show (main_save_as);
  gtk_container_add (GTK_CONTAINER (menuitem1_menu), main_save_as);

  separator1 = gtk_separator_menu_item_new ();
  gtk_widget_show (separator1);
  gtk_container_add (GTK_CONTAINER (menuitem1_menu), separator1);
  gtk_widget_set_sensitive (separator1, FALSE);

  main_quit = gtk_image_menu_item_new_from_stock ("gtk-quit", accel_group);
  gtk_widget_show (main_quit);
  gtk_container_add (GTK_CONTAINER (menuitem1_menu), main_quit);

  main_view_menuitem = gtk_menu_item_new_with_mnemonic (_("_View"));
  gtk_widget_show (main_view_menuitem);
  gtk_container_add (GTK_CONTAINER (menubar1), main_view_menuitem);

  main_view_menuitem_menu = gtk_menu_new ();
  gtk_menu_item_set_submenu (GTK_MENU_ITEM (main_view_menuitem), main_view_menuitem_menu);

  main_rdpattern = gtk_check_menu_item_new_with_mnemonic (_("Radiation Pattern"));
  gtk_widget_show (main_rdpattern);
  gtk_container_add (GTK_CONTAINER (main_view_menuitem_menu), main_rdpattern);
  gtk_tooltips_set_tip (tooltips, main_rdpattern, _("Open radiation pattern window"), NULL);

  main_freqplots = gtk_check_menu_item_new_with_mnemonic (_("Frequency Plots"));
  gtk_widget_show (main_freqplots);
  gtk_container_add (GTK_CONTAINER (main_view_menuitem_menu), main_freqplots);
  gtk_tooltips_set_tip (tooltips, main_freqplots, _("Open frequency data plots window"), NULL);

  main_pol_menu = gtk_menu_item_new_with_mnemonic (_("Polarization"));
  gtk_widget_show (main_pol_menu);
  gtk_container_add (GTK_CONTAINER (main_view_menuitem_menu), main_pol_menu);
  gtk_tooltips_set_tip (tooltips, main_pol_menu, _("Display gain data relevant to polarization"), NULL);

  main_pol_menu_menu = gtk_menu_new ();
  gtk_menu_item_set_submenu (GTK_MENU_ITEM (main_pol_menu), main_pol_menu_menu);

  rdpattern_total = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Total"));
  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_total));
  gtk_widget_show (rdpattern_total);
  gtk_container_add (GTK_CONTAINER (main_pol_menu_menu), rdpattern_total);
  gtk_tooltips_set_tip (tooltips, rdpattern_total, _("Total gain"), NULL);
  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (rdpattern_total), TRUE);

  rdpattern_horizontal = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Horizontal"));
  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_horizontal));
  gtk_widget_show (rdpattern_horizontal);
  gtk_container_add (GTK_CONTAINER (main_pol_menu_menu), rdpattern_horizontal);
  gtk_tooltips_set_tip (tooltips, rdpattern_horizontal, _("Gain in horizontal polarization"), NULL);

  rdpattern_vertical = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Vertical"));
  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_vertical));
  gtk_widget_show (rdpattern_vertical);
  gtk_container_add (GTK_CONTAINER (main_pol_menu_menu), rdpattern_vertical);
  gtk_tooltips_set_tip (tooltips, rdpattern_vertical, _("Gain in vertical polarization"), NULL);

  rdpattern_right_hand = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Right Hand"));
  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_right_hand));
  gtk_widget_show (rdpattern_right_hand);
  gtk_container_add (GTK_CONTAINER (main_pol_menu_menu), rdpattern_right_hand);
  gtk_tooltips_set_tip (tooltips, rdpattern_right_hand, _("Gain in rhcp"), NULL);

  rdpattern_left_hand = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Left Hand"));
  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_left_hand));
  gtk_widget_show (rdpattern_left_hand);
  gtk_container_add (GTK_CONTAINER (main_pol_menu_menu), rdpattern_left_hand);
  gtk_tooltips_set_tip (tooltips, rdpattern_left_hand, _("Gain in lhcp"), NULL);

  common_projection = gtk_check_menu_item_new_with_mnemonic (_("Common Projection"));
  gtk_widget_show (common_projection);
  gtk_container_add (GTK_CONTAINER (main_view_menuitem_menu), common_projection);
  gtk_tooltips_set_tip (tooltips, common_projection, _("Synchronize projection parameters in different windows"), NULL);
  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (common_projection), TRUE);

  common_freq = gtk_check_menu_item_new_with_mnemonic (_("Common Frequency"));
  gtk_widget_show (common_freq);
  gtk_container_add (GTK_CONTAINER (main_view_menuitem_menu), common_freq);
  gtk_tooltips_set_tip (tooltips, common_freq, _("Synchronize frequency selection in different windows"), NULL);
  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (common_freq), TRUE);

  menuitem4 = gtk_menu_item_new_with_mnemonic (_("_Help"));
  gtk_widget_show (menuitem4);
  gtk_container_add (GTK_CONTAINER (menubar1), menuitem4);

  menuitem4_menu = gtk_menu_new ();
  gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem4), menuitem4_menu);

  about = gtk_image_menu_item_new_with_mnemonic (_("About"));
  gtk_widget_show (about);
  gtk_container_add (GTK_CONTAINER (menuitem4_menu), about);

  image69 = gtk_image_new_from_stock ("gtk-about", GTK_ICON_SIZE_MENU);
  gtk_widget_show (image69);
  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (about), image69);

  main_hbox1 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (main_hbox1);
  gtk_box_pack_start (GTK_BOX (hbox8), main_hbox1, FALSE, FALSE, 0);

  main_x_axis = gtk_button_new_with_mnemonic (_("X"));
  gtk_widget_show (main_x_axis);
  gtk_box_pack_start (GTK_BOX (main_hbox1), main_x_axis, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, main_x_axis, _("View structure along X-axis"), NULL);
  gtk_widget_add_accelerator (main_x_axis, "clicked", accel_group,
                              GDK_X, (GdkModifierType) 0,
                              GTK_ACCEL_VISIBLE);

  main_y_axis = gtk_button_new_with_mnemonic (_("Y"));
  gtk_widget_show (main_y_axis);
  gtk_box_pack_start (GTK_BOX (main_hbox1), main_y_axis, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, main_y_axis, _("View structure along Y-axis"), NULL);
  gtk_widget_add_accelerator (main_y_axis, "clicked", accel_group,
                              GDK_Y, (GdkModifierType) 0,
                              GTK_ACCEL_VISIBLE);

  main_z_axis = gtk_button_new_with_mnemonic (_("Z"));
  gtk_widget_show (main_z_axis);
  gtk_box_pack_start (GTK_BOX (main_hbox1), main_z_axis, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, main_z_axis, _("View strucure along Z-axis"), NULL);
  gtk_widget_add_accelerator (main_z_axis, "clicked", accel_group,
                              GDK_Z, (GdkModifierType) 0,
                              GTK_ACCEL_VISIBLE);

  main_default_view = gtk_button_new ();
  gtk_widget_show (main_default_view);
  gtk_box_pack_start (GTK_BOX (main_hbox1), main_default_view, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, main_default_view, _("View strucure in default projection"), NULL);

  image32 = gtk_image_new_from_stock ("gtk-redo", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image32);
  gtk_container_add (GTK_CONTAINER (main_default_view), image32);

  vseparator1 = gtk_vseparator_new ();
  gtk_widget_show (vseparator1);
  gtk_box_pack_start (GTK_BOX (main_hbox1), vseparator1, TRUE, TRUE, 4);

  image50 = gtk_image_new_from_stock ("gtk-refresh", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image50);
  gtk_box_pack_start (GTK_BOX (main_hbox1), image50, TRUE, TRUE, 0);

  main_rotate_spinbutton_adj = gtk_adjustment_new (0, -360, 360, 1, 10, 0);
  main_rotate_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (main_rotate_spinbutton_adj), 1, 0);
  gtk_widget_show (main_rotate_spinbutton);
  gtk_box_pack_start (GTK_BOX (main_hbox1), main_rotate_spinbutton, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, main_rotate_spinbutton, _("Rotate structure around Z-axis"), NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (main_rotate_spinbutton), TRUE);

  image51 = gtk_image_new_from_stock ("gtk-go-down", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image51);
  gtk_box_pack_start (GTK_BOX (main_hbox1), image51, TRUE, TRUE, 0);

  main_incline_spinbutton_adj = gtk_adjustment_new (0, -180, 180, 1, 10, 0);
  main_incline_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (main_incline_spinbutton_adj), 1, 0);
  gtk_widget_show (main_incline_spinbutton);
  gtk_box_pack_start (GTK_BOX (main_hbox1), main_incline_spinbutton, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, main_incline_spinbutton, _("Incline structure to plane of screen"), NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (main_incline_spinbutton), TRUE);

  vseparator2 = gtk_vseparator_new ();
  gtk_widget_show (vseparator2);
  gtk_box_pack_start (GTK_BOX (main_hbox1), vseparator2, TRUE, TRUE, 4);

  main_currents_togglebutton = gtk_toggle_button_new_with_mnemonic (_("Cur"));
  gtk_widget_show (main_currents_togglebutton);
  gtk_box_pack_start (GTK_BOX (main_hbox1), main_currents_togglebutton, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, main_currents_togglebutton, _("Calculate and display structure currents"), NULL);

  main_charges_togglebutton = gtk_toggle_button_new_with_mnemonic (_("Chg"));
  gtk_widget_show (main_charges_togglebutton);
  gtk_box_pack_start (GTK_BOX (main_hbox1), main_charges_togglebutton, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, main_charges_togglebutton, _("Calculate and display charge densities"), NULL);

  label214 = gtk_label_new (_("  Loop "));
  gtk_widget_show (label214);
  gtk_box_pack_start (GTK_BOX (main_hbox1), label214, FALSE, FALSE, 0);

  main_loop_start = gtk_button_new ();
  gtk_widget_show (main_loop_start);
  gtk_box_pack_start (GTK_BOX (main_hbox1), main_loop_start, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, main_loop_start, _("Start Frequency Loop"), NULL);

  alignment49 = gtk_alignment_new (0.5, 0.5, 0, 0);
  gtk_widget_show (alignment49);
  gtk_container_add (GTK_CONTAINER (main_loop_start), alignment49);

  hbox47 = gtk_hbox_new (FALSE, 2);
  gtk_widget_show (hbox47);
  gtk_container_add (GTK_CONTAINER (alignment49), hbox47);

  image52 = gtk_image_new_from_stock ("gtk-media-play", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image52);
  gtk_box_pack_start (GTK_BOX (hbox47), image52, FALSE, FALSE, 0);

  label213 = gtk_label_new_with_mnemonic ("");
  gtk_widget_show (label213);
  gtk_box_pack_start (GTK_BOX (hbox47), label213, FALSE, FALSE, 0);

  main_loop_pause = gtk_button_new ();
  gtk_widget_show (main_loop_pause);
  gtk_box_pack_start (GTK_BOX (main_hbox1), main_loop_pause, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, main_loop_pause, _("Pause Frequency Loop"), NULL);

  image54 = gtk_image_new_from_stock ("gtk-media-pause", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image54);
  gtk_container_add (GTK_CONTAINER (main_loop_pause), image54);

  main_loop_reset = gtk_button_new ();
  gtk_widget_show (main_loop_reset);
  gtk_box_pack_start (GTK_BOX (main_hbox1), main_loop_reset, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, main_loop_reset, _("Reset Frequency Loop"), NULL);

  image53 = gtk_image_new_from_stock ("gtk-media-rewind", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image53);
  gtk_container_add (GTK_CONTAINER (main_loop_reset), image53);

  hseparator1 = gtk_hseparator_new ();
  gtk_widget_show (hseparator1);
  gtk_box_pack_start (GTK_BOX (vbox1), hseparator1, FALSE, FALSE, 4);

  main_hbox2 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (main_hbox2);
  gtk_box_pack_start (GTK_BOX (vbox1), main_hbox2, FALSE, FALSE, 0);

  main_colorcode_zerolabel = gtk_label_new (_("0"));
  gtk_widget_show (main_colorcode_zerolabel);
  gtk_box_pack_start (GTK_BOX (main_hbox2), main_colorcode_zerolabel, FALSE, FALSE, 2);
  gtk_misc_set_padding (GTK_MISC (main_colorcode_zerolabel), 2, 0);

  main_colorcode_drawingarea = gtk_drawing_area_new ();
  gtk_widget_show (main_colorcode_drawingarea);
  gtk_box_pack_start (GTK_BOX (main_hbox2), main_colorcode_drawingarea, FALSE, FALSE, 1);
  gtk_widget_set_size_request (main_colorcode_drawingarea, 160, 28);
  gtk_tooltips_set_tip (tooltips, main_colorcode_drawingarea, _("Color code for Structure Current or Charge Density values"), NULL);

  main_colorcode_maxlabel = gtk_label_new (_("0.00"));
  gtk_widget_show (main_colorcode_maxlabel);
  gtk_box_pack_start (GTK_BOX (main_hbox2), main_colorcode_maxlabel, FALSE, FALSE, 1);
  gtk_misc_set_alignment (GTK_MISC (main_colorcode_maxlabel), 0, 0.5);
  gtk_misc_set_padding (GTK_MISC (main_colorcode_maxlabel), 2, 0);
  gtk_label_set_width_chars (GTK_LABEL (main_colorcode_maxlabel), 11);

  main_gain_entry = gtk_entry_new ();
  gtk_widget_show (main_gain_entry);
  gtk_box_pack_start (GTK_BOX (main_hbox2), main_gain_entry, FALSE, FALSE, 1);
  gtk_tooltips_set_tip (tooltips, main_gain_entry, _("Gain in direction of Viewer\n(perpenticular to screen)"), NULL);
  gtk_entry_set_width_chars (GTK_ENTRY (main_gain_entry), 6);

  label10 = gtk_label_new (_("dB"));
  gtk_widget_show (label10);
  gtk_box_pack_start (GTK_BOX (main_hbox2), label10, FALSE, FALSE, 1);

  main_freq_spinbutton_adj = gtk_adjustment_new (0.00999999977648, 0.00999999977648, 9999, 0.00999999977648, 10, 0);
  main_freq_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (main_freq_spinbutton_adj), 0.00999999977648, 3);
  gtk_widget_show (main_freq_spinbutton);
  gtk_box_pack_start (GTK_BOX (main_hbox2), main_freq_spinbutton, FALSE, FALSE, 1);
  gtk_tooltips_set_tip (tooltips, main_freq_spinbutton, _("Enter frequency in MHz"), NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (main_freq_spinbutton), TRUE);
  gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (main_freq_spinbutton), GTK_UPDATE_IF_VALID);

  main_freq_label = gtk_label_new (_("MHz"));
  gtk_widget_show (main_freq_label);
  gtk_box_pack_start (GTK_BOX (main_hbox2), main_freq_label, FALSE, FALSE, 1);
  gtk_misc_set_padding (GTK_MISC (main_freq_label), 4, 0);

  main_freq_checkbutton = gtk_check_button_new_with_mnemonic (_("Apply"));
  gtk_widget_show (main_freq_checkbutton);
  gtk_box_pack_start (GTK_BOX (main_hbox2), main_freq_checkbutton, FALSE, FALSE, 2);
  gtk_tooltips_set_tip (tooltips, main_freq_checkbutton, _("Enable data calculation on frequency change"), NULL);
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (main_freq_checkbutton), TRUE);

  main_new_freq_button = gtk_button_new ();
  gtk_widget_show (main_new_freq_button);
  gtk_box_pack_start (GTK_BOX (main_hbox2), main_new_freq_button, FALSE, FALSE, 2);
  gtk_tooltips_set_tip (tooltips, main_new_freq_button, _("Calculate data for new frequency"), NULL);

  image46 = gtk_image_new_from_stock ("gtk-apply", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image46);
  gtk_container_add (GTK_CONTAINER (main_new_freq_button), image46);

  frame1 = gtk_frame_new (NULL);
  gtk_widget_show (frame1);
  gtk_box_pack_start (GTK_BOX (vbox1), frame1, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frame1), 4);

  alignment1 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment1);
  gtk_container_add (GTK_CONTAINER (frame1), alignment1);
  gtk_container_set_border_width (GTK_CONTAINER (alignment1), 2);

  structure_drawingarea = gtk_drawing_area_new ();
  gtk_widget_show (structure_drawingarea);
  gtk_container_add (GTK_CONTAINER (alignment1), structure_drawingarea);
  gtk_widget_set_size_request (structure_drawingarea, 600, 600);
  GTK_WIDGET_SET_FLAGS (structure_drawingarea, GTK_CAN_FOCUS);

  struct_label = gtk_label_new (_("Structure Geometry"));
  gtk_widget_show (struct_label);
  gtk_frame_set_label_widget (GTK_FRAME (frame1), struct_label);
  gtk_misc_set_padding (GTK_MISC (struct_label), 4, 0);

  g_signal_connect ((gpointer) main_window, "destroy",
                    G_CALLBACK (on_main_window_destroy),
                    NULL);
  g_signal_connect ((gpointer) main_window, "delete_event",
                    G_CALLBACK (on_main_window_delete_event),
                    NULL);
  g_signal_connect ((gpointer) main_new, "activate",
                    G_CALLBACK (on_new_activate),
                    NULL);
  g_signal_connect ((gpointer) main_open_input, "activate",
                    G_CALLBACK (on_open_input_activate),
                    NULL);
  g_signal_connect ((gpointer) nec2_edit, "activate",
                    G_CALLBACK (on_nec2_edit_activate),
                    NULL);
  g_signal_connect ((gpointer) main_save, "activate",
                    G_CALLBACK (on_main_save_activate),
                    NULL);
  g_signal_connect ((gpointer) main_save_as, "activate",
                    G_CALLBACK (on_main_save_as_activate),
                    NULL);
  g_signal_connect ((gpointer) main_quit, "activate",
                    G_CALLBACK (on_quit_activate),
                    NULL);
  g_signal_connect ((gpointer) main_view_menuitem, "activate",
                    G_CALLBACK (main_view_menuitem_activate),
                    NULL);
  g_signal_connect ((gpointer) main_rdpattern, "activate",
                    G_CALLBACK (on_main_rdpattern_activate),
                    NULL);
  g_signal_connect ((gpointer) main_freqplots, "activate",
                    G_CALLBACK (on_main_freqplots_activate),
                    NULL);
  g_signal_connect ((gpointer) main_pol_menu, "activate",
                    G_CALLBACK (main_pol_menu_activate),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_total, "activate",
                    G_CALLBACK (on_rdpattern_total_activate),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_horizontal, "activate",
                    G_CALLBACK (on_rdpattern_horizontal_activate),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_vertical, "activate",
                    G_CALLBACK (on_rdpattern_vertical_activate),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_right_hand, "activate",
                    G_CALLBACK (on_rdpattern_right_hand_activate),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_left_hand, "activate",
                    G_CALLBACK (on_rdpattern_left_hand_activate),
                    NULL);
  g_signal_connect ((gpointer) common_projection, "activate",
                    G_CALLBACK (on_common_projection_activate),
                    NULL);
  g_signal_connect ((gpointer) common_freq, "activate",
                    G_CALLBACK (on_common_freq_activate),
                    NULL);
  g_signal_connect ((gpointer) about, "activate",
                    G_CALLBACK (on_about_activate),
                    NULL);
  g_signal_connect ((gpointer) main_x_axis, "clicked",
                    G_CALLBACK (on_main_x_axis_clicked),
                    NULL);
  g_signal_connect ((gpointer) main_y_axis, "clicked",
                    G_CALLBACK (on_main_y_axis_clicked),
                    NULL);
  g_signal_connect ((gpointer) main_z_axis, "clicked",
                    G_CALLBACK (on_main_z_axis_clicked),
                    NULL);
  g_signal_connect ((gpointer) main_default_view, "clicked",
                    G_CALLBACK (on_main_default_view_clicked),
                    NULL);
  g_signal_connect ((gpointer) main_rotate_spinbutton, "value_changed",
                    G_CALLBACK (on_main_rotate_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) main_incline_spinbutton, "value_changed",
                    G_CALLBACK (on_main_incline_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) main_currents_togglebutton, "toggled",
                    G_CALLBACK (on_main_currents_togglebutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) main_charges_togglebutton, "toggled",
                    G_CALLBACK (on_main_charges_togglebutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) main_loop_start, "clicked",
                    G_CALLBACK (on_loop_start_clicked),
                    NULL);
  g_signal_connect ((gpointer) main_loop_pause, "clicked",
                    G_CALLBACK (on_loop_pause_clicked),
                    NULL);
  g_signal_connect ((gpointer) main_loop_reset, "clicked",
                    G_CALLBACK (on_loop_reset_clicked),
                    NULL);
  g_signal_connect ((gpointer) main_colorcode_drawingarea, "expose_event",
                    G_CALLBACK (on_main_colorcode_drawingarea_expose_event),
                    NULL);
  g_signal_connect ((gpointer) main_freq_spinbutton, "value_changed",
                    G_CALLBACK (on_main_freq_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) main_freq_checkbutton, "toggled",
                    G_CALLBACK (on_main_freq_checkbutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) main_new_freq_button, "clicked",
                    G_CALLBACK (on_main_new_freq_clicked),
                    NULL);
  g_signal_connect ((gpointer) structure_drawingarea, "configure_event",
                    G_CALLBACK (on_structure_drawingarea_configure_event),
                    NULL);
  g_signal_connect ((gpointer) structure_drawingarea, "motion_notify_event",
                    G_CALLBACK (on_structure_drawingarea_motion_notify_event),
                    NULL);
  g_signal_connect ((gpointer) structure_drawingarea, "expose_event",
                    G_CALLBACK (on_structure_drawingarea_expose_event),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (main_window, main_window, "main_window");
  GLADE_HOOKUP_OBJECT (main_window, vbox1, "vbox1");
  GLADE_HOOKUP_OBJECT (main_window, hbox8, "hbox8");
  GLADE_HOOKUP_OBJECT (main_window, menubar1, "menubar1");
  GLADE_HOOKUP_OBJECT (main_window, menuitem1, "menuitem1");
  GLADE_HOOKUP_OBJECT (main_window, menuitem1_menu, "menuitem1_menu");
  GLADE_HOOKUP_OBJECT (main_window, main_new, "main_new");
  GLADE_HOOKUP_OBJECT (main_window, main_open_input, "main_open_input");
  GLADE_HOOKUP_OBJECT (main_window, nec2_edit, "nec2_edit");
  GLADE_HOOKUP_OBJECT (main_window, image68, "image68");
  GLADE_HOOKUP_OBJECT (main_window, main_save, "main_save");
  GLADE_HOOKUP_OBJECT (main_window, main_save_as, "main_save_as");
  GLADE_HOOKUP_OBJECT (main_window, separator1, "separator1");
  GLADE_HOOKUP_OBJECT (main_window, main_quit, "main_quit");
  GLADE_HOOKUP_OBJECT (main_window, main_view_menuitem, "main_view_menuitem");
  GLADE_HOOKUP_OBJECT (main_window, main_view_menuitem_menu, "main_view_menuitem_menu");
  GLADE_HOOKUP_OBJECT (main_window, main_rdpattern, "main_rdpattern");
  GLADE_HOOKUP_OBJECT (main_window, main_freqplots, "main_freqplots");
  GLADE_HOOKUP_OBJECT (main_window, main_pol_menu, "main_pol_menu");
  GLADE_HOOKUP_OBJECT (main_window, main_pol_menu_menu, "main_pol_menu_menu");
  GLADE_HOOKUP_OBJECT (main_window, rdpattern_total, "rdpattern_total");
  GLADE_HOOKUP_OBJECT (main_window, rdpattern_horizontal, "rdpattern_horizontal");
  GLADE_HOOKUP_OBJECT (main_window, rdpattern_vertical, "rdpattern_vertical");
  GLADE_HOOKUP_OBJECT (main_window, rdpattern_right_hand, "rdpattern_right_hand");
  GLADE_HOOKUP_OBJECT (main_window, rdpattern_left_hand, "rdpattern_left_hand");
  GLADE_HOOKUP_OBJECT (main_window, common_projection, "common_projection");
  GLADE_HOOKUP_OBJECT (main_window, common_freq, "common_freq");
  GLADE_HOOKUP_OBJECT (main_window, menuitem4, "menuitem4");
  GLADE_HOOKUP_OBJECT (main_window, menuitem4_menu, "menuitem4_menu");
  GLADE_HOOKUP_OBJECT (main_window, about, "about");
  GLADE_HOOKUP_OBJECT (main_window, image69, "image69");
  GLADE_HOOKUP_OBJECT (main_window, main_hbox1, "main_hbox1");
  GLADE_HOOKUP_OBJECT (main_window, main_x_axis, "main_x_axis");
  GLADE_HOOKUP_OBJECT (main_window, main_y_axis, "main_y_axis");
  GLADE_HOOKUP_OBJECT (main_window, main_z_axis, "main_z_axis");
  GLADE_HOOKUP_OBJECT (main_window, main_default_view, "main_default_view");
  GLADE_HOOKUP_OBJECT (main_window, image32, "image32");
  GLADE_HOOKUP_OBJECT (main_window, vseparator1, "vseparator1");
  GLADE_HOOKUP_OBJECT (main_window, image50, "image50");
  GLADE_HOOKUP_OBJECT (main_window, main_rotate_spinbutton, "main_rotate_spinbutton");
  GLADE_HOOKUP_OBJECT (main_window, image51, "image51");
  GLADE_HOOKUP_OBJECT (main_window, main_incline_spinbutton, "main_incline_spinbutton");
  GLADE_HOOKUP_OBJECT (main_window, vseparator2, "vseparator2");
  GLADE_HOOKUP_OBJECT (main_window, main_currents_togglebutton, "main_currents_togglebutton");
  GLADE_HOOKUP_OBJECT (main_window, main_charges_togglebutton, "main_charges_togglebutton");
  GLADE_HOOKUP_OBJECT (main_window, label214, "label214");
  GLADE_HOOKUP_OBJECT (main_window, main_loop_start, "main_loop_start");
  GLADE_HOOKUP_OBJECT (main_window, alignment49, "alignment49");
  GLADE_HOOKUP_OBJECT (main_window, hbox47, "hbox47");
  GLADE_HOOKUP_OBJECT (main_window, image52, "image52");
  GLADE_HOOKUP_OBJECT (main_window, label213, "label213");
  GLADE_HOOKUP_OBJECT (main_window, main_loop_pause, "main_loop_pause");
  GLADE_HOOKUP_OBJECT (main_window, image54, "image54");
  GLADE_HOOKUP_OBJECT (main_window, main_loop_reset, "main_loop_reset");
  GLADE_HOOKUP_OBJECT (main_window, image53, "image53");
  GLADE_HOOKUP_OBJECT (main_window, hseparator1, "hseparator1");
  GLADE_HOOKUP_OBJECT (main_window, main_hbox2, "main_hbox2");
  GLADE_HOOKUP_OBJECT (main_window, main_colorcode_zerolabel, "main_colorcode_zerolabel");
  GLADE_HOOKUP_OBJECT (main_window, main_colorcode_drawingarea, "main_colorcode_drawingarea");
  GLADE_HOOKUP_OBJECT (main_window, main_colorcode_maxlabel, "main_colorcode_maxlabel");
  GLADE_HOOKUP_OBJECT (main_window, main_gain_entry, "main_gain_entry");
  GLADE_HOOKUP_OBJECT (main_window, label10, "label10");
  GLADE_HOOKUP_OBJECT (main_window, main_freq_spinbutton, "main_freq_spinbutton");
  GLADE_HOOKUP_OBJECT (main_window, main_freq_label, "main_freq_label");
  GLADE_HOOKUP_OBJECT (main_window, main_freq_checkbutton, "main_freq_checkbutton");
  GLADE_HOOKUP_OBJECT (main_window, main_new_freq_button, "main_new_freq_button");
  GLADE_HOOKUP_OBJECT (main_window, image46, "image46");
  GLADE_HOOKUP_OBJECT (main_window, frame1, "frame1");
  GLADE_HOOKUP_OBJECT (main_window, alignment1, "alignment1");
  GLADE_HOOKUP_OBJECT (main_window, structure_drawingarea, "structure_drawingarea");
  GLADE_HOOKUP_OBJECT (main_window, struct_label, "struct_label");
  GLADE_HOOKUP_OBJECT_NO_REF (main_window, tooltips, "tooltips");

  gtk_window_add_accel_group (GTK_WINDOW (main_window), accel_group);

  return main_window;
}

GtkWidget*
create_filechooserdialog (void)
{
  GtkWidget *filechooserdialog;
  GtkWidget *dialog_vbox1;
  GtkWidget *dialog_action_area1;
  GtkWidget *filechoser_cancel;
  GtkWidget *filechooser_open;

  filechooserdialog = gtk_file_chooser_dialog_new (_("xnec2c"), NULL, GTK_FILE_CHOOSER_ACTION_OPEN, NULL, NULL);
  gtk_container_set_border_width (GTK_CONTAINER (filechooserdialog), 5);
  g_object_set (filechooserdialog, "show-hidden", TRUE, NULL);
  gtk_window_set_position (GTK_WINDOW (filechooserdialog), GTK_WIN_POS_MOUSE);
  gtk_window_set_type_hint (GTK_WINDOW (filechooserdialog), GDK_WINDOW_TYPE_HINT_DIALOG);

  dialog_vbox1 = GTK_DIALOG (filechooserdialog)->vbox;
  gtk_widget_show (dialog_vbox1);

  dialog_action_area1 = GTK_DIALOG (filechooserdialog)->action_area;
  gtk_widget_show (dialog_action_area1);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);

  filechoser_cancel = gtk_button_new_from_stock ("gtk-cancel");
  gtk_widget_show (filechoser_cancel);
  gtk_dialog_add_action_widget (GTK_DIALOG (filechooserdialog), filechoser_cancel, GTK_RESPONSE_CANCEL);
  gtk_container_set_border_width (GTK_CONTAINER (filechoser_cancel), 2);
  GTK_WIDGET_SET_FLAGS (filechoser_cancel, GTK_CAN_DEFAULT);

  filechooser_open = gtk_button_new_from_stock ("gtk-open");
  gtk_widget_show (filechooser_open);
  gtk_dialog_add_action_widget (GTK_DIALOG (filechooserdialog), filechooser_open, GTK_RESPONSE_OK);
  gtk_container_set_border_width (GTK_CONTAINER (filechooser_open), 2);
  GTK_WIDGET_SET_FLAGS (filechooser_open, GTK_CAN_DEFAULT);

  g_signal_connect ((gpointer) filechooserdialog, "response",
                    G_CALLBACK (on_filechooserdialog_response),
                    NULL);
  g_signal_connect ((gpointer) filechoser_cancel, "clicked",
                    G_CALLBACK (on_filechoser_cancel_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (filechooserdialog, filechooserdialog, "filechooserdialog");
  GLADE_HOOKUP_OBJECT_NO_REF (filechooserdialog, dialog_vbox1, "dialog_vbox1");
  GLADE_HOOKUP_OBJECT_NO_REF (filechooserdialog, dialog_action_area1, "dialog_action_area1");
  GLADE_HOOKUP_OBJECT (filechooserdialog, filechoser_cancel, "filechoser_cancel");
  GLADE_HOOKUP_OBJECT (filechooserdialog, filechooser_open, "filechooser_open");

  gtk_widget_grab_default (filechooser_open);
  return filechooserdialog;
}

GtkWidget*
create_fileselection (void)
{
  GtkWidget *fileselection;
  GtkWidget *ok_button1;
  GtkWidget *fileselection_cancel;

  fileselection = gtk_file_selection_new (_("Select File"));
  gtk_container_set_border_width (GTK_CONTAINER (fileselection), 10);
  gtk_window_set_position (GTK_WINDOW (fileselection), GTK_WIN_POS_MOUSE);
  gtk_window_set_type_hint (GTK_WINDOW (fileselection), GDK_WINDOW_TYPE_HINT_DIALOG);

  ok_button1 = GTK_FILE_SELECTION (fileselection)->ok_button;
  gtk_widget_show (ok_button1);
  GTK_WIDGET_SET_FLAGS (ok_button1, GTK_CAN_DEFAULT);

  fileselection_cancel = GTK_FILE_SELECTION (fileselection)->cancel_button;
  gtk_widget_show (fileselection_cancel);
  GTK_WIDGET_SET_FLAGS (fileselection_cancel, GTK_CAN_DEFAULT);

  g_signal_connect ((gpointer) fileselection, "response",
                    G_CALLBACK (on_fileselection_response),
                    NULL);
  g_signal_connect ((gpointer) fileselection_cancel, "clicked",
                    G_CALLBACK (on_fileselection_cancel_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (fileselection, fileselection, "fileselection");
  GLADE_HOOKUP_OBJECT_NO_REF (fileselection, ok_button1, "ok_button1");
  GLADE_HOOKUP_OBJECT_NO_REF (fileselection, fileselection_cancel, "fileselection_cancel");

  return fileselection;
}

GtkWidget*
create_freqplots_window (void)
{
  GtkWidget *freqplots_window;
  GtkWidget *vbox2;
  GtkWidget *freqplots_hbox1;
  GtkWidget *menubar2;
  GtkWidget *menuitem5;
  GtkWidget *menuitem5_menu;
  GtkWidget *freqplots_new;
  GtkWidget *freqplots_open_input;
  GtkWidget *freqplots_save;
  GtkWidget *freqplots_save_as;
  GtkWidget *separatormenuitem2;
  GtkWidget *freqplots_quit;
  GtkWidget *view_menuitem;
  GtkWidget *view_menuitem_menu;
  GtkWidget *freqplots_pol_menu;
  GtkWidget *freqplots_pol_menu_menu;
  GSList *rdpattern_total_group = NULL;
  GtkWidget *rdpattern_total;
  GtkWidget *rdpattern_horizontal;
  GtkWidget *rdpattern_vertical;
  GtkWidget *rdpattern_right_hand;
  GtkWidget *rdpattern_left_hand;
  GtkWidget *net_gain;
  GtkWidget *menuitem8;
  GtkWidget *hbox10;
  GtkWidget *freqplots_gmax_togglebutton;
  GtkWidget *freqplots_gdir_togglebutton;
  GtkWidget *freqplots_gviewer_togglebutton;
  GtkWidget *freqplots_vswr_togglebutton;
  GtkWidget *freqplots_zrlzim_togglebutton;
  GtkWidget *freqplots_zmgzph_togglebutton;
  GtkWidget *label215;
  GtkWidget *plot_loop_start;
  GtkWidget *image61;
  GtkWidget *plot_loop_pause;
  GtkWidget *image64;
  GtkWidget *plot_loop_reset;
  GtkWidget *image63;
  GtkWidget *hseparator4;
  GtkWidget *hbox15;
  GtkWidget *label16;
  GtkWidget *freqplots_fmhz_entry;
  GtkWidget *label12;
  GtkWidget *freqplots_maxgain_entry;
  GtkWidget *label13;
  GtkWidget *freqplots_vswr_entry;
  GtkWidget *label14;
  GtkWidget *freqplots_zreal_entry;
  GtkWidget *label15;
  GtkWidget *freqplots_zimag_entry;
  GtkWidget *label212;
  GtkObject *freqplots_zo_spinbutton_adj;
  GtkWidget *freqplots_zo_spinbutton;
  GtkWidget *frame2;
  GtkWidget *alignment2;
  GtkWidget *freqplots_drawingarea;
  GtkWidget *freqplots_label;
  GtkAccelGroup *accel_group;
  GtkTooltips *tooltips;

  tooltips = gtk_tooltips_new ();

  accel_group = gtk_accel_group_new ();

  freqplots_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_container_set_border_width (GTK_CONTAINER (freqplots_window), 4);
  gtk_window_set_title (GTK_WINDOW (freqplots_window), _("Xnec2c: Frequency Data Plots"));
  gtk_window_set_gravity (GTK_WINDOW (freqplots_window), GDK_GRAVITY_EAST);

  vbox2 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox2);
  gtk_container_add (GTK_CONTAINER (freqplots_window), vbox2);

  freqplots_hbox1 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (freqplots_hbox1);
  gtk_box_pack_start (GTK_BOX (vbox2), freqplots_hbox1, FALSE, FALSE, 0);

  menubar2 = gtk_menu_bar_new ();
  gtk_widget_show (menubar2);
  gtk_box_pack_start (GTK_BOX (freqplots_hbox1), menubar2, FALSE, FALSE, 0);

  menuitem5 = gtk_menu_item_new_with_mnemonic (_("_File"));
  gtk_widget_show (menuitem5);
  gtk_container_add (GTK_CONTAINER (menubar2), menuitem5);

  menuitem5_menu = gtk_menu_new ();
  gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem5), menuitem5_menu);

  freqplots_new = gtk_image_menu_item_new_from_stock ("gtk-new", accel_group);
  gtk_widget_show (freqplots_new);
  gtk_container_add (GTK_CONTAINER (menuitem5_menu), freqplots_new);

  freqplots_open_input = gtk_image_menu_item_new_from_stock ("gtk-open", accel_group);
  gtk_widget_show (freqplots_open_input);
  gtk_container_add (GTK_CONTAINER (menuitem5_menu), freqplots_open_input);

  freqplots_save = gtk_image_menu_item_new_from_stock ("gtk-save", accel_group);
  gtk_widget_show (freqplots_save);
  gtk_container_add (GTK_CONTAINER (menuitem5_menu), freqplots_save);

  freqplots_save_as = gtk_image_menu_item_new_from_stock ("gtk-save-as", accel_group);
  gtk_widget_show (freqplots_save_as);
  gtk_container_add (GTK_CONTAINER (menuitem5_menu), freqplots_save_as);

  separatormenuitem2 = gtk_separator_menu_item_new ();
  gtk_widget_show (separatormenuitem2);
  gtk_container_add (GTK_CONTAINER (menuitem5_menu), separatormenuitem2);
  gtk_widget_set_sensitive (separatormenuitem2, FALSE);

  freqplots_quit = gtk_image_menu_item_new_from_stock ("gtk-quit", accel_group);
  gtk_widget_show (freqplots_quit);
  gtk_container_add (GTK_CONTAINER (menuitem5_menu), freqplots_quit);

  view_menuitem = gtk_menu_item_new_with_mnemonic (_("_View"));
  gtk_widget_show (view_menuitem);
  gtk_container_add (GTK_CONTAINER (menubar2), view_menuitem);

  view_menuitem_menu = gtk_menu_new ();
  gtk_menu_item_set_submenu (GTK_MENU_ITEM (view_menuitem), view_menuitem_menu);

  freqplots_pol_menu = gtk_menu_item_new_with_mnemonic (_("Polarization"));
  gtk_widget_show (freqplots_pol_menu);
  gtk_container_add (GTK_CONTAINER (view_menuitem_menu), freqplots_pol_menu);
  gtk_tooltips_set_tip (tooltips, freqplots_pol_menu, _("Disply gain data relevant to polarization"), NULL);

  freqplots_pol_menu_menu = gtk_menu_new ();
  gtk_menu_item_set_submenu (GTK_MENU_ITEM (freqplots_pol_menu), freqplots_pol_menu_menu);

  rdpattern_total = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Total"));
  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_total));
  gtk_widget_show (rdpattern_total);
  gtk_container_add (GTK_CONTAINER (freqplots_pol_menu_menu), rdpattern_total);
  gtk_tooltips_set_tip (tooltips, rdpattern_total, _("Total gain"), NULL);
  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (rdpattern_total), TRUE);

  rdpattern_horizontal = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Horizontal"));
  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_horizontal));
  gtk_widget_show (rdpattern_horizontal);
  gtk_container_add (GTK_CONTAINER (freqplots_pol_menu_menu), rdpattern_horizontal);
  gtk_tooltips_set_tip (tooltips, rdpattern_horizontal, _("Gain in horizontal polarization"), NULL);

  rdpattern_vertical = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Vertical"));
  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_vertical));
  gtk_widget_show (rdpattern_vertical);
  gtk_container_add (GTK_CONTAINER (freqplots_pol_menu_menu), rdpattern_vertical);
  gtk_tooltips_set_tip (tooltips, rdpattern_vertical, _("Plot gain in vertical polarization"), NULL);

  rdpattern_right_hand = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Right Hand"));
  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_right_hand));
  gtk_widget_show (rdpattern_right_hand);
  gtk_container_add (GTK_CONTAINER (freqplots_pol_menu_menu), rdpattern_right_hand);
  gtk_tooltips_set_tip (tooltips, rdpattern_right_hand, _("Plot gain in rhcp"), NULL);

  rdpattern_left_hand = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Left Hand"));
  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_left_hand));
  gtk_widget_show (rdpattern_left_hand);
  gtk_container_add (GTK_CONTAINER (freqplots_pol_menu_menu), rdpattern_left_hand);
  gtk_tooltips_set_tip (tooltips, rdpattern_left_hand, _("Plot gain in lhcp"), NULL);

  net_gain = gtk_check_menu_item_new_with_mnemonic (_("Net Gain"));
  gtk_widget_show (net_gain);
  gtk_container_add (GTK_CONTAINER (view_menuitem_menu), net_gain);
  gtk_tooltips_set_tip (tooltips, net_gain, _("Display Net Gain towards Viewer"), NULL);

  menuitem8 = gtk_menu_item_new_with_mnemonic (_("_Help"));
  gtk_widget_show (menuitem8);
  gtk_container_add (GTK_CONTAINER (menubar2), menuitem8);

  hbox10 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox10);
  gtk_box_pack_start (GTK_BOX (freqplots_hbox1), hbox10, FALSE, FALSE, 0);

  freqplots_gmax_togglebutton = gtk_toggle_button_new_with_mnemonic (_("Max Gain"));
  gtk_widget_show (freqplots_gmax_togglebutton);
  gtk_box_pack_start (GTK_BOX (hbox10), freqplots_gmax_togglebutton, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, freqplots_gmax_togglebutton, _("Plot maximum gain over frequency range"), NULL);

  freqplots_gdir_togglebutton = gtk_toggle_button_new_with_mnemonic (_("Direct."));
  gtk_widget_show (freqplots_gdir_togglebutton);
  gtk_box_pack_start (GTK_BOX (hbox10), freqplots_gdir_togglebutton, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, freqplots_gdir_togglebutton, _("Plot direction of maximum gain"), NULL);

  freqplots_gviewer_togglebutton = gtk_toggle_button_new_with_mnemonic (_("Viewer"));
  gtk_widget_show (freqplots_gviewer_togglebutton);
  gtk_box_pack_start (GTK_BOX (hbox10), freqplots_gviewer_togglebutton, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, freqplots_gviewer_togglebutton, _("Plot gain in direction of viewer\n(perpenticular to screen)"), NULL);

  freqplots_vswr_togglebutton = gtk_toggle_button_new_with_mnemonic (_("VSWR"));
  gtk_widget_show (freqplots_vswr_togglebutton);
  gtk_box_pack_start (GTK_BOX (hbox10), freqplots_vswr_togglebutton, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, freqplots_vswr_togglebutton, _("Plot VSWR over frequency"), NULL);

  freqplots_zrlzim_togglebutton = gtk_toggle_button_new_with_mnemonic (_("Zr/Zi"));
  gtk_widget_show (freqplots_zrlzim_togglebutton);
  gtk_box_pack_start (GTK_BOX (hbox10), freqplots_zrlzim_togglebutton, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, freqplots_zrlzim_togglebutton, _("Plot real and imaginary input impedances"), NULL);

  freqplots_zmgzph_togglebutton = gtk_toggle_button_new_with_mnemonic (_("Zm/Zph"));
  gtk_widget_show (freqplots_zmgzph_togglebutton);
  gtk_box_pack_start (GTK_BOX (hbox10), freqplots_zmgzph_togglebutton, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, freqplots_zmgzph_togglebutton, _("Plot magnitude and phase of input impedance"), NULL);

  label215 = gtk_label_new (_("  Loop "));
  gtk_widget_show (label215);
  gtk_box_pack_start (GTK_BOX (hbox10), label215, FALSE, FALSE, 0);

  plot_loop_start = gtk_button_new ();
  gtk_widget_show (plot_loop_start);
  gtk_box_pack_start (GTK_BOX (freqplots_hbox1), plot_loop_start, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, plot_loop_start, _("Start Frequency Loop"), NULL);

  image61 = gtk_image_new_from_stock ("gtk-media-play", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image61);
  gtk_container_add (GTK_CONTAINER (plot_loop_start), image61);

  plot_loop_pause = gtk_button_new ();
  gtk_widget_show (plot_loop_pause);
  gtk_box_pack_start (GTK_BOX (freqplots_hbox1), plot_loop_pause, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, plot_loop_pause, _("Pause Frequency Loop"), NULL);

  image64 = gtk_image_new_from_stock ("gtk-media-pause", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image64);
  gtk_container_add (GTK_CONTAINER (plot_loop_pause), image64);

  plot_loop_reset = gtk_button_new ();
  gtk_widget_show (plot_loop_reset);
  gtk_box_pack_start (GTK_BOX (freqplots_hbox1), plot_loop_reset, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, plot_loop_reset, _("Reset Frequency Loop"), NULL);

  image63 = gtk_image_new_from_stock ("gtk-media-rewind", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image63);
  gtk_container_add (GTK_CONTAINER (plot_loop_reset), image63);

  hseparator4 = gtk_hseparator_new ();
  gtk_widget_show (hseparator4);
  gtk_box_pack_start (GTK_BOX (vbox2), hseparator4, FALSE, FALSE, 4);

  hbox15 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox15);
  gtk_box_pack_start (GTK_BOX (vbox2), hbox15, FALSE, FALSE, 0);

  label16 = gtk_label_new (_("F MHz"));
  gtk_widget_show (label16);
  gtk_box_pack_start (GTK_BOX (hbox15), label16, FALSE, FALSE, 0);

  freqplots_fmhz_entry = gtk_entry_new ();
  gtk_widget_show (freqplots_fmhz_entry);
  gtk_box_pack_start (GTK_BOX (hbox15), freqplots_fmhz_entry, FALSE, FALSE, 0);
  gtk_entry_set_width_chars (GTK_ENTRY (freqplots_fmhz_entry), 8);

  label12 = gtk_label_new (_(" Max Gain"));
  gtk_widget_show (label12);
  gtk_box_pack_start (GTK_BOX (hbox15), label12, FALSE, FALSE, 0);

  freqplots_maxgain_entry = gtk_entry_new ();
  gtk_widget_show (freqplots_maxgain_entry);
  gtk_box_pack_start (GTK_BOX (hbox15), freqplots_maxgain_entry, FALSE, FALSE, 0);
  gtk_entry_set_width_chars (GTK_ENTRY (freqplots_maxgain_entry), 5);

  label13 = gtk_label_new (_(" VSWR"));
  gtk_widget_show (label13);
  gtk_box_pack_start (GTK_BOX (hbox15), label13, FALSE, FALSE, 1);

  freqplots_vswr_entry = gtk_entry_new ();
  gtk_widget_show (freqplots_vswr_entry);
  gtk_box_pack_start (GTK_BOX (hbox15), freqplots_vswr_entry, FALSE, FALSE, 0);
  gtk_entry_set_width_chars (GTK_ENTRY (freqplots_vswr_entry), 5);

  label14 = gtk_label_new (_(" Zreal"));
  gtk_widget_show (label14);
  gtk_box_pack_start (GTK_BOX (hbox15), label14, FALSE, FALSE, 1);

  freqplots_zreal_entry = gtk_entry_new ();
  gtk_widget_show (freqplots_zreal_entry);
  gtk_box_pack_start (GTK_BOX (hbox15), freqplots_zreal_entry, FALSE, FALSE, 0);
  gtk_entry_set_width_chars (GTK_ENTRY (freqplots_zreal_entry), 5);

  label15 = gtk_label_new (_(" Zim"));
  gtk_widget_show (label15);
  gtk_box_pack_start (GTK_BOX (hbox15), label15, FALSE, FALSE, 1);

  freqplots_zimag_entry = gtk_entry_new ();
  gtk_widget_show (freqplots_zimag_entry);
  gtk_box_pack_start (GTK_BOX (hbox15), freqplots_zimag_entry, FALSE, FALSE, 0);
  gtk_entry_set_width_chars (GTK_ENTRY (freqplots_zimag_entry), 5);

  label212 = gtk_label_new (_(" Zo"));
  gtk_widget_show (label212);
  gtk_box_pack_start (GTK_BOX (hbox15), label212, FALSE, FALSE, 0);

  freqplots_zo_spinbutton_adj = gtk_adjustment_new (50, 1, 999, 0.10000000149, 10, 0);
  freqplots_zo_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (freqplots_zo_spinbutton_adj), 0.20000000298, 1);
  gtk_widget_show (freqplots_zo_spinbutton);
  gtk_box_pack_start (GTK_BOX (hbox15), freqplots_zo_spinbutton, FALSE, FALSE, 4);
  gtk_tooltips_set_tip (tooltips, freqplots_zo_spinbutton, _("Specify Zo of transmission line"), NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (freqplots_zo_spinbutton), TRUE);

  frame2 = gtk_frame_new (NULL);
  gtk_widget_show (frame2);
  gtk_box_pack_start (GTK_BOX (vbox2), frame2, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frame2), 4);

  alignment2 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment2);
  gtk_container_add (GTK_CONTAINER (frame2), alignment2);
  gtk_container_set_border_width (GTK_CONTAINER (alignment2), 2);

  freqplots_drawingarea = gtk_drawing_area_new ();
  gtk_widget_show (freqplots_drawingarea);
  gtk_container_add (GTK_CONTAINER (alignment2), freqplots_drawingarea);
  gtk_widget_set_size_request (freqplots_drawingarea, 600, 600);
  GTK_WIDGET_SET_FLAGS (freqplots_drawingarea, GTK_CAN_FOCUS);
  gtk_widget_set_events (freqplots_drawingarea, GDK_BUTTON_PRESS_MASK);

  freqplots_label = gtk_label_new (_("Structure Data Plots"));
  gtk_widget_show (freqplots_label);
  gtk_frame_set_label_widget (GTK_FRAME (frame2), freqplots_label);
  gtk_misc_set_padding (GTK_MISC (freqplots_label), 4, 0);

  g_signal_connect ((gpointer) freqplots_window, "delete_event",
                    G_CALLBACK (on_freqplots_window_delete_event),
                    NULL);
  g_signal_connect ((gpointer) freqplots_window, "destroy",
                    G_CALLBACK (on_freqplots_window_destroy),
                    NULL);
  g_signal_connect ((gpointer) freqplots_new, "activate",
                    G_CALLBACK (on_new_activate),
                    NULL);
  g_signal_connect ((gpointer) freqplots_open_input, "activate",
                    G_CALLBACK (on_open_input_activate),
                    NULL);
  g_signal_connect ((gpointer) freqplots_save, "activate",
                    G_CALLBACK (on_freqplots_save_activate),
                    NULL);
  g_signal_connect ((gpointer) freqplots_save_as, "activate",
                    G_CALLBACK (on_freqplots_save_as_activate),
                    NULL);
  g_signal_connect ((gpointer) freqplots_quit, "activate",
                    G_CALLBACK (on_quit_activate),
                    NULL);
  g_signal_connect ((gpointer) freqplots_pol_menu, "activate",
                    G_CALLBACK (freqplots_pol_menu_activate),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_total, "activate",
                    G_CALLBACK (on_rdpattern_total_activate),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_horizontal, "activate",
                    G_CALLBACK (on_rdpattern_horizontal_activate),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_vertical, "activate",
                    G_CALLBACK (on_rdpattern_vertical_activate),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_right_hand, "activate",
                    G_CALLBACK (on_rdpattern_right_hand_activate),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_left_hand, "activate",
                    G_CALLBACK (on_rdpattern_left_hand_activate),
                    NULL);
  g_signal_connect ((gpointer) net_gain, "activate",
                    G_CALLBACK (on_net_gain_activate),
                    NULL);
  g_signal_connect ((gpointer) freqplots_gmax_togglebutton, "toggled",
                    G_CALLBACK (on_freqplots_gmax_togglebutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) freqplots_gdir_togglebutton, "toggled",
                    G_CALLBACK (on_freqplots_gdir_togglebutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) freqplots_gviewer_togglebutton, "toggled",
                    G_CALLBACK (on_freqplots_gviewer_togglebutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) freqplots_vswr_togglebutton, "toggled",
                    G_CALLBACK (on_freqplots_vswr_togglebutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) freqplots_zrlzim_togglebutton, "toggled",
                    G_CALLBACK (on_freqplots_zrlzim_togglebutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) freqplots_zmgzph_togglebutton, "toggled",
                    G_CALLBACK (on_freqplots_zmgzph_togglebutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) plot_loop_start, "clicked",
                    G_CALLBACK (on_loop_start_clicked),
                    NULL);
  g_signal_connect ((gpointer) plot_loop_pause, "clicked",
                    G_CALLBACK (on_loop_pause_clicked),
                    NULL);
  g_signal_connect ((gpointer) plot_loop_reset, "clicked",
                    G_CALLBACK (on_loop_reset_clicked),
                    NULL);
  g_signal_connect ((gpointer) freqplots_zo_spinbutton, "value_changed",
                    G_CALLBACK (on_freqplots_zo_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) freqplots_drawingarea, "expose_event",
                    G_CALLBACK (on_freqplots_drawingarea_expose_event),
                    NULL);
  g_signal_connect ((gpointer) freqplots_drawingarea, "configure_event",
                    G_CALLBACK (on_freqplots_drawingarea_configure_event),
                    NULL);
  g_signal_connect ((gpointer) freqplots_drawingarea, "button_press_event",
                    G_CALLBACK (on_freqplots_drawingarea_button_press_event),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (freqplots_window, freqplots_window, "freqplots_window");
  GLADE_HOOKUP_OBJECT (freqplots_window, vbox2, "vbox2");
  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_hbox1, "freqplots_hbox1");
  GLADE_HOOKUP_OBJECT (freqplots_window, menubar2, "menubar2");
  GLADE_HOOKUP_OBJECT (freqplots_window, menuitem5, "menuitem5");
  GLADE_HOOKUP_OBJECT (freqplots_window, menuitem5_menu, "menuitem5_menu");
  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_new, "freqplots_new");
  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_open_input, "freqplots_open_input");
  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_save, "freqplots_save");
  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_save_as, "freqplots_save_as");
  GLADE_HOOKUP_OBJECT (freqplots_window, separatormenuitem2, "separatormenuitem2");
  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_quit, "freqplots_quit");
  GLADE_HOOKUP_OBJECT (freqplots_window, view_menuitem, "view_menuitem");
  GLADE_HOOKUP_OBJECT (freqplots_window, view_menuitem_menu, "view_menuitem_menu");
  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_pol_menu, "freqplots_pol_menu");
  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_pol_menu_menu, "freqplots_pol_menu_menu");
  GLADE_HOOKUP_OBJECT (freqplots_window, rdpattern_total, "rdpattern_total");
  GLADE_HOOKUP_OBJECT (freqplots_window, rdpattern_horizontal, "rdpattern_horizontal");
  GLADE_HOOKUP_OBJECT (freqplots_window, rdpattern_vertical, "rdpattern_vertical");
  GLADE_HOOKUP_OBJECT (freqplots_window, rdpattern_right_hand, "rdpattern_right_hand");
  GLADE_HOOKUP_OBJECT (freqplots_window, rdpattern_left_hand, "rdpattern_left_hand");
  GLADE_HOOKUP_OBJECT (freqplots_window, net_gain, "net_gain");
  GLADE_HOOKUP_OBJECT (freqplots_window, menuitem8, "menuitem8");
  GLADE_HOOKUP_OBJECT (freqplots_window, hbox10, "hbox10");
  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_gmax_togglebutton, "freqplots_gmax_togglebutton");
  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_gdir_togglebutton, "freqplots_gdir_togglebutton");
  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_gviewer_togglebutton, "freqplots_gviewer_togglebutton");
  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_vswr_togglebutton, "freqplots_vswr_togglebutton");
  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_zrlzim_togglebutton, "freqplots_zrlzim_togglebutton");
  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_zmgzph_togglebutton, "freqplots_zmgzph_togglebutton");
  GLADE_HOOKUP_OBJECT (freqplots_window, label215, "label215");
  GLADE_HOOKUP_OBJECT (freqplots_window, plot_loop_start, "plot_loop_start");
  GLADE_HOOKUP_OBJECT (freqplots_window, image61, "image61");
  GLADE_HOOKUP_OBJECT (freqplots_window, plot_loop_pause, "plot_loop_pause");
  GLADE_HOOKUP_OBJECT (freqplots_window, image64, "image64");
  GLADE_HOOKUP_OBJECT (freqplots_window, plot_loop_reset, "plot_loop_reset");
  GLADE_HOOKUP_OBJECT (freqplots_window, image63, "image63");
  GLADE_HOOKUP_OBJECT (freqplots_window, hseparator4, "hseparator4");
  GLADE_HOOKUP_OBJECT (freqplots_window, hbox15, "hbox15");
  GLADE_HOOKUP_OBJECT (freqplots_window, label16, "label16");
  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_fmhz_entry, "freqplots_fmhz_entry");
  GLADE_HOOKUP_OBJECT (freqplots_window, label12, "label12");
  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_maxgain_entry, "freqplots_maxgain_entry");
  GLADE_HOOKUP_OBJECT (freqplots_window, label13, "label13");
  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_vswr_entry, "freqplots_vswr_entry");
  GLADE_HOOKUP_OBJECT (freqplots_window, label14, "label14");
  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_zreal_entry, "freqplots_zreal_entry");
  GLADE_HOOKUP_OBJECT (freqplots_window, label15, "label15");
  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_zimag_entry, "freqplots_zimag_entry");
  GLADE_HOOKUP_OBJECT (freqplots_window, label212, "label212");
  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_zo_spinbutton, "freqplots_zo_spinbutton");
  GLADE_HOOKUP_OBJECT (freqplots_window, frame2, "frame2");
  GLADE_HOOKUP_OBJECT (freqplots_window, alignment2, "alignment2");
  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_drawingarea, "freqplots_drawingarea");
  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_label, "freqplots_label");
  GLADE_HOOKUP_OBJECT_NO_REF (freqplots_window, tooltips, "tooltips");

  gtk_window_add_accel_group (GTK_WINDOW (freqplots_window), accel_group);

  return freqplots_window;
}

GtkWidget*
create_rdpattern_window (void)
{
  GtkWidget *rdpattern_window;
  GtkWidget *vbox3;
  GtkWidget *hbox11;
  GtkWidget *menubar3;
  GtkWidget *menuitem9;
  GtkWidget *menuitem9_menu;
  GtkWidget *rdpattern_new;
  GtkWidget *rdpattern_open;
  GtkWidget *rdpattern_save;
  GtkWidget *rdpattern_save_as;
  GtkWidget *separatormenuitem3;
  GtkWidget *rdpattern_quit;
  GtkWidget *rdpattern_view_menuitem;
  GtkWidget *rdpattern_view_menuitem_menu;
  GtkWidget *rdpattern_pol_menu;
  GtkWidget *rdpattern_pol_menu_menu;
  GSList *rdpattern_total_group = NULL;
  GtkWidget *rdpattern_total;
  GtkWidget *rdpattern_horizontal;
  GtkWidget *rdpattern_vertical;
  GtkWidget *rdpattern_right_hand;
  GtkWidget *rdpattern_left_hand;
  GtkWidget *rdpattern_gain_scaling;
  GtkWidget *rdpattern_gain_scaling_menu;
  GSList *rdpattern_linear_power_group = NULL;
  GtkWidget *rdpattern_linear_power;
  GtkWidget *rdpattern_linear_voltage;
  GtkWidget *rdpattern_arrl_style;
  GtkWidget *rdpattern_logarithmic;
  GtkWidget *near_field;
  GtkWidget *near_field_menu;
  GtkWidget *rdpattern_e_field;
  GtkWidget *rdpattern_h_field;
  GtkWidget *rdpattern_poynting_vector;
  GtkWidget *rdpattern_animate;
  GtkWidget *total_field;
  GtkWidget *total_field_menu;
  GSList *near_peak_value_group = NULL;
  GtkWidget *near_peak_value;
  GtkWidget *near_snapshot;
  GtkWidget *rdpattern_overlay_struct;
  GtkWidget *common_projection;
  GtkWidget *common_freq;
  GtkWidget *menuitem12;
  GtkWidget *rdpattern_hbox1;
  GtkWidget *rdpattern_x_axis;
  GtkWidget *rdpattern_y_axis;
  GtkWidget *rdpattern_z_axis;
  GtkWidget *rdpattern_default_view;
  GtkWidget *image34;
  GtkWidget *vseparator4;
  GtkWidget *image55;
  GtkObject *rdpattern_rotate_spinbutton_adj;
  GtkWidget *rdpattern_rotate_spinbutton;
  GtkWidget *image56;
  GtkObject *rdpattern_incline_spinbutton_adj;
  GtkWidget *rdpattern_incline_spinbutton;
  GtkWidget *vseparator5;
  GtkWidget *rdpattern_gain_togglebutton;
  GtkWidget *rdpattern_eh_togglebutton;
  GtkWidget *label216;
  GtkWidget *rdpatttern_loop_start;
  GtkWidget *image59;
  GtkWidget *rdpattern_loop_pause;
  GtkWidget *image60;
  GtkWidget *rdpattern_loop_reset;
  GtkWidget *image58;
  GtkWidget *hseparator3;
  GtkWidget *rdpattern_hbox2;
  GtkWidget *rdpattern_colorcode_minlabel;
  GtkWidget *rdpattern_colorcode_drawingarea;
  GtkWidget *rdpattern_colorcode_maxlabel;
  GtkWidget *rdpattern_viewer_gain;
  GtkWidget *label11;
  GtkObject *rdpattern_freq_spinbutton_adj;
  GtkWidget *rdpattern_freq_spinbutton;
  GtkWidget *rdpattern_freq_label;
  GtkWidget *rdpattern_freq_checkbutton;
  GtkWidget *rdpattern_new_freq_button;
  GtkWidget *image49;
  GtkWidget *frame3;
  GtkWidget *alignment3;
  GtkWidget *rdpattern_drawingarea;
  GtkWidget *rdpattern_label;
  GtkAccelGroup *accel_group;
  GtkTooltips *tooltips;

  tooltips = gtk_tooltips_new ();

  accel_group = gtk_accel_group_new ();

  rdpattern_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_container_set_border_width (GTK_CONTAINER (rdpattern_window), 4);
  gtk_window_set_title (GTK_WINDOW (rdpattern_window), _("Xnec2c: Radiation Patterns"));
  gtk_window_set_gravity (GTK_WINDOW (rdpattern_window), GDK_GRAVITY_WEST);

  vbox3 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox3);
  gtk_container_add (GTK_CONTAINER (rdpattern_window), vbox3);

  hbox11 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox11);
  gtk_box_pack_start (GTK_BOX (vbox3), hbox11, FALSE, FALSE, 0);

  menubar3 = gtk_menu_bar_new ();
  gtk_widget_show (menubar3);
  gtk_box_pack_start (GTK_BOX (hbox11), menubar3, FALSE, FALSE, 0);

  menuitem9 = gtk_menu_item_new_with_mnemonic (_("_File"));
  gtk_widget_show (menuitem9);
  gtk_container_add (GTK_CONTAINER (menubar3), menuitem9);

  menuitem9_menu = gtk_menu_new ();
  gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem9), menuitem9_menu);

  rdpattern_new = gtk_image_menu_item_new_from_stock ("gtk-new", accel_group);
  gtk_widget_show (rdpattern_new);
  gtk_container_add (GTK_CONTAINER (menuitem9_menu), rdpattern_new);

  rdpattern_open = gtk_image_menu_item_new_from_stock ("gtk-open", accel_group);
  gtk_widget_show (rdpattern_open);
  gtk_container_add (GTK_CONTAINER (menuitem9_menu), rdpattern_open);

  rdpattern_save = gtk_image_menu_item_new_from_stock ("gtk-save", accel_group);
  gtk_widget_show (rdpattern_save);
  gtk_container_add (GTK_CONTAINER (menuitem9_menu), rdpattern_save);

  rdpattern_save_as = gtk_image_menu_item_new_from_stock ("gtk-save-as", accel_group);
  gtk_widget_show (rdpattern_save_as);
  gtk_container_add (GTK_CONTAINER (menuitem9_menu), rdpattern_save_as);

  separatormenuitem3 = gtk_separator_menu_item_new ();
  gtk_widget_show (separatormenuitem3);
  gtk_container_add (GTK_CONTAINER (menuitem9_menu), separatormenuitem3);
  gtk_widget_set_sensitive (separatormenuitem3, FALSE);

  rdpattern_quit = gtk_image_menu_item_new_from_stock ("gtk-quit", accel_group);
  gtk_widget_show (rdpattern_quit);
  gtk_container_add (GTK_CONTAINER (menuitem9_menu), rdpattern_quit);

  rdpattern_view_menuitem = gtk_menu_item_new_with_mnemonic (_("_View"));
  gtk_widget_show (rdpattern_view_menuitem);
  gtk_container_add (GTK_CONTAINER (menubar3), rdpattern_view_menuitem);

  rdpattern_view_menuitem_menu = gtk_menu_new ();
  gtk_menu_item_set_submenu (GTK_MENU_ITEM (rdpattern_view_menuitem), rdpattern_view_menuitem_menu);

  rdpattern_pol_menu = gtk_menu_item_new_with_mnemonic (_("Polarization"));
  gtk_widget_show (rdpattern_pol_menu);
  gtk_container_add (GTK_CONTAINER (rdpattern_view_menuitem_menu), rdpattern_pol_menu);
  gtk_tooltips_set_tip (tooltips, rdpattern_pol_menu, _("Display gain data relevant to polarization"), NULL);

  rdpattern_pol_menu_menu = gtk_menu_new ();
  gtk_menu_item_set_submenu (GTK_MENU_ITEM (rdpattern_pol_menu), rdpattern_pol_menu_menu);

  rdpattern_total = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Total"));
  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_total));
  gtk_widget_show (rdpattern_total);
  gtk_container_add (GTK_CONTAINER (rdpattern_pol_menu_menu), rdpattern_total);
  gtk_tooltips_set_tip (tooltips, rdpattern_total, _("Total gain"), NULL);
  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (rdpattern_total), TRUE);

  rdpattern_horizontal = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Horizontal"));
  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_horizontal));
  gtk_widget_show (rdpattern_horizontal);
  gtk_container_add (GTK_CONTAINER (rdpattern_pol_menu_menu), rdpattern_horizontal);
  gtk_tooltips_set_tip (tooltips, rdpattern_horizontal, _("Gain in horizontal polarization"), NULL);

  rdpattern_vertical = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Vertical"));
  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_vertical));
  gtk_widget_show (rdpattern_vertical);
  gtk_container_add (GTK_CONTAINER (rdpattern_pol_menu_menu), rdpattern_vertical);
  gtk_tooltips_set_tip (tooltips, rdpattern_vertical, _("Gain in vertical polarization"), NULL);

  rdpattern_right_hand = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Right Hand"));
  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_right_hand));
  gtk_widget_show (rdpattern_right_hand);
  gtk_container_add (GTK_CONTAINER (rdpattern_pol_menu_menu), rdpattern_right_hand);
  gtk_tooltips_set_tip (tooltips, rdpattern_right_hand, _("Gain in rhcp"), NULL);

  rdpattern_left_hand = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Left Hand"));
  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_left_hand));
  gtk_widget_show (rdpattern_left_hand);
  gtk_container_add (GTK_CONTAINER (rdpattern_pol_menu_menu), rdpattern_left_hand);
  gtk_tooltips_set_tip (tooltips, rdpattern_left_hand, _("Gain in lhcp"), NULL);

  rdpattern_gain_scaling = gtk_menu_item_new_with_mnemonic (_("Gain Scaling"));
  gtk_widget_show (rdpattern_gain_scaling);
  gtk_container_add (GTK_CONTAINER (rdpattern_view_menuitem_menu), rdpattern_gain_scaling);
  gtk_tooltips_set_tip (tooltips, rdpattern_gain_scaling, _("Select a style of gain scaling"), NULL);

  rdpattern_gain_scaling_menu = gtk_menu_new ();
  gtk_menu_item_set_submenu (GTK_MENU_ITEM (rdpattern_gain_scaling), rdpattern_gain_scaling_menu);

  rdpattern_linear_power = gtk_radio_menu_item_new_with_mnemonic (rdpattern_linear_power_group, _("Linear Power"));
  rdpattern_linear_power_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_linear_power));
  gtk_widget_show (rdpattern_linear_power);
  gtk_container_add (GTK_CONTAINER (rdpattern_gain_scaling_menu), rdpattern_linear_power);
  gtk_tooltips_set_tip (tooltips, rdpattern_linear_power, _("Linear power scaling"), NULL);
  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (rdpattern_linear_power), TRUE);

  rdpattern_linear_voltage = gtk_radio_menu_item_new_with_mnemonic (rdpattern_linear_power_group, _("Linear Voltage"));
  rdpattern_linear_power_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_linear_voltage));
  gtk_widget_show (rdpattern_linear_voltage);
  gtk_container_add (GTK_CONTAINER (rdpattern_gain_scaling_menu), rdpattern_linear_voltage);
  gtk_tooltips_set_tip (tooltips, rdpattern_linear_voltage, _("Linear field voltage scaling"), NULL);

  rdpattern_arrl_style = gtk_radio_menu_item_new_with_mnemonic (rdpattern_linear_power_group, _("ARRL Style"));
  rdpattern_linear_power_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_arrl_style));
  gtk_widget_show (rdpattern_arrl_style);
  gtk_container_add (GTK_CONTAINER (rdpattern_gain_scaling_menu), rdpattern_arrl_style);
  gtk_tooltips_set_tip (tooltips, rdpattern_arrl_style, _("Scale gain in ARRL style"), NULL);

  rdpattern_logarithmic = gtk_radio_menu_item_new_with_mnemonic (rdpattern_linear_power_group, _("Logarithmic"));
  rdpattern_linear_power_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_logarithmic));
  gtk_widget_show (rdpattern_logarithmic);
  gtk_container_add (GTK_CONTAINER (rdpattern_gain_scaling_menu), rdpattern_logarithmic);
  gtk_tooltips_set_tip (tooltips, rdpattern_logarithmic, _("Logarithmic gain scaling"), NULL);

  near_field = gtk_menu_item_new_with_mnemonic (_("Near Field"));
  gtk_widget_show (near_field);
  gtk_container_add (GTK_CONTAINER (rdpattern_view_menuitem_menu), near_field);

  near_field_menu = gtk_menu_new ();
  gtk_menu_item_set_submenu (GTK_MENU_ITEM (near_field), near_field_menu);

  rdpattern_e_field = gtk_check_menu_item_new_with_mnemonic (_("Near E Field"));
  gtk_widget_show (rdpattern_e_field);
  gtk_container_add (GTK_CONTAINER (near_field_menu), rdpattern_e_field);
  gtk_tooltips_set_tip (tooltips, rdpattern_e_field, _("Display near E field"), NULL);

  rdpattern_h_field = gtk_check_menu_item_new_with_mnemonic (_("Near H Field"));
  gtk_widget_show (rdpattern_h_field);
  gtk_container_add (GTK_CONTAINER (near_field_menu), rdpattern_h_field);
  gtk_tooltips_set_tip (tooltips, rdpattern_h_field, _("Display near H field"), NULL);

  rdpattern_poynting_vector = gtk_check_menu_item_new_with_mnemonic (_("Poynting Vector"));
  gtk_widget_show (rdpattern_poynting_vector);
  gtk_container_add (GTK_CONTAINER (near_field_menu), rdpattern_poynting_vector);
  gtk_tooltips_set_tip (tooltips, rdpattern_poynting_vector, _("Display Poynting vector"), NULL);

  rdpattern_animate = gtk_menu_item_new_with_mnemonic (_("Animate Dialog"));
  gtk_widget_show (rdpattern_animate);
  gtk_container_add (GTK_CONTAINER (near_field_menu), rdpattern_animate);

  total_field = gtk_menu_item_new_with_mnemonic (_("Total Field"));
  gtk_widget_show (total_field);
  gtk_container_add (GTK_CONTAINER (near_field_menu), total_field);

  total_field_menu = gtk_menu_new ();
  gtk_menu_item_set_submenu (GTK_MENU_ITEM (total_field), total_field_menu);

  near_peak_value = gtk_radio_menu_item_new_with_mnemonic (near_peak_value_group, _("Peak Value"));
  near_peak_value_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (near_peak_value));
  gtk_widget_show (near_peak_value);
  gtk_container_add (GTK_CONTAINER (total_field_menu), near_peak_value);
  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (near_peak_value), TRUE);

  near_snapshot = gtk_radio_menu_item_new_with_mnemonic (near_peak_value_group, _("Snapshot"));
  near_peak_value_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (near_snapshot));
  gtk_widget_show (near_snapshot);
  gtk_container_add (GTK_CONTAINER (total_field_menu), near_snapshot);

  rdpattern_overlay_struct = gtk_check_menu_item_new_with_mnemonic (_("Overlay Structure"));
  gtk_widget_show (rdpattern_overlay_struct);
  gtk_container_add (GTK_CONTAINER (near_field_menu), rdpattern_overlay_struct);
  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (rdpattern_overlay_struct), TRUE);

  common_projection = gtk_check_menu_item_new_with_mnemonic (_("Common Projection"));
  gtk_widget_show (common_projection);
  gtk_container_add (GTK_CONTAINER (rdpattern_view_menuitem_menu), common_projection);
  gtk_tooltips_set_tip (tooltips, common_projection, _("Synchronize projection parametrs in different windows"), NULL);
  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (common_projection), TRUE);

  common_freq = gtk_check_menu_item_new_with_mnemonic (_("Common Frequency"));
  gtk_widget_show (common_freq);
  gtk_container_add (GTK_CONTAINER (rdpattern_view_menuitem_menu), common_freq);
  gtk_tooltips_set_tip (tooltips, common_freq, _("Synchronize frequency selection in different windows"), NULL);
  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (common_freq), TRUE);

  menuitem12 = gtk_menu_item_new_with_mnemonic (_("_Help"));
  gtk_widget_show (menuitem12);
  gtk_container_add (GTK_CONTAINER (menubar3), menuitem12);

  rdpattern_hbox1 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (rdpattern_hbox1);
  gtk_box_pack_start (GTK_BOX (hbox11), rdpattern_hbox1, FALSE, FALSE, 0);

  rdpattern_x_axis = gtk_button_new_with_mnemonic (_("X"));
  gtk_widget_show (rdpattern_x_axis);
  gtk_box_pack_start (GTK_BOX (rdpattern_hbox1), rdpattern_x_axis, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, rdpattern_x_axis, _("View radiation pattern along X-axis"), NULL);
  gtk_widget_add_accelerator (rdpattern_x_axis, "clicked", accel_group,
                              GDK_X, (GdkModifierType) 0,
                              GTK_ACCEL_VISIBLE);

  rdpattern_y_axis = gtk_button_new_with_mnemonic (_("Y"));
  gtk_widget_show (rdpattern_y_axis);
  gtk_box_pack_start (GTK_BOX (rdpattern_hbox1), rdpattern_y_axis, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, rdpattern_y_axis, _("View radiation pattern along Y-axis"), NULL);
  gtk_widget_add_accelerator (rdpattern_y_axis, "clicked", accel_group,
                              GDK_Y, (GdkModifierType) 0,
                              GTK_ACCEL_VISIBLE);

  rdpattern_z_axis = gtk_button_new_with_mnemonic (_("Z"));
  gtk_widget_show (rdpattern_z_axis);
  gtk_box_pack_start (GTK_BOX (rdpattern_hbox1), rdpattern_z_axis, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, rdpattern_z_axis, _("View radiation pattern along Z-axis"), NULL);
  gtk_widget_add_accelerator (rdpattern_z_axis, "clicked", accel_group,
                              GDK_Z, (GdkModifierType) 0,
                              GTK_ACCEL_VISIBLE);

  rdpattern_default_view = gtk_button_new ();
  gtk_widget_show (rdpattern_default_view);
  gtk_box_pack_start (GTK_BOX (rdpattern_hbox1), rdpattern_default_view, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, rdpattern_default_view, _("View radiation pattern in default projection"), NULL);

  image34 = gtk_image_new_from_stock ("gtk-redo", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image34);
  gtk_container_add (GTK_CONTAINER (rdpattern_default_view), image34);

  vseparator4 = gtk_vseparator_new ();
  gtk_widget_show (vseparator4);
  gtk_box_pack_start (GTK_BOX (rdpattern_hbox1), vseparator4, TRUE, TRUE, 4);

  image55 = gtk_image_new_from_stock ("gtk-refresh", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image55);
  gtk_box_pack_start (GTK_BOX (rdpattern_hbox1), image55, FALSE, FALSE, 0);

  rdpattern_rotate_spinbutton_adj = gtk_adjustment_new (45, -360, 360, 1, 10, 0);
  rdpattern_rotate_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (rdpattern_rotate_spinbutton_adj), 1, 0);
  gtk_widget_show (rdpattern_rotate_spinbutton);
  gtk_box_pack_start (GTK_BOX (rdpattern_hbox1), rdpattern_rotate_spinbutton, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, rdpattern_rotate_spinbutton, _("Rotate radiation pattern around Z-axis"), NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (rdpattern_rotate_spinbutton), TRUE);

  image56 = gtk_image_new_from_stock ("gtk-go-down", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image56);
  gtk_box_pack_start (GTK_BOX (rdpattern_hbox1), image56, TRUE, TRUE, 0);

  rdpattern_incline_spinbutton_adj = gtk_adjustment_new (45, -180, 180, 1, 10, 0);
  rdpattern_incline_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (rdpattern_incline_spinbutton_adj), 1, 0);
  gtk_widget_show (rdpattern_incline_spinbutton);
  gtk_box_pack_start (GTK_BOX (rdpattern_hbox1), rdpattern_incline_spinbutton, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, rdpattern_incline_spinbutton, _("Incline radiation pattern to plane of screen"), NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (rdpattern_incline_spinbutton), TRUE);

  vseparator5 = gtk_vseparator_new ();
  gtk_widget_show (vseparator5);
  gtk_box_pack_start (GTK_BOX (rdpattern_hbox1), vseparator5, TRUE, TRUE, 4);

  rdpattern_gain_togglebutton = gtk_toggle_button_new_with_mnemonic (_("Gain"));
  gtk_widget_show (rdpattern_gain_togglebutton);
  gtk_box_pack_start (GTK_BOX (rdpattern_hbox1), rdpattern_gain_togglebutton, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, rdpattern_gain_togglebutton, _("Calculate and display radiation pattern"), NULL);

  rdpattern_eh_togglebutton = gtk_toggle_button_new_with_mnemonic (_("E/H"));
  gtk_widget_show (rdpattern_eh_togglebutton);
  gtk_box_pack_start (GTK_BOX (rdpattern_hbox1), rdpattern_eh_togglebutton, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, rdpattern_eh_togglebutton, _("Calculate and display the near E/H fields"), NULL);

  label216 = gtk_label_new (_("  Loop "));
  gtk_widget_show (label216);
  gtk_box_pack_start (GTK_BOX (rdpattern_hbox1), label216, FALSE, FALSE, 0);

  rdpatttern_loop_start = gtk_button_new ();
  gtk_widget_show (rdpatttern_loop_start);
  gtk_box_pack_start (GTK_BOX (hbox11), rdpatttern_loop_start, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, rdpatttern_loop_start, _("Start Frequency Loop"), NULL);

  image59 = gtk_image_new_from_stock ("gtk-media-play", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image59);
  gtk_container_add (GTK_CONTAINER (rdpatttern_loop_start), image59);

  rdpattern_loop_pause = gtk_button_new ();
  gtk_widget_show (rdpattern_loop_pause);
  gtk_box_pack_start (GTK_BOX (hbox11), rdpattern_loop_pause, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, rdpattern_loop_pause, _("Pause Frequency Loop"), NULL);

  image60 = gtk_image_new_from_stock ("gtk-media-pause", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image60);
  gtk_container_add (GTK_CONTAINER (rdpattern_loop_pause), image60);

  rdpattern_loop_reset = gtk_button_new ();
  gtk_widget_show (rdpattern_loop_reset);
  gtk_box_pack_start (GTK_BOX (hbox11), rdpattern_loop_reset, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, rdpattern_loop_reset, _("Reset Frequency Loop"), NULL);

  image58 = gtk_image_new_from_stock ("gtk-media-rewind", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image58);
  gtk_container_add (GTK_CONTAINER (rdpattern_loop_reset), image58);

  hseparator3 = gtk_hseparator_new ();
  gtk_widget_show (hseparator3);
  gtk_box_pack_start (GTK_BOX (vbox3), hseparator3, FALSE, FALSE, 4);

  rdpattern_hbox2 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (rdpattern_hbox2);
  gtk_box_pack_start (GTK_BOX (vbox3), rdpattern_hbox2, FALSE, FALSE, 0);

  rdpattern_colorcode_minlabel = gtk_label_new ("");
  gtk_widget_show (rdpattern_colorcode_minlabel);
  gtk_box_pack_start (GTK_BOX (rdpattern_hbox2), rdpattern_colorcode_minlabel, FALSE, FALSE, 1);
  gtk_label_set_width_chars (GTK_LABEL (rdpattern_colorcode_minlabel), 5);

  rdpattern_colorcode_drawingarea = gtk_drawing_area_new ();
  gtk_widget_show (rdpattern_colorcode_drawingarea);
  gtk_box_pack_start (GTK_BOX (rdpattern_hbox2), rdpattern_colorcode_drawingarea, FALSE, FALSE, 1);
  gtk_widget_set_size_request (rdpattern_colorcode_drawingarea, 160, 28);
  gtk_tooltips_set_tip (tooltips, rdpattern_colorcode_drawingarea, _("Color code for Gain or E/H field values"), NULL);

  rdpattern_colorcode_maxlabel = gtk_label_new ("");
  gtk_widget_show (rdpattern_colorcode_maxlabel);
  gtk_box_pack_start (GTK_BOX (rdpattern_hbox2), rdpattern_colorcode_maxlabel, FALSE, FALSE, 1);
  gtk_misc_set_alignment (GTK_MISC (rdpattern_colorcode_maxlabel), 0, 0.5);
  gtk_label_set_width_chars (GTK_LABEL (rdpattern_colorcode_maxlabel), 9);

  rdpattern_viewer_gain = gtk_entry_new ();
  gtk_widget_show (rdpattern_viewer_gain);
  gtk_box_pack_start (GTK_BOX (rdpattern_hbox2), rdpattern_viewer_gain, FALSE, FALSE, 1);
  gtk_tooltips_set_tip (tooltips, rdpattern_viewer_gain, _("Gain in direction of viewer\n(perpenticular to screen)"), NULL);
  gtk_entry_set_width_chars (GTK_ENTRY (rdpattern_viewer_gain), 5);

  label11 = gtk_label_new (_("dB"));
  gtk_widget_show (label11);
  gtk_box_pack_start (GTK_BOX (rdpattern_hbox2), label11, FALSE, FALSE, 1);

  rdpattern_freq_spinbutton_adj = gtk_adjustment_new (0.0010000000475, 0.0010000000475, 9999, 0.00999999977648, 10, 0);
  rdpattern_freq_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (rdpattern_freq_spinbutton_adj), 0.00999999977648, 3);
  gtk_widget_show (rdpattern_freq_spinbutton);
  gtk_box_pack_start (GTK_BOX (rdpattern_hbox2), rdpattern_freq_spinbutton, FALSE, FALSE, 1);
  gtk_tooltips_set_tip (tooltips, rdpattern_freq_spinbutton, _("Enter frequency in MHz"), NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (rdpattern_freq_spinbutton), TRUE);

  rdpattern_freq_label = gtk_label_new (_("MHz"));
  gtk_widget_show (rdpattern_freq_label);
  gtk_box_pack_start (GTK_BOX (rdpattern_hbox2), rdpattern_freq_label, FALSE, FALSE, 1);
  gtk_misc_set_padding (GTK_MISC (rdpattern_freq_label), 4, 0);

  rdpattern_freq_checkbutton = gtk_check_button_new_with_mnemonic (_("Apply"));
  gtk_widget_show (rdpattern_freq_checkbutton);
  gtk_box_pack_start (GTK_BOX (rdpattern_hbox2), rdpattern_freq_checkbutton, FALSE, FALSE, 2);
  gtk_tooltips_set_tip (tooltips, rdpattern_freq_checkbutton, _("Enable data calculation on frequency change"), NULL);
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rdpattern_freq_checkbutton), TRUE);

  rdpattern_new_freq_button = gtk_button_new ();
  gtk_widget_show (rdpattern_new_freq_button);
  gtk_box_pack_start (GTK_BOX (rdpattern_hbox2), rdpattern_new_freq_button, FALSE, FALSE, 2);
  gtk_tooltips_set_tip (tooltips, rdpattern_new_freq_button, _("Calculate data for new frequency"), NULL);

  image49 = gtk_image_new_from_stock ("gtk-apply", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image49);
  gtk_container_add (GTK_CONTAINER (rdpattern_new_freq_button), image49);

  frame3 = gtk_frame_new (NULL);
  gtk_widget_show (frame3);
  gtk_box_pack_start (GTK_BOX (vbox3), frame3, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frame3), 4);

  alignment3 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment3);
  gtk_container_add (GTK_CONTAINER (frame3), alignment3);
  gtk_container_set_border_width (GTK_CONTAINER (alignment3), 2);

  rdpattern_drawingarea = gtk_drawing_area_new ();
  gtk_widget_show (rdpattern_drawingarea);
  gtk_container_add (GTK_CONTAINER (alignment3), rdpattern_drawingarea);
  gtk_widget_set_size_request (rdpattern_drawingarea, 600, 600);
  GTK_WIDGET_SET_FLAGS (rdpattern_drawingarea, GTK_CAN_FOCUS);

  rdpattern_label = gtk_label_new (_("Radiation Patterns"));
  gtk_widget_show (rdpattern_label);
  gtk_frame_set_label_widget (GTK_FRAME (frame3), rdpattern_label);
  gtk_misc_set_padding (GTK_MISC (rdpattern_label), 4, 0);

  g_signal_connect ((gpointer) rdpattern_window, "delete_event",
                    G_CALLBACK (on_rdpattern_window_delete_event),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_window, "destroy",
                    G_CALLBACK (on_rdpattern_window_destroy),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_new, "activate",
                    G_CALLBACK (on_new_activate),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_open, "activate",
                    G_CALLBACK (on_open_input_activate),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_save, "activate",
                    G_CALLBACK (on_rdpattern_save_activate),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_save_as, "activate",
                    G_CALLBACK (on_rdpattern_save_as_activate),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_quit, "activate",
                    G_CALLBACK (on_quit_activate),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_view_menuitem, "activate",
                    G_CALLBACK (rdpattern_view_menuitem_activate),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_pol_menu, "activate",
                    G_CALLBACK (rdpattern_pol_menu_activate),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_total, "activate",
                    G_CALLBACK (on_rdpattern_total_activate),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_horizontal, "activate",
                    G_CALLBACK (on_rdpattern_horizontal_activate),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_vertical, "activate",
                    G_CALLBACK (on_rdpattern_vertical_activate),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_right_hand, "activate",
                    G_CALLBACK (on_rdpattern_right_hand_activate),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_left_hand, "activate",
                    G_CALLBACK (on_rdpattern_left_hand_activate),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_linear_power, "activate",
                    G_CALLBACK (on_rdpattern_linear_power_activate),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_linear_voltage, "activate",
                    G_CALLBACK (on_rdpattern_linear_voltage_activate),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_arrl_style, "activate",
                    G_CALLBACK (on_rdpattern_arrl_style_activate),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_logarithmic, "activate",
                    G_CALLBACK (on_rdpattern_logarithmic_activate),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_e_field, "activate",
                    G_CALLBACK (on_rdpattern_e_field_activate),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_h_field, "activate",
                    G_CALLBACK (on_rdpattern_h_field_activate),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_poynting_vector, "activate",
                    G_CALLBACK (on_rdpattern_poynting_vector_activate),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_animate, "activate",
                    G_CALLBACK (on_rdpattern_animate_activate),
                    NULL);
  g_signal_connect ((gpointer) near_peak_value, "activate",
                    G_CALLBACK (on_near_peak_value_activate),
                    NULL);
  g_signal_connect ((gpointer) near_snapshot, "activate",
                    G_CALLBACK (on_near_snapshot_activate),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_overlay_struct, "activate",
                    G_CALLBACK (on_rdpattern_overlay_struct_activate),
                    NULL);
  g_signal_connect ((gpointer) common_projection, "activate",
                    G_CALLBACK (on_common_projection_activate),
                    NULL);
  g_signal_connect ((gpointer) common_freq, "activate",
                    G_CALLBACK (on_common_freq_activate),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_x_axis, "clicked",
                    G_CALLBACK (on_rdpattern_x_axis_clicked),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_y_axis, "clicked",
                    G_CALLBACK (on_rdpattern_y_axis_clicked),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_z_axis, "clicked",
                    G_CALLBACK (on_rdpattern_z_axis_clicked),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_default_view, "clicked",
                    G_CALLBACK (on_rdpattern_default_view_clicked),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_rotate_spinbutton, "value_changed",
                    G_CALLBACK (on_rdpattern_rotate_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_incline_spinbutton, "value_changed",
                    G_CALLBACK (on_rdpattern_incline_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_gain_togglebutton, "toggled",
                    G_CALLBACK (on_rdpattern_gain_togglebutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_eh_togglebutton, "toggled",
                    G_CALLBACK (on_rdpattern_eh_togglebutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) rdpatttern_loop_start, "clicked",
                    G_CALLBACK (on_loop_start_clicked),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_loop_pause, "clicked",
                    G_CALLBACK (on_loop_pause_clicked),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_loop_reset, "clicked",
                    G_CALLBACK (on_loop_reset_clicked),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_colorcode_drawingarea, "expose_event",
                    G_CALLBACK (on_rdpattern_colorcode_drawingarea_expose_event),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_freq_spinbutton, "value_changed",
                    G_CALLBACK (on_rdpattern_freq_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_new_freq_button, "clicked",
                    G_CALLBACK (on_rdpattern_new_freq_clicked),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_drawingarea, "configure_event",
                    G_CALLBACK (on_rdpattern_drawingarea_configure_event),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_drawingarea, "expose_event",
                    G_CALLBACK (on_rdpattern_drawingarea_expose_event),
                    NULL);
  g_signal_connect ((gpointer) rdpattern_drawingarea, "motion_notify_event",
                    G_CALLBACK (on_rdpattern_drawingarea_motion_notify_event),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (rdpattern_window, rdpattern_window, "rdpattern_window");
  GLADE_HOOKUP_OBJECT (rdpattern_window, vbox3, "vbox3");
  GLADE_HOOKUP_OBJECT (rdpattern_window, hbox11, "hbox11");
  GLADE_HOOKUP_OBJECT (rdpattern_window, menubar3, "menubar3");
  GLADE_HOOKUP_OBJECT (rdpattern_window, menuitem9, "menuitem9");
  GLADE_HOOKUP_OBJECT (rdpattern_window, menuitem9_menu, "menuitem9_menu");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_new, "rdpattern_new");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_open, "rdpattern_open");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_save, "rdpattern_save");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_save_as, "rdpattern_save_as");
  GLADE_HOOKUP_OBJECT (rdpattern_window, separatormenuitem3, "separatormenuitem3");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_quit, "rdpattern_quit");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_view_menuitem, "rdpattern_view_menuitem");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_view_menuitem_menu, "rdpattern_view_menuitem_menu");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_pol_menu, "rdpattern_pol_menu");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_pol_menu_menu, "rdpattern_pol_menu_menu");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_total, "rdpattern_total");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_horizontal, "rdpattern_horizontal");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_vertical, "rdpattern_vertical");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_right_hand, "rdpattern_right_hand");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_left_hand, "rdpattern_left_hand");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_gain_scaling, "rdpattern_gain_scaling");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_gain_scaling_menu, "rdpattern_gain_scaling_menu");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_linear_power, "rdpattern_linear_power");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_linear_voltage, "rdpattern_linear_voltage");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_arrl_style, "rdpattern_arrl_style");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_logarithmic, "rdpattern_logarithmic");
  GLADE_HOOKUP_OBJECT (rdpattern_window, near_field, "near_field");
  GLADE_HOOKUP_OBJECT (rdpattern_window, near_field_menu, "near_field_menu");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_e_field, "rdpattern_e_field");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_h_field, "rdpattern_h_field");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_poynting_vector, "rdpattern_poynting_vector");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_animate, "rdpattern_animate");
  GLADE_HOOKUP_OBJECT (rdpattern_window, total_field, "total_field");
  GLADE_HOOKUP_OBJECT (rdpattern_window, total_field_menu, "total_field_menu");
  GLADE_HOOKUP_OBJECT (rdpattern_window, near_peak_value, "near_peak_value");
  GLADE_HOOKUP_OBJECT (rdpattern_window, near_snapshot, "near_snapshot");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_overlay_struct, "rdpattern_overlay_struct");
  GLADE_HOOKUP_OBJECT (rdpattern_window, common_projection, "common_projection");
  GLADE_HOOKUP_OBJECT (rdpattern_window, common_freq, "common_freq");
  GLADE_HOOKUP_OBJECT (rdpattern_window, menuitem12, "menuitem12");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_hbox1, "rdpattern_hbox1");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_x_axis, "rdpattern_x_axis");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_y_axis, "rdpattern_y_axis");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_z_axis, "rdpattern_z_axis");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_default_view, "rdpattern_default_view");
  GLADE_HOOKUP_OBJECT (rdpattern_window, image34, "image34");
  GLADE_HOOKUP_OBJECT (rdpattern_window, vseparator4, "vseparator4");
  GLADE_HOOKUP_OBJECT (rdpattern_window, image55, "image55");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_rotate_spinbutton, "rdpattern_rotate_spinbutton");
  GLADE_HOOKUP_OBJECT (rdpattern_window, image56, "image56");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_incline_spinbutton, "rdpattern_incline_spinbutton");
  GLADE_HOOKUP_OBJECT (rdpattern_window, vseparator5, "vseparator5");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_gain_togglebutton, "rdpattern_gain_togglebutton");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_eh_togglebutton, "rdpattern_eh_togglebutton");
  GLADE_HOOKUP_OBJECT (rdpattern_window, label216, "label216");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpatttern_loop_start, "rdpatttern_loop_start");
  GLADE_HOOKUP_OBJECT (rdpattern_window, image59, "image59");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_loop_pause, "rdpattern_loop_pause");
  GLADE_HOOKUP_OBJECT (rdpattern_window, image60, "image60");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_loop_reset, "rdpattern_loop_reset");
  GLADE_HOOKUP_OBJECT (rdpattern_window, image58, "image58");
  GLADE_HOOKUP_OBJECT (rdpattern_window, hseparator3, "hseparator3");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_hbox2, "rdpattern_hbox2");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_colorcode_minlabel, "rdpattern_colorcode_minlabel");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_colorcode_drawingarea, "rdpattern_colorcode_drawingarea");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_colorcode_maxlabel, "rdpattern_colorcode_maxlabel");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_viewer_gain, "rdpattern_viewer_gain");
  GLADE_HOOKUP_OBJECT (rdpattern_window, label11, "label11");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_freq_spinbutton, "rdpattern_freq_spinbutton");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_freq_label, "rdpattern_freq_label");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_freq_checkbutton, "rdpattern_freq_checkbutton");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_new_freq_button, "rdpattern_new_freq_button");
  GLADE_HOOKUP_OBJECT (rdpattern_window, image49, "image49");
  GLADE_HOOKUP_OBJECT (rdpattern_window, frame3, "frame3");
  GLADE_HOOKUP_OBJECT (rdpattern_window, alignment3, "alignment3");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_drawingarea, "rdpattern_drawingarea");
  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_label, "rdpattern_label");
  GLADE_HOOKUP_OBJECT_NO_REF (rdpattern_window, tooltips, "tooltips");

  gtk_window_add_accel_group (GTK_WINDOW (rdpattern_window), accel_group);

  return rdpattern_window;
}

GtkWidget*
create_quit_dialog (void)
{
  GtkWidget *quit_dialog;
  GtkWidget *dialog_vbox2;
  GtkWidget *hbox12;
  GtkWidget *image36;
  GtkWidget *quit_label;
  GtkWidget *dialog_action_area2;
  GtkWidget *quit_cancelbutton;
  GtkWidget *quit_okbutton;

  quit_dialog = gtk_dialog_new ();
  gtk_container_set_border_width (GTK_CONTAINER (quit_dialog), 2);
  gtk_window_set_title (GTK_WINDOW (quit_dialog), _("Confirmation"));
  gtk_window_set_position (GTK_WINDOW (quit_dialog), GTK_WIN_POS_MOUSE);
  gtk_window_set_modal (GTK_WINDOW (quit_dialog), TRUE);
  gtk_window_set_type_hint (GTK_WINDOW (quit_dialog), GDK_WINDOW_TYPE_HINT_DIALOG);

  dialog_vbox2 = GTK_DIALOG (quit_dialog)->vbox;
  gtk_widget_show (dialog_vbox2);

  hbox12 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox12);
  gtk_box_pack_start (GTK_BOX (dialog_vbox2), hbox12, TRUE, TRUE, 0);

  image36 = gtk_image_new_from_stock ("gtk-dialog-question", GTK_ICON_SIZE_DIALOG);
  gtk_widget_show (image36);
  gtk_box_pack_start (GTK_BOX (hbox12), image36, TRUE, TRUE, 0);
  gtk_misc_set_padding (GTK_MISC (image36), 4, 4);

  quit_label = gtk_label_new (_("Quit xnec2c?"));
  gtk_widget_show (quit_label);
  gtk_box_pack_start (GTK_BOX (hbox12), quit_label, FALSE, FALSE, 0);
  gtk_misc_set_padding (GTK_MISC (quit_label), 4, 0);

  dialog_action_area2 = GTK_DIALOG (quit_dialog)->action_area;
  gtk_widget_show (dialog_action_area2);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area2), GTK_BUTTONBOX_END);

  quit_cancelbutton = gtk_button_new_from_stock ("gtk-cancel");
  gtk_widget_show (quit_cancelbutton);
  gtk_dialog_add_action_widget (GTK_DIALOG (quit_dialog), quit_cancelbutton, GTK_RESPONSE_CANCEL);
  gtk_container_set_border_width (GTK_CONTAINER (quit_cancelbutton), 2);
  GTK_WIDGET_SET_FLAGS (quit_cancelbutton, GTK_CAN_DEFAULT);

  quit_okbutton = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (quit_okbutton);
  gtk_dialog_add_action_widget (GTK_DIALOG (quit_dialog), quit_okbutton, GTK_RESPONSE_OK);
  gtk_container_set_border_width (GTK_CONTAINER (quit_okbutton), 2);
  GTK_WIDGET_SET_FLAGS (quit_okbutton, GTK_CAN_DEFAULT);

  g_signal_connect ((gpointer) quit_dialog, "destroy",
                    G_CALLBACK (on_quit_dialog_destroy),
                    NULL);
  g_signal_connect ((gpointer) quit_cancelbutton, "clicked",
                    G_CALLBACK (on_quit_cancelbutton_clicked),
                    NULL);
  g_signal_connect ((gpointer) quit_okbutton, "clicked",
                    G_CALLBACK (on_quit_okbutton_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (quit_dialog, quit_dialog, "quit_dialog");
  GLADE_HOOKUP_OBJECT_NO_REF (quit_dialog, dialog_vbox2, "dialog_vbox2");
  GLADE_HOOKUP_OBJECT (quit_dialog, hbox12, "hbox12");
  GLADE_HOOKUP_OBJECT (quit_dialog, image36, "image36");
  GLADE_HOOKUP_OBJECT (quit_dialog, quit_label, "quit_label");
  GLADE_HOOKUP_OBJECT_NO_REF (quit_dialog, dialog_action_area2, "dialog_action_area2");
  GLADE_HOOKUP_OBJECT (quit_dialog, quit_cancelbutton, "quit_cancelbutton");
  GLADE_HOOKUP_OBJECT (quit_dialog, quit_okbutton, "quit_okbutton");

  return quit_dialog;
}

GtkWidget*
create_open_dialog (void)
{
  GtkWidget *open_dialog;
  GtkWidget *dialog_vbox3;
  GtkWidget *hbox13;
  GtkWidget *image37;
  GtkWidget *open_label;
  GtkWidget *dialog_action_area3;
  GtkWidget *open_cancelbutton;
  GtkWidget *open_okbutton;

  open_dialog = gtk_dialog_new ();
  gtk_window_set_title (GTK_WINDOW (open_dialog), _("Open input file?"));
  gtk_window_set_position (GTK_WINDOW (open_dialog), GTK_WIN_POS_MOUSE);
  gtk_window_set_modal (GTK_WINDOW (open_dialog), TRUE);
  gtk_window_set_type_hint (GTK_WINDOW (open_dialog), GDK_WINDOW_TYPE_HINT_DIALOG);

  dialog_vbox3 = GTK_DIALOG (open_dialog)->vbox;
  gtk_widget_show (dialog_vbox3);

  hbox13 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox13);
  gtk_box_pack_start (GTK_BOX (dialog_vbox3), hbox13, TRUE, TRUE, 0);

  image37 = gtk_image_new_from_stock ("gtk-dialog-question", GTK_ICON_SIZE_DIALOG);
  gtk_widget_show (image37);
  gtk_box_pack_start (GTK_BOX (hbox13), image37, TRUE, TRUE, 0);
  gtk_misc_set_padding (GTK_MISC (image37), 4, 4);

  open_label = gtk_label_new (_("Open a new input file?\nThis will stop operation\nand close some windows."));
  gtk_widget_show (open_label);
  gtk_box_pack_start (GTK_BOX (hbox13), open_label, FALSE, FALSE, 0);
  gtk_misc_set_padding (GTK_MISC (open_label), 4, 0);

  dialog_action_area3 = GTK_DIALOG (open_dialog)->action_area;
  gtk_widget_show (dialog_action_area3);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area3), GTK_BUTTONBOX_END);

  open_cancelbutton = gtk_button_new_from_stock ("gtk-cancel");
  gtk_widget_show (open_cancelbutton);
  gtk_dialog_add_action_widget (GTK_DIALOG (open_dialog), open_cancelbutton, GTK_RESPONSE_CANCEL);
  gtk_container_set_border_width (GTK_CONTAINER (open_cancelbutton), 2);
  GTK_WIDGET_SET_FLAGS (open_cancelbutton, GTK_CAN_DEFAULT);

  open_okbutton = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (open_okbutton);
  gtk_dialog_add_action_widget (GTK_DIALOG (open_dialog), open_okbutton, GTK_RESPONSE_OK);
  gtk_container_set_border_width (GTK_CONTAINER (open_okbutton), 2);
  GTK_WIDGET_SET_FLAGS (open_okbutton, GTK_CAN_DEFAULT);

  g_signal_connect ((gpointer) open_dialog, "destroy",
                    G_CALLBACK (on_open_dialog_destroy),
                    NULL);
  g_signal_connect ((gpointer) open_cancelbutton, "clicked",
                    G_CALLBACK (on_open_cancelbutton_clicked),
                    NULL);
  g_signal_connect ((gpointer) open_okbutton, "clicked",
                    G_CALLBACK (on_open_okbutton_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (open_dialog, open_dialog, "open_dialog");
  GLADE_HOOKUP_OBJECT_NO_REF (open_dialog, dialog_vbox3, "dialog_vbox3");
  GLADE_HOOKUP_OBJECT (open_dialog, hbox13, "hbox13");
  GLADE_HOOKUP_OBJECT (open_dialog, image37, "image37");
  GLADE_HOOKUP_OBJECT (open_dialog, open_label, "open_label");
  GLADE_HOOKUP_OBJECT_NO_REF (open_dialog, dialog_action_area3, "dialog_action_area3");
  GLADE_HOOKUP_OBJECT (open_dialog, open_cancelbutton, "open_cancelbutton");
  GLADE_HOOKUP_OBJECT (open_dialog, open_okbutton, "open_okbutton");

  return open_dialog;
}

GtkWidget*
create_error_dialog (void)
{
  GtkWidget *error_dialog;
  GtkWidget *dialog_vbox4;
  GtkWidget *hbox14;
  GtkWidget *image38;
  GtkWidget *error_label;
  GtkWidget *dialog_action_area4;
  GtkWidget *error_quitbutton;
  GtkWidget *error_okbutton;
  GtkWidget *error_stopbutton;

  error_dialog = gtk_dialog_new ();
  gtk_window_set_title (GTK_WINDOW (error_dialog), _("Error"));
  gtk_window_set_position (GTK_WINDOW (error_dialog), GTK_WIN_POS_CENTER);
  gtk_window_set_modal (GTK_WINDOW (error_dialog), TRUE);
  gtk_window_set_type_hint (GTK_WINDOW (error_dialog), GDK_WINDOW_TYPE_HINT_DIALOG);

  dialog_vbox4 = GTK_DIALOG (error_dialog)->vbox;
  gtk_widget_show (dialog_vbox4);

  hbox14 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox14);
  gtk_box_pack_start (GTK_BOX (dialog_vbox4), hbox14, TRUE, TRUE, 0);

  image38 = gtk_image_new_from_stock ("gtk-dialog-error", GTK_ICON_SIZE_DIALOG);
  gtk_widget_show (image38);
  gtk_box_pack_start (GTK_BOX (hbox14), image38, TRUE, TRUE, 0);
  gtk_misc_set_padding (GTK_MISC (image38), 4, 4);

  error_label = gtk_label_new (_("Error"));
  gtk_widget_show (error_label);
  gtk_box_pack_start (GTK_BOX (hbox14), error_label, FALSE, FALSE, 0);
  gtk_misc_set_padding (GTK_MISC (error_label), 4, 0);

  dialog_action_area4 = GTK_DIALOG (error_dialog)->action_area;
  gtk_widget_show (dialog_action_area4);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area4), GTK_BUTTONBOX_END);

  error_quitbutton = gtk_button_new_from_stock ("gtk-quit");
  gtk_widget_show (error_quitbutton);
  gtk_dialog_add_action_widget (GTK_DIALOG (error_dialog), error_quitbutton, GTK_RESPONSE_OK);
  gtk_container_set_border_width (GTK_CONTAINER (error_quitbutton), 2);
  GTK_WIDGET_SET_FLAGS (error_quitbutton, GTK_CAN_DEFAULT);

  error_okbutton = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (error_okbutton);
  gtk_dialog_add_action_widget (GTK_DIALOG (error_dialog), error_okbutton, GTK_RESPONSE_OK);
  gtk_container_set_border_width (GTK_CONTAINER (error_okbutton), 2);
  GTK_WIDGET_SET_FLAGS (error_okbutton, GTK_CAN_DEFAULT);

  error_stopbutton = gtk_button_new_from_stock ("gtk-stop");
  gtk_widget_show (error_stopbutton);
  gtk_dialog_add_action_widget (GTK_DIALOG (error_dialog), error_stopbutton, 0);
  gtk_container_set_border_width (GTK_CONTAINER (error_stopbutton), 2);
  GTK_WIDGET_SET_FLAGS (error_stopbutton, GTK_CAN_DEFAULT);

  g_signal_connect ((gpointer) error_dialog, "delete_event",
                    G_CALLBACK (on_error_dialog_delete_event),
                    NULL);
  g_signal_connect ((gpointer) error_quitbutton, "clicked",
                    G_CALLBACK (on_error_quitbutton_clicked),
                    NULL);
  g_signal_connect ((gpointer) error_okbutton, "clicked",
                    G_CALLBACK (on_error_okbutton_clicked),
                    NULL);
  g_signal_connect ((gpointer) error_stopbutton, "clicked",
                    G_CALLBACK (on_error_stopbutton_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (error_dialog, error_dialog, "error_dialog");
  GLADE_HOOKUP_OBJECT_NO_REF (error_dialog, dialog_vbox4, "dialog_vbox4");
  GLADE_HOOKUP_OBJECT (error_dialog, hbox14, "hbox14");
  GLADE_HOOKUP_OBJECT (error_dialog, image38, "image38");
  GLADE_HOOKUP_OBJECT (error_dialog, error_label, "error_label");
  GLADE_HOOKUP_OBJECT_NO_REF (error_dialog, dialog_action_area4, "dialog_action_area4");
  GLADE_HOOKUP_OBJECT (error_dialog, error_quitbutton, "error_quitbutton");
  GLADE_HOOKUP_OBJECT (error_dialog, error_okbutton, "error_okbutton");
  GLADE_HOOKUP_OBJECT (error_dialog, error_stopbutton, "error_stopbutton");

  return error_dialog;
}

GtkWidget*
create_animate_dialog (void)
{
  GtkWidget *animate_dialog;
  GtkWidget *dialog_vbox5;
  GtkWidget *table1;
  GtkWidget *label17;
  GtkWidget *label18;
  GtkObject *animate_steps_spinbutton_adj;
  GtkWidget *animate_steps_spinbutton;
  GtkObject *animate_freq_spinbutton_adj;
  GtkWidget *animate_freq_spinbutton;
  GtkWidget *dialog_action_area5;
  GtkWidget *animation_applybutton;
  GtkWidget *animation_cancelbutton;
  GtkWidget *animation_okbutton;
  GtkTooltips *tooltips;

  tooltips = gtk_tooltips_new ();

  animate_dialog = gtk_dialog_new ();
  gtk_window_set_title (GTK_WINDOW (animate_dialog), _("Near Field Animation"));
  gtk_window_set_position (GTK_WINDOW (animate_dialog), GTK_WIN_POS_MOUSE);
  gtk_window_set_type_hint (GTK_WINDOW (animate_dialog), GDK_WINDOW_TYPE_HINT_DIALOG);

  dialog_vbox5 = GTK_DIALOG (animate_dialog)->vbox;
  gtk_widget_show (dialog_vbox5);

  table1 = gtk_table_new (2, 2, FALSE);
  gtk_widget_show (table1);
  gtk_box_pack_start (GTK_BOX (dialog_vbox5), table1, TRUE, TRUE, 0);

  label17 = gtk_label_new (_("Steps/Cycle"));
  gtk_widget_show (label17);
  gtk_table_attach (GTK_TABLE (table1), label17, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 2, 0);
  gtk_misc_set_alignment (GTK_MISC (label17), 0, 0.5);
  gtk_misc_set_padding (GTK_MISC (label17), 2, 2);

  label18 = gtk_label_new (_("Animate Frequency (Hz)"));
  gtk_widget_show (label18);
  gtk_table_attach (GTK_TABLE (table1), label18, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 2, 0);
  gtk_misc_set_alignment (GTK_MISC (label18), 0, 0.5);
  gtk_misc_set_padding (GTK_MISC (label18), 2, 2);

  animate_steps_spinbutton_adj = gtk_adjustment_new (36, 12, 360, 1, 10, 0);
  animate_steps_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (animate_steps_spinbutton_adj), 1, 0);
  gtk_widget_show (animate_steps_spinbutton);
  gtk_table_attach (GTK_TABLE (table1), animate_steps_spinbutton, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 4);
  gtk_tooltips_set_tip (tooltips, animate_steps_spinbutton, _("Steps per Cycle of Excitation"), NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (animate_steps_spinbutton), TRUE);

  animate_freq_spinbutton_adj = gtk_adjustment_new (1, 0.10000000149, 10, 0.10000000149, 10, 0);
  animate_freq_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (animate_freq_spinbutton_adj), 1, 1);
  gtk_widget_show (animate_freq_spinbutton);
  gtk_table_attach (GTK_TABLE (table1), animate_freq_spinbutton, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 4);
  gtk_tooltips_set_tip (tooltips, animate_freq_spinbutton, _("Frequency of Excitaion Animation"), NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (animate_freq_spinbutton), TRUE);

  dialog_action_area5 = GTK_DIALOG (animate_dialog)->action_area;
  gtk_widget_show (dialog_action_area5);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area5), GTK_BUTTONBOX_END);

  animation_applybutton = gtk_button_new_from_stock ("gtk-apply");
  gtk_widget_show (animation_applybutton);
  gtk_dialog_add_action_widget (GTK_DIALOG (animate_dialog), animation_applybutton, GTK_RESPONSE_APPLY);
  gtk_container_set_border_width (GTK_CONTAINER (animation_applybutton), 2);
  GTK_WIDGET_SET_FLAGS (animation_applybutton, GTK_CAN_DEFAULT);

  animation_cancelbutton = gtk_button_new_from_stock ("gtk-cancel");
  gtk_widget_show (animation_cancelbutton);
  gtk_dialog_add_action_widget (GTK_DIALOG (animate_dialog), animation_cancelbutton, GTK_RESPONSE_CANCEL);
  gtk_container_set_border_width (GTK_CONTAINER (animation_cancelbutton), 2);
  GTK_WIDGET_SET_FLAGS (animation_cancelbutton, GTK_CAN_DEFAULT);

  animation_okbutton = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (animation_okbutton);
  gtk_dialog_add_action_widget (GTK_DIALOG (animate_dialog), animation_okbutton, GTK_RESPONSE_OK);
  gtk_container_set_border_width (GTK_CONTAINER (animation_okbutton), 2);
  GTK_WIDGET_SET_FLAGS (animation_okbutton, GTK_CAN_DEFAULT);

  g_signal_connect ((gpointer) animate_dialog, "destroy",
                    G_CALLBACK (on_animate_dialog_destroy),
                    NULL);
  g_signal_connect ((gpointer) animation_applybutton, "clicked",
                    G_CALLBACK (on_animation_applybutton_clicked),
                    NULL);
  g_signal_connect ((gpointer) animation_cancelbutton, "clicked",
                    G_CALLBACK (on_animation_cancelbutton_clicked),
                    NULL);
  g_signal_connect ((gpointer) animation_okbutton, "clicked",
                    G_CALLBACK (on_animation_okbutton_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (animate_dialog, animate_dialog, "animate_dialog");
  GLADE_HOOKUP_OBJECT_NO_REF (animate_dialog, dialog_vbox5, "dialog_vbox5");
  GLADE_HOOKUP_OBJECT (animate_dialog, table1, "table1");
  GLADE_HOOKUP_OBJECT (animate_dialog, label17, "label17");
  GLADE_HOOKUP_OBJECT (animate_dialog, label18, "label18");
  GLADE_HOOKUP_OBJECT (animate_dialog, animate_steps_spinbutton, "animate_steps_spinbutton");
  GLADE_HOOKUP_OBJECT (animate_dialog, animate_freq_spinbutton, "animate_freq_spinbutton");
  GLADE_HOOKUP_OBJECT_NO_REF (animate_dialog, dialog_action_area5, "dialog_action_area5");
  GLADE_HOOKUP_OBJECT (animate_dialog, animation_applybutton, "animation_applybutton");
  GLADE_HOOKUP_OBJECT (animate_dialog, animation_cancelbutton, "animation_cancelbutton");
  GLADE_HOOKUP_OBJECT (animate_dialog, animation_okbutton, "animation_okbutton");
  GLADE_HOOKUP_OBJECT_NO_REF (animate_dialog, tooltips, "tooltips");

  gtk_widget_grab_focus (animation_okbutton);
  return animate_dialog;
}

GtkWidget*
create_nec2_editor (void)
{
  GtkWidget *nec2_editor;
  GtkWidget *vbox4;
  GtkWidget *hbox16;
  GtkWidget *frame8;
  GtkWidget *alignment8;
  GtkWidget *hbox17;
  GtkWidget *nec2_row_add;
  GtkWidget *nec2_row_remv;
  GtkWidget *nec2_treeview_clear;
  GtkWidget *label23;
  GtkWidget *frame7;
  GtkWidget *alignment7;
  GtkWidget *hbox18;
  GtkWidget *nec2_save_as;
  GtkWidget *nec2_save;
  GtkWidget *nec2_apply_checkbutton;
  GtkWidget *nec2_revert;
  GtkWidget *label22;
  GtkWidget *frame6;
  GtkWidget *alignment6;
  GtkWidget *scrolledwindow5;
  GtkWidget *nec2_cmnt_treeview;
  GtkWidget *label21;
  GtkWidget *frame9;
  GtkWidget *alignment9;
  GtkWidget *table34;
  GtkWidget *gw;
  GtkWidget *ga;
  GtkWidget *gh;
  GtkWidget *sp;
  GtkWidget *gr;
  GtkWidget *gm;
  GtkWidget *gx;
  GtkWidget *gs;
  GtkWidget *label24;
  GtkWidget *frame5;
  GtkWidget *alignment5;
  GtkWidget *scrolledwindow4;
  GtkWidget *nec2_geom_treeview;
  GtkWidget *label20;
  GtkWidget *frame10;
  GtkWidget *alignment10;
  GtkWidget *table4;
  GtkWidget *ex;
  GtkWidget *fr;
  GtkWidget *gn;
  GtkWidget *rp;
  GtkWidget *ld;
  GtkWidget *nt;
  GtkWidget *tl;
  GtkWidget *ne;
  GtkWidget *xq;
  GtkWidget *kh;
  GtkWidget *ek;
  GtkWidget *gd;
  GtkWidget *label25;
  GtkWidget *frame4;
  GtkWidget *alignment4;
  GtkWidget *scrolledwindow3;
  GtkWidget *nec2_cmnd_treeview;
  GtkWidget *label19;

  nec2_editor = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_container_set_border_width (GTK_CONTAINER (nec2_editor), 4);
  gtk_window_set_title (GTK_WINDOW (nec2_editor), _("Xnec2c: NEC2 Input File Editor"));
  gtk_window_set_gravity (GTK_WINDOW (nec2_editor), GDK_GRAVITY_WEST);

  vbox4 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox4);
  gtk_container_add (GTK_CONTAINER (nec2_editor), vbox4);

  hbox16 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox16);
  gtk_box_pack_start (GTK_BOX (vbox4), hbox16, FALSE, TRUE, 0);

  frame8 = gtk_frame_new (NULL);
  gtk_widget_show (frame8);
  gtk_box_pack_start (GTK_BOX (hbox16), frame8, FALSE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frame8), 2);

  alignment8 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment8);
  gtk_container_add (GTK_CONTAINER (frame8), alignment8);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment8), 0, 0, 12, 0);

  hbox17 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox17);
  gtk_container_add (GTK_CONTAINER (alignment8), hbox17);

  nec2_row_add = gtk_button_new_from_stock ("gtk-add");
  gtk_widget_show (nec2_row_add);
  gtk_box_pack_start (GTK_BOX (hbox17), nec2_row_add, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (nec2_row_add), 2);

  nec2_row_remv = gtk_button_new_from_stock ("gtk-remove");
  gtk_widget_show (nec2_row_remv);
  gtk_box_pack_start (GTK_BOX (hbox17), nec2_row_remv, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (nec2_row_remv), 2);

  nec2_treeview_clear = gtk_button_new_from_stock ("gtk-clear");
  gtk_widget_show (nec2_treeview_clear);
  gtk_box_pack_start (GTK_BOX (hbox17), nec2_treeview_clear, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (nec2_treeview_clear), 2);

  label23 = gtk_label_new (_("Edit Tree View Rows"));
  gtk_widget_show (label23);
  gtk_frame_set_label_widget (GTK_FRAME (frame8), label23);
  gtk_misc_set_padding (GTK_MISC (label23), 2, 0);

  frame7 = gtk_frame_new (NULL);
  gtk_widget_show (frame7);
  gtk_box_pack_start (GTK_BOX (hbox16), frame7, FALSE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frame7), 2);

  alignment7 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment7);
  gtk_container_add (GTK_CONTAINER (frame7), alignment7);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment7), 0, 0, 12, 0);

  hbox18 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox18);
  gtk_container_add (GTK_CONTAINER (alignment7), hbox18);

  nec2_save_as = gtk_button_new_from_stock ("gtk-save-as");
  gtk_widget_show (nec2_save_as);
  gtk_box_pack_start (GTK_BOX (hbox18), nec2_save_as, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (nec2_save_as), 2);

  nec2_save = gtk_button_new_from_stock ("gtk-save");
  gtk_widget_show (nec2_save);
  gtk_box_pack_start (GTK_BOX (hbox18), nec2_save, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (nec2_save), 2);

  nec2_apply_checkbutton = gtk_check_button_new_with_mnemonic ("gtk-apply");
  gtk_button_set_use_stock (GTK_BUTTON (nec2_apply_checkbutton), TRUE);
  gtk_widget_show (nec2_apply_checkbutton);
  gtk_box_pack_start (GTK_BOX (hbox18), nec2_apply_checkbutton, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (nec2_apply_checkbutton), 2);
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (nec2_apply_checkbutton), TRUE);

  nec2_revert = gtk_button_new_from_stock ("gtk-revert-to-saved");
  gtk_widget_show (nec2_revert);
  gtk_box_pack_start (GTK_BOX (hbox18), nec2_revert, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (nec2_revert), 2);
  gtk_button_set_focus_on_click (GTK_BUTTON (nec2_revert), FALSE);

  label22 = gtk_label_new (_("NEC2 Input File"));
  gtk_widget_show (label22);
  gtk_frame_set_label_widget (GTK_FRAME (frame7), label22);
  gtk_misc_set_padding (GTK_MISC (label22), 2, 0);

  frame6 = gtk_frame_new (NULL);
  gtk_widget_show (frame6);
  gtk_box_pack_start (GTK_BOX (vbox4), frame6, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frame6), 2);

  alignment6 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment6);
  gtk_container_add (GTK_CONTAINER (frame6), alignment6);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment6), 0, 0, 12, 0);

  scrolledwindow5 = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_show (scrolledwindow5);
  gtk_container_add (GTK_CONTAINER (alignment6), scrolledwindow5);
  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow5), GTK_SHADOW_IN);

  nec2_cmnt_treeview = gtk_tree_view_new ();
  gtk_widget_show (nec2_cmnt_treeview);
  gtk_container_add (GTK_CONTAINER (scrolledwindow5), nec2_cmnt_treeview);
  gtk_widget_set_size_request (nec2_cmnt_treeview, -1, 104);
  gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (nec2_cmnt_treeview), TRUE);
  gtk_tree_view_set_reorderable (GTK_TREE_VIEW (nec2_cmnt_treeview), TRUE);

  label21 = gtk_label_new (_("Comments"));
  gtk_widget_show (label21);
  gtk_frame_set_label_widget (GTK_FRAME (frame6), label21);
  gtk_misc_set_padding (GTK_MISC (label21), 2, 0);

  frame9 = gtk_frame_new (NULL);
  gtk_widget_show (frame9);
  gtk_box_pack_start (GTK_BOX (vbox4), frame9, FALSE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frame9), 2);

  alignment9 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment9);
  gtk_container_add (GTK_CONTAINER (frame9), alignment9);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment9), 0, 0, 12, 0);

  table34 = gtk_table_new (2, 8, FALSE);
  gtk_widget_show (table34);
  gtk_container_add (GTK_CONTAINER (alignment9), table34);

  gw = gtk_button_new_with_mnemonic (_("Wire"));
  gtk_widget_show (gw);
  gtk_table_attach (GTK_TABLE (table34), gw, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (gw), 2);

  ga = gtk_button_new_with_mnemonic (_("Arc"));
  gtk_widget_show (ga);
  gtk_table_attach (GTK_TABLE (table34), ga, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (ga), 2);

  gh = gtk_button_new_with_mnemonic (_("Helix"));
  gtk_widget_show (gh);
  gtk_table_attach (GTK_TABLE (table34), gh, 2, 3, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (gh), 2);

  sp = gtk_button_new_with_mnemonic (_("Patch"));
  gtk_widget_show (sp);
  gtk_table_attach (GTK_TABLE (table34), sp, 3, 4, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (sp), 2);

  gr = gtk_button_new_with_mnemonic (_("Cylinder"));
  gtk_widget_show (gr);
  gtk_table_attach (GTK_TABLE (table34), gr, 4, 5, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (gr), 2);

  gm = gtk_button_new_with_mnemonic (_("Move"));
  gtk_widget_show (gm);
  gtk_table_attach (GTK_TABLE (table34), gm, 5, 6, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (gm), 2);

  gx = gtk_button_new_with_mnemonic (_("Reflect"));
  gtk_widget_show (gx);
  gtk_table_attach (GTK_TABLE (table34), gx, 6, 7, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (gx), 2);

  gs = gtk_button_new_with_mnemonic (_("Scale"));
  gtk_widget_show (gs);
  gtk_table_attach (GTK_TABLE (table34), gs, 7, 8, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (gs), 2);

  label24 = gtk_label_new (_("Edit Geometry Data"));
  gtk_widget_show (label24);
  gtk_frame_set_label_widget (GTK_FRAME (frame9), label24);
  gtk_misc_set_padding (GTK_MISC (label24), 2, 0);

  frame5 = gtk_frame_new (NULL);
  gtk_widget_show (frame5);
  gtk_box_pack_start (GTK_BOX (vbox4), frame5, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frame5), 2);

  alignment5 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment5);
  gtk_container_add (GTK_CONTAINER (frame5), alignment5);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment5), 0, 0, 12, 0);

  scrolledwindow4 = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_show (scrolledwindow4);
  gtk_container_add (GTK_CONTAINER (alignment5), scrolledwindow4);
  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow4), GTK_SHADOW_IN);

  nec2_geom_treeview = gtk_tree_view_new ();
  gtk_widget_show (nec2_geom_treeview);
  gtk_container_add (GTK_CONTAINER (scrolledwindow4), nec2_geom_treeview);
  gtk_widget_set_size_request (nec2_geom_treeview, -1, 128);
  gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (nec2_geom_treeview), TRUE);
  gtk_tree_view_set_reorderable (GTK_TREE_VIEW (nec2_geom_treeview), TRUE);

  label20 = gtk_label_new (_("Geometry"));
  gtk_widget_show (label20);
  gtk_frame_set_label_widget (GTK_FRAME (frame5), label20);
  gtk_misc_set_padding (GTK_MISC (label20), 2, 0);

  frame10 = gtk_frame_new (NULL);
  gtk_widget_show (frame10);
  gtk_box_pack_start (GTK_BOX (vbox4), frame10, FALSE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frame10), 2);

  alignment10 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment10);
  gtk_container_add (GTK_CONTAINER (frame10), alignment10);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment10), 0, 0, 12, 0);

  table4 = gtk_table_new (2, 6, FALSE);
  gtk_widget_show (table4);
  gtk_container_add (GTK_CONTAINER (alignment10), table4);

  ex = gtk_button_new_with_mnemonic (_("Excitation"));
  gtk_widget_show (ex);
  gtk_table_attach (GTK_TABLE (table4), ex, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (ex), 2);

  fr = gtk_button_new_with_mnemonic (_("Frequency"));
  gtk_widget_show (fr);
  gtk_table_attach (GTK_TABLE (table4), fr, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (fr), 2);

  gn = gtk_button_new_with_mnemonic (_("Ground (GN)"));
  gtk_widget_show (gn);
  gtk_table_attach (GTK_TABLE (table4), gn, 2, 3, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (gn), 2);

  rp = gtk_button_new_with_mnemonic (_("Radiation"));
  gtk_widget_show (rp);
  gtk_table_attach (GTK_TABLE (table4), rp, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (rp), 2);

  ld = gtk_button_new_with_mnemonic (_("Loading"));
  gtk_widget_show (ld);
  gtk_table_attach (GTK_TABLE (table4), ld, 3, 4, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (ld), 2);

  nt = gtk_button_new_with_mnemonic (_("Network"));
  gtk_widget_show (nt);
  gtk_table_attach (GTK_TABLE (table4), nt, 4, 5, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (nt), 2);

  tl = gtk_button_new_with_mnemonic (_("Trans. Line"));
  gtk_widget_show (tl);
  gtk_table_attach (GTK_TABLE (table4), tl, 5, 6, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (tl), 2);

  ne = gtk_button_new_with_mnemonic (_("Near Fields"));
  gtk_widget_show (ne);
  gtk_table_attach (GTK_TABLE (table4), ne, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (ne), 2);

  xq = gtk_button_new_with_mnemonic (_("Execute"));
  gtk_widget_show (xq);
  gtk_table_attach (GTK_TABLE (table4), xq, 5, 6, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (xq), 2);

  kh = gtk_button_new_with_mnemonic (_("Interaction"));
  gtk_widget_show (kh);
  gtk_table_attach (GTK_TABLE (table4), kh, 4, 5, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (kh), 2);

  ek = gtk_button_new_with_mnemonic (_("Kernel"));
  gtk_widget_show (ek);
  gtk_table_attach (GTK_TABLE (table4), ek, 3, 4, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (ek), 2);

  gd = gtk_button_new_with_mnemonic (_("Ground (GD)"));
  gtk_widget_show (gd);
  gtk_table_attach (GTK_TABLE (table4), gd, 2, 3, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (gd), 2);

  label25 = gtk_label_new (_("Edit Control Commands"));
  gtk_widget_show (label25);
  gtk_frame_set_label_widget (GTK_FRAME (frame10), label25);
  gtk_misc_set_padding (GTK_MISC (label25), 2, 0);

  frame4 = gtk_frame_new (NULL);
  gtk_widget_show (frame4);
  gtk_box_pack_start (GTK_BOX (vbox4), frame4, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frame4), 2);

  alignment4 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment4);
  gtk_container_add (GTK_CONTAINER (frame4), alignment4);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment4), 0, 0, 12, 0);

  scrolledwindow3 = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_show (scrolledwindow3);
  gtk_container_add (GTK_CONTAINER (alignment4), scrolledwindow3);
  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow3), GTK_SHADOW_IN);

  nec2_cmnd_treeview = gtk_tree_view_new ();
  gtk_widget_show (nec2_cmnd_treeview);
  gtk_container_add (GTK_CONTAINER (scrolledwindow3), nec2_cmnd_treeview);
  gtk_widget_set_size_request (nec2_cmnd_treeview, -1, 128);
  gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (nec2_cmnd_treeview), TRUE);
  gtk_tree_view_set_reorderable (GTK_TREE_VIEW (nec2_cmnd_treeview), TRUE);

  label19 = gtk_label_new (_("Commands"));
  gtk_widget_show (label19);
  gtk_frame_set_label_widget (GTK_FRAME (frame4), label19);
  gtk_misc_set_padding (GTK_MISC (label19), 2, 0);

  g_signal_connect ((gpointer) nec2_editor, "delete_event",
                    G_CALLBACK (on_nec2_editor_delete_event),
                    NULL);
  g_signal_connect ((gpointer) nec2_editor, "destroy",
                    G_CALLBACK (on_nec2_editor_destroy),
                    NULL);
  g_signal_connect ((gpointer) nec2_row_add, "clicked",
                    G_CALLBACK (on_nec2_row_add_clicked),
                    NULL);
  g_signal_connect ((gpointer) nec2_row_remv, "clicked",
                    G_CALLBACK (on_nec2_row_remv_clicked),
                    NULL);
  g_signal_connect ((gpointer) nec2_treeview_clear, "clicked",
                    G_CALLBACK (on_nec2_treeview_clear_clicked),
                    NULL);
  g_signal_connect ((gpointer) nec2_save_as, "clicked",
                    G_CALLBACK (on_nec2_save_as_clicked),
                    NULL);
  g_signal_connect ((gpointer) nec2_save, "clicked",
                    G_CALLBACK (on_nec2_save_clicked),
                    NULL);
  g_signal_connect ((gpointer) nec2_revert, "clicked",
                    G_CALLBACK (on_nec2_revert_clicked),
                    NULL);
  g_signal_connect ((gpointer) nec2_cmnt_treeview, "button_press_event",
                    G_CALLBACK (on_nec2_cmnt_treeview_button_press_event),
                    NULL);
  g_signal_connect ((gpointer) gw, "clicked",
                    G_CALLBACK (on_gw_clicked),
                    NULL);
  g_signal_connect ((gpointer) ga, "clicked",
                    G_CALLBACK (on_ga_clicked),
                    NULL);
  g_signal_connect ((gpointer) gh, "clicked",
                    G_CALLBACK (on_gh_clicked),
                    NULL);
  g_signal_connect ((gpointer) sp, "clicked",
                    G_CALLBACK (on_sp_clicked),
                    NULL);
  g_signal_connect ((gpointer) gr, "clicked",
                    G_CALLBACK (on_gr_clicked),
                    NULL);
  g_signal_connect ((gpointer) gm, "clicked",
                    G_CALLBACK (on_gm_clicked),
                    NULL);
  g_signal_connect ((gpointer) gx, "clicked",
                    G_CALLBACK (on_gx_clicked),
                    NULL);
  g_signal_connect ((gpointer) gs, "clicked",
                    G_CALLBACK (on_gs_clicked),
                    NULL);
  g_signal_connect ((gpointer) nec2_geom_treeview, "button_press_event",
                    G_CALLBACK (on_nec2_geom_treeview_button_press_event),
                    NULL);
  g_signal_connect ((gpointer) ex, "clicked",
                    G_CALLBACK (on_ex_clicked),
                    NULL);
  g_signal_connect ((gpointer) fr, "clicked",
                    G_CALLBACK (on_fr_clicked),
                    NULL);
  g_signal_connect ((gpointer) gn, "clicked",
                    G_CALLBACK (on_gn_clicked),
                    NULL);
  g_signal_connect ((gpointer) rp, "clicked",
                    G_CALLBACK (on_rp_clicked),
                    NULL);
  g_signal_connect ((gpointer) ld, "clicked",
                    G_CALLBACK (on_ld_clicked),
                    NULL);
  g_signal_connect ((gpointer) nt, "clicked",
                    G_CALLBACK (on_nt_clicked),
                    NULL);
  g_signal_connect ((gpointer) tl, "clicked",
                    G_CALLBACK (on_tl_clicked),
                    NULL);
  g_signal_connect ((gpointer) ne, "clicked",
                    G_CALLBACK (on_ne_clicked),
                    NULL);
  g_signal_connect ((gpointer) xq, "clicked",
                    G_CALLBACK (on_xq_clicked),
                    NULL);
  g_signal_connect ((gpointer) kh, "clicked",
                    G_CALLBACK (on_kh_clicked),
                    NULL);
  g_signal_connect ((gpointer) ek, "clicked",
                    G_CALLBACK (on_ek_clicked),
                    NULL);
  g_signal_connect ((gpointer) gd, "clicked",
                    G_CALLBACK (on_gd_clicked),
                    NULL);
  g_signal_connect ((gpointer) nec2_cmnd_treeview, "button_press_event",
                    G_CALLBACK (on_nec2_cmnd_treeview_button_press_event),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (nec2_editor, nec2_editor, "nec2_editor");
  GLADE_HOOKUP_OBJECT (nec2_editor, vbox4, "vbox4");
  GLADE_HOOKUP_OBJECT (nec2_editor, hbox16, "hbox16");
  GLADE_HOOKUP_OBJECT (nec2_editor, frame8, "frame8");
  GLADE_HOOKUP_OBJECT (nec2_editor, alignment8, "alignment8");
  GLADE_HOOKUP_OBJECT (nec2_editor, hbox17, "hbox17");
  GLADE_HOOKUP_OBJECT (nec2_editor, nec2_row_add, "nec2_row_add");
  GLADE_HOOKUP_OBJECT (nec2_editor, nec2_row_remv, "nec2_row_remv");
  GLADE_HOOKUP_OBJECT (nec2_editor, nec2_treeview_clear, "nec2_treeview_clear");
  GLADE_HOOKUP_OBJECT (nec2_editor, label23, "label23");
  GLADE_HOOKUP_OBJECT (nec2_editor, frame7, "frame7");
  GLADE_HOOKUP_OBJECT (nec2_editor, alignment7, "alignment7");
  GLADE_HOOKUP_OBJECT (nec2_editor, hbox18, "hbox18");
  GLADE_HOOKUP_OBJECT (nec2_editor, nec2_save_as, "nec2_save_as");
  GLADE_HOOKUP_OBJECT (nec2_editor, nec2_save, "nec2_save");
  GLADE_HOOKUP_OBJECT (nec2_editor, nec2_apply_checkbutton, "nec2_apply_checkbutton");
  GLADE_HOOKUP_OBJECT (nec2_editor, nec2_revert, "nec2_revert");
  GLADE_HOOKUP_OBJECT (nec2_editor, label22, "label22");
  GLADE_HOOKUP_OBJECT (nec2_editor, frame6, "frame6");
  GLADE_HOOKUP_OBJECT (nec2_editor, alignment6, "alignment6");
  GLADE_HOOKUP_OBJECT (nec2_editor, scrolledwindow5, "scrolledwindow5");
  GLADE_HOOKUP_OBJECT (nec2_editor, nec2_cmnt_treeview, "nec2_cmnt_treeview");
  GLADE_HOOKUP_OBJECT (nec2_editor, label21, "label21");
  GLADE_HOOKUP_OBJECT (nec2_editor, frame9, "frame9");
  GLADE_HOOKUP_OBJECT (nec2_editor, alignment9, "alignment9");
  GLADE_HOOKUP_OBJECT (nec2_editor, table34, "table34");
  GLADE_HOOKUP_OBJECT (nec2_editor, gw, "gw");
  GLADE_HOOKUP_OBJECT (nec2_editor, ga, "ga");
  GLADE_HOOKUP_OBJECT (nec2_editor, gh, "gh");
  GLADE_HOOKUP_OBJECT (nec2_editor, sp, "sp");
  GLADE_HOOKUP_OBJECT (nec2_editor, gr, "gr");
  GLADE_HOOKUP_OBJECT (nec2_editor, gm, "gm");
  GLADE_HOOKUP_OBJECT (nec2_editor, gx, "gx");
  GLADE_HOOKUP_OBJECT (nec2_editor, gs, "gs");
  GLADE_HOOKUP_OBJECT (nec2_editor, label24, "label24");
  GLADE_HOOKUP_OBJECT (nec2_editor, frame5, "frame5");
  GLADE_HOOKUP_OBJECT (nec2_editor, alignment5, "alignment5");
  GLADE_HOOKUP_OBJECT (nec2_editor, scrolledwindow4, "scrolledwindow4");
  GLADE_HOOKUP_OBJECT (nec2_editor, nec2_geom_treeview, "nec2_geom_treeview");
  GLADE_HOOKUP_OBJECT (nec2_editor, label20, "label20");
  GLADE_HOOKUP_OBJECT (nec2_editor, frame10, "frame10");
  GLADE_HOOKUP_OBJECT (nec2_editor, alignment10, "alignment10");
  GLADE_HOOKUP_OBJECT (nec2_editor, table4, "table4");
  GLADE_HOOKUP_OBJECT (nec2_editor, ex, "ex");
  GLADE_HOOKUP_OBJECT (nec2_editor, fr, "fr");
  GLADE_HOOKUP_OBJECT (nec2_editor, gn, "gn");
  GLADE_HOOKUP_OBJECT (nec2_editor, rp, "rp");
  GLADE_HOOKUP_OBJECT (nec2_editor, ld, "ld");
  GLADE_HOOKUP_OBJECT (nec2_editor, nt, "nt");
  GLADE_HOOKUP_OBJECT (nec2_editor, tl, "tl");
  GLADE_HOOKUP_OBJECT (nec2_editor, ne, "ne");
  GLADE_HOOKUP_OBJECT (nec2_editor, xq, "xq");
  GLADE_HOOKUP_OBJECT (nec2_editor, kh, "kh");
  GLADE_HOOKUP_OBJECT (nec2_editor, ek, "ek");
  GLADE_HOOKUP_OBJECT (nec2_editor, gd, "gd");
  GLADE_HOOKUP_OBJECT (nec2_editor, label25, "label25");
  GLADE_HOOKUP_OBJECT (nec2_editor, frame4, "frame4");
  GLADE_HOOKUP_OBJECT (nec2_editor, alignment4, "alignment4");
  GLADE_HOOKUP_OBJECT (nec2_editor, scrolledwindow3, "scrolledwindow3");
  GLADE_HOOKUP_OBJECT (nec2_editor, nec2_cmnd_treeview, "nec2_cmnd_treeview");
  GLADE_HOOKUP_OBJECT (nec2_editor, label19, "label19");

  return nec2_editor;
}

GtkWidget*
create_wire_editor (void)
{
  GtkWidget *wire_editor;
  GtkWidget *vbox5;
  GtkWidget *frame11;
  GtkWidget *table2;
  GtkWidget *label29;
  GtkWidget *label30;
  GtkWidget *label31;
  GtkWidget *label32;
  GtkWidget *label33;
  GtkWidget *label34;
  GtkWidget *label36;
  GtkWidget *label37;
  GtkWidget *label38;
  GtkObject *wire_tagnum_spinbutton_adj;
  GtkWidget *wire_tagnum_spinbutton;
  GtkObject *wire_numseg_spinbutton_adj;
  GtkWidget *wire_numseg_spinbutton;
  GtkObject *wire_pcl_spinbutton_adj;
  GtkWidget *wire_pcl_spinbutton;
  GtkObject *wire_x1_spinbutton_adj;
  GtkWidget *wire_x1_spinbutton;
  GtkObject *wire_y1_spinbutton_adj;
  GtkWidget *wire_y1_spinbutton;
  GtkObject *wire_z1_spinbutton_adj;
  GtkWidget *wire_z1_spinbutton;
  GtkObject *wire_z2_spinbutton_adj;
  GtkWidget *wire_z2_spinbutton;
  GtkObject *wire_y2_spinbutton_adj;
  GtkWidget *wire_y2_spinbutton;
  GtkObject *wire_x2_spinbutton_adj;
  GtkWidget *wire_x2_spinbutton;
  GtkWidget *label28;
  GtkObject *wire_dia_spinbutton_adj;
  GtkWidget *wire_dia_spinbutton;
  GtkWidget *label35;
  GtkWidget *label39;
  GtkObject *wire_len_spinbutton_adj;
  GtkWidget *wire_len_spinbutton;
  GtkWidget *label44;
  GtkObject *wire_res_spinbutton_adj;
  GtkWidget *wire_res_spinbutton;
  GtkWidget *wire_taper_checkbutton;
  GtkWidget *wire_taperframe;
  GtkWidget *alignment12;
  GtkWidget *table3;
  GtkWidget *label40;
  GtkWidget *label41;
  GtkWidget *label42;
  GtkWidget *label43;
  GtkObject *wire_rdia_spinbutton_adj;
  GtkWidget *wire_rdia_spinbutton;
  GtkObject *wire_dian_spinbutton_adj;
  GtkWidget *wire_dian_spinbutton;
  GtkObject *wire_dia1_spinbutton_adj;
  GtkWidget *wire_dia1_spinbutton;
  GtkObject *wire_rlen_spinbutton_adj;
  GtkWidget *wire_rlen_spinbutton;
  GtkWidget *label27;
  GtkWidget *hbox21;
  GtkWidget *wire_new_button;
  GtkWidget *wire_cancel_button;
  GtkWidget *alignment50;
  GtkWidget *hbox48;
  GtkWidget *image70;
  GtkWidget *label222;
  GtkWidget *wire_apply_button;
  GtkWidget *wire_ok_button;

  wire_editor = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_container_set_border_width (GTK_CONTAINER (wire_editor), 4);
  gtk_window_set_title (GTK_WINDOW (wire_editor), _("Wire Element (GW & GC cards)"));

  vbox5 = gtk_vbox_new (FALSE, 2);
  gtk_widget_show (vbox5);
  gtk_container_add (GTK_CONTAINER (wire_editor), vbox5);

  frame11 = gtk_frame_new (NULL);
  gtk_widget_show (frame11);
  gtk_box_pack_start (GTK_BOX (vbox5), frame11, TRUE, TRUE, 2);
  gtk_container_set_border_width (GTK_CONTAINER (frame11), 4);

  table2 = gtk_table_new (6, 4, FALSE);
  gtk_widget_show (table2);
  gtk_container_add (GTK_CONTAINER (frame11), table2);
  gtk_table_set_row_spacings (GTK_TABLE (table2), 2);
  gtk_table_set_col_spacings (GTK_TABLE (table2), 2);

  label29 = gtk_label_new (_("No. Segments"));
  gtk_widget_show (label29);
  gtk_table_attach (GTK_TABLE (table2), label29, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label29), 0.1, 0.5);

  label30 = gtk_label_new (_("Segs % lambda"));
  gtk_widget_show (label30);
  gtk_table_attach (GTK_TABLE (table2), label30, 2, 3, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label30), 0.1, 0.5);

  label31 = gtk_label_new ("");
  gtk_widget_show (label31);
  gtk_table_attach (GTK_TABLE (table2), label31, 3, 4, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label31), 0.1, 0.5);

  label32 = gtk_label_new (_("Wire X1"));
  gtk_widget_show (label32);
  gtk_table_attach (GTK_TABLE (table2), label32, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label32), 0.1, 0.5);

  label33 = gtk_label_new (_("Wire Y1"));
  gtk_widget_show (label33);
  gtk_table_attach (GTK_TABLE (table2), label33, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  GTK_WIDGET_SET_FLAGS (label33, GTK_CAN_FOCUS);
  gtk_label_set_selectable (GTK_LABEL (label33), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label33), 0.1, 0.5);

  label34 = gtk_label_new (_("Wire Z1"));
  gtk_widget_show (label34);
  gtk_table_attach (GTK_TABLE (table2), label34, 2, 3, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label34), 0.1, 0.5);

  label36 = gtk_label_new (_("Wire X2"));
  gtk_widget_show (label36);
  gtk_table_attach (GTK_TABLE (table2), label36, 0, 1, 4, 5,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label36), 0.1, 0.5);

  label37 = gtk_label_new (_("Wire Y2"));
  gtk_widget_show (label37);
  gtk_table_attach (GTK_TABLE (table2), label37, 1, 2, 4, 5,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label37), 0.1, 0.5);

  label38 = gtk_label_new (_("Wire Z2"));
  gtk_widget_show (label38);
  gtk_table_attach (GTK_TABLE (table2), label38, 2, 3, 4, 5,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label38), 0.1, 0.5);

  wire_tagnum_spinbutton_adj = gtk_adjustment_new (1, 1, 100000, 1, 10, 0);
  wire_tagnum_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_tagnum_spinbutton_adj), 0.00999999977648, 0);
  gtk_widget_show (wire_tagnum_spinbutton);
  gtk_table_attach (GTK_TABLE (table2), wire_tagnum_spinbutton, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_tagnum_spinbutton), TRUE);

  wire_numseg_spinbutton_adj = gtk_adjustment_new (15, 1, 100000, 1, 10, 0);
  wire_numseg_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_numseg_spinbutton_adj), 0.00999999977648, 0);
  gtk_widget_show (wire_numseg_spinbutton);
  gtk_table_attach (GTK_TABLE (table2), wire_numseg_spinbutton, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_numseg_spinbutton), TRUE);

  wire_pcl_spinbutton_adj = gtk_adjustment_new (5, 0.0010000000475, 30, 9.99999974738e-06, 10, 0);
  wire_pcl_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_pcl_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (wire_pcl_spinbutton);
  gtk_table_attach (GTK_TABLE (table2), wire_pcl_spinbutton, 2, 3, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_pcl_spinbutton), TRUE);

  wire_x1_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
  wire_x1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_x1_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (wire_x1_spinbutton);
  gtk_table_attach (GTK_TABLE (table2), wire_x1_spinbutton, 0, 1, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_x1_spinbutton), TRUE);

  wire_y1_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
  wire_y1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_y1_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (wire_y1_spinbutton);
  gtk_table_attach (GTK_TABLE (table2), wire_y1_spinbutton, 1, 2, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_y1_spinbutton), TRUE);

  wire_z1_spinbutton_adj = gtk_adjustment_new (-1, -10000, 10000, 9.99999974738e-06, 10, 0);
  wire_z1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_z1_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (wire_z1_spinbutton);
  gtk_table_attach (GTK_TABLE (table2), wire_z1_spinbutton, 2, 3, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_z1_spinbutton), TRUE);

  wire_z2_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
  wire_z2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_z2_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (wire_z2_spinbutton);
  gtk_table_attach (GTK_TABLE (table2), wire_z2_spinbutton, 2, 3, 5, 6,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_z2_spinbutton), TRUE);

  wire_y2_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
  wire_y2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_y2_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (wire_y2_spinbutton);
  gtk_table_attach (GTK_TABLE (table2), wire_y2_spinbutton, 1, 2, 5, 6,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_y2_spinbutton), TRUE);

  wire_x2_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
  wire_x2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_x2_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (wire_x2_spinbutton);
  gtk_table_attach (GTK_TABLE (table2), wire_x2_spinbutton, 0, 1, 5, 6,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_x2_spinbutton), TRUE);

  label28 = gtk_label_new (_("Tag Number"));
  gtk_widget_show (label28);
  gtk_table_attach (GTK_TABLE (table2), label28, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label28), 0.1, 0.5);

  wire_dia_spinbutton_adj = gtk_adjustment_new (0.00300000002608, 0, 100, 9.99999974738e-06, 10, 0);
  wire_dia_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_dia_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (wire_dia_spinbutton);
  gtk_table_attach (GTK_TABLE (table2), wire_dia_spinbutton, 3, 4, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_dia_spinbutton), TRUE);

  label35 = gtk_label_new (_("Wire Diameter"));
  gtk_widget_show (label35);
  gtk_table_attach (GTK_TABLE (table2), label35, 3, 4, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label35), 0.1, 0.5);

  label39 = gtk_label_new (_("Wire Length"));
  gtk_widget_show (label39);
  gtk_table_attach (GTK_TABLE (table2), label39, 3, 4, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label39), 0.1, 0.5);

  wire_len_spinbutton_adj = gtk_adjustment_new (2, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
  wire_len_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_len_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (wire_len_spinbutton);
  gtk_table_attach (GTK_TABLE (table2), wire_len_spinbutton, 3, 4, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_len_spinbutton), TRUE);

  label44 = gtk_label_new (_("Conductivity S/m"));
  gtk_widget_show (label44);
  gtk_table_attach (GTK_TABLE (table2), label44, 3, 4, 4, 5,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label44), 0.1, 0.5);

  wire_res_spinbutton_adj = gtk_adjustment_new (0, 0, 1000000000, 9.99999974738e-06, 10, 0);
  wire_res_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_res_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (wire_res_spinbutton);
  gtk_table_attach (GTK_TABLE (table2), wire_res_spinbutton, 3, 4, 5, 6,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_res_spinbutton), TRUE);

  wire_taper_checkbutton = gtk_check_button_new_with_mnemonic (_("Tapered Wire"));
  gtk_widget_show (wire_taper_checkbutton);
  gtk_frame_set_label_widget (GTK_FRAME (frame11), wire_taper_checkbutton);
  gtk_container_set_border_width (GTK_CONTAINER (wire_taper_checkbutton), 2);

  wire_taperframe = gtk_frame_new (NULL);
  gtk_widget_show (wire_taperframe);
  gtk_box_pack_start (GTK_BOX (vbox5), wire_taperframe, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (wire_taperframe), 4);

  alignment12 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment12);
  gtk_container_add (GTK_CONTAINER (wire_taperframe), alignment12);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment12), 0, 0, 12, 0);

  table3 = gtk_table_new (2, 4, FALSE);
  gtk_widget_show (table3);
  gtk_container_add (GTK_CONTAINER (alignment12), table3);
  gtk_table_set_row_spacings (GTK_TABLE (table3), 2);
  gtk_table_set_col_spacings (GTK_TABLE (table3), 2);

  label40 = gtk_label_new (_("Length Taper"));
  gtk_widget_show (label40);
  gtk_table_attach (GTK_TABLE (table3), label40, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label40), 0.1, 0.5);

  label41 = gtk_label_new (_("Diameter Seg 1"));
  gtk_widget_show (label41);
  gtk_table_attach (GTK_TABLE (table3), label41, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label41), 0.1, 0.5);

  label42 = gtk_label_new (_("Diameter Seg N"));
  gtk_widget_show (label42);
  gtk_table_attach (GTK_TABLE (table3), label42, 2, 3, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label42), 0.1, 0.5);

  label43 = gtk_label_new (_("Diam. Taper"));
  gtk_widget_show (label43);
  gtk_table_attach (GTK_TABLE (table3), label43, 3, 4, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label43), 0.1, 0.5);

  wire_rdia_spinbutton_adj = gtk_adjustment_new (0.920000016689, 0.5, 2, 9.99999974738e-06, 10, 0);
  wire_rdia_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_rdia_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (wire_rdia_spinbutton);
  gtk_table_attach (GTK_TABLE (table3), wire_rdia_spinbutton, 3, 4, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_rdia_spinbutton), TRUE);

  wire_dian_spinbutton_adj = gtk_adjustment_new (0.0179999992251, 9.99999974738e-06, 100, 9.99999974738e-06, 10, 0);
  wire_dian_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_dian_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (wire_dian_spinbutton);
  gtk_table_attach (GTK_TABLE (table3), wire_dian_spinbutton, 2, 3, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_dian_spinbutton), TRUE);

  wire_dia1_spinbutton_adj = gtk_adjustment_new (0.0309999994934, 9.99999974738e-06, 100, 9.99999974738e-06, 10, 0);
  wire_dia1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_dia1_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (wire_dia1_spinbutton);
  gtk_table_attach (GTK_TABLE (table3), wire_dia1_spinbutton, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_dia1_spinbutton), TRUE);

  wire_rlen_spinbutton_adj = gtk_adjustment_new (0.920000016689, 0.5, 2, 9.99999974738e-06, 10, 0);
  wire_rlen_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_rlen_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (wire_rlen_spinbutton);
  gtk_table_attach (GTK_TABLE (table3), wire_rlen_spinbutton, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_rlen_spinbutton), TRUE);

  label27 = gtk_label_new (_("Wire Taper Data"));
  gtk_widget_show (label27);
  gtk_frame_set_label_widget (GTK_FRAME (wire_taperframe), label27);
  gtk_misc_set_padding (GTK_MISC (label27), 4, 4);

  hbox21 = gtk_hbox_new (TRUE, 2);
  gtk_widget_show (hbox21);
  gtk_box_pack_start (GTK_BOX (vbox5), hbox21, TRUE, TRUE, 0);

  wire_new_button = gtk_button_new_from_stock ("gtk-new");
  gtk_widget_show (wire_new_button);
  gtk_box_pack_start (GTK_BOX (hbox21), wire_new_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (wire_new_button), 2);
  GTK_WIDGET_SET_FLAGS (wire_new_button, GTK_CAN_DEFAULT);

  wire_cancel_button = gtk_button_new ();
  gtk_widget_show (wire_cancel_button);
  gtk_box_pack_start (GTK_BOX (hbox21), wire_cancel_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (wire_cancel_button), 2);
  GTK_WIDGET_SET_FLAGS (wire_cancel_button, GTK_CAN_DEFAULT);

  alignment50 = gtk_alignment_new (0.5, 0.5, 0, 0);
  gtk_widget_show (alignment50);
  gtk_container_add (GTK_CONTAINER (wire_cancel_button), alignment50);

  hbox48 = gtk_hbox_new (FALSE, 2);
  gtk_widget_show (hbox48);
  gtk_container_add (GTK_CONTAINER (alignment50), hbox48);

  image70 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image70);
  gtk_box_pack_start (GTK_BOX (hbox48), image70, FALSE, FALSE, 0);

  label222 = gtk_label_new_with_mnemonic ("Delete Card");
  gtk_widget_show (label222);
  gtk_box_pack_start (GTK_BOX (hbox48), label222, FALSE, FALSE, 0);

  wire_apply_button = gtk_button_new_from_stock ("gtk-apply");
  gtk_widget_show (wire_apply_button);
  gtk_box_pack_start (GTK_BOX (hbox21), wire_apply_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (wire_apply_button), 2);
  GTK_WIDGET_SET_FLAGS (wire_apply_button, GTK_CAN_DEFAULT);

  wire_ok_button = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (wire_ok_button);
  gtk_box_pack_start (GTK_BOX (hbox21), wire_ok_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (wire_ok_button), 2);
  GTK_WIDGET_SET_FLAGS (wire_ok_button, GTK_CAN_DEFAULT);

  g_signal_connect ((gpointer) wire_editor, "destroy",
                    G_CALLBACK (on_wire_editor_destroy),
                    NULL);
  g_signal_connect ((gpointer) wire_tagnum_spinbutton, "value_changed",
                    G_CALLBACK (on_wire_tagnum_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) wire_numseg_spinbutton, "value_changed",
                    G_CALLBACK (on_wire_data_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) wire_pcl_spinbutton, "value_changed",
                    G_CALLBACK (on_wire_pcl_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) wire_x1_spinbutton, "value_changed",
                    G_CALLBACK (on_wire_data_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) wire_y1_spinbutton, "value_changed",
                    G_CALLBACK (on_wire_data_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) wire_z1_spinbutton, "value_changed",
                    G_CALLBACK (on_wire_data_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) wire_z2_spinbutton, "value_changed",
                    G_CALLBACK (on_wire_data_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) wire_y2_spinbutton, "value_changed",
                    G_CALLBACK (on_wire_data_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) wire_x2_spinbutton, "value_changed",
                    G_CALLBACK (on_wire_data_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) wire_dia_spinbutton, "value_changed",
                    G_CALLBACK (on_wire_data_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) wire_len_spinbutton, "value_changed",
                    G_CALLBACK (on_wire_len_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) wire_res_spinbutton, "value_changed",
                    G_CALLBACK (on_wire_res_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) wire_taper_checkbutton, "toggled",
                    G_CALLBACK (on_wire_taper_checkbutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) wire_rdia_spinbutton, "value_changed",
                    G_CALLBACK (on_wire_rdia_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) wire_dian_spinbutton, "value_changed",
                    G_CALLBACK (on_wire_data_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) wire_dia1_spinbutton, "value_changed",
                    G_CALLBACK (on_wire_rdia_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) wire_rlen_spinbutton, "value_changed",
                    G_CALLBACK (on_wire_rlen_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) wire_new_button, "clicked",
                    G_CALLBACK (on_wire_new_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) wire_cancel_button, "clicked",
                    G_CALLBACK (on_wire_cancel_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) wire_apply_button, "clicked",
                    G_CALLBACK (on_wire_apply_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) wire_ok_button, "clicked",
                    G_CALLBACK (on_wire_ok_button_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (wire_editor, wire_editor, "wire_editor");
  GLADE_HOOKUP_OBJECT (wire_editor, vbox5, "vbox5");
  GLADE_HOOKUP_OBJECT (wire_editor, frame11, "frame11");
  GLADE_HOOKUP_OBJECT (wire_editor, table2, "table2");
  GLADE_HOOKUP_OBJECT (wire_editor, label29, "label29");
  GLADE_HOOKUP_OBJECT (wire_editor, label30, "label30");
  GLADE_HOOKUP_OBJECT (wire_editor, label31, "label31");
  GLADE_HOOKUP_OBJECT (wire_editor, label32, "label32");
  GLADE_HOOKUP_OBJECT (wire_editor, label33, "label33");
  GLADE_HOOKUP_OBJECT (wire_editor, label34, "label34");
  GLADE_HOOKUP_OBJECT (wire_editor, label36, "label36");
  GLADE_HOOKUP_OBJECT (wire_editor, label37, "label37");
  GLADE_HOOKUP_OBJECT (wire_editor, label38, "label38");
  GLADE_HOOKUP_OBJECT (wire_editor, wire_tagnum_spinbutton, "wire_tagnum_spinbutton");
  GLADE_HOOKUP_OBJECT (wire_editor, wire_numseg_spinbutton, "wire_numseg_spinbutton");
  GLADE_HOOKUP_OBJECT (wire_editor, wire_pcl_spinbutton, "wire_pcl_spinbutton");
  GLADE_HOOKUP_OBJECT (wire_editor, wire_x1_spinbutton, "wire_x1_spinbutton");
  GLADE_HOOKUP_OBJECT (wire_editor, wire_y1_spinbutton, "wire_y1_spinbutton");
  GLADE_HOOKUP_OBJECT (wire_editor, wire_z1_spinbutton, "wire_z1_spinbutton");
  GLADE_HOOKUP_OBJECT (wire_editor, wire_z2_spinbutton, "wire_z2_spinbutton");
  GLADE_HOOKUP_OBJECT (wire_editor, wire_y2_spinbutton, "wire_y2_spinbutton");
  GLADE_HOOKUP_OBJECT (wire_editor, wire_x2_spinbutton, "wire_x2_spinbutton");
  GLADE_HOOKUP_OBJECT (wire_editor, label28, "label28");
  GLADE_HOOKUP_OBJECT (wire_editor, wire_dia_spinbutton, "wire_dia_spinbutton");
  GLADE_HOOKUP_OBJECT (wire_editor, label35, "label35");
  GLADE_HOOKUP_OBJECT (wire_editor, label39, "label39");
  GLADE_HOOKUP_OBJECT (wire_editor, wire_len_spinbutton, "wire_len_spinbutton");
  GLADE_HOOKUP_OBJECT (wire_editor, label44, "label44");
  GLADE_HOOKUP_OBJECT (wire_editor, wire_res_spinbutton, "wire_res_spinbutton");
  GLADE_HOOKUP_OBJECT (wire_editor, wire_taper_checkbutton, "wire_taper_checkbutton");
  GLADE_HOOKUP_OBJECT (wire_editor, wire_taperframe, "wire_taperframe");
  GLADE_HOOKUP_OBJECT (wire_editor, alignment12, "alignment12");
  GLADE_HOOKUP_OBJECT (wire_editor, table3, "table3");
  GLADE_HOOKUP_OBJECT (wire_editor, label40, "label40");
  GLADE_HOOKUP_OBJECT (wire_editor, label41, "label41");
  GLADE_HOOKUP_OBJECT (wire_editor, label42, "label42");
  GLADE_HOOKUP_OBJECT (wire_editor, label43, "label43");
  GLADE_HOOKUP_OBJECT (wire_editor, wire_rdia_spinbutton, "wire_rdia_spinbutton");
  GLADE_HOOKUP_OBJECT (wire_editor, wire_dian_spinbutton, "wire_dian_spinbutton");
  GLADE_HOOKUP_OBJECT (wire_editor, wire_dia1_spinbutton, "wire_dia1_spinbutton");
  GLADE_HOOKUP_OBJECT (wire_editor, wire_rlen_spinbutton, "wire_rlen_spinbutton");
  GLADE_HOOKUP_OBJECT (wire_editor, label27, "label27");
  GLADE_HOOKUP_OBJECT (wire_editor, hbox21, "hbox21");
  GLADE_HOOKUP_OBJECT (wire_editor, wire_new_button, "wire_new_button");
  GLADE_HOOKUP_OBJECT (wire_editor, wire_cancel_button, "wire_cancel_button");
  GLADE_HOOKUP_OBJECT (wire_editor, alignment50, "alignment50");
  GLADE_HOOKUP_OBJECT (wire_editor, hbox48, "hbox48");
  GLADE_HOOKUP_OBJECT (wire_editor, image70, "image70");
  GLADE_HOOKUP_OBJECT (wire_editor, label222, "label222");
  GLADE_HOOKUP_OBJECT (wire_editor, wire_apply_button, "wire_apply_button");
  GLADE_HOOKUP_OBJECT (wire_editor, wire_ok_button, "wire_ok_button");

  return wire_editor;
}

GtkWidget*
create_patch_editor (void)
{
  GtkWidget *patch_editor;
  GtkWidget *vbox6;
  GtkWidget *patch_type_frame;
  GtkWidget *alignment13;
  GtkWidget *hbox22;
  GtkWidget *patch_arbitary_radiobutton;
  GSList *patch_arbitary_radiobutton_group = NULL;
  GtkWidget *patch_rectangular_radiobutton;
  GtkWidget *patch_triangular_radiobutton;
  GtkWidget *patch_quadrilateral_radiobutton;
  GtkWidget *patch_surface_radiobutton;
  GtkWidget *label45;
  GtkWidget *patch_sm_frame;
  GtkWidget *alignment18;
  GtkWidget *table10;
  GtkWidget *label87;
  GtkWidget *label88;
  GtkObject *patch_nx_spinbutton_adj;
  GtkWidget *patch_nx_spinbutton;
  GtkObject *patch_ny_spinbutton_adj;
  GtkWidget *patch_ny_spinbutton;
  GtkWidget *label86;
  GtkWidget *frame13;
  GtkWidget *alignment14;
  GtkWidget *table5;
  GtkWidget *patch_x1_label;
  GtkWidget *patch_y1_label;
  GtkWidget *patch_z1_label;
  GtkObject *patch_x1_spinbutton_adj;
  GtkWidget *patch_x1_spinbutton;
  GtkObject *patch_y1_spinbutton_adj;
  GtkWidget *patch_y1_spinbutton;
  GtkObject *patch_z1_spinbutton_adj;
  GtkWidget *patch_z1_spinbutton;
  GtkObject *patch_x2_spinbutton_adj;
  GtkWidget *patch_x2_spinbutton;
  GtkObject *patch_y2_spinbutton_adj;
  GtkWidget *patch_y2_spinbutton;
  GtkObject *patch_z2_spinbutton_adj;
  GtkWidget *patch_z2_spinbutton;
  GtkWidget *patch_x2_label;
  GtkWidget *patch_y2_label;
  GtkWidget *patch_z2_label;
  GtkWidget *label46;
  GtkWidget *patch_sc_frame;
  GtkWidget *alignment15;
  GtkWidget *vbox7;
  GtkWidget *table6;
  GtkObject *patch_x3_spinbutton_adj;
  GtkWidget *patch_x3_spinbutton;
  GtkObject *patch_y3_spinbutton_adj;
  GtkWidget *patch_y3_spinbutton;
  GtkObject *patch_z3_spinbutton_adj;
  GtkWidget *patch_z3_spinbutton;
  GtkWidget *label54;
  GtkWidget *label57;
  GtkWidget *label58;
  GtkWidget *patch_sc_table;
  GtkObject *patch_x4_spinbutton_adj;
  GtkWidget *patch_x4_spinbutton;
  GtkObject *patch_y4_spinbutton_adj;
  GtkWidget *patch_y4_spinbutton;
  GtkObject *patch_z4_spinbutton_adj;
  GtkWidget *patch_z4_spinbutton;
  GtkWidget *label55;
  GtkWidget *label56;
  GtkWidget *label59;
  GtkWidget *label47;
  GtkWidget *hbox23;
  GtkWidget *patch_new_button;
  GtkWidget *patch_cancel_button;
  GtkWidget *alignment51;
  GtkWidget *hbox49;
  GtkWidget *image71;
  GtkWidget *label223;
  GtkWidget *patch_apply_button;
  GtkWidget *patch_ok_button;

  patch_editor = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_container_set_border_width (GTK_CONTAINER (patch_editor), 4);
  gtk_window_set_title (GTK_WINDOW (patch_editor), _("Patch Element (SP & SC Cards)"));

  vbox6 = gtk_vbox_new (FALSE, 2);
  gtk_widget_show (vbox6);
  gtk_container_add (GTK_CONTAINER (patch_editor), vbox6);

  patch_type_frame = gtk_frame_new (NULL);
  gtk_widget_show (patch_type_frame);
  gtk_box_pack_start (GTK_BOX (vbox6), patch_type_frame, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (patch_type_frame), 4);

  alignment13 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment13);
  gtk_container_add (GTK_CONTAINER (patch_type_frame), alignment13);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment13), 0, 0, 12, 0);

  hbox22 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox22);
  gtk_container_add (GTK_CONTAINER (alignment13), hbox22);

  patch_arbitary_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Arbitary"));
  gtk_widget_show (patch_arbitary_radiobutton);
  gtk_box_pack_start (GTK_BOX (hbox22), patch_arbitary_radiobutton, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (patch_arbitary_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (patch_arbitary_radiobutton), patch_arbitary_radiobutton_group);
  patch_arbitary_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (patch_arbitary_radiobutton));
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (patch_arbitary_radiobutton), TRUE);

  patch_rectangular_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Rectangle"));
  gtk_widget_show (patch_rectangular_radiobutton);
  gtk_box_pack_start (GTK_BOX (hbox22), patch_rectangular_radiobutton, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (patch_rectangular_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (patch_rectangular_radiobutton), patch_arbitary_radiobutton_group);
  patch_arbitary_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (patch_rectangular_radiobutton));

  patch_triangular_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Triangle"));
  gtk_widget_show (patch_triangular_radiobutton);
  gtk_box_pack_start (GTK_BOX (hbox22), patch_triangular_radiobutton, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (patch_triangular_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (patch_triangular_radiobutton), patch_arbitary_radiobutton_group);
  patch_arbitary_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (patch_triangular_radiobutton));

  patch_quadrilateral_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Quadrilateral"));
  gtk_widget_show (patch_quadrilateral_radiobutton);
  gtk_box_pack_start (GTK_BOX (hbox22), patch_quadrilateral_radiobutton, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (patch_quadrilateral_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (patch_quadrilateral_radiobutton), patch_arbitary_radiobutton_group);
  patch_arbitary_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (patch_quadrilateral_radiobutton));

  patch_surface_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Surface"));
  gtk_widget_show (patch_surface_radiobutton);
  gtk_box_pack_start (GTK_BOX (hbox22), patch_surface_radiobutton, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (patch_surface_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (patch_surface_radiobutton), patch_arbitary_radiobutton_group);
  patch_arbitary_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (patch_surface_radiobutton));

  label45 = gtk_label_new (_("Patch Type"));
  gtk_widget_show (label45);
  gtk_frame_set_label_widget (GTK_FRAME (patch_type_frame), label45);
  gtk_misc_set_padding (GTK_MISC (label45), 4, 4);

  patch_sm_frame = gtk_frame_new (NULL);
  gtk_widget_show (patch_sm_frame);
  gtk_box_pack_start (GTK_BOX (vbox6), patch_sm_frame, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (patch_sm_frame), 4);

  alignment18 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment18);
  gtk_container_add (GTK_CONTAINER (patch_sm_frame), alignment18);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment18), 0, 0, 12, 0);

  table10 = gtk_table_new (2, 2, FALSE);
  gtk_widget_show (table10);
  gtk_container_add (GTK_CONTAINER (alignment18), table10);

  label87 = gtk_label_new (_("Corners 1-2 sub-division (NX)"));
  gtk_widget_show (label87);
  gtk_table_attach (GTK_TABLE (table10), label87, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label87), 0.1, 0.5);

  label88 = gtk_label_new (_("Corners 2-3 sub-division (NY)"));
  gtk_widget_show (label88);
  gtk_table_attach (GTK_TABLE (table10), label88, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label88), 0.1, 0.5);

  patch_nx_spinbutton_adj = gtk_adjustment_new (8, 1, 10000, 1, 10, 0);
  patch_nx_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_nx_spinbutton_adj), 0.00999999977648, 0);
  gtk_widget_show (patch_nx_spinbutton);
  gtk_table_attach (GTK_TABLE (table10), patch_nx_spinbutton, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_nx_spinbutton), TRUE);

  patch_ny_spinbutton_adj = gtk_adjustment_new (8, 1, 10000, 1, 10, 0);
  patch_ny_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_ny_spinbutton_adj), 0.00999999977648, 0);
  gtk_widget_show (patch_ny_spinbutton);
  gtk_table_attach (GTK_TABLE (table10), patch_ny_spinbutton, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_ny_spinbutton), TRUE);

  label86 = gtk_label_new (_("Surface Sub-division"));
  gtk_widget_show (label86);
  gtk_frame_set_label_widget (GTK_FRAME (patch_sm_frame), label86);
  gtk_misc_set_padding (GTK_MISC (label86), 4, 4);

  frame13 = gtk_frame_new (NULL);
  gtk_widget_show (frame13);
  gtk_box_pack_start (GTK_BOX (vbox6), frame13, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frame13), 4);

  alignment14 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment14);
  gtk_container_add (GTK_CONTAINER (frame13), alignment14);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment14), 0, 0, 12, 0);

  table5 = gtk_table_new (4, 3, FALSE);
  gtk_widget_show (table5);
  gtk_container_add (GTK_CONTAINER (alignment14), table5);
  gtk_table_set_row_spacings (GTK_TABLE (table5), 2);
  gtk_table_set_col_spacings (GTK_TABLE (table5), 2);

  patch_x1_label = gtk_label_new (_("Center - X"));
  gtk_widget_show (patch_x1_label);
  gtk_table_attach (GTK_TABLE (table5), patch_x1_label, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (patch_x1_label), 0.1, 0.5);

  patch_y1_label = gtk_label_new (_("Center - Y"));
  gtk_widget_show (patch_y1_label);
  gtk_table_attach (GTK_TABLE (table5), patch_y1_label, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (patch_y1_label), 0.1, 0.5);

  patch_z1_label = gtk_label_new (_("Center - Z"));
  gtk_widget_show (patch_z1_label);
  gtk_table_attach (GTK_TABLE (table5), patch_z1_label, 2, 3, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (patch_z1_label), 0.1, 0.5);

  patch_x1_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
  patch_x1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_x1_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (patch_x1_spinbutton);
  gtk_table_attach (GTK_TABLE (table5), patch_x1_spinbutton, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_x1_spinbutton), TRUE);

  patch_y1_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
  patch_y1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_y1_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (patch_y1_spinbutton);
  gtk_table_attach (GTK_TABLE (table5), patch_y1_spinbutton, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_y1_spinbutton), TRUE);

  patch_z1_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
  patch_z1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_z1_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (patch_z1_spinbutton);
  gtk_table_attach (GTK_TABLE (table5), patch_z1_spinbutton, 2, 3, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_z1_spinbutton), TRUE);

  patch_x2_spinbutton_adj = gtk_adjustment_new (45, -10000, 10000, 9.99999974738e-06, 10, 0);
  patch_x2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_x2_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (patch_x2_spinbutton);
  gtk_table_attach (GTK_TABLE (table5), patch_x2_spinbutton, 0, 1, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_x2_spinbutton), TRUE);

  patch_y2_spinbutton_adj = gtk_adjustment_new (45, -10000, 10000, 9.99999974738e-06, 10, 0);
  patch_y2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_y2_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (patch_y2_spinbutton);
  gtk_table_attach (GTK_TABLE (table5), patch_y2_spinbutton, 1, 2, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_y2_spinbutton), TRUE);

  patch_z2_spinbutton_adj = gtk_adjustment_new (0.10000000149, -10000, 10000, 9.99999974738e-06, 10, 0);
  patch_z2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_z2_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (patch_z2_spinbutton);
  gtk_table_attach (GTK_TABLE (table5), patch_z2_spinbutton, 2, 3, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_z2_spinbutton), TRUE);

  patch_x2_label = gtk_label_new (_("Normal - Elev."));
  gtk_widget_show (patch_x2_label);
  gtk_table_attach (GTK_TABLE (table5), patch_x2_label, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (patch_x2_label), 0.1, 0.5);

  patch_y2_label = gtk_label_new (_("Normal - Azim."));
  gtk_widget_show (patch_y2_label);
  gtk_table_attach (GTK_TABLE (table5), patch_y2_label, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (patch_y2_label), 0.1, 0.5);

  patch_z2_label = gtk_label_new (_("Patch Area"));
  gtk_widget_show (patch_z2_label);
  gtk_table_attach (GTK_TABLE (table5), patch_z2_label, 2, 3, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (patch_z2_label), 0.1, 0.5);

  label46 = gtk_label_new (_("SP/SM Cards"));
  gtk_widget_show (label46);
  gtk_frame_set_label_widget (GTK_FRAME (frame13), label46);
  gtk_misc_set_padding (GTK_MISC (label46), 4, 4);

  patch_sc_frame = gtk_frame_new (NULL);
  gtk_widget_show (patch_sc_frame);
  gtk_box_pack_start (GTK_BOX (vbox6), patch_sc_frame, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (patch_sc_frame), 4);

  alignment15 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment15);
  gtk_container_add (GTK_CONTAINER (patch_sc_frame), alignment15);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment15), 0, 0, 12, 0);

  vbox7 = gtk_vbox_new (FALSE, 2);
  gtk_widget_show (vbox7);
  gtk_container_add (GTK_CONTAINER (alignment15), vbox7);

  table6 = gtk_table_new (2, 3, FALSE);
  gtk_widget_show (table6);
  gtk_box_pack_start (GTK_BOX (vbox7), table6, TRUE, TRUE, 0);
  gtk_table_set_row_spacings (GTK_TABLE (table6), 2);
  gtk_table_set_col_spacings (GTK_TABLE (table6), 2);

  patch_x3_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
  patch_x3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_x3_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (patch_x3_spinbutton);
  gtk_table_attach (GTK_TABLE (table6), patch_x3_spinbutton, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_x3_spinbutton), TRUE);

  patch_y3_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
  patch_y3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_y3_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (patch_y3_spinbutton);
  gtk_table_attach (GTK_TABLE (table6), patch_y3_spinbutton, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_y3_spinbutton), TRUE);

  patch_z3_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
  patch_z3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_z3_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (patch_z3_spinbutton);
  gtk_table_attach (GTK_TABLE (table6), patch_z3_spinbutton, 2, 3, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_z3_spinbutton), TRUE);

  label54 = gtk_label_new (_("Corner 3 - X"));
  gtk_widget_show (label54);
  gtk_table_attach (GTK_TABLE (table6), label54, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label54), 0.1, 0.5);

  label57 = gtk_label_new (_("Corner 3 - Y"));
  gtk_widget_show (label57);
  gtk_table_attach (GTK_TABLE (table6), label57, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label57), 0.1, 0.5);

  label58 = gtk_label_new (_("Corner 3 - Z"));
  gtk_widget_show (label58);
  gtk_table_attach (GTK_TABLE (table6), label58, 2, 3, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label58), 0.1, 0.5);

  patch_sc_table = gtk_table_new (2, 3, FALSE);
  gtk_widget_show (patch_sc_table);
  gtk_box_pack_start (GTK_BOX (vbox7), patch_sc_table, TRUE, TRUE, 0);
  gtk_table_set_row_spacings (GTK_TABLE (patch_sc_table), 2);
  gtk_table_set_col_spacings (GTK_TABLE (patch_sc_table), 2);

  patch_x4_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
  patch_x4_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_x4_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (patch_x4_spinbutton);
  gtk_table_attach (GTK_TABLE (patch_sc_table), patch_x4_spinbutton, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_x4_spinbutton), TRUE);

  patch_y4_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
  patch_y4_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_y4_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (patch_y4_spinbutton);
  gtk_table_attach (GTK_TABLE (patch_sc_table), patch_y4_spinbutton, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_y4_spinbutton), TRUE);

  patch_z4_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
  patch_z4_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_z4_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (patch_z4_spinbutton);
  gtk_table_attach (GTK_TABLE (patch_sc_table), patch_z4_spinbutton, 2, 3, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_z4_spinbutton), TRUE);

  label55 = gtk_label_new (_("Corner 4 - X"));
  gtk_widget_show (label55);
  gtk_table_attach (GTK_TABLE (patch_sc_table), label55, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label55), 0.1, 0.5);

  label56 = gtk_label_new (_("Corner 4 - Y"));
  gtk_widget_show (label56);
  gtk_table_attach (GTK_TABLE (patch_sc_table), label56, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label56), 0.1, 0.5);

  label59 = gtk_label_new (_("Corner 4 - Z"));
  gtk_widget_show (label59);
  gtk_table_attach (GTK_TABLE (patch_sc_table), label59, 2, 3, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label59), 0.1, 0.5);

  label47 = gtk_label_new (_("SC Card"));
  gtk_widget_show (label47);
  gtk_frame_set_label_widget (GTK_FRAME (patch_sc_frame), label47);
  gtk_misc_set_padding (GTK_MISC (label47), 4, 4);

  hbox23 = gtk_hbox_new (TRUE, 2);
  gtk_widget_show (hbox23);
  gtk_box_pack_start (GTK_BOX (vbox6), hbox23, TRUE, TRUE, 0);

  patch_new_button = gtk_button_new_from_stock ("gtk-new");
  gtk_widget_show (patch_new_button);
  gtk_box_pack_start (GTK_BOX (hbox23), patch_new_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (patch_new_button), 2);

  patch_cancel_button = gtk_button_new ();
  gtk_widget_show (patch_cancel_button);
  gtk_box_pack_start (GTK_BOX (hbox23), patch_cancel_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (patch_cancel_button), 2);

  alignment51 = gtk_alignment_new (0.5, 0.5, 0, 0);
  gtk_widget_show (alignment51);
  gtk_container_add (GTK_CONTAINER (patch_cancel_button), alignment51);

  hbox49 = gtk_hbox_new (FALSE, 2);
  gtk_widget_show (hbox49);
  gtk_container_add (GTK_CONTAINER (alignment51), hbox49);

  image71 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image71);
  gtk_box_pack_start (GTK_BOX (hbox49), image71, FALSE, FALSE, 0);

  label223 = gtk_label_new_with_mnemonic ("Delete Card");
  gtk_widget_show (label223);
  gtk_box_pack_start (GTK_BOX (hbox49), label223, FALSE, FALSE, 0);

  patch_apply_button = gtk_button_new_from_stock ("gtk-apply");
  gtk_widget_show (patch_apply_button);
  gtk_box_pack_start (GTK_BOX (hbox23), patch_apply_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (patch_apply_button), 2);

  patch_ok_button = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (patch_ok_button);
  gtk_box_pack_start (GTK_BOX (hbox23), patch_ok_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (patch_ok_button), 2);

  g_signal_connect ((gpointer) patch_editor, "destroy",
                    G_CALLBACK (on_patch_editor_destroy),
                    NULL);
  g_signal_connect ((gpointer) patch_arbitary_radiobutton, "toggled",
                    G_CALLBACK (on_patch_arbitary_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) patch_rectangular_radiobutton, "toggled",
                    G_CALLBACK (on_patch_rectangular_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) patch_triangular_radiobutton, "toggled",
                    G_CALLBACK (on_patch_triangular_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) patch_quadrilateral_radiobutton, "toggled",
                    G_CALLBACK (on_patch_quadrilateral_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) patch_surface_radiobutton, "toggled",
                    G_CALLBACK (on_patch_surface_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) patch_nx_spinbutton, "value_changed",
                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) patch_ny_spinbutton, "value_changed",
                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) patch_x1_spinbutton, "value_changed",
                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) patch_y1_spinbutton, "value_changed",
                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) patch_z1_spinbutton, "value_changed",
                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) patch_x2_spinbutton, "value_changed",
                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) patch_y2_spinbutton, "value_changed",
                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) patch_z2_spinbutton, "value_changed",
                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) patch_x3_spinbutton, "value_changed",
                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) patch_y3_spinbutton, "value_changed",
                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) patch_z3_spinbutton, "value_changed",
                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) patch_x4_spinbutton, "value_changed",
                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) patch_y4_spinbutton, "value_changed",
                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) patch_z4_spinbutton, "value_changed",
                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) patch_new_button, "clicked",
                    G_CALLBACK (on_patch_new_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) patch_cancel_button, "clicked",
                    G_CALLBACK (on_patch_cancel_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) patch_apply_button, "clicked",
                    G_CALLBACK (on_patch_apply_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) patch_ok_button, "clicked",
                    G_CALLBACK (on_patch_ok_button_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (patch_editor, patch_editor, "patch_editor");
  GLADE_HOOKUP_OBJECT (patch_editor, vbox6, "vbox6");
  GLADE_HOOKUP_OBJECT (patch_editor, patch_type_frame, "patch_type_frame");
  GLADE_HOOKUP_OBJECT (patch_editor, alignment13, "alignment13");
  GLADE_HOOKUP_OBJECT (patch_editor, hbox22, "hbox22");
  GLADE_HOOKUP_OBJECT (patch_editor, patch_arbitary_radiobutton, "patch_arbitary_radiobutton");
  GLADE_HOOKUP_OBJECT (patch_editor, patch_rectangular_radiobutton, "patch_rectangular_radiobutton");
  GLADE_HOOKUP_OBJECT (patch_editor, patch_triangular_radiobutton, "patch_triangular_radiobutton");
  GLADE_HOOKUP_OBJECT (patch_editor, patch_quadrilateral_radiobutton, "patch_quadrilateral_radiobutton");
  GLADE_HOOKUP_OBJECT (patch_editor, patch_surface_radiobutton, "patch_surface_radiobutton");
  GLADE_HOOKUP_OBJECT (patch_editor, label45, "label45");
  GLADE_HOOKUP_OBJECT (patch_editor, patch_sm_frame, "patch_sm_frame");
  GLADE_HOOKUP_OBJECT (patch_editor, alignment18, "alignment18");
  GLADE_HOOKUP_OBJECT (patch_editor, table10, "table10");
  GLADE_HOOKUP_OBJECT (patch_editor, label87, "label87");
  GLADE_HOOKUP_OBJECT (patch_editor, label88, "label88");
  GLADE_HOOKUP_OBJECT (patch_editor, patch_nx_spinbutton, "patch_nx_spinbutton");
  GLADE_HOOKUP_OBJECT (patch_editor, patch_ny_spinbutton, "patch_ny_spinbutton");
  GLADE_HOOKUP_OBJECT (patch_editor, label86, "label86");
  GLADE_HOOKUP_OBJECT (patch_editor, frame13, "frame13");
  GLADE_HOOKUP_OBJECT (patch_editor, alignment14, "alignment14");
  GLADE_HOOKUP_OBJECT (patch_editor, table5, "table5");
  GLADE_HOOKUP_OBJECT (patch_editor, patch_x1_label, "patch_x1_label");
  GLADE_HOOKUP_OBJECT (patch_editor, patch_y1_label, "patch_y1_label");
  GLADE_HOOKUP_OBJECT (patch_editor, patch_z1_label, "patch_z1_label");
  GLADE_HOOKUP_OBJECT (patch_editor, patch_x1_spinbutton, "patch_x1_spinbutton");
  GLADE_HOOKUP_OBJECT (patch_editor, patch_y1_spinbutton, "patch_y1_spinbutton");
  GLADE_HOOKUP_OBJECT (patch_editor, patch_z1_spinbutton, "patch_z1_spinbutton");
  GLADE_HOOKUP_OBJECT (patch_editor, patch_x2_spinbutton, "patch_x2_spinbutton");
  GLADE_HOOKUP_OBJECT (patch_editor, patch_y2_spinbutton, "patch_y2_spinbutton");
  GLADE_HOOKUP_OBJECT (patch_editor, patch_z2_spinbutton, "patch_z2_spinbutton");
  GLADE_HOOKUP_OBJECT (patch_editor, patch_x2_label, "patch_x2_label");
  GLADE_HOOKUP_OBJECT (patch_editor, patch_y2_label, "patch_y2_label");
  GLADE_HOOKUP_OBJECT (patch_editor, patch_z2_label, "patch_z2_label");
  GLADE_HOOKUP_OBJECT (patch_editor, label46, "label46");
  GLADE_HOOKUP_OBJECT (patch_editor, patch_sc_frame, "patch_sc_frame");
  GLADE_HOOKUP_OBJECT (patch_editor, alignment15, "alignment15");
  GLADE_HOOKUP_OBJECT (patch_editor, vbox7, "vbox7");
  GLADE_HOOKUP_OBJECT (patch_editor, table6, "table6");
  GLADE_HOOKUP_OBJECT (patch_editor, patch_x3_spinbutton, "patch_x3_spinbutton");
  GLADE_HOOKUP_OBJECT (patch_editor, patch_y3_spinbutton, "patch_y3_spinbutton");
  GLADE_HOOKUP_OBJECT (patch_editor, patch_z3_spinbutton, "patch_z3_spinbutton");
  GLADE_HOOKUP_OBJECT (patch_editor, label54, "label54");
  GLADE_HOOKUP_OBJECT (patch_editor, label57, "label57");
  GLADE_HOOKUP_OBJECT (patch_editor, label58, "label58");
  GLADE_HOOKUP_OBJECT (patch_editor, patch_sc_table, "patch_sc_table");
  GLADE_HOOKUP_OBJECT (patch_editor, patch_x4_spinbutton, "patch_x4_spinbutton");
  GLADE_HOOKUP_OBJECT (patch_editor, patch_y4_spinbutton, "patch_y4_spinbutton");
  GLADE_HOOKUP_OBJECT (patch_editor, patch_z4_spinbutton, "patch_z4_spinbutton");
  GLADE_HOOKUP_OBJECT (patch_editor, label55, "label55");
  GLADE_HOOKUP_OBJECT (patch_editor, label56, "label56");
  GLADE_HOOKUP_OBJECT (patch_editor, label59, "label59");
  GLADE_HOOKUP_OBJECT (patch_editor, label47, "label47");
  GLADE_HOOKUP_OBJECT (patch_editor, hbox23, "hbox23");
  GLADE_HOOKUP_OBJECT (patch_editor, patch_new_button, "patch_new_button");
  GLADE_HOOKUP_OBJECT (patch_editor, patch_cancel_button, "patch_cancel_button");
  GLADE_HOOKUP_OBJECT (patch_editor, alignment51, "alignment51");
  GLADE_HOOKUP_OBJECT (patch_editor, hbox49, "hbox49");
  GLADE_HOOKUP_OBJECT (patch_editor, image71, "image71");
  GLADE_HOOKUP_OBJECT (patch_editor, label223, "label223");
  GLADE_HOOKUP_OBJECT (patch_editor, patch_apply_button, "patch_apply_button");
  GLADE_HOOKUP_OBJECT (patch_editor, patch_ok_button, "patch_ok_button");

  return patch_editor;
}

GtkWidget*
create_arc_editor (void)
{
  GtkWidget *arc_editor;
  GtkWidget *vbox8;
  GtkWidget *frame14;
  GtkWidget *alignment16;
  GtkWidget *table7;
  GtkWidget *label66;
  GtkWidget *label67;
  GtkObject *arc_end1_spinbutton_adj;
  GtkWidget *arc_end1_spinbutton;
  GtkObject *arc_end2_spinbutton_adj;
  GtkWidget *arc_end2_spinbutton;
  GtkObject *arc_tagnum_spinbutton_adj;
  GtkWidget *arc_tagnum_spinbutton;
  GtkObject *arc_numseg_spinbutton_adj;
  GtkWidget *arc_numseg_spinbutton;
  GtkWidget *label63;
  GtkWidget *label64;
  GtkWidget *label65;
  GtkObject *arc_rad_spinbutton_adj;
  GtkWidget *arc_rad_spinbutton;
  GtkWidget *label69;
  GtkObject *arc_pcl_spinbutton_adj;
  GtkWidget *arc_pcl_spinbutton;
  GtkObject *arc_res_spinbutton_adj;
  GtkWidget *arc_res_spinbutton;
  GtkWidget *label70;
  GtkWidget *label68;
  GtkObject *arc_dia_spinbutton_adj;
  GtkWidget *arc_dia_spinbutton;
  GtkWidget *label60;
  GtkWidget *hbox24;
  GtkWidget *arc_new_button;
  GtkWidget *arc_cancel_button;
  GtkWidget *alignment52;
  GtkWidget *hbox50;
  GtkWidget *image72;
  GtkWidget *label224;
  GtkWidget *arc_apply_button;
  GtkWidget *arc_ok_buttonbutton;

  arc_editor = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_container_set_border_width (GTK_CONTAINER (arc_editor), 4);
  gtk_window_set_title (GTK_WINDOW (arc_editor), _("Arc Element (GA card)"));
  gtk_window_set_destroy_with_parent (GTK_WINDOW (arc_editor), TRUE);

  vbox8 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox8);
  gtk_container_add (GTK_CONTAINER (arc_editor), vbox8);

  frame14 = gtk_frame_new (NULL);
  gtk_widget_show (frame14);
  gtk_box_pack_start (GTK_BOX (vbox8), frame14, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frame14), 4);

  alignment16 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment16);
  gtk_container_add (GTK_CONTAINER (frame14), alignment16);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment16), 0, 0, 12, 0);

  table7 = gtk_table_new (4, 4, FALSE);
  gtk_widget_show (table7);
  gtk_container_add (GTK_CONTAINER (alignment16), table7);
  gtk_table_set_row_spacings (GTK_TABLE (table7), 2);
  gtk_table_set_col_spacings (GTK_TABLE (table7), 2);

  label66 = gtk_label_new (_("End 1 Angle"));
  gtk_widget_show (label66);
  gtk_table_attach (GTK_TABLE (table7), label66, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label66), 0.1, 0.5);

  label67 = gtk_label_new (_("End 2 Angle"));
  gtk_widget_show (label67);
  gtk_table_attach (GTK_TABLE (table7), label67, 2, 3, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label67), 0.1, 0.5);

  arc_end1_spinbutton_adj = gtk_adjustment_new (45, -360, 360, 9.99999974738e-06, 10, 0);
  arc_end1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (arc_end1_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (arc_end1_spinbutton);
  gtk_table_attach (GTK_TABLE (table7), arc_end1_spinbutton, 1, 2, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (arc_end1_spinbutton), TRUE);

  arc_end2_spinbutton_adj = gtk_adjustment_new (135, -360, 360, 9.99999974738e-06, 10, 0);
  arc_end2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (arc_end2_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (arc_end2_spinbutton);
  gtk_table_attach (GTK_TABLE (table7), arc_end2_spinbutton, 2, 3, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (arc_end2_spinbutton), TRUE);

  arc_tagnum_spinbutton_adj = gtk_adjustment_new (1, 1, 100000, 1, 10, 0);
  arc_tagnum_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (arc_tagnum_spinbutton_adj), 0.00999999977648, 0);
  gtk_widget_show (arc_tagnum_spinbutton);
  gtk_table_attach (GTK_TABLE (table7), arc_tagnum_spinbutton, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (arc_tagnum_spinbutton), TRUE);

  arc_numseg_spinbutton_adj = gtk_adjustment_new (15, 1, 100000, 1, 10, 0);
  arc_numseg_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (arc_numseg_spinbutton_adj), 0.00999999977648, 0);
  gtk_widget_show (arc_numseg_spinbutton);
  gtk_table_attach (GTK_TABLE (table7), arc_numseg_spinbutton, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (arc_numseg_spinbutton), TRUE);

  label63 = gtk_label_new (_("Tag Number"));
  gtk_widget_show (label63);
  gtk_table_attach (GTK_TABLE (table7), label63, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label63), 0.1, 0.5);

  label64 = gtk_label_new (_("No. Segments"));
  gtk_widget_show (label64);
  gtk_table_attach (GTK_TABLE (table7), label64, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label64), 0.1, 0.5);

  label65 = gtk_label_new (_("Radius from Y"));
  gtk_widget_show (label65);
  gtk_table_attach (GTK_TABLE (table7), label65, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label65), 0.1, 0.5);

  arc_rad_spinbutton_adj = gtk_adjustment_new (1, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
  arc_rad_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (arc_rad_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (arc_rad_spinbutton);
  gtk_table_attach (GTK_TABLE (table7), arc_rad_spinbutton, 0, 1, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (arc_rad_spinbutton), TRUE);

  label69 = gtk_label_new (_("Segs % lambda"));
  gtk_widget_show (label69);
  gtk_table_attach (GTK_TABLE (table7), label69, 2, 3, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label69), 0.1, 0.5);

  arc_pcl_spinbutton_adj = gtk_adjustment_new (5, 0.0010000000475, 30, 9.99999974738e-06, 10, 0);
  arc_pcl_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (arc_pcl_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (arc_pcl_spinbutton);
  gtk_table_attach (GTK_TABLE (table7), arc_pcl_spinbutton, 2, 3, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (arc_pcl_spinbutton), TRUE);

  arc_res_spinbutton_adj = gtk_adjustment_new (0, 0, 1000000000, 9.99999974738e-06, 10, 0);
  arc_res_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (arc_res_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (arc_res_spinbutton);
  gtk_table_attach (GTK_TABLE (table7), arc_res_spinbutton, 3, 4, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (arc_res_spinbutton), TRUE);

  label70 = gtk_label_new (_("Conductivity S/m"));
  gtk_widget_show (label70);
  gtk_table_attach (GTK_TABLE (table7), label70, 3, 4, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label70), 0.1, 0.5);

  label68 = gtk_label_new (_("Wire Diameter"));
  gtk_widget_show (label68);
  gtk_table_attach (GTK_TABLE (table7), label68, 3, 4, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label68), 0.1, 0.5);

  arc_dia_spinbutton_adj = gtk_adjustment_new (0.00300000002608, 9.99999974738e-06, 100, 9.99999974738e-06, 10, 0);
  arc_dia_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (arc_dia_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (arc_dia_spinbutton);
  gtk_table_attach (GTK_TABLE (table7), arc_dia_spinbutton, 3, 4, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (arc_dia_spinbutton), TRUE);

  label60 = gtk_label_new (_("Wire Arc Data"));
  gtk_widget_show (label60);
  gtk_frame_set_label_widget (GTK_FRAME (frame14), label60);
  gtk_misc_set_padding (GTK_MISC (label60), 4, 4);

  hbox24 = gtk_hbox_new (TRUE, 2);
  gtk_widget_show (hbox24);
  gtk_box_pack_start (GTK_BOX (vbox8), hbox24, TRUE, TRUE, 0);

  arc_new_button = gtk_button_new_from_stock ("gtk-new");
  gtk_widget_show (arc_new_button);
  gtk_box_pack_start (GTK_BOX (hbox24), arc_new_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (arc_new_button), 2);

  arc_cancel_button = gtk_button_new ();
  gtk_widget_show (arc_cancel_button);
  gtk_box_pack_start (GTK_BOX (hbox24), arc_cancel_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (arc_cancel_button), 2);

  alignment52 = gtk_alignment_new (0.5, 0.5, 0, 0);
  gtk_widget_show (alignment52);
  gtk_container_add (GTK_CONTAINER (arc_cancel_button), alignment52);

  hbox50 = gtk_hbox_new (FALSE, 2);
  gtk_widget_show (hbox50);
  gtk_container_add (GTK_CONTAINER (alignment52), hbox50);

  image72 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image72);
  gtk_box_pack_start (GTK_BOX (hbox50), image72, FALSE, FALSE, 0);

  label224 = gtk_label_new_with_mnemonic ("Delete Card");
  gtk_widget_show (label224);
  gtk_box_pack_start (GTK_BOX (hbox50), label224, FALSE, FALSE, 0);

  arc_apply_button = gtk_button_new_from_stock ("gtk-apply");
  gtk_widget_show (arc_apply_button);
  gtk_box_pack_start (GTK_BOX (hbox24), arc_apply_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (arc_apply_button), 2);

  arc_ok_buttonbutton = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (arc_ok_buttonbutton);
  gtk_box_pack_start (GTK_BOX (hbox24), arc_ok_buttonbutton, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (arc_ok_buttonbutton), 2);

  g_signal_connect ((gpointer) arc_editor, "destroy",
                    G_CALLBACK (on_arc_editor_destroy),
                    NULL);
  g_signal_connect ((gpointer) arc_end1_spinbutton, "value_changed",
                    G_CALLBACK (on_arc_data_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) arc_end2_spinbutton, "value_changed",
                    G_CALLBACK (on_arc_data_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) arc_tagnum_spinbutton, "value_changed",
                    G_CALLBACK (on_arc_tagnum_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) arc_numseg_spinbutton, "value_changed",
                    G_CALLBACK (on_arc_data_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) arc_rad_spinbutton, "value_changed",
                    G_CALLBACK (on_arc_data_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) arc_pcl_spinbutton, "value_changed",
                    G_CALLBACK (on_arc_pcl_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) arc_res_spinbutton, "value_changed",
                    G_CALLBACK (on_arc_res_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) arc_dia_spinbutton, "value_changed",
                    G_CALLBACK (on_arc_data_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) arc_new_button, "clicked",
                    G_CALLBACK (on_arc_new_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) arc_cancel_button, "clicked",
                    G_CALLBACK (on_arc_cancel_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) arc_apply_button, "clicked",
                    G_CALLBACK (on_arc_apply_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) arc_ok_buttonbutton, "clicked",
                    G_CALLBACK (on_arc_ok_button_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (arc_editor, arc_editor, "arc_editor");
  GLADE_HOOKUP_OBJECT (arc_editor, vbox8, "vbox8");
  GLADE_HOOKUP_OBJECT (arc_editor, frame14, "frame14");
  GLADE_HOOKUP_OBJECT (arc_editor, alignment16, "alignment16");
  GLADE_HOOKUP_OBJECT (arc_editor, table7, "table7");
  GLADE_HOOKUP_OBJECT (arc_editor, label66, "label66");
  GLADE_HOOKUP_OBJECT (arc_editor, label67, "label67");
  GLADE_HOOKUP_OBJECT (arc_editor, arc_end1_spinbutton, "arc_end1_spinbutton");
  GLADE_HOOKUP_OBJECT (arc_editor, arc_end2_spinbutton, "arc_end2_spinbutton");
  GLADE_HOOKUP_OBJECT (arc_editor, arc_tagnum_spinbutton, "arc_tagnum_spinbutton");
  GLADE_HOOKUP_OBJECT (arc_editor, arc_numseg_spinbutton, "arc_numseg_spinbutton");
  GLADE_HOOKUP_OBJECT (arc_editor, label63, "label63");
  GLADE_HOOKUP_OBJECT (arc_editor, label64, "label64");
  GLADE_HOOKUP_OBJECT (arc_editor, label65, "label65");
  GLADE_HOOKUP_OBJECT (arc_editor, arc_rad_spinbutton, "arc_rad_spinbutton");
  GLADE_HOOKUP_OBJECT (arc_editor, label69, "label69");
  GLADE_HOOKUP_OBJECT (arc_editor, arc_pcl_spinbutton, "arc_pcl_spinbutton");
  GLADE_HOOKUP_OBJECT (arc_editor, arc_res_spinbutton, "arc_res_spinbutton");
  GLADE_HOOKUP_OBJECT (arc_editor, label70, "label70");
  GLADE_HOOKUP_OBJECT (arc_editor, label68, "label68");
  GLADE_HOOKUP_OBJECT (arc_editor, arc_dia_spinbutton, "arc_dia_spinbutton");
  GLADE_HOOKUP_OBJECT (arc_editor, label60, "label60");
  GLADE_HOOKUP_OBJECT (arc_editor, hbox24, "hbox24");
  GLADE_HOOKUP_OBJECT (arc_editor, arc_new_button, "arc_new_button");
  GLADE_HOOKUP_OBJECT (arc_editor, arc_cancel_button, "arc_cancel_button");
  GLADE_HOOKUP_OBJECT (arc_editor, alignment52, "alignment52");
  GLADE_HOOKUP_OBJECT (arc_editor, hbox50, "hbox50");
  GLADE_HOOKUP_OBJECT (arc_editor, image72, "image72");
  GLADE_HOOKUP_OBJECT (arc_editor, label224, "label224");
  GLADE_HOOKUP_OBJECT (arc_editor, arc_apply_button, "arc_apply_button");
  GLADE_HOOKUP_OBJECT (arc_editor, arc_ok_buttonbutton, "arc_ok_buttonbutton");

  return arc_editor;
}

GtkWidget*
create_transform_editor (void)
{
  GtkWidget *transform_editor;
  GtkWidget *vbox9;
  GtkWidget *frame15;
  GtkWidget *alignment17;
  GtkWidget *table8;
  GtkWidget *label62;
  GtkWidget *label98;
  GtkWidget *label99;
  GtkWidget *label100;
  GtkWidget *label101;
  GtkWidget *label102;
  GtkWidget *label103;
  GtkWidget *label104;
  GtkWidget *label105;
  GtkObject *transform_my_spinbutton_adj;
  GtkWidget *transform_my_spinbutton;
  GtkObject *transform_mx_spinbutton_adj;
  GtkWidget *transform_mx_spinbutton;
  GtkObject *transform_mz_spinbutton_adj;
  GtkWidget *transform_mz_spinbutton;
  GtkObject *transform_rx_spinbutton_adj;
  GtkWidget *transform_rx_spinbutton;
  GtkObject *transform_taginc_spinbutton_adj;
  GtkWidget *transform_taginc_spinbutton;
  GtkObject *transform_new_spinbutton_adj;
  GtkWidget *transform_new_spinbutton;
  GtkObject *transform_start_spinbutton_adj;
  GtkWidget *transform_start_spinbutton;
  GtkObject *transform_ry_spinbutton_adj;
  GtkWidget *transform_ry_spinbutton;
  GtkObject *transform_rz_spinbutton_adj;
  GtkWidget *transform_rz_spinbutton;
  GtkWidget *label61;
  GtkWidget *hbox25;
  GtkWidget *transform_new_button;
  GtkWidget *transform_cancel_button;
  GtkWidget *alignment53;
  GtkWidget *hbox51;
  GtkWidget *image73;
  GtkWidget *label225;
  GtkWidget *transform_apply_button;
  GtkWidget *transform_ok_button;

  transform_editor = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_container_set_border_width (GTK_CONTAINER (transform_editor), 4);
  gtk_window_set_title (GTK_WINDOW (transform_editor), _("Co-ordinate Transformation (GM card)"));

  vbox9 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox9);
  gtk_container_add (GTK_CONTAINER (transform_editor), vbox9);

  frame15 = gtk_frame_new (NULL);
  gtk_widget_show (frame15);
  gtk_box_pack_start (GTK_BOX (vbox9), frame15, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frame15), 4);

  alignment17 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment17);
  gtk_container_add (GTK_CONTAINER (frame15), alignment17);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment17), 0, 0, 12, 0);

  table8 = gtk_table_new (6, 3, FALSE);
  gtk_widget_show (table8);
  gtk_container_add (GTK_CONTAINER (alignment17), table8);
  gtk_table_set_row_spacings (GTK_TABLE (table8), 2);
  gtk_table_set_col_spacings (GTK_TABLE (table8), 2);

  label62 = gtk_label_new (_("Tag Increment"));
  gtk_widget_show (label62);
  gtk_table_attach (GTK_TABLE (table8), label62, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label62), 0.1, 0.5);

  label98 = gtk_label_new (_("New Structures"));
  gtk_widget_show (label98);
  gtk_table_attach (GTK_TABLE (table8), label98, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label98), 0.1, 0.5);

  label99 = gtk_label_new (_("Start From Tag"));
  gtk_widget_show (label99);
  gtk_table_attach (GTK_TABLE (table8), label99, 2, 3, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label99), 0.1, 0.5);

  label100 = gtk_label_new (_("Rotate about X"));
  gtk_widget_show (label100);
  gtk_table_attach (GTK_TABLE (table8), label100, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label100), 0.1, 0.5);

  label101 = gtk_label_new (_("Rotate about Y"));
  gtk_widget_show (label101);
  gtk_table_attach (GTK_TABLE (table8), label101, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label101), 0.1, 0.5);

  label102 = gtk_label_new (_("Rotate about Z"));
  gtk_widget_show (label102);
  gtk_table_attach (GTK_TABLE (table8), label102, 2, 3, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label102), 0.1, 0.5);

  label103 = gtk_label_new (_("Move along X"));
  gtk_widget_show (label103);
  gtk_table_attach (GTK_TABLE (table8), label103, 0, 1, 4, 5,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label103), 0.1, 0.5);

  label104 = gtk_label_new (_("Move along Y"));
  gtk_widget_show (label104);
  gtk_table_attach (GTK_TABLE (table8), label104, 1, 2, 4, 5,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label104), 0.1, 0.5);

  label105 = gtk_label_new (_("Move along Z"));
  gtk_widget_show (label105);
  gtk_table_attach (GTK_TABLE (table8), label105, 2, 3, 4, 5,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label105), 0.1, 0.5);

  transform_my_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
  transform_my_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (transform_my_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (transform_my_spinbutton);
  gtk_table_attach (GTK_TABLE (table8), transform_my_spinbutton, 1, 2, 5, 6,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (transform_my_spinbutton), TRUE);

  transform_mx_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
  transform_mx_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (transform_mx_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (transform_mx_spinbutton);
  gtk_table_attach (GTK_TABLE (table8), transform_mx_spinbutton, 0, 1, 5, 6,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (transform_mx_spinbutton), TRUE);

  transform_mz_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
  transform_mz_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (transform_mz_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (transform_mz_spinbutton);
  gtk_table_attach (GTK_TABLE (table8), transform_mz_spinbutton, 2, 3, 5, 6,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (transform_mz_spinbutton), TRUE);

  transform_rx_spinbutton_adj = gtk_adjustment_new (0, -360, 360, 9.99999974738e-06, 10, 0);
  transform_rx_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (transform_rx_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (transform_rx_spinbutton);
  gtk_table_attach (GTK_TABLE (table8), transform_rx_spinbutton, 0, 1, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (transform_rx_spinbutton), TRUE);

  transform_taginc_spinbutton_adj = gtk_adjustment_new (0, 0, 100000, 1, 10, 0);
  transform_taginc_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (transform_taginc_spinbutton_adj), 0.00999999977648, 0);
  gtk_widget_show (transform_taginc_spinbutton);
  gtk_table_attach (GTK_TABLE (table8), transform_taginc_spinbutton, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (transform_taginc_spinbutton), TRUE);

  transform_new_spinbutton_adj = gtk_adjustment_new (0, 0, 100000, 1, 10, 0);
  transform_new_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (transform_new_spinbutton_adj), 0.00999999977648, 0);
  gtk_widget_show (transform_new_spinbutton);
  gtk_table_attach (GTK_TABLE (table8), transform_new_spinbutton, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (transform_new_spinbutton), TRUE);

  transform_start_spinbutton_adj = gtk_adjustment_new (0, 0, 10000, 1, 10, 0);
  transform_start_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (transform_start_spinbutton_adj), 0.00999999977648, 0);
  gtk_widget_show (transform_start_spinbutton);
  gtk_table_attach (GTK_TABLE (table8), transform_start_spinbutton, 2, 3, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (transform_start_spinbutton), TRUE);

  transform_ry_spinbutton_adj = gtk_adjustment_new (0, -360, 360, 9.99999974738e-06, 10, 0);
  transform_ry_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (transform_ry_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (transform_ry_spinbutton);
  gtk_table_attach (GTK_TABLE (table8), transform_ry_spinbutton, 1, 2, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (transform_ry_spinbutton), TRUE);

  transform_rz_spinbutton_adj = gtk_adjustment_new (0, -360, 360, 9.99999974738e-06, 10, 0);
  transform_rz_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (transform_rz_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (transform_rz_spinbutton);
  gtk_table_attach (GTK_TABLE (table8), transform_rz_spinbutton, 2, 3, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (transform_rz_spinbutton), TRUE);

  label61 = gtk_label_new (_("Co-ordinate Transformation Data"));
  gtk_widget_show (label61);
  gtk_frame_set_label_widget (GTK_FRAME (frame15), label61);
  gtk_misc_set_padding (GTK_MISC (label61), 4, 4);

  hbox25 = gtk_hbox_new (TRUE, 0);
  gtk_widget_show (hbox25);
  gtk_box_pack_start (GTK_BOX (vbox9), hbox25, TRUE, TRUE, 0);

  transform_new_button = gtk_button_new_from_stock ("gtk-new");
  gtk_widget_show (transform_new_button);
  gtk_box_pack_start (GTK_BOX (hbox25), transform_new_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (transform_new_button), 2);

  transform_cancel_button = gtk_button_new ();
  gtk_widget_show (transform_cancel_button);
  gtk_box_pack_start (GTK_BOX (hbox25), transform_cancel_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (transform_cancel_button), 2);

  alignment53 = gtk_alignment_new (0.5, 0.5, 0, 0);
  gtk_widget_show (alignment53);
  gtk_container_add (GTK_CONTAINER (transform_cancel_button), alignment53);

  hbox51 = gtk_hbox_new (FALSE, 2);
  gtk_widget_show (hbox51);
  gtk_container_add (GTK_CONTAINER (alignment53), hbox51);

  image73 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image73);
  gtk_box_pack_start (GTK_BOX (hbox51), image73, FALSE, FALSE, 0);

  label225 = gtk_label_new_with_mnemonic ("Delete Card");
  gtk_widget_show (label225);
  gtk_box_pack_start (GTK_BOX (hbox51), label225, FALSE, FALSE, 0);

  transform_apply_button = gtk_button_new_from_stock ("gtk-apply");
  gtk_widget_show (transform_apply_button);
  gtk_box_pack_start (GTK_BOX (hbox25), transform_apply_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (transform_apply_button), 2);

  transform_ok_button = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (transform_ok_button);
  gtk_box_pack_start (GTK_BOX (hbox25), transform_ok_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (transform_ok_button), 2);

  g_signal_connect ((gpointer) transform_editor, "destroy",
                    G_CALLBACK (on_transform_editor_destroy),
                    NULL);
  g_signal_connect ((gpointer) transform_my_spinbutton, "value_changed",
                    G_CALLBACK (on_transform_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) transform_mx_spinbutton, "value_changed",
                    G_CALLBACK (on_transform_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) transform_mz_spinbutton, "value_changed",
                    G_CALLBACK (on_transform_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) transform_rx_spinbutton, "value_changed",
                    G_CALLBACK (on_transform_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) transform_taginc_spinbutton, "value_changed",
                    G_CALLBACK (on_transform_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) transform_new_spinbutton, "value_changed",
                    G_CALLBACK (on_transform_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) transform_start_spinbutton, "value_changed",
                    G_CALLBACK (on_transform_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) transform_ry_spinbutton, "value_changed",
                    G_CALLBACK (on_transform_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) transform_rz_spinbutton, "value_changed",
                    G_CALLBACK (on_transform_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) transform_new_button, "clicked",
                    G_CALLBACK (on_transform_new_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) transform_cancel_button, "clicked",
                    G_CALLBACK (on_transform_cancel_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) transform_apply_button, "clicked",
                    G_CALLBACK (on_transform_apply_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) transform_ok_button, "clicked",
                    G_CALLBACK (on_transform_ok_button_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (transform_editor, transform_editor, "transform_editor");
  GLADE_HOOKUP_OBJECT (transform_editor, vbox9, "vbox9");
  GLADE_HOOKUP_OBJECT (transform_editor, frame15, "frame15");
  GLADE_HOOKUP_OBJECT (transform_editor, alignment17, "alignment17");
  GLADE_HOOKUP_OBJECT (transform_editor, table8, "table8");
  GLADE_HOOKUP_OBJECT (transform_editor, label62, "label62");
  GLADE_HOOKUP_OBJECT (transform_editor, label98, "label98");
  GLADE_HOOKUP_OBJECT (transform_editor, label99, "label99");
  GLADE_HOOKUP_OBJECT (transform_editor, label100, "label100");
  GLADE_HOOKUP_OBJECT (transform_editor, label101, "label101");
  GLADE_HOOKUP_OBJECT (transform_editor, label102, "label102");
  GLADE_HOOKUP_OBJECT (transform_editor, label103, "label103");
  GLADE_HOOKUP_OBJECT (transform_editor, label104, "label104");
  GLADE_HOOKUP_OBJECT (transform_editor, label105, "label105");
  GLADE_HOOKUP_OBJECT (transform_editor, transform_my_spinbutton, "transform_my_spinbutton");
  GLADE_HOOKUP_OBJECT (transform_editor, transform_mx_spinbutton, "transform_mx_spinbutton");
  GLADE_HOOKUP_OBJECT (transform_editor, transform_mz_spinbutton, "transform_mz_spinbutton");
  GLADE_HOOKUP_OBJECT (transform_editor, transform_rx_spinbutton, "transform_rx_spinbutton");
  GLADE_HOOKUP_OBJECT (transform_editor, transform_taginc_spinbutton, "transform_taginc_spinbutton");
  GLADE_HOOKUP_OBJECT (transform_editor, transform_new_spinbutton, "transform_new_spinbutton");
  GLADE_HOOKUP_OBJECT (transform_editor, transform_start_spinbutton, "transform_start_spinbutton");
  GLADE_HOOKUP_OBJECT (transform_editor, transform_ry_spinbutton, "transform_ry_spinbutton");
  GLADE_HOOKUP_OBJECT (transform_editor, transform_rz_spinbutton, "transform_rz_spinbutton");
  GLADE_HOOKUP_OBJECT (transform_editor, label61, "label61");
  GLADE_HOOKUP_OBJECT (transform_editor, hbox25, "hbox25");
  GLADE_HOOKUP_OBJECT (transform_editor, transform_new_button, "transform_new_button");
  GLADE_HOOKUP_OBJECT (transform_editor, transform_cancel_button, "transform_cancel_button");
  GLADE_HOOKUP_OBJECT (transform_editor, alignment53, "alignment53");
  GLADE_HOOKUP_OBJECT (transform_editor, hbox51, "hbox51");
  GLADE_HOOKUP_OBJECT (transform_editor, image73, "image73");
  GLADE_HOOKUP_OBJECT (transform_editor, label225, "label225");
  GLADE_HOOKUP_OBJECT (transform_editor, transform_apply_button, "transform_apply_button");
  GLADE_HOOKUP_OBJECT (transform_editor, transform_ok_button, "transform_ok_button");

  return transform_editor;
}

GtkWidget*
create_helix_editor (void)
{
  GtkWidget *helix_editor;
  GtkWidget *vbox10;
  GtkWidget *frame16;
  GtkWidget *table9;
  GtkWidget *label72;
  GtkWidget *label73;
  GtkWidget *label75;
  GtkWidget *label76;
  GtkWidget *label77;
  GtkWidget *label78;
  GtkWidget *label79;
  GtkWidget *label80;
  GtkObject *helix_tagnum_spinbutton_adj;
  GtkWidget *helix_tagnum_spinbutton;
  GtkObject *helix_numseg_spinbutton_adj;
  GtkWidget *helix_numseg_spinbutton;
  GtkObject *helix_pcl_spinbutton_adj;
  GtkWidget *helix_pcl_spinbutton;
  GtkObject *helix_tspace_spinbutton_adj;
  GtkWidget *helix_tspace_spinbutton;
  GtkObject *helix_len_spinbutton_adj;
  GtkWidget *helix_len_spinbutton;
  GtkObject *helix_radxzo_spinbutton_adj;
  GtkWidget *helix_radxzo_spinbutton;
  GtkObject *helix_dia_spinbutton_adj;
  GtkWidget *helix_dia_spinbutton;
  GtkObject *helix_radyzhl_spinbutton_adj;
  GtkWidget *helix_radyzhl_spinbutton;
  GtkObject *helix_radxzhl_spinbutton_adj;
  GtkWidget *helix_radxzhl_spinbutton;
  GtkWidget *label81;
  GtkObject *helix_nturns_spinbutton_adj;
  GtkWidget *helix_nturns_spinbutton;
  GtkWidget *label82;
  GtkWidget *label83;
  GtkObject *helix_radyzo_spinbutton_adj;
  GtkWidget *helix_radyzo_spinbutton;
  GtkWidget *label84;
  GtkObject *helix_res_spinbutton_adj;
  GtkWidget *helix_res_spinbutton;
  GtkWidget *helix_linkzo_radiobutton;
  GSList *helix_linkzo_radiobutton_group = NULL;
  GtkWidget *helix_linkzhl_radiobutton;
  GtkWidget *helix_linkall_radiobutton;
  GtkWidget *helix_lh_checkbutton;
  GtkWidget *label85;
  GtkWidget *hbox26;
  GtkWidget *helix_new_button;
  GtkWidget *helix_cancel_button;
  GtkWidget *alignment54;
  GtkWidget *hbox52;
  GtkWidget *image74;
  GtkWidget *label226;
  GtkWidget *helix_apply_button;
  GtkWidget *helix_ok_button;

  helix_editor = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_container_set_border_width (GTK_CONTAINER (helix_editor), 4);
  gtk_window_set_title (GTK_WINDOW (helix_editor), _("Helical Element (GA card)"));

  vbox10 = gtk_vbox_new (FALSE, 2);
  gtk_widget_show (vbox10);
  gtk_container_add (GTK_CONTAINER (helix_editor), vbox10);

  frame16 = gtk_frame_new (NULL);
  gtk_widget_show (frame16);
  gtk_box_pack_start (GTK_BOX (vbox10), frame16, TRUE, TRUE, 2);
  gtk_container_set_border_width (GTK_CONTAINER (frame16), 4);

  table9 = gtk_table_new (7, 4, FALSE);
  gtk_widget_show (table9);
  gtk_container_add (GTK_CONTAINER (frame16), table9);
  gtk_table_set_row_spacings (GTK_TABLE (table9), 2);
  gtk_table_set_col_spacings (GTK_TABLE (table9), 2);

  label72 = gtk_label_new (_("Segments/Turn"));
  gtk_widget_show (label72);
  gtk_table_attach (GTK_TABLE (table9), label72, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label72), 0.1, 0.5);

  label73 = gtk_label_new (_("Segs % lambda"));
  gtk_widget_show (label73);
  gtk_table_attach (GTK_TABLE (table9), label73, 2, 3, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label73), 0.1, 0.5);

  label75 = gtk_label_new (_("Turns Spacing"));
  gtk_widget_show (label75);
  gtk_table_attach (GTK_TABLE (table9), label75, 0, 1, 3, 4,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label75), 0.1, 0.5);

  label76 = gtk_label_new (_("Helix Length"));
  gtk_widget_show (label76);
  gtk_table_attach (GTK_TABLE (table9), label76, 1, 2, 3, 4,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  GTK_WIDGET_SET_FLAGS (label76, GTK_CAN_FOCUS);
  gtk_label_set_selectable (GTK_LABEL (label76), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label76), 0.1, 0.5);

  label77 = gtk_label_new (_("Radius @ X,Z=0"));
  gtk_widget_show (label77);
  gtk_table_attach (GTK_TABLE (table9), label77, 2, 3, 3, 4,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label77), 0.1, 0.5);

  label78 = gtk_label_new (_("Rad. @ X,Z=HL"));
  gtk_widget_show (label78);
  gtk_table_attach (GTK_TABLE (table9), label78, 0, 1, 5, 6,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label78), 0.1, 0.5);

  label79 = gtk_label_new (_("Rad. @ Y,Z=HL"));
  gtk_widget_show (label79);
  gtk_table_attach (GTK_TABLE (table9), label79, 1, 2, 5, 6,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label79), 0.1, 0.5);

  label80 = gtk_label_new (_("Wire Diameter"));
  gtk_widget_show (label80);
  gtk_table_attach (GTK_TABLE (table9), label80, 2, 3, 5, 6,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label80), 0.1, 0.5);

  helix_tagnum_spinbutton_adj = gtk_adjustment_new (1, 1, 100000, 1, 10, 0);
  helix_tagnum_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (helix_tagnum_spinbutton_adj), 0.00999999977648, 0);
  gtk_widget_show (helix_tagnum_spinbutton);
  gtk_table_attach (GTK_TABLE (table9), helix_tagnum_spinbutton, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (helix_tagnum_spinbutton), TRUE);

  helix_numseg_spinbutton_adj = gtk_adjustment_new (8, 1, 100000, 1, 10, 0);
  helix_numseg_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (helix_numseg_spinbutton_adj), 0.00999999977648, 0);
  gtk_widget_show (helix_numseg_spinbutton);
  gtk_table_attach (GTK_TABLE (table9), helix_numseg_spinbutton, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (helix_numseg_spinbutton), TRUE);

  helix_pcl_spinbutton_adj = gtk_adjustment_new (5, 0.0010000000475, 30, 9.99999974738e-06, 10, 0);
  helix_pcl_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (helix_pcl_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (helix_pcl_spinbutton);
  gtk_table_attach (GTK_TABLE (table9), helix_pcl_spinbutton, 2, 3, 2, 3,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (helix_pcl_spinbutton), TRUE);

  helix_tspace_spinbutton_adj = gtk_adjustment_new (1, 0, 10000, 9.99999974738e-06, 10, 0);
  helix_tspace_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (helix_tspace_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (helix_tspace_spinbutton);
  gtk_table_attach (GTK_TABLE (table9), helix_tspace_spinbutton, 0, 1, 4, 5,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (helix_tspace_spinbutton), TRUE);

  helix_len_spinbutton_adj = gtk_adjustment_new (5, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
  helix_len_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (helix_len_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (helix_len_spinbutton);
  gtk_table_attach (GTK_TABLE (table9), helix_len_spinbutton, 1, 2, 4, 5,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (helix_len_spinbutton), TRUE);

  helix_radxzo_spinbutton_adj = gtk_adjustment_new (1, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
  helix_radxzo_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (helix_radxzo_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (helix_radxzo_spinbutton);
  gtk_table_attach (GTK_TABLE (table9), helix_radxzo_spinbutton, 2, 3, 4, 5,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (helix_radxzo_spinbutton), TRUE);

  helix_dia_spinbutton_adj = gtk_adjustment_new (0.00300000002608, 9.99999974738e-06, 100, 9.99999974738e-06, 10, 0);
  helix_dia_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (helix_dia_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (helix_dia_spinbutton);
  gtk_table_attach (GTK_TABLE (table9), helix_dia_spinbutton, 2, 3, 6, 7,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (helix_dia_spinbutton), TRUE);

  helix_radyzhl_spinbutton_adj = gtk_adjustment_new (1, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
  helix_radyzhl_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (helix_radyzhl_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (helix_radyzhl_spinbutton);
  gtk_table_attach (GTK_TABLE (table9), helix_radyzhl_spinbutton, 1, 2, 6, 7,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (helix_radyzhl_spinbutton), TRUE);

  helix_radxzhl_spinbutton_adj = gtk_adjustment_new (1, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
  helix_radxzhl_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (helix_radxzhl_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (helix_radxzhl_spinbutton);
  gtk_table_attach (GTK_TABLE (table9), helix_radxzhl_spinbutton, 0, 1, 6, 7,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (helix_radxzhl_spinbutton), TRUE);

  label81 = gtk_label_new (_("Tag Number"));
  gtk_widget_show (label81);
  gtk_table_attach (GTK_TABLE (table9), label81, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label81), 0.1, 0.5);

  helix_nturns_spinbutton_adj = gtk_adjustment_new (8, 0.10000000149, 10000, 9.99999974738e-06, 10, 0);
  helix_nturns_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (helix_nturns_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (helix_nturns_spinbutton);
  gtk_table_attach (GTK_TABLE (table9), helix_nturns_spinbutton, 3, 4, 2, 3,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (helix_nturns_spinbutton), TRUE);

  label82 = gtk_label_new (_("Num. of Turns"));
  gtk_widget_show (label82);
  gtk_table_attach (GTK_TABLE (table9), label82, 3, 4, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label82), 0.1, 0.5);

  label83 = gtk_label_new (_("Radius @ Y,Z=0"));
  gtk_widget_show (label83);
  gtk_table_attach (GTK_TABLE (table9), label83, 3, 4, 3, 4,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label83), 0.1, 0.5);

  helix_radyzo_spinbutton_adj = gtk_adjustment_new (1, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
  helix_radyzo_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (helix_radyzo_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (helix_radyzo_spinbutton);
  gtk_table_attach (GTK_TABLE (table9), helix_radyzo_spinbutton, 3, 4, 4, 5,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (helix_radyzo_spinbutton), TRUE);

  label84 = gtk_label_new (_("Conductivity S/m"));
  gtk_widget_show (label84);
  gtk_table_attach (GTK_TABLE (table9), label84, 3, 4, 5, 6,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label84), 0.1, 0.5);

  helix_res_spinbutton_adj = gtk_adjustment_new (0, 0, 1000000000, 9.99999974738e-06, 10, 0);
  helix_res_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (helix_res_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (helix_res_spinbutton);
  gtk_table_attach (GTK_TABLE (table9), helix_res_spinbutton, 3, 4, 6, 7,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (helix_res_spinbutton), TRUE);

  helix_linkzo_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Link @ Z=0"));
  gtk_widget_show (helix_linkzo_radiobutton);
  gtk_table_attach (GTK_TABLE (table9), helix_linkzo_radiobutton, 2, 3, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (helix_linkzo_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (helix_linkzo_radiobutton), helix_linkzo_radiobutton_group);
  helix_linkzo_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (helix_linkzo_radiobutton));

  helix_linkzhl_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Link @ Z=HL"));
  gtk_widget_show (helix_linkzhl_radiobutton);
  gtk_table_attach (GTK_TABLE (table9), helix_linkzhl_radiobutton, 3, 4, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (helix_linkzhl_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (helix_linkzhl_radiobutton), helix_linkzo_radiobutton_group);
  helix_linkzo_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (helix_linkzhl_radiobutton));

  helix_linkall_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Link all Radii"));
  gtk_widget_show (helix_linkall_radiobutton);
  gtk_table_attach (GTK_TABLE (table9), helix_linkall_radiobutton, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (helix_linkall_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (helix_linkall_radiobutton), helix_linkzo_radiobutton_group);
  helix_linkzo_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (helix_linkall_radiobutton));
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (helix_linkall_radiobutton), TRUE);

  helix_lh_checkbutton = gtk_check_button_new_with_mnemonic (_("Left Hand"));
  gtk_widget_show (helix_lh_checkbutton);
  gtk_table_attach (GTK_TABLE (table9), helix_lh_checkbutton, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (helix_lh_checkbutton), 2);

  label85 = gtk_label_new (_("GH Card"));
  gtk_widget_show (label85);
  gtk_frame_set_label_widget (GTK_FRAME (frame16), label85);
  gtk_misc_set_padding (GTK_MISC (label85), 4, 4);

  hbox26 = gtk_hbox_new (TRUE, 2);
  gtk_widget_show (hbox26);
  gtk_box_pack_start (GTK_BOX (vbox10), hbox26, TRUE, TRUE, 0);

  helix_new_button = gtk_button_new_from_stock ("gtk-new");
  gtk_widget_show (helix_new_button);
  gtk_box_pack_start (GTK_BOX (hbox26), helix_new_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (helix_new_button), 2);
  GTK_WIDGET_SET_FLAGS (helix_new_button, GTK_CAN_DEFAULT);

  helix_cancel_button = gtk_button_new ();
  gtk_widget_show (helix_cancel_button);
  gtk_box_pack_start (GTK_BOX (hbox26), helix_cancel_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (helix_cancel_button), 2);
  GTK_WIDGET_SET_FLAGS (helix_cancel_button, GTK_CAN_DEFAULT);

  alignment54 = gtk_alignment_new (0.5, 0.5, 0, 0);
  gtk_widget_show (alignment54);
  gtk_container_add (GTK_CONTAINER (helix_cancel_button), alignment54);

  hbox52 = gtk_hbox_new (FALSE, 2);
  gtk_widget_show (hbox52);
  gtk_container_add (GTK_CONTAINER (alignment54), hbox52);

  image74 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image74);
  gtk_box_pack_start (GTK_BOX (hbox52), image74, FALSE, FALSE, 0);

  label226 = gtk_label_new_with_mnemonic ("Delete Card");
  gtk_widget_show (label226);
  gtk_box_pack_start (GTK_BOX (hbox52), label226, FALSE, FALSE, 0);

  helix_apply_button = gtk_button_new_from_stock ("gtk-apply");
  gtk_widget_show (helix_apply_button);
  gtk_box_pack_start (GTK_BOX (hbox26), helix_apply_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (helix_apply_button), 2);
  GTK_WIDGET_SET_FLAGS (helix_apply_button, GTK_CAN_DEFAULT);

  helix_ok_button = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (helix_ok_button);
  gtk_box_pack_start (GTK_BOX (hbox26), helix_ok_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (helix_ok_button), 2);
  GTK_WIDGET_SET_FLAGS (helix_ok_button, GTK_CAN_DEFAULT);

  g_signal_connect ((gpointer) helix_editor, "destroy",
                    G_CALLBACK (on_helix_editor_destroy),
                    NULL);
  g_signal_connect ((gpointer) helix_tagnum_spinbutton, "value_changed",
                    G_CALLBACK (on_helix_tagnum_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) helix_numseg_spinbutton, "value_changed",
                    G_CALLBACK (on_helix_data_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) helix_pcl_spinbutton, "value_changed",
                    G_CALLBACK (on_helix_pcl_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) helix_tspace_spinbutton, "value_changed",
                    G_CALLBACK (on_helix_data_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) helix_len_spinbutton, "value_changed",
                    G_CALLBACK (on_helix_data_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) helix_radxzo_spinbutton, "value_changed",
                    G_CALLBACK (on_helix_data_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) helix_dia_spinbutton, "value_changed",
                    G_CALLBACK (on_helix_data_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) helix_radyzhl_spinbutton, "value_changed",
                    G_CALLBACK (on_helix_data_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) helix_radxzhl_spinbutton, "value_changed",
                    G_CALLBACK (on_helix_data_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) helix_nturns_spinbutton, "value_changed",
                    G_CALLBACK (on_helix_nturns_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) helix_radyzo_spinbutton, "value_changed",
                    G_CALLBACK (on_helix_data_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) helix_res_spinbutton, "value_changed",
                    G_CALLBACK (on_helix_res_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) helix_linkzo_radiobutton, "toggled",
                    G_CALLBACK (on_helix_linkzo_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) helix_linkzhl_radiobutton, "toggled",
                    G_CALLBACK (on_helix_linkzhl_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) helix_linkall_radiobutton, "toggled",
                    G_CALLBACK (on_helix_linkall_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) helix_lh_checkbutton, "toggled",
                    G_CALLBACK (on_helix_lh_checkbutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) helix_new_button, "clicked",
                    G_CALLBACK (on_helix_new_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) helix_cancel_button, "clicked",
                    G_CALLBACK (on_helix_cancel_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) helix_apply_button, "clicked",
                    G_CALLBACK (on_helix_apply_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) helix_ok_button, "clicked",
                    G_CALLBACK (on_helix_ok_button_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (helix_editor, helix_editor, "helix_editor");
  GLADE_HOOKUP_OBJECT (helix_editor, vbox10, "vbox10");
  GLADE_HOOKUP_OBJECT (helix_editor, frame16, "frame16");
  GLADE_HOOKUP_OBJECT (helix_editor, table9, "table9");
  GLADE_HOOKUP_OBJECT (helix_editor, label72, "label72");
  GLADE_HOOKUP_OBJECT (helix_editor, label73, "label73");
  GLADE_HOOKUP_OBJECT (helix_editor, label75, "label75");
  GLADE_HOOKUP_OBJECT (helix_editor, label76, "label76");
  GLADE_HOOKUP_OBJECT (helix_editor, label77, "label77");
  GLADE_HOOKUP_OBJECT (helix_editor, label78, "label78");
  GLADE_HOOKUP_OBJECT (helix_editor, label79, "label79");
  GLADE_HOOKUP_OBJECT (helix_editor, label80, "label80");
  GLADE_HOOKUP_OBJECT (helix_editor, helix_tagnum_spinbutton, "helix_tagnum_spinbutton");
  GLADE_HOOKUP_OBJECT (helix_editor, helix_numseg_spinbutton, "helix_numseg_spinbutton");
  GLADE_HOOKUP_OBJECT (helix_editor, helix_pcl_spinbutton, "helix_pcl_spinbutton");
  GLADE_HOOKUP_OBJECT (helix_editor, helix_tspace_spinbutton, "helix_tspace_spinbutton");
  GLADE_HOOKUP_OBJECT (helix_editor, helix_len_spinbutton, "helix_len_spinbutton");
  GLADE_HOOKUP_OBJECT (helix_editor, helix_radxzo_spinbutton, "helix_radxzo_spinbutton");
  GLADE_HOOKUP_OBJECT (helix_editor, helix_dia_spinbutton, "helix_dia_spinbutton");
  GLADE_HOOKUP_OBJECT (helix_editor, helix_radyzhl_spinbutton, "helix_radyzhl_spinbutton");
  GLADE_HOOKUP_OBJECT (helix_editor, helix_radxzhl_spinbutton, "helix_radxzhl_spinbutton");
  GLADE_HOOKUP_OBJECT (helix_editor, label81, "label81");
  GLADE_HOOKUP_OBJECT (helix_editor, helix_nturns_spinbutton, "helix_nturns_spinbutton");
  GLADE_HOOKUP_OBJECT (helix_editor, label82, "label82");
  GLADE_HOOKUP_OBJECT (helix_editor, label83, "label83");
  GLADE_HOOKUP_OBJECT (helix_editor, helix_radyzo_spinbutton, "helix_radyzo_spinbutton");
  GLADE_HOOKUP_OBJECT (helix_editor, label84, "label84");
  GLADE_HOOKUP_OBJECT (helix_editor, helix_res_spinbutton, "helix_res_spinbutton");
  GLADE_HOOKUP_OBJECT (helix_editor, helix_linkzo_radiobutton, "helix_linkzo_radiobutton");
  GLADE_HOOKUP_OBJECT (helix_editor, helix_linkzhl_radiobutton, "helix_linkzhl_radiobutton");
  GLADE_HOOKUP_OBJECT (helix_editor, helix_linkall_radiobutton, "helix_linkall_radiobutton");
  GLADE_HOOKUP_OBJECT (helix_editor, helix_lh_checkbutton, "helix_lh_checkbutton");
  GLADE_HOOKUP_OBJECT (helix_editor, label85, "label85");
  GLADE_HOOKUP_OBJECT (helix_editor, hbox26, "hbox26");
  GLADE_HOOKUP_OBJECT (helix_editor, helix_new_button, "helix_new_button");
  GLADE_HOOKUP_OBJECT (helix_editor, helix_cancel_button, "helix_cancel_button");
  GLADE_HOOKUP_OBJECT (helix_editor, alignment54, "alignment54");
  GLADE_HOOKUP_OBJECT (helix_editor, hbox52, "hbox52");
  GLADE_HOOKUP_OBJECT (helix_editor, image74, "image74");
  GLADE_HOOKUP_OBJECT (helix_editor, label226, "label226");
  GLADE_HOOKUP_OBJECT (helix_editor, helix_apply_button, "helix_apply_button");
  GLADE_HOOKUP_OBJECT (helix_editor, helix_ok_button, "helix_ok_button");

  return helix_editor;
}

GtkWidget*
create_reflect_editor (void)
{
  GtkWidget *reflect_editor;
  GtkWidget *vbox11;
  GtkWidget *frame17;
  GtkWidget *alignment19;
  GtkWidget *table11;
  GtkWidget *reflect_y_checkbutton;
  GtkObject *reflect_taginc_spinbutton_adj;
  GtkWidget *reflect_taginc_spinbutton;
  GtkWidget *reflect_z_checkbutton;
  GtkWidget *reflect_x_checkbutton;
  GtkWidget *label91;
  GtkWidget *label90;
  GtkWidget *hbox27;
  GtkWidget *reflect_new_button;
  GtkWidget *reflect_cancel_button;
  GtkWidget *alignment55;
  GtkWidget *hbox53;
  GtkWidget *image75;
  GtkWidget *label227;
  GtkWidget *reflect_apply_button;
  GtkWidget *reflect_ok_button;

  reflect_editor = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_container_set_border_width (GTK_CONTAINER (reflect_editor), 4);
  gtk_window_set_title (GTK_WINDOW (reflect_editor), _("Reflect Structure (GX card)"));

  vbox11 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox11);
  gtk_container_add (GTK_CONTAINER (reflect_editor), vbox11);

  frame17 = gtk_frame_new (NULL);
  gtk_widget_show (frame17);
  gtk_box_pack_start (GTK_BOX (vbox11), frame17, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frame17), 4);

  alignment19 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment19);
  gtk_container_add (GTK_CONTAINER (frame17), alignment19);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment19), 0, 0, 12, 0);

  table11 = gtk_table_new (3, 2, FALSE);
  gtk_widget_show (table11);
  gtk_container_add (GTK_CONTAINER (alignment19), table11);
  gtk_table_set_row_spacings (GTK_TABLE (table11), 8);
  gtk_table_set_col_spacings (GTK_TABLE (table11), 8);

  reflect_y_checkbutton = gtk_check_button_new_with_mnemonic (_("Reflect in XZ plane"));
  gtk_widget_show (reflect_y_checkbutton);
  gtk_table_attach (GTK_TABLE (table11), reflect_y_checkbutton, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (reflect_y_checkbutton), 2);

  reflect_taginc_spinbutton_adj = gtk_adjustment_new (0, 0, 100000, 1, 10, 0);
  reflect_taginc_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (reflect_taginc_spinbutton_adj), 1, 0);
  gtk_widget_show (reflect_taginc_spinbutton);
  gtk_table_attach (GTK_TABLE (table11), reflect_taginc_spinbutton, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (reflect_taginc_spinbutton), TRUE);

  reflect_z_checkbutton = gtk_check_button_new_with_mnemonic (_("Reflect in XY plane"));
  gtk_widget_show (reflect_z_checkbutton);
  gtk_table_attach (GTK_TABLE (table11), reflect_z_checkbutton, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (reflect_z_checkbutton), 2);

  reflect_x_checkbutton = gtk_check_button_new_with_mnemonic (_("Reflect in YZ plane"));
  gtk_widget_show (reflect_x_checkbutton);
  gtk_table_attach (GTK_TABLE (table11), reflect_x_checkbutton, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (reflect_x_checkbutton), 2);

  label91 = gtk_label_new (_("Tag Number Increment"));
  gtk_widget_show (label91);
  gtk_table_attach (GTK_TABLE (table11), label91, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label91), 0, 0.5);

  label90 = gtk_label_new (_("Reflect Options"));
  gtk_widget_show (label90);
  gtk_frame_set_label_widget (GTK_FRAME (frame17), label90);
  gtk_misc_set_padding (GTK_MISC (label90), 4, 4);

  hbox27 = gtk_hbox_new (TRUE, 0);
  gtk_widget_show (hbox27);
  gtk_box_pack_start (GTK_BOX (vbox11), hbox27, TRUE, TRUE, 0);

  reflect_new_button = gtk_button_new_from_stock ("gtk-new");
  gtk_widget_show (reflect_new_button);
  gtk_box_pack_start (GTK_BOX (hbox27), reflect_new_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (reflect_new_button), 2);

  reflect_cancel_button = gtk_button_new ();
  gtk_widget_show (reflect_cancel_button);
  gtk_box_pack_start (GTK_BOX (hbox27), reflect_cancel_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (reflect_cancel_button), 2);

  alignment55 = gtk_alignment_new (0.5, 0.5, 0, 0);
  gtk_widget_show (alignment55);
  gtk_container_add (GTK_CONTAINER (reflect_cancel_button), alignment55);

  hbox53 = gtk_hbox_new (FALSE, 2);
  gtk_widget_show (hbox53);
  gtk_container_add (GTK_CONTAINER (alignment55), hbox53);

  image75 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image75);
  gtk_box_pack_start (GTK_BOX (hbox53), image75, FALSE, FALSE, 0);

  label227 = gtk_label_new_with_mnemonic ("Delete Card");
  gtk_widget_show (label227);
  gtk_box_pack_start (GTK_BOX (hbox53), label227, FALSE, FALSE, 0);

  reflect_apply_button = gtk_button_new_from_stock ("gtk-apply");
  gtk_widget_show (reflect_apply_button);
  gtk_box_pack_start (GTK_BOX (hbox27), reflect_apply_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (reflect_apply_button), 2);

  reflect_ok_button = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (reflect_ok_button);
  gtk_box_pack_start (GTK_BOX (hbox27), reflect_ok_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (reflect_ok_button), 2);

  g_signal_connect ((gpointer) reflect_editor, "destroy",
                    G_CALLBACK (on_reflect_editor_destroy),
                    NULL);
  g_signal_connect ((gpointer) reflect_y_checkbutton, "toggled",
                    G_CALLBACK (on_reflect_checkbutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) reflect_taginc_spinbutton, "value_changed",
                    G_CALLBACK (on_reflect_taginc_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) reflect_z_checkbutton, "toggled",
                    G_CALLBACK (on_reflect_checkbutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) reflect_x_checkbutton, "toggled",
                    G_CALLBACK (on_reflect_checkbutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) reflect_new_button, "clicked",
                    G_CALLBACK (on_reflect_new_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) reflect_cancel_button, "clicked",
                    G_CALLBACK (on_reflect_cancel_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) reflect_apply_button, "clicked",
                    G_CALLBACK (on_reflect_apply_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) reflect_ok_button, "clicked",
                    G_CALLBACK (on_reflect_ok_button_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (reflect_editor, reflect_editor, "reflect_editor");
  GLADE_HOOKUP_OBJECT (reflect_editor, vbox11, "vbox11");
  GLADE_HOOKUP_OBJECT (reflect_editor, frame17, "frame17");
  GLADE_HOOKUP_OBJECT (reflect_editor, alignment19, "alignment19");
  GLADE_HOOKUP_OBJECT (reflect_editor, table11, "table11");
  GLADE_HOOKUP_OBJECT (reflect_editor, reflect_y_checkbutton, "reflect_y_checkbutton");
  GLADE_HOOKUP_OBJECT (reflect_editor, reflect_taginc_spinbutton, "reflect_taginc_spinbutton");
  GLADE_HOOKUP_OBJECT (reflect_editor, reflect_z_checkbutton, "reflect_z_checkbutton");
  GLADE_HOOKUP_OBJECT (reflect_editor, reflect_x_checkbutton, "reflect_x_checkbutton");
  GLADE_HOOKUP_OBJECT (reflect_editor, label91, "label91");
  GLADE_HOOKUP_OBJECT (reflect_editor, label90, "label90");
  GLADE_HOOKUP_OBJECT (reflect_editor, hbox27, "hbox27");
  GLADE_HOOKUP_OBJECT (reflect_editor, reflect_new_button, "reflect_new_button");
  GLADE_HOOKUP_OBJECT (reflect_editor, reflect_cancel_button, "reflect_cancel_button");
  GLADE_HOOKUP_OBJECT (reflect_editor, alignment55, "alignment55");
  GLADE_HOOKUP_OBJECT (reflect_editor, hbox53, "hbox53");
  GLADE_HOOKUP_OBJECT (reflect_editor, image75, "image75");
  GLADE_HOOKUP_OBJECT (reflect_editor, label227, "label227");
  GLADE_HOOKUP_OBJECT (reflect_editor, reflect_apply_button, "reflect_apply_button");
  GLADE_HOOKUP_OBJECT (reflect_editor, reflect_ok_button, "reflect_ok_button");

  return reflect_editor;
}

GtkWidget*
create_scale_editor (void)
{
  GtkWidget *scale_editor;
  GtkWidget *vbox12;
  GtkWidget *frame18;
  GtkWidget *alignment20;
  GtkWidget *table35;
  GtkWidget *label217;
  GtkWidget *label220;
  GtkWidget *label221;
  GtkObject *scale_from_spinbutton_adj;
  GtkWidget *scale_from_spinbutton;
  GtkObject *scale_to_spinbutton_adj;
  GtkWidget *scale_to_spinbutton;
  GtkObject *scale_factor_spinbutton_adj;
  GtkWidget *scale_factor_spinbutton;
  GtkWidget *label93;
  GtkWidget *hbox28;
  GtkWidget *scale_new_button;
  GtkWidget *scale_cancel_button;
  GtkWidget *alignment56;
  GtkWidget *hbox54;
  GtkWidget *image76;
  GtkWidget *label228;
  GtkWidget *scale_apply_button;
  GtkWidget *scale_ok_button;

  scale_editor = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_container_set_border_width (GTK_CONTAINER (scale_editor), 4);
  gtk_window_set_title (GTK_WINDOW (scale_editor), _("Scale Structure (GS card)"));

  vbox12 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox12);
  gtk_container_add (GTK_CONTAINER (scale_editor), vbox12);

  frame18 = gtk_frame_new (NULL);
  gtk_widget_show (frame18);
  gtk_box_pack_start (GTK_BOX (vbox12), frame18, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frame18), 4);

  alignment20 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment20);
  gtk_container_add (GTK_CONTAINER (frame18), alignment20);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment20), 0, 0, 12, 0);

  table35 = gtk_table_new (3, 2, TRUE);
  gtk_widget_show (table35);
  gtk_container_add (GTK_CONTAINER (alignment20), table35);

  label217 = gtk_label_new (_("Structure Scale Factor"));
  gtk_widget_show (label217);
  gtk_table_attach (GTK_TABLE (table35), label217, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  label220 = gtk_label_new (_("From Tag No."));
  gtk_widget_show (label220);
  gtk_table_attach (GTK_TABLE (table35), label220, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label220), 0.1, 0.5);

  label221 = gtk_label_new (_("To Tag No."));
  gtk_widget_show (label221);
  gtk_table_attach (GTK_TABLE (table35), label221, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label221), 0.1, 0.5);

  scale_from_spinbutton_adj = gtk_adjustment_new (0, 0, 100000, 1, 10, 0);
  scale_from_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (scale_from_spinbutton_adj), 0.00999999977648, 0);
  gtk_widget_show (scale_from_spinbutton);
  gtk_table_attach (GTK_TABLE (table35), scale_from_spinbutton, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (scale_from_spinbutton), TRUE);

  scale_to_spinbutton_adj = gtk_adjustment_new (0, 0, 100000, 1, 10, 0);
  scale_to_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (scale_to_spinbutton_adj), 0.00999999977648, 0);
  gtk_widget_show (scale_to_spinbutton);
  gtk_table_attach (GTK_TABLE (table35), scale_to_spinbutton, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (scale_to_spinbutton), TRUE);

  scale_factor_spinbutton_adj = gtk_adjustment_new (1, 0, 100000, 9.99999974738e-06, 10, 0);
  scale_factor_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (scale_factor_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (scale_factor_spinbutton);
  gtk_table_attach (GTK_TABLE (table35), scale_factor_spinbutton, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (scale_factor_spinbutton), TRUE);

  label93 = gtk_label_new (_("Scale Strucure"));
  gtk_widget_show (label93);
  gtk_frame_set_label_widget (GTK_FRAME (frame18), label93);
  gtk_misc_set_padding (GTK_MISC (label93), 4, 4);

  hbox28 = gtk_hbox_new (TRUE, 0);
  gtk_widget_show (hbox28);
  gtk_box_pack_start (GTK_BOX (vbox12), hbox28, TRUE, TRUE, 0);

  scale_new_button = gtk_button_new_from_stock ("gtk-new");
  gtk_widget_show (scale_new_button);
  gtk_box_pack_start (GTK_BOX (hbox28), scale_new_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (scale_new_button), 2);

  scale_cancel_button = gtk_button_new ();
  gtk_widget_show (scale_cancel_button);
  gtk_box_pack_start (GTK_BOX (hbox28), scale_cancel_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (scale_cancel_button), 2);

  alignment56 = gtk_alignment_new (0.5, 0.5, 0, 0);
  gtk_widget_show (alignment56);
  gtk_container_add (GTK_CONTAINER (scale_cancel_button), alignment56);

  hbox54 = gtk_hbox_new (FALSE, 2);
  gtk_widget_show (hbox54);
  gtk_container_add (GTK_CONTAINER (alignment56), hbox54);

  image76 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image76);
  gtk_box_pack_start (GTK_BOX (hbox54), image76, FALSE, FALSE, 0);

  label228 = gtk_label_new_with_mnemonic ("Delete Card");
  gtk_widget_show (label228);
  gtk_box_pack_start (GTK_BOX (hbox54), label228, FALSE, FALSE, 0);

  scale_apply_button = gtk_button_new_from_stock ("gtk-apply");
  gtk_widget_show (scale_apply_button);
  gtk_box_pack_start (GTK_BOX (hbox28), scale_apply_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (scale_apply_button), 2);

  scale_ok_button = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (scale_ok_button);
  gtk_box_pack_start (GTK_BOX (hbox28), scale_ok_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (scale_ok_button), 2);

  g_signal_connect ((gpointer) scale_editor, "destroy",
                    G_CALLBACK (on_scale_editor_destroy),
                    NULL);
  g_signal_connect ((gpointer) scale_from_spinbutton, "value_changed",
                    G_CALLBACK (on_scale_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) scale_to_spinbutton, "value_changed",
                    G_CALLBACK (on_scale_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) scale_factor_spinbutton, "value_changed",
                    G_CALLBACK (on_scale_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) scale_new_button, "clicked",
                    G_CALLBACK (on_scale_new_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) scale_cancel_button, "clicked",
                    G_CALLBACK (on_scale_cancel_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) scale_apply_button, "clicked",
                    G_CALLBACK (on_scale_apply_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) scale_ok_button, "clicked",
                    G_CALLBACK (on_scale_ok_button_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (scale_editor, scale_editor, "scale_editor");
  GLADE_HOOKUP_OBJECT (scale_editor, vbox12, "vbox12");
  GLADE_HOOKUP_OBJECT (scale_editor, frame18, "frame18");
  GLADE_HOOKUP_OBJECT (scale_editor, alignment20, "alignment20");
  GLADE_HOOKUP_OBJECT (scale_editor, table35, "table35");
  GLADE_HOOKUP_OBJECT (scale_editor, label217, "label217");
  GLADE_HOOKUP_OBJECT (scale_editor, label220, "label220");
  GLADE_HOOKUP_OBJECT (scale_editor, label221, "label221");
  GLADE_HOOKUP_OBJECT (scale_editor, scale_from_spinbutton, "scale_from_spinbutton");
  GLADE_HOOKUP_OBJECT (scale_editor, scale_to_spinbutton, "scale_to_spinbutton");
  GLADE_HOOKUP_OBJECT (scale_editor, scale_factor_spinbutton, "scale_factor_spinbutton");
  GLADE_HOOKUP_OBJECT (scale_editor, label93, "label93");
  GLADE_HOOKUP_OBJECT (scale_editor, hbox28, "hbox28");
  GLADE_HOOKUP_OBJECT (scale_editor, scale_new_button, "scale_new_button");
  GLADE_HOOKUP_OBJECT (scale_editor, scale_cancel_button, "scale_cancel_button");
  GLADE_HOOKUP_OBJECT (scale_editor, alignment56, "alignment56");
  GLADE_HOOKUP_OBJECT (scale_editor, hbox54, "hbox54");
  GLADE_HOOKUP_OBJECT (scale_editor, image76, "image76");
  GLADE_HOOKUP_OBJECT (scale_editor, label228, "label228");
  GLADE_HOOKUP_OBJECT (scale_editor, scale_apply_button, "scale_apply_button");
  GLADE_HOOKUP_OBJECT (scale_editor, scale_ok_button, "scale_ok_button");

  return scale_editor;
}

GtkWidget*
create_cylinder_editor (void)
{
  GtkWidget *cylinder_editor;
  GtkWidget *vbox13;
  GtkWidget *frame19;
  GtkWidget *alignment21;
  GtkWidget *table12;
  GtkWidget *label95;
  GtkWidget *label97;
  GtkObject *cylinder_taginc_spinbutton_adj;
  GtkWidget *cylinder_taginc_spinbutton;
  GtkObject *cylinder_total_spinbutton_adj;
  GtkWidget *cylinder_total_spinbutton;
  GtkWidget *label96;
  GtkWidget *hbox30;
  GtkWidget *cylinder_new_button;
  GtkWidget *cylinder_cancel_button;
  GtkWidget *alignment57;
  GtkWidget *hbox55;
  GtkWidget *image77;
  GtkWidget *label229;
  GtkWidget *cylinder_apply_button;
  GtkWidget *cylinder_ok_button;

  cylinder_editor = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_container_set_border_width (GTK_CONTAINER (cylinder_editor), 4);
  gtk_window_set_title (GTK_WINDOW (cylinder_editor), _("Cylindrical Structure (GR card)"));

  vbox13 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox13);
  gtk_container_add (GTK_CONTAINER (cylinder_editor), vbox13);

  frame19 = gtk_frame_new (NULL);
  gtk_widget_show (frame19);
  gtk_box_pack_start (GTK_BOX (vbox13), frame19, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frame19), 4);

  alignment21 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment21);
  gtk_container_add (GTK_CONTAINER (frame19), alignment21);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment21), 0, 0, 12, 0);

  table12 = gtk_table_new (2, 2, FALSE);
  gtk_widget_show (table12);
  gtk_container_add (GTK_CONTAINER (alignment21), table12);
  gtk_table_set_row_spacings (GTK_TABLE (table12), 2);
  gtk_table_set_col_spacings (GTK_TABLE (table12), 8);

  label95 = gtk_label_new (_("Tag Number Increment"));
  gtk_widget_show (label95);
  gtk_table_attach (GTK_TABLE (table12), label95, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label95), 0.1, 0.5);

  label97 = gtk_label_new (_("Number of Structures"));
  gtk_widget_show (label97);
  gtk_table_attach (GTK_TABLE (table12), label97, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label97), 0.1, 0.5);

  cylinder_taginc_spinbutton_adj = gtk_adjustment_new (0, 0, 100000, 1, 10, 0);
  cylinder_taginc_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (cylinder_taginc_spinbutton_adj), 0.00999999977648, 0);
  gtk_widget_show (cylinder_taginc_spinbutton);
  gtk_table_attach (GTK_TABLE (table12), cylinder_taginc_spinbutton, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (cylinder_taginc_spinbutton), TRUE);

  cylinder_total_spinbutton_adj = gtk_adjustment_new (4, 1, 100000, 1, 10, 0);
  cylinder_total_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (cylinder_total_spinbutton_adj), 0.00999999977648, 0);
  gtk_widget_show (cylinder_total_spinbutton);
  gtk_table_attach (GTK_TABLE (table12), cylinder_total_spinbutton, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (cylinder_total_spinbutton), TRUE);

  label96 = gtk_label_new (_("Cylindrical Structure"));
  gtk_widget_show (label96);
  gtk_frame_set_label_widget (GTK_FRAME (frame19), label96);
  gtk_misc_set_padding (GTK_MISC (label96), 4, 4);

  hbox30 = gtk_hbox_new (TRUE, 0);
  gtk_widget_show (hbox30);
  gtk_box_pack_start (GTK_BOX (vbox13), hbox30, TRUE, TRUE, 0);

  cylinder_new_button = gtk_button_new_from_stock ("gtk-new");
  gtk_widget_show (cylinder_new_button);
  gtk_box_pack_start (GTK_BOX (hbox30), cylinder_new_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (cylinder_new_button), 2);

  cylinder_cancel_button = gtk_button_new ();
  gtk_widget_show (cylinder_cancel_button);
  gtk_box_pack_start (GTK_BOX (hbox30), cylinder_cancel_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (cylinder_cancel_button), 2);

  alignment57 = gtk_alignment_new (0.5, 0.5, 0, 0);
  gtk_widget_show (alignment57);
  gtk_container_add (GTK_CONTAINER (cylinder_cancel_button), alignment57);

  hbox55 = gtk_hbox_new (FALSE, 2);
  gtk_widget_show (hbox55);
  gtk_container_add (GTK_CONTAINER (alignment57), hbox55);

  image77 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image77);
  gtk_box_pack_start (GTK_BOX (hbox55), image77, FALSE, FALSE, 0);

  label229 = gtk_label_new_with_mnemonic ("Delete Card");
  gtk_widget_show (label229);
  gtk_box_pack_start (GTK_BOX (hbox55), label229, FALSE, FALSE, 0);

  cylinder_apply_button = gtk_button_new_from_stock ("gtk-apply");
  gtk_widget_show (cylinder_apply_button);
  gtk_box_pack_start (GTK_BOX (hbox30), cylinder_apply_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (cylinder_apply_button), 2);

  cylinder_ok_button = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (cylinder_ok_button);
  gtk_box_pack_start (GTK_BOX (hbox30), cylinder_ok_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (cylinder_ok_button), 2);

  g_signal_connect ((gpointer) cylinder_editor, "destroy",
                    G_CALLBACK (on_cylinder_editor_destroy),
                    NULL);
  g_signal_connect ((gpointer) cylinder_taginc_spinbutton, "value_changed",
                    G_CALLBACK (on_cylinder_taginc_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) cylinder_total_spinbutton, "value_changed",
                    G_CALLBACK (on_cylinder_total_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) cylinder_new_button, "clicked",
                    G_CALLBACK (on_cylinder_new_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) cylinder_cancel_button, "clicked",
                    G_CALLBACK (on_cylinder_cancel_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) cylinder_apply_button, "clicked",
                    G_CALLBACK (on_cylinder_apply_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) cylinder_ok_button, "clicked",
                    G_CALLBACK (on_cylinder_ok_button_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (cylinder_editor, cylinder_editor, "cylinder_editor");
  GLADE_HOOKUP_OBJECT (cylinder_editor, vbox13, "vbox13");
  GLADE_HOOKUP_OBJECT (cylinder_editor, frame19, "frame19");
  GLADE_HOOKUP_OBJECT (cylinder_editor, alignment21, "alignment21");
  GLADE_HOOKUP_OBJECT (cylinder_editor, table12, "table12");
  GLADE_HOOKUP_OBJECT (cylinder_editor, label95, "label95");
  GLADE_HOOKUP_OBJECT (cylinder_editor, label97, "label97");
  GLADE_HOOKUP_OBJECT (cylinder_editor, cylinder_taginc_spinbutton, "cylinder_taginc_spinbutton");
  GLADE_HOOKUP_OBJECT (cylinder_editor, cylinder_total_spinbutton, "cylinder_total_spinbutton");
  GLADE_HOOKUP_OBJECT (cylinder_editor, label96, "label96");
  GLADE_HOOKUP_OBJECT (cylinder_editor, hbox30, "hbox30");
  GLADE_HOOKUP_OBJECT (cylinder_editor, cylinder_new_button, "cylinder_new_button");
  GLADE_HOOKUP_OBJECT (cylinder_editor, cylinder_cancel_button, "cylinder_cancel_button");
  GLADE_HOOKUP_OBJECT (cylinder_editor, alignment57, "alignment57");
  GLADE_HOOKUP_OBJECT (cylinder_editor, hbox55, "hbox55");
  GLADE_HOOKUP_OBJECT (cylinder_editor, image77, "image77");
  GLADE_HOOKUP_OBJECT (cylinder_editor, label229, "label229");
  GLADE_HOOKUP_OBJECT (cylinder_editor, cylinder_apply_button, "cylinder_apply_button");
  GLADE_HOOKUP_OBJECT (cylinder_editor, cylinder_ok_button, "cylinder_ok_button");

  return cylinder_editor;
}

GtkWidget*
create_kernel_command (void)
{
  GtkWidget *kernel_command;
  GtkWidget *vbox14;
  GtkWidget *frame21;
  GtkWidget *alignment23;
  GtkWidget *kernel_checkbutton;
  GtkWidget *label107;
  GtkWidget *hbox31;
  GtkWidget *kernel_new_button;
  GtkWidget *kernel_cancel_button;
  GtkWidget *alignment58;
  GtkWidget *hbox56;
  GtkWidget *image78;
  GtkWidget *label230;
  GtkWidget *kernel_apply_button;
  GtkWidget *kernel_ok_button;

  kernel_command = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_container_set_border_width (GTK_CONTAINER (kernel_command), 4);
  gtk_window_set_title (GTK_WINDOW (kernel_command), _("Thin Wire Kernel (EK Card)"));

  vbox14 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox14);
  gtk_container_add (GTK_CONTAINER (kernel_command), vbox14);

  frame21 = gtk_frame_new (NULL);
  gtk_widget_show (frame21);
  gtk_box_pack_start (GTK_BOX (vbox14), frame21, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frame21), 4);

  alignment23 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment23);
  gtk_container_add (GTK_CONTAINER (frame21), alignment23);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment23), 0, 0, 12, 0);

  kernel_checkbutton = gtk_check_button_new_with_mnemonic (_("Extended Thin Wire Kernel"));
  gtk_widget_show (kernel_checkbutton);
  gtk_container_add (GTK_CONTAINER (alignment23), kernel_checkbutton);
  gtk_container_set_border_width (GTK_CONTAINER (kernel_checkbutton), 8);
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (kernel_checkbutton), TRUE);

  label107 = gtk_label_new (_("Thin Wire Kernel"));
  gtk_widget_show (label107);
  gtk_frame_set_label_widget (GTK_FRAME (frame21), label107);
  gtk_misc_set_padding (GTK_MISC (label107), 4, 4);

  hbox31 = gtk_hbox_new (TRUE, 0);
  gtk_widget_show (hbox31);
  gtk_box_pack_start (GTK_BOX (vbox14), hbox31, TRUE, TRUE, 0);

  kernel_new_button = gtk_button_new_from_stock ("gtk-new");
  gtk_widget_show (kernel_new_button);
  gtk_box_pack_start (GTK_BOX (hbox31), kernel_new_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (kernel_new_button), 2);

  kernel_cancel_button = gtk_button_new ();
  gtk_widget_show (kernel_cancel_button);
  gtk_box_pack_start (GTK_BOX (hbox31), kernel_cancel_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (kernel_cancel_button), 2);

  alignment58 = gtk_alignment_new (0.5, 0.5, 0, 0);
  gtk_widget_show (alignment58);
  gtk_container_add (GTK_CONTAINER (kernel_cancel_button), alignment58);

  hbox56 = gtk_hbox_new (FALSE, 2);
  gtk_widget_show (hbox56);
  gtk_container_add (GTK_CONTAINER (alignment58), hbox56);

  image78 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image78);
  gtk_box_pack_start (GTK_BOX (hbox56), image78, FALSE, FALSE, 0);

  label230 = gtk_label_new_with_mnemonic ("Delete Card");
  gtk_widget_show (label230);
  gtk_box_pack_start (GTK_BOX (hbox56), label230, FALSE, FALSE, 0);

  kernel_apply_button = gtk_button_new_from_stock ("gtk-apply");
  gtk_widget_show (kernel_apply_button);
  gtk_box_pack_start (GTK_BOX (hbox31), kernel_apply_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (kernel_apply_button), 2);

  kernel_ok_button = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (kernel_ok_button);
  gtk_box_pack_start (GTK_BOX (hbox31), kernel_ok_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (kernel_ok_button), 2);

  g_signal_connect ((gpointer) kernel_command, "destroy",
                    G_CALLBACK (on_kernel_command_destroy),
                    NULL);
  g_signal_connect ((gpointer) kernel_checkbutton, "toggled",
                    G_CALLBACK (on_kernel_checkbutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) kernel_new_button, "clicked",
                    G_CALLBACK (on_kernel_new_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) kernel_cancel_button, "clicked",
                    G_CALLBACK (on_kernel_cancel_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) kernel_apply_button, "clicked",
                    G_CALLBACK (on_kernel_apply_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) kernel_ok_button, "clicked",
                    G_CALLBACK (on_kernel_ok_button_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (kernel_command, kernel_command, "kernel_command");
  GLADE_HOOKUP_OBJECT (kernel_command, vbox14, "vbox14");
  GLADE_HOOKUP_OBJECT (kernel_command, frame21, "frame21");
  GLADE_HOOKUP_OBJECT (kernel_command, alignment23, "alignment23");
  GLADE_HOOKUP_OBJECT (kernel_command, kernel_checkbutton, "kernel_checkbutton");
  GLADE_HOOKUP_OBJECT (kernel_command, label107, "label107");
  GLADE_HOOKUP_OBJECT (kernel_command, hbox31, "hbox31");
  GLADE_HOOKUP_OBJECT (kernel_command, kernel_new_button, "kernel_new_button");
  GLADE_HOOKUP_OBJECT (kernel_command, kernel_cancel_button, "kernel_cancel_button");
  GLADE_HOOKUP_OBJECT (kernel_command, alignment58, "alignment58");
  GLADE_HOOKUP_OBJECT (kernel_command, hbox56, "hbox56");
  GLADE_HOOKUP_OBJECT (kernel_command, image78, "image78");
  GLADE_HOOKUP_OBJECT (kernel_command, label230, "label230");
  GLADE_HOOKUP_OBJECT (kernel_command, kernel_apply_button, "kernel_apply_button");
  GLADE_HOOKUP_OBJECT (kernel_command, kernel_ok_button, "kernel_ok_button");

  return kernel_command;
}

GtkWidget*
create_execute_command (void)
{
  GtkWidget *execute_command;
  GtkWidget *vbox15;
  GtkWidget *frame20;
  GtkWidget *alignment22;
  GtkWidget *table14;
  GtkWidget *execute_none_radiobutton;
  GSList *execute_none_radiobutton_group = NULL;
  GtkWidget *execute_xz_radiobutton;
  GtkWidget *execute_yz_radiobutton;
  GtkWidget *execute_both_radiobutton;
  GtkWidget *label106;
  GtkWidget *hbox32;
  GtkWidget *execute_new_button;
  GtkWidget *execute_cancel_button;
  GtkWidget *alignment59;
  GtkWidget *hbox57;
  GtkWidget *image79;
  GtkWidget *label231;
  GtkWidget *execute_apply_button;
  GtkWidget *execute_ok_button;

  execute_command = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_container_set_border_width (GTK_CONTAINER (execute_command), 4);
  gtk_window_set_title (GTK_WINDOW (execute_command), _("Execute Command (XQ Card)"));

  vbox15 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox15);
  gtk_container_add (GTK_CONTAINER (execute_command), vbox15);

  frame20 = gtk_frame_new (NULL);
  gtk_widget_show (frame20);
  gtk_box_pack_start (GTK_BOX (vbox15), frame20, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frame20), 4);

  alignment22 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment22);
  gtk_container_add (GTK_CONTAINER (frame20), alignment22);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment22), 0, 0, 12, 0);

  table14 = gtk_table_new (2, 2, FALSE);
  gtk_widget_show (table14);
  gtk_container_add (GTK_CONTAINER (alignment22), table14);
  gtk_table_set_row_spacings (GTK_TABLE (table14), 2);
  gtk_table_set_col_spacings (GTK_TABLE (table14), 2);

  execute_none_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("No Pattern Cuts"));
  gtk_widget_show (execute_none_radiobutton);
  gtk_table_attach (GTK_TABLE (table14), execute_none_radiobutton, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (execute_none_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (execute_none_radiobutton), execute_none_radiobutton_group);
  execute_none_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (execute_none_radiobutton));
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (execute_none_radiobutton), TRUE);

  execute_xz_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Pattern in XZ Plane"));
  gtk_widget_show (execute_xz_radiobutton);
  gtk_table_attach (GTK_TABLE (table14), execute_xz_radiobutton, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (execute_xz_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (execute_xz_radiobutton), execute_none_radiobutton_group);
  execute_none_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (execute_xz_radiobutton));

  execute_yz_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Pattern in YZ Plane"));
  gtk_widget_show (execute_yz_radiobutton);
  gtk_table_attach (GTK_TABLE (table14), execute_yz_radiobutton, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (execute_yz_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (execute_yz_radiobutton), execute_none_radiobutton_group);
  execute_none_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (execute_yz_radiobutton));

  execute_both_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Both XZ/YZ Patterns"));
  gtk_widget_show (execute_both_radiobutton);
  gtk_table_attach (GTK_TABLE (table14), execute_both_radiobutton, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (execute_both_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (execute_both_radiobutton), execute_none_radiobutton_group);
  execute_none_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (execute_both_radiobutton));

  label106 = gtk_label_new (_("Execute Command"));
  gtk_widget_show (label106);
  gtk_frame_set_label_widget (GTK_FRAME (frame20), label106);
  gtk_misc_set_padding (GTK_MISC (label106), 4, 4);

  hbox32 = gtk_hbox_new (TRUE, 0);
  gtk_widget_show (hbox32);
  gtk_box_pack_start (GTK_BOX (vbox15), hbox32, FALSE, FALSE, 0);

  execute_new_button = gtk_button_new_from_stock ("gtk-new");
  gtk_widget_show (execute_new_button);
  gtk_box_pack_start (GTK_BOX (hbox32), execute_new_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (execute_new_button), 2);

  execute_cancel_button = gtk_button_new ();
  gtk_widget_show (execute_cancel_button);
  gtk_box_pack_start (GTK_BOX (hbox32), execute_cancel_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (execute_cancel_button), 2);

  alignment59 = gtk_alignment_new (0.5, 0.5, 0, 0);
  gtk_widget_show (alignment59);
  gtk_container_add (GTK_CONTAINER (execute_cancel_button), alignment59);

  hbox57 = gtk_hbox_new (FALSE, 2);
  gtk_widget_show (hbox57);
  gtk_container_add (GTK_CONTAINER (alignment59), hbox57);

  image79 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image79);
  gtk_box_pack_start (GTK_BOX (hbox57), image79, FALSE, FALSE, 0);

  label231 = gtk_label_new_with_mnemonic ("Delete Card");
  gtk_widget_show (label231);
  gtk_box_pack_start (GTK_BOX (hbox57), label231, FALSE, FALSE, 0);

  execute_apply_button = gtk_button_new_from_stock ("gtk-apply");
  gtk_widget_show (execute_apply_button);
  gtk_box_pack_start (GTK_BOX (hbox32), execute_apply_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (execute_apply_button), 2);

  execute_ok_button = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (execute_ok_button);
  gtk_box_pack_start (GTK_BOX (hbox32), execute_ok_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (execute_ok_button), 2);

  g_signal_connect ((gpointer) execute_command, "destroy",
                    G_CALLBACK (on_execute_command_destroy),
                    NULL);
  g_signal_connect ((gpointer) execute_none_radiobutton, "toggled",
                    G_CALLBACK (on_execute_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) execute_xz_radiobutton, "toggled",
                    G_CALLBACK (on_execute_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) execute_yz_radiobutton, "toggled",
                    G_CALLBACK (on_execute_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) execute_both_radiobutton, "toggled",
                    G_CALLBACK (on_execute_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) execute_new_button, "clicked",
                    G_CALLBACK (on_execute_new_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) execute_cancel_button, "clicked",
                    G_CALLBACK (on_execute_cancel_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) execute_apply_button, "clicked",
                    G_CALLBACK (on_execute_apply_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) execute_ok_button, "clicked",
                    G_CALLBACK (on_execute_ok_button_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (execute_command, execute_command, "execute_command");
  GLADE_HOOKUP_OBJECT (execute_command, vbox15, "vbox15");
  GLADE_HOOKUP_OBJECT (execute_command, frame20, "frame20");
  GLADE_HOOKUP_OBJECT (execute_command, alignment22, "alignment22");
  GLADE_HOOKUP_OBJECT (execute_command, table14, "table14");
  GLADE_HOOKUP_OBJECT (execute_command, execute_none_radiobutton, "execute_none_radiobutton");
  GLADE_HOOKUP_OBJECT (execute_command, execute_xz_radiobutton, "execute_xz_radiobutton");
  GLADE_HOOKUP_OBJECT (execute_command, execute_yz_radiobutton, "execute_yz_radiobutton");
  GLADE_HOOKUP_OBJECT (execute_command, execute_both_radiobutton, "execute_both_radiobutton");
  GLADE_HOOKUP_OBJECT (execute_command, label106, "label106");
  GLADE_HOOKUP_OBJECT (execute_command, hbox32, "hbox32");
  GLADE_HOOKUP_OBJECT (execute_command, execute_new_button, "execute_new_button");
  GLADE_HOOKUP_OBJECT (execute_command, execute_cancel_button, "execute_cancel_button");
  GLADE_HOOKUP_OBJECT (execute_command, alignment59, "alignment59");
  GLADE_HOOKUP_OBJECT (execute_command, hbox57, "hbox57");
  GLADE_HOOKUP_OBJECT (execute_command, image79, "image79");
  GLADE_HOOKUP_OBJECT (execute_command, label231, "label231");
  GLADE_HOOKUP_OBJECT (execute_command, execute_apply_button, "execute_apply_button");
  GLADE_HOOKUP_OBJECT (execute_command, execute_ok_button, "execute_ok_button");

  return execute_command;
}

GtkWidget*
create_intrange_command (void)
{
  GtkWidget *intrange_command;
  GtkWidget *vbox16;
  GtkWidget *frame22;
  GtkWidget *alignment24;
  GtkWidget *hbox34;
  GtkWidget *label109;
  GtkObject *intrange_wlen_spinbutton_adj;
  GtkWidget *intrange_wlen_spinbutton;
  GtkWidget *label108;
  GtkWidget *hbox33;
  GtkWidget *intrange_new_button;
  GtkWidget *intrange_cancel_button;
  GtkWidget *alignment60;
  GtkWidget *hbox58;
  GtkWidget *image80;
  GtkWidget *label232;
  GtkWidget *intrange_apply_button;
  GtkWidget *intrange_ok_button;

  intrange_command = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (intrange_command), _("Interaction Approx Range (KH Card)"));

  vbox16 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox16);
  gtk_container_add (GTK_CONTAINER (intrange_command), vbox16);

  frame22 = gtk_frame_new (NULL);
  gtk_widget_show (frame22);
  gtk_box_pack_start (GTK_BOX (vbox16), frame22, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frame22), 4);

  alignment24 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment24);
  gtk_container_add (GTK_CONTAINER (frame22), alignment24);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment24), 0, 0, 12, 0);

  hbox34 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox34);
  gtk_container_add (GTK_CONTAINER (alignment24), hbox34);
  gtk_container_set_border_width (GTK_CONTAINER (hbox34), 8);

  label109 = gtk_label_new (_("Approximation Range (W/lengths)"));
  gtk_widget_show (label109);
  gtk_box_pack_start (GTK_BOX (hbox34), label109, FALSE, FALSE, 0);

  intrange_wlen_spinbutton_adj = gtk_adjustment_new (1, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
  intrange_wlen_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (intrange_wlen_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (intrange_wlen_spinbutton);
  gtk_box_pack_start (GTK_BOX (hbox34), intrange_wlen_spinbutton, TRUE, TRUE, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (intrange_wlen_spinbutton), TRUE);

  label108 = gtk_label_new (_("Interaction Approximation Range"));
  gtk_widget_show (label108);
  gtk_frame_set_label_widget (GTK_FRAME (frame22), label108);
  gtk_misc_set_padding (GTK_MISC (label108), 4, 4);

  hbox33 = gtk_hbox_new (TRUE, 0);
  gtk_widget_show (hbox33);
  gtk_box_pack_start (GTK_BOX (vbox16), hbox33, TRUE, TRUE, 0);

  intrange_new_button = gtk_button_new_from_stock ("gtk-new");
  gtk_widget_show (intrange_new_button);
  gtk_box_pack_start (GTK_BOX (hbox33), intrange_new_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (intrange_new_button), 2);

  intrange_cancel_button = gtk_button_new ();
  gtk_widget_show (intrange_cancel_button);
  gtk_box_pack_start (GTK_BOX (hbox33), intrange_cancel_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (intrange_cancel_button), 2);

  alignment60 = gtk_alignment_new (0.5, 0.5, 0, 0);
  gtk_widget_show (alignment60);
  gtk_container_add (GTK_CONTAINER (intrange_cancel_button), alignment60);

  hbox58 = gtk_hbox_new (FALSE, 2);
  gtk_widget_show (hbox58);
  gtk_container_add (GTK_CONTAINER (alignment60), hbox58);

  image80 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image80);
  gtk_box_pack_start (GTK_BOX (hbox58), image80, FALSE, FALSE, 0);

  label232 = gtk_label_new_with_mnemonic ("Delete Card");
  gtk_widget_show (label232);
  gtk_box_pack_start (GTK_BOX (hbox58), label232, FALSE, FALSE, 0);

  intrange_apply_button = gtk_button_new_from_stock ("gtk-apply");
  gtk_widget_show (intrange_apply_button);
  gtk_box_pack_start (GTK_BOX (hbox33), intrange_apply_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (intrange_apply_button), 2);

  intrange_ok_button = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (intrange_ok_button);
  gtk_box_pack_start (GTK_BOX (hbox33), intrange_ok_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (intrange_ok_button), 2);

  g_signal_connect ((gpointer) intrange_command, "destroy",
                    G_CALLBACK (on_intrange_command_destroy),
                    NULL);
  g_signal_connect ((gpointer) intrange_wlen_spinbutton, "value_changed",
                    G_CALLBACK (on_intrange_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) intrange_new_button, "clicked",
                    G_CALLBACK (on_intrange_new_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) intrange_cancel_button, "clicked",
                    G_CALLBACK (on_intrange_cancel_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) intrange_apply_button, "clicked",
                    G_CALLBACK (on_intrange_apply_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) intrange_ok_button, "clicked",
                    G_CALLBACK (on_intrange_ok_button_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (intrange_command, intrange_command, "intrange_command");
  GLADE_HOOKUP_OBJECT (intrange_command, vbox16, "vbox16");
  GLADE_HOOKUP_OBJECT (intrange_command, frame22, "frame22");
  GLADE_HOOKUP_OBJECT (intrange_command, alignment24, "alignment24");
  GLADE_HOOKUP_OBJECT (intrange_command, hbox34, "hbox34");
  GLADE_HOOKUP_OBJECT (intrange_command, label109, "label109");
  GLADE_HOOKUP_OBJECT (intrange_command, intrange_wlen_spinbutton, "intrange_wlen_spinbutton");
  GLADE_HOOKUP_OBJECT (intrange_command, label108, "label108");
  GLADE_HOOKUP_OBJECT (intrange_command, hbox33, "hbox33");
  GLADE_HOOKUP_OBJECT (intrange_command, intrange_new_button, "intrange_new_button");
  GLADE_HOOKUP_OBJECT (intrange_command, intrange_cancel_button, "intrange_cancel_button");
  GLADE_HOOKUP_OBJECT (intrange_command, alignment60, "alignment60");
  GLADE_HOOKUP_OBJECT (intrange_command, hbox58, "hbox58");
  GLADE_HOOKUP_OBJECT (intrange_command, image80, "image80");
  GLADE_HOOKUP_OBJECT (intrange_command, label232, "label232");
  GLADE_HOOKUP_OBJECT (intrange_command, intrange_apply_button, "intrange_apply_button");
  GLADE_HOOKUP_OBJECT (intrange_command, intrange_ok_button, "intrange_ok_button");

  return intrange_command;
}

GtkWidget*
create_ground_command (void)
{
  GtkWidget *ground_command;
  GtkWidget *vbox17;
  GtkWidget *frame23;
  GtkWidget *alignment25;
  GtkWidget *table15;
  GtkWidget *ground_perf_radiobutton;
  GSList *ground_perf_radiobutton_group = NULL;
  GtkWidget *ground_refl_radiobutton;
  GtkWidget *ground_smfld_radiobutton;
  GtkWidget *ground_null_radiobutton;
  GtkWidget *ground_radl_checkbutton;
  GtkWidget *ground_secmd_checkbutton;
  GtkWidget *label110;
  GtkWidget *ground_med1_frame;
  GtkWidget *alignment26;
  GtkWidget *table16;
  GtkObject *ground_diel1_spinbutton_adj;
  GtkWidget *ground_diel1_spinbutton;
  GtkObject *ground_res1_spinbutton_adj;
  GtkWidget *ground_res1_spinbutton;
  GtkWidget *label116;
  GtkWidget *label117;
  GtkWidget *label111;
  GtkWidget *ground_med2_frame;
  GtkWidget *alignment27;
  GtkWidget *table18;
  GtkWidget *label118;
  GtkWidget *label123;
  GtkWidget *label124;
  GtkWidget *label125;
  GtkObject *ground_diel2_spinbutton_adj;
  GtkWidget *ground_diel2_spinbutton;
  GtkObject *ground_res2_spinbutton_adj;
  GtkWidget *ground_res2_spinbutton;
  GtkObject *ground_below_spinbutton_adj;
  GtkWidget *ground_below_spinbutton;
  GtkObject *ground_dist2_spinbutton_adj;
  GtkWidget *ground_dist2_spinbutton;
  GtkWidget *label114;
  GtkWidget *ground_radial_frame;
  GtkWidget *alignment28;
  GtkWidget *table17;
  GtkWidget *label126;
  GtkWidget *label127;
  GtkWidget *label128;
  GtkObject *ground_nrad_spinbutton_adj;
  GtkWidget *ground_nrad_spinbutton;
  GtkObject *ground_diam_spinbutton_adj;
  GtkWidget *ground_diam_spinbutton;
  GtkObject *ground_scrnrd_spinbutton_adj;
  GtkWidget *ground_scrnrd_spinbutton;
  GtkWidget *label115;
  GtkWidget *hbox35;
  GtkWidget *ground_new_button;
  GtkWidget *ground_cancel_button;
  GtkWidget *alignment61;
  GtkWidget *hbox59;
  GtkWidget *image81;
  GtkWidget *label233;
  GtkWidget *ground_apply_button;
  GtkWidget *ground_ok_button;

  ground_command = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_container_set_border_width (GTK_CONTAINER (ground_command), 4);
  gtk_window_set_title (GTK_WINDOW (ground_command), _("Ground Parameters (GN & GD Cards)"));

  vbox17 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox17);
  gtk_container_add (GTK_CONTAINER (ground_command), vbox17);

  frame23 = gtk_frame_new (NULL);
  gtk_widget_show (frame23);
  gtk_box_pack_start (GTK_BOX (vbox17), frame23, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frame23), 4);

  alignment25 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment25);
  gtk_container_add (GTK_CONTAINER (frame23), alignment25);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment25), 0, 0, 12, 0);

  table15 = gtk_table_new (3, 2, FALSE);
  gtk_widget_show (table15);
  gtk_container_add (GTK_CONTAINER (alignment25), table15);
  gtk_table_set_row_spacings (GTK_TABLE (table15), 2);
  gtk_table_set_col_spacings (GTK_TABLE (table15), 2);

  ground_perf_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Perfect Ground"));
  gtk_widget_show (ground_perf_radiobutton);
  gtk_table_attach (GTK_TABLE (table15), ground_perf_radiobutton, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (ground_perf_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (ground_perf_radiobutton), ground_perf_radiobutton_group);
  ground_perf_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (ground_perf_radiobutton));
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (ground_perf_radiobutton), TRUE);

  ground_refl_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Reflection Coeff. Approx"));
  gtk_widget_show (ground_refl_radiobutton);
  gtk_table_attach (GTK_TABLE (table15), ground_refl_radiobutton, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (ground_refl_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (ground_refl_radiobutton), ground_perf_radiobutton_group);
  ground_perf_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (ground_refl_radiobutton));

  ground_smfld_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Sommerfeld/Norton"));
  gtk_widget_show (ground_smfld_radiobutton);
  gtk_table_attach (GTK_TABLE (table15), ground_smfld_radiobutton, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (ground_smfld_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (ground_smfld_radiobutton), ground_perf_radiobutton_group);
  ground_perf_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (ground_smfld_radiobutton));

  ground_null_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Nullify Previous Params"));
  gtk_widget_show (ground_null_radiobutton);
  gtk_table_attach (GTK_TABLE (table15), ground_null_radiobutton, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (ground_null_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (ground_null_radiobutton), ground_perf_radiobutton_group);
  ground_perf_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (ground_null_radiobutton));

  ground_radl_checkbutton = gtk_check_button_new_with_mnemonic (_("Radial Ground Screen"));
  gtk_widget_show (ground_radl_checkbutton);
  gtk_table_attach (GTK_TABLE (table15), ground_radl_checkbutton, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (ground_radl_checkbutton), 2);

  ground_secmd_checkbutton = gtk_check_button_new_with_mnemonic (_("Second Medium (Cliff)"));
  gtk_widget_show (ground_secmd_checkbutton);
  gtk_table_attach (GTK_TABLE (table15), ground_secmd_checkbutton, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (ground_secmd_checkbutton), 2);

  label110 = gtk_label_new (_("Ground Type"));
  gtk_widget_show (label110);
  gtk_frame_set_label_widget (GTK_FRAME (frame23), label110);
  gtk_misc_set_padding (GTK_MISC (label110), 4, 4);

  ground_med1_frame = gtk_frame_new (NULL);
  gtk_box_pack_start (GTK_BOX (vbox17), ground_med1_frame, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (ground_med1_frame), 4);

  alignment26 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment26);
  gtk_container_add (GTK_CONTAINER (ground_med1_frame), alignment26);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment26), 0, 0, 12, 0);

  table16 = gtk_table_new (2, 2, FALSE);
  gtk_widget_show (table16);
  gtk_container_add (GTK_CONTAINER (alignment26), table16);
  gtk_table_set_row_spacings (GTK_TABLE (table16), 2);
  gtk_table_set_col_spacings (GTK_TABLE (table16), 2);

  ground_diel1_spinbutton_adj = gtk_adjustment_new (12, 0, 10000, 9.99999974738e-06, 10, 0);
  ground_diel1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground_diel1_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (ground_diel1_spinbutton);
  gtk_table_attach (GTK_TABLE (table16), ground_diel1_spinbutton, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground_diel1_spinbutton), TRUE);

  ground_res1_spinbutton_adj = gtk_adjustment_new (0.005, 0, 10000, 9.99999974738e-06, 10, 0);
  ground_res1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground_res1_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (ground_res1_spinbutton);
  gtk_table_attach (GTK_TABLE (table16), ground_res1_spinbutton, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground_res1_spinbutton), TRUE);

  label116 = gtk_label_new (_("Relative Dielectric Const."));
  gtk_widget_show (label116);
  gtk_table_attach (GTK_TABLE (table16), label116, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label116), 0, 0.5);

  label117 = gtk_label_new (_("Ground Conductivity S/m"));
  gtk_widget_show (label117);
  gtk_table_attach (GTK_TABLE (table16), label117, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label117), 0, 0.5);

  label111 = gtk_label_new (_("1st Medium Parameters"));
  gtk_widget_show (label111);
  gtk_frame_set_label_widget (GTK_FRAME (ground_med1_frame), label111);
  gtk_misc_set_padding (GTK_MISC (label111), 4, 4);

  ground_med2_frame = gtk_frame_new (NULL);
  gtk_box_pack_start (GTK_BOX (vbox17), ground_med2_frame, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (ground_med2_frame), 4);

  alignment27 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment27);
  gtk_container_add (GTK_CONTAINER (ground_med2_frame), alignment27);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment27), 0, 0, 12, 0);

  table18 = gtk_table_new (4, 2, FALSE);
  gtk_widget_show (table18);
  gtk_container_add (GTK_CONTAINER (alignment27), table18);
  gtk_table_set_row_spacings (GTK_TABLE (table18), 2);
  gtk_table_set_col_spacings (GTK_TABLE (table18), 2);

  label118 = gtk_label_new (_("Relative Dielectric Const."));
  gtk_widget_show (label118);
  gtk_table_attach (GTK_TABLE (table18), label118, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label118), 0, 0.5);

  label123 = gtk_label_new (_("Ground Conductivity S/m"));
  gtk_widget_show (label123);
  gtk_table_attach (GTK_TABLE (table18), label123, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label123), 0, 0.5);

  label124 = gtk_label_new (_("Distance to 2nd Medium"));
  gtk_widget_show (label124);
  gtk_table_attach (GTK_TABLE (table18), label124, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label124), 0, 0.5);

  label125 = gtk_label_new (_("Dist. below 1st Medium"));
  gtk_widget_show (label125);
  gtk_table_attach (GTK_TABLE (table18), label125, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label125), 0, 0.5);

  ground_diel2_spinbutton_adj = gtk_adjustment_new (12, 0, 10000, 9.99999974738e-06, 10, 0);
  ground_diel2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground_diel2_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (ground_diel2_spinbutton);
  gtk_table_attach (GTK_TABLE (table18), ground_diel2_spinbutton, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground_diel2_spinbutton), TRUE);

  ground_res2_spinbutton_adj = gtk_adjustment_new (0.005, 0, 10000, 9.99999974738e-06, 10, 0);
  ground_res2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground_res2_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (ground_res2_spinbutton);
  gtk_table_attach (GTK_TABLE (table18), ground_res2_spinbutton, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground_res2_spinbutton), TRUE);

  ground_below_spinbutton_adj = gtk_adjustment_new (1, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
  ground_below_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground_below_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (ground_below_spinbutton);
  gtk_table_attach (GTK_TABLE (table18), ground_below_spinbutton, 1, 2, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground_below_spinbutton), TRUE);

  ground_dist2_spinbutton_adj = gtk_adjustment_new (1, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
  ground_dist2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground_dist2_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (ground_dist2_spinbutton);
  gtk_table_attach (GTK_TABLE (table18), ground_dist2_spinbutton, 0, 1, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground_dist2_spinbutton), TRUE);

  label114 = gtk_label_new (_("2nd Medium Parameters"));
  gtk_widget_show (label114);
  gtk_frame_set_label_widget (GTK_FRAME (ground_med2_frame), label114);
  gtk_misc_set_padding (GTK_MISC (label114), 4, 4);

  ground_radial_frame = gtk_frame_new (NULL);
  gtk_box_pack_start (GTK_BOX (vbox17), ground_radial_frame, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (ground_radial_frame), 4);

  alignment28 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment28);
  gtk_container_add (GTK_CONTAINER (ground_radial_frame), alignment28);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment28), 0, 0, 12, 0);

  table17 = gtk_table_new (3, 2, FALSE);
  gtk_widget_show (table17);
  gtk_container_add (GTK_CONTAINER (alignment28), table17);
  gtk_table_set_row_spacings (GTK_TABLE (table17), 2);
  gtk_table_set_col_spacings (GTK_TABLE (table17), 2);

  label126 = gtk_label_new (_("Number of Radials"));
  gtk_widget_show (label126);
  gtk_table_attach (GTK_TABLE (table17), label126, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label126), 0.9, 0.5);

  label127 = gtk_label_new (_("Radial Screen Radius"));
  gtk_widget_show (label127);
  gtk_table_attach (GTK_TABLE (table17), label127, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label127), 0, 0.5);

  label128 = gtk_label_new (_("Radial Wire Diameter"));
  gtk_widget_show (label128);
  gtk_table_attach (GTK_TABLE (table17), label128, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label128), 0, 0.5);

  ground_nrad_spinbutton_adj = gtk_adjustment_new (4, 1, 1000, 1, 10, 0);
  ground_nrad_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground_nrad_spinbutton_adj), 0.00999999977648, 0);
  gtk_widget_show (ground_nrad_spinbutton);
  gtk_table_attach (GTK_TABLE (table17), ground_nrad_spinbutton, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground_nrad_spinbutton), TRUE);

  ground_diam_spinbutton_adj = gtk_adjustment_new (0.00499999988824, 9.99999974738e-06, 10, 9.99999974738e-06, 10, 0);
  ground_diam_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground_diam_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (ground_diam_spinbutton);
  gtk_table_attach (GTK_TABLE (table17), ground_diam_spinbutton, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground_diam_spinbutton), TRUE);

  ground_scrnrd_spinbutton_adj = gtk_adjustment_new (1, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
  ground_scrnrd_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground_scrnrd_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (ground_scrnrd_spinbutton);
  gtk_table_attach (GTK_TABLE (table17), ground_scrnrd_spinbutton, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground_scrnrd_spinbutton), TRUE);

  label115 = gtk_label_new (_("Radial Screen Parameters"));
  gtk_widget_show (label115);
  gtk_frame_set_label_widget (GTK_FRAME (ground_radial_frame), label115);
  gtk_misc_set_padding (GTK_MISC (label115), 4, 4);

  hbox35 = gtk_hbox_new (TRUE, 0);
  gtk_widget_show (hbox35);
  gtk_box_pack_start (GTK_BOX (vbox17), hbox35, TRUE, TRUE, 0);

  ground_new_button = gtk_button_new_from_stock ("gtk-new");
  gtk_widget_show (ground_new_button);
  gtk_box_pack_start (GTK_BOX (hbox35), ground_new_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (ground_new_button), 2);

  ground_cancel_button = gtk_button_new ();
  gtk_widget_show (ground_cancel_button);
  gtk_box_pack_start (GTK_BOX (hbox35), ground_cancel_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (ground_cancel_button), 2);

  alignment61 = gtk_alignment_new (0.5, 0.5, 0, 0);
  gtk_widget_show (alignment61);
  gtk_container_add (GTK_CONTAINER (ground_cancel_button), alignment61);

  hbox59 = gtk_hbox_new (FALSE, 2);
  gtk_widget_show (hbox59);
  gtk_container_add (GTK_CONTAINER (alignment61), hbox59);

  image81 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image81);
  gtk_box_pack_start (GTK_BOX (hbox59), image81, FALSE, FALSE, 0);

  label233 = gtk_label_new_with_mnemonic ("Delete Card");
  gtk_widget_show (label233);
  gtk_box_pack_start (GTK_BOX (hbox59), label233, FALSE, FALSE, 0);

  ground_apply_button = gtk_button_new_from_stock ("gtk-apply");
  gtk_widget_show (ground_apply_button);
  gtk_box_pack_start (GTK_BOX (hbox35), ground_apply_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (ground_apply_button), 2);

  ground_ok_button = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (ground_ok_button);
  gtk_box_pack_start (GTK_BOX (hbox35), ground_ok_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (ground_ok_button), 2);

  g_signal_connect ((gpointer) ground_command, "destroy",
                    G_CALLBACK (on_ground_command_destroy),
                    NULL);
  g_signal_connect ((gpointer) ground_perf_radiobutton, "toggled",
                    G_CALLBACK (on_ground_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) ground_refl_radiobutton, "toggled",
                    G_CALLBACK (on_ground_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) ground_smfld_radiobutton, "toggled",
                    G_CALLBACK (on_ground_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) ground_null_radiobutton, "toggled",
                    G_CALLBACK (on_ground_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) ground_radl_checkbutton, "toggled",
                    G_CALLBACK (on_ground_checkbutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) ground_secmd_checkbutton, "toggled",
                    G_CALLBACK (on_ground_checkbutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) ground_diel1_spinbutton, "value_changed",
                    G_CALLBACK (on_ground_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) ground_res1_spinbutton, "value_changed",
                    G_CALLBACK (on_ground_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) ground_diel2_spinbutton, "value_changed",
                    G_CALLBACK (on_ground_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) ground_res2_spinbutton, "value_changed",
                    G_CALLBACK (on_ground_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) ground_below_spinbutton, "value_changed",
                    G_CALLBACK (on_ground_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) ground_dist2_spinbutton, "value_changed",
                    G_CALLBACK (on_ground_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) ground_nrad_spinbutton, "value_changed",
                    G_CALLBACK (on_ground_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) ground_diam_spinbutton, "value_changed",
                    G_CALLBACK (on_ground_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) ground_scrnrd_spinbutton, "value_changed",
                    G_CALLBACK (on_ground_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) ground_new_button, "clicked",
                    G_CALLBACK (on_ground_new_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) ground_cancel_button, "clicked",
                    G_CALLBACK (on_ground_cancel_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) ground_apply_button, "clicked",
                    G_CALLBACK (on_ground_apply_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) ground_ok_button, "clicked",
                    G_CALLBACK (on_ground_ok_button_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (ground_command, ground_command, "ground_command");
  GLADE_HOOKUP_OBJECT (ground_command, vbox17, "vbox17");
  GLADE_HOOKUP_OBJECT (ground_command, frame23, "frame23");
  GLADE_HOOKUP_OBJECT (ground_command, alignment25, "alignment25");
  GLADE_HOOKUP_OBJECT (ground_command, table15, "table15");
  GLADE_HOOKUP_OBJECT (ground_command, ground_perf_radiobutton, "ground_perf_radiobutton");
  GLADE_HOOKUP_OBJECT (ground_command, ground_refl_radiobutton, "ground_refl_radiobutton");
  GLADE_HOOKUP_OBJECT (ground_command, ground_smfld_radiobutton, "ground_smfld_radiobutton");
  GLADE_HOOKUP_OBJECT (ground_command, ground_null_radiobutton, "ground_null_radiobutton");
  GLADE_HOOKUP_OBJECT (ground_command, ground_radl_checkbutton, "ground_radl_checkbutton");
  GLADE_HOOKUP_OBJECT (ground_command, ground_secmd_checkbutton, "ground_secmd_checkbutton");
  GLADE_HOOKUP_OBJECT (ground_command, label110, "label110");
  GLADE_HOOKUP_OBJECT (ground_command, ground_med1_frame, "ground_med1_frame");
  GLADE_HOOKUP_OBJECT (ground_command, alignment26, "alignment26");
  GLADE_HOOKUP_OBJECT (ground_command, table16, "table16");
  GLADE_HOOKUP_OBJECT (ground_command, ground_diel1_spinbutton, "ground_diel1_spinbutton");
  GLADE_HOOKUP_OBJECT (ground_command, ground_res1_spinbutton, "ground_res1_spinbutton");
  GLADE_HOOKUP_OBJECT (ground_command, label116, "label116");
  GLADE_HOOKUP_OBJECT (ground_command, label117, "label117");
  GLADE_HOOKUP_OBJECT (ground_command, label111, "label111");
  GLADE_HOOKUP_OBJECT (ground_command, ground_med2_frame, "ground_med2_frame");
  GLADE_HOOKUP_OBJECT (ground_command, alignment27, "alignment27");
  GLADE_HOOKUP_OBJECT (ground_command, table18, "table18");
  GLADE_HOOKUP_OBJECT (ground_command, label118, "label118");
  GLADE_HOOKUP_OBJECT (ground_command, label123, "label123");
  GLADE_HOOKUP_OBJECT (ground_command, label124, "label124");
  GLADE_HOOKUP_OBJECT (ground_command, label125, "label125");
  GLADE_HOOKUP_OBJECT (ground_command, ground_diel2_spinbutton, "ground_diel2_spinbutton");
  GLADE_HOOKUP_OBJECT (ground_command, ground_res2_spinbutton, "ground_res2_spinbutton");
  GLADE_HOOKUP_OBJECT (ground_command, ground_below_spinbutton, "ground_below_spinbutton");
  GLADE_HOOKUP_OBJECT (ground_command, ground_dist2_spinbutton, "ground_dist2_spinbutton");
  GLADE_HOOKUP_OBJECT (ground_command, label114, "label114");
  GLADE_HOOKUP_OBJECT (ground_command, ground_radial_frame, "ground_radial_frame");
  GLADE_HOOKUP_OBJECT (ground_command, alignment28, "alignment28");
  GLADE_HOOKUP_OBJECT (ground_command, table17, "table17");
  GLADE_HOOKUP_OBJECT (ground_command, label126, "label126");
  GLADE_HOOKUP_OBJECT (ground_command, label127, "label127");
  GLADE_HOOKUP_OBJECT (ground_command, label128, "label128");
  GLADE_HOOKUP_OBJECT (ground_command, ground_nrad_spinbutton, "ground_nrad_spinbutton");
  GLADE_HOOKUP_OBJECT (ground_command, ground_diam_spinbutton, "ground_diam_spinbutton");
  GLADE_HOOKUP_OBJECT (ground_command, ground_scrnrd_spinbutton, "ground_scrnrd_spinbutton");
  GLADE_HOOKUP_OBJECT (ground_command, label115, "label115");
  GLADE_HOOKUP_OBJECT (ground_command, hbox35, "hbox35");
  GLADE_HOOKUP_OBJECT (ground_command, ground_new_button, "ground_new_button");
  GLADE_HOOKUP_OBJECT (ground_command, ground_cancel_button, "ground_cancel_button");
  GLADE_HOOKUP_OBJECT (ground_command, alignment61, "alignment61");
  GLADE_HOOKUP_OBJECT (ground_command, hbox59, "hbox59");
  GLADE_HOOKUP_OBJECT (ground_command, image81, "image81");
  GLADE_HOOKUP_OBJECT (ground_command, label233, "label233");
  GLADE_HOOKUP_OBJECT (ground_command, ground_apply_button, "ground_apply_button");
  GLADE_HOOKUP_OBJECT (ground_command, ground_ok_button, "ground_ok_button");

  return ground_command;
}

GtkWidget*
create_nearfield_command (void)
{
  GtkWidget *nearfield_command;
  GtkWidget *vbox18;
  GtkWidget *frame27;
  GtkWidget *alignment29;
  GtkWidget *table20;
  GtkWidget *nearfield_nh_checkbutton;
  GtkWidget *nearfield_ne_checkbutton;
  GtkWidget *nearfield_rect_radiobutton;
  GSList *nearfield_rect_radiobutton_group = NULL;
  GtkWidget *nearfield_sph_radiobutton;
  GtkWidget *label129;
  GtkWidget *frame28;
  GtkWidget *alignment30;
  GtkWidget *table19;
  GtkWidget *nearfield_i1_label;
  GtkWidget *nearfield_i2_label;
  GtkWidget *nearfield_i3_label;
  GtkWidget *nearfield_f1_label;
  GtkWidget *nearfield_f2_label;
  GtkWidget *nearfield_f3_label;
  GtkWidget *nearfield_f4_label;
  GtkWidget *nearfield_f5_label;
  GtkWidget *nearfield_f6_label;
  GtkObject *nearfield_nx_spinbutton_adj;
  GtkWidget *nearfield_nx_spinbutton;
  GtkObject *nearfield_ny_spinbutton_adj;
  GtkWidget *nearfield_ny_spinbutton;
  GtkObject *nearfield_nz_spinbutton_adj;
  GtkWidget *nearfield_nz_spinbutton;
  GtkObject *nearfield_f1_spinbutton_adj;
  GtkWidget *nearfield_f1_spinbutton;
  GtkObject *nearfield_f2_spinbutton_adj;
  GtkWidget *nearfield_f2_spinbutton;
  GtkObject *nearfield_f3_spinbutton_adj;
  GtkWidget *nearfield_f3_spinbutton;
  GtkObject *nearfield_f4_spinbutton_adj;
  GtkWidget *nearfield_f4_spinbutton;
  GtkObject *nearfield_f5_spinbutton_adj;
  GtkWidget *nearfield_f5_spinbutton;
  GtkObject *nearfield_f6_spinbutton_adj;
  GtkWidget *nearfield_f6_spinbutton;
  GtkWidget *label130;
  GtkWidget *hbox36;
  GtkWidget *nearfield_new_button;
  GtkWidget *nearfield_cancel_button;
  GtkWidget *alignment62;
  GtkWidget *hbox60;
  GtkWidget *image82;
  GtkWidget *label234;
  GtkWidget *nearfield_apply_button;
  GtkWidget *nearfield_ok_button;

  nearfield_command = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_container_set_border_width (GTK_CONTAINER (nearfield_command), 4);
  gtk_window_set_title (GTK_WINDOW (nearfield_command), _("Near Fields Command (NE/NH Cards)"));

  vbox18 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox18);
  gtk_container_add (GTK_CONTAINER (nearfield_command), vbox18);

  frame27 = gtk_frame_new (NULL);
  gtk_widget_show (frame27);
  gtk_box_pack_start (GTK_BOX (vbox18), frame27, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frame27), 4);

  alignment29 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment29);
  gtk_container_add (GTK_CONTAINER (frame27), alignment29);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment29), 0, 0, 12, 0);

  table20 = gtk_table_new (2, 2, TRUE);
  gtk_widget_show (table20);
  gtk_container_add (GTK_CONTAINER (alignment29), table20);

  nearfield_nh_checkbutton = gtk_check_button_new_with_mnemonic (_("Near Magnetic Field"));
  gtk_widget_show (nearfield_nh_checkbutton);
  gtk_table_attach (GTK_TABLE (table20), nearfield_nh_checkbutton, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (nearfield_nh_checkbutton), 2);

  nearfield_ne_checkbutton = gtk_check_button_new_with_mnemonic (_("Near Electric Field"));
  gtk_widget_show (nearfield_ne_checkbutton);
  gtk_table_attach (GTK_TABLE (table20), nearfield_ne_checkbutton, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (nearfield_ne_checkbutton), 2);
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (nearfield_ne_checkbutton), TRUE);

  nearfield_rect_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Rectangular Co-ordinates"));
  gtk_widget_show (nearfield_rect_radiobutton);
  gtk_table_attach (GTK_TABLE (table20), nearfield_rect_radiobutton, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (nearfield_rect_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (nearfield_rect_radiobutton), nearfield_rect_radiobutton_group);
  nearfield_rect_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (nearfield_rect_radiobutton));
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (nearfield_rect_radiobutton), TRUE);

  nearfield_sph_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Spherical Co-ordinates"));
  gtk_widget_show (nearfield_sph_radiobutton);
  gtk_table_attach (GTK_TABLE (table20), nearfield_sph_radiobutton, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (nearfield_sph_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (nearfield_sph_radiobutton), nearfield_rect_radiobutton_group);
  nearfield_rect_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (nearfield_sph_radiobutton));

  label129 = gtk_label_new (_("Field Type & Co-ordinates"));
  gtk_widget_show (label129);
  gtk_frame_set_label_widget (GTK_FRAME (frame27), label129);
  gtk_misc_set_padding (GTK_MISC (label129), 4, 4);

  frame28 = gtk_frame_new (NULL);
  gtk_widget_show (frame28);
  gtk_box_pack_start (GTK_BOX (vbox18), frame28, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frame28), 4);

  alignment30 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment30);
  gtk_container_add (GTK_CONTAINER (frame28), alignment30);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment30), 0, 0, 12, 0);

  table19 = gtk_table_new (6, 3, FALSE);
  gtk_widget_show (table19);
  gtk_container_add (GTK_CONTAINER (alignment30), table19);

  nearfield_i1_label = gtk_label_new (_("NX"));
  gtk_widget_show (nearfield_i1_label);
  gtk_table_attach (GTK_TABLE (table19), nearfield_i1_label, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (nearfield_i1_label), 0.1, 0.5);

  nearfield_i2_label = gtk_label_new (_("NY"));
  gtk_widget_show (nearfield_i2_label);
  gtk_table_attach (GTK_TABLE (table19), nearfield_i2_label, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (nearfield_i2_label), 0.1, 0.5);

  nearfield_i3_label = gtk_label_new (_("NZ"));
  gtk_widget_show (nearfield_i3_label);
  gtk_table_attach (GTK_TABLE (table19), nearfield_i3_label, 2, 3, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (nearfield_i3_label), 0.1, 0.5);

  nearfield_f1_label = gtk_label_new (_("X"));
  gtk_widget_show (nearfield_f1_label);
  gtk_table_attach (GTK_TABLE (table19), nearfield_f1_label, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (nearfield_f1_label), 0.1, 0.5);

  nearfield_f2_label = gtk_label_new (_("Y"));
  gtk_widget_show (nearfield_f2_label);
  gtk_table_attach (GTK_TABLE (table19), nearfield_f2_label, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (nearfield_f2_label), 0.1, 0.5);

  nearfield_f3_label = gtk_label_new (_("Z"));
  gtk_widget_show (nearfield_f3_label);
  gtk_table_attach (GTK_TABLE (table19), nearfield_f3_label, 2, 3, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (nearfield_f3_label), 0.1, 0.5);

  nearfield_f4_label = gtk_label_new (_("DX"));
  gtk_widget_show (nearfield_f4_label);
  gtk_table_attach (GTK_TABLE (table19), nearfield_f4_label, 0, 1, 4, 5,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (nearfield_f4_label), 0.1, 0.5);

  nearfield_f5_label = gtk_label_new (_("DY"));
  gtk_widget_show (nearfield_f5_label);
  gtk_table_attach (GTK_TABLE (table19), nearfield_f5_label, 1, 2, 4, 5,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (nearfield_f5_label), 0.1, 0.5);

  nearfield_f6_label = gtk_label_new (_("DZ"));
  gtk_widget_show (nearfield_f6_label);
  gtk_table_attach (GTK_TABLE (table19), nearfield_f6_label, 2, 3, 4, 5,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (nearfield_f6_label), 0.1, 0.5);

  nearfield_nx_spinbutton_adj = gtk_adjustment_new (4, 1, 10000, 1, 10, 0);
  nearfield_nx_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (nearfield_nx_spinbutton_adj), 0.00999999977648, 0);
  gtk_widget_show (nearfield_nx_spinbutton);
  gtk_table_attach (GTK_TABLE (table19), nearfield_nx_spinbutton, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (nearfield_nx_spinbutton), TRUE);

  nearfield_ny_spinbutton_adj = gtk_adjustment_new (4, 1, 10000, 1, 10, 0);
  nearfield_ny_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (nearfield_ny_spinbutton_adj), 0.00999999977648, 0);
  gtk_widget_show (nearfield_ny_spinbutton);
  gtk_table_attach (GTK_TABLE (table19), nearfield_ny_spinbutton, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (nearfield_ny_spinbutton), TRUE);

  nearfield_nz_spinbutton_adj = gtk_adjustment_new (4, 1, 10000, 1, 10, 0);
  nearfield_nz_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (nearfield_nz_spinbutton_adj), 0.00999999977648, 0);
  gtk_widget_show (nearfield_nz_spinbutton);
  gtk_table_attach (GTK_TABLE (table19), nearfield_nz_spinbutton, 2, 3, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (nearfield_nz_spinbutton), TRUE);

  nearfield_f1_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
  nearfield_f1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (nearfield_f1_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (nearfield_f1_spinbutton);
  gtk_table_attach (GTK_TABLE (table19), nearfield_f1_spinbutton, 0, 1, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (nearfield_f1_spinbutton), TRUE);

  nearfield_f2_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
  nearfield_f2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (nearfield_f2_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (nearfield_f2_spinbutton);
  gtk_table_attach (GTK_TABLE (table19), nearfield_f2_spinbutton, 1, 2, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (nearfield_f2_spinbutton), TRUE);

  nearfield_f3_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
  nearfield_f3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (nearfield_f3_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (nearfield_f3_spinbutton);
  gtk_table_attach (GTK_TABLE (table19), nearfield_f3_spinbutton, 2, 3, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (nearfield_f3_spinbutton), TRUE);

  nearfield_f4_spinbutton_adj = gtk_adjustment_new (1, -1000, 1000, 9.99999974738e-06, 10, 0);
  nearfield_f4_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (nearfield_f4_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (nearfield_f4_spinbutton);
  gtk_table_attach (GTK_TABLE (table19), nearfield_f4_spinbutton, 0, 1, 5, 6,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (nearfield_f4_spinbutton), TRUE);

  nearfield_f5_spinbutton_adj = gtk_adjustment_new (1, -1000, 1000, 9.99999974738e-06, 10, 0);
  nearfield_f5_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (nearfield_f5_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (nearfield_f5_spinbutton);
  gtk_table_attach (GTK_TABLE (table19), nearfield_f5_spinbutton, 1, 2, 5, 6,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (nearfield_f5_spinbutton), TRUE);

  nearfield_f6_spinbutton_adj = gtk_adjustment_new (1, -1000, 1000, 9.99999974738e-06, 10, 0);
  nearfield_f6_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (nearfield_f6_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (nearfield_f6_spinbutton);
  gtk_table_attach (GTK_TABLE (table19), nearfield_f6_spinbutton, 2, 3, 5, 6,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (nearfield_f6_spinbutton), TRUE);

  label130 = gtk_label_new (_("Field Pattern Parameters"));
  gtk_widget_show (label130);
  gtk_frame_set_label_widget (GTK_FRAME (frame28), label130);
  gtk_misc_set_padding (GTK_MISC (label130), 4, 4);

  hbox36 = gtk_hbox_new (TRUE, 0);
  gtk_widget_show (hbox36);
  gtk_box_pack_start (GTK_BOX (vbox18), hbox36, TRUE, TRUE, 0);

  nearfield_new_button = gtk_button_new_from_stock ("gtk-new");
  gtk_widget_show (nearfield_new_button);
  gtk_box_pack_start (GTK_BOX (hbox36), nearfield_new_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (nearfield_new_button), 2);

  nearfield_cancel_button = gtk_button_new ();
  gtk_widget_show (nearfield_cancel_button);
  gtk_box_pack_start (GTK_BOX (hbox36), nearfield_cancel_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (nearfield_cancel_button), 2);

  alignment62 = gtk_alignment_new (0.5, 0.5, 0, 0);
  gtk_widget_show (alignment62);
  gtk_container_add (GTK_CONTAINER (nearfield_cancel_button), alignment62);

  hbox60 = gtk_hbox_new (FALSE, 2);
  gtk_widget_show (hbox60);
  gtk_container_add (GTK_CONTAINER (alignment62), hbox60);

  image82 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image82);
  gtk_box_pack_start (GTK_BOX (hbox60), image82, FALSE, FALSE, 0);

  label234 = gtk_label_new_with_mnemonic ("Delete Card");
  gtk_widget_show (label234);
  gtk_box_pack_start (GTK_BOX (hbox60), label234, FALSE, FALSE, 0);

  nearfield_apply_button = gtk_button_new_from_stock ("gtk-apply");
  gtk_widget_show (nearfield_apply_button);
  gtk_box_pack_start (GTK_BOX (hbox36), nearfield_apply_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (nearfield_apply_button), 2);

  nearfield_ok_button = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (nearfield_ok_button);
  gtk_box_pack_start (GTK_BOX (hbox36), nearfield_ok_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (nearfield_ok_button), 2);

  g_signal_connect ((gpointer) nearfield_command, "destroy",
                    G_CALLBACK (on_nearfield_command_destroy),
                    NULL);
  g_signal_connect ((gpointer) nearfield_nh_checkbutton, "toggled",
                    G_CALLBACK (on_nearfield_nh_checkbutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) nearfield_ne_checkbutton, "toggled",
                    G_CALLBACK (on_nearfield_ne_checkbutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) nearfield_rect_radiobutton, "toggled",
                    G_CALLBACK (on_nearfield_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) nearfield_sph_radiobutton, "toggled",
                    G_CALLBACK (on_nearfield_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) nearfield_nx_spinbutton, "value_changed",
                    G_CALLBACK (on_nearfield_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) nearfield_ny_spinbutton, "value_changed",
                    G_CALLBACK (on_nearfield_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) nearfield_nz_spinbutton, "value_changed",
                    G_CALLBACK (on_nearfield_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) nearfield_f1_spinbutton, "value_changed",
                    G_CALLBACK (on_nearfield_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) nearfield_f2_spinbutton, "value_changed",
                    G_CALLBACK (on_nearfield_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) nearfield_f3_spinbutton, "value_changed",
                    G_CALLBACK (on_nearfield_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) nearfield_f4_spinbutton, "value_changed",
                    G_CALLBACK (on_nearfield_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) nearfield_f5_spinbutton, "value_changed",
                    G_CALLBACK (on_nearfield_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) nearfield_f6_spinbutton, "value_changed",
                    G_CALLBACK (on_nearfield_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) nearfield_new_button, "clicked",
                    G_CALLBACK (on_nearfield_new_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) nearfield_cancel_button, "clicked",
                    G_CALLBACK (on_nearfield_cancel_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) nearfield_apply_button, "clicked",
                    G_CALLBACK (on_nearfield_apply_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) nearfield_ok_button, "clicked",
                    G_CALLBACK (on_nearfield_ok_button_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (nearfield_command, nearfield_command, "nearfield_command");
  GLADE_HOOKUP_OBJECT (nearfield_command, vbox18, "vbox18");
  GLADE_HOOKUP_OBJECT (nearfield_command, frame27, "frame27");
  GLADE_HOOKUP_OBJECT (nearfield_command, alignment29, "alignment29");
  GLADE_HOOKUP_OBJECT (nearfield_command, table20, "table20");
  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_nh_checkbutton, "nearfield_nh_checkbutton");
  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_ne_checkbutton, "nearfield_ne_checkbutton");
  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_rect_radiobutton, "nearfield_rect_radiobutton");
  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_sph_radiobutton, "nearfield_sph_radiobutton");
  GLADE_HOOKUP_OBJECT (nearfield_command, label129, "label129");
  GLADE_HOOKUP_OBJECT (nearfield_command, frame28, "frame28");
  GLADE_HOOKUP_OBJECT (nearfield_command, alignment30, "alignment30");
  GLADE_HOOKUP_OBJECT (nearfield_command, table19, "table19");
  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_i1_label, "nearfield_i1_label");
  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_i2_label, "nearfield_i2_label");
  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_i3_label, "nearfield_i3_label");
  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_f1_label, "nearfield_f1_label");
  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_f2_label, "nearfield_f2_label");
  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_f3_label, "nearfield_f3_label");
  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_f4_label, "nearfield_f4_label");
  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_f5_label, "nearfield_f5_label");
  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_f6_label, "nearfield_f6_label");
  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_nx_spinbutton, "nearfield_nx_spinbutton");
  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_ny_spinbutton, "nearfield_ny_spinbutton");
  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_nz_spinbutton, "nearfield_nz_spinbutton");
  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_f1_spinbutton, "nearfield_f1_spinbutton");
  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_f2_spinbutton, "nearfield_f2_spinbutton");
  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_f3_spinbutton, "nearfield_f3_spinbutton");
  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_f4_spinbutton, "nearfield_f4_spinbutton");
  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_f5_spinbutton, "nearfield_f5_spinbutton");
  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_f6_spinbutton, "nearfield_f6_spinbutton");
  GLADE_HOOKUP_OBJECT (nearfield_command, label130, "label130");
  GLADE_HOOKUP_OBJECT (nearfield_command, hbox36, "hbox36");
  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_new_button, "nearfield_new_button");
  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_cancel_button, "nearfield_cancel_button");
  GLADE_HOOKUP_OBJECT (nearfield_command, alignment62, "alignment62");
  GLADE_HOOKUP_OBJECT (nearfield_command, hbox60, "hbox60");
  GLADE_HOOKUP_OBJECT (nearfield_command, image82, "image82");
  GLADE_HOOKUP_OBJECT (nearfield_command, label234, "label234");
  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_apply_button, "nearfield_apply_button");
  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_ok_button, "nearfield_ok_button");

  return nearfield_command;
}

GtkWidget*
create_radiation_command (void)
{
  GtkWidget *radiation_command;
  GtkWidget *vbox19;
  GtkWidget *frame29;
  GtkWidget *alignment31;
  GtkWidget *table21;
  GtkWidget *radiation_i10_radiobutton;
  GSList *radiation_i10_radiobutton_group = NULL;
  GtkWidget *radiation_i16_radiobutton;
  GtkWidget *radiation_i14_radiobutton;
  GtkWidget *radiation_i12_radiobutton;
  GtkWidget *radiation_i11_radiobutton;
  GtkWidget *radiation_i13_radiobutton;
  GtkWidget *radiation_i15_radiobutton;
  GtkWidget *label145;
  GtkWidget *label140;
  GtkWidget *frame33;
  GtkWidget *alignment35;
  GtkWidget *table22;
  GtkWidget *radiation_x0_radiobutton;
  GSList *radiation_x0_radiobutton_group = NULL;
  GtkWidget *radiation_x1_radiobutton;
  GtkWidget *radiation_n0_radiobutton;
  GSList *radiation_n0_radiobutton_group = NULL;
  GtkWidget *radiation_n2_radiobutton;
  GtkWidget *radiation_n4_radiobutton;
  GtkWidget *radiation_d0_radiobutton;
  GSList *radiation_d0_radiobutton_group = NULL;
  GtkWidget *radiation_a0_radiobutton;
  GSList *radiation_a0_radiobutton_group = NULL;
  GtkWidget *radiation_a2_radiobutton;
  GtkWidget *radiation_a1_radiobutton;
  GtkWidget *radiation_d1_radiobutton;
  GtkWidget *radiation_n5_radiobutton;
  GtkWidget *radiation_n3_radiobutton;
  GtkWidget *radiation_n1_radiobutton;
  GtkWidget *label146;
  GtkWidget *hseparator5;
  GtkWidget *hseparator6;
  GtkWidget *hseparator7;
  GtkWidget *hseparator8;
  GtkWidget *hseparator9;
  GtkWidget *hseparator10;
  GtkWidget *label144;
  GtkWidget *frame31;
  GtkWidget *alignment33;
  GtkWidget *table23;
  GtkWidget *radiation_f6_label;
  GtkObject *radiation_f1_spinbutton_adj;
  GtkWidget *radiation_f1_spinbutton;
  GtkObject *radiation_f2_spinbutton_adj;
  GtkWidget *radiation_f2_spinbutton;
  GtkObject *radiation_f6_spinbutton_adj;
  GtkWidget *radiation_f6_spinbutton;
  GtkWidget *radiation_f1_label;
  GtkWidget *label148;
  GtkObject *radiation_i3_spinbutton_adj;
  GtkWidget *radiation_i3_spinbutton;
  GtkObject *radiation_i2_spinbutton_adj;
  GtkWidget *radiation_i2_spinbutton;
  GtkWidget *radiation_i1_label;
  GtkWidget *label210;
  GtkWidget *radiation_f3_label;
  GtkObject *radiation_f3_spinbutton_adj;
  GtkWidget *radiation_f3_spinbutton;
  GtkWidget *radiation_f5_label;
  GtkObject *radiation_f5_spinbutton_adj;
  GtkWidget *radiation_f5_spinbutton;
  GtkWidget *label150;
  GtkObject *radiation_f4_spinbutton_adj;
  GtkWidget *radiation_f4_spinbutton;
  GtkWidget *label142;
  GtkWidget *hbox37;
  GtkWidget *radiation_new_button;
  GtkWidget *radiation_cancel_button;
  GtkWidget *alignment63;
  GtkWidget *hbox61;
  GtkWidget *image83;
  GtkWidget *label235;
  GtkWidget *radiation_apply_button;
  GtkWidget *radiation_ok_button;

  radiation_command = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_container_set_border_width (GTK_CONTAINER (radiation_command), 4);
  gtk_window_set_title (GTK_WINDOW (radiation_command), _("Radiation Pattern (RP Card)"));
  gtk_window_set_icon_name (GTK_WINDOW (radiation_command), "gtk-dialog-info");

  vbox19 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox19);
  gtk_container_add (GTK_CONTAINER (radiation_command), vbox19);

  frame29 = gtk_frame_new (NULL);
  gtk_widget_show (frame29);
  gtk_box_pack_start (GTK_BOX (vbox19), frame29, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frame29), 4);

  alignment31 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment31);
  gtk_container_add (GTK_CONTAINER (frame29), alignment31);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment31), 0, 0, 12, 0);

  table21 = gtk_table_new (4, 2, FALSE);
  gtk_widget_show (table21);
  gtk_container_add (GTK_CONTAINER (alignment31), table21);

  radiation_i10_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Normal (Space) Wave"));
  gtk_widget_show (radiation_i10_radiobutton);
  gtk_table_attach (GTK_TABLE (table21), radiation_i10_radiobutton, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (radiation_i10_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_i10_radiobutton), radiation_i10_radiobutton_group);
  radiation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_i10_radiobutton));
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radiation_i10_radiobutton), TRUE);

  radiation_i16_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Circular Cliff + Radials"));
  gtk_widget_show (radiation_i16_radiobutton);
  gtk_table_attach (GTK_TABLE (table21), radiation_i16_radiobutton, 0, 1, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (radiation_i16_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_i16_radiobutton), radiation_i10_radiobutton_group);
  radiation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_i16_radiobutton));

  radiation_i14_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Radial wire screen"));
  gtk_widget_show (radiation_i14_radiobutton);
  gtk_table_attach (GTK_TABLE (table21), radiation_i14_radiobutton, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (radiation_i14_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_i14_radiobutton), radiation_i10_radiobutton_group);
  radiation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_i14_radiobutton));

  radiation_i12_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Linear Cliff"));
  gtk_widget_show (radiation_i12_radiobutton);
  gtk_table_attach (GTK_TABLE (table21), radiation_i12_radiobutton, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_i12_radiobutton), radiation_i10_radiobutton_group);
  radiation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_i12_radiobutton));

  radiation_i11_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Space + Ground Wave"));
  gtk_widget_show (radiation_i11_radiobutton);
  gtk_table_attach (GTK_TABLE (table21), radiation_i11_radiobutton, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (radiation_i11_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_i11_radiobutton), radiation_i10_radiobutton_group);
  radiation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_i11_radiobutton));

  radiation_i13_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Circular Cliff"));
  gtk_widget_show (radiation_i13_radiobutton);
  gtk_table_attach (GTK_TABLE (table21), radiation_i13_radiobutton, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (radiation_i13_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_i13_radiobutton), radiation_i10_radiobutton_group);
  radiation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_i13_radiobutton));

  radiation_i15_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Linear Cliff + Radials"));
  gtk_widget_show (radiation_i15_radiobutton);
  gtk_table_attach (GTK_TABLE (table21), radiation_i15_radiobutton, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (radiation_i15_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_i15_radiobutton), radiation_i10_radiobutton_group);
  radiation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_i15_radiobutton));

  label145 = gtk_label_new (_("<b>See GN/GD Card Documentation</b>"));
  gtk_widget_show (label145);
  gtk_table_attach (GTK_TABLE (table21), label145, 1, 2, 3, 4,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_use_markup (GTK_LABEL (label145), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label145), 0, 0.5);

  label140 = gtk_label_new (_("Wave Type and Ground (I1)"));
  gtk_widget_show (label140);
  gtk_frame_set_label_widget (GTK_FRAME (frame29), label140);
  gtk_misc_set_padding (GTK_MISC (label140), 4, 4);

  frame33 = gtk_frame_new (NULL);
  gtk_widget_show (frame33);
  gtk_box_pack_start (GTK_BOX (vbox19), frame33, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frame33), 4);

  alignment35 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment35);
  gtk_container_add (GTK_CONTAINER (frame33), alignment35);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment35), 0, 0, 12, 0);

  table22 = gtk_table_new (10, 2, FALSE);
  gtk_widget_show (table22);
  gtk_container_add (GTK_CONTAINER (alignment35), table22);

  radiation_x0_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Major & Minor Axis & Total Gain"));
  gtk_widget_show (radiation_x0_radiobutton);
  gtk_table_attach (GTK_TABLE (table22), radiation_x0_radiobutton, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (radiation_x0_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_x0_radiobutton), radiation_x0_radiobutton_group);
  radiation_x0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_x0_radiobutton));

  radiation_x1_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Vertical, Horizontal & Total Gain"));
  gtk_widget_show (radiation_x1_radiobutton);
  gtk_table_attach (GTK_TABLE (table22), radiation_x1_radiobutton, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (radiation_x1_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_x1_radiobutton), radiation_x0_radiobutton_group);
  radiation_x0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_x1_radiobutton));
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radiation_x1_radiobutton), TRUE);

  radiation_n0_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("No Normalized Gain"));
  gtk_widget_show (radiation_n0_radiobutton);
  gtk_table_attach (GTK_TABLE (table22), radiation_n0_radiobutton, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (radiation_n0_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_n0_radiobutton), radiation_n0_radiobutton_group);
  radiation_n0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_n0_radiobutton));
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radiation_n0_radiobutton), TRUE);

  radiation_n2_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Minor Axis Gain Normalized"));
  gtk_widget_show (radiation_n2_radiobutton);
  gtk_table_attach (GTK_TABLE (table22), radiation_n2_radiobutton, 0, 1, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (radiation_n2_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_n2_radiobutton), radiation_n0_radiobutton_group);
  radiation_n0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_n2_radiobutton));

  radiation_n4_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Horizontal Axis Gain Normalized"));
  gtk_widget_show (radiation_n4_radiobutton);
  gtk_table_attach (GTK_TABLE (table22), radiation_n4_radiobutton, 0, 1, 4, 5,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (radiation_n4_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_n4_radiobutton), radiation_n0_radiobutton_group);
  radiation_n0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_n4_radiobutton));

  radiation_d0_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Print/Normalize Power Gain"));
  gtk_widget_show (radiation_d0_radiobutton);
  gtk_table_attach (GTK_TABLE (table22), radiation_d0_radiobutton, 0, 1, 6, 7,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (radiation_d0_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_d0_radiobutton), radiation_d0_radiobutton_group);
  radiation_d0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_d0_radiobutton));
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radiation_d0_radiobutton), TRUE);

  radiation_a0_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("No Gain Averaging"));
  gtk_widget_show (radiation_a0_radiobutton);
  gtk_table_attach (GTK_TABLE (table22), radiation_a0_radiobutton, 0, 1, 8, 9,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (radiation_a0_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_a0_radiobutton), radiation_a0_radiobutton_group);
  radiation_a0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_a0_radiobutton));

  radiation_a2_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Points in Average Not Printed"));
  gtk_widget_show (radiation_a2_radiobutton);
  gtk_table_attach (GTK_TABLE (table22), radiation_a2_radiobutton, 0, 1, 9, 10,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (radiation_a2_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_a2_radiobutton), radiation_a0_radiobutton_group);
  radiation_a0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_a2_radiobutton));

  radiation_a1_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Average Gain Computed"));
  gtk_widget_show (radiation_a1_radiobutton);
  gtk_table_attach (GTK_TABLE (table22), radiation_a1_radiobutton, 1, 2, 8, 9,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (radiation_a1_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_a1_radiobutton), radiation_a0_radiobutton_group);
  radiation_a0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_a1_radiobutton));

  radiation_d1_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Print/Normalize Directive Gain"));
  gtk_widget_show (radiation_d1_radiobutton);
  gtk_table_attach (GTK_TABLE (table22), radiation_d1_radiobutton, 1, 2, 6, 7,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (radiation_d1_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_d1_radiobutton), radiation_d0_radiobutton_group);
  radiation_d0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_d1_radiobutton));

  radiation_n5_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Total Gain Normalized"));
  gtk_widget_show (radiation_n5_radiobutton);
  gtk_table_attach (GTK_TABLE (table22), radiation_n5_radiobutton, 1, 2, 4, 5,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (radiation_n5_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_n5_radiobutton), radiation_n0_radiobutton_group);
  radiation_n0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_n5_radiobutton));

  radiation_n3_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Vertical Axis Gain Normalized"));
  gtk_widget_show (radiation_n3_radiobutton);
  gtk_table_attach (GTK_TABLE (table22), radiation_n3_radiobutton, 1, 2, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (radiation_n3_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_n3_radiobutton), radiation_n0_radiobutton_group);
  radiation_n0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_n3_radiobutton));

  radiation_n1_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Major Axis Gain Normalized"));
  gtk_widget_show (radiation_n1_radiobutton);
  gtk_table_attach (GTK_TABLE (table22), radiation_n1_radiobutton, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (radiation_n1_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_n1_radiobutton), radiation_n0_radiobutton_group);
  radiation_n0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_n1_radiobutton));

  label146 = gtk_label_new (_("<b>See RP Card Documentation</b>"));
  gtk_widget_show (label146);
  gtk_table_attach (GTK_TABLE (table22), label146, 1, 2, 9, 10,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_use_markup (GTK_LABEL (label146), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label146), 0, 0.5);

  hseparator5 = gtk_hseparator_new ();
  gtk_widget_show (hseparator5);
  gtk_table_attach (GTK_TABLE (table22), hseparator5, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  hseparator6 = gtk_hseparator_new ();
  gtk_widget_show (hseparator6);
  gtk_table_attach (GTK_TABLE (table22), hseparator6, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);

  hseparator7 = gtk_hseparator_new ();
  gtk_widget_show (hseparator7);
  gtk_table_attach (GTK_TABLE (table22), hseparator7, 0, 1, 5, 6,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  hseparator8 = gtk_hseparator_new ();
  gtk_widget_show (hseparator8);
  gtk_table_attach (GTK_TABLE (table22), hseparator8, 1, 2, 5, 6,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);

  hseparator9 = gtk_hseparator_new ();
  gtk_widget_show (hseparator9);
  gtk_table_attach (GTK_TABLE (table22), hseparator9, 0, 1, 7, 8,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  hseparator10 = gtk_hseparator_new ();
  gtk_widget_show (hseparator10);
  gtk_table_attach (GTK_TABLE (table22), hseparator10, 1, 2, 7, 8,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);

  label144 = gtk_label_new (_("Data Output Control (XNDA)"));
  gtk_widget_show (label144);
  gtk_frame_set_label_widget (GTK_FRAME (frame33), label144);
  gtk_misc_set_padding (GTK_MISC (label144), 4, 4);

  frame31 = gtk_frame_new (NULL);
  gtk_widget_show (frame31);
  gtk_box_pack_start (GTK_BOX (vbox19), frame31, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frame31), 5);

  alignment33 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment33);
  gtk_container_add (GTK_CONTAINER (frame31), alignment33);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment33), 0, 0, 12, 0);

  table23 = gtk_table_new (6, 3, FALSE);
  gtk_widget_show (table23);
  gtk_container_add (GTK_CONTAINER (alignment33), table23);

  radiation_f6_label = gtk_label_new (_("Gain Normalization"));
  gtk_widget_show (radiation_f6_label);
  gtk_table_attach (GTK_TABLE (table23), radiation_f6_label, 2, 3, 4, 5,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (radiation_f6_label), 0.1, 0.5);

  radiation_f1_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
  radiation_f1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (radiation_f1_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (radiation_f1_spinbutton);
  gtk_table_attach (GTK_TABLE (table23), radiation_f1_spinbutton, 0, 1, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (radiation_f1_spinbutton), TRUE);

  radiation_f2_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
  radiation_f2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (radiation_f2_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (radiation_f2_spinbutton);
  gtk_table_attach (GTK_TABLE (table23), radiation_f2_spinbutton, 1, 2, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (radiation_f2_spinbutton), TRUE);

  radiation_f6_spinbutton_adj = gtk_adjustment_new (0, -1000, 1000, 9.99999974738e-06, 10, 0);
  radiation_f6_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (radiation_f6_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (radiation_f6_spinbutton);
  gtk_table_attach (GTK_TABLE (table23), radiation_f6_spinbutton, 2, 3, 5, 6,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (radiation_f6_spinbutton), TRUE);

  radiation_f1_label = gtk_label_new (_("Initial Theta (deg)"));
  gtk_widget_show (radiation_f1_label);
  gtk_table_attach (GTK_TABLE (table23), radiation_f1_label, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (radiation_f1_label), 0.1, 0.5);

  label148 = gtk_label_new (_("Initial Phi (deg)"));
  gtk_widget_show (label148);
  gtk_table_attach (GTK_TABLE (table23), label148, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label148), 0.1, 0.5);

  radiation_i3_spinbutton_adj = gtk_adjustment_new (4, 1, 10000, 1, 10, 0);
  radiation_i3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (radiation_i3_spinbutton_adj), 0.00999999977648, 0);
  gtk_widget_show (radiation_i3_spinbutton);
  gtk_table_attach (GTK_TABLE (table23), radiation_i3_spinbutton, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (radiation_i3_spinbutton), TRUE);

  radiation_i2_spinbutton_adj = gtk_adjustment_new (4, 1, 10000, 1, 10, 0);
  radiation_i2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (radiation_i2_spinbutton_adj), 0.00999999977648, 0);
  gtk_widget_show (radiation_i2_spinbutton);
  gtk_table_attach (GTK_TABLE (table23), radiation_i2_spinbutton, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (radiation_i2_spinbutton), TRUE);

  radiation_i1_label = gtk_label_new (_("Points in Phi"));
  gtk_widget_show (radiation_i1_label);
  gtk_table_attach (GTK_TABLE (table23), radiation_i1_label, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (radiation_i1_label), 0.1, 0.5);

  label210 = gtk_label_new (_("Points in Theta"));
  gtk_widget_show (label210);
  gtk_table_attach (GTK_TABLE (table23), label210, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label210), 0.1, 0.5);

  radiation_f3_label = gtk_label_new (_("Increment in Theta"));
  gtk_widget_show (radiation_f3_label);
  gtk_table_attach (GTK_TABLE (table23), radiation_f3_label, 0, 1, 4, 5,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (radiation_f3_label), 0.1, 0.5);

  radiation_f3_spinbutton_adj = gtk_adjustment_new (5, -1000, 1000, 9.99999974738e-06, 10, 0);
  radiation_f3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (radiation_f3_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (radiation_f3_spinbutton);
  gtk_table_attach (GTK_TABLE (table23), radiation_f3_spinbutton, 0, 1, 5, 6,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (radiation_f3_spinbutton), TRUE);

  radiation_f5_label = gtk_label_new (_("Field Point Distance"));
  gtk_widget_show (radiation_f5_label);
  gtk_table_attach (GTK_TABLE (table23), radiation_f5_label, 2, 3, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (radiation_f5_label), 0.1, 0.5);

  radiation_f5_spinbutton_adj = gtk_adjustment_new (0, -1000, 1000, 9.99999974738e-06, 10, 0);
  radiation_f5_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (radiation_f5_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (radiation_f5_spinbutton);
  gtk_table_attach (GTK_TABLE (table23), radiation_f5_spinbutton, 2, 3, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (radiation_f5_spinbutton), TRUE);

  label150 = gtk_label_new (_("Increment in Phi"));
  gtk_widget_show (label150);
  gtk_table_attach (GTK_TABLE (table23), label150, 1, 2, 4, 5,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label150), 0.1, 0.5);

  radiation_f4_spinbutton_adj = gtk_adjustment_new (5, -1000, 1000, 9.99999974738e-06, 10, 0);
  radiation_f4_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (radiation_f4_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (radiation_f4_spinbutton);
  gtk_table_attach (GTK_TABLE (table23), radiation_f4_spinbutton, 1, 2, 5, 6,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (radiation_f4_spinbutton), TRUE);

  label142 = gtk_label_new (_("Radiation Pattern Parameters"));
  gtk_widget_show (label142);
  gtk_frame_set_label_widget (GTK_FRAME (frame31), label142);
  gtk_misc_set_padding (GTK_MISC (label142), 4, 4);

  hbox37 = gtk_hbox_new (TRUE, 0);
  gtk_widget_show (hbox37);
  gtk_box_pack_start (GTK_BOX (vbox19), hbox37, TRUE, TRUE, 0);

  radiation_new_button = gtk_button_new_from_stock ("gtk-new");
  gtk_widget_show (radiation_new_button);
  gtk_box_pack_start (GTK_BOX (hbox37), radiation_new_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (radiation_new_button), 2);

  radiation_cancel_button = gtk_button_new ();
  gtk_widget_show (radiation_cancel_button);
  gtk_box_pack_start (GTK_BOX (hbox37), radiation_cancel_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (radiation_cancel_button), 2);

  alignment63 = gtk_alignment_new (0.5, 0.5, 0, 0);
  gtk_widget_show (alignment63);
  gtk_container_add (GTK_CONTAINER (radiation_cancel_button), alignment63);

  hbox61 = gtk_hbox_new (FALSE, 2);
  gtk_widget_show (hbox61);
  gtk_container_add (GTK_CONTAINER (alignment63), hbox61);

  image83 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image83);
  gtk_box_pack_start (GTK_BOX (hbox61), image83, FALSE, FALSE, 0);

  label235 = gtk_label_new_with_mnemonic ("Delete Card");
  gtk_widget_show (label235);
  gtk_box_pack_start (GTK_BOX (hbox61), label235, FALSE, FALSE, 0);

  radiation_apply_button = gtk_button_new_from_stock ("gtk-apply");
  gtk_widget_show (radiation_apply_button);
  gtk_box_pack_start (GTK_BOX (hbox37), radiation_apply_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (radiation_apply_button), 2);

  radiation_ok_button = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (radiation_ok_button);
  gtk_box_pack_start (GTK_BOX (hbox37), radiation_ok_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (radiation_ok_button), 2);

  g_signal_connect ((gpointer) radiation_command, "destroy",
                    G_CALLBACK (on_radiation_command_destroy),
                    NULL);
  g_signal_connect ((gpointer) radiation_i10_radiobutton, "toggled",
                    G_CALLBACK (on_radiation_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) radiation_i16_radiobutton, "toggled",
                    G_CALLBACK (on_radiation_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) radiation_i14_radiobutton, "toggled",
                    G_CALLBACK (on_radiation_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) radiation_i12_radiobutton, "toggled",
                    G_CALLBACK (on_radiation_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) radiation_i11_radiobutton, "toggled",
                    G_CALLBACK (on_radiation_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) radiation_i13_radiobutton, "toggled",
                    G_CALLBACK (on_radiation_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) radiation_i15_radiobutton, "toggled",
                    G_CALLBACK (on_radiation_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) radiation_x0_radiobutton, "toggled",
                    G_CALLBACK (on_radiation_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) radiation_x1_radiobutton, "toggled",
                    G_CALLBACK (on_radiation_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) radiation_n0_radiobutton, "toggled",
                    G_CALLBACK (on_radiation_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) radiation_n2_radiobutton, "toggled",
                    G_CALLBACK (on_radiation_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) radiation_n4_radiobutton, "toggled",
                    G_CALLBACK (on_radiation_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) radiation_d0_radiobutton, "toggled",
                    G_CALLBACK (on_radiation_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) radiation_a0_radiobutton, "toggled",
                    G_CALLBACK (on_radiation_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) radiation_a2_radiobutton, "toggled",
                    G_CALLBACK (on_radiation_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) radiation_a1_radiobutton, "toggled",
                    G_CALLBACK (on_radiation_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) radiation_d1_radiobutton, "toggled",
                    G_CALLBACK (on_radiation_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) radiation_n5_radiobutton, "toggled",
                    G_CALLBACK (on_radiation_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) radiation_n3_radiobutton, "toggled",
                    G_CALLBACK (on_radiation_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) radiation_n1_radiobutton, "toggled",
                    G_CALLBACK (on_radiation_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) radiation_f1_spinbutton, "value_changed",
                    G_CALLBACK (on_radiation_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) radiation_f2_spinbutton, "value_changed",
                    G_CALLBACK (on_radiation_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) radiation_f6_spinbutton, "value_changed",
                    G_CALLBACK (on_radiation_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) radiation_i3_spinbutton, "value_changed",
                    G_CALLBACK (on_radiation_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) radiation_i2_spinbutton, "value_changed",
                    G_CALLBACK (on_radiation_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) radiation_f3_spinbutton, "value_changed",
                    G_CALLBACK (on_radiation_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) radiation_f5_spinbutton, "value_changed",
                    G_CALLBACK (on_radiation_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) radiation_f4_spinbutton, "value_changed",
                    G_CALLBACK (on_radiation_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) radiation_new_button, "clicked",
                    G_CALLBACK (on_radiation_new_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) radiation_cancel_button, "clicked",
                    G_CALLBACK (on_radiation_cancel_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) radiation_apply_button, "clicked",
                    G_CALLBACK (on_radiation_apply_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) radiation_ok_button, "clicked",
                    G_CALLBACK (on_radiation_ok_button_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (radiation_command, radiation_command, "radiation_command");
  GLADE_HOOKUP_OBJECT (radiation_command, vbox19, "vbox19");
  GLADE_HOOKUP_OBJECT (radiation_command, frame29, "frame29");
  GLADE_HOOKUP_OBJECT (radiation_command, alignment31, "alignment31");
  GLADE_HOOKUP_OBJECT (radiation_command, table21, "table21");
  GLADE_HOOKUP_OBJECT (radiation_command, radiation_i10_radiobutton, "radiation_i10_radiobutton");
  GLADE_HOOKUP_OBJECT (radiation_command, radiation_i16_radiobutton, "radiation_i16_radiobutton");
  GLADE_HOOKUP_OBJECT (radiation_command, radiation_i14_radiobutton, "radiation_i14_radiobutton");
  GLADE_HOOKUP_OBJECT (radiation_command, radiation_i12_radiobutton, "radiation_i12_radiobutton");
  GLADE_HOOKUP_OBJECT (radiation_command, radiation_i11_radiobutton, "radiation_i11_radiobutton");
  GLADE_HOOKUP_OBJECT (radiation_command, radiation_i13_radiobutton, "radiation_i13_radiobutton");
  GLADE_HOOKUP_OBJECT (radiation_command, radiation_i15_radiobutton, "radiation_i15_radiobutton");
  GLADE_HOOKUP_OBJECT (radiation_command, label145, "label145");
  GLADE_HOOKUP_OBJECT (radiation_command, label140, "label140");
  GLADE_HOOKUP_OBJECT (radiation_command, frame33, "frame33");
  GLADE_HOOKUP_OBJECT (radiation_command, alignment35, "alignment35");
  GLADE_HOOKUP_OBJECT (radiation_command, table22, "table22");
  GLADE_HOOKUP_OBJECT (radiation_command, radiation_x0_radiobutton, "radiation_x0_radiobutton");
  GLADE_HOOKUP_OBJECT (radiation_command, radiation_x1_radiobutton, "radiation_x1_radiobutton");
  GLADE_HOOKUP_OBJECT (radiation_command, radiation_n0_radiobutton, "radiation_n0_radiobutton");
  GLADE_HOOKUP_OBJECT (radiation_command, radiation_n2_radiobutton, "radiation_n2_radiobutton");
  GLADE_HOOKUP_OBJECT (radiation_command, radiation_n4_radiobutton, "radiation_n4_radiobutton");
  GLADE_HOOKUP_OBJECT (radiation_command, radiation_d0_radiobutton, "radiation_d0_radiobutton");
  GLADE_HOOKUP_OBJECT (radiation_command, radiation_a0_radiobutton, "radiation_a0_radiobutton");
  GLADE_HOOKUP_OBJECT (radiation_command, radiation_a2_radiobutton, "radiation_a2_radiobutton");
  GLADE_HOOKUP_OBJECT (radiation_command, radiation_a1_radiobutton, "radiation_a1_radiobutton");
  GLADE_HOOKUP_OBJECT (radiation_command, radiation_d1_radiobutton, "radiation_d1_radiobutton");
  GLADE_HOOKUP_OBJECT (radiation_command, radiation_n5_radiobutton, "radiation_n5_radiobutton");
  GLADE_HOOKUP_OBJECT (radiation_command, radiation_n3_radiobutton, "radiation_n3_radiobutton");
  GLADE_HOOKUP_OBJECT (radiation_command, radiation_n1_radiobutton, "radiation_n1_radiobutton");
  GLADE_HOOKUP_OBJECT (radiation_command, label146, "label146");
  GLADE_HOOKUP_OBJECT (radiation_command, hseparator5, "hseparator5");
  GLADE_HOOKUP_OBJECT (radiation_command, hseparator6, "hseparator6");
  GLADE_HOOKUP_OBJECT (radiation_command, hseparator7, "hseparator7");
  GLADE_HOOKUP_OBJECT (radiation_command, hseparator8, "hseparator8");
  GLADE_HOOKUP_OBJECT (radiation_command, hseparator9, "hseparator9");
  GLADE_HOOKUP_OBJECT (radiation_command, hseparator10, "hseparator10");
  GLADE_HOOKUP_OBJECT (radiation_command, label144, "label144");
  GLADE_HOOKUP_OBJECT (radiation_command, frame31, "frame31");
  GLADE_HOOKUP_OBJECT (radiation_command, alignment33, "alignment33");
  GLADE_HOOKUP_OBJECT (radiation_command, table23, "table23");
  GLADE_HOOKUP_OBJECT (radiation_command, radiation_f6_label, "radiation_f6_label");
  GLADE_HOOKUP_OBJECT (radiation_command, radiation_f1_spinbutton, "radiation_f1_spinbutton");
  GLADE_HOOKUP_OBJECT (radiation_command, radiation_f2_spinbutton, "radiation_f2_spinbutton");
  GLADE_HOOKUP_OBJECT (radiation_command, radiation_f6_spinbutton, "radiation_f6_spinbutton");
  GLADE_HOOKUP_OBJECT (radiation_command, radiation_f1_label, "radiation_f1_label");
  GLADE_HOOKUP_OBJECT (radiation_command, label148, "label148");
  GLADE_HOOKUP_OBJECT (radiation_command, radiation_i3_spinbutton, "radiation_i3_spinbutton");
  GLADE_HOOKUP_OBJECT (radiation_command, radiation_i2_spinbutton, "radiation_i2_spinbutton");
  GLADE_HOOKUP_OBJECT (radiation_command, radiation_i1_label, "radiation_i1_label");
  GLADE_HOOKUP_OBJECT (radiation_command, label210, "label210");
  GLADE_HOOKUP_OBJECT (radiation_command, radiation_f3_label, "radiation_f3_label");
  GLADE_HOOKUP_OBJECT (radiation_command, radiation_f3_spinbutton, "radiation_f3_spinbutton");
  GLADE_HOOKUP_OBJECT (radiation_command, radiation_f5_label, "radiation_f5_label");
  GLADE_HOOKUP_OBJECT (radiation_command, radiation_f5_spinbutton, "radiation_f5_spinbutton");
  GLADE_HOOKUP_OBJECT (radiation_command, label150, "label150");
  GLADE_HOOKUP_OBJECT (radiation_command, radiation_f4_spinbutton, "radiation_f4_spinbutton");
  GLADE_HOOKUP_OBJECT (radiation_command, label142, "label142");
  GLADE_HOOKUP_OBJECT (radiation_command, hbox37, "hbox37");
  GLADE_HOOKUP_OBJECT (radiation_command, radiation_new_button, "radiation_new_button");
  GLADE_HOOKUP_OBJECT (radiation_command, radiation_cancel_button, "radiation_cancel_button");
  GLADE_HOOKUP_OBJECT (radiation_command, alignment63, "alignment63");
  GLADE_HOOKUP_OBJECT (radiation_command, hbox61, "hbox61");
  GLADE_HOOKUP_OBJECT (radiation_command, image83, "image83");
  GLADE_HOOKUP_OBJECT (radiation_command, label235, "label235");
  GLADE_HOOKUP_OBJECT (radiation_command, radiation_apply_button, "radiation_apply_button");
  GLADE_HOOKUP_OBJECT (radiation_command, radiation_ok_button, "radiation_ok_button");

  return radiation_command;
}

GtkWidget*
create_excitation_command (void)
{
  GtkWidget *excitation_command;
  GtkWidget *vbox20;
  GtkWidget *frame34;
  GtkWidget *alignment36;
  GtkWidget *table24;
  GtkWidget *excitation_i10_radiobutton;
  GSList *excitation_i10_radiobutton_group = NULL;
  GtkWidget *excitation_i11_radiobutton;
  GtkWidget *excitation_i12_radiobutton;
  GtkWidget *excitation_i13_radiobutton;
  GtkWidget *excitation_i15_radiobutton;
  GtkWidget *excitation_i14_radiobutton;
  GtkWidget *label153;
  GtkWidget *frame35;
  GtkWidget *alignment37;
  GtkWidget *hbox39;
  GtkWidget *excitation_i419_checkbutton;
  GtkWidget *excitation_i420_checkbutton;
  GtkWidget *label154;
  GtkWidget *frame36;
  GtkWidget *alignment38;
  GtkWidget *table25;
  GtkWidget *excitation_i2_label;
  GtkWidget *excitation_i3_label;
  GtkWidget *excitation_f1_label;
  GtkWidget *excitation_f2_label;
  GtkWidget *excitation_f3_label;
  GtkWidget *excitation_f4_label;
  GtkWidget *excitation_f5_label;
  GtkWidget *excitation_f6_label;
  GtkObject *excitation_i2_spinbutton_adj;
  GtkWidget *excitation_i2_spinbutton;
  GtkObject *excitation_i3_spinbutton_adj;
  GtkWidget *excitation_i3_spinbutton;
  GtkObject *excitation_f2_spinbutton_adj;
  GtkWidget *excitation_f2_spinbutton;
  GtkObject *excitation_f3_spinbutton_adj;
  GtkWidget *excitation_f3_spinbutton;
  GtkObject *excitation_f4_spinbutton_adj;
  GtkWidget *excitation_f4_spinbutton;
  GtkObject *excitation_f5_spinbutton_adj;
  GtkWidget *excitation_f5_spinbutton;
  GtkObject *excitation_f6_spinbutton_adj;
  GtkWidget *excitation_f6_spinbutton;
  GtkObject *excitation_f1_spinbutton_adj;
  GtkWidget *excitation_f1_spinbutton;
  GtkWidget *label155;
  GtkWidget *hbox38;
  GtkWidget *excitation_new_button;
  GtkWidget *excitation_cancel_button;
  GtkWidget *alignment64;
  GtkWidget *hbox62;
  GtkWidget *image84;
  GtkWidget *label236;
  GtkWidget *excitation_apply_button;
  GtkWidget *excitation_ok_button;

  excitation_command = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_container_set_border_width (GTK_CONTAINER (excitation_command), 4);
  gtk_window_set_title (GTK_WINDOW (excitation_command), _("Excitation Command (EX Card)"));

  vbox20 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox20);
  gtk_container_add (GTK_CONTAINER (excitation_command), vbox20);

  frame34 = gtk_frame_new (NULL);
  gtk_widget_show (frame34);
  gtk_box_pack_start (GTK_BOX (vbox20), frame34, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frame34), 4);

  alignment36 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment36);
  gtk_container_add (GTK_CONTAINER (frame34), alignment36);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment36), 0, 0, 12, 0);

  table24 = gtk_table_new (2, 3, FALSE);
  gtk_widget_show (table24);
  gtk_container_add (GTK_CONTAINER (alignment36), table24);

  excitation_i10_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Voltage Source"));
  gtk_widget_show (excitation_i10_radiobutton);
  gtk_table_attach (GTK_TABLE (table24), excitation_i10_radiobutton, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (excitation_i10_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (excitation_i10_radiobutton), excitation_i10_radiobutton_group);
  excitation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (excitation_i10_radiobutton));
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (excitation_i10_radiobutton), TRUE);

  excitation_i11_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Incident Linear Wave "));
  gtk_widget_show (excitation_i11_radiobutton);
  gtk_table_attach (GTK_TABLE (table24), excitation_i11_radiobutton, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (excitation_i11_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (excitation_i11_radiobutton), excitation_i10_radiobutton_group);
  excitation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (excitation_i11_radiobutton));

  excitation_i12_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Incident RH Wave"));
  gtk_widget_show (excitation_i12_radiobutton);
  gtk_table_attach (GTK_TABLE (table24), excitation_i12_radiobutton, 2, 3, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (excitation_i12_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (excitation_i12_radiobutton), excitation_i10_radiobutton_group);
  excitation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (excitation_i12_radiobutton));

  excitation_i13_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Incident LH Wave"));
  gtk_widget_show (excitation_i13_radiobutton);
  gtk_table_attach (GTK_TABLE (table24), excitation_i13_radiobutton, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (excitation_i13_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (excitation_i13_radiobutton), excitation_i10_radiobutton_group);
  excitation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (excitation_i13_radiobutton));

  excitation_i15_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Current Slope Discontinuity"));
  gtk_widget_show (excitation_i15_radiobutton);
  gtk_table_attach (GTK_TABLE (table24), excitation_i15_radiobutton, 2, 3, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (excitation_i15_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (excitation_i15_radiobutton), excitation_i10_radiobutton_group);
  excitation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (excitation_i15_radiobutton));

  excitation_i14_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Current Source"));
  gtk_widget_show (excitation_i14_radiobutton);
  gtk_table_attach (GTK_TABLE (table24), excitation_i14_radiobutton, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (excitation_i14_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (excitation_i14_radiobutton), excitation_i10_radiobutton_group);
  excitation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (excitation_i14_radiobutton));

  label153 = gtk_label_new (_("Excitation Type"));
  gtk_widget_show (label153);
  gtk_frame_set_label_widget (GTK_FRAME (frame34), label153);
  gtk_misc_set_padding (GTK_MISC (label153), 4, 4);

  frame35 = gtk_frame_new (NULL);
  gtk_widget_show (frame35);
  gtk_box_pack_start (GTK_BOX (vbox20), frame35, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frame35), 4);

  alignment37 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment37);
  gtk_container_add (GTK_CONTAINER (frame35), alignment37);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment37), 0, 0, 12, 0);

  hbox39 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox39);
  gtk_container_add (GTK_CONTAINER (alignment37), hbox39);

  excitation_i419_checkbutton = gtk_check_button_new_with_mnemonic (_("Maximum Admittance Matrix Asymmetry"));
  gtk_widget_show (excitation_i419_checkbutton);
  gtk_box_pack_start (GTK_BOX (hbox39), excitation_i419_checkbutton, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (excitation_i419_checkbutton), 2);

  excitation_i420_checkbutton = gtk_check_button_new_with_mnemonic (_("Impedance of Source Segment"));
  gtk_widget_show (excitation_i420_checkbutton);
  gtk_box_pack_start (GTK_BOX (hbox39), excitation_i420_checkbutton, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (excitation_i420_checkbutton), 2);

  label154 = gtk_label_new (_("Print Control"));
  gtk_widget_show (label154);
  gtk_frame_set_label_widget (GTK_FRAME (frame35), label154);
  gtk_misc_set_padding (GTK_MISC (label154), 4, 4);

  frame36 = gtk_frame_new (NULL);
  gtk_widget_show (frame36);
  gtk_box_pack_start (GTK_BOX (vbox20), frame36, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frame36), 4);

  alignment38 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment38);
  gtk_container_add (GTK_CONTAINER (frame36), alignment38);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment38), 0, 0, 12, 0);

  table25 = gtk_table_new (6, 3, FALSE);
  gtk_widget_show (table25);
  gtk_container_add (GTK_CONTAINER (alignment38), table25);

  excitation_i2_label = gtk_label_new (_("Tag Number"));
  gtk_widget_show (excitation_i2_label);
  gtk_table_attach (GTK_TABLE (table25), excitation_i2_label, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (excitation_i2_label), 0.1, 0.5);

  excitation_i3_label = gtk_label_new (_("Segment Number"));
  gtk_widget_show (excitation_i3_label);
  gtk_table_attach (GTK_TABLE (table25), excitation_i3_label, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (excitation_i3_label), 0.1, 0.5);

  excitation_f1_label = gtk_label_new (_("Voltage - Real Part"));
  gtk_widget_show (excitation_f1_label);
  gtk_table_attach (GTK_TABLE (table25), excitation_f1_label, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (excitation_f1_label), 0.1, 0.5);

  excitation_f2_label = gtk_label_new (_("Voltage - Imaginary Part"));
  gtk_widget_show (excitation_f2_label);
  gtk_table_attach (GTK_TABLE (table25), excitation_f2_label, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (excitation_f2_label), 0.1, 0.5);

  excitation_f3_label = gtk_label_new (_("Eta"));
  gtk_widget_show (excitation_f3_label);
  gtk_table_attach (GTK_TABLE (table25), excitation_f3_label, 2, 3, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (excitation_f3_label), 0.1, 0.5);

  excitation_f4_label = gtk_label_new (_("Theta"));
  gtk_widget_show (excitation_f4_label);
  gtk_table_attach (GTK_TABLE (table25), excitation_f4_label, 0, 1, 4, 5,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (excitation_f4_label), 0.1, 0.5);

  excitation_f5_label = gtk_label_new (_("Phi"));
  gtk_widget_show (excitation_f5_label);
  gtk_table_attach (GTK_TABLE (table25), excitation_f5_label, 1, 2, 4, 5,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (excitation_f5_label), 0.1, 0.5);

  excitation_f6_label = gtk_label_new (_("Ratio"));
  gtk_widget_show (excitation_f6_label);
  gtk_table_attach (GTK_TABLE (table25), excitation_f6_label, 2, 3, 4, 5,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (excitation_f6_label), 0.1, 0.5);

  excitation_i2_spinbutton_adj = gtk_adjustment_new (1, 1, 10000, 1, 10, 0);
  excitation_i2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (excitation_i2_spinbutton_adj), 0.00999999977648, 0);
  gtk_widget_show (excitation_i2_spinbutton);
  gtk_table_attach (GTK_TABLE (table25), excitation_i2_spinbutton, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (excitation_i2_spinbutton), TRUE);

  excitation_i3_spinbutton_adj = gtk_adjustment_new (1, 1, 10000, 1, 10, 0);
  excitation_i3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (excitation_i3_spinbutton_adj), 0.00999999977648, 0);
  gtk_widget_show (excitation_i3_spinbutton);
  gtk_table_attach (GTK_TABLE (table25), excitation_i3_spinbutton, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (excitation_i3_spinbutton), TRUE);

  excitation_f2_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
  excitation_f2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (excitation_f2_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (excitation_f2_spinbutton);
  gtk_table_attach (GTK_TABLE (table25), excitation_f2_spinbutton, 1, 2, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (excitation_f2_spinbutton), TRUE);

  excitation_f3_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
  excitation_f3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (excitation_f3_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (excitation_f3_spinbutton);
  gtk_table_attach (GTK_TABLE (table25), excitation_f3_spinbutton, 2, 3, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (excitation_f3_spinbutton), TRUE);

  excitation_f4_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
  excitation_f4_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (excitation_f4_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (excitation_f4_spinbutton);
  gtk_table_attach (GTK_TABLE (table25), excitation_f4_spinbutton, 0, 1, 5, 6,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (excitation_f4_spinbutton), TRUE);

  excitation_f5_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
  excitation_f5_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (excitation_f5_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (excitation_f5_spinbutton);
  gtk_table_attach (GTK_TABLE (table25), excitation_f5_spinbutton, 1, 2, 5, 6,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (excitation_f5_spinbutton), TRUE);

  excitation_f6_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
  excitation_f6_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (excitation_f6_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (excitation_f6_spinbutton);
  gtk_table_attach (GTK_TABLE (table25), excitation_f6_spinbutton, 2, 3, 5, 6,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (excitation_f6_spinbutton), TRUE);

  excitation_f1_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
  excitation_f1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (excitation_f1_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (excitation_f1_spinbutton);
  gtk_table_attach (GTK_TABLE (table25), excitation_f1_spinbutton, 0, 1, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (excitation_f1_spinbutton), TRUE);

  label155 = gtk_label_new (_("Excitation Parameters"));
  gtk_widget_show (label155);
  gtk_frame_set_label_widget (GTK_FRAME (frame36), label155);
  gtk_misc_set_padding (GTK_MISC (label155), 4, 4);

  hbox38 = gtk_hbox_new (TRUE, 0);
  gtk_widget_show (hbox38);
  gtk_box_pack_start (GTK_BOX (vbox20), hbox38, TRUE, TRUE, 0);

  excitation_new_button = gtk_button_new_from_stock ("gtk-new");
  gtk_widget_show (excitation_new_button);
  gtk_box_pack_start (GTK_BOX (hbox38), excitation_new_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (excitation_new_button), 2);

  excitation_cancel_button = gtk_button_new ();
  gtk_widget_show (excitation_cancel_button);
  gtk_box_pack_start (GTK_BOX (hbox38), excitation_cancel_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (excitation_cancel_button), 2);

  alignment64 = gtk_alignment_new (0.5, 0.5, 0, 0);
  gtk_widget_show (alignment64);
  gtk_container_add (GTK_CONTAINER (excitation_cancel_button), alignment64);

  hbox62 = gtk_hbox_new (FALSE, 2);
  gtk_widget_show (hbox62);
  gtk_container_add (GTK_CONTAINER (alignment64), hbox62);

  image84 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image84);
  gtk_box_pack_start (GTK_BOX (hbox62), image84, FALSE, FALSE, 0);

  label236 = gtk_label_new_with_mnemonic ("Delete Card");
  gtk_widget_show (label236);
  gtk_box_pack_start (GTK_BOX (hbox62), label236, FALSE, FALSE, 0);

  excitation_apply_button = gtk_button_new_from_stock ("gtk-apply");
  gtk_widget_show (excitation_apply_button);
  gtk_box_pack_start (GTK_BOX (hbox38), excitation_apply_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (excitation_apply_button), 2);

  excitation_ok_button = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (excitation_ok_button);
  gtk_box_pack_start (GTK_BOX (hbox38), excitation_ok_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (excitation_ok_button), 2);

  g_signal_connect ((gpointer) excitation_command, "destroy",
                    G_CALLBACK (on_excitation_command_destroy),
                    NULL);
  g_signal_connect ((gpointer) excitation_i10_radiobutton, "toggled",
                    G_CALLBACK (on_excitation_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) excitation_i11_radiobutton, "toggled",
                    G_CALLBACK (on_excitation_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) excitation_i12_radiobutton, "toggled",
                    G_CALLBACK (on_excitation_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) excitation_i13_radiobutton, "toggled",
                    G_CALLBACK (on_excitation_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) excitation_i15_radiobutton, "toggled",
                    G_CALLBACK (on_excitation_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) excitation_i14_radiobutton, "toggled",
                    G_CALLBACK (on_excitation_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) excitation_i419_checkbutton, "toggled",
                    G_CALLBACK (on_excitation_checkbutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) excitation_i420_checkbutton, "toggled",
                    G_CALLBACK (on_excitation_checkbutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) excitation_i2_spinbutton, "value_changed",
                    G_CALLBACK (on_excitation_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) excitation_i3_spinbutton, "value_changed",
                    G_CALLBACK (on_excitation_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) excitation_f2_spinbutton, "value_changed",
                    G_CALLBACK (on_excitation_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) excitation_f3_spinbutton, "value_changed",
                    G_CALLBACK (on_excitation_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) excitation_f4_spinbutton, "value_changed",
                    G_CALLBACK (on_excitation_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) excitation_f5_spinbutton, "value_changed",
                    G_CALLBACK (on_excitation_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) excitation_f6_spinbutton, "value_changed",
                    G_CALLBACK (on_excitation_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) excitation_f1_spinbutton, "value_changed",
                    G_CALLBACK (on_excitation_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) excitation_new_button, "clicked",
                    G_CALLBACK (on_excitation_new_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) excitation_cancel_button, "clicked",
                    G_CALLBACK (on_excitation_cancel_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) excitation_apply_button, "clicked",
                    G_CALLBACK (on_excitation_apply_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) excitation_ok_button, "clicked",
                    G_CALLBACK (on_excitation_ok_button_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (excitation_command, excitation_command, "excitation_command");
  GLADE_HOOKUP_OBJECT (excitation_command, vbox20, "vbox20");
  GLADE_HOOKUP_OBJECT (excitation_command, frame34, "frame34");
  GLADE_HOOKUP_OBJECT (excitation_command, alignment36, "alignment36");
  GLADE_HOOKUP_OBJECT (excitation_command, table24, "table24");
  GLADE_HOOKUP_OBJECT (excitation_command, excitation_i10_radiobutton, "excitation_i10_radiobutton");
  GLADE_HOOKUP_OBJECT (excitation_command, excitation_i11_radiobutton, "excitation_i11_radiobutton");
  GLADE_HOOKUP_OBJECT (excitation_command, excitation_i12_radiobutton, "excitation_i12_radiobutton");
  GLADE_HOOKUP_OBJECT (excitation_command, excitation_i13_radiobutton, "excitation_i13_radiobutton");
  GLADE_HOOKUP_OBJECT (excitation_command, excitation_i15_radiobutton, "excitation_i15_radiobutton");
  GLADE_HOOKUP_OBJECT (excitation_command, excitation_i14_radiobutton, "excitation_i14_radiobutton");
  GLADE_HOOKUP_OBJECT (excitation_command, label153, "label153");
  GLADE_HOOKUP_OBJECT (excitation_command, frame35, "frame35");
  GLADE_HOOKUP_OBJECT (excitation_command, alignment37, "alignment37");
  GLADE_HOOKUP_OBJECT (excitation_command, hbox39, "hbox39");
  GLADE_HOOKUP_OBJECT (excitation_command, excitation_i419_checkbutton, "excitation_i419_checkbutton");
  GLADE_HOOKUP_OBJECT (excitation_command, excitation_i420_checkbutton, "excitation_i420_checkbutton");
  GLADE_HOOKUP_OBJECT (excitation_command, label154, "label154");
  GLADE_HOOKUP_OBJECT (excitation_command, frame36, "frame36");
  GLADE_HOOKUP_OBJECT (excitation_command, alignment38, "alignment38");
  GLADE_HOOKUP_OBJECT (excitation_command, table25, "table25");
  GLADE_HOOKUP_OBJECT (excitation_command, excitation_i2_label, "excitation_i2_label");
  GLADE_HOOKUP_OBJECT (excitation_command, excitation_i3_label, "excitation_i3_label");
  GLADE_HOOKUP_OBJECT (excitation_command, excitation_f1_label, "excitation_f1_label");
  GLADE_HOOKUP_OBJECT (excitation_command, excitation_f2_label, "excitation_f2_label");
  GLADE_HOOKUP_OBJECT (excitation_command, excitation_f3_label, "excitation_f3_label");
  GLADE_HOOKUP_OBJECT (excitation_command, excitation_f4_label, "excitation_f4_label");
  GLADE_HOOKUP_OBJECT (excitation_command, excitation_f5_label, "excitation_f5_label");
  GLADE_HOOKUP_OBJECT (excitation_command, excitation_f6_label, "excitation_f6_label");
  GLADE_HOOKUP_OBJECT (excitation_command, excitation_i2_spinbutton, "excitation_i2_spinbutton");
  GLADE_HOOKUP_OBJECT (excitation_command, excitation_i3_spinbutton, "excitation_i3_spinbutton");
  GLADE_HOOKUP_OBJECT (excitation_command, excitation_f2_spinbutton, "excitation_f2_spinbutton");
  GLADE_HOOKUP_OBJECT (excitation_command, excitation_f3_spinbutton, "excitation_f3_spinbutton");
  GLADE_HOOKUP_OBJECT (excitation_command, excitation_f4_spinbutton, "excitation_f4_spinbutton");
  GLADE_HOOKUP_OBJECT (excitation_command, excitation_f5_spinbutton, "excitation_f5_spinbutton");
  GLADE_HOOKUP_OBJECT (excitation_command, excitation_f6_spinbutton, "excitation_f6_spinbutton");
  GLADE_HOOKUP_OBJECT (excitation_command, excitation_f1_spinbutton, "excitation_f1_spinbutton");
  GLADE_HOOKUP_OBJECT (excitation_command, label155, "label155");
  GLADE_HOOKUP_OBJECT (excitation_command, hbox38, "hbox38");
  GLADE_HOOKUP_OBJECT (excitation_command, excitation_new_button, "excitation_new_button");
  GLADE_HOOKUP_OBJECT (excitation_command, excitation_cancel_button, "excitation_cancel_button");
  GLADE_HOOKUP_OBJECT (excitation_command, alignment64, "alignment64");
  GLADE_HOOKUP_OBJECT (excitation_command, hbox62, "hbox62");
  GLADE_HOOKUP_OBJECT (excitation_command, image84, "image84");
  GLADE_HOOKUP_OBJECT (excitation_command, label236, "label236");
  GLADE_HOOKUP_OBJECT (excitation_command, excitation_apply_button, "excitation_apply_button");
  GLADE_HOOKUP_OBJECT (excitation_command, excitation_ok_button, "excitation_ok_button");

  return excitation_command;
}

GtkWidget*
create_frequency_command (void)
{
  GtkWidget *frequency_command;
  GtkWidget *vbox21;
  GtkWidget *frame37;
  GtkWidget *alignment39;
  GtkWidget *hbox41;
  GtkWidget *frequency_add_radiobutton;
  GSList *frequency_add_radiobutton_group = NULL;
  GtkWidget *frequency_mul_radiobutton;
  GtkWidget *label165;
  GtkWidget *frame38;
  GtkWidget *alignment40;
  GtkWidget *table26;
  GtkWidget *label167;
  GtkWidget *label168;
  GtkObject *frequency_num_spinbutton_adj;
  GtkWidget *frequency_num_spinbutton;
  GtkObject *frequency_step_spinbutton_adj;
  GtkWidget *frequency_step_spinbutton;
  GtkWidget *label170;
  GtkWidget *label171;
  GtkObject *frequency_start_spinbutton_adj;
  GtkWidget *frequency_start_spinbutton;
  GtkObject *frequency_end_spinbutton_adj;
  GtkWidget *frequency_end_spinbutton;
  GtkWidget *label166;
  GtkWidget *hbox40;
  GtkWidget *frequency_new_button;
  GtkWidget *frequency_cancel_button;
  GtkWidget *alignment65;
  GtkWidget *hbox63;
  GtkWidget *image85;
  GtkWidget *label237;
  GtkWidget *frequency_apply_button;
  GtkWidget *frequency_ok_button;

  frequency_command = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_container_set_border_width (GTK_CONTAINER (frequency_command), 4);
  gtk_window_set_title (GTK_WINDOW (frequency_command), _("Frequecy Command (FR Card)"));

  vbox21 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox21);
  gtk_container_add (GTK_CONTAINER (frequency_command), vbox21);

  frame37 = gtk_frame_new (NULL);
  gtk_widget_show (frame37);
  gtk_box_pack_start (GTK_BOX (vbox21), frame37, TRUE, TRUE, 0);

  alignment39 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment39);
  gtk_container_add (GTK_CONTAINER (frame37), alignment39);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment39), 0, 0, 12, 0);

  hbox41 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox41);
  gtk_container_add (GTK_CONTAINER (alignment39), hbox41);

  frequency_add_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Additive Stepping"));
  gtk_widget_show (frequency_add_radiobutton);
  gtk_box_pack_start (GTK_BOX (hbox41), frequency_add_radiobutton, TRUE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frequency_add_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (frequency_add_radiobutton), frequency_add_radiobutton_group);
  frequency_add_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (frequency_add_radiobutton));
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (frequency_add_radiobutton), TRUE);

  frequency_mul_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Multiplicative Stepping"));
  gtk_widget_show (frequency_mul_radiobutton);
  gtk_box_pack_start (GTK_BOX (hbox41), frequency_mul_radiobutton, TRUE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frequency_mul_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (frequency_mul_radiobutton), frequency_add_radiobutton_group);
  frequency_add_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (frequency_mul_radiobutton));

  label165 = gtk_label_new (_("Frequency Stepping"));
  gtk_widget_show (label165);
  gtk_frame_set_label_widget (GTK_FRAME (frame37), label165);
  gtk_misc_set_padding (GTK_MISC (label165), 4, 4);

  frame38 = gtk_frame_new (NULL);
  gtk_widget_show (frame38);
  gtk_box_pack_start (GTK_BOX (vbox21), frame38, TRUE, TRUE, 0);

  alignment40 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment40);
  gtk_container_add (GTK_CONTAINER (frame38), alignment40);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment40), 0, 0, 12, 0);

  table26 = gtk_table_new (4, 2, FALSE);
  gtk_widget_show (table26);
  gtk_container_add (GTK_CONTAINER (alignment40), table26);

  label167 = gtk_label_new (_("No. Frequency Points"));
  gtk_widget_show (label167);
  gtk_table_attach (GTK_TABLE (table26), label167, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label167), 0.1, 0.5);

  label168 = gtk_label_new (_("Frequency Step (MHz)"));
  gtk_widget_show (label168);
  gtk_table_attach (GTK_TABLE (table26), label168, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label168), 0.1, 0.5);

  frequency_num_spinbutton_adj = gtk_adjustment_new (11, 1, 10000, 1, 10, 0);
  frequency_num_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (frequency_num_spinbutton_adj), 0.00999999977648, 0);
  gtk_widget_show (frequency_num_spinbutton);
  gtk_table_attach (GTK_TABLE (table26), frequency_num_spinbutton, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (frequency_num_spinbutton), TRUE);

  frequency_step_spinbutton_adj = gtk_adjustment_new (0.10000000149, -1000, 1000, 9.99999974738e-06, 10, 0);
  frequency_step_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (frequency_step_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (frequency_step_spinbutton);
  gtk_table_attach (GTK_TABLE (table26), frequency_step_spinbutton, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (frequency_step_spinbutton), TRUE);

  label170 = gtk_label_new (_("Start Frequency (MHz)"));
  gtk_widget_show (label170);
  gtk_table_attach (GTK_TABLE (table26), label170, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label170), 0.1, 0.5);

  label171 = gtk_label_new (_("End Frequency (MHz)"));
  gtk_widget_show (label171);
  gtk_table_attach (GTK_TABLE (table26), label171, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label171), 0.1, 0.5);

  frequency_start_spinbutton_adj = gtk_adjustment_new (50, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
  frequency_start_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (frequency_start_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (frequency_start_spinbutton);
  gtk_table_attach (GTK_TABLE (table26), frequency_start_spinbutton, 0, 1, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (frequency_start_spinbutton), TRUE);

  frequency_end_spinbutton_adj = gtk_adjustment_new (100, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
  frequency_end_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (frequency_end_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (frequency_end_spinbutton);
  gtk_table_attach (GTK_TABLE (table26), frequency_end_spinbutton, 1, 2, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (frequency_end_spinbutton), TRUE);

  label166 = gtk_label_new (_("Frequency Stepping Parameters"));
  gtk_widget_show (label166);
  gtk_frame_set_label_widget (GTK_FRAME (frame38), label166);
  gtk_misc_set_padding (GTK_MISC (label166), 4, 4);

  hbox40 = gtk_hbox_new (TRUE, 0);
  gtk_widget_show (hbox40);
  gtk_box_pack_start (GTK_BOX (vbox21), hbox40, FALSE, FALSE, 0);

  frequency_new_button = gtk_button_new_from_stock ("gtk-new");
  gtk_widget_show (frequency_new_button);
  gtk_box_pack_start (GTK_BOX (hbox40), frequency_new_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frequency_new_button), 2);

  frequency_cancel_button = gtk_button_new ();
  gtk_widget_show (frequency_cancel_button);
  gtk_box_pack_start (GTK_BOX (hbox40), frequency_cancel_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frequency_cancel_button), 2);

  alignment65 = gtk_alignment_new (0.5, 0.5, 0, 0);
  gtk_widget_show (alignment65);
  gtk_container_add (GTK_CONTAINER (frequency_cancel_button), alignment65);

  hbox63 = gtk_hbox_new (FALSE, 2);
  gtk_widget_show (hbox63);
  gtk_container_add (GTK_CONTAINER (alignment65), hbox63);

  image85 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image85);
  gtk_box_pack_start (GTK_BOX (hbox63), image85, FALSE, FALSE, 0);

  label237 = gtk_label_new_with_mnemonic ("Delete Card");
  gtk_widget_show (label237);
  gtk_box_pack_start (GTK_BOX (hbox63), label237, FALSE, FALSE, 0);

  frequency_apply_button = gtk_button_new_from_stock ("gtk-apply");
  gtk_widget_show (frequency_apply_button);
  gtk_box_pack_start (GTK_BOX (hbox40), frequency_apply_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frequency_apply_button), 2);

  frequency_ok_button = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (frequency_ok_button);
  gtk_box_pack_start (GTK_BOX (hbox40), frequency_ok_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frequency_ok_button), 2);

  g_signal_connect ((gpointer) frequency_command, "destroy",
                    G_CALLBACK (on_frequency_command_destroy),
                    NULL);
  g_signal_connect ((gpointer) frequency_add_radiobutton, "toggled",
                    G_CALLBACK (on_frequency_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) frequency_mul_radiobutton, "toggled",
                    G_CALLBACK (on_frequency_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) frequency_num_spinbutton, "value_changed",
                    G_CALLBACK (on_frequency_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) frequency_step_spinbutton, "value_changed",
                    G_CALLBACK (on_frequency_step_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) frequency_start_spinbutton, "value_changed",
                    G_CALLBACK (on_frequency_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) frequency_end_spinbutton, "value_changed",
                    G_CALLBACK (on_frequency_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) frequency_new_button, "clicked",
                    G_CALLBACK (on_frequency_new_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) frequency_cancel_button, "clicked",
                    G_CALLBACK (on_frequency_cancel_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) frequency_apply_button, "clicked",
                    G_CALLBACK (on_frequency_apply_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) frequency_ok_button, "clicked",
                    G_CALLBACK (on_frequency_ok_button_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (frequency_command, frequency_command, "frequency_command");
  GLADE_HOOKUP_OBJECT (frequency_command, vbox21, "vbox21");
  GLADE_HOOKUP_OBJECT (frequency_command, frame37, "frame37");
  GLADE_HOOKUP_OBJECT (frequency_command, alignment39, "alignment39");
  GLADE_HOOKUP_OBJECT (frequency_command, hbox41, "hbox41");
  GLADE_HOOKUP_OBJECT (frequency_command, frequency_add_radiobutton, "frequency_add_radiobutton");
  GLADE_HOOKUP_OBJECT (frequency_command, frequency_mul_radiobutton, "frequency_mul_radiobutton");
  GLADE_HOOKUP_OBJECT (frequency_command, label165, "label165");
  GLADE_HOOKUP_OBJECT (frequency_command, frame38, "frame38");
  GLADE_HOOKUP_OBJECT (frequency_command, alignment40, "alignment40");
  GLADE_HOOKUP_OBJECT (frequency_command, table26, "table26");
  GLADE_HOOKUP_OBJECT (frequency_command, label167, "label167");
  GLADE_HOOKUP_OBJECT (frequency_command, label168, "label168");
  GLADE_HOOKUP_OBJECT (frequency_command, frequency_num_spinbutton, "frequency_num_spinbutton");
  GLADE_HOOKUP_OBJECT (frequency_command, frequency_step_spinbutton, "frequency_step_spinbutton");
  GLADE_HOOKUP_OBJECT (frequency_command, label170, "label170");
  GLADE_HOOKUP_OBJECT (frequency_command, label171, "label171");
  GLADE_HOOKUP_OBJECT (frequency_command, frequency_start_spinbutton, "frequency_start_spinbutton");
  GLADE_HOOKUP_OBJECT (frequency_command, frequency_end_spinbutton, "frequency_end_spinbutton");
  GLADE_HOOKUP_OBJECT (frequency_command, label166, "label166");
  GLADE_HOOKUP_OBJECT (frequency_command, hbox40, "hbox40");
  GLADE_HOOKUP_OBJECT (frequency_command, frequency_new_button, "frequency_new_button");
  GLADE_HOOKUP_OBJECT (frequency_command, frequency_cancel_button, "frequency_cancel_button");
  GLADE_HOOKUP_OBJECT (frequency_command, alignment65, "alignment65");
  GLADE_HOOKUP_OBJECT (frequency_command, hbox63, "hbox63");
  GLADE_HOOKUP_OBJECT (frequency_command, image85, "image85");
  GLADE_HOOKUP_OBJECT (frequency_command, label237, "label237");
  GLADE_HOOKUP_OBJECT (frequency_command, frequency_apply_button, "frequency_apply_button");
  GLADE_HOOKUP_OBJECT (frequency_command, frequency_ok_button, "frequency_ok_button");

  return frequency_command;
}

GtkWidget*
create_loading_command (void)
{
  GtkWidget *loading_command;
  GtkWidget *vbox22;
  GtkWidget *frame39;
  GtkWidget *alignment41;
  GtkWidget *table27;
  GtkWidget *loading_slrlc_radiobutton;
  GSList *loading_slrlc_radiobutton_group = NULL;
  GtkWidget *loading_pdrlc_radiobutton;
  GtkWidget *loading_rr_radiobutton;
  GtkWidget *loading_plrlc_radiobutton;
  GtkWidget *loading_sdrlc_radiobutton;
  GtkWidget *loading_wcon_radiobutton;
  GtkWidget *loading_null_radiobutton;
  GtkWidget *label172;
  GtkWidget *loading_frame;
  GtkWidget *alignment42;
  GtkWidget *table28;
  GtkWidget *loading_i2_label;
  GtkWidget *loading_i3_label;
  GtkWidget *loading_i4_label;
  GtkWidget *loading_f1_label;
  GtkWidget *loading_f2_label;
  GtkWidget *loading_f3_label;
  GtkObject *loading_f1_spinbutton_adj;
  GtkWidget *loading_f1_spinbutton;
  GtkObject *loading_i2_spinbutton_adj;
  GtkWidget *loading_i2_spinbutton;
  GtkObject *loading_i3_spinbutton_adj;
  GtkWidget *loading_i3_spinbutton;
  GtkObject *loading_i4_spinbutton_adj;
  GtkWidget *loading_i4_spinbutton;
  GtkObject *loading_f2_spinbutton_adj;
  GtkWidget *loading_f2_spinbutton;
  GtkObject *loading_f3_spinbutton_adj;
  GtkWidget *loading_f3_spinbutton;
  GtkWidget *label173;
  GtkWidget *hbox42;
  GtkWidget *loading_new_button;
  GtkWidget *loading_cancel_button;
  GtkWidget *alignment66;
  GtkWidget *hbox64;
  GtkWidget *image86;
  GtkWidget *label238;
  GtkWidget *loading_apply_button;
  GtkWidget *loading_ok_button;

  loading_command = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_container_set_border_width (GTK_CONTAINER (loading_command), 4);
  gtk_window_set_title (GTK_WINDOW (loading_command), _("Loading Command (LD Card)"));

  vbox22 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox22);
  gtk_container_add (GTK_CONTAINER (loading_command), vbox22);

  frame39 = gtk_frame_new (NULL);
  gtk_widget_show (frame39);
  gtk_box_pack_start (GTK_BOX (vbox22), frame39, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frame39), 4);

  alignment41 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment41);
  gtk_container_add (GTK_CONTAINER (frame39), alignment41);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment41), 0, 0, 12, 0);

  table27 = gtk_table_new (3, 3, FALSE);
  gtk_widget_show (table27);
  gtk_container_add (GTK_CONTAINER (alignment41), table27);

  loading_slrlc_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Series, Lumped"));
  gtk_widget_show (loading_slrlc_radiobutton);
  gtk_table_attach (GTK_TABLE (table27), loading_slrlc_radiobutton, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (loading_slrlc_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (loading_slrlc_radiobutton), loading_slrlc_radiobutton_group);
  loading_slrlc_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (loading_slrlc_radiobutton));
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (loading_slrlc_radiobutton), TRUE);

  loading_pdrlc_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Parallel, Distributed"));
  gtk_widget_show (loading_pdrlc_radiobutton);
  gtk_table_attach (GTK_TABLE (table27), loading_pdrlc_radiobutton, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (loading_pdrlc_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (loading_pdrlc_radiobutton), loading_slrlc_radiobutton_group);
  loading_slrlc_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (loading_pdrlc_radiobutton));

  loading_rr_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Resistance & Reactance"));
  gtk_widget_show (loading_rr_radiobutton);
  gtk_table_attach (GTK_TABLE (table27), loading_rr_radiobutton, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (loading_rr_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (loading_rr_radiobutton), loading_slrlc_radiobutton_group);
  loading_slrlc_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (loading_rr_radiobutton));

  loading_plrlc_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Parallel, Lumped"));
  gtk_widget_show (loading_plrlc_radiobutton);
  gtk_table_attach (GTK_TABLE (table27), loading_plrlc_radiobutton, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (loading_plrlc_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (loading_plrlc_radiobutton), loading_slrlc_radiobutton_group);
  loading_slrlc_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (loading_plrlc_radiobutton));

  loading_sdrlc_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Series, Distributed"));
  gtk_widget_show (loading_sdrlc_radiobutton);
  gtk_table_attach (GTK_TABLE (table27), loading_sdrlc_radiobutton, 2, 3, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (loading_sdrlc_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (loading_sdrlc_radiobutton), loading_slrlc_radiobutton_group);
  loading_slrlc_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (loading_sdrlc_radiobutton));

  loading_wcon_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Wire Conductivity"));
  gtk_widget_show (loading_wcon_radiobutton);
  gtk_table_attach (GTK_TABLE (table27), loading_wcon_radiobutton, 2, 3, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (loading_wcon_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (loading_wcon_radiobutton), loading_slrlc_radiobutton_group);
  loading_slrlc_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (loading_wcon_radiobutton));

  loading_null_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Short all Loads (Nulls previous Loading Cards)"));
  gtk_widget_show (loading_null_radiobutton);
  gtk_table_attach (GTK_TABLE (table27), loading_null_radiobutton, 0, 3, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (loading_null_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (loading_null_radiobutton), loading_slrlc_radiobutton_group);
  loading_slrlc_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (loading_null_radiobutton));

  label172 = gtk_label_new (_("Loading Type"));
  gtk_widget_show (label172);
  gtk_frame_set_label_widget (GTK_FRAME (frame39), label172);
  gtk_misc_set_padding (GTK_MISC (label172), 4, 4);

  loading_frame = gtk_frame_new (NULL);
  gtk_widget_show (loading_frame);
  gtk_box_pack_start (GTK_BOX (vbox22), loading_frame, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (loading_frame), 4);

  alignment42 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment42);
  gtk_container_add (GTK_CONTAINER (loading_frame), alignment42);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment42), 0, 0, 12, 0);

  table28 = gtk_table_new (4, 3, FALSE);
  gtk_widget_show (table28);
  gtk_container_add (GTK_CONTAINER (alignment42), table28);

  loading_i2_label = gtk_label_new (_("Load Tag Number"));
  gtk_widget_show (loading_i2_label);
  gtk_table_attach (GTK_TABLE (table28), loading_i2_label, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (loading_i2_label), 0.1, 0.5);

  loading_i3_label = gtk_label_new (_("From Segment #"));
  gtk_widget_show (loading_i3_label);
  gtk_table_attach (GTK_TABLE (table28), loading_i3_label, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (loading_i3_label), 0.1, 0.5);

  loading_i4_label = gtk_label_new (_("To Segment #"));
  gtk_widget_show (loading_i4_label);
  gtk_table_attach (GTK_TABLE (table28), loading_i4_label, 2, 3, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (loading_i4_label), 0.1, 0.5);

  loading_f1_label = gtk_label_new (_("Resistance"));
  gtk_widget_show (loading_f1_label);
  gtk_table_attach (GTK_TABLE (table28), loading_f1_label, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (loading_f1_label), 0.1, 0.5);

  loading_f2_label = gtk_label_new (_("Inductance"));
  gtk_widget_show (loading_f2_label);
  gtk_table_attach (GTK_TABLE (table28), loading_f2_label, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (loading_f2_label), 0.1, 0.5);

  loading_f3_label = gtk_label_new (_("Capacitance"));
  gtk_widget_show (loading_f3_label);
  gtk_table_attach (GTK_TABLE (table28), loading_f3_label, 2, 3, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (loading_f3_label), 0.1, 0.5);

  loading_f1_spinbutton_adj = gtk_adjustment_new (1, 0, 1000000000, 9.99999974738e-06, 10, 0);
  loading_f1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (loading_f1_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (loading_f1_spinbutton);
  gtk_table_attach (GTK_TABLE (table28), loading_f1_spinbutton, 0, 1, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (loading_f1_spinbutton), TRUE);

  loading_i2_spinbutton_adj = gtk_adjustment_new (1, 0, 10000, 1, 10, 0);
  loading_i2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (loading_i2_spinbutton_adj), 0.00999999977648, 0);
  gtk_widget_show (loading_i2_spinbutton);
  gtk_table_attach (GTK_TABLE (table28), loading_i2_spinbutton, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (loading_i2_spinbutton), TRUE);

  loading_i3_spinbutton_adj = gtk_adjustment_new (2, 0, 10000, 1, 10, 0);
  loading_i3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (loading_i3_spinbutton_adj), 0.00999999977648, 0);
  gtk_widget_show (loading_i3_spinbutton);
  gtk_table_attach (GTK_TABLE (table28), loading_i3_spinbutton, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (loading_i3_spinbutton), TRUE);

  loading_i4_spinbutton_adj = gtk_adjustment_new (3, 0, 10000, 1, 10, 0);
  loading_i4_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (loading_i4_spinbutton_adj), 0.00999999977648, 0);
  gtk_widget_show (loading_i4_spinbutton);
  gtk_table_attach (GTK_TABLE (table28), loading_i4_spinbutton, 2, 3, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (loading_i4_spinbutton), TRUE);

  loading_f2_spinbutton_adj = gtk_adjustment_new (1, -1000000, 1000000, 9.99999974738e-06, 10, 0);
  loading_f2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (loading_f2_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (loading_f2_spinbutton);
  gtk_table_attach (GTK_TABLE (table28), loading_f2_spinbutton, 1, 2, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (loading_f2_spinbutton), TRUE);

  loading_f3_spinbutton_adj = gtk_adjustment_new (1, 0, 1000000000, 9.99999974738e-06, 10, 0);
  loading_f3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (loading_f3_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (loading_f3_spinbutton);
  gtk_table_attach (GTK_TABLE (table28), loading_f3_spinbutton, 2, 3, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (loading_f3_spinbutton), TRUE);

  label173 = gtk_label_new (_("Loading Parameters"));
  gtk_widget_show (label173);
  gtk_frame_set_label_widget (GTK_FRAME (loading_frame), label173);
  gtk_misc_set_padding (GTK_MISC (label173), 4, 4);

  hbox42 = gtk_hbox_new (TRUE, 0);
  gtk_widget_show (hbox42);
  gtk_box_pack_start (GTK_BOX (vbox22), hbox42, TRUE, TRUE, 0);

  loading_new_button = gtk_button_new_from_stock ("gtk-new");
  gtk_widget_show (loading_new_button);
  gtk_box_pack_start (GTK_BOX (hbox42), loading_new_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (loading_new_button), 2);

  loading_cancel_button = gtk_button_new ();
  gtk_widget_show (loading_cancel_button);
  gtk_box_pack_start (GTK_BOX (hbox42), loading_cancel_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (loading_cancel_button), 2);

  alignment66 = gtk_alignment_new (0.5, 0.5, 0, 0);
  gtk_widget_show (alignment66);
  gtk_container_add (GTK_CONTAINER (loading_cancel_button), alignment66);

  hbox64 = gtk_hbox_new (FALSE, 2);
  gtk_widget_show (hbox64);
  gtk_container_add (GTK_CONTAINER (alignment66), hbox64);

  image86 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image86);
  gtk_box_pack_start (GTK_BOX (hbox64), image86, FALSE, FALSE, 0);

  label238 = gtk_label_new_with_mnemonic ("Delete Card");
  gtk_widget_show (label238);
  gtk_box_pack_start (GTK_BOX (hbox64), label238, FALSE, FALSE, 0);

  loading_apply_button = gtk_button_new_from_stock ("gtk-apply");
  gtk_widget_show (loading_apply_button);
  gtk_box_pack_start (GTK_BOX (hbox42), loading_apply_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (loading_apply_button), 2);

  loading_ok_button = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (loading_ok_button);
  gtk_box_pack_start (GTK_BOX (hbox42), loading_ok_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (loading_ok_button), 2);

  g_signal_connect ((gpointer) loading_command, "destroy",
                    G_CALLBACK (on_loading_command_destroy),
                    NULL);
  g_signal_connect ((gpointer) loading_slrlc_radiobutton, "toggled",
                    G_CALLBACK (on_loading_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) loading_pdrlc_radiobutton, "toggled",
                    G_CALLBACK (on_loading_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) loading_rr_radiobutton, "toggled",
                    G_CALLBACK (on_loading_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) loading_plrlc_radiobutton, "toggled",
                    G_CALLBACK (on_loading_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) loading_sdrlc_radiobutton, "toggled",
                    G_CALLBACK (on_loading_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) loading_wcon_radiobutton, "toggled",
                    G_CALLBACK (on_loading_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) loading_null_radiobutton, "toggled",
                    G_CALLBACK (on_loading_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) loading_f1_spinbutton, "value_changed",
                    G_CALLBACK (on_loading_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) loading_i2_spinbutton, "value_changed",
                    G_CALLBACK (on_loading_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) loading_i3_spinbutton, "value_changed",
                    G_CALLBACK (on_loading_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) loading_i4_spinbutton, "value_changed",
                    G_CALLBACK (on_loading_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) loading_f2_spinbutton, "value_changed",
                    G_CALLBACK (on_loading_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) loading_f3_spinbutton, "value_changed",
                    G_CALLBACK (on_loading_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) loading_new_button, "clicked",
                    G_CALLBACK (on_loading_new_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) loading_cancel_button, "clicked",
                    G_CALLBACK (on_loading_cancel_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) loading_apply_button, "clicked",
                    G_CALLBACK (on_loading_apply_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) loading_ok_button, "clicked",
                    G_CALLBACK (on_loading_ok_button_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (loading_command, loading_command, "loading_command");
  GLADE_HOOKUP_OBJECT (loading_command, vbox22, "vbox22");
  GLADE_HOOKUP_OBJECT (loading_command, frame39, "frame39");
  GLADE_HOOKUP_OBJECT (loading_command, alignment41, "alignment41");
  GLADE_HOOKUP_OBJECT (loading_command, table27, "table27");
  GLADE_HOOKUP_OBJECT (loading_command, loading_slrlc_radiobutton, "loading_slrlc_radiobutton");
  GLADE_HOOKUP_OBJECT (loading_command, loading_pdrlc_radiobutton, "loading_pdrlc_radiobutton");
  GLADE_HOOKUP_OBJECT (loading_command, loading_rr_radiobutton, "loading_rr_radiobutton");
  GLADE_HOOKUP_OBJECT (loading_command, loading_plrlc_radiobutton, "loading_plrlc_radiobutton");
  GLADE_HOOKUP_OBJECT (loading_command, loading_sdrlc_radiobutton, "loading_sdrlc_radiobutton");
  GLADE_HOOKUP_OBJECT (loading_command, loading_wcon_radiobutton, "loading_wcon_radiobutton");
  GLADE_HOOKUP_OBJECT (loading_command, loading_null_radiobutton, "loading_null_radiobutton");
  GLADE_HOOKUP_OBJECT (loading_command, label172, "label172");
  GLADE_HOOKUP_OBJECT (loading_command, loading_frame, "loading_frame");
  GLADE_HOOKUP_OBJECT (loading_command, alignment42, "alignment42");
  GLADE_HOOKUP_OBJECT (loading_command, table28, "table28");
  GLADE_HOOKUP_OBJECT (loading_command, loading_i2_label, "loading_i2_label");
  GLADE_HOOKUP_OBJECT (loading_command, loading_i3_label, "loading_i3_label");
  GLADE_HOOKUP_OBJECT (loading_command, loading_i4_label, "loading_i4_label");
  GLADE_HOOKUP_OBJECT (loading_command, loading_f1_label, "loading_f1_label");
  GLADE_HOOKUP_OBJECT (loading_command, loading_f2_label, "loading_f2_label");
  GLADE_HOOKUP_OBJECT (loading_command, loading_f3_label, "loading_f3_label");
  GLADE_HOOKUP_OBJECT (loading_command, loading_f1_spinbutton, "loading_f1_spinbutton");
  GLADE_HOOKUP_OBJECT (loading_command, loading_i2_spinbutton, "loading_i2_spinbutton");
  GLADE_HOOKUP_OBJECT (loading_command, loading_i3_spinbutton, "loading_i3_spinbutton");
  GLADE_HOOKUP_OBJECT (loading_command, loading_i4_spinbutton, "loading_i4_spinbutton");
  GLADE_HOOKUP_OBJECT (loading_command, loading_f2_spinbutton, "loading_f2_spinbutton");
  GLADE_HOOKUP_OBJECT (loading_command, loading_f3_spinbutton, "loading_f3_spinbutton");
  GLADE_HOOKUP_OBJECT (loading_command, label173, "label173");
  GLADE_HOOKUP_OBJECT (loading_command, hbox42, "hbox42");
  GLADE_HOOKUP_OBJECT (loading_command, loading_new_button, "loading_new_button");
  GLADE_HOOKUP_OBJECT (loading_command, loading_cancel_button, "loading_cancel_button");
  GLADE_HOOKUP_OBJECT (loading_command, alignment66, "alignment66");
  GLADE_HOOKUP_OBJECT (loading_command, hbox64, "hbox64");
  GLADE_HOOKUP_OBJECT (loading_command, image86, "image86");
  GLADE_HOOKUP_OBJECT (loading_command, label238, "label238");
  GLADE_HOOKUP_OBJECT (loading_command, loading_apply_button, "loading_apply_button");
  GLADE_HOOKUP_OBJECT (loading_command, loading_ok_button, "loading_ok_button");

  return loading_command;
}

GtkWidget*
create_network_command (void)
{
  GtkWidget *network_command;
  GtkWidget *vbox23;
  GtkWidget *frame41;
  GtkWidget *alignment43;
  GtkWidget *table29;
  GtkWidget *label184;
  GtkObject *network_i4_spinbutton_adj;
  GtkWidget *network_i4_spinbutton;
  GtkObject *network_i1_spinbutton_adj;
  GtkWidget *network_i1_spinbutton;
  GtkObject *network_i2_spinbutton_adj;
  GtkWidget *network_i2_spinbutton;
  GtkWidget *label183;
  GtkWidget *label182;
  GtkWidget *label185;
  GtkObject *network_i3_spinbutton_adj;
  GtkWidget *network_i3_spinbutton;
  GtkWidget *label180;
  GtkWidget *frame42;
  GtkWidget *alignment44;
  GtkWidget *table30;
  GtkWidget *label186;
  GtkWidget *label187;
  GtkWidget *label189;
  GtkWidget *label190;
  GtkObject *network_f3_spinbutton_adj;
  GtkWidget *network_f3_spinbutton;
  GtkObject *network_f4_spinbutton_adj;
  GtkWidget *network_f4_spinbutton;
  GtkWidget *label191;
  GtkWidget *label192;
  GtkObject *network_f1_spinbutton_adj;
  GtkWidget *network_f1_spinbutton;
  GtkObject *network_f2_spinbutton_adj;
  GtkWidget *network_f2_spinbutton;
  GtkObject *network_f6_spinbutton_adj;
  GtkWidget *network_f6_spinbutton;
  GtkObject *network_f5_spinbutton_adj;
  GtkWidget *network_f5_spinbutton;
  GtkWidget *label181;
  GtkWidget *hbox43;
  GtkWidget *network_new_button;
  GtkWidget *network_cancel_button;
  GtkWidget *alignment67;
  GtkWidget *hbox65;
  GtkWidget *image87;
  GtkWidget *label239;
  GtkWidget *network_apply_button;
  GtkWidget *network_ok_button;

  network_command = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_container_set_border_width (GTK_CONTAINER (network_command), 4);
  gtk_window_set_title (GTK_WINDOW (network_command), _("Network Command (NT Card)"));

  vbox23 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox23);
  gtk_container_add (GTK_CONTAINER (network_command), vbox23);

  frame41 = gtk_frame_new (NULL);
  gtk_widget_show (frame41);
  gtk_box_pack_start (GTK_BOX (vbox23), frame41, TRUE, TRUE, 0);

  alignment43 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment43);
  gtk_container_add (GTK_CONTAINER (frame41), alignment43);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment43), 0, 0, 12, 0);

  table29 = gtk_table_new (4, 2, FALSE);
  gtk_widget_show (table29);
  gtk_container_add (GTK_CONTAINER (alignment43), table29);

  label184 = gtk_label_new (_("Tag Number, Port 2  "));
  gtk_widget_show (label184);
  gtk_table_attach (GTK_TABLE (table29), label184, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label184), 0.1, 0.5);

  network_i4_spinbutton_adj = gtk_adjustment_new (1, 1, 10000, 1, 10, 0);
  network_i4_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (network_i4_spinbutton_adj), 0.00999999977648, 0);
  gtk_widget_show (network_i4_spinbutton);
  gtk_table_attach (GTK_TABLE (table29), network_i4_spinbutton, 1, 2, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (network_i4_spinbutton), TRUE);

  network_i1_spinbutton_adj = gtk_adjustment_new (1, 1, 10000, 1, 10, 0);
  network_i1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (network_i1_spinbutton_adj), 0.00999999977648, 0);
  gtk_widget_show (network_i1_spinbutton);
  gtk_table_attach (GTK_TABLE (table29), network_i1_spinbutton, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (network_i1_spinbutton), TRUE);

  network_i2_spinbutton_adj = gtk_adjustment_new (1, 1, 10000, 1, 10, 0);
  network_i2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (network_i2_spinbutton_adj), 0.00999999977648, 0);
  gtk_widget_show (network_i2_spinbutton);
  gtk_table_attach (GTK_TABLE (table29), network_i2_spinbutton, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (network_i2_spinbutton), TRUE);

  label183 = gtk_label_new (_("Segment Num, Port 1"));
  gtk_widget_show (label183);
  gtk_table_attach (GTK_TABLE (table29), label183, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label183), 0.1, 0.5);

  label182 = gtk_label_new (_("Tag Number, Port 1  "));
  gtk_widget_show (label182);
  gtk_table_attach (GTK_TABLE (table29), label182, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label182), 0.1, 0.5);

  label185 = gtk_label_new (_("Segment Num, Port 2"));
  gtk_widget_show (label185);
  gtk_table_attach (GTK_TABLE (table29), label185, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label185), 0.1, 0.5);

  network_i3_spinbutton_adj = gtk_adjustment_new (2, 1, 10000, 1, 10, 0);
  network_i3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (network_i3_spinbutton_adj), 0.00999999977648, 0);
  gtk_widget_show (network_i3_spinbutton);
  gtk_table_attach (GTK_TABLE (table29), network_i3_spinbutton, 0, 1, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (network_i3_spinbutton), TRUE);

  label180 = gtk_label_new (_("Segment Identity"));
  gtk_widget_show (label180);
  gtk_frame_set_label_widget (GTK_FRAME (frame41), label180);
  gtk_misc_set_padding (GTK_MISC (label180), 4, 4);

  frame42 = gtk_frame_new (NULL);
  gtk_widget_show (frame42);
  gtk_box_pack_start (GTK_BOX (vbox23), frame42, TRUE, TRUE, 0);

  alignment44 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment44);
  gtk_container_add (GTK_CONTAINER (frame42), alignment44);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment44), 0, 0, 12, 0);

  table30 = gtk_table_new (6, 2, FALSE);
  gtk_widget_show (table30);
  gtk_container_add (GTK_CONTAINER (alignment44), table30);

  label186 = gtk_label_new (_("Element 1,1 Real Part"));
  gtk_widget_show (label186);
  gtk_table_attach (GTK_TABLE (table30), label186, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label186), 0.1, 0.5);

  label187 = gtk_label_new (_("Element 1,1 Imag Part"));
  gtk_widget_show (label187);
  gtk_table_attach (GTK_TABLE (table30), label187, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label187), 0.1, 0.5);

  label189 = gtk_label_new (_("Element 1,2 Real Part"));
  gtk_widget_show (label189);
  gtk_table_attach (GTK_TABLE (table30), label189, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label189), 0.1, 0.5);

  label190 = gtk_label_new (_("Element 1,2 Imag Part"));
  gtk_widget_show (label190);
  gtk_table_attach (GTK_TABLE (table30), label190, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label190), 0.1, 0.5);

  network_f3_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
  network_f3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (network_f3_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (network_f3_spinbutton);
  gtk_table_attach (GTK_TABLE (table30), network_f3_spinbutton, 0, 1, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (network_f3_spinbutton), TRUE);

  network_f4_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
  network_f4_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (network_f4_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (network_f4_spinbutton);
  gtk_table_attach (GTK_TABLE (table30), network_f4_spinbutton, 1, 2, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (network_f4_spinbutton), TRUE);

  label191 = gtk_label_new (_("Element 2,2 Real Part"));
  gtk_widget_show (label191);
  gtk_table_attach (GTK_TABLE (table30), label191, 0, 1, 4, 5,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label191), 0.1, 0.5);

  label192 = gtk_label_new (_("Element 2,2 Imag Part"));
  gtk_widget_show (label192);
  gtk_table_attach (GTK_TABLE (table30), label192, 1, 2, 4, 5,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label192), 0.1, 0.5);

  network_f1_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
  network_f1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (network_f1_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (network_f1_spinbutton);
  gtk_table_attach (GTK_TABLE (table30), network_f1_spinbutton, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (network_f1_spinbutton), TRUE);

  network_f2_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
  network_f2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (network_f2_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (network_f2_spinbutton);
  gtk_table_attach (GTK_TABLE (table30), network_f2_spinbutton, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (network_f2_spinbutton), TRUE);

  network_f6_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
  network_f6_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (network_f6_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (network_f6_spinbutton);
  gtk_table_attach (GTK_TABLE (table30), network_f6_spinbutton, 1, 2, 5, 6,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (network_f6_spinbutton), TRUE);

  network_f5_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
  network_f5_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (network_f5_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (network_f5_spinbutton);
  gtk_table_attach (GTK_TABLE (table30), network_f5_spinbutton, 0, 1, 5, 6,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (network_f5_spinbutton), TRUE);

  label181 = gtk_label_new (_("Admittance Matrix Elements"));
  gtk_widget_show (label181);
  gtk_frame_set_label_widget (GTK_FRAME (frame42), label181);
  gtk_misc_set_padding (GTK_MISC (label181), 4, 4);

  hbox43 = gtk_hbox_new (TRUE, 0);
  gtk_widget_show (hbox43);
  gtk_box_pack_start (GTK_BOX (vbox23), hbox43, TRUE, TRUE, 0);

  network_new_button = gtk_button_new_from_stock ("gtk-new");
  gtk_widget_show (network_new_button);
  gtk_box_pack_start (GTK_BOX (hbox43), network_new_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (network_new_button), 2);

  network_cancel_button = gtk_button_new ();
  gtk_widget_show (network_cancel_button);
  gtk_box_pack_start (GTK_BOX (hbox43), network_cancel_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (network_cancel_button), 2);

  alignment67 = gtk_alignment_new (0.5, 0.5, 0, 0);
  gtk_widget_show (alignment67);
  gtk_container_add (GTK_CONTAINER (network_cancel_button), alignment67);

  hbox65 = gtk_hbox_new (FALSE, 2);
  gtk_widget_show (hbox65);
  gtk_container_add (GTK_CONTAINER (alignment67), hbox65);

  image87 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image87);
  gtk_box_pack_start (GTK_BOX (hbox65), image87, FALSE, FALSE, 0);

  label239 = gtk_label_new_with_mnemonic ("Delete Card");
  gtk_widget_show (label239);
  gtk_box_pack_start (GTK_BOX (hbox65), label239, FALSE, FALSE, 0);

  network_apply_button = gtk_button_new_from_stock ("gtk-apply");
  gtk_widget_show (network_apply_button);
  gtk_box_pack_start (GTK_BOX (hbox43), network_apply_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (network_apply_button), 2);

  network_ok_button = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (network_ok_button);
  gtk_box_pack_start (GTK_BOX (hbox43), network_ok_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (network_ok_button), 2);

  g_signal_connect ((gpointer) network_command, "destroy",
                    G_CALLBACK (on_network_command_destroy),
                    NULL);
  g_signal_connect ((gpointer) network_i4_spinbutton, "value_changed",
                    G_CALLBACK (on_network_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) network_i1_spinbutton, "value_changed",
                    G_CALLBACK (on_network_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) network_i2_spinbutton, "value_changed",
                    G_CALLBACK (on_network_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) network_i3_spinbutton, "value_changed",
                    G_CALLBACK (on_network_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) network_f3_spinbutton, "value_changed",
                    G_CALLBACK (on_network_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) network_f4_spinbutton, "value_changed",
                    G_CALLBACK (on_network_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) network_f1_spinbutton, "value_changed",
                    G_CALLBACK (on_network_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) network_f2_spinbutton, "value_changed",
                    G_CALLBACK (on_network_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) network_f6_spinbutton, "value_changed",
                    G_CALLBACK (on_network_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) network_f5_spinbutton, "value_changed",
                    G_CALLBACK (on_network_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) network_new_button, "clicked",
                    G_CALLBACK (on_network_new_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) network_cancel_button, "clicked",
                    G_CALLBACK (on_network_cancel_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) network_apply_button, "clicked",
                    G_CALLBACK (on_network_apply_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) network_ok_button, "clicked",
                    G_CALLBACK (on_network_ok_button_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (network_command, network_command, "network_command");
  GLADE_HOOKUP_OBJECT (network_command, vbox23, "vbox23");
  GLADE_HOOKUP_OBJECT (network_command, frame41, "frame41");
  GLADE_HOOKUP_OBJECT (network_command, alignment43, "alignment43");
  GLADE_HOOKUP_OBJECT (network_command, table29, "table29");
  GLADE_HOOKUP_OBJECT (network_command, label184, "label184");
  GLADE_HOOKUP_OBJECT (network_command, network_i4_spinbutton, "network_i4_spinbutton");
  GLADE_HOOKUP_OBJECT (network_command, network_i1_spinbutton, "network_i1_spinbutton");
  GLADE_HOOKUP_OBJECT (network_command, network_i2_spinbutton, "network_i2_spinbutton");
  GLADE_HOOKUP_OBJECT (network_command, label183, "label183");
  GLADE_HOOKUP_OBJECT (network_command, label182, "label182");
  GLADE_HOOKUP_OBJECT (network_command, label185, "label185");
  GLADE_HOOKUP_OBJECT (network_command, network_i3_spinbutton, "network_i3_spinbutton");
  GLADE_HOOKUP_OBJECT (network_command, label180, "label180");
  GLADE_HOOKUP_OBJECT (network_command, frame42, "frame42");
  GLADE_HOOKUP_OBJECT (network_command, alignment44, "alignment44");
  GLADE_HOOKUP_OBJECT (network_command, table30, "table30");
  GLADE_HOOKUP_OBJECT (network_command, label186, "label186");
  GLADE_HOOKUP_OBJECT (network_command, label187, "label187");
  GLADE_HOOKUP_OBJECT (network_command, label189, "label189");
  GLADE_HOOKUP_OBJECT (network_command, label190, "label190");
  GLADE_HOOKUP_OBJECT (network_command, network_f3_spinbutton, "network_f3_spinbutton");
  GLADE_HOOKUP_OBJECT (network_command, network_f4_spinbutton, "network_f4_spinbutton");
  GLADE_HOOKUP_OBJECT (network_command, label191, "label191");
  GLADE_HOOKUP_OBJECT (network_command, label192, "label192");
  GLADE_HOOKUP_OBJECT (network_command, network_f1_spinbutton, "network_f1_spinbutton");
  GLADE_HOOKUP_OBJECT (network_command, network_f2_spinbutton, "network_f2_spinbutton");
  GLADE_HOOKUP_OBJECT (network_command, network_f6_spinbutton, "network_f6_spinbutton");
  GLADE_HOOKUP_OBJECT (network_command, network_f5_spinbutton, "network_f5_spinbutton");
  GLADE_HOOKUP_OBJECT (network_command, label181, "label181");
  GLADE_HOOKUP_OBJECT (network_command, hbox43, "hbox43");
  GLADE_HOOKUP_OBJECT (network_command, network_new_button, "network_new_button");
  GLADE_HOOKUP_OBJECT (network_command, network_cancel_button, "network_cancel_button");
  GLADE_HOOKUP_OBJECT (network_command, alignment67, "alignment67");
  GLADE_HOOKUP_OBJECT (network_command, hbox65, "hbox65");
  GLADE_HOOKUP_OBJECT (network_command, image87, "image87");
  GLADE_HOOKUP_OBJECT (network_command, label239, "label239");
  GLADE_HOOKUP_OBJECT (network_command, network_apply_button, "network_apply_button");
  GLADE_HOOKUP_OBJECT (network_command, network_ok_button, "network_ok_button");

  return network_command;
}

GtkWidget*
create_txline_command (void)
{
  GtkWidget *txline_command;
  GtkWidget *vbox24;
  GtkWidget *frame43;
  GtkWidget *alignment45;
  GtkWidget *table31;
  GtkObject *txline_i4_spinbutton_adj;
  GtkWidget *txline_i4_spinbutton;
  GtkObject *txline_i1_spinbutton_adj;
  GtkWidget *txline_i1_spinbutton;
  GtkObject *txline_i2_spinbutton_adj;
  GtkWidget *txline_i2_spinbutton;
  GtkWidget *label194;
  GtkWidget *label195;
  GtkWidget *label196;
  GtkObject *txline_i3_spinbutton_adj;
  GtkWidget *txline_i3_spinbutton;
  GtkWidget *label193;
  GtkWidget *label197;
  GtkWidget *frame44;
  GtkWidget *alignment46;
  GtkWidget *table32;
  GtkWidget *label198;
  GtkWidget *label199;
  GtkWidget *label200;
  GtkWidget *label201;
  GtkObject *txline_f3_spinbutton_adj;
  GtkWidget *txline_f3_spinbutton;
  GtkObject *txline_f4_spinbutton_adj;
  GtkWidget *txline_f4_spinbutton;
  GtkWidget *label202;
  GtkWidget *label203;
  GtkObject *txline_f1_spinbutton_adj;
  GtkWidget *txline_f1_spinbutton;
  GtkObject *txline_f2_spinbutton_adj;
  GtkWidget *txline_f2_spinbutton;
  GtkObject *txline_f6_spinbutton_adj;
  GtkWidget *txline_f6_spinbutton;
  GtkObject *txline_f5_spinbutton_adj;
  GtkWidget *txline_f5_spinbutton;
  GtkWidget *txline_crossed_checkbutton;
  GtkWidget *hbox44;
  GtkWidget *txline_new_button;
  GtkWidget *txline_cancel_button;
  GtkWidget *alignment68;
  GtkWidget *hbox66;
  GtkWidget *image88;
  GtkWidget *label240;
  GtkWidget *txline_apply_button;
  GtkWidget *txline_ok_button;

  txline_command = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_container_set_border_width (GTK_CONTAINER (txline_command), 4);
  gtk_window_set_title (GTK_WINDOW (txline_command), _("Trans. Line Command (TL Card)"));

  vbox24 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox24);
  gtk_container_add (GTK_CONTAINER (txline_command), vbox24);

  frame43 = gtk_frame_new (NULL);
  gtk_widget_show (frame43);
  gtk_box_pack_start (GTK_BOX (vbox24), frame43, TRUE, TRUE, 0);

  alignment45 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment45);
  gtk_container_add (GTK_CONTAINER (frame43), alignment45);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment45), 0, 0, 12, 0);

  table31 = gtk_table_new (4, 2, FALSE);
  gtk_widget_show (table31);
  gtk_container_add (GTK_CONTAINER (alignment45), table31);

  txline_i4_spinbutton_adj = gtk_adjustment_new (1, 1, 10000, 1, 10, 0);
  txline_i4_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (txline_i4_spinbutton_adj), 0.00999999977648, 0);
  gtk_widget_show (txline_i4_spinbutton);
  gtk_table_attach (GTK_TABLE (table31), txline_i4_spinbutton, 1, 2, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (txline_i4_spinbutton), TRUE);

  txline_i1_spinbutton_adj = gtk_adjustment_new (1, 1, 10000, 1, 10, 0);
  txline_i1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (txline_i1_spinbutton_adj), 0.00999999977648, 0);
  gtk_widget_show (txline_i1_spinbutton);
  gtk_table_attach (GTK_TABLE (table31), txline_i1_spinbutton, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (txline_i1_spinbutton), TRUE);

  txline_i2_spinbutton_adj = gtk_adjustment_new (1, 1, 10000, 1, 10, 0);
  txline_i2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (txline_i2_spinbutton_adj), 0.00999999977648, 0);
  gtk_widget_show (txline_i2_spinbutton);
  gtk_table_attach (GTK_TABLE (table31), txline_i2_spinbutton, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (txline_i2_spinbutton), TRUE);

  label194 = gtk_label_new (_("Segment Num, End 1"));
  gtk_widget_show (label194);
  gtk_table_attach (GTK_TABLE (table31), label194, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label194), 0.1, 0.5);

  label195 = gtk_label_new (_("Tag Number, End 1  "));
  gtk_widget_show (label195);
  gtk_table_attach (GTK_TABLE (table31), label195, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label195), 0.1, 0.5);

  label196 = gtk_label_new (_("Segment Num, End 2"));
  gtk_widget_show (label196);
  gtk_table_attach (GTK_TABLE (table31), label196, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label196), 0.1, 0.5);

  txline_i3_spinbutton_adj = gtk_adjustment_new (2, 1, 10000, 1, 10, 0);
  txline_i3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (txline_i3_spinbutton_adj), 0.00999999977648, 0);
  gtk_widget_show (txline_i3_spinbutton);
  gtk_table_attach (GTK_TABLE (table31), txline_i3_spinbutton, 0, 1, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (txline_i3_spinbutton), TRUE);

  label193 = gtk_label_new (_("Tag Number, End 2  "));
  gtk_widget_show (label193);
  gtk_table_attach (GTK_TABLE (table31), label193, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label193), 0.1, 0.5);

  label197 = gtk_label_new (_("Segment Identity"));
  gtk_widget_show (label197);
  gtk_frame_set_label_widget (GTK_FRAME (frame43), label197);
  gtk_misc_set_padding (GTK_MISC (label197), 4, 4);

  frame44 = gtk_frame_new (NULL);
  gtk_widget_show (frame44);
  gtk_box_pack_start (GTK_BOX (vbox24), frame44, TRUE, TRUE, 0);

  alignment46 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment46);
  gtk_container_add (GTK_CONTAINER (frame44), alignment46);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment46), 0, 0, 12, 0);

  table32 = gtk_table_new (6, 2, FALSE);
  gtk_widget_show (table32);
  gtk_container_add (GTK_CONTAINER (alignment46), table32);

  label198 = gtk_label_new (_("Characteristic Impedance"));
  gtk_widget_show (label198);
  gtk_table_attach (GTK_TABLE (table32), label198, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label198), 0.1, 0.5);
  gtk_misc_set_padding (GTK_MISC (label198), 4, 0);

  label199 = gtk_label_new (_("Length of Tx Line (m)"));
  gtk_widget_show (label199);
  gtk_table_attach (GTK_TABLE (table32), label199, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label199), 0.1, 0.5);
  gtk_misc_set_padding (GTK_MISC (label199), 4, 0);

  label200 = gtk_label_new (_("End 1 Y Real Part (S)"));
  gtk_widget_show (label200);
  gtk_table_attach (GTK_TABLE (table32), label200, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label200), 0.1, 0.5);

  label201 = gtk_label_new (_("End 1 Y Imag Part (S)"));
  gtk_widget_show (label201);
  gtk_table_attach (GTK_TABLE (table32), label201, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label201), 0.1, 0.5);

  txline_f3_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
  txline_f3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (txline_f3_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (txline_f3_spinbutton);
  gtk_table_attach (GTK_TABLE (table32), txline_f3_spinbutton, 0, 1, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (txline_f3_spinbutton), TRUE);

  txline_f4_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
  txline_f4_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (txline_f4_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (txline_f4_spinbutton);
  gtk_table_attach (GTK_TABLE (table32), txline_f4_spinbutton, 1, 2, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (txline_f4_spinbutton), TRUE);

  label202 = gtk_label_new (_("End 2 Y Real Part (S)"));
  gtk_widget_show (label202);
  gtk_table_attach (GTK_TABLE (table32), label202, 0, 1, 4, 5,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label202), 0.1, 0.5);

  label203 = gtk_label_new (_("End 2 Y Imag Part (S)"));
  gtk_widget_show (label203);
  gtk_table_attach (GTK_TABLE (table32), label203, 1, 2, 4, 5,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label203), 0.1, 0.5);

  txline_f1_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
  txline_f1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (txline_f1_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (txline_f1_spinbutton);
  gtk_table_attach (GTK_TABLE (table32), txline_f1_spinbutton, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (txline_f1_spinbutton), TRUE);

  txline_f2_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
  txline_f2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (txline_f2_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (txline_f2_spinbutton);
  gtk_table_attach (GTK_TABLE (table32), txline_f2_spinbutton, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (txline_f2_spinbutton), TRUE);

  txline_f6_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
  txline_f6_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (txline_f6_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (txline_f6_spinbutton);
  gtk_table_attach (GTK_TABLE (table32), txline_f6_spinbutton, 1, 2, 5, 6,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (txline_f6_spinbutton), TRUE);

  txline_f5_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
  txline_f5_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (txline_f5_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (txline_f5_spinbutton);
  gtk_table_attach (GTK_TABLE (table32), txline_f5_spinbutton, 0, 1, 5, 6,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (txline_f5_spinbutton), TRUE);

  txline_crossed_checkbutton = gtk_check_button_new_with_mnemonic (_("Crossed Transmission Line"));
  gtk_widget_show (txline_crossed_checkbutton);
  gtk_frame_set_label_widget (GTK_FRAME (frame44), txline_crossed_checkbutton);
  gtk_container_set_border_width (GTK_CONTAINER (txline_crossed_checkbutton), 4);

  hbox44 = gtk_hbox_new (TRUE, 0);
  gtk_widget_show (hbox44);
  gtk_box_pack_start (GTK_BOX (vbox24), hbox44, TRUE, TRUE, 0);

  txline_new_button = gtk_button_new_from_stock ("gtk-new");
  gtk_widget_show (txline_new_button);
  gtk_box_pack_start (GTK_BOX (hbox44), txline_new_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (txline_new_button), 2);

  txline_cancel_button = gtk_button_new ();
  gtk_widget_show (txline_cancel_button);
  gtk_box_pack_start (GTK_BOX (hbox44), txline_cancel_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (txline_cancel_button), 2);

  alignment68 = gtk_alignment_new (0.5, 0.5, 0, 0);
  gtk_widget_show (alignment68);
  gtk_container_add (GTK_CONTAINER (txline_cancel_button), alignment68);

  hbox66 = gtk_hbox_new (FALSE, 2);
  gtk_widget_show (hbox66);
  gtk_container_add (GTK_CONTAINER (alignment68), hbox66);

  image88 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image88);
  gtk_box_pack_start (GTK_BOX (hbox66), image88, FALSE, FALSE, 0);

  label240 = gtk_label_new_with_mnemonic ("Delete Card");
  gtk_widget_show (label240);
  gtk_box_pack_start (GTK_BOX (hbox66), label240, FALSE, FALSE, 0);

  txline_apply_button = gtk_button_new_from_stock ("gtk-apply");
  gtk_widget_show (txline_apply_button);
  gtk_box_pack_start (GTK_BOX (hbox44), txline_apply_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (txline_apply_button), 2);

  txline_ok_button = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (txline_ok_button);
  gtk_box_pack_start (GTK_BOX (hbox44), txline_ok_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (txline_ok_button), 2);

  g_signal_connect ((gpointer) txline_command, "destroy",
                    G_CALLBACK (on_txline_command_destroy),
                    NULL);
  g_signal_connect ((gpointer) txline_i4_spinbutton, "value_changed",
                    G_CALLBACK (on_txline_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) txline_i1_spinbutton, "value_changed",
                    G_CALLBACK (on_txline_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) txline_i2_spinbutton, "value_changed",
                    G_CALLBACK (on_txline_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) txline_i3_spinbutton, "value_changed",
                    G_CALLBACK (on_txline_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) txline_f3_spinbutton, "value_changed",
                    G_CALLBACK (on_txline_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) txline_f4_spinbutton, "value_changed",
                    G_CALLBACK (on_txline_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) txline_f1_spinbutton, "value_changed",
                    G_CALLBACK (on_txline_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) txline_f2_spinbutton, "value_changed",
                    G_CALLBACK (on_txline_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) txline_f6_spinbutton, "value_changed",
                    G_CALLBACK (on_txline_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) txline_f5_spinbutton, "value_changed",
                    G_CALLBACK (on_txline_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) txline_crossed_checkbutton, "toggled",
                    G_CALLBACK (on_txline_checkbutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) txline_new_button, "clicked",
                    G_CALLBACK (on_txline_new_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) txline_cancel_button, "clicked",
                    G_CALLBACK (on_txline_cancel_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) txline_apply_button, "clicked",
                    G_CALLBACK (on_txline_apply_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) txline_ok_button, "clicked",
                    G_CALLBACK (on_txline_ok_button_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (txline_command, txline_command, "txline_command");
  GLADE_HOOKUP_OBJECT (txline_command, vbox24, "vbox24");
  GLADE_HOOKUP_OBJECT (txline_command, frame43, "frame43");
  GLADE_HOOKUP_OBJECT (txline_command, alignment45, "alignment45");
  GLADE_HOOKUP_OBJECT (txline_command, table31, "table31");
  GLADE_HOOKUP_OBJECT (txline_command, txline_i4_spinbutton, "txline_i4_spinbutton");
  GLADE_HOOKUP_OBJECT (txline_command, txline_i1_spinbutton, "txline_i1_spinbutton");
  GLADE_HOOKUP_OBJECT (txline_command, txline_i2_spinbutton, "txline_i2_spinbutton");
  GLADE_HOOKUP_OBJECT (txline_command, label194, "label194");
  GLADE_HOOKUP_OBJECT (txline_command, label195, "label195");
  GLADE_HOOKUP_OBJECT (txline_command, label196, "label196");
  GLADE_HOOKUP_OBJECT (txline_command, txline_i3_spinbutton, "txline_i3_spinbutton");
  GLADE_HOOKUP_OBJECT (txline_command, label193, "label193");
  GLADE_HOOKUP_OBJECT (txline_command, label197, "label197");
  GLADE_HOOKUP_OBJECT (txline_command, frame44, "frame44");
  GLADE_HOOKUP_OBJECT (txline_command, alignment46, "alignment46");
  GLADE_HOOKUP_OBJECT (txline_command, table32, "table32");
  GLADE_HOOKUP_OBJECT (txline_command, label198, "label198");
  GLADE_HOOKUP_OBJECT (txline_command, label199, "label199");
  GLADE_HOOKUP_OBJECT (txline_command, label200, "label200");
  GLADE_HOOKUP_OBJECT (txline_command, label201, "label201");
  GLADE_HOOKUP_OBJECT (txline_command, txline_f3_spinbutton, "txline_f3_spinbutton");
  GLADE_HOOKUP_OBJECT (txline_command, txline_f4_spinbutton, "txline_f4_spinbutton");
  GLADE_HOOKUP_OBJECT (txline_command, label202, "label202");
  GLADE_HOOKUP_OBJECT (txline_command, label203, "label203");
  GLADE_HOOKUP_OBJECT (txline_command, txline_f1_spinbutton, "txline_f1_spinbutton");
  GLADE_HOOKUP_OBJECT (txline_command, txline_f2_spinbutton, "txline_f2_spinbutton");
  GLADE_HOOKUP_OBJECT (txline_command, txline_f6_spinbutton, "txline_f6_spinbutton");
  GLADE_HOOKUP_OBJECT (txline_command, txline_f5_spinbutton, "txline_f5_spinbutton");
  GLADE_HOOKUP_OBJECT (txline_command, txline_crossed_checkbutton, "txline_crossed_checkbutton");
  GLADE_HOOKUP_OBJECT (txline_command, hbox44, "hbox44");
  GLADE_HOOKUP_OBJECT (txline_command, txline_new_button, "txline_new_button");
  GLADE_HOOKUP_OBJECT (txline_command, txline_cancel_button, "txline_cancel_button");
  GLADE_HOOKUP_OBJECT (txline_command, alignment68, "alignment68");
  GLADE_HOOKUP_OBJECT (txline_command, hbox66, "hbox66");
  GLADE_HOOKUP_OBJECT (txline_command, image88, "image88");
  GLADE_HOOKUP_OBJECT (txline_command, label240, "label240");
  GLADE_HOOKUP_OBJECT (txline_command, txline_apply_button, "txline_apply_button");
  GLADE_HOOKUP_OBJECT (txline_command, txline_ok_button, "txline_ok_button");

  return txline_command;
}

GtkWidget*
create_ground2_command (void)
{
  GtkWidget *ground2_command;
  GtkWidget *vbox25;
  GtkWidget *frame45;
  GtkWidget *alignment47;
  GtkWidget *table33;
  GtkWidget *label204;
  GtkWidget *label205;
  GtkWidget *label206;
  GtkWidget *label207;
  GtkObject *ground2_diel_spinbutton_adj;
  GtkWidget *ground2_diel_spinbutton;
  GtkObject *ground2_res_spinbutton_adj;
  GtkWidget *ground2_res_spinbutton;
  GtkObject *ground2_below_spinbutton_adj;
  GtkWidget *ground2_below_spinbutton;
  GtkObject *ground2_dist_spinbutton_adj;
  GtkWidget *ground2_dist_spinbutton;
  GtkWidget *label208;
  GtkWidget *hbox45;
  GtkWidget *ground2_new_button;
  GtkWidget *ground2_cancel_button;
  GtkWidget *alignment69;
  GtkWidget *hbox67;
  GtkWidget *image89;
  GtkWidget *label241;
  GtkWidget *ground2_apply_button;
  GtkWidget *ground2_ok_button;

  ground2_command = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_container_set_border_width (GTK_CONTAINER (ground2_command), 4);
  gtk_window_set_title (GTK_WINDOW (ground2_command), _("Ground Parameters (GD Card)"));

  vbox25 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox25);
  gtk_container_add (GTK_CONTAINER (ground2_command), vbox25);

  frame45 = gtk_frame_new (NULL);
  gtk_widget_show (frame45);
  gtk_box_pack_start (GTK_BOX (vbox25), frame45, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frame45), 4);

  alignment47 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment47);
  gtk_container_add (GTK_CONTAINER (frame45), alignment47);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment47), 0, 0, 12, 0);

  table33 = gtk_table_new (4, 2, FALSE);
  gtk_widget_show (table33);
  gtk_container_add (GTK_CONTAINER (alignment47), table33);
  gtk_table_set_row_spacings (GTK_TABLE (table33), 2);
  gtk_table_set_col_spacings (GTK_TABLE (table33), 2);

  label204 = gtk_label_new (_("Relative Dielectric Const."));
  gtk_widget_show (label204);
  gtk_table_attach (GTK_TABLE (table33), label204, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label204), 0, 0.5);

  label205 = gtk_label_new (_("Ground Conductivity S/m"));
  gtk_widget_show (label205);
  gtk_table_attach (GTK_TABLE (table33), label205, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label205), 0, 0.5);

  label206 = gtk_label_new (_("Distance to 2nd Medium"));
  gtk_widget_show (label206);
  gtk_table_attach (GTK_TABLE (table33), label206, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label206), 0, 0.5);

  label207 = gtk_label_new (_("Dist. below 1st Medium"));
  gtk_widget_show (label207);
  gtk_table_attach (GTK_TABLE (table33), label207, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label207), 0, 0.5);

  ground2_diel_spinbutton_adj = gtk_adjustment_new (12, 0, 10000, 9.99999974738e-06, 10, 0);
  ground2_diel_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground2_diel_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (ground2_diel_spinbutton);
  gtk_table_attach (GTK_TABLE (table33), ground2_diel_spinbutton, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground2_diel_spinbutton), TRUE);

  ground2_res_spinbutton_adj = gtk_adjustment_new (0.005, 0, 10000, 9.99999974738e-06, 10, 0);
  ground2_res_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground2_res_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (ground2_res_spinbutton);
  gtk_table_attach (GTK_TABLE (table33), ground2_res_spinbutton, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground2_res_spinbutton), TRUE);

  ground2_below_spinbutton_adj = gtk_adjustment_new (1, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
  ground2_below_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground2_below_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (ground2_below_spinbutton);
  gtk_table_attach (GTK_TABLE (table33), ground2_below_spinbutton, 1, 2, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground2_below_spinbutton), TRUE);

  ground2_dist_spinbutton_adj = gtk_adjustment_new (1, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
  ground2_dist_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground2_dist_spinbutton_adj), 0.00999999977648, 5);
  gtk_widget_show (ground2_dist_spinbutton);
  gtk_table_attach (GTK_TABLE (table33), ground2_dist_spinbutton, 0, 1, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 2, 4);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground2_dist_spinbutton), TRUE);

  label208 = gtk_label_new (_("2nd Medium Parameters"));
  gtk_widget_show (label208);
  gtk_frame_set_label_widget (GTK_FRAME (frame45), label208);
  gtk_misc_set_padding (GTK_MISC (label208), 4, 4);

  hbox45 = gtk_hbox_new (TRUE, 0);
  gtk_widget_show (hbox45);
  gtk_box_pack_start (GTK_BOX (vbox25), hbox45, TRUE, TRUE, 0);

  ground2_new_button = gtk_button_new_from_stock ("gtk-new");
  gtk_widget_show (ground2_new_button);
  gtk_box_pack_start (GTK_BOX (hbox45), ground2_new_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (ground2_new_button), 2);

  ground2_cancel_button = gtk_button_new ();
  gtk_widget_show (ground2_cancel_button);
  gtk_box_pack_start (GTK_BOX (hbox45), ground2_cancel_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (ground2_cancel_button), 2);

  alignment69 = gtk_alignment_new (0.5, 0.5, 0, 0);
  gtk_widget_show (alignment69);
  gtk_container_add (GTK_CONTAINER (ground2_cancel_button), alignment69);

  hbox67 = gtk_hbox_new (FALSE, 2);
  gtk_widget_show (hbox67);
  gtk_container_add (GTK_CONTAINER (alignment69), hbox67);

  image89 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image89);
  gtk_box_pack_start (GTK_BOX (hbox67), image89, FALSE, FALSE, 0);

  label241 = gtk_label_new_with_mnemonic ("Delete Card");
  gtk_widget_show (label241);
  gtk_box_pack_start (GTK_BOX (hbox67), label241, FALSE, FALSE, 0);

  ground2_apply_button = gtk_button_new_from_stock ("gtk-apply");
  gtk_widget_show (ground2_apply_button);
  gtk_box_pack_start (GTK_BOX (hbox45), ground2_apply_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (ground2_apply_button), 2);

  ground2_ok_button = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (ground2_ok_button);
  gtk_box_pack_start (GTK_BOX (hbox45), ground2_ok_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (ground2_ok_button), 2);

  g_signal_connect ((gpointer) ground2_command, "destroy",
                    G_CALLBACK (on_ground2_command_destroy),
                    NULL);
  g_signal_connect ((gpointer) ground2_diel_spinbutton, "value_changed",
                    G_CALLBACK (on_ground2_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) ground2_res_spinbutton, "value_changed",
                    G_CALLBACK (on_ground2_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) ground2_below_spinbutton, "value_changed",
                    G_CALLBACK (on_ground2_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) ground2_dist_spinbutton, "value_changed",
                    G_CALLBACK (on_ground2_spinbutton_value_changed),
                    NULL);
  g_signal_connect ((gpointer) ground2_new_button, "clicked",
                    G_CALLBACK (on_ground2_new_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) ground2_cancel_button, "clicked",
                    G_CALLBACK (on_ground2_cancel_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) ground2_apply_button, "clicked",
                    G_CALLBACK (on_ground2_apply_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) ground2_ok_button, "clicked",
                    G_CALLBACK (on_ground2_ok_button_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (ground2_command, ground2_command, "ground2_command");
  GLADE_HOOKUP_OBJECT (ground2_command, vbox25, "vbox25");
  GLADE_HOOKUP_OBJECT (ground2_command, frame45, "frame45");
  GLADE_HOOKUP_OBJECT (ground2_command, alignment47, "alignment47");
  GLADE_HOOKUP_OBJECT (ground2_command, table33, "table33");
  GLADE_HOOKUP_OBJECT (ground2_command, label204, "label204");
  GLADE_HOOKUP_OBJECT (ground2_command, label205, "label205");
  GLADE_HOOKUP_OBJECT (ground2_command, label206, "label206");
  GLADE_HOOKUP_OBJECT (ground2_command, label207, "label207");
  GLADE_HOOKUP_OBJECT (ground2_command, ground2_diel_spinbutton, "ground2_diel_spinbutton");
  GLADE_HOOKUP_OBJECT (ground2_command, ground2_res_spinbutton, "ground2_res_spinbutton");
  GLADE_HOOKUP_OBJECT (ground2_command, ground2_below_spinbutton, "ground2_below_spinbutton");
  GLADE_HOOKUP_OBJECT (ground2_command, ground2_dist_spinbutton, "ground2_dist_spinbutton");
  GLADE_HOOKUP_OBJECT (ground2_command, label208, "label208");
  GLADE_HOOKUP_OBJECT (ground2_command, hbox45, "hbox45");
  GLADE_HOOKUP_OBJECT (ground2_command, ground2_new_button, "ground2_new_button");
  GLADE_HOOKUP_OBJECT (ground2_command, ground2_cancel_button, "ground2_cancel_button");
  GLADE_HOOKUP_OBJECT (ground2_command, alignment69, "alignment69");
  GLADE_HOOKUP_OBJECT (ground2_command, hbox67, "hbox67");
  GLADE_HOOKUP_OBJECT (ground2_command, image89, "image89");
  GLADE_HOOKUP_OBJECT (ground2_command, label241, "label241");
  GLADE_HOOKUP_OBJECT (ground2_command, ground2_apply_button, "ground2_apply_button");
  GLADE_HOOKUP_OBJECT (ground2_command, ground2_ok_button, "ground2_ok_button");

  return ground2_command;
}

GtkWidget*
create_gend_editor (void)
{
  GtkWidget *gend_editor;
  GtkWidget *vbox26;
  GtkWidget *frame46;
  GtkWidget *alignment48;
  GtkWidget *vbox27;
  GtkWidget *gend_nognd_radiobutton;
  GSList *gend_nognd_radiobutton_group = NULL;
  GtkWidget *gend_img_radiobutton;
  GtkWidget *gend_noimg_radiobutton;
  GtkWidget *label211;
  GtkWidget *hbox46;
  GtkWidget *gend_cancel_button;
  GtkWidget *alignment70;
  GtkWidget *hbox68;
  GtkWidget *image90;
  GtkWidget *label242;
  GtkWidget *gend_apply_button;
  GtkWidget *gend_ok_button;

  gend_editor = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_container_set_border_width (GTK_CONTAINER (gend_editor), 4);
  gtk_window_set_title (GTK_WINDOW (gend_editor), _("Geometry End (GE Card)"));

  vbox26 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox26);
  gtk_container_add (GTK_CONTAINER (gend_editor), vbox26);

  frame46 = gtk_frame_new (NULL);
  gtk_widget_show (frame46);
  gtk_box_pack_start (GTK_BOX (vbox26), frame46, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frame46), 4);

  alignment48 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment48);
  gtk_container_add (GTK_CONTAINER (frame46), alignment48);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment48), 0, 0, 12, 0);

  vbox27 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox27);
  gtk_container_add (GTK_CONTAINER (alignment48), vbox27);

  gend_nognd_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("No Ground, Free Space condition"));
  gtk_widget_show (gend_nognd_radiobutton);
  gtk_box_pack_start (GTK_BOX (vbox27), gend_nognd_radiobutton, TRUE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (gend_nognd_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (gend_nognd_radiobutton), gend_nognd_radiobutton_group);
  gend_nognd_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (gend_nognd_radiobutton));
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gend_nognd_radiobutton), TRUE);

  gend_img_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Ground present, Strucure reflection"));
  gtk_widget_show (gend_img_radiobutton);
  gtk_box_pack_start (GTK_BOX (vbox27), gend_img_radiobutton, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (gend_img_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (gend_img_radiobutton), gend_nognd_radiobutton_group);
  gend_nognd_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (gend_img_radiobutton));

  gend_noimg_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Ground present, no Structure reflection"));
  gtk_widget_show (gend_noimg_radiobutton);
  gtk_box_pack_start (GTK_BOX (vbox27), gend_noimg_radiobutton, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (gend_noimg_radiobutton), 2);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (gend_noimg_radiobutton), gend_nognd_radiobutton_group);
  gend_nognd_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (gend_noimg_radiobutton));

  label211 = gtk_label_new (_("Ground Plane type"));
  gtk_widget_show (label211);
  gtk_frame_set_label_widget (GTK_FRAME (frame46), label211);
  gtk_misc_set_padding (GTK_MISC (label211), 4, 4);

  hbox46 = gtk_hbox_new (TRUE, 0);
  gtk_widget_show (hbox46);
  gtk_box_pack_start (GTK_BOX (vbox26), hbox46, FALSE, FALSE, 0);

  gend_cancel_button = gtk_button_new ();
  gtk_widget_show (gend_cancel_button);
  gtk_box_pack_start (GTK_BOX (hbox46), gend_cancel_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (gend_cancel_button), 2);

  alignment70 = gtk_alignment_new (0.5, 0.5, 0, 0);
  gtk_widget_show (alignment70);
  gtk_container_add (GTK_CONTAINER (gend_cancel_button), alignment70);

  hbox68 = gtk_hbox_new (FALSE, 2);
  gtk_widget_show (hbox68);
  gtk_container_add (GTK_CONTAINER (alignment70), hbox68);

  image90 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image90);
  gtk_box_pack_start (GTK_BOX (hbox68), image90, FALSE, FALSE, 0);

  label242 = gtk_label_new_with_mnemonic ("Delete Card");
  gtk_widget_show (label242);
  gtk_box_pack_start (GTK_BOX (hbox68), label242, FALSE, FALSE, 0);

  gend_apply_button = gtk_button_new_from_stock ("gtk-apply");
  gtk_widget_show (gend_apply_button);
  gtk_box_pack_start (GTK_BOX (hbox46), gend_apply_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (gend_apply_button), 2);

  gend_ok_button = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (gend_ok_button);
  gtk_box_pack_start (GTK_BOX (hbox46), gend_ok_button, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (gend_ok_button), 2);

  g_signal_connect ((gpointer) gend_editor, "destroy",
                    G_CALLBACK (on_gend_editor_destroy),
                    NULL);
  g_signal_connect ((gpointer) gend_nognd_radiobutton, "toggled",
                    G_CALLBACK (on_gend_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) gend_img_radiobutton, "toggled",
                    G_CALLBACK (on_gend_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) gend_noimg_radiobutton, "toggled",
                    G_CALLBACK (on_gend_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) gend_cancel_button, "clicked",
                    G_CALLBACK (on_gend_cancel_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) gend_apply_button, "clicked",
                    G_CALLBACK (on_gend_apply_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) gend_ok_button, "clicked",
                    G_CALLBACK (on_gend_ok_button_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (gend_editor, gend_editor, "gend_editor");
  GLADE_HOOKUP_OBJECT (gend_editor, vbox26, "vbox26");
  GLADE_HOOKUP_OBJECT (gend_editor, frame46, "frame46");
  GLADE_HOOKUP_OBJECT (gend_editor, alignment48, "alignment48");
  GLADE_HOOKUP_OBJECT (gend_editor, vbox27, "vbox27");
  GLADE_HOOKUP_OBJECT (gend_editor, gend_nognd_radiobutton, "gend_nognd_radiobutton");
  GLADE_HOOKUP_OBJECT (gend_editor, gend_img_radiobutton, "gend_img_radiobutton");
  GLADE_HOOKUP_OBJECT (gend_editor, gend_noimg_radiobutton, "gend_noimg_radiobutton");
  GLADE_HOOKUP_OBJECT (gend_editor, label211, "label211");
  GLADE_HOOKUP_OBJECT (gend_editor, hbox46, "hbox46");
  GLADE_HOOKUP_OBJECT (gend_editor, gend_cancel_button, "gend_cancel_button");
  GLADE_HOOKUP_OBJECT (gend_editor, alignment70, "alignment70");
  GLADE_HOOKUP_OBJECT (gend_editor, hbox68, "hbox68");
  GLADE_HOOKUP_OBJECT (gend_editor, image90, "image90");
  GLADE_HOOKUP_OBJECT (gend_editor, label242, "label242");
  GLADE_HOOKUP_OBJECT (gend_editor, gend_apply_button, "gend_apply_button");
  GLADE_HOOKUP_OBJECT (gend_editor, gend_ok_button, "gend_ok_button");

  return gend_editor;
}

GtkWidget*
create_aboutdialog (void)
{
  GtkWidget *aboutdialog;
  const gchar *authors[] = {
    "Neoklis Kyriazis",
    "Ham Radio Call: 5B4AZ",
    "http://5b4az.chronos.org.uk/",
    NULL
  };
  const gchar *documenters[] = {
    "Neoklis Kyriazis",
    NULL
  };
  /* TRANSLATORS: Replace this string with your names, one name per line. */
  gchar *translators = _("translator-credits");

  aboutdialog = gtk_about_dialog_new ();
  gtk_container_set_border_width (GTK_CONTAINER (aboutdialog), 5);
  gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (aboutdialog), VERSION);
  gtk_about_dialog_set_name (GTK_ABOUT_DIALOG (aboutdialog), _("Xnec2c"));
  gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG (aboutdialog), _("(C) 2007-2010 Neoklis Kyriazis"));
  gtk_about_dialog_set_comments (GTK_ABOUT_DIALOG (aboutdialog), _("xnec2c is an interactive graphical wrapper around a modified version of nec2c, which is itself a translation to C of the original FORTRAN NEC2 Numerical Electromagnetics Code.\n\nxnec2c can display frequency-dependent data (gain, input impedance, vswr etc) in a graphical format. It can also display radiation pattern data in a rotatable wire frame format and near-field (E, H, S vectors) in a grid format.\n\nxnec2c has a built-in NEC2 input file editor that makes it easier to create or edit antenna description files and specify NEC2 commands.\n\nPLEASE read the documantation in the doc/ sub-directory as xnec2c is not fully compatible with NEC2 input files and it works in different ways!"));
  gtk_about_dialog_set_license (GTK_ABOUT_DIALOG (aboutdialog), _("GPL v2 or higher"));
  gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (aboutdialog), "http://5b4az.chronos.org.uk/");
  gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (aboutdialog), authors);
  gtk_about_dialog_set_documenters (GTK_ABOUT_DIALOG (aboutdialog), documenters);
  gtk_about_dialog_set_translator_credits (GTK_ABOUT_DIALOG (aboutdialog), translators);

  g_signal_connect ((gpointer) aboutdialog, "close",
                    G_CALLBACK (on_aboutdialog_close),
                    NULL);
  g_signal_connect ((gpointer) aboutdialog, "response",
                    G_CALLBACK (on_aboutdialog_response),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (aboutdialog, aboutdialog, "aboutdialog");

  return aboutdialog;
}

