/*
 * 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 convertwidget1_uiinfo[] =
{
  {
    GNOME_APP_UI_ITEM, "SyncML server",
    NULL,
    (gpointer) NULL, NULL, NULL,
    GNOME_APP_PIXMAP_NONE, NULL,
    0, (GdkModifierType) 0, NULL
  },
  {
    GNOME_APP_UI_ITEM, "SyncML client",
    NULL,
    (gpointer) NULL, NULL, NULL,
    GNOME_APP_PIXMAP_NONE, NULL,
    0, (GdkModifierType) 0, NULL
  },
  GNOMEUIINFO_END
};

static GnomeUIInfo convertwidget4_uiinfo[] =
{
  {
    GNOME_APP_UI_ITEM, "http",
    NULL,
    (gpointer) NULL, NULL, NULL,
    GNOME_APP_PIXMAP_NONE, NULL,
    0, (GdkModifierType) 0, NULL
  },
  {
    GNOME_APP_UI_ITEM, "https",
    NULL,
    (gpointer) NULL, NULL, NULL,
    GNOME_APP_PIXMAP_NONE, NULL,
    0, (GdkModifierType) 0, NULL
  },
  GNOMEUIINFO_END
};

GtkWidget*
create_syncml_optwin (void)
{
  GtkWidget *syncml_optwin;
  GtkWidget *vbox1;
  GtkWidget *notebook1;
  GtkWidget *vbox2;
  GtkWidget *label17;
  GtkWidget *hbox1;
  GtkWidget *label16;
  GtkWidget *rolemenu;
  GtkWidget *convertwidget1;
  GtkWidget *label18;
  GtkWidget *hbox2;
  GtkWidget *label19;
  GtkWidget *table2;
  GtkWidget *protomenu;
  GtkWidget *convertwidget4;
  GtkWidget *label4;
  GtkWidget *hostnameentry;
  GtkWidget *label5;
  GtkWidget *portentry;
  GtkWidget *label6;
  GtkWidget *pathentry;
  GtkWidget *label8;
  GtkWidget *label9;
  GtkWidget *label10;
  GtkWidget *label7;
  GtkWidget *label20;
  GtkWidget *hbox3;
  GtkWidget *label21;
  GtkWidget *table3;
  GtkWidget *label11;
  GtkWidget *label12;
  GtkWidget *loginentry;
  GtkWidget *passwdentry;
  GtkWidget *label1;
  GtkWidget *table4;
  GtkWidget *label14;
  GtkWidget *calendarcombo;
  GList *calendarcombo_items = NULL;
  GtkWidget *calendarentry;
  GtkWidget *label15;
  GtkWidget *phonebookcombo;
  GList *phonebookcombo_items = NULL;
  GtkWidget *phonebookentry;
  GtkWidget *devinfobutton;
  GtkWidget *alignment1;
  GtkWidget *hbox4;
  GtkWidget *image1;
  GtkWidget *label22;
  GtkWidget *label13;
  GtkWidget *vbox3;
  GtkWidget *label24;
  GtkWidget *hbox5;
  GtkWidget *label25;
  GtkWidget *table5;
  GtkWidget *removeutccheck;
  GtkWidget *disablestrtbl;
  GtkWidget *label23;
  GtkWidget *hseparator1;
  GtkWidget *hbuttonbox1;
  GtkWidget *cancelbutton;
  GtkWidget *okbutton;
  GtkTooltips *tooltips;

  tooltips = gtk_tooltips_new ();

  syncml_optwin = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_container_set_border_width (GTK_CONTAINER (syncml_optwin), 12);
  gtk_window_set_title (GTK_WINDOW (syncml_optwin), "MultiSync SyncML plugin");

  vbox1 = gtk_vbox_new (FALSE, 6);
  gtk_widget_show (vbox1);
  gtk_container_add (GTK_CONTAINER (syncml_optwin), vbox1);

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

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

  label17 = gtk_label_new ("<span weight='bold'>SyncML Role:</span>");
  gtk_widget_show (label17);
  gtk_box_pack_start (GTK_BOX (vbox2), label17, FALSE, FALSE, 0);
  gtk_label_set_use_markup (GTK_LABEL (label17), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label17), 0, 0.5);

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

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

  rolemenu = gtk_option_menu_new ();
  gtk_widget_show (rolemenu);
  gtk_box_pack_start (GTK_BOX (hbox1), rolemenu, TRUE, TRUE, 0);
  gtk_tooltips_set_tip (tooltips, rolemenu, "A SyncML server accepts connections from any SyncML clients (including a MultiSync SyncML client). The SyncML client can connect to any SyncML server.", NULL);

  convertwidget1 = gtk_menu_new ();
  gnome_app_fill_menu (GTK_MENU_SHELL (convertwidget1), convertwidget1_uiinfo,
                       NULL, FALSE, 0);

  gtk_option_menu_set_menu (GTK_OPTION_MENU (rolemenu), convertwidget1);

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

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

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

  table2 = gtk_table_new (2, 7, FALSE);
  gtk_widget_show (table2);
  gtk_box_pack_start (GTK_BOX (hbox2), table2, TRUE, TRUE, 0);
  gtk_table_set_row_spacings (GTK_TABLE (table2), 1);
  gtk_table_set_col_spacings (GTK_TABLE (table2), 3);

  protomenu = gtk_option_menu_new ();
  gtk_widget_show (protomenu);
  gtk_table_attach (GTK_TABLE (table2), protomenu, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, protomenu, "Server protocol.  \"https\" uses an SSL-encrypted connection (highly recommended!)", NULL);

  convertwidget4 = gtk_menu_new ();
  gnome_app_fill_menu (GTK_MENU_SHELL (convertwidget4), convertwidget4_uiinfo,
                       NULL, FALSE, 0);

  gtk_option_menu_set_menu (GTK_OPTION_MENU (protomenu), convertwidget4);

  label4 = gtk_label_new ("://");
  gtk_widget_show (label4);
  gtk_table_attach (GTK_TABLE (table2), label4, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_justify (GTK_LABEL (label4), GTK_JUSTIFY_CENTER);

  hostnameentry = gtk_entry_new ();
  gtk_widget_show (hostnameentry);
  gtk_table_attach (GTK_TABLE (table2), hostnameentry, 2, 3, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, hostnameentry, "Server hostname, e.g. \"myserver.mydomain.com\"", NULL);

  label5 = gtk_label_new (":");
  gtk_widget_show (label5);
  gtk_table_attach (GTK_TABLE (table2), label5, 3, 4, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_justify (GTK_LABEL (label5), GTK_JUSTIFY_CENTER);

  portentry = gtk_entry_new ();
  gtk_widget_show (portentry);
  gtk_table_attach (GTK_TABLE (table2), portentry, 4, 5, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, portentry, "Server port number. Leave empty for default protocol port. For a MultiSync SyncML server, the default is 5079.", NULL);
  gtk_entry_set_text (GTK_ENTRY (portentry), "5079");
  gtk_entry_set_width_chars (GTK_ENTRY (portentry), 5);

  label6 = gtk_label_new ("/");
  gtk_widget_show (label6);
  gtk_table_attach (GTK_TABLE (table2), label6, 5, 6, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_justify (GTK_LABEL (label6), GTK_JUSTIFY_CENTER);

  pathentry = gtk_entry_new ();
  gtk_widget_show (pathentry);
  gtk_table_attach (GTK_TABLE (table2), pathentry, 6, 7, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, pathentry, "Server path if not \"/\" (e.g. \"syncml/\")", NULL);

  label8 = gtk_label_new ("Server name:");
  gtk_widget_show (label8);
  gtk_table_attach (GTK_TABLE (table2), label8, 2, 3, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_justify (GTK_LABEL (label8), GTK_JUSTIFY_CENTER);
  gtk_misc_set_alignment (GTK_MISC (label8), 0, 0.5);

  label9 = gtk_label_new ("Port:");
  gtk_widget_show (label9);
  gtk_table_attach (GTK_TABLE (table2), label9, 3, 6, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_justify (GTK_LABEL (label9), GTK_JUSTIFY_CENTER);
  gtk_misc_set_alignment (GTK_MISC (label9), 0, 0.5);

  label10 = gtk_label_new ("Path:");
  gtk_widget_show (label10);
  gtk_table_attach (GTK_TABLE (table2), label10, 6, 7, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_justify (GTK_LABEL (label10), GTK_JUSTIFY_CENTER);
  gtk_misc_set_alignment (GTK_MISC (label10), 0, 0.5);

  label7 = gtk_label_new ("Protocol:");
  gtk_widget_show (label7);
  gtk_table_attach (GTK_TABLE (table2), label7, 0, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_justify (GTK_LABEL (label7), GTK_JUSTIFY_CENTER);
  gtk_misc_set_alignment (GTK_MISC (label7), 0, 0.5);

  label20 = gtk_label_new ("<span weight='bold'>Authentication:</span>");
  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);

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

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

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

  label11 = gtk_label_new ("SyncML login: ");
  gtk_widget_show (label11);
  gtk_table_attach (GTK_TABLE (table3), label11, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_justify (GTK_LABEL (label11), GTK_JUSTIFY_CENTER);
  gtk_misc_set_alignment (GTK_MISC (label11), 0, 0.5);

  label12 = gtk_label_new ("SyncML password:");
  gtk_widget_show (label12);
  gtk_table_attach (GTK_TABLE (table3), label12, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_justify (GTK_LABEL (label12), GTK_JUSTIFY_CENTER);
  gtk_misc_set_alignment (GTK_MISC (label12), 0, 0.5);

  loginentry = gtk_entry_new ();
  gtk_widget_show (loginentry);
  gtk_table_attach (GTK_TABLE (table3), loginentry, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, loginentry, "The SyncML server's login name", NULL);
  gtk_entry_set_text (GTK_ENTRY (loginentry), "syncml");

  passwdentry = gtk_entry_new ();
  gtk_widget_show (passwdentry);
  gtk_table_attach (GTK_TABLE (table3), passwdentry, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, passwdentry, "The password for the above login name", NULL);
  gtk_entry_set_visibility (GTK_ENTRY (passwdentry), FALSE);

  label1 = gtk_label_new ("SyncML Role");
  gtk_widget_show (label1);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 0), label1);
  gtk_label_set_justify (GTK_LABEL (label1), GTK_JUSTIFY_CENTER);

  table4 = gtk_table_new (3, 2, FALSE);
  gtk_widget_show (table4);
  gtk_container_add (GTK_CONTAINER (notebook1), table4);
  gtk_container_set_border_width (GTK_CONTAINER (table4), 6);
  gtk_table_set_row_spacings (GTK_TABLE (table4), 6);
  gtk_table_set_col_spacings (GTK_TABLE (table4), 12);

  label14 = gtk_label_new ("Calendar/TODO database name:");
  gtk_widget_show (label14);
  gtk_table_attach (GTK_TABLE (table4), label14, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_justify (GTK_LABEL (label14), GTK_JUSTIFY_CENTER);
  gtk_misc_set_alignment (GTK_MISC (label14), 0, 0.5);

  calendarcombo = gtk_combo_new ();
  g_object_set_data (G_OBJECT (GTK_COMBO (calendarcombo)->popwin),
                     "GladeParentKey", calendarcombo);
  gtk_widget_show (calendarcombo);
  gtk_table_attach (GTK_TABLE (table4), calendarcombo, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  calendarcombo_items = g_list_append (calendarcombo_items, (gpointer) "");
  gtk_combo_set_popdown_strings (GTK_COMBO (calendarcombo), calendarcombo_items);
  g_list_free (calendarcombo_items);

  calendarentry = GTK_COMBO (calendarcombo)->entry;
  gtk_widget_show (calendarentry);

  label15 = gtk_label_new ("Phonebook database name:");
  gtk_widget_show (label15);
  gtk_table_attach (GTK_TABLE (table4), label15, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_justify (GTK_LABEL (label15), GTK_JUSTIFY_CENTER);
  gtk_misc_set_alignment (GTK_MISC (label15), 0, 0.5);

  phonebookcombo = gtk_combo_new ();
  g_object_set_data (G_OBJECT (GTK_COMBO (phonebookcombo)->popwin),
                     "GladeParentKey", phonebookcombo);
  gtk_widget_show (phonebookcombo);
  gtk_table_attach (GTK_TABLE (table4), phonebookcombo, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  phonebookcombo_items = g_list_append (phonebookcombo_items, (gpointer) "");
  gtk_combo_set_popdown_strings (GTK_COMBO (phonebookcombo), phonebookcombo_items);
  g_list_free (phonebookcombo_items);

  phonebookentry = GTK_COMBO (phonebookcombo)->entry;
  gtk_widget_show (phonebookentry);

  devinfobutton = gtk_button_new ();
  gtk_widget_show (devinfobutton);
  gtk_table_attach (GTK_TABLE (table4), devinfobutton, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  alignment1 = gtk_alignment_new (0.5, 0.5, 0, 0);
  gtk_widget_show (alignment1);
  gtk_container_add (GTK_CONTAINER (devinfobutton), alignment1);

  hbox4 = gtk_hbox_new (FALSE, 2);
  gtk_widget_show (hbox4);
  gtk_container_add (GTK_CONTAINER (alignment1), hbox4);

  image1 = gtk_image_new_from_stock ("gtk-index", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image1);
  gtk_box_pack_start (GTK_BOX (hbox4), image1, FALSE, FALSE, 0);

  label22 = gtk_label_new_with_mnemonic ("Get from server...");
  gtk_widget_show (label22);
  gtk_box_pack_start (GTK_BOX (hbox4), label22, FALSE, FALSE, 0);

  label13 = gtk_label_new ("Databases");
  gtk_widget_show (label13);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 1), label13);
  gtk_label_set_justify (GTK_LABEL (label13), GTK_JUSTIFY_CENTER);

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

  label24 = gtk_label_new ("<span weight='bold'>Bug workarounds:</span>");
  gtk_widget_show (label24);
  gtk_box_pack_start (GTK_BOX (vbox3), label24, FALSE, FALSE, 0);
  gtk_label_set_use_markup (GTK_LABEL (label24), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label24), 0, 0.5);

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

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

  table5 = gtk_table_new (2, 1, FALSE);
  gtk_widget_show (table5);
  gtk_box_pack_start (GTK_BOX (hbox5), table5, TRUE, TRUE, 0);
  gtk_table_set_row_spacings (GTK_TABLE (table5), 3);
  gtk_table_set_col_spacings (GTK_TABLE (table5), 3);

  removeutccheck = gtk_check_button_new_with_mnemonic ("Interpret UTC as local time (Symbian Devices)");
  gtk_widget_show (removeutccheck);
  gtk_table_attach (GTK_TABLE (table5), removeutccheck, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, removeutccheck, "If this option is enabled, times from the other end will be interpreted as being local time even if they are stated to be in UTC. This is a common bug among some Symbian devices such as SE P800/P900.", NULL);

  disablestrtbl = gtk_check_button_new_with_mnemonic ("Disable string tables");
  gtk_widget_show (disablestrtbl);
  gtk_table_attach (GTK_TABLE (table5), disablestrtbl, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, disablestrtbl, "If this option is enabled, times from the other end will be interpreted as being local time even if they are stated to be in UTC. This is a common bug among some Symbian devices such as SE P800/P900.", NULL);

  label23 = gtk_label_new ("Options");
  gtk_widget_show (label23);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 2), label23);

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

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

  cancelbutton = gtk_button_new_from_stock ("gtk-cancel");
  gtk_widget_show (cancelbutton);
  gtk_container_add (GTK_CONTAINER (hbuttonbox1), cancelbutton);
  GTK_WIDGET_SET_FLAGS (cancelbutton, GTK_CAN_DEFAULT);

  okbutton = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (okbutton);
  gtk_container_add (GTK_CONTAINER (hbuttonbox1), okbutton);
  GTK_WIDGET_SET_FLAGS (okbutton, GTK_CAN_DEFAULT);

  g_signal_connect ((gpointer) syncml_optwin, "delete_event",
                    G_CALLBACK (on_syncml_optwin_delete_event),
                    NULL);
  g_signal_connect ((gpointer) devinfobutton, "clicked",
                    G_CALLBACK (syncml_devinfobutton_clicked),
                    NULL);
  g_signal_connect ((gpointer) cancelbutton, "clicked",
                    G_CALLBACK (syncml_cancelbutton_clicked),
                    NULL);
  g_signal_connect ((gpointer) okbutton, "clicked",
                    G_CALLBACK (syncml_okbutton_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (syncml_optwin, syncml_optwin, "syncml_optwin");
  GLADE_HOOKUP_OBJECT (syncml_optwin, vbox1, "vbox1");
  GLADE_HOOKUP_OBJECT (syncml_optwin, notebook1, "notebook1");
  GLADE_HOOKUP_OBJECT (syncml_optwin, vbox2, "vbox2");
  GLADE_HOOKUP_OBJECT (syncml_optwin, label17, "label17");
  GLADE_HOOKUP_OBJECT (syncml_optwin, hbox1, "hbox1");
  GLADE_HOOKUP_OBJECT (syncml_optwin, label16, "label16");
  GLADE_HOOKUP_OBJECT (syncml_optwin, rolemenu, "rolemenu");
  GLADE_HOOKUP_OBJECT (syncml_optwin, convertwidget1, "convertwidget1");
  GLADE_HOOKUP_OBJECT (syncml_optwin, convertwidget1_uiinfo[0].widget, "convertwidget2");
  GLADE_HOOKUP_OBJECT (syncml_optwin, convertwidget1_uiinfo[1].widget, "convertwidget3");
  GLADE_HOOKUP_OBJECT (syncml_optwin, label18, "label18");
  GLADE_HOOKUP_OBJECT (syncml_optwin, hbox2, "hbox2");
  GLADE_HOOKUP_OBJECT (syncml_optwin, label19, "label19");
  GLADE_HOOKUP_OBJECT (syncml_optwin, table2, "table2");
  GLADE_HOOKUP_OBJECT (syncml_optwin, protomenu, "protomenu");
  GLADE_HOOKUP_OBJECT (syncml_optwin, convertwidget4, "convertwidget4");
  GLADE_HOOKUP_OBJECT (syncml_optwin, convertwidget4_uiinfo[0].widget, "convertwidget5");
  GLADE_HOOKUP_OBJECT (syncml_optwin, convertwidget4_uiinfo[1].widget, "convertwidget6");
  GLADE_HOOKUP_OBJECT (syncml_optwin, label4, "label4");
  GLADE_HOOKUP_OBJECT (syncml_optwin, hostnameentry, "hostnameentry");
  GLADE_HOOKUP_OBJECT (syncml_optwin, label5, "label5");
  GLADE_HOOKUP_OBJECT (syncml_optwin, portentry, "portentry");
  GLADE_HOOKUP_OBJECT (syncml_optwin, label6, "label6");
  GLADE_HOOKUP_OBJECT (syncml_optwin, pathentry, "pathentry");
  GLADE_HOOKUP_OBJECT (syncml_optwin, label8, "label8");
  GLADE_HOOKUP_OBJECT (syncml_optwin, label9, "label9");
  GLADE_HOOKUP_OBJECT (syncml_optwin, label10, "label10");
  GLADE_HOOKUP_OBJECT (syncml_optwin, label7, "label7");
  GLADE_HOOKUP_OBJECT (syncml_optwin, label20, "label20");
  GLADE_HOOKUP_OBJECT (syncml_optwin, hbox3, "hbox3");
  GLADE_HOOKUP_OBJECT (syncml_optwin, label21, "label21");
  GLADE_HOOKUP_OBJECT (syncml_optwin, table3, "table3");
  GLADE_HOOKUP_OBJECT (syncml_optwin, label11, "label11");
  GLADE_HOOKUP_OBJECT (syncml_optwin, label12, "label12");
  GLADE_HOOKUP_OBJECT (syncml_optwin, loginentry, "loginentry");
  GLADE_HOOKUP_OBJECT (syncml_optwin, passwdentry, "passwdentry");
  GLADE_HOOKUP_OBJECT (syncml_optwin, label1, "label1");
  GLADE_HOOKUP_OBJECT (syncml_optwin, table4, "table4");
  GLADE_HOOKUP_OBJECT (syncml_optwin, label14, "label14");
  GLADE_HOOKUP_OBJECT (syncml_optwin, calendarcombo, "calendarcombo");
  GLADE_HOOKUP_OBJECT (syncml_optwin, calendarentry, "calendarentry");
  GLADE_HOOKUP_OBJECT (syncml_optwin, label15, "label15");
  GLADE_HOOKUP_OBJECT (syncml_optwin, phonebookcombo, "phonebookcombo");
  GLADE_HOOKUP_OBJECT (syncml_optwin, phonebookentry, "phonebookentry");
  GLADE_HOOKUP_OBJECT (syncml_optwin, devinfobutton, "devinfobutton");
  GLADE_HOOKUP_OBJECT (syncml_optwin, alignment1, "alignment1");
  GLADE_HOOKUP_OBJECT (syncml_optwin, hbox4, "hbox4");
  GLADE_HOOKUP_OBJECT (syncml_optwin, image1, "image1");
  GLADE_HOOKUP_OBJECT (syncml_optwin, label22, "label22");
  GLADE_HOOKUP_OBJECT (syncml_optwin, label13, "label13");
  GLADE_HOOKUP_OBJECT (syncml_optwin, vbox3, "vbox3");
  GLADE_HOOKUP_OBJECT (syncml_optwin, label24, "label24");
  GLADE_HOOKUP_OBJECT (syncml_optwin, hbox5, "hbox5");
  GLADE_HOOKUP_OBJECT (syncml_optwin, label25, "label25");
  GLADE_HOOKUP_OBJECT (syncml_optwin, table5, "table5");
  GLADE_HOOKUP_OBJECT (syncml_optwin, removeutccheck, "removeutccheck");
  GLADE_HOOKUP_OBJECT (syncml_optwin, disablestrtbl, "disablestrtbl");
  GLADE_HOOKUP_OBJECT (syncml_optwin, label23, "label23");
  GLADE_HOOKUP_OBJECT (syncml_optwin, hseparator1, "hseparator1");
  GLADE_HOOKUP_OBJECT (syncml_optwin, hbuttonbox1, "hbuttonbox1");
  GLADE_HOOKUP_OBJECT (syncml_optwin, cancelbutton, "cancelbutton");
  GLADE_HOOKUP_OBJECT (syncml_optwin, okbutton, "okbutton");
  GLADE_HOOKUP_OBJECT_NO_REF (syncml_optwin, tooltips, "tooltips");

  return syncml_optwin;
}

