/*
 * 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 "spectrum.h"
#include "scope.h"
#include "interface.h"
#include "support.h"
#include "snm-compat-gtk2.h"

#define GLADE_HOOKUP_OBJECT(component,widget,name) \
  g_object_set_data_full (G_OBJECT (component), name, \
    g_object_ref (widget), (GDestroyNotify) g_object_unref)

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

GtkWidget*
create_mainwindow (void)
{
  GtkWidget *mainwindow;
  GtkWidget *vbox1;
  GtkWidget *handlebox1;
  GtkWidget *menubar1;
  GtkWidget *file;
  GtkWidget *file_menu;
  GtkWidget *new;
  GtkWidget *new_menu;
  GtkWidget *newconfiguration;
  GtkWidget *newchannel;
  GtkWidget *delete;
  GtkWidget *delete_menu;
  GtkWidget *deleteconfiguration;
  GtkWidget *deletechannel;
  GtkWidget *separator1;
  GtkWidget *quit;
  GtkWidget *diagnostics;
  GtkWidget *diagnostics_menu;
  GtkWidget *diagscope;
  GtkWidget *diagspectrum;
  GtkWidget *diagmodem;
  GtkWidget *diagp3dmodem;
  GtkWidget *diagpassall;
  GtkWidget *help;
  GtkWidget *help_menu;
  GtkWidget *about;
  GtkWidget *configbox;
  GtkWidget *scrolledwindow1;
  GtkWidget *viewport1;
  GtkWidget *configtree;
  GtkWidget *vbox3;
  GtkWidget *confignotebook;
  GtkWidget *empty_notebook_page;
  GtkWidget *label32;
  GtkWidget *label33;
  GtkWidget *statusbar1;

  mainwindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (mainwindow), _("SoundModem Configurator"));
  gtk_window_set_default_size (GTK_WINDOW (mainwindow), 550, 330);

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

  handlebox1 = gtk_handle_box_new ();
  gtk_widget_show (handlebox1);
  gtk_box_pack_start (GTK_BOX (vbox1), handlebox1, FALSE, TRUE, 0);

  menubar1 = gtk_menu_bar_new ();
  gtk_widget_show (menubar1);
  gtk_container_add (GTK_CONTAINER (handlebox1), menubar1);

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

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

  new = gtk_menu_item_new_with_mnemonic (_("New"));
  gtk_widget_show (new);
  gtk_container_add (GTK_CONTAINER (file_menu), new);

  new_menu = gtk_menu_new ();
  gtk_menu_item_set_submenu (GTK_MENU_ITEM (new), new_menu);

  newconfiguration = gtk_menu_item_new_with_mnemonic (_("Configuration"));
  gtk_widget_show (newconfiguration);
  gtk_container_add (GTK_CONTAINER (new_menu), newconfiguration);

  newchannel = gtk_menu_item_new_with_mnemonic (_("Channel"));
  gtk_widget_show (newchannel);
  gtk_container_add (GTK_CONTAINER (new_menu), newchannel);

  delete = gtk_menu_item_new_with_mnemonic (_("Delete"));
  gtk_widget_show (delete);
  gtk_container_add (GTK_CONTAINER (file_menu), delete);

  delete_menu = gtk_menu_new ();
  gtk_menu_item_set_submenu (GTK_MENU_ITEM (delete), delete_menu);

  deleteconfiguration = gtk_menu_item_new_with_mnemonic (_("Configuration"));
  gtk_widget_show (deleteconfiguration);
  gtk_container_add (GTK_CONTAINER (delete_menu), deleteconfiguration);

  deletechannel = gtk_menu_item_new_with_mnemonic (_("Channel"));
  gtk_widget_show (deletechannel);
  gtk_container_add (GTK_CONTAINER (delete_menu), deletechannel);

  separator1 = gtk_menu_item_new ();
  gtk_widget_show (separator1);
  gtk_container_add (GTK_CONTAINER (file_menu), separator1);
  gtk_widget_set_sensitive (separator1, FALSE);

  quit = gtk_menu_item_new_with_mnemonic (_("Quit"));
  gtk_widget_show (quit);
  gtk_container_add (GTK_CONTAINER (file_menu), quit);

  diagnostics = gtk_menu_item_new_with_mnemonic (_("Diagnostics"));
  gtk_widget_show (diagnostics);
  gtk_container_add (GTK_CONTAINER (menubar1), diagnostics);

  diagnostics_menu = gtk_menu_new ();
  gtk_menu_item_set_submenu (GTK_MENU_ITEM (diagnostics), diagnostics_menu);

  diagscope = gtk_menu_item_new_with_mnemonic (_("Scope"));
  gtk_widget_show (diagscope);
  gtk_container_add (GTK_CONTAINER (diagnostics_menu), diagscope);

  diagspectrum = gtk_menu_item_new_with_mnemonic (_("Spectrum"));
  gtk_widget_show (diagspectrum);
  gtk_container_add (GTK_CONTAINER (diagnostics_menu), diagspectrum);

  diagmodem = gtk_menu_item_new_with_mnemonic (_("Modem"));
  gtk_widget_show (diagmodem);
  gtk_container_add (GTK_CONTAINER (diagnostics_menu), diagmodem);

  diagp3dmodem = gtk_menu_item_new_with_mnemonic (_("AO-40 P3D Modem"));
  gtk_widget_show (diagp3dmodem);
  gtk_container_add (GTK_CONTAINER (diagnostics_menu), diagp3dmodem);

  diagpassall = gtk_check_menu_item_new_with_mnemonic (_("PASSALL (do not check CRC)"));
  gtk_widget_show (diagpassall);
  gtk_container_add (GTK_CONTAINER (diagnostics_menu), diagpassall);

  help = gtk_menu_item_new_with_mnemonic (_("Help"));
  gtk_widget_show (help);
  gtk_container_add (GTK_CONTAINER (menubar1), help);

  help_menu = gtk_menu_new ();
  gtk_menu_item_set_submenu (GTK_MENU_ITEM (help), help_menu);

  about = gtk_menu_item_new_with_mnemonic (_("About"));
  gtk_widget_show (about);
  gtk_container_add (GTK_CONTAINER (help_menu), about);

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

  scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_show (scrolledwindow1);
  gtk_box_pack_start (GTK_BOX (configbox), scrolledwindow1, TRUE, TRUE, 0);
  gtk_widget_set_can_focus (scrolledwindow1, FALSE);

  viewport1 = gtk_viewport_new (NULL, NULL);
  gtk_widget_show (viewport1);
  gtk_container_add (GTK_CONTAINER (scrolledwindow1), viewport1);

  configtree = gtk_tree_view_new ();
  gtk_widget_show (configtree);
  gtk_container_add (GTK_CONTAINER (viewport1), configtree);
  gtk_widget_set_can_focus (configtree, FALSE);

  vbox3 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox3);
  gtk_box_pack_start (GTK_BOX (configbox), vbox3, TRUE, TRUE, 0);

  confignotebook = gtk_notebook_new ();
  gtk_widget_show (confignotebook);
  gtk_box_pack_start (GTK_BOX (vbox3), confignotebook, TRUE, TRUE, 0);

  empty_notebook_page = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (empty_notebook_page);
  gtk_container_add (GTK_CONTAINER (confignotebook), empty_notebook_page);

  label32 = gtk_label_new ("");
  gtk_widget_show (label32);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (confignotebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (confignotebook), 0), label32);

  empty_notebook_page = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (empty_notebook_page);
  gtk_container_add (GTK_CONTAINER (confignotebook), empty_notebook_page);

  label33 = gtk_label_new ("");
  gtk_widget_show (label33);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (confignotebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (confignotebook), 1), label33);

  statusbar1 = gtk_statusbar_new ();
  gtk_widget_show (statusbar1);
  gtk_box_pack_start (GTK_BOX (vbox1), statusbar1, FALSE, FALSE, 0);

  g_signal_connect ((gpointer) mainwindow, "destroy_event",
                    G_CALLBACK (on_mainwindow_destroy_event),
                    NULL);
  g_signal_connect ((gpointer) mainwindow, "delete_event",
                    G_CALLBACK (on_mainwindow_delete_event),
                    NULL);
  g_signal_connect ((gpointer) newconfiguration, "activate",
                    G_CALLBACK (on_newconfiguration_activate),
                    NULL);
  g_signal_connect ((gpointer) newchannel, "activate",
                    G_CALLBACK (on_newchannel_activate),
                    NULL);
  g_signal_connect ((gpointer) deleteconfiguration, "activate",
                    G_CALLBACK (on_deleteconfiguration_activate),
                    NULL);
  g_signal_connect ((gpointer) deletechannel, "activate",
                    G_CALLBACK (on_deletechannel_activate),
                    NULL);
  g_signal_connect ((gpointer) quit, "activate",
                    G_CALLBACK (on_quit_activate),
                    NULL);
  g_signal_connect ((gpointer) diagscope, "activate",
                    G_CALLBACK (on_diagscope_activate),
                    NULL);
  g_signal_connect ((gpointer) diagspectrum, "activate",
                    G_CALLBACK (on_diagspectrum_activate),
                    NULL);
  g_signal_connect ((gpointer) diagmodem, "activate",
                    G_CALLBACK (on_diagmodem_activate),
                    NULL);
  g_signal_connect ((gpointer) diagp3dmodem, "activate",
                    G_CALLBACK (on_diagp3dmodem_activate),
                    NULL);
  g_signal_connect ((gpointer) diagpassall, "activate",
                    G_CALLBACK (on_diagpassall_activate),
                    NULL);
  g_signal_connect ((gpointer) about, "activate",
                    G_CALLBACK (on_about_activate),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (mainwindow, mainwindow, "mainwindow");
  GLADE_HOOKUP_OBJECT (mainwindow, vbox1, "vbox1");
  GLADE_HOOKUP_OBJECT (mainwindow, handlebox1, "handlebox1");
  GLADE_HOOKUP_OBJECT (mainwindow, menubar1, "menubar1");
  GLADE_HOOKUP_OBJECT (mainwindow, file, "file");
  GLADE_HOOKUP_OBJECT (mainwindow, file_menu, "file_menu");
  GLADE_HOOKUP_OBJECT (mainwindow, new, "new");
  GLADE_HOOKUP_OBJECT (mainwindow, new_menu, "new_menu");
  GLADE_HOOKUP_OBJECT (mainwindow, newconfiguration, "newconfiguration");
  GLADE_HOOKUP_OBJECT (mainwindow, newchannel, "newchannel");
  GLADE_HOOKUP_OBJECT (mainwindow, delete, "delete");
  GLADE_HOOKUP_OBJECT (mainwindow, delete_menu, "delete_menu");
  GLADE_HOOKUP_OBJECT (mainwindow, deleteconfiguration, "deleteconfiguration");
  GLADE_HOOKUP_OBJECT (mainwindow, deletechannel, "deletechannel");
  GLADE_HOOKUP_OBJECT (mainwindow, separator1, "separator1");
  GLADE_HOOKUP_OBJECT (mainwindow, quit, "quit");
  GLADE_HOOKUP_OBJECT (mainwindow, diagnostics, "diagnostics");
  GLADE_HOOKUP_OBJECT (mainwindow, diagnostics_menu, "diagnostics_menu");
  GLADE_HOOKUP_OBJECT (mainwindow, diagscope, "diagscope");
  GLADE_HOOKUP_OBJECT (mainwindow, diagspectrum, "diagspectrum");
  GLADE_HOOKUP_OBJECT (mainwindow, diagmodem, "diagmodem");
  GLADE_HOOKUP_OBJECT (mainwindow, diagp3dmodem, "diagp3dmodem");
  GLADE_HOOKUP_OBJECT (mainwindow, diagpassall, "diagpassall");
  GLADE_HOOKUP_OBJECT (mainwindow, help, "help");
  GLADE_HOOKUP_OBJECT (mainwindow, help_menu, "help_menu");
  GLADE_HOOKUP_OBJECT (mainwindow, about, "about");
  GLADE_HOOKUP_OBJECT (mainwindow, configbox, "configbox");
  GLADE_HOOKUP_OBJECT (mainwindow, scrolledwindow1, "scrolledwindow1");
  GLADE_HOOKUP_OBJECT (mainwindow, viewport1, "viewport1");
  GLADE_HOOKUP_OBJECT (mainwindow, configtree, "configtree");
  GLADE_HOOKUP_OBJECT (mainwindow, vbox3, "vbox3");
  GLADE_HOOKUP_OBJECT (mainwindow, confignotebook, "confignotebook");
  GLADE_HOOKUP_OBJECT (mainwindow, label32, "label32");
  GLADE_HOOKUP_OBJECT (mainwindow, label33, "label33");
  GLADE_HOOKUP_OBJECT (mainwindow, statusbar1, "statusbar1");

  return mainwindow;
}

GtkWidget*
create_aboutwindow (void)
{
  GtkWidget *aboutwindow;
  GtkWidget *dialog_vbox1;
  GtkWidget *frame1;
  GtkWidget *vbox4;
  GtkWidget *label13;
  GtkWidget *label14;
  GtkWidget *label1;
  GtkWidget *dialog_action_area1;
  GtkWidget *hbuttonbox1;
  GtkWidget *aboutok;

  aboutwindow = gtk_dialog_new ();
  gtk_window_set_title (GTK_WINDOW (aboutwindow), _("About SoundModem Configurator"));
  gtk_window_set_type_hint (GTK_WINDOW (aboutwindow), GDK_WINDOW_TYPE_HINT_DIALOG);

  dialog_vbox1 = gtk_dialog_get_content_area (GTK_DIALOG (aboutwindow));
  gtk_widget_show (dialog_vbox1);

  frame1 = gtk_frame_new (NULL);
  gtk_widget_show (frame1);
  gtk_box_pack_start (GTK_BOX (dialog_vbox1), frame1, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frame1), 6);
  gtk_frame_set_label_align (GTK_FRAME (frame1), 0.5, 0.5);

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

  label13 = gtk_label_new (_("Copyright 2000"));
  gtk_widget_show (label13);
  gtk_box_pack_start (GTK_BOX (vbox4), label13, TRUE, TRUE, 0);
  gtk_label_set_justify (GTK_LABEL (label13), GTK_JUSTIFY_CENTER);

  label14 = gtk_label_new (_("Thomas Sailer"));
  gtk_widget_show (label14);
  gtk_box_pack_start (GTK_BOX (vbox4), label14, TRUE, TRUE, 0);
  gtk_label_set_justify (GTK_LABEL (label14), GTK_JUSTIFY_CENTER);

  label1 = gtk_label_new (_("SoundModem Configurator"));
  gtk_widget_show (label1);
  gtk_frame_set_label_widget (GTK_FRAME (frame1), label1);

  dialog_action_area1 = gtk_dialog_get_action_area (GTK_DIALOG (aboutwindow));
  gtk_widget_show (dialog_action_area1);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);

  hbuttonbox1 = gtk_hbutton_box_new ();
  gtk_widget_show (hbuttonbox1);
  gtk_container_add (GTK_CONTAINER (dialog_action_area1), hbuttonbox1);
  gtk_box_set_spacing (GTK_BOX (hbuttonbox1), 30);

  aboutok = gtk_button_new_with_mnemonic (_("Ok"));
  gtk_widget_show (aboutok);
  gtk_container_add (GTK_CONTAINER (hbuttonbox1), aboutok);
  gtk_widget_set_can_default (aboutok, TRUE);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (aboutwindow, aboutwindow, "aboutwindow");
  GLADE_HOOKUP_OBJECT_NO_REF (aboutwindow, dialog_vbox1, "dialog_vbox1");
  GLADE_HOOKUP_OBJECT (aboutwindow, frame1, "frame1");
  GLADE_HOOKUP_OBJECT (aboutwindow, vbox4, "vbox4");
  GLADE_HOOKUP_OBJECT (aboutwindow, label13, "label13");
  GLADE_HOOKUP_OBJECT (aboutwindow, label14, "label14");
  GLADE_HOOKUP_OBJECT (aboutwindow, label1, "label1");
  GLADE_HOOKUP_OBJECT_NO_REF (aboutwindow, dialog_action_area1, "dialog_action_area1");
  GLADE_HOOKUP_OBJECT (aboutwindow, hbuttonbox1, "hbuttonbox1");
  GLADE_HOOKUP_OBJECT (aboutwindow, aboutok, "aboutok");

  return aboutwindow;
}

GtkWidget*
create_newconfigwindow (void)
{
  GtkWidget *newconfigwindow;
  GtkWidget *dialog_vbox2;
  GtkWidget *hbox2;
  GtkWidget *label15;
  GtkWidget *newconfigentry;
  GtkWidget *dialog_action_area2;
  GtkWidget *hbuttonbox2;
  GtkWidget *newconfigcancel;
  GtkWidget *newconfigok;
  GtkAccelGroup *accel_group;

  accel_group = gtk_accel_group_new ();

  newconfigwindow = gtk_dialog_new ();
  gtk_window_set_title (GTK_WINDOW (newconfigwindow), _("New Configuration"));
  gtk_window_set_type_hint (GTK_WINDOW (newconfigwindow), GDK_WINDOW_TYPE_HINT_DIALOG);

  dialog_vbox2 = gtk_dialog_get_content_area (GTK_DIALOG (newconfigwindow));
  gtk_widget_show (dialog_vbox2);

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

  label15 = gtk_label_new (_("Configuration Name"));
  gtk_widget_show (label15);
  gtk_box_pack_start (GTK_BOX (hbox2), label15, FALSE, TRUE, 0);
  gtk_label_set_justify (GTK_LABEL (label15), GTK_JUSTIFY_CENTER);
  gtk_misc_set_padding (GTK_MISC (label15), 6, 6);

  newconfigentry = gtk_entry_new ();
  gtk_widget_show (newconfigentry);
  gtk_box_pack_start (GTK_BOX (hbox2), newconfigentry, TRUE, TRUE, 6);
  gtk_entry_set_invisible_char (GTK_ENTRY (newconfigentry), 9679);

  dialog_action_area2 = gtk_dialog_get_action_area (GTK_DIALOG (newconfigwindow));
  gtk_widget_show (dialog_action_area2);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area2), GTK_BUTTONBOX_END);

  hbuttonbox2 = gtk_hbutton_box_new ();
  gtk_widget_show (hbuttonbox2);
  gtk_container_add (GTK_CONTAINER (dialog_action_area2), hbuttonbox2);
  gtk_box_set_spacing (GTK_BOX (hbuttonbox2), 30);

  newconfigcancel = gtk_button_new_with_mnemonic (_("Cancel"));
  gtk_widget_show (newconfigcancel);
  gtk_container_add (GTK_CONTAINER (hbuttonbox2), newconfigcancel);
  gtk_widget_set_can_default (newconfigcancel, TRUE);
  gtk_widget_add_accelerator (newconfigcancel, "clicked", accel_group,
                              GDK_Escape, (GdkModifierType) 0,
                              GTK_ACCEL_VISIBLE);

  newconfigok = gtk_button_new_with_mnemonic (_("OK"));
  gtk_widget_show (newconfigok);
  gtk_container_add (GTK_CONTAINER (hbuttonbox2), newconfigok);
  gtk_widget_set_can_default (newconfigok, TRUE);
  gtk_widget_add_accelerator (newconfigok, "clicked", accel_group,
                              GDK_Return, (GdkModifierType) 0,
                              GTK_ACCEL_VISIBLE);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (newconfigwindow, newconfigwindow, "newconfigwindow");
  GLADE_HOOKUP_OBJECT_NO_REF (newconfigwindow, dialog_vbox2, "dialog_vbox2");
  GLADE_HOOKUP_OBJECT (newconfigwindow, hbox2, "hbox2");
  GLADE_HOOKUP_OBJECT (newconfigwindow, label15, "label15");
  GLADE_HOOKUP_OBJECT (newconfigwindow, newconfigentry, "newconfigentry");
  GLADE_HOOKUP_OBJECT_NO_REF (newconfigwindow, dialog_action_area2, "dialog_action_area2");
  GLADE_HOOKUP_OBJECT (newconfigwindow, hbuttonbox2, "hbuttonbox2");
  GLADE_HOOKUP_OBJECT (newconfigwindow, newconfigcancel, "newconfigcancel");
  GLADE_HOOKUP_OBJECT (newconfigwindow, newconfigok, "newconfigok");

  gtk_window_add_accel_group (GTK_WINDOW (newconfigwindow), accel_group);

  return newconfigwindow;
}

GtkWidget*
create_errordialog (void)
{
  GtkWidget *errordialog;
  GtkWidget *dialog_vbox3;
  GtkWidget *errorlabel;
  GtkWidget *dialog_action_area3;
  GtkWidget *hbuttonbox3;
  GtkWidget *errorok;
  GtkAccelGroup *accel_group;

  accel_group = gtk_accel_group_new ();

  errordialog = gtk_dialog_new ();
  gtk_window_set_title (GTK_WINDOW (errordialog), _("Error"));
  gtk_window_set_modal (GTK_WINDOW (errordialog), TRUE);
  gtk_window_set_type_hint (GTK_WINDOW (errordialog), GDK_WINDOW_TYPE_HINT_DIALOG);

  dialog_vbox3 = gtk_dialog_get_content_area (GTK_DIALOG (errordialog));
  gtk_widget_show (dialog_vbox3);

  errorlabel = gtk_label_new (_("Error"));
  gtk_widget_show (errorlabel);
  gtk_box_pack_start (GTK_BOX (dialog_vbox3), errorlabel, TRUE, TRUE, 0);
  gtk_label_set_justify (GTK_LABEL (errorlabel), GTK_JUSTIFY_CENTER);
  gtk_label_set_line_wrap (GTK_LABEL (errorlabel), TRUE);
  gtk_misc_set_padding (GTK_MISC (errorlabel), 6, 6);

  dialog_action_area3 = gtk_dialog_get_action_area (GTK_DIALOG (errordialog));
  gtk_widget_show (dialog_action_area3);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area3), GTK_BUTTONBOX_END);

  hbuttonbox3 = gtk_hbutton_box_new ();
  gtk_widget_show (hbuttonbox3);
  gtk_container_add (GTK_CONTAINER (dialog_action_area3), hbuttonbox3);
  gtk_box_set_spacing (GTK_BOX (hbuttonbox3), 30);

  errorok = gtk_button_new_with_mnemonic (_("OK"));
  gtk_widget_show (errorok);
  gtk_container_add (GTK_CONTAINER (hbuttonbox3), errorok);
  gtk_widget_set_can_default (errorok, TRUE);
  gtk_widget_add_accelerator (errorok, "clicked", accel_group,
                              GDK_Return, (GdkModifierType) 0,
                              GTK_ACCEL_VISIBLE);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (errordialog, errordialog, "errordialog");
  GLADE_HOOKUP_OBJECT_NO_REF (errordialog, dialog_vbox3, "dialog_vbox3");
  GLADE_HOOKUP_OBJECT (errordialog, errorlabel, "errorlabel");
  GLADE_HOOKUP_OBJECT_NO_REF (errordialog, dialog_action_area3, "dialog_action_area3");
  GLADE_HOOKUP_OBJECT (errordialog, hbuttonbox3, "hbuttonbox3");
  GLADE_HOOKUP_OBJECT (errordialog, errorok, "errorok");

  gtk_window_add_accel_group (GTK_WINDOW (errordialog), accel_group);

  return errordialog;
}

GtkWidget*
create_specwindow (void)
{
  GtkWidget *specwindow;
  GtkWidget *vbox1;
  GtkWidget *hbox1;
  GtkWidget *label1;
  GtkWidget *specfreqpointer;
  GtkWidget *label25;
  GtkWidget *ptt;
  GtkWidget *label20;
  GtkWidget *ledptt;
  GtkWidget *label19;
  GtkWidget *leddcd;
  GtkWidget *frame4;
  GtkWidget *spec;
  GtkWidget *label26;

  specwindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (specwindow), _("Spectrum Display"));

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

  hbox1 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox1);
  gtk_box_pack_start (GTK_BOX (vbox1), hbox1, FALSE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (hbox1), 4);

  label1 = gtk_label_new (_("Pointer"));
  gtk_widget_show (label1);
  gtk_box_pack_start (GTK_BOX (hbox1), label1, FALSE, TRUE, 0);
  gtk_label_set_justify (GTK_LABEL (label1), GTK_JUSTIFY_CENTER);

  specfreqpointer = gtk_entry_new ();
  gtk_widget_show (specfreqpointer);
  gtk_box_pack_start (GTK_BOX (hbox1), specfreqpointer, FALSE, TRUE, 4);
  gtk_widget_set_can_focus (specfreqpointer, FALSE);
  gtk_editable_set_editable (GTK_EDITABLE (specfreqpointer), FALSE);
  gtk_entry_set_invisible_char (GTK_ENTRY (specfreqpointer), 9679);

  label25 = gtk_label_new ("");
  gtk_widget_show (label25);
  gtk_box_pack_start (GTK_BOX (hbox1), label25, TRUE, TRUE, 0);
  gtk_label_set_justify (GTK_LABEL (label25), GTK_JUSTIFY_CENTER);

  ptt = gtk_toggle_button_new_with_mnemonic (_("PTT"));
  gtk_widget_show (ptt);
  gtk_box_pack_start (GTK_BOX (hbox1), ptt, FALSE, TRUE, 4);
  gtk_widget_set_can_focus (ptt, FALSE);

  label20 = gtk_label_new (_("PTT"));
  gtk_widget_show (label20);
  gtk_box_pack_start (GTK_BOX (hbox1), label20, FALSE, TRUE, 0);
  gtk_label_set_justify (GTK_LABEL (label20), GTK_JUSTIFY_CENTER);
  gtk_misc_set_padding (GTK_MISC (label20), 7, 0);

  ledptt = create_led_pixmap ("ledptt", "", "", 0, 0);
  gtk_widget_show (ledptt);
  gtk_box_pack_start (GTK_BOX (hbox1), ledptt, FALSE, TRUE, 4);
  gtk_widget_set_can_focus (ledptt, FALSE);
  gtk_widget_set_can_default (ledptt, FALSE);

  label19 = gtk_label_new (_("DCD"));
  gtk_widget_show (label19);
  gtk_box_pack_start (GTK_BOX (hbox1), label19, FALSE, TRUE, 0);
  gtk_label_set_justify (GTK_LABEL (label19), GTK_JUSTIFY_CENTER);
  gtk_misc_set_padding (GTK_MISC (label19), 7, 0);

  leddcd = create_led_pixmap ("leddcd", "", "", 0, 0);
  gtk_widget_show (leddcd);
  gtk_box_pack_start (GTK_BOX (hbox1), leddcd, FALSE, TRUE, 4);
  gtk_widget_set_can_focus (leddcd, FALSE);
  gtk_widget_set_can_default (leddcd, FALSE);

  frame4 = gtk_frame_new (NULL);
  gtk_widget_show (frame4);
  gtk_box_pack_start (GTK_BOX (vbox1), frame4, FALSE, FALSE, 0);

  spec = spectrum_new ("spec", "", "", 0, 0);
  gtk_widget_show (spec);
  gtk_container_add (GTK_CONTAINER (frame4), spec);
  gtk_widget_set_size_request (spec, 512, 384);
  gtk_widget_set_can_focus (spec, TRUE);
  gtk_widget_set_can_default (spec, FALSE);
  gtk_widget_set_events (spec, GDK_POINTER_MOTION_MASK);

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

  g_signal_connect ((gpointer) specwindow, "delete_event",
                    G_CALLBACK (on_specwindow_delete_event),
                    NULL);
  g_signal_connect ((gpointer) ptt, "toggled",
                    G_CALLBACK (on_ptt_toggled),
                    NULL);
  g_signal_connect ((gpointer) spec, "motion_notify_event",
                    G_CALLBACK (on_spec_motion_event),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (specwindow, specwindow, "specwindow");
  GLADE_HOOKUP_OBJECT (specwindow, vbox1, "vbox1");
  GLADE_HOOKUP_OBJECT (specwindow, hbox1, "hbox1");
  GLADE_HOOKUP_OBJECT (specwindow, label1, "label1");
  GLADE_HOOKUP_OBJECT (specwindow, specfreqpointer, "specfreqpointer");
  GLADE_HOOKUP_OBJECT (specwindow, label25, "label25");
  GLADE_HOOKUP_OBJECT (specwindow, ptt, "ptt");
  GLADE_HOOKUP_OBJECT (specwindow, label20, "label20");
  GLADE_HOOKUP_OBJECT (specwindow, ledptt, "ledptt");
  GLADE_HOOKUP_OBJECT (specwindow, label19, "label19");
  GLADE_HOOKUP_OBJECT (specwindow, leddcd, "leddcd");
  GLADE_HOOKUP_OBJECT (specwindow, frame4, "frame4");
  GLADE_HOOKUP_OBJECT (specwindow, spec, "spec");
  GLADE_HOOKUP_OBJECT (specwindow, label26, "label26");

  return specwindow;
}

GtkWidget*
create_scopewindow (void)
{
  GtkWidget *scopewindow;
  GtkWidget *vbox5;
  GtkWidget *hbox2;
  GtkWidget *dcdfreeze;
  GtkWidget *label26;
  GtkWidget *ptt;
  GtkWidget *label21;
  GtkWidget *ledptt;
  GtkWidget *label22;
  GtkWidget *leddcd;
  GtkWidget *frame5;
  GtkWidget *scope;
  GtkWidget *label27;

  scopewindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (scopewindow), _("Scope"));

  vbox5 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox5);
  gtk_container_add (GTK_CONTAINER (scopewindow), vbox5);

  hbox2 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox2);
  gtk_box_pack_start (GTK_BOX (vbox5), hbox2, FALSE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (hbox2), 4);

  dcdfreeze = gtk_toggle_button_new_with_mnemonic (_("Freeze when not DCD"));
  gtk_widget_show (dcdfreeze);
  gtk_box_pack_start (GTK_BOX (hbox2), dcdfreeze, FALSE, FALSE, 4);

  label26 = gtk_label_new ("");
  gtk_widget_show (label26);
  gtk_box_pack_start (GTK_BOX (hbox2), label26, TRUE, TRUE, 0);
  gtk_label_set_justify (GTK_LABEL (label26), GTK_JUSTIFY_CENTER);

  ptt = gtk_toggle_button_new_with_mnemonic (_("PTT"));
  gtk_widget_show (ptt);
  gtk_box_pack_start (GTK_BOX (hbox2), ptt, FALSE, FALSE, 4);

  label21 = gtk_label_new (_("PTT"));
  gtk_widget_show (label21);
  gtk_box_pack_start (GTK_BOX (hbox2), label21, FALSE, TRUE, 0);
  gtk_label_set_justify (GTK_LABEL (label21), GTK_JUSTIFY_CENTER);
  gtk_misc_set_padding (GTK_MISC (label21), 7, 0);

  ledptt = create_led_pixmap ("ledptt", "", "", 0, 0);
  gtk_widget_show (ledptt);
  gtk_box_pack_start (GTK_BOX (hbox2), ledptt, FALSE, TRUE, 4);
  gtk_widget_set_can_focus (ledptt, FALSE);
  gtk_widget_set_can_default (ledptt, FALSE);

  label22 = gtk_label_new (_("DCD"));
  gtk_widget_show (label22);
  gtk_box_pack_start (GTK_BOX (hbox2), label22, FALSE, TRUE, 0);
  gtk_label_set_justify (GTK_LABEL (label22), GTK_JUSTIFY_CENTER);
  gtk_misc_set_padding (GTK_MISC (label22), 7, 0);

  leddcd = create_led_pixmap ("leddcd", "", "", 0, 0);
  gtk_widget_show (leddcd);
  gtk_box_pack_start (GTK_BOX (hbox2), leddcd, FALSE, TRUE, 4);
  gtk_widget_set_can_focus (leddcd, FALSE);
  gtk_widget_set_can_default (leddcd, FALSE);

  frame5 = gtk_frame_new (NULL);
  gtk_widget_show (frame5);
  gtk_box_pack_start (GTK_BOX (vbox5), frame5, FALSE, FALSE, 0);

  scope = scope_new ("scope", "", "", 0, 0);
  gtk_widget_show (scope);
  gtk_container_add (GTK_CONTAINER (frame5), scope);
  gtk_widget_set_size_request (scope, 512, 384);
  gtk_widget_set_can_focus (scope, TRUE);
  gtk_widget_set_can_default (scope, FALSE);

  label27 = gtk_label_new (_("Scope"));
  gtk_widget_show (label27);
  gtk_frame_set_label_widget (GTK_FRAME (frame5), label27);

  g_signal_connect ((gpointer) scopewindow, "delete_event",
                    G_CALLBACK (on_scopewindow_delete_event),
                    NULL);
  g_signal_connect ((gpointer) dcdfreeze, "toggled",
                    G_CALLBACK (on_dcdfreeze_toggled),
                    NULL);
  g_signal_connect ((gpointer) ptt, "toggled",
                    G_CALLBACK (on_ptt_toggled),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (scopewindow, scopewindow, "scopewindow");
  GLADE_HOOKUP_OBJECT (scopewindow, vbox5, "vbox5");
  GLADE_HOOKUP_OBJECT (scopewindow, hbox2, "hbox2");
  GLADE_HOOKUP_OBJECT (scopewindow, dcdfreeze, "dcdfreeze");
  GLADE_HOOKUP_OBJECT (scopewindow, label26, "label26");
  GLADE_HOOKUP_OBJECT (scopewindow, ptt, "ptt");
  GLADE_HOOKUP_OBJECT (scopewindow, label21, "label21");
  GLADE_HOOKUP_OBJECT (scopewindow, ledptt, "ledptt");
  GLADE_HOOKUP_OBJECT (scopewindow, label22, "label22");
  GLADE_HOOKUP_OBJECT (scopewindow, leddcd, "leddcd");
  GLADE_HOOKUP_OBJECT (scopewindow, frame5, "frame5");
  GLADE_HOOKUP_OBJECT (scopewindow, scope, "scope");
  GLADE_HOOKUP_OBJECT (scopewindow, label27, "label27");

  return scopewindow;
}

GtkWidget*
create_receivewindow (void)
{
  GtkWidget *receivewindow;
  GtkWidget *vbox6;
  GtkWidget *hbox3;
  GtkWidget *clearbutton;
  GtkWidget *label7;
  GtkWidget *count0;
  GtkWidget *label17;
  GtkWidget *count1;
  GtkWidget *label18;
  GtkWidget *counttot;
  GtkWidget *label27;
  GtkWidget *ptt;
  GtkWidget *label23;
  GtkWidget *ledptt;
  GtkWidget *label24;
  GtkWidget *leddcd;
  GtkWidget *vpaned1;
  GtkWidget *frame6;
  GtkWidget *scrolledwindow2;
  GtkWidget *packettext;
  GtkWidget *label28;
  GtkWidget *frame7;
  GtkWidget *scrolledwindow3;
  GtkWidget *bitstext;
  GtkWidget *label29;

  receivewindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (receivewindow), _("Receive Packets/Bits"));

  vbox6 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox6);
  gtk_container_add (GTK_CONTAINER (receivewindow), vbox6);

  hbox3 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox3);
  gtk_box_pack_start (GTK_BOX (vbox6), hbox3, FALSE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (hbox3), 4);

  clearbutton = gtk_button_new_with_mnemonic (_("Clear Count"));
  gtk_widget_show (clearbutton);
  gtk_box_pack_start (GTK_BOX (hbox3), clearbutton, FALSE, FALSE, 4);

  label7 = gtk_label_new (_("Zeros"));
  gtk_widget_show (label7);
  gtk_box_pack_start (GTK_BOX (hbox3), label7, FALSE, FALSE, 3);
  gtk_label_set_justify (GTK_LABEL (label7), GTK_JUSTIFY_CENTER);

  count0 = gtk_entry_new ();
  gtk_widget_show (count0);
  gtk_box_pack_start (GTK_BOX (hbox3), count0, FALSE, TRUE, 4);
  gtk_widget_set_size_request (count0, 60, -1);
  gtk_widget_set_can_focus (count0, FALSE);
  gtk_editable_set_editable (GTK_EDITABLE (count0), FALSE);
  gtk_entry_set_invisible_char (GTK_ENTRY (count0), 9679);

  label17 = gtk_label_new (_("Ones"));
  gtk_widget_show (label17);
  gtk_box_pack_start (GTK_BOX (hbox3), label17, FALSE, FALSE, 3);
  gtk_label_set_justify (GTK_LABEL (label17), GTK_JUSTIFY_CENTER);

  count1 = gtk_entry_new ();
  gtk_widget_show (count1);
  gtk_box_pack_start (GTK_BOX (hbox3), count1, FALSE, TRUE, 0);
  gtk_widget_set_size_request (count1, 60, -1);
  gtk_widget_set_can_focus (count1, FALSE);
  gtk_editable_set_editable (GTK_EDITABLE (count1), FALSE);
  gtk_entry_set_invisible_char (GTK_ENTRY (count1), 9679);

  label18 = gtk_label_new (_("Total"));
  gtk_widget_show (label18);
  gtk_box_pack_start (GTK_BOX (hbox3), label18, FALSE, FALSE, 3);
  gtk_label_set_justify (GTK_LABEL (label18), GTK_JUSTIFY_CENTER);

  counttot = gtk_entry_new ();
  gtk_widget_show (counttot);
  gtk_box_pack_start (GTK_BOX (hbox3), counttot, FALSE, TRUE, 0);
  gtk_widget_set_size_request (counttot, 60, -1);
  gtk_widget_set_can_focus (counttot, FALSE);
  gtk_editable_set_editable (GTK_EDITABLE (counttot), FALSE);
  gtk_entry_set_invisible_char (GTK_ENTRY (counttot), 9679);

  label27 = gtk_label_new ("");
  gtk_widget_show (label27);
  gtk_box_pack_start (GTK_BOX (hbox3), label27, TRUE, TRUE, 0);
  gtk_label_set_justify (GTK_LABEL (label27), GTK_JUSTIFY_CENTER);

  ptt = gtk_toggle_button_new_with_mnemonic (_("PTT"));
  gtk_widget_show (ptt);
  gtk_box_pack_start (GTK_BOX (hbox3), ptt, FALSE, FALSE, 4);

  label23 = gtk_label_new (_("PTT"));
  gtk_widget_show (label23);
  gtk_box_pack_start (GTK_BOX (hbox3), label23, FALSE, TRUE, 0);
  gtk_label_set_justify (GTK_LABEL (label23), GTK_JUSTIFY_CENTER);
  gtk_misc_set_padding (GTK_MISC (label23), 7, 0);

  ledptt = create_led_pixmap ("ledptt", "", "", 0, 0);
  gtk_widget_show (ledptt);
  gtk_box_pack_start (GTK_BOX (hbox3), ledptt, FALSE, TRUE, 4);
  gtk_widget_set_can_focus (ledptt, FALSE);
  gtk_widget_set_can_default (ledptt, FALSE);

  label24 = gtk_label_new (_("DCD"));
  gtk_widget_show (label24);
  gtk_box_pack_start (GTK_BOX (hbox3), label24, FALSE, TRUE, 0);
  gtk_label_set_justify (GTK_LABEL (label24), GTK_JUSTIFY_CENTER);
  gtk_misc_set_padding (GTK_MISC (label24), 7, 0);

  leddcd = create_led_pixmap ("leddcd", "", "", 0, 0);
  gtk_widget_show (leddcd);
  gtk_box_pack_start (GTK_BOX (hbox3), leddcd, FALSE, TRUE, 4);
  gtk_widget_set_can_focus (leddcd, FALSE);
  gtk_widget_set_can_default (leddcd, FALSE);

  vpaned1 = gtk_vpaned_new ();
  gtk_widget_show (vpaned1);
  gtk_box_pack_start (GTK_BOX (vbox6), vpaned1, TRUE, TRUE, 0);
  gtk_widget_set_can_focus (vpaned1, FALSE);

  frame6 = gtk_frame_new (NULL);
  gtk_widget_show (frame6);
  gtk_paned_pack1 (GTK_PANED (vpaned1), frame6, TRUE, TRUE);

  scrolledwindow2 = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_show (scrolledwindow2);
  gtk_container_add (GTK_CONTAINER (frame6), scrolledwindow2);
  gtk_widget_set_can_focus (scrolledwindow2, FALSE);
  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow2), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow2), GTK_SHADOW_IN);

  packettext = gtk_text_view_new ();
  gtk_widget_show (packettext);
  gtk_container_add (GTK_CONTAINER (scrolledwindow2), packettext);
  gtk_widget_set_can_focus (packettext, FALSE);
  gtk_text_view_set_editable (GTK_TEXT_VIEW (packettext), FALSE);
  gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (packettext), GTK_WRAP_WORD);

  label28 = gtk_label_new (_("Received Packets"));
  gtk_widget_show (label28);
  gtk_frame_set_label_widget (GTK_FRAME (frame6), label28);

  frame7 = gtk_frame_new (NULL);
  gtk_widget_show (frame7);
  gtk_paned_pack2 (GTK_PANED (vpaned1), frame7, TRUE, TRUE);

  scrolledwindow3 = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_show (scrolledwindow3);
  gtk_container_add (GTK_CONTAINER (frame7), scrolledwindow3);
  gtk_widget_set_can_focus (scrolledwindow3, FALSE);
  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow3), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow3), GTK_SHADOW_IN);

  bitstext = gtk_text_view_new ();
  gtk_widget_show (bitstext);
  gtk_container_add (GTK_CONTAINER (scrolledwindow3), bitstext);
  gtk_widget_set_can_focus (bitstext, FALSE);
  gtk_text_view_set_editable (GTK_TEXT_VIEW (bitstext), FALSE);
  gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (bitstext), GTK_WRAP_CHAR);

  label29 = gtk_label_new (_("Received Bits"));
  gtk_widget_show (label29);
  gtk_frame_set_label_widget (GTK_FRAME (frame7), label29);

  g_signal_connect ((gpointer) receivewindow, "delete_event",
                    G_CALLBACK (on_receivewindow_delete_event),
                    NULL);
  g_signal_connect ((gpointer) clearbutton, "clicked",
                    G_CALLBACK (on_clearbutton_clicked),
                    NULL);
  g_signal_connect ((gpointer) ptt, "toggled",
                    G_CALLBACK (on_ptt_toggled),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (receivewindow, receivewindow, "receivewindow");
  GLADE_HOOKUP_OBJECT (receivewindow, vbox6, "vbox6");
  GLADE_HOOKUP_OBJECT (receivewindow, hbox3, "hbox3");
  GLADE_HOOKUP_OBJECT (receivewindow, clearbutton, "clearbutton");
  GLADE_HOOKUP_OBJECT (receivewindow, label7, "label7");
  GLADE_HOOKUP_OBJECT (receivewindow, count0, "count0");
  GLADE_HOOKUP_OBJECT (receivewindow, label17, "label17");
  GLADE_HOOKUP_OBJECT (receivewindow, count1, "count1");
  GLADE_HOOKUP_OBJECT (receivewindow, label18, "label18");
  GLADE_HOOKUP_OBJECT (receivewindow, counttot, "counttot");
  GLADE_HOOKUP_OBJECT (receivewindow, label27, "label27");
  GLADE_HOOKUP_OBJECT (receivewindow, ptt, "ptt");
  GLADE_HOOKUP_OBJECT (receivewindow, label23, "label23");
  GLADE_HOOKUP_OBJECT (receivewindow, ledptt, "ledptt");
  GLADE_HOOKUP_OBJECT (receivewindow, label24, "label24");
  GLADE_HOOKUP_OBJECT (receivewindow, leddcd, "leddcd");
  GLADE_HOOKUP_OBJECT (receivewindow, vpaned1, "vpaned1");
  GLADE_HOOKUP_OBJECT (receivewindow, frame6, "frame6");
  GLADE_HOOKUP_OBJECT (receivewindow, scrolledwindow2, "scrolledwindow2");
  GLADE_HOOKUP_OBJECT (receivewindow, packettext, "packettext");
  GLADE_HOOKUP_OBJECT (receivewindow, label28, "label28");
  GLADE_HOOKUP_OBJECT (receivewindow, frame7, "frame7");
  GLADE_HOOKUP_OBJECT (receivewindow, scrolledwindow3, "scrolledwindow3");
  GLADE_HOOKUP_OBJECT (receivewindow, bitstext, "bitstext");
  GLADE_HOOKUP_OBJECT (receivewindow, label29, "label29");

  return receivewindow;
}

GtkWidget*
create_p3dwindow (void)
{
  GtkWidget *p3dwindow;
  GtkWidget *vbox6;
  GtkWidget *hbox3;
  GtkWidget *label7;
  GtkWidget *rxstatus;
  GtkWidget *label17;
  GtkWidget *carrierfreq;
  GtkWidget *label18;
  GtkWidget *buttonpassall;
  GtkWidget *vpaned1;
  GtkWidget *frame6;
  GtkWidget *scrolledwindow2;
  GtkWidget *packetcooked;
  GtkWidget *label30;
  GtkWidget *frame7;
  GtkWidget *scrolledwindow3;
  GtkWidget *packetraw;
  GtkWidget *label31;

  p3dwindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (p3dwindow), _("AO-40 Phase 3D Receive Window"));

  vbox6 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox6);
  gtk_container_add (GTK_CONTAINER (p3dwindow), vbox6);

  hbox3 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox3);
  gtk_box_pack_start (GTK_BOX (vbox6), hbox3, FALSE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (hbox3), 4);

  label7 = gtk_label_new (_("Receiver Status"));
  gtk_widget_show (label7);
  gtk_box_pack_start (GTK_BOX (hbox3), label7, FALSE, FALSE, 3);
  gtk_label_set_justify (GTK_LABEL (label7), GTK_JUSTIFY_CENTER);

  rxstatus = gtk_entry_new ();
  gtk_widget_show (rxstatus);
  gtk_box_pack_start (GTK_BOX (hbox3), rxstatus, FALSE, TRUE, 4);
  gtk_widget_set_size_request (rxstatus, 120, -1);
  gtk_widget_set_can_focus (rxstatus, FALSE);
  gtk_editable_set_editable (GTK_EDITABLE (rxstatus), FALSE);
  gtk_entry_set_invisible_char (GTK_ENTRY (rxstatus), 9679);

  label17 = gtk_label_new (_("Carrier Frequency"));
  gtk_widget_show (label17);
  gtk_box_pack_start (GTK_BOX (hbox3), label17, FALSE, FALSE, 3);
  gtk_label_set_justify (GTK_LABEL (label17), GTK_JUSTIFY_CENTER);

  carrierfreq = gtk_entry_new ();
  gtk_widget_show (carrierfreq);
  gtk_box_pack_start (GTK_BOX (hbox3), carrierfreq, FALSE, TRUE, 0);
  gtk_widget_set_size_request (carrierfreq, 60, -1);
  gtk_widget_set_can_focus (carrierfreq, FALSE);
  gtk_editable_set_editable (GTK_EDITABLE (carrierfreq), FALSE);
  gtk_entry_set_invisible_char (GTK_ENTRY (carrierfreq), 9679);

  label18 = gtk_label_new (_("Hz"));
  gtk_widget_show (label18);
  gtk_box_pack_start (GTK_BOX (hbox3), label18, FALSE, FALSE, 3);
  gtk_label_set_justify (GTK_LABEL (label18), GTK_JUSTIFY_CENTER);

  buttonpassall = gtk_toggle_button_new_with_mnemonic (_("Decode All Packets (Faulty CRC)"));
  gtk_widget_show (buttonpassall);
  gtk_box_pack_end (GTK_BOX (hbox3), buttonpassall, FALSE, FALSE, 0);

  vpaned1 = gtk_vpaned_new ();
  gtk_widget_show (vpaned1);
  gtk_box_pack_start (GTK_BOX (vbox6), vpaned1, TRUE, TRUE, 0);
  gtk_widget_set_can_focus (vpaned1, FALSE);

  frame6 = gtk_frame_new (NULL);
  gtk_widget_show (frame6);
  gtk_paned_pack1 (GTK_PANED (vpaned1), frame6, TRUE, TRUE);

  scrolledwindow2 = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_show (scrolledwindow2);
  gtk_container_add (GTK_CONTAINER (frame6), scrolledwindow2);
  gtk_widget_set_can_focus (scrolledwindow2, FALSE);
  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow2), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow2), GTK_SHADOW_IN);

  packetcooked = gtk_text_view_new ();
  gtk_widget_show (packetcooked);
  gtk_container_add (GTK_CONTAINER (scrolledwindow2), packetcooked);
  gtk_widget_set_can_focus (packetcooked, FALSE);
  gtk_text_view_set_editable (GTK_TEXT_VIEW (packetcooked), FALSE);
  gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (packetcooked), GTK_WRAP_CHAR);

  label30 = gtk_label_new (_("Received Decoded Packets"));
  gtk_widget_show (label30);
  gtk_frame_set_label_widget (GTK_FRAME (frame6), label30);

  frame7 = gtk_frame_new (NULL);
  gtk_widget_show (frame7);
  gtk_paned_pack2 (GTK_PANED (vpaned1), frame7, TRUE, TRUE);

  scrolledwindow3 = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_show (scrolledwindow3);
  gtk_container_add (GTK_CONTAINER (frame7), scrolledwindow3);
  gtk_widget_set_can_focus (scrolledwindow3, FALSE);
  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow3), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow3), GTK_SHADOW_IN);

  packetraw = gtk_text_view_new ();
  gtk_widget_show (packetraw);
  gtk_container_add (GTK_CONTAINER (scrolledwindow3), packetraw);
  gtk_widget_set_can_focus (packetraw, FALSE);
  gtk_text_view_set_editable (GTK_TEXT_VIEW (packetraw), FALSE);
  gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (packetraw), GTK_WRAP_CHAR);

  label31 = gtk_label_new (_("Received Raw Packets"));
  gtk_widget_show (label31);
  gtk_frame_set_label_widget (GTK_FRAME (frame7), label31);

  g_signal_connect ((gpointer) p3dwindow, "delete_event",
                    G_CALLBACK (on_p3dwindow_delete_event),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (p3dwindow, p3dwindow, "p3dwindow");
  GLADE_HOOKUP_OBJECT (p3dwindow, vbox6, "vbox6");
  GLADE_HOOKUP_OBJECT (p3dwindow, hbox3, "hbox3");
  GLADE_HOOKUP_OBJECT (p3dwindow, label7, "label7");
  GLADE_HOOKUP_OBJECT (p3dwindow, rxstatus, "rxstatus");
  GLADE_HOOKUP_OBJECT (p3dwindow, label17, "label17");
  GLADE_HOOKUP_OBJECT (p3dwindow, carrierfreq, "carrierfreq");
  GLADE_HOOKUP_OBJECT (p3dwindow, label18, "label18");
  GLADE_HOOKUP_OBJECT (p3dwindow, buttonpassall, "buttonpassall");
  GLADE_HOOKUP_OBJECT (p3dwindow, vpaned1, "vpaned1");
  GLADE_HOOKUP_OBJECT (p3dwindow, frame6, "frame6");
  GLADE_HOOKUP_OBJECT (p3dwindow, scrolledwindow2, "scrolledwindow2");
  GLADE_HOOKUP_OBJECT (p3dwindow, packetcooked, "packetcooked");
  GLADE_HOOKUP_OBJECT (p3dwindow, label30, "label30");
  GLADE_HOOKUP_OBJECT (p3dwindow, frame7, "frame7");
  GLADE_HOOKUP_OBJECT (p3dwindow, scrolledwindow3, "scrolledwindow3");
  GLADE_HOOKUP_OBJECT (p3dwindow, packetraw, "packetraw");
  GLADE_HOOKUP_OBJECT (p3dwindow, label31, "label31");

  return p3dwindow;
}

