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

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

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

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

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

GtkWidget*
create_mainwindow (void)
{
  GtkWidget *mainwindow;
  GtkWidget *fixed;
  GtkWidget *tx_latitude;
  GtkWidget *tx_azimuth;
  GtkWidget *tx_range;
  GtkWidget *tx_longitude;
  GtkWidget *tx_elevation;
  GtkWidget *tx_footprint;
  GtkWidget *tx_date;
  GtkWidget *tx_aos;
  GtkWidget *tx_uplink;
  GtkWidget *tx_updoppler;
  GtkWidget *tx_downlink;
  GtkWidget *tx_dwdoppler;
  GtkWidget *tx_upshift;
  GtkWidget *tx_downshift;
  GtkWidget *tx_altitude;
  GtkWidget *tx_velocity;
  GtkWidget *tx_orbit;
  GtkWidget *statusbar;
  GtkWidget *satbar;
  GtkWidget *lb_downlink;
  GtkWidget *combo;
  GtkWidget *combo_entry1;
  GtkWidget *drawingframe;
  GtkWidget *maparea;
  GtkWidget *toolbar;
  GtkWidget *cb_connect;
  GtkWidget *cb_disconnect;
  GtkWidget *vseparator1;
  GtkWidget *tb_grid;
  GtkWidget *tb_utctime;
  GtkWidget *vseparator2;
  GtkWidget *tb_footpsat;
  GtkWidget *tb_footpqth;
  GtkWidget *tb_track;
  GtkWidget *vseparator3;
  GtkWidget *bt_preferences;
  GtkWidget *lb_aos;
  GtkWidget *lb_date;
  GtkWidget *lb_orbit;
  GtkWidget *lb_satellite;
  GtkWidget *lb_latitude;
  GtkWidget *lb_azimuth;
  GtkWidget *lb_range;
  GtkWidget *lb_altitude;
  GtkWidget *lb_velocity;
  GtkWidget *lb_footprint;
  GtkWidget *lb_elevation;
  GtkWidget *lb_longitude;
  GtkWidget *lb_uplink;
  GtkWidget *lb_dwdpshift;
  GtkWidget *lb_updpshift;
  GtkWidget *lb_updoppler;
  GtkWidget *lb_dwdoppler;
  GtkWidget *cb_dwdoppler;
  GtkWidget *cb_updoppler;

  mainwindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_widget_set_name (mainwindow, "mainwindow");
  gtk_object_set_data (GTK_OBJECT (mainwindow), "mainwindow", mainwindow);
  gtk_widget_set_usize (mainwindow, 716, 576);
  gtk_container_set_border_width (GTK_CONTAINER (mainwindow), 4);
  gtk_window_set_title (GTK_WINDOW (mainwindow), _("gsat - Satellite Tracking"));
  gtk_window_set_position (GTK_WINDOW (mainwindow), GTK_WIN_POS_CENTER);
  gtk_window_set_default_size (GTK_WINDOW (mainwindow), 716, 600);
  gtk_window_set_policy (GTK_WINDOW (mainwindow), FALSE, FALSE, FALSE);

  fixed = gtk_fixed_new ();
  gtk_widget_set_name (fixed, "fixed");
  gtk_widget_ref (fixed);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "fixed", fixed,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (fixed);
  gtk_container_add (GTK_CONTAINER (mainwindow), fixed);
  gtk_widget_set_usize (fixed, 710, 540);

  tx_latitude = gtk_entry_new ();
  gtk_widget_set_name (tx_latitude, "tx_latitude");
  gtk_widget_ref (tx_latitude);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "tx_latitude", tx_latitude,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (tx_latitude);
  gtk_fixed_put (GTK_FIXED (fixed), tx_latitude, -1, -1);
  gtk_widget_set_uposition (tx_latitude, 96, 424);
  gtk_widget_set_usize (tx_latitude, 80, 0);
  GTK_WIDGET_UNSET_FLAGS (tx_latitude, GTK_CAN_FOCUS);
  gtk_entry_set_editable (GTK_ENTRY (tx_latitude), FALSE);

  tx_azimuth = gtk_entry_new ();
  gtk_widget_set_name (tx_azimuth, "tx_azimuth");
  gtk_widget_ref (tx_azimuth);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "tx_azimuth", tx_azimuth,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (tx_azimuth);
  gtk_fixed_put (GTK_FIXED (fixed), tx_azimuth, -1, -1);
  gtk_widget_set_uposition (tx_azimuth, 264, 424);
  gtk_widget_set_usize (tx_azimuth, 80, 0);
  GTK_WIDGET_UNSET_FLAGS (tx_azimuth, GTK_CAN_FOCUS);
  gtk_entry_set_editable (GTK_ENTRY (tx_azimuth), FALSE);

  tx_range = gtk_entry_new ();
  gtk_widget_set_name (tx_range, "tx_range");
  gtk_widget_ref (tx_range);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "tx_range", tx_range,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (tx_range);
  gtk_fixed_put (GTK_FIXED (fixed), tx_range, -1, -1);
  gtk_widget_set_uposition (tx_range, 432, 424);
  gtk_widget_set_usize (tx_range, 80, 0);
  GTK_WIDGET_UNSET_FLAGS (tx_range, GTK_CAN_FOCUS);
  gtk_entry_set_editable (GTK_ENTRY (tx_range), FALSE);

  tx_longitude = gtk_entry_new ();
  gtk_widget_set_name (tx_longitude, "tx_longitude");
  gtk_widget_ref (tx_longitude);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "tx_longitude", tx_longitude,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (tx_longitude);
  gtk_fixed_put (GTK_FIXED (fixed), tx_longitude, -1, -1);
  gtk_widget_set_uposition (tx_longitude, 96, 456);
  gtk_widget_set_usize (tx_longitude, 80, 0);
  GTK_WIDGET_UNSET_FLAGS (tx_longitude, GTK_CAN_FOCUS);
  gtk_entry_set_editable (GTK_ENTRY (tx_longitude), FALSE);

  tx_elevation = gtk_entry_new ();
  gtk_widget_set_name (tx_elevation, "tx_elevation");
  gtk_widget_ref (tx_elevation);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "tx_elevation", tx_elevation,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (tx_elevation);
  gtk_fixed_put (GTK_FIXED (fixed), tx_elevation, -1, -1);
  gtk_widget_set_uposition (tx_elevation, 264, 456);
  gtk_widget_set_usize (tx_elevation, 80, 0);
  GTK_WIDGET_UNSET_FLAGS (tx_elevation, GTK_CAN_FOCUS);
  gtk_entry_set_editable (GTK_ENTRY (tx_elevation), FALSE);

  tx_footprint = gtk_entry_new ();
  gtk_widget_set_name (tx_footprint, "tx_footprint");
  gtk_widget_ref (tx_footprint);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "tx_footprint", tx_footprint,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (tx_footprint);
  gtk_fixed_put (GTK_FIXED (fixed), tx_footprint, -1, -1);
  gtk_widget_set_uposition (tx_footprint, 432, 456);
  gtk_widget_set_usize (tx_footprint, 80, 0);
  GTK_WIDGET_UNSET_FLAGS (tx_footprint, GTK_CAN_FOCUS);
  gtk_entry_set_editable (GTK_ENTRY (tx_footprint), FALSE);

  tx_date = gtk_entry_new ();
  gtk_widget_set_name (tx_date, "tx_date");
  gtk_widget_ref (tx_date);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "tx_date", tx_date,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (tx_date);
  gtk_fixed_put (GTK_FIXED (fixed), tx_date, -1, -1);
  gtk_widget_set_uposition (tx_date, 336, 392);
  gtk_widget_set_usize (tx_date, 136, 20);
  GTK_WIDGET_UNSET_FLAGS (tx_date, GTK_CAN_FOCUS);
  gtk_entry_set_editable (GTK_ENTRY (tx_date), FALSE);

  tx_aos = gtk_entry_new ();
  gtk_widget_set_name (tx_aos, "tx_aos");
  gtk_widget_ref (tx_aos);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "tx_aos", tx_aos,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (tx_aos);
  gtk_fixed_put (GTK_FIXED (fixed), tx_aos, -1, -1);
  gtk_widget_set_uposition (tx_aos, 544, 392);
  gtk_widget_set_usize (tx_aos, 136, 20);
  GTK_WIDGET_UNSET_FLAGS (tx_aos, GTK_CAN_FOCUS);
  gtk_entry_set_editable (GTK_ENTRY (tx_aos), FALSE);

  tx_uplink = gtk_entry_new ();
  gtk_widget_set_name (tx_uplink, "tx_uplink");
  gtk_widget_ref (tx_uplink);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "tx_uplink", tx_uplink,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (tx_uplink);
  gtk_fixed_put (GTK_FIXED (fixed), tx_uplink, -1, -1);
  gtk_widget_set_uposition (tx_uplink, 144, 488);
  gtk_widget_set_usize (tx_uplink, 80, 0);

  tx_updoppler = gtk_entry_new ();
  gtk_widget_set_name (tx_updoppler, "tx_updoppler");
  gtk_widget_ref (tx_updoppler);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "tx_updoppler", tx_updoppler,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (tx_updoppler);
  gtk_fixed_put (GTK_FIXED (fixed), tx_updoppler, -1, -1);
  gtk_widget_set_uposition (tx_updoppler, 520, 488);
  gtk_widget_set_usize (tx_updoppler, 80, 0);
  GTK_WIDGET_UNSET_FLAGS (tx_updoppler, GTK_CAN_FOCUS);
  gtk_entry_set_editable (GTK_ENTRY (tx_updoppler), FALSE);

  tx_downlink = gtk_entry_new ();
  gtk_widget_set_name (tx_downlink, "tx_downlink");
  gtk_widget_ref (tx_downlink);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "tx_downlink", tx_downlink,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (tx_downlink);
  gtk_fixed_put (GTK_FIXED (fixed), tx_downlink, -1, -1);
  gtk_widget_set_uposition (tx_downlink, 144, 520);
  gtk_widget_set_usize (tx_downlink, 80, 0);

  tx_dwdoppler = gtk_entry_new ();
  gtk_widget_set_name (tx_dwdoppler, "tx_dwdoppler");
  gtk_widget_ref (tx_dwdoppler);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "tx_dwdoppler", tx_dwdoppler,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (tx_dwdoppler);
  gtk_fixed_put (GTK_FIXED (fixed), tx_dwdoppler, -1, -1);
  gtk_widget_set_uposition (tx_dwdoppler, 520, 520);
  gtk_widget_set_usize (tx_dwdoppler, 80, 0);
  GTK_WIDGET_UNSET_FLAGS (tx_dwdoppler, GTK_CAN_FOCUS);
  gtk_entry_set_editable (GTK_ENTRY (tx_dwdoppler), FALSE);

  tx_upshift = gtk_entry_new ();
  gtk_widget_set_name (tx_upshift, "tx_upshift");
  gtk_widget_ref (tx_upshift);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "tx_upshift", tx_upshift,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (tx_upshift);
  gtk_fixed_put (GTK_FIXED (fixed), tx_upshift, -1, -1);
  gtk_widget_set_uposition (tx_upshift, 320, 488);
  gtk_widget_set_usize (tx_upshift, 80, 0);
  GTK_WIDGET_UNSET_FLAGS (tx_upshift, GTK_CAN_FOCUS);
  gtk_entry_set_editable (GTK_ENTRY (tx_upshift), FALSE);

  tx_downshift = gtk_entry_new ();
  gtk_widget_set_name (tx_downshift, "tx_downshift");
  gtk_widget_ref (tx_downshift);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "tx_downshift", tx_downshift,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (tx_downshift);
  gtk_fixed_put (GTK_FIXED (fixed), tx_downshift, -1, -1);
  gtk_widget_set_uposition (tx_downshift, 320, 520);
  gtk_widget_set_usize (tx_downshift, 80, 0);
  GTK_WIDGET_UNSET_FLAGS (tx_downshift, GTK_CAN_FOCUS);
  gtk_entry_set_editable (GTK_ENTRY (tx_downshift), FALSE);

  tx_altitude = gtk_entry_new ();
  gtk_widget_set_name (tx_altitude, "tx_altitude");
  gtk_widget_ref (tx_altitude);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "tx_altitude", tx_altitude,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (tx_altitude);
  gtk_fixed_put (GTK_FIXED (fixed), tx_altitude, -1, -1);
  gtk_widget_set_uposition (tx_altitude, 584, 424);
  gtk_widget_set_usize (tx_altitude, 80, 0);
  GTK_WIDGET_UNSET_FLAGS (tx_altitude, GTK_CAN_FOCUS);
  gtk_entry_set_editable (GTK_ENTRY (tx_altitude), FALSE);

  tx_velocity = gtk_entry_new ();
  gtk_widget_set_name (tx_velocity, "tx_velocity");
  gtk_widget_ref (tx_velocity);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "tx_velocity", tx_velocity,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (tx_velocity);
  gtk_fixed_put (GTK_FIXED (fixed), tx_velocity, -1, -1);
  gtk_widget_set_uposition (tx_velocity, 584, 456);
  gtk_widget_set_usize (tx_velocity, 80, 0);
  GTK_WIDGET_UNSET_FLAGS (tx_velocity, GTK_CAN_FOCUS);
  gtk_entry_set_editable (GTK_ENTRY (tx_velocity), FALSE);

  tx_orbit = gtk_entry_new ();
  gtk_widget_set_name (tx_orbit, "tx_orbit");
  gtk_widget_ref (tx_orbit);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "tx_orbit", tx_orbit,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (tx_orbit);
  gtk_fixed_put (GTK_FIXED (fixed), tx_orbit, -1, -1);
  gtk_widget_set_uposition (tx_orbit, 224, 392);
  gtk_widget_set_usize (tx_orbit, 56, 20);
  GTK_WIDGET_UNSET_FLAGS (tx_orbit, GTK_CAN_FOCUS);
  gtk_entry_set_editable (GTK_ENTRY (tx_orbit), FALSE);

  statusbar = gtk_statusbar_new ();
  gtk_widget_set_name (statusbar, "statusbar");
  gtk_widget_ref (statusbar);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "statusbar", statusbar,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (statusbar);
  gtk_fixed_put (GTK_FIXED (fixed), statusbar, -1, -1);
  gtk_widget_set_uposition (statusbar, 0, 544);
  gtk_widget_set_usize (statusbar, 350, 24);
  gtk_container_set_border_width (GTK_CONTAINER (statusbar), 2);

  satbar = gtk_statusbar_new ();
  gtk_widget_set_name (satbar, "satbar");
  gtk_widget_ref (satbar);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "satbar", satbar,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (satbar);
  gtk_fixed_put (GTK_FIXED (fixed), satbar, -1, -1);
  gtk_widget_set_uposition (satbar, 356, 544);
  gtk_widget_set_usize (satbar, 350, 24);
  gtk_container_set_border_width (GTK_CONTAINER (satbar), 2);

  lb_downlink = gtk_label_new (_("Downlink Frequency"));
  gtk_widget_set_name (lb_downlink, "lb_downlink");
  gtk_widget_ref (lb_downlink);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "lb_downlink", lb_downlink,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lb_downlink);
  gtk_fixed_put (GTK_FIXED (fixed), lb_downlink, -1, -1);
  gtk_widget_set_uposition (lb_downlink, 40, 523);
  gtk_widget_set_usize (lb_downlink, 0, 0);

  combo = gtk_combo_new ();
  gtk_widget_set_name (combo, "combo");
  gtk_widget_ref (combo);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "combo", combo,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (combo);
  gtk_fixed_put (GTK_FIXED (fixed), combo, -1, -1);
  gtk_widget_set_uposition (combo, 88, 392);
  gtk_widget_set_usize (combo, 80, 16);

  combo_entry1 = GTK_COMBO (combo)->entry;
  gtk_widget_set_name (combo_entry1, "combo_entry1");
  gtk_widget_ref (combo_entry1);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "combo_entry1", combo_entry1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (combo_entry1);
  GTK_WIDGET_SET_FLAGS (combo_entry1, GTK_CAN_DEFAULT);
  gtk_entry_set_editable (GTK_ENTRY (combo_entry1), FALSE);

  drawingframe = gtk_frame_new (NULL);
  gtk_widget_set_name (drawingframe, "drawingframe");
  gtk_widget_ref (drawingframe);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "drawingframe", drawingframe,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (drawingframe);
  gtk_fixed_put (GTK_FIXED (fixed), drawingframe, -1, -1);
  gtk_widget_set_uposition (drawingframe, 0, 24);
  gtk_widget_set_usize (drawingframe, 704, 354);
  gtk_container_set_border_width (GTK_CONTAINER (drawingframe), 2);
  gtk_frame_set_shadow_type (GTK_FRAME (drawingframe), GTK_SHADOW_ETCHED_OUT);

  maparea = gtk_drawing_area_new ();
  gtk_widget_set_name (maparea, "maparea");
  gtk_widget_ref (maparea);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "maparea", maparea,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (maparea);
  gtk_container_add (GTK_CONTAINER (drawingframe), maparea);
  gtk_widget_set_usize (maparea, 700, 350);
  gtk_widget_set_sensitive (maparea, FALSE);

  toolbar = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_TEXT);
  gtk_widget_set_name (toolbar, "toolbar");
  gtk_widget_ref (toolbar);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "toolbar", toolbar,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (toolbar);
  gtk_fixed_put (GTK_FIXED (fixed), toolbar, -1, -1);
  gtk_widget_set_uposition (toolbar, 0, 0);
  gtk_widget_set_usize (toolbar, 696, 24);
  gtk_container_set_border_width (GTK_CONTAINER (toolbar), 5);
  gtk_toolbar_set_space_size (GTK_TOOLBAR (toolbar), 10);
  gtk_toolbar_set_space_style (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_SPACE_LINE);
  gtk_toolbar_set_tooltips (GTK_TOOLBAR (toolbar), FALSE);

  cb_connect = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
                                GTK_TOOLBAR_CHILD_BUTTON,
                                NULL,
                                _("Connect"),
                                NULL, NULL,
                                NULL, NULL, NULL);
  gtk_widget_set_name (cb_connect, "cb_connect");
  gtk_widget_ref (cb_connect);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "cb_connect", cb_connect,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (cb_connect);

  cb_disconnect = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
                                GTK_TOOLBAR_CHILD_BUTTON,
                                NULL,
                                _("Disconnect"),
                                NULL, NULL,
                                NULL, NULL, NULL);
  gtk_widget_set_name (cb_disconnect, "cb_disconnect");
  gtk_widget_ref (cb_disconnect);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "cb_disconnect", cb_disconnect,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (cb_disconnect);

  vseparator1 = gtk_vseparator_new ();
  gtk_widget_set_name (vseparator1, "vseparator1");
  gtk_widget_ref (vseparator1);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "vseparator1", vseparator1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (vseparator1);
  gtk_toolbar_append_widget (GTK_TOOLBAR (toolbar), vseparator1, NULL, NULL);

  tb_grid = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
                                GTK_TOOLBAR_CHILD_TOGGLEBUTTON,
                                NULL,
                                _("Grid"),
                                NULL, NULL,
                                NULL, NULL, NULL);
  gtk_widget_set_name (tb_grid, "tb_grid");
  gtk_widget_ref (tb_grid);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "tb_grid", tb_grid,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (tb_grid);

  tb_utctime = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
                                GTK_TOOLBAR_CHILD_TOGGLEBUTTON,
                                NULL,
                                _("UTC Time"),
                                NULL, NULL,
                                NULL, NULL, NULL);
  gtk_widget_set_name (tb_utctime, "tb_utctime");
  gtk_widget_ref (tb_utctime);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "tb_utctime", tb_utctime,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (tb_utctime);

  vseparator2 = gtk_vseparator_new ();
  gtk_widget_set_name (vseparator2, "vseparator2");
  gtk_widget_ref (vseparator2);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "vseparator2", vseparator2,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (vseparator2);
  gtk_toolbar_append_widget (GTK_TOOLBAR (toolbar), vseparator2, NULL, NULL);

  tb_footpsat = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
                                GTK_TOOLBAR_CHILD_TOGGLEBUTTON,
                                NULL,
                                _("Satellite"),
                                NULL, NULL,
                                NULL, NULL, NULL);
  gtk_widget_set_name (tb_footpsat, "tb_footpsat");
  gtk_widget_ref (tb_footpsat);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "tb_footpsat", tb_footpsat,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (tb_footpsat);

  tb_footpqth = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
                                GTK_TOOLBAR_CHILD_TOGGLEBUTTON,
                                NULL,
                                _("QTH"),
                                NULL, NULL,
                                NULL, NULL, NULL);
  gtk_widget_set_name (tb_footpqth, "tb_footpqth");
  gtk_widget_ref (tb_footpqth);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "tb_footpqth", tb_footpqth,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (tb_footpqth);

  tb_track = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
                                GTK_TOOLBAR_CHILD_TOGGLEBUTTON,
                                NULL,
                                _("Track"),
                                NULL, NULL,
                                NULL, NULL, NULL);
  gtk_widget_set_name (tb_track, "tb_track");
  gtk_widget_ref (tb_track);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "tb_track", tb_track,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (tb_track);

  vseparator3 = gtk_vseparator_new ();
  gtk_widget_set_name (vseparator3, "vseparator3");
  gtk_widget_ref (vseparator3);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "vseparator3", vseparator3,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (vseparator3);
  gtk_toolbar_append_widget (GTK_TOOLBAR (toolbar), vseparator3, NULL, NULL);

  bt_preferences = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
                                GTK_TOOLBAR_CHILD_BUTTON,
                                NULL,
                                _("Prefs"),
                                NULL, NULL,
                                NULL, NULL, NULL);
  gtk_widget_set_name (bt_preferences, "bt_preferences");
  gtk_widget_ref (bt_preferences);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "bt_preferences", bt_preferences,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (bt_preferences);

  lb_aos = gtk_label_new (_("Next AOS"));
  gtk_widget_set_name (lb_aos, "lb_aos");
  gtk_widget_ref (lb_aos);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "lb_aos", lb_aos,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lb_aos);
  gtk_fixed_put (GTK_FIXED (fixed), lb_aos, -1, -1);
  gtk_widget_set_uposition (lb_aos, 488, 395);
  gtk_widget_set_usize (lb_aos, 0, 0);

  lb_date = gtk_label_new (_("Date"));
  gtk_widget_set_name (lb_date, "lb_date");
  gtk_widget_ref (lb_date);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "lb_date", lb_date,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lb_date);
  gtk_fixed_put (GTK_FIXED (fixed), lb_date, -1, -1);
  gtk_widget_set_uposition (lb_date, 304, 395);
  gtk_widget_set_usize (lb_date, 0, 0);

  lb_orbit = gtk_label_new (_("Orbit"));
  gtk_widget_set_name (lb_orbit, "lb_orbit");
  gtk_widget_ref (lb_orbit);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "lb_orbit", lb_orbit,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lb_orbit);
  gtk_fixed_put (GTK_FIXED (fixed), lb_orbit, -1, -1);
  gtk_widget_set_uposition (lb_orbit, 184, 393);
  gtk_widget_set_usize (lb_orbit, 26, 16);

  lb_satellite = gtk_label_new (_("Satellite"));
  gtk_widget_set_name (lb_satellite, "lb_satellite");
  gtk_widget_ref (lb_satellite);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "lb_satellite", lb_satellite,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lb_satellite);
  gtk_fixed_put (GTK_FIXED (fixed), lb_satellite, -1, -1);
  gtk_widget_set_uposition (lb_satellite, 40, 393);
  gtk_widget_set_usize (lb_satellite, 0, 0);

  lb_latitude = gtk_label_new (_("Latitude"));
  gtk_widget_set_name (lb_latitude, "lb_latitude");
  gtk_widget_ref (lb_latitude);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "lb_latitude", lb_latitude,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lb_latitude);
  gtk_fixed_put (GTK_FIXED (fixed), lb_latitude, -1, -1);
  gtk_widget_set_uposition (lb_latitude, 40, 427);
  gtk_widget_set_usize (lb_latitude, 0, 0);

  lb_azimuth = gtk_label_new (_("Azimuth"));
  gtk_widget_set_name (lb_azimuth, "lb_azimuth");
  gtk_widget_ref (lb_azimuth);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "lb_azimuth", lb_azimuth,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lb_azimuth);
  gtk_fixed_put (GTK_FIXED (fixed), lb_azimuth, -1, -1);
  gtk_widget_set_uposition (lb_azimuth, 208, 427);
  gtk_widget_set_usize (lb_azimuth, 0, 0);

  lb_range = gtk_label_new (_("Range"));
  gtk_widget_set_name (lb_range, "lb_range");
  gtk_widget_ref (lb_range);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "lb_range", lb_range,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lb_range);
  gtk_fixed_put (GTK_FIXED (fixed), lb_range, -1, -1);
  gtk_widget_set_uposition (lb_range, 376, 427);
  gtk_widget_set_usize (lb_range, 0, 0);

  lb_altitude = gtk_label_new (_("Altitude"));
  gtk_widget_set_name (lb_altitude, "lb_altitude");
  gtk_widget_ref (lb_altitude);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "lb_altitude", lb_altitude,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lb_altitude);
  gtk_fixed_put (GTK_FIXED (fixed), lb_altitude, -1, -1);
  gtk_widget_set_uposition (lb_altitude, 536, 427);
  gtk_widget_set_usize (lb_altitude, 0, 0);

  lb_velocity = gtk_label_new (_("Velocity"));
  gtk_widget_set_name (lb_velocity, "lb_velocity");
  gtk_widget_ref (lb_velocity);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "lb_velocity", lb_velocity,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lb_velocity);
  gtk_fixed_put (GTK_FIXED (fixed), lb_velocity, -1, -1);
  gtk_widget_set_uposition (lb_velocity, 536, 459);
  gtk_widget_set_usize (lb_velocity, 0, 0);

  lb_footprint = gtk_label_new (_("Footprint"));
  gtk_widget_set_name (lb_footprint, "lb_footprint");
  gtk_widget_ref (lb_footprint);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "lb_footprint", lb_footprint,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lb_footprint);
  gtk_fixed_put (GTK_FIXED (fixed), lb_footprint, -1, -1);
  gtk_widget_set_uposition (lb_footprint, 376, 459);
  gtk_widget_set_usize (lb_footprint, 0, 0);

  lb_elevation = gtk_label_new (_("Elevation"));
  gtk_widget_set_name (lb_elevation, "lb_elevation");
  gtk_widget_ref (lb_elevation);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "lb_elevation", lb_elevation,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lb_elevation);
  gtk_fixed_put (GTK_FIXED (fixed), lb_elevation, -1, -1);
  gtk_widget_set_uposition (lb_elevation, 208, 459);
  gtk_widget_set_usize (lb_elevation, 0, 0);

  lb_longitude = gtk_label_new (_("Longitude"));
  gtk_widget_set_name (lb_longitude, "lb_longitude");
  gtk_widget_ref (lb_longitude);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "lb_longitude", lb_longitude,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lb_longitude);
  gtk_fixed_put (GTK_FIXED (fixed), lb_longitude, -1, -1);
  gtk_widget_set_uposition (lb_longitude, 40, 458);
  gtk_widget_set_usize (lb_longitude, 0, 0);

  lb_uplink = gtk_label_new (_("Uplink Frequency"));
  gtk_widget_set_name (lb_uplink, "lb_uplink");
  gtk_widget_ref (lb_uplink);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "lb_uplink", lb_uplink,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lb_uplink);
  gtk_fixed_put (GTK_FIXED (fixed), lb_uplink, -1, -1);
  gtk_widget_set_uposition (lb_uplink, 40, 490);
  gtk_widget_set_usize (lb_uplink, 0, 0);

  lb_dwdpshift = gtk_label_new (_("Doppler Shift"));
  gtk_widget_set_name (lb_dwdpshift, "lb_dwdpshift");
  gtk_widget_ref (lb_dwdpshift);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "lb_dwdpshift", lb_dwdpshift,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lb_dwdpshift);
  gtk_fixed_put (GTK_FIXED (fixed), lb_dwdpshift, -1, -1);
  gtk_widget_set_uposition (lb_dwdpshift, 248, 523);
  gtk_widget_set_usize (lb_dwdpshift, 0, 0);

  lb_updpshift = gtk_label_new (_("Doppler Shift"));
  gtk_widget_set_name (lb_updpshift, "lb_updpshift");
  gtk_widget_ref (lb_updpshift);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "lb_updpshift", lb_updpshift,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lb_updpshift);
  gtk_fixed_put (GTK_FIXED (fixed), lb_updpshift, -1, -1);
  gtk_widget_set_uposition (lb_updpshift, 248, 492);
  gtk_widget_set_usize (lb_updpshift, 0, 0);

  lb_updoppler = gtk_label_new (_("Doppler Frequency"));
  gtk_widget_set_name (lb_updoppler, "lb_updoppler");
  gtk_widget_ref (lb_updoppler);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "lb_updoppler", lb_updoppler,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lb_updoppler);
  gtk_fixed_put (GTK_FIXED (fixed), lb_updoppler, -1, -1);
  gtk_widget_set_uposition (lb_updoppler, 424, 491);
  gtk_widget_set_usize (lb_updoppler, 0, 0);

  lb_dwdoppler = gtk_label_new (_("Doppler Frequency"));
  gtk_widget_set_name (lb_dwdoppler, "lb_dwdoppler");
  gtk_widget_ref (lb_dwdoppler);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "lb_dwdoppler", lb_dwdoppler,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lb_dwdoppler);
  gtk_fixed_put (GTK_FIXED (fixed), lb_dwdoppler, -1, -1);
  gtk_widget_set_uposition (lb_dwdoppler, 424, 522);
  gtk_widget_set_usize (lb_dwdoppler, 0, 0);

  cb_dwdoppler = gtk_check_button_new_with_label (_("Activate"));
  gtk_widget_set_name (cb_dwdoppler, "cb_dwdoppler");
  gtk_widget_ref (cb_dwdoppler);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "cb_dwdoppler", cb_dwdoppler,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (cb_dwdoppler);
  gtk_fixed_put (GTK_FIXED (fixed), cb_dwdoppler, -1, -1);
  gtk_widget_set_uposition (cb_dwdoppler, 616, 517);
  gtk_widget_set_usize (cb_dwdoppler, 0, 0);

  cb_updoppler = gtk_check_button_new_with_label (_("Activate"));
  gtk_widget_set_name (cb_updoppler, "cb_updoppler");
  gtk_widget_ref (cb_updoppler);
  gtk_object_set_data_full (GTK_OBJECT (mainwindow), "cb_updoppler", cb_updoppler,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (cb_updoppler);
  gtk_fixed_put (GTK_FIXED (fixed), cb_updoppler, -1, -1);
  gtk_widget_set_uposition (cb_updoppler, 616, 486);
  gtk_widget_set_usize (cb_updoppler, 0, 0);

  gtk_signal_connect (GTK_OBJECT (mainwindow), "delete_event",
                      GTK_SIGNAL_FUNC (mainwindow_delete_event),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (combo_entry1), "changed",
                      GTK_SIGNAL_FUNC (combo_entry1_changed),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (maparea), "expose_event",
                      GTK_SIGNAL_FUNC (maparea_expose_event),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (cb_connect), "clicked",
                      GTK_SIGNAL_FUNC (on_cb_connect_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (cb_disconnect), "clicked",
                      GTK_SIGNAL_FUNC (on_cb_disconnect_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (tb_grid), "toggled",
                      GTK_SIGNAL_FUNC (on_tb_grid_toggled),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (tb_utctime), "toggled",
                      GTK_SIGNAL_FUNC (on_tb_utctime_toggled),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (tb_footpsat), "toggled",
                      GTK_SIGNAL_FUNC (on_tb_footpsat_toggled),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (tb_footpqth), "toggled",
                      GTK_SIGNAL_FUNC (on_tb_footpqth_toggled),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (tb_track), "toggled",
                      GTK_SIGNAL_FUNC (on_tb_track_toggled),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (bt_preferences), "clicked",
                      GTK_SIGNAL_FUNC (on_bt_preferences_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (cb_dwdoppler), "toggled",
                      GTK_SIGNAL_FUNC (on_cb_dwdoppler_toggled),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (cb_updoppler), "toggled",
                      GTK_SIGNAL_FUNC (on_cb_updoppler_toggled),
                      NULL);

  gtk_widget_grab_focus (combo_entry1);
  gtk_widget_grab_default (combo_entry1);
  return mainwindow;
}

GtkWidget*
create_dialog_preferences (void)
{
  GtkWidget *dialog_preferences;
  GtkWidget *dialog_vbox1;
  GtkWidget *fixed1;
  GtkWidget *fr_radiocontrol;
  GtkWidget *fixed3;
  GtkWidget *tx_downpluginconfig;
  GtkWidget *tx_uppluginconfig;
  GtkWidget *lb_prefs_uplink;
  GtkWidget *lb_prefs_upconfig;
  GtkWidget *combo_upplugin;
  GtkWidget *entry_upplugin;
  GtkWidget *combo_downplugin;
  GtkWidget *entry_downplugin;
  GtkWidget *lb_prefs_downconfig;
  GtkWidget *lb_prefs_downlink;
  GtkWidget *fr_options;
  GtkWidget *fixed2;
  GtkWidget *lb_prefs_grid;
  GtkWidget *lb_prefs_time;
  GtkWidget *lb_prefs_fpsat;
  GtkWidget *lb_prefs_fpqth;
  GtkWidget *lb_prefs_track;
  GSList *trackprefs_group = NULL;
  GtkWidget *rd_prefs_trackoff;
  GSList *gridprefs_group = NULL;
  GtkWidget *rd_prefs_gridoff;
  GSList *timeprefs_group = NULL;
  GtkWidget *rd_prefs_utc;
  GSList *fpsatprefs_group = NULL;
  GtkWidget *rd_prefs_fpsatoff;
  GSList *fpqthprefs_group = NULL;
  GtkWidget *rd_prefs_fpqthoff;
  GtkWidget *rd_prefs_gridon;
  GtkWidget *rd_prefs_local;
  GtkWidget *rd_prefs_fpsaton;
  GtkWidget *rd_prefs_fpqthon;
  GtkWidget *rd_prefs_trackon;
  GtkWidget *tx_aoscommand;
  GtkWidget *tx_loscommand;
  GtkWidget *lb_prefs_loscommand;
  GtkWidget *lb_prefs_aoscommand;
  GtkWidget *dialog_action_area1;
  GtkWidget *bt_prefs_apply;
  GtkWidget *bt_prefs_cancel;
  GtkAccelGroup *accel_group;

  accel_group = gtk_accel_group_new ();

  dialog_preferences = gtk_dialog_new ();
  gtk_widget_set_name (dialog_preferences, "dialog_preferences");
  gtk_object_set_data (GTK_OBJECT (dialog_preferences), "dialog_preferences", dialog_preferences);
  gtk_window_set_title (GTK_WINDOW (dialog_preferences), _("gsat - Preferences"));
  gtk_window_set_position (GTK_WINDOW (dialog_preferences), GTK_WIN_POS_CENTER);
  gtk_window_set_policy (GTK_WINDOW (dialog_preferences), FALSE, FALSE, FALSE);

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

  fixed1 = gtk_fixed_new ();
  gtk_widget_set_name (fixed1, "fixed1");
  gtk_widget_ref (fixed1);
  gtk_object_set_data_full (GTK_OBJECT (dialog_preferences), "fixed1", fixed1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (fixed1);
  gtk_box_pack_start (GTK_BOX (dialog_vbox1), fixed1, TRUE, TRUE, 0);

  fr_radiocontrol = gtk_frame_new (_("Radio Control"));
  gtk_widget_set_name (fr_radiocontrol, "fr_radiocontrol");
  gtk_widget_ref (fr_radiocontrol);
  gtk_object_set_data_full (GTK_OBJECT (dialog_preferences), "fr_radiocontrol", fr_radiocontrol,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (fr_radiocontrol);
  gtk_fixed_put (GTK_FIXED (fixed1), fr_radiocontrol, 8, 232);
  gtk_widget_set_uposition (fr_radiocontrol, 8, 232);
  gtk_widget_set_usize (fr_radiocontrol, 296, 160);

  fixed3 = gtk_fixed_new ();
  gtk_widget_set_name (fixed3, "fixed3");
  gtk_widget_ref (fixed3);
  gtk_object_set_data_full (GTK_OBJECT (dialog_preferences), "fixed3", fixed3,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (fixed3);
  gtk_container_add (GTK_CONTAINER (fr_radiocontrol), fixed3);

  tx_downpluginconfig = gtk_entry_new ();
  gtk_widget_set_name (tx_downpluginconfig, "tx_downpluginconfig");
  gtk_widget_ref (tx_downpluginconfig);
  gtk_object_set_data_full (GTK_OBJECT (dialog_preferences), "tx_downpluginconfig", tx_downpluginconfig,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (tx_downpluginconfig);
  gtk_fixed_put (GTK_FIXED (fixed3), tx_downpluginconfig, 112, 40);
  gtk_widget_set_uposition (tx_downpluginconfig, 112, 40);
  gtk_widget_set_usize (tx_downpluginconfig, 160, 24);

  tx_uppluginconfig = gtk_entry_new ();
  gtk_widget_set_name (tx_uppluginconfig, "tx_uppluginconfig");
  gtk_widget_ref (tx_uppluginconfig);
  gtk_object_set_data_full (GTK_OBJECT (dialog_preferences), "tx_uppluginconfig", tx_uppluginconfig,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (tx_uppluginconfig);
  gtk_fixed_put (GTK_FIXED (fixed3), tx_uppluginconfig, 112, 112);
  gtk_widget_set_uposition (tx_uppluginconfig, 112, 112);
  gtk_widget_set_usize (tx_uppluginconfig, 160, 24);

  lb_prefs_uplink = gtk_label_new (_("Uplink plugin"));
  gtk_widget_set_name (lb_prefs_uplink, "lb_prefs_uplink");
  gtk_widget_ref (lb_prefs_uplink);
  gtk_object_set_data_full (GTK_OBJECT (dialog_preferences), "lb_prefs_uplink", lb_prefs_uplink,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lb_prefs_uplink);
  gtk_fixed_put (GTK_FIXED (fixed3), lb_prefs_uplink, 8, 80);
  gtk_widget_set_uposition (lb_prefs_uplink, 8, 80);
  gtk_widget_set_usize (lb_prefs_uplink, 96, 24);

  lb_prefs_upconfig = gtk_label_new (_("Plugin Config"));
  gtk_widget_set_name (lb_prefs_upconfig, "lb_prefs_upconfig");
  gtk_widget_ref (lb_prefs_upconfig);
  gtk_object_set_data_full (GTK_OBJECT (dialog_preferences), "lb_prefs_upconfig", lb_prefs_upconfig,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lb_prefs_upconfig);
  gtk_fixed_put (GTK_FIXED (fixed3), lb_prefs_upconfig, 8, 112);
  gtk_widget_set_uposition (lb_prefs_upconfig, 8, 112);
  gtk_widget_set_usize (lb_prefs_upconfig, 96, 24);

  combo_upplugin = gtk_combo_new ();
  gtk_widget_set_name (combo_upplugin, "combo_upplugin");
  gtk_widget_ref (combo_upplugin);
  gtk_object_set_data_full (GTK_OBJECT (dialog_preferences), "combo_upplugin", combo_upplugin,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (combo_upplugin);
  gtk_fixed_put (GTK_FIXED (fixed3), combo_upplugin, 112, 80);
  gtk_widget_set_uposition (combo_upplugin, 112, 80);
  gtk_widget_set_usize (combo_upplugin, 160, 24);

  entry_upplugin = GTK_COMBO (combo_upplugin)->entry;
  gtk_widget_set_name (entry_upplugin, "entry_upplugin");
  gtk_widget_ref (entry_upplugin);
  gtk_object_set_data_full (GTK_OBJECT (dialog_preferences), "entry_upplugin", entry_upplugin,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (entry_upplugin);
  gtk_entry_set_editable (GTK_ENTRY (entry_upplugin), FALSE);

  combo_downplugin = gtk_combo_new ();
  gtk_widget_set_name (combo_downplugin, "combo_downplugin");
  gtk_widget_ref (combo_downplugin);
  gtk_object_set_data_full (GTK_OBJECT (dialog_preferences), "combo_downplugin", combo_downplugin,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (combo_downplugin);
  gtk_fixed_put (GTK_FIXED (fixed3), combo_downplugin, 112, 8);
  gtk_widget_set_uposition (combo_downplugin, 112, 8);
  gtk_widget_set_usize (combo_downplugin, 160, 24);

  entry_downplugin = GTK_COMBO (combo_downplugin)->entry;
  gtk_widget_set_name (entry_downplugin, "entry_downplugin");
  gtk_widget_ref (entry_downplugin);
  gtk_object_set_data_full (GTK_OBJECT (dialog_preferences), "entry_downplugin", entry_downplugin,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (entry_downplugin);
  gtk_entry_set_editable (GTK_ENTRY (entry_downplugin), FALSE);

  lb_prefs_downconfig = gtk_label_new (_("Plugin Config"));
  gtk_widget_set_name (lb_prefs_downconfig, "lb_prefs_downconfig");
  gtk_widget_ref (lb_prefs_downconfig);
  gtk_object_set_data_full (GTK_OBJECT (dialog_preferences), "lb_prefs_downconfig", lb_prefs_downconfig,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lb_prefs_downconfig);
  gtk_fixed_put (GTK_FIXED (fixed3), lb_prefs_downconfig, 8, 40);
  gtk_widget_set_uposition (lb_prefs_downconfig, 8, 40);
  gtk_widget_set_usize (lb_prefs_downconfig, 96, 24);

  lb_prefs_downlink = gtk_label_new (_("Downlink plugin"));
  gtk_widget_set_name (lb_prefs_downlink, "lb_prefs_downlink");
  gtk_widget_ref (lb_prefs_downlink);
  gtk_object_set_data_full (GTK_OBJECT (dialog_preferences), "lb_prefs_downlink", lb_prefs_downlink,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lb_prefs_downlink);
  gtk_fixed_put (GTK_FIXED (fixed3), lb_prefs_downlink, 8, 8);
  gtk_widget_set_uposition (lb_prefs_downlink, 8, 8);
  gtk_widget_set_usize (lb_prefs_downlink, 96, 24);

  fr_options = gtk_frame_new (_("Program Options"));
  gtk_widget_set_name (fr_options, "fr_options");
  gtk_widget_ref (fr_options);
  gtk_object_set_data_full (GTK_OBJECT (dialog_preferences), "fr_options", fr_options,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (fr_options);
  gtk_fixed_put (GTK_FIXED (fixed1), fr_options, 8, 8);
  gtk_widget_set_uposition (fr_options, 8, 8);
  gtk_widget_set_usize (fr_options, 296, 216);
  gtk_container_set_border_width (GTK_CONTAINER (fr_options), 2);

  fixed2 = gtk_fixed_new ();
  gtk_widget_set_name (fixed2, "fixed2");
  gtk_widget_ref (fixed2);
  gtk_object_set_data_full (GTK_OBJECT (dialog_preferences), "fixed2", fixed2,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (fixed2);
  gtk_container_add (GTK_CONTAINER (fr_options), fixed2);

  lb_prefs_grid = gtk_label_new (_("Map grid"));
  gtk_widget_set_name (lb_prefs_grid, "lb_prefs_grid");
  gtk_widget_ref (lb_prefs_grid);
  gtk_object_set_data_full (GTK_OBJECT (dialog_preferences), "lb_prefs_grid", lb_prefs_grid,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lb_prefs_grid);
  gtk_fixed_put (GTK_FIXED (fixed2), lb_prefs_grid, 8, 8);
  gtk_widget_set_uposition (lb_prefs_grid, 8, 8);
  gtk_widget_set_usize (lb_prefs_grid, 88, 24);

  lb_prefs_time = gtk_label_new (_("Time format"));
  gtk_widget_set_name (lb_prefs_time, "lb_prefs_time");
  gtk_widget_ref (lb_prefs_time);
  gtk_object_set_data_full (GTK_OBJECT (dialog_preferences), "lb_prefs_time", lb_prefs_time,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lb_prefs_time);
  gtk_fixed_put (GTK_FIXED (fixed2), lb_prefs_time, 8, 32);
  gtk_widget_set_uposition (lb_prefs_time, 8, 32);
  gtk_widget_set_usize (lb_prefs_time, 88, 24);

  lb_prefs_fpsat = gtk_label_new (_("Satellite footprint"));
  gtk_widget_set_name (lb_prefs_fpsat, "lb_prefs_fpsat");
  gtk_widget_ref (lb_prefs_fpsat);
  gtk_object_set_data_full (GTK_OBJECT (dialog_preferences), "lb_prefs_fpsat", lb_prefs_fpsat,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lb_prefs_fpsat);
  gtk_fixed_put (GTK_FIXED (fixed2), lb_prefs_fpsat, 8, 56);
  gtk_widget_set_uposition (lb_prefs_fpsat, 8, 56);
  gtk_widget_set_usize (lb_prefs_fpsat, 88, 24);

  lb_prefs_fpqth = gtk_label_new (_("Station footprint"));
  gtk_widget_set_name (lb_prefs_fpqth, "lb_prefs_fpqth");
  gtk_widget_ref (lb_prefs_fpqth);
  gtk_object_set_data_full (GTK_OBJECT (dialog_preferences), "lb_prefs_fpqth", lb_prefs_fpqth,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lb_prefs_fpqth);
  gtk_fixed_put (GTK_FIXED (fixed2), lb_prefs_fpqth, 8, 80);
  gtk_widget_set_uposition (lb_prefs_fpqth, 8, 80);
  gtk_widget_set_usize (lb_prefs_fpqth, 88, 24);

  lb_prefs_track = gtk_label_new (_("Ground Track"));
  gtk_widget_set_name (lb_prefs_track, "lb_prefs_track");
  gtk_widget_ref (lb_prefs_track);
  gtk_object_set_data_full (GTK_OBJECT (dialog_preferences), "lb_prefs_track", lb_prefs_track,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lb_prefs_track);
  gtk_fixed_put (GTK_FIXED (fixed2), lb_prefs_track, 8, 104);
  gtk_widget_set_uposition (lb_prefs_track, 8, 104);
  gtk_widget_set_usize (lb_prefs_track, 88, 24);

  rd_prefs_trackoff = gtk_radio_button_new_with_label (trackprefs_group, _("Off"));
  trackprefs_group = gtk_radio_button_group (GTK_RADIO_BUTTON (rd_prefs_trackoff));
  gtk_widget_set_name (rd_prefs_trackoff, "rd_prefs_trackoff");
  gtk_widget_ref (rd_prefs_trackoff);
  gtk_object_set_data_full (GTK_OBJECT (dialog_preferences), "rd_prefs_trackoff", rd_prefs_trackoff,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (rd_prefs_trackoff);
  gtk_fixed_put (GTK_FIXED (fixed2), rd_prefs_trackoff, 152, 104);
  gtk_widget_set_uposition (rd_prefs_trackoff, 152, 104);
  gtk_widget_set_usize (rd_prefs_trackoff, 48, 24);

  rd_prefs_gridoff = gtk_radio_button_new_with_label (gridprefs_group, _("Off"));
  gridprefs_group = gtk_radio_button_group (GTK_RADIO_BUTTON (rd_prefs_gridoff));
  gtk_widget_set_name (rd_prefs_gridoff, "rd_prefs_gridoff");
  gtk_widget_ref (rd_prefs_gridoff);
  gtk_object_set_data_full (GTK_OBJECT (dialog_preferences), "rd_prefs_gridoff", rd_prefs_gridoff,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (rd_prefs_gridoff);
  gtk_fixed_put (GTK_FIXED (fixed2), rd_prefs_gridoff, 152, 8);
  gtk_widget_set_uposition (rd_prefs_gridoff, 152, 8);
  gtk_widget_set_usize (rd_prefs_gridoff, 48, 24);

  rd_prefs_utc = gtk_radio_button_new_with_label (timeprefs_group, _("UTC time"));
  timeprefs_group = gtk_radio_button_group (GTK_RADIO_BUTTON (rd_prefs_utc));
  gtk_widget_set_name (rd_prefs_utc, "rd_prefs_utc");
  gtk_widget_ref (rd_prefs_utc);
  gtk_object_set_data_full (GTK_OBJECT (dialog_preferences), "rd_prefs_utc", rd_prefs_utc,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (rd_prefs_utc);
  gtk_fixed_put (GTK_FIXED (fixed2), rd_prefs_utc, 176, 32);
  gtk_widget_set_uposition (rd_prefs_utc, 176, 32);
  gtk_widget_set_usize (rd_prefs_utc, 64, 24);

  rd_prefs_fpsatoff = gtk_radio_button_new_with_label (fpsatprefs_group, _("Off"));
  fpsatprefs_group = gtk_radio_button_group (GTK_RADIO_BUTTON (rd_prefs_fpsatoff));
  gtk_widget_set_name (rd_prefs_fpsatoff, "rd_prefs_fpsatoff");
  gtk_widget_ref (rd_prefs_fpsatoff);
  gtk_object_set_data_full (GTK_OBJECT (dialog_preferences), "rd_prefs_fpsatoff", rd_prefs_fpsatoff,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (rd_prefs_fpsatoff);
  gtk_fixed_put (GTK_FIXED (fixed2), rd_prefs_fpsatoff, 152, 56);
  gtk_widget_set_uposition (rd_prefs_fpsatoff, 152, 56);
  gtk_widget_set_usize (rd_prefs_fpsatoff, 48, 24);

  rd_prefs_fpqthoff = gtk_radio_button_new_with_label (fpqthprefs_group, _("Off"));
  fpqthprefs_group = gtk_radio_button_group (GTK_RADIO_BUTTON (rd_prefs_fpqthoff));
  gtk_widget_set_name (rd_prefs_fpqthoff, "rd_prefs_fpqthoff");
  gtk_widget_ref (rd_prefs_fpqthoff);
  gtk_object_set_data_full (GTK_OBJECT (dialog_preferences), "rd_prefs_fpqthoff", rd_prefs_fpqthoff,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (rd_prefs_fpqthoff);
  gtk_fixed_put (GTK_FIXED (fixed2), rd_prefs_fpqthoff, 152, 80);
  gtk_widget_set_uposition (rd_prefs_fpqthoff, 152, 80);
  gtk_widget_set_usize (rd_prefs_fpqthoff, 48, 24);

  rd_prefs_gridon = gtk_radio_button_new_with_label (gridprefs_group, _("On"));
  gridprefs_group = gtk_radio_button_group (GTK_RADIO_BUTTON (rd_prefs_gridon));
  gtk_widget_set_name (rd_prefs_gridon, "rd_prefs_gridon");
  gtk_widget_ref (rd_prefs_gridon);
  gtk_object_set_data_full (GTK_OBJECT (dialog_preferences), "rd_prefs_gridon", rd_prefs_gridon,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (rd_prefs_gridon);
  gtk_fixed_put (GTK_FIXED (fixed2), rd_prefs_gridon, 104, 8);
  gtk_widget_set_uposition (rd_prefs_gridon, 104, 8);
  gtk_widget_set_usize (rd_prefs_gridon, 48, 24);

  rd_prefs_local = gtk_radio_button_new_with_label (timeprefs_group, _("Local time"));
  timeprefs_group = gtk_radio_button_group (GTK_RADIO_BUTTON (rd_prefs_local));
  gtk_widget_set_name (rd_prefs_local, "rd_prefs_local");
  gtk_widget_ref (rd_prefs_local);
  gtk_object_set_data_full (GTK_OBJECT (dialog_preferences), "rd_prefs_local", rd_prefs_local,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (rd_prefs_local);
  gtk_fixed_put (GTK_FIXED (fixed2), rd_prefs_local, 104, 32);
  gtk_widget_set_uposition (rd_prefs_local, 104, 32);
  gtk_widget_set_usize (rd_prefs_local, 64, 24);

  rd_prefs_fpsaton = gtk_radio_button_new_with_label (fpsatprefs_group, _("On"));
  fpsatprefs_group = gtk_radio_button_group (GTK_RADIO_BUTTON (rd_prefs_fpsaton));
  gtk_widget_set_name (rd_prefs_fpsaton, "rd_prefs_fpsaton");
  gtk_widget_ref (rd_prefs_fpsaton);
  gtk_object_set_data_full (GTK_OBJECT (dialog_preferences), "rd_prefs_fpsaton", rd_prefs_fpsaton,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (rd_prefs_fpsaton);
  gtk_fixed_put (GTK_FIXED (fixed2), rd_prefs_fpsaton, 104, 56);
  gtk_widget_set_uposition (rd_prefs_fpsaton, 104, 56);
  gtk_widget_set_usize (rd_prefs_fpsaton, 48, 24);

  rd_prefs_fpqthon = gtk_radio_button_new_with_label (fpqthprefs_group, _("On"));
  fpqthprefs_group = gtk_radio_button_group (GTK_RADIO_BUTTON (rd_prefs_fpqthon));
  gtk_widget_set_name (rd_prefs_fpqthon, "rd_prefs_fpqthon");
  gtk_widget_ref (rd_prefs_fpqthon);
  gtk_object_set_data_full (GTK_OBJECT (dialog_preferences), "rd_prefs_fpqthon", rd_prefs_fpqthon,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (rd_prefs_fpqthon);
  gtk_fixed_put (GTK_FIXED (fixed2), rd_prefs_fpqthon, 104, 80);
  gtk_widget_set_uposition (rd_prefs_fpqthon, 104, 80);
  gtk_widget_set_usize (rd_prefs_fpqthon, 48, 24);

  rd_prefs_trackon = gtk_radio_button_new_with_label (trackprefs_group, _("On"));
  trackprefs_group = gtk_radio_button_group (GTK_RADIO_BUTTON (rd_prefs_trackon));
  gtk_widget_set_name (rd_prefs_trackon, "rd_prefs_trackon");
  gtk_widget_ref (rd_prefs_trackon);
  gtk_object_set_data_full (GTK_OBJECT (dialog_preferences), "rd_prefs_trackon", rd_prefs_trackon,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (rd_prefs_trackon);
  gtk_fixed_put (GTK_FIXED (fixed2), rd_prefs_trackon, 104, 104);
  gtk_widget_set_uposition (rd_prefs_trackon, 104, 104);
  gtk_widget_set_usize (rd_prefs_trackon, 48, 24);

  tx_aoscommand = gtk_entry_new ();
  gtk_widget_set_name (tx_aoscommand, "tx_aoscommand");
  gtk_widget_ref (tx_aoscommand);
  gtk_object_set_data_full (GTK_OBJECT (dialog_preferences), "tx_aoscommand", tx_aoscommand,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (tx_aoscommand);
  gtk_fixed_put (GTK_FIXED (fixed2), tx_aoscommand, 104, 136);
  gtk_widget_set_uposition (tx_aoscommand, 104, 136);
  gtk_widget_set_usize (tx_aoscommand, 160, 24);

  tx_loscommand = gtk_entry_new ();
  gtk_widget_set_name (tx_loscommand, "tx_loscommand");
  gtk_widget_ref (tx_loscommand);
  gtk_object_set_data_full (GTK_OBJECT (dialog_preferences), "tx_loscommand", tx_loscommand,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (tx_loscommand);
  gtk_fixed_put (GTK_FIXED (fixed2), tx_loscommand, 104, 168);
  gtk_widget_set_uposition (tx_loscommand, 104, 168);
  gtk_widget_set_usize (tx_loscommand, 160, 24);

  lb_prefs_loscommand = gtk_label_new (_("LOS command"));
  gtk_widget_set_name (lb_prefs_loscommand, "lb_prefs_loscommand");
  gtk_widget_ref (lb_prefs_loscommand);
  gtk_object_set_data_full (GTK_OBJECT (dialog_preferences), "lb_prefs_loscommand", lb_prefs_loscommand,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lb_prefs_loscommand);
  gtk_fixed_put (GTK_FIXED (fixed2), lb_prefs_loscommand, 8, 168);
  gtk_widget_set_uposition (lb_prefs_loscommand, 8, 168);
  gtk_widget_set_usize (lb_prefs_loscommand, 96, 24);

  lb_prefs_aoscommand = gtk_label_new (_("AOS command"));
  gtk_widget_set_name (lb_prefs_aoscommand, "lb_prefs_aoscommand");
  gtk_widget_ref (lb_prefs_aoscommand);
  gtk_object_set_data_full (GTK_OBJECT (dialog_preferences), "lb_prefs_aoscommand", lb_prefs_aoscommand,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lb_prefs_aoscommand);
  gtk_fixed_put (GTK_FIXED (fixed2), lb_prefs_aoscommand, 8, 136);
  gtk_widget_set_uposition (lb_prefs_aoscommand, 8, 136);
  gtk_widget_set_usize (lb_prefs_aoscommand, 96, 24);

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

  bt_prefs_apply = gtk_button_new_with_label (_("Apply"));
  gtk_widget_set_name (bt_prefs_apply, "bt_prefs_apply");
  gtk_widget_ref (bt_prefs_apply);
  gtk_object_set_data_full (GTK_OBJECT (dialog_preferences), "bt_prefs_apply", bt_prefs_apply,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (bt_prefs_apply);
  gtk_box_pack_start (GTK_BOX (dialog_action_area1), bt_prefs_apply, FALSE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (bt_prefs_apply), 4);
  gtk_widget_add_accelerator (bt_prefs_apply, "clicked", accel_group,
                              GDK_Return, 0,
                              GTK_ACCEL_VISIBLE);

  bt_prefs_cancel = gtk_button_new_with_label (_("Cancel"));
  gtk_widget_set_name (bt_prefs_cancel, "bt_prefs_cancel");
  gtk_widget_ref (bt_prefs_cancel);
  gtk_object_set_data_full (GTK_OBJECT (dialog_preferences), "bt_prefs_cancel", bt_prefs_cancel,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (bt_prefs_cancel);
  gtk_box_pack_start (GTK_BOX (dialog_action_area1), bt_prefs_cancel, FALSE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (bt_prefs_cancel), 4);
  GTK_WIDGET_SET_FLAGS (bt_prefs_cancel, GTK_CAN_DEFAULT);
  gtk_widget_add_accelerator (bt_prefs_cancel, "clicked", accel_group,
                              GDK_Escape, 0,
                              GTK_ACCEL_VISIBLE);

  gtk_signal_connect (GTK_OBJECT (dialog_preferences), "delete_event",
                      GTK_SIGNAL_FUNC (on_dialog_preferences_delete_event),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (bt_prefs_apply), "clicked",
                      GTK_SIGNAL_FUNC (on_bt_prefs_apply_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (bt_prefs_cancel), "clicked",
                      GTK_SIGNAL_FUNC (on_bt_prefs_cancel_clicked),
                      NULL);

  gtk_widget_grab_default (bt_prefs_cancel);
  gtk_window_add_accel_group (GTK_WINDOW (dialog_preferences), accel_group);

  return dialog_preferences;
}

GtkWidget*
create_dialog_connect (void)
{
  GtkWidget *dialog_connect;
  GtkWidget *dialog_vbox2;
  GtkWidget *frame3;
  GtkWidget *fixed4;
  GtkWidget *tx_con_server;
  GtkWidget *tx_con_port;
  GtkWidget *lb_con_port;
  GtkWidget *lb_con_server;
  GtkWidget *lb_con_text;
  GtkWidget *dialog_action_area2;
  GtkWidget *bt_con_connect;
  GtkWidget *bt_con_cancel;
  GtkAccelGroup *accel_group;

  accel_group = gtk_accel_group_new ();

  dialog_connect = gtk_dialog_new ();
  gtk_widget_set_name (dialog_connect, "dialog_connect");
  gtk_object_set_data (GTK_OBJECT (dialog_connect), "dialog_connect", dialog_connect);
  gtk_window_set_title (GTK_WINDOW (dialog_connect), _("gsat - Connect"));
  gtk_window_set_policy (GTK_WINDOW (dialog_connect), FALSE, FALSE, FALSE);

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

  frame3 = gtk_frame_new (NULL);
  gtk_widget_set_name (frame3, "frame3");
  gtk_widget_ref (frame3);
  gtk_object_set_data_full (GTK_OBJECT (dialog_connect), "frame3", frame3,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (frame3);
  gtk_box_pack_start (GTK_BOX (dialog_vbox2), frame3, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frame3), 3);

  fixed4 = gtk_fixed_new ();
  gtk_widget_set_name (fixed4, "fixed4");
  gtk_widget_ref (fixed4);
  gtk_object_set_data_full (GTK_OBJECT (dialog_connect), "fixed4", fixed4,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (fixed4);
  gtk_container_add (GTK_CONTAINER (frame3), fixed4);

  tx_con_server = gtk_entry_new_with_max_length (250);
  gtk_widget_set_name (tx_con_server, "tx_con_server");
  gtk_widget_ref (tx_con_server);
  gtk_object_set_data_full (GTK_OBJECT (dialog_connect), "tx_con_server", tx_con_server,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (tx_con_server);
  gtk_fixed_put (GTK_FIXED (fixed4), tx_con_server, 88, 48);
  gtk_widget_set_uposition (tx_con_server, 88, 48);
  gtk_widget_set_usize (tx_con_server, 158, 20);
  gtk_entry_set_text (GTK_ENTRY (tx_con_server), _("localhost"));

  tx_con_port = gtk_entry_new ();
  gtk_widget_set_name (tx_con_port, "tx_con_port");
  gtk_widget_ref (tx_con_port);
  gtk_object_set_data_full (GTK_OBJECT (dialog_connect), "tx_con_port", tx_con_port,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (tx_con_port);
  gtk_fixed_put (GTK_FIXED (fixed4), tx_con_port, 88, 80);
  gtk_widget_set_uposition (tx_con_port, 88, 80);
  gtk_widget_set_usize (tx_con_port, 158, 20);
  gtk_entry_set_text (GTK_ENTRY (tx_con_port), _("1210"));

  lb_con_port = gtk_label_new (_("Port"));
  gtk_widget_set_name (lb_con_port, "lb_con_port");
  gtk_widget_ref (lb_con_port);
  gtk_object_set_data_full (GTK_OBJECT (dialog_connect), "lb_con_port", lb_con_port,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lb_con_port);
  gtk_fixed_put (GTK_FIXED (fixed4), lb_con_port, 24, 80);
  gtk_widget_set_uposition (lb_con_port, 24, 80);
  gtk_widget_set_usize (lb_con_port, 56, 24);

  lb_con_server = gtk_label_new (_("Server"));
  gtk_widget_set_name (lb_con_server, "lb_con_server");
  gtk_widget_ref (lb_con_server);
  gtk_object_set_data_full (GTK_OBJECT (dialog_connect), "lb_con_server", lb_con_server,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lb_con_server);
  gtk_fixed_put (GTK_FIXED (fixed4), lb_con_server, 24, 48);
  gtk_widget_set_uposition (lb_con_server, 24, 48);
  gtk_widget_set_usize (lb_con_server, 56, 24);

  lb_con_text = gtk_label_new (_("Enter predict server and port"));
  gtk_widget_set_name (lb_con_text, "lb_con_text");
  gtk_widget_ref (lb_con_text);
  gtk_object_set_data_full (GTK_OBJECT (dialog_connect), "lb_con_text", lb_con_text,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lb_con_text);
  gtk_fixed_put (GTK_FIXED (fixed4), lb_con_text, 8, 8);
  gtk_widget_set_uposition (lb_con_text, 8, 8);
  gtk_widget_set_usize (lb_con_text, 272, 32);

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

  bt_con_connect = gtk_button_new_with_label (_("Connect"));
  gtk_widget_set_name (bt_con_connect, "bt_con_connect");
  gtk_widget_ref (bt_con_connect);
  gtk_object_set_data_full (GTK_OBJECT (dialog_connect), "bt_con_connect", bt_con_connect,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (bt_con_connect);
  gtk_box_pack_start (GTK_BOX (dialog_action_area2), bt_con_connect, FALSE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (bt_con_connect), 4);
  GTK_WIDGET_SET_FLAGS (bt_con_connect, GTK_CAN_DEFAULT);
  gtk_widget_add_accelerator (bt_con_connect, "clicked", accel_group,
                              GDK_Return, 0,
                              GTK_ACCEL_VISIBLE);

  bt_con_cancel = gtk_button_new_with_label (_("Cancel"));
  gtk_widget_set_name (bt_con_cancel, "bt_con_cancel");
  gtk_widget_ref (bt_con_cancel);
  gtk_object_set_data_full (GTK_OBJECT (dialog_connect), "bt_con_cancel", bt_con_cancel,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (bt_con_cancel);
  gtk_box_pack_start (GTK_BOX (dialog_action_area2), bt_con_cancel, FALSE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (bt_con_cancel), 4);
  gtk_widget_add_accelerator (bt_con_cancel, "clicked", accel_group,
                              GDK_Escape, 0,
                              GTK_ACCEL_VISIBLE);

  gtk_signal_connect (GTK_OBJECT (dialog_connect), "delete_event",
                      GTK_SIGNAL_FUNC (on_dialog_connect_delete_event),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (bt_con_connect), "clicked",
                      GTK_SIGNAL_FUNC (on_bt_con_connect_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (bt_con_cancel), "clicked",
                      GTK_SIGNAL_FUNC (on_bt_con_cancel_clicked),
                      NULL);

  gtk_widget_grab_default (bt_con_connect);
  gtk_window_add_accel_group (GTK_WINDOW (dialog_connect), accel_group);

  return dialog_connect;
}

