/*
 * 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 <bonobo.h>
#include <gnome.h>

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

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

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

static GnomeUIInfo menu1_uiinfo[] =
{
  GNOMEUIINFO_END
};

GtkWidget*
create_wnd_options (void)
{
  GtkWidget *wnd_options;
  GtkWidget *vbox1;
  GtkWidget *notebook1;
  GtkWidget *vbox2;
  GtkWidget *label11;
  GtkWidget *hbox1;
  GtkWidget *label12;
  GtkWidget *table1;
  GtkWidget *label13;
  GtkWidget *label14;
  GtkWidget *lbl_passwd;
  GtkWidget *txt_timeout;
  GtkWidget *txt_sockaddr;
  GtkWidget *label19;
  GtkWidget *om_type;
  GtkWidget *menu1;
  GtkWidget *om_speed;
  GtkWidget *label20;
  GtkWidget *hbox2;
  GtkWidget *label21;
  GtkWidget *table2;
  GtkWidget *label22;
  GtkWidget *label23;
  GtkWidget *txt_username;
  GtkWidget *txt_id;
  GtkWidget *hbuttonbox3;
  GtkWidget *btn_getUsername;
  GtkWidget *alignment1;
  GtkWidget *hbox3;
  GtkWidget *image1;
  GtkWidget *label24;
  GtkWidget *btn_setUsername;
  GtkWidget *alignment2;
  GtkWidget *hbox4;
  GtkWidget *image2;
  GtkWidget *label25;
  GtkWidget *label29;
  GtkWidget *hbox5;
  GtkWidget *label28;
  GtkWidget *vbox4;
  GtkWidget *opt_sync;
  GSList *opt_sync_group = NULL;
  GtkWidget *opt_ask;
  GtkWidget *opt_abort;
  GtkWidget *lbl_nbk1;
  GtkWidget *vbox3;
  GtkWidget *label16;
  GtkWidget *hbox6;
  GtkWidget *label30;
  GtkWidget *cmb_debug;
  GList *cmb_debug_items = NULL;
  GtkWidget *combo_entry1;
  GtkWidget *label27;
  GtkWidget *chk_popup;
  GtkWidget *label31;
  GtkWidget *hbox7;
  GtkWidget *label32;
  GtkWidget *cmb_codepage;
  GList *cmb_codepage_items = NULL;
  GtkWidget *entry1;
  GtkWidget *label15;
  GtkWidget *hseparator10;
  GtkWidget *hbuttonbox2;
  GtkWidget *btn_cancel;
  GtkWidget *btn_ok;

  wnd_options = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_widget_set_name (wnd_options, "wnd_options");
  gtk_window_set_title (GTK_WINDOW (wnd_options), "Preferences");
  gtk_window_set_destroy_with_parent (GTK_WINDOW (wnd_options), TRUE);

  vbox1 = gtk_vbox_new (FALSE, 6);
  gtk_widget_set_name (vbox1, "vbox1");
  gtk_widget_show (vbox1);
  gtk_container_add (GTK_CONTAINER (wnd_options), vbox1);
  gtk_container_set_border_width (GTK_CONTAINER (vbox1), 12);

  notebook1 = gtk_notebook_new ();
  gtk_widget_set_name (notebook1, "notebook1");
  gtk_widget_show (notebook1);
  gtk_box_pack_start (GTK_BOX (vbox1), notebook1, TRUE, TRUE, 0);

  vbox2 = gtk_vbox_new (FALSE, 6);
  gtk_widget_set_name (vbox2, "vbox2");
  gtk_widget_show (vbox2);
  gtk_container_add (GTK_CONTAINER (notebook1), vbox2);
  gtk_container_set_border_width (GTK_CONTAINER (vbox2), 6);

  label11 = gtk_label_new_with_mnemonic ("<span weight='bold'>Connection:</span>");
  gtk_widget_set_name (label11, "label11");
  gtk_widget_show (label11);
  gtk_box_pack_start (GTK_BOX (vbox2), label11, FALSE, FALSE, 0);
  gtk_label_set_use_markup (GTK_LABEL (label11), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label11), 0, 0.5);

  hbox1 = gtk_hbox_new (FALSE, 0);
  gtk_widget_set_name (hbox1, "hbox1");
  gtk_widget_show (hbox1);
  gtk_box_pack_start (GTK_BOX (vbox2), hbox1, FALSE, TRUE, 0);

  label12 = gtk_label_new ("    ");
  gtk_widget_set_name (label12, "label12");
  gtk_widget_show (label12);
  gtk_box_pack_start (GTK_BOX (hbox1), label12, FALSE, FALSE, 0);

  table1 = gtk_table_new (4, 2, FALSE);
  gtk_widget_set_name (table1, "table1");
  gtk_widget_show (table1);
  gtk_box_pack_start (GTK_BOX (hbox1), table1, TRUE, TRUE, 0);
  gtk_table_set_row_spacings (GTK_TABLE (table1), 6);
  gtk_table_set_col_spacings (GTK_TABLE (table1), 12);

  label13 = gtk_label_new_with_mnemonic ("Port:");
  gtk_widget_set_name (label13, "label13");
  gtk_widget_show (label13);
  gtk_table_attach (GTK_TABLE (table1), label13, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label13), 0, 0.5);

  label14 = gtk_label_new ("Speed");
  gtk_widget_set_name (label14, "label14");
  gtk_widget_show (label14);
  gtk_table_attach (GTK_TABLE (table1), label14, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label14), 0, 0.5);

  lbl_passwd = gtk_label_new ("Timeout");
  gtk_widget_set_name (lbl_passwd, "lbl_passwd");
  gtk_widget_show (lbl_passwd);
  gtk_table_attach (GTK_TABLE (table1), lbl_passwd, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_line_wrap (GTK_LABEL (lbl_passwd), TRUE);
  gtk_misc_set_alignment (GTK_MISC (lbl_passwd), 0, 0.5);

  txt_timeout = gtk_entry_new ();
  gtk_widget_set_name (txt_timeout, "txt_timeout");
  gtk_widget_show (txt_timeout);
  gtk_table_attach (GTK_TABLE (table1), txt_timeout, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_entry_set_text (GTK_ENTRY (txt_timeout), "10");

  txt_sockaddr = gtk_entry_new ();
  gtk_widget_set_name (txt_sockaddr, "txt_sockaddr");
  gtk_widget_show (txt_sockaddr);
  gtk_table_attach (GTK_TABLE (table1), txt_sockaddr, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_widget_set_size_request (txt_sockaddr, 40, 23);
  gtk_entry_set_text (GTK_ENTRY (txt_sockaddr), "/dev/pilot");

  label19 = gtk_label_new ("Type");
  gtk_widget_set_name (label19, "label19");
  gtk_widget_show (label19);
  gtk_table_attach (GTK_TABLE (table1), label19, 0, 1, 3, 4,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label19), 0, 0.5);

  om_type = gtk_option_menu_new ();
  gtk_widget_set_name (om_type, "om_type");
  gtk_widget_show (om_type);
  gtk_table_attach (GTK_TABLE (table1), om_type, 1, 2, 3, 4,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  menu1 = gtk_menu_new ();
  gtk_widget_set_name (menu1, "menu1");
  gnome_app_fill_menu (GTK_MENU_SHELL (menu1), menu1_uiinfo,
                       NULL, FALSE, 0);

  gtk_option_menu_set_menu (GTK_OPTION_MENU (om_type), menu1);

  om_speed = gtk_option_menu_new ();
  gtk_widget_set_name (om_speed, "om_speed");
  gtk_widget_show (om_speed);
  gtk_table_attach (GTK_TABLE (table1), om_speed, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  label20 = gtk_label_new_with_mnemonic ("<span weight='bold'>User:</span>");
  gtk_widget_set_name (label20, "label20");
  gtk_widget_show (label20);
  gtk_box_pack_start (GTK_BOX (vbox2), label20, FALSE, FALSE, 0);
  gtk_label_set_use_markup (GTK_LABEL (label20), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label20), 0, 0.5);

  hbox2 = gtk_hbox_new (FALSE, 0);
  gtk_widget_set_name (hbox2, "hbox2");
  gtk_widget_show (hbox2);
  gtk_box_pack_start (GTK_BOX (vbox2), hbox2, FALSE, TRUE, 0);

  label21 = gtk_label_new ("    ");
  gtk_widget_set_name (label21, "label21");
  gtk_widget_show (label21);
  gtk_box_pack_start (GTK_BOX (hbox2), label21, FALSE, FALSE, 0);

  table2 = gtk_table_new (3, 2, FALSE);
  gtk_widget_set_name (table2, "table2");
  gtk_widget_show (table2);
  gtk_box_pack_start (GTK_BOX (hbox2), table2, TRUE, TRUE, 0);
  gtk_table_set_row_spacings (GTK_TABLE (table2), 6);
  gtk_table_set_col_spacings (GTK_TABLE (table2), 12);

  label22 = gtk_label_new_with_mnemonic ("Username:");
  gtk_widget_set_name (label22, "label22");
  gtk_widget_show (label22);
  gtk_table_attach (GTK_TABLE (table2), label22, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label22), 0, 0.5);

  label23 = gtk_label_new_with_mnemonic ("ID:");
  gtk_widget_set_name (label23, "label23");
  gtk_widget_show (label23);
  gtk_table_attach (GTK_TABLE (table2), label23, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label23), 0, 0.5);

  txt_username = gtk_entry_new ();
  gtk_widget_set_name (txt_username, "txt_username");
  gtk_widget_show (txt_username);
  gtk_table_attach (GTK_TABLE (table2), txt_username, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  txt_id = gtk_entry_new ();
  gtk_widget_set_name (txt_id, "txt_id");
  gtk_widget_show (txt_id);
  gtk_table_attach (GTK_TABLE (table2), txt_id, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  hbuttonbox3 = gtk_hbutton_box_new ();
  gtk_widget_set_name (hbuttonbox3, "hbuttonbox3");
  gtk_widget_show (hbuttonbox3);
  gtk_table_attach (GTK_TABLE (table2), hbuttonbox3, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox3), GTK_BUTTONBOX_START);
  gtk_box_set_spacing (GTK_BOX (hbuttonbox3), 30);

  btn_getUsername = gtk_button_new ();
  gtk_widget_set_name (btn_getUsername, "btn_getUsername");
  gtk_widget_show (btn_getUsername);
  gtk_container_add (GTK_CONTAINER (hbuttonbox3), btn_getUsername);
  GTK_WIDGET_SET_FLAGS (btn_getUsername, GTK_CAN_DEFAULT);

  alignment1 = gtk_alignment_new (0.5, 0.5, 0, 0);
  gtk_widget_set_name (alignment1, "alignment1");
  gtk_widget_show (alignment1);
  gtk_container_add (GTK_CONTAINER (btn_getUsername), alignment1);

  hbox3 = gtk_hbox_new (FALSE, 2);
  gtk_widget_set_name (hbox3, "hbox3");
  gtk_widget_show (hbox3);
  gtk_container_add (GTK_CONTAINER (alignment1), hbox3);

  image1 = gtk_image_new_from_stock ("gtk-refresh", GTK_ICON_SIZE_BUTTON);
  gtk_widget_set_name (image1, "image1");
  gtk_widget_show (image1);
  gtk_box_pack_start (GTK_BOX (hbox3), image1, FALSE, FALSE, 0);

  label24 = gtk_label_new_with_mnemonic ("Get From Device");
  gtk_widget_set_name (label24, "label24");
  gtk_widget_show (label24);
  gtk_box_pack_start (GTK_BOX (hbox3), label24, FALSE, FALSE, 0);

  btn_setUsername = gtk_button_new ();
  gtk_widget_set_name (btn_setUsername, "btn_setUsername");
  gtk_widget_show (btn_setUsername);
  gtk_container_add (GTK_CONTAINER (hbuttonbox3), btn_setUsername);
  GTK_WIDGET_SET_FLAGS (btn_setUsername, GTK_CAN_DEFAULT);

  alignment2 = gtk_alignment_new (0.5, 0.5, 0, 0);
  gtk_widget_set_name (alignment2, "alignment2");
  gtk_widget_show (alignment2);
  gtk_container_add (GTK_CONTAINER (btn_setUsername), alignment2);

  hbox4 = gtk_hbox_new (FALSE, 2);
  gtk_widget_set_name (hbox4, "hbox4");
  gtk_widget_show (hbox4);
  gtk_container_add (GTK_CONTAINER (alignment2), hbox4);

  image2 = gtk_image_new_from_stock ("gtk-apply", GTK_ICON_SIZE_BUTTON);
  gtk_widget_set_name (image2, "image2");
  gtk_widget_show (image2);
  gtk_box_pack_start (GTK_BOX (hbox4), image2, FALSE, FALSE, 0);

  label25 = gtk_label_new_with_mnemonic ("Set On Device");
  gtk_widget_set_name (label25, "label25");
  gtk_widget_show (label25);
  gtk_box_pack_start (GTK_BOX (hbox4), label25, FALSE, FALSE, 0);

  label29 = gtk_label_new_with_mnemonic ("<span weight='bold'>What to do if Usernames do not match:</span>");
  gtk_widget_set_name (label29, "label29");
  gtk_widget_show (label29);
  gtk_box_pack_start (GTK_BOX (vbox2), label29, FALSE, FALSE, 0);
  gtk_label_set_use_markup (GTK_LABEL (label29), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label29), 0, 0.5);

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

  label28 = gtk_label_new ("    ");
  gtk_widget_set_name (label28, "label28");
  gtk_widget_show (label28);
  gtk_box_pack_start (GTK_BOX (hbox5), label28, FALSE, FALSE, 0);

  vbox4 = gtk_vbox_new (FALSE, 0);
  gtk_widget_set_name (vbox4, "vbox4");
  gtk_widget_show (vbox4);
  gtk_box_pack_start (GTK_BOX (hbox5), vbox4, TRUE, TRUE, 0);

  opt_sync = gtk_radio_button_new_with_mnemonic (NULL, "Sync Anyway");
  gtk_widget_set_name (opt_sync, "opt_sync");
  gtk_widget_show (opt_sync);
  gtk_box_pack_start (GTK_BOX (vbox4), opt_sync, FALSE, FALSE, 0);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (opt_sync), opt_sync_group);
  opt_sync_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (opt_sync));

  opt_ask = gtk_radio_button_new_with_mnemonic (NULL, "Ask What To Do");
  gtk_widget_set_name (opt_ask, "opt_ask");
  gtk_widget_show (opt_ask);
  gtk_box_pack_start (GTK_BOX (vbox4), opt_ask, FALSE, FALSE, 0);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (opt_ask), opt_sync_group);
  opt_sync_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (opt_ask));
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (opt_ask), TRUE);

  opt_abort = gtk_radio_button_new_with_mnemonic (NULL, "Abort Sync");
  gtk_widget_set_name (opt_abort, "opt_abort");
  gtk_widget_show (opt_abort);
  gtk_box_pack_start (GTK_BOX (vbox4), opt_abort, FALSE, FALSE, 0);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (opt_abort), opt_sync_group);
  opt_sync_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (opt_abort));

  lbl_nbk1 = gtk_label_new ("Connection");
  gtk_widget_set_name (lbl_nbk1, "lbl_nbk1");
  gtk_widget_show (lbl_nbk1);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 0), lbl_nbk1);

  vbox3 = gtk_vbox_new (FALSE, 6);
  gtk_widget_set_name (vbox3, "vbox3");
  gtk_widget_show (vbox3);
  gtk_container_add (GTK_CONTAINER (notebook1), vbox3);
  gtk_container_set_border_width (GTK_CONTAINER (vbox3), 6);

  label16 = gtk_label_new_with_mnemonic ("<span weight='bold'>Debug Option:</span>");
  gtk_widget_set_name (label16, "label16");
  gtk_widget_show (label16);
  gtk_box_pack_start (GTK_BOX (vbox3), label16, FALSE, FALSE, 0);
  gtk_label_set_use_markup (GTK_LABEL (label16), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label16), 0, 0.5);

  hbox6 = gtk_hbox_new (FALSE, 6);
  gtk_widget_set_name (hbox6, "hbox6");
  gtk_widget_show (hbox6);
  gtk_box_pack_start (GTK_BOX (vbox3), hbox6, FALSE, FALSE, 0);

  label30 = gtk_label_new_with_mnemonic ("Verbosity");
  gtk_widget_set_name (label30, "label30");
  gtk_widget_show (label30);
  gtk_box_pack_start (GTK_BOX (hbox6), label30, FALSE, FALSE, 0);
  gtk_misc_set_alignment (GTK_MISC (label30), 0, 0.5);

  cmb_debug = gtk_combo_new ();
  g_object_set_data (G_OBJECT (GTK_COMBO (cmb_debug)->popwin),
                     "GladeParentKey", cmb_debug);
  gtk_widget_set_name (cmb_debug, "cmb_debug");
  gtk_widget_show (cmb_debug);
  gtk_box_pack_start (GTK_BOX (hbox6), cmb_debug, TRUE, TRUE, 0);
  gtk_combo_set_value_in_list (GTK_COMBO (cmb_debug), TRUE, FALSE);
  gtk_combo_set_case_sensitive (GTK_COMBO (cmb_debug), TRUE);
  cmb_debug_items = g_list_append (cmb_debug_items, (gpointer) "Errors Only");
  cmb_debug_items = g_list_append (cmb_debug_items, (gpointer) "Errors and Warnings");
  cmb_debug_items = g_list_append (cmb_debug_items, (gpointer) "Information");
  cmb_debug_items = g_list_append (cmb_debug_items, (gpointer) "Debug");
  cmb_debug_items = g_list_append (cmb_debug_items, (gpointer) "Full Debug");
  gtk_combo_set_popdown_strings (GTK_COMBO (cmb_debug), cmb_debug_items);
  g_list_free (cmb_debug_items);

  combo_entry1 = GTK_COMBO (cmb_debug)->entry;
  gtk_widget_set_name (combo_entry1, "combo_entry1");
  gtk_widget_show (combo_entry1);

  label27 = gtk_label_new_with_mnemonic ("<span weight='bold'>Hotsync Notification:</span>");
  gtk_widget_set_name (label27, "label27");
  gtk_widget_show (label27);
  gtk_box_pack_start (GTK_BOX (vbox3), label27, FALSE, FALSE, 0);
  gtk_label_set_use_markup (GTK_LABEL (label27), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label27), 0, 0.5);

  chk_popup = gtk_check_button_new_with_mnemonic ("Popup when Interaction is required");
  gtk_widget_set_name (chk_popup, "chk_popup");
  gtk_widget_show (chk_popup);
  gtk_box_pack_start (GTK_BOX (vbox3), chk_popup, FALSE, FALSE, 0);

  label31 = gtk_label_new_with_mnemonic ("<span weight='bold'>Debug Option:</span>");
  gtk_widget_set_name (label31, "label31");
  gtk_widget_show (label31);
  gtk_box_pack_start (GTK_BOX (vbox3), label31, FALSE, FALSE, 0);
  gtk_label_set_use_markup (GTK_LABEL (label31), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label31), 0, 0.5);

  hbox7 = gtk_hbox_new (FALSE, 6);
  gtk_widget_set_name (hbox7, "hbox7");
  gtk_widget_show (hbox7);
  gtk_box_pack_start (GTK_BOX (vbox3), hbox7, FALSE, TRUE, 0);

  label32 = gtk_label_new_with_mnemonic ("Codepage");
  gtk_widget_set_name (label32, "label32");
  gtk_widget_show (label32);
  gtk_box_pack_start (GTK_BOX (hbox7), label32, FALSE, FALSE, 0);
  gtk_misc_set_alignment (GTK_MISC (label32), 0, 0.5);

  cmb_codepage = gtk_combo_new ();
  g_object_set_data (G_OBJECT (GTK_COMBO (cmb_codepage)->popwin),
                     "GladeParentKey", cmb_codepage);
  gtk_widget_set_name (cmb_codepage, "cmb_codepage");
  gtk_widget_show (cmb_codepage);
  gtk_box_pack_start (GTK_BOX (hbox7), cmb_codepage, TRUE, TRUE, 0);
  gtk_combo_set_case_sensitive (GTK_COMBO (cmb_codepage), TRUE);
  gtk_combo_set_use_arrows_always (GTK_COMBO (cmb_codepage), TRUE);
  cmb_codepage_items = g_list_append (cmb_codepage_items, (gpointer) "cp1250 (Central Europe)");
  cmb_codepage_items = g_list_append (cmb_codepage_items, (gpointer) "cp1251 (Cyrillic)");
  cmb_codepage_items = g_list_append (cmb_codepage_items, (gpointer) "cp1252 (Latin) Standard");
  cmb_codepage_items = g_list_append (cmb_codepage_items, (gpointer) "cp1253 (Greek)");
  cmb_codepage_items = g_list_append (cmb_codepage_items, (gpointer) "cp1254 (Turkish)");
  cmb_codepage_items = g_list_append (cmb_codepage_items, (gpointer) "cp1255 (Hebrew)");
  cmb_codepage_items = g_list_append (cmb_codepage_items, (gpointer) "cp1256 (Arabic)");
  cmb_codepage_items = g_list_append (cmb_codepage_items, (gpointer) "cp1257 (Baltic)");
  cmb_codepage_items = g_list_append (cmb_codepage_items, (gpointer) "cp1258 (Vietnam)");
  cmb_codepage_items = g_list_append (cmb_codepage_items, (gpointer) "cp874 (Thai)");
  gtk_combo_set_popdown_strings (GTK_COMBO (cmb_codepage), cmb_codepage_items);
  g_list_free (cmb_codepage_items);

  entry1 = GTK_COMBO (cmb_codepage)->entry;
  gtk_widget_set_name (entry1, "entry1");
  gtk_widget_show (entry1);
  gtk_entry_set_text (GTK_ENTRY (entry1), "cp1250 (Central Europe)");

  label15 = gtk_label_new ("Options");
  gtk_widget_set_name (label15, "label15");
  gtk_widget_show (label15);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 1), label15);

  hseparator10 = gtk_hseparator_new ();
  gtk_widget_set_name (hseparator10, "hseparator10");
  gtk_widget_show (hseparator10);
  gtk_box_pack_start (GTK_BOX (vbox1), hseparator10, FALSE, TRUE, 0);

  hbuttonbox2 = gtk_hbutton_box_new ();
  gtk_widget_set_name (hbuttonbox2, "hbuttonbox2");
  gtk_widget_show (hbuttonbox2);
  gtk_box_pack_start (GTK_BOX (vbox1), hbuttonbox2, FALSE, TRUE, 0);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox2), GTK_BUTTONBOX_END);
  gtk_box_set_spacing (GTK_BOX (hbuttonbox2), 30);

  btn_cancel = gtk_button_new_from_stock ("gtk-cancel");
  gtk_widget_set_name (btn_cancel, "btn_cancel");
  gtk_widget_show (btn_cancel);
  gtk_container_add (GTK_CONTAINER (hbuttonbox2), btn_cancel);
  gtk_widget_set_size_request (btn_cancel, 81, 32);

  btn_ok = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_set_name (btn_ok, "btn_ok");
  gtk_widget_show (btn_ok);
  gtk_container_add (GTK_CONTAINER (hbuttonbox2), btn_ok);
  gtk_widget_set_size_request (btn_ok, 81, 32);

  g_signal_connect ((gpointer) wnd_options, "destroy",
                    G_CALLBACK (on_wnd_options_destroy),
                    NULL);
  g_signal_connect ((gpointer) btn_getUsername, "clicked",
                    G_CALLBACK (on_btn_getUsername_clicked),
                    NULL);
  g_signal_connect ((gpointer) btn_setUsername, "clicked",
                    G_CALLBACK (on_btn_setUsername_clicked),
                    NULL);
  g_signal_connect ((gpointer) btn_cancel, "clicked",
                    G_CALLBACK (on_btn_cancel_clicked),
                    NULL);
  g_signal_connect ((gpointer) btn_ok, "clicked",
                    G_CALLBACK (on_btn_ok_clicked),
                    NULL);

  gtk_label_set_mnemonic_widget (GTK_LABEL (label13), txt_sockaddr);
  gtk_label_set_mnemonic_widget (GTK_LABEL (label22), txt_sockaddr);
  gtk_label_set_mnemonic_widget (GTK_LABEL (label23), txt_sockaddr);
  gtk_label_set_mnemonic_widget (GTK_LABEL (label30), txt_sockaddr);
  gtk_label_set_mnemonic_widget (GTK_LABEL (label32), txt_sockaddr);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (wnd_options, wnd_options, "wnd_options");
  GLADE_HOOKUP_OBJECT (wnd_options, vbox1, "vbox1");
  GLADE_HOOKUP_OBJECT (wnd_options, notebook1, "notebook1");
  GLADE_HOOKUP_OBJECT (wnd_options, vbox2, "vbox2");
  GLADE_HOOKUP_OBJECT (wnd_options, label11, "label11");
  GLADE_HOOKUP_OBJECT (wnd_options, hbox1, "hbox1");
  GLADE_HOOKUP_OBJECT (wnd_options, label12, "label12");
  GLADE_HOOKUP_OBJECT (wnd_options, table1, "table1");
  GLADE_HOOKUP_OBJECT (wnd_options, label13, "label13");
  GLADE_HOOKUP_OBJECT (wnd_options, label14, "label14");
  GLADE_HOOKUP_OBJECT (wnd_options, lbl_passwd, "lbl_passwd");
  GLADE_HOOKUP_OBJECT (wnd_options, txt_timeout, "txt_timeout");
  GLADE_HOOKUP_OBJECT (wnd_options, txt_sockaddr, "txt_sockaddr");
  GLADE_HOOKUP_OBJECT (wnd_options, label19, "label19");
  GLADE_HOOKUP_OBJECT (wnd_options, om_type, "om_type");
  GLADE_HOOKUP_OBJECT (wnd_options, menu1, "menu1");
  GLADE_HOOKUP_OBJECT (wnd_options, om_speed, "om_speed");
  GLADE_HOOKUP_OBJECT (wnd_options, label20, "label20");
  GLADE_HOOKUP_OBJECT (wnd_options, hbox2, "hbox2");
  GLADE_HOOKUP_OBJECT (wnd_options, label21, "label21");
  GLADE_HOOKUP_OBJECT (wnd_options, table2, "table2");
  GLADE_HOOKUP_OBJECT (wnd_options, label22, "label22");
  GLADE_HOOKUP_OBJECT (wnd_options, label23, "label23");
  GLADE_HOOKUP_OBJECT (wnd_options, txt_username, "txt_username");
  GLADE_HOOKUP_OBJECT (wnd_options, txt_id, "txt_id");
  GLADE_HOOKUP_OBJECT (wnd_options, hbuttonbox3, "hbuttonbox3");
  GLADE_HOOKUP_OBJECT (wnd_options, btn_getUsername, "btn_getUsername");
  GLADE_HOOKUP_OBJECT (wnd_options, alignment1, "alignment1");
  GLADE_HOOKUP_OBJECT (wnd_options, hbox3, "hbox3");
  GLADE_HOOKUP_OBJECT (wnd_options, image1, "image1");
  GLADE_HOOKUP_OBJECT (wnd_options, label24, "label24");
  GLADE_HOOKUP_OBJECT (wnd_options, btn_setUsername, "btn_setUsername");
  GLADE_HOOKUP_OBJECT (wnd_options, alignment2, "alignment2");
  GLADE_HOOKUP_OBJECT (wnd_options, hbox4, "hbox4");
  GLADE_HOOKUP_OBJECT (wnd_options, image2, "image2");
  GLADE_HOOKUP_OBJECT (wnd_options, label25, "label25");
  GLADE_HOOKUP_OBJECT (wnd_options, label29, "label29");
  GLADE_HOOKUP_OBJECT (wnd_options, hbox5, "hbox5");
  GLADE_HOOKUP_OBJECT (wnd_options, label28, "label28");
  GLADE_HOOKUP_OBJECT (wnd_options, vbox4, "vbox4");
  GLADE_HOOKUP_OBJECT (wnd_options, opt_sync, "opt_sync");
  GLADE_HOOKUP_OBJECT (wnd_options, opt_ask, "opt_ask");
  GLADE_HOOKUP_OBJECT (wnd_options, opt_abort, "opt_abort");
  GLADE_HOOKUP_OBJECT (wnd_options, lbl_nbk1, "lbl_nbk1");
  GLADE_HOOKUP_OBJECT (wnd_options, vbox3, "vbox3");
  GLADE_HOOKUP_OBJECT (wnd_options, label16, "label16");
  GLADE_HOOKUP_OBJECT (wnd_options, hbox6, "hbox6");
  GLADE_HOOKUP_OBJECT (wnd_options, label30, "label30");
  GLADE_HOOKUP_OBJECT (wnd_options, cmb_debug, "cmb_debug");
  GLADE_HOOKUP_OBJECT (wnd_options, combo_entry1, "combo_entry1");
  GLADE_HOOKUP_OBJECT (wnd_options, label27, "label27");
  GLADE_HOOKUP_OBJECT (wnd_options, chk_popup, "chk_popup");
  GLADE_HOOKUP_OBJECT (wnd_options, label31, "label31");
  GLADE_HOOKUP_OBJECT (wnd_options, hbox7, "hbox7");
  GLADE_HOOKUP_OBJECT (wnd_options, label32, "label32");
  GLADE_HOOKUP_OBJECT (wnd_options, cmb_codepage, "cmb_codepage");
  GLADE_HOOKUP_OBJECT (wnd_options, entry1, "entry1");
  GLADE_HOOKUP_OBJECT (wnd_options, label15, "label15");
  GLADE_HOOKUP_OBJECT (wnd_options, hseparator10, "hseparator10");
  GLADE_HOOKUP_OBJECT (wnd_options, hbuttonbox2, "hbuttonbox2");
  GLADE_HOOKUP_OBJECT (wnd_options, btn_cancel, "btn_cancel");
  GLADE_HOOKUP_OBJECT (wnd_options, btn_ok, "btn_ok");

  return wnd_options;
}

