/*
 * 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 *hbox2;
  GtkWidget *txt_server;
  GtkWidget *lbl_port;
  GtkWidget *txt_port;
  GtkWidget *txt_binddn;
  GtkWidget *lbl_passwd;
  GtkWidget *txt_passwd;
  GtkWidget *label14;
  GtkWidget *hbuttonbox4;
  GtkWidget *btn_auth_mechs;
  GtkWidget *alignment1;
  GtkWidget *hbox7;
  GtkWidget *image1;
  GtkWidget *label22;
  GtkWidget *lbl_auth;
  GtkWidget *opt_encryption;
  GtkWidget *menu1;
  GtkWidget *lbl_tls;
  GtkWidget *chk_anonymous;
  GtkWidget *cmb_authmech;
  GtkWidget *txt_authmech;
  GtkWidget *label15;
  GtkWidget *hbox3;
  GtkWidget *label16;
  GtkWidget *table2;
  GtkWidget *lbl_searchbase;
  GtkWidget *lbl_filter;
  GtkWidget *txt_filter;
  GtkWidget *lbl_scope;
  GtkWidget *chk_write;
  GtkWidget *txt_searchbase;
  GtkWidget *opt_scope;
  GtkWidget *lbl_nbk1;
  GtkWidget *vbox3;
  GtkWidget *label17;
  GtkWidget *hbox4;
  GtkWidget *label18;
  GtkWidget *table3;
  GtkWidget *lbl_test_bind;
  GtkWidget *lbl_test_search;
  GtkWidget *lbl_test_add;
  GtkWidget *lbl_test_evolution;
  GtkWidget *lbl_test_ldap;
  GtkWidget *lbl_test_tls;
  GtkWidget *lbl_strong_auth;
  GtkWidget *img_connection;
  GtkWidget *img_authenticate;
  GtkWidget *img_search;
  GtkWidget *img_write;
  GtkWidget *img_evolution;
  GtkWidget *img_ldap;
  GtkWidget *img_encrypt;
  GtkWidget *img_strong_auth;
  GtkWidget *hbuttonbox3;
  GtkWidget *lbl_test_server;
  GtkWidget *hbuttonbox5;
  GtkWidget *btn_test;
  GtkWidget *alignment2;
  GtkWidget *hbox8;
  GtkWidget *image2;
  GtkWidget *label23;
  GtkWidget *lbl_nbk2;
  GtkWidget *vbox4;
  GtkWidget *label20;
  GtkWidget *hbox5;
  GtkWidget *label21;
  GtkWidget *table4;
  GtkWidget *lbl_debug;
  GtkWidget *cmb_debug;
  GList *cmb_debug_items = NULL;
  GtkWidget *combo_entry2;
  GtkWidget *label19;
  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 (7, 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 ("_Server:");
  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);

  hbox2 = gtk_hbox_new (FALSE, 6);
  gtk_widget_set_name (hbox2, "hbox2");
  gtk_widget_show (hbox2);
  gtk_table_attach (GTK_TABLE (table1), hbox2, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);

  txt_server = gtk_entry_new ();
  gtk_widget_set_name (txt_server, "txt_server");
  gtk_widget_show (txt_server);
  gtk_box_pack_start (GTK_BOX (hbox2), txt_server, TRUE, TRUE, 0);

  lbl_port = gtk_label_new ("Port:");
  gtk_widget_set_name (lbl_port, "lbl_port");
  gtk_widget_show (lbl_port);
  gtk_box_pack_start (GTK_BOX (hbox2), lbl_port, FALSE, FALSE, 0);
  gtk_label_set_line_wrap (GTK_LABEL (lbl_port), TRUE);

  txt_port = gtk_entry_new ();
  gtk_widget_set_name (txt_port, "txt_port");
  gtk_widget_show (txt_port);
  gtk_box_pack_start (GTK_BOX (hbox2), txt_port, FALSE, TRUE, 0);
  gtk_widget_set_size_request (txt_port, 40, 23);
  gtk_entry_set_text (GTK_ENTRY (txt_port), "389");

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

  lbl_passwd = gtk_label_new ("Password:");
  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_passwd = gtk_entry_new ();
  gtk_widget_set_name (txt_passwd, "txt_passwd");
  gtk_widget_show (txt_passwd);
  gtk_table_attach (GTK_TABLE (table1), txt_passwd, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_entry_set_visibility (GTK_ENTRY (txt_passwd), FALSE);

  label14 = gtk_label_new ("Username (Binddn):");
  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_widget_set_size_request (label14, 142, -1);
  gtk_misc_set_alignment (GTK_MISC (label14), 0, 0.5);

  hbuttonbox4 = gtk_hbutton_box_new ();
  gtk_widget_set_name (hbuttonbox4, "hbuttonbox4");
  gtk_widget_show (hbuttonbox4);
  gtk_table_attach (GTK_TABLE (table1), hbuttonbox4, 1, 2, 6, 7,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  btn_auth_mechs = gtk_button_new ();
  gtk_widget_set_name (btn_auth_mechs, "btn_auth_mechs");
  gtk_widget_show (btn_auth_mechs);
  gtk_container_add (GTK_CONTAINER (hbuttonbox4), btn_auth_mechs);
  GTK_WIDGET_SET_FLAGS (btn_auth_mechs, 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_auth_mechs), alignment1);

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

  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 (hbox7), image1, FALSE, FALSE, 0);

  label22 = gtk_label_new_with_mnemonic ("Get From Server");
  gtk_widget_set_name (label22, "label22");
  gtk_widget_show (label22);
  gtk_box_pack_start (GTK_BOX (hbox7), label22, FALSE, FALSE, 0);

  lbl_auth = gtk_label_new ("Auth mechanism:");
  gtk_widget_set_name (lbl_auth, "lbl_auth");
  gtk_widget_show (lbl_auth);
  gtk_table_attach (GTK_TABLE (table1), lbl_auth, 0, 1, 5, 6,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_line_wrap (GTK_LABEL (lbl_auth), TRUE);
  gtk_misc_set_alignment (GTK_MISC (lbl_auth), 0, 0.5);

  opt_encryption = gtk_option_menu_new ();
  gtk_widget_set_name (opt_encryption, "opt_encryption");
  gtk_widget_show (opt_encryption);
  gtk_table_attach (GTK_TABLE (table1), opt_encryption, 1, 2, 4, 5,
                    (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 (opt_encryption), menu1);

  lbl_tls = gtk_label_new ("Use encryption:");
  gtk_widget_set_name (lbl_tls, "lbl_tls");
  gtk_widget_show (lbl_tls);
  gtk_table_attach (GTK_TABLE (table1), lbl_tls, 0, 1, 4, 5,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_line_wrap (GTK_LABEL (lbl_tls), TRUE);
  gtk_misc_set_alignment (GTK_MISC (lbl_tls), 0, 0.5);

  chk_anonymous = gtk_check_button_new_with_mnemonic ("Anonymous Access");
  gtk_widget_set_name (chk_anonymous, "chk_anonymous");
  gtk_widget_show (chk_anonymous);
  gtk_table_attach (GTK_TABLE (table1), chk_anonymous, 1, 2, 3, 4,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  cmb_authmech = gtk_combo_new ();
  g_object_set_data (G_OBJECT (GTK_COMBO (cmb_authmech)->popwin),
                     "GladeParentKey", cmb_authmech);
  gtk_widget_set_name (cmb_authmech, "cmb_authmech");
  gtk_widget_show (cmb_authmech);
  gtk_table_attach (GTK_TABLE (table1), cmb_authmech, 1, 2, 5, 6,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  txt_authmech = GTK_COMBO (cmb_authmech)->entry;
  gtk_widget_set_name (txt_authmech, "txt_authmech");
  gtk_widget_show (txt_authmech);
  gtk_entry_set_text (GTK_ENTRY (txt_authmech), "SIMPLE");

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

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

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

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

  lbl_searchbase = gtk_label_new ("Search base:");
  gtk_widget_set_name (lbl_searchbase, "lbl_searchbase");
  gtk_widget_show (lbl_searchbase);
  gtk_table_attach (GTK_TABLE (table2), lbl_searchbase, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_widget_set_size_request (lbl_searchbase, 142, -1);
  gtk_label_set_line_wrap (GTK_LABEL (lbl_searchbase), TRUE);
  gtk_misc_set_alignment (GTK_MISC (lbl_searchbase), 0, 0.5);

  lbl_filter = gtk_label_new ("Filter:");
  gtk_widget_set_name (lbl_filter, "lbl_filter");
  gtk_widget_show (lbl_filter);
  gtk_table_attach (GTK_TABLE (table2), lbl_filter, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_line_wrap (GTK_LABEL (lbl_filter), TRUE);
  gtk_misc_set_alignment (GTK_MISC (lbl_filter), 0, 0.5);

  txt_filter = gtk_entry_new ();
  gtk_widget_set_name (txt_filter, "txt_filter");
  gtk_widget_show (txt_filter);
  gtk_table_attach (GTK_TABLE (table2), txt_filter, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_entry_set_text (GTK_ENTRY (txt_filter), "(cn=*)");

  lbl_scope = gtk_label_new ("Scope:");
  gtk_widget_set_name (lbl_scope, "lbl_scope");
  gtk_widget_show (lbl_scope);
  gtk_table_attach (GTK_TABLE (table2), lbl_scope, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_line_wrap (GTK_LABEL (lbl_scope), TRUE);
  gtk_misc_set_alignment (GTK_MISC (lbl_scope), 0, 0.5);

  chk_write = gtk_check_button_new_with_mnemonic ("Allow write to database");
  gtk_widget_set_name (chk_write, "chk_write");
  gtk_widget_show (chk_write);
  gtk_table_attach (GTK_TABLE (table2), chk_write, 1, 2, 3, 4,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_widget_set_size_request (chk_write, 128, 21);
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (chk_write), TRUE);

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

  opt_scope = gtk_option_menu_new ();
  gtk_widget_set_name (opt_scope, "opt_scope");
  gtk_widget_show (opt_scope);
  gtk_table_attach (GTK_TABLE (table2), opt_scope, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  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, 3);
  gtk_widget_set_name (vbox3, "vbox3");
  gtk_widget_show (vbox3);
  gtk_container_add (GTK_CONTAINER (notebook1), vbox3);
  gtk_notebook_set_tab_label_packing (GTK_NOTEBOOK (notebook1), vbox3,
                                      FALSE, FALSE, GTK_PACK_START);
  gtk_container_set_border_width (GTK_CONTAINER (vbox3), 6);

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

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

  label18 = gtk_label_new ("    ");
  gtk_widget_set_name (label18, "label18");
  gtk_widget_show (label18);
  gtk_box_pack_start (GTK_BOX (hbox4), label18, FALSE, FALSE, 0);

  table3 = gtk_table_new (9, 2, FALSE);
  gtk_widget_set_name (table3, "table3");
  gtk_widget_show (table3);
  gtk_box_pack_start (GTK_BOX (hbox4), table3, TRUE, TRUE, 0);
  gtk_table_set_row_spacings (GTK_TABLE (table3), 6);
  gtk_table_set_col_spacings (GTK_TABLE (table3), 12);

  lbl_test_bind = gtk_label_new ("Authenticate:");
  gtk_widget_set_name (lbl_test_bind, "lbl_test_bind");
  gtk_widget_show (lbl_test_bind);
  gtk_table_attach (GTK_TABLE (table3), lbl_test_bind, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_line_wrap (GTK_LABEL (lbl_test_bind), TRUE);
  gtk_misc_set_alignment (GTK_MISC (lbl_test_bind), 0, 0.5);

  lbl_test_search = gtk_label_new ("Search:");
  gtk_widget_set_name (lbl_test_search, "lbl_test_search");
  gtk_widget_show (lbl_test_search);
  gtk_table_attach (GTK_TABLE (table3), lbl_test_search, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_line_wrap (GTK_LABEL (lbl_test_search), TRUE);
  gtk_misc_set_alignment (GTK_MISC (lbl_test_search), 0, 0.5);

  lbl_test_add = gtk_label_new ("Write access:");
  gtk_widget_set_name (lbl_test_add, "lbl_test_add");
  gtk_widget_show (lbl_test_add);
  gtk_table_attach (GTK_TABLE (table3), lbl_test_add, 0, 1, 3, 4,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_line_wrap (GTK_LABEL (lbl_test_add), TRUE);
  gtk_misc_set_alignment (GTK_MISC (lbl_test_add), 0, 0.5);

  lbl_test_evolution = gtk_label_new ("Evolution Support:");
  gtk_widget_set_name (lbl_test_evolution, "lbl_test_evolution");
  gtk_widget_show (lbl_test_evolution);
  gtk_table_attach (GTK_TABLE (table3), lbl_test_evolution, 0, 1, 4, 5,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_line_wrap (GTK_LABEL (lbl_test_evolution), TRUE);
  gtk_misc_set_alignment (GTK_MISC (lbl_test_evolution), 0, 0.5);

  lbl_test_ldap = gtk_label_new ("Ldap v3 Support:");
  gtk_widget_set_name (lbl_test_ldap, "lbl_test_ldap");
  gtk_widget_show (lbl_test_ldap);
  gtk_table_attach (GTK_TABLE (table3), lbl_test_ldap, 0, 1, 5, 6,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_line_wrap (GTK_LABEL (lbl_test_ldap), TRUE);
  gtk_misc_set_alignment (GTK_MISC (lbl_test_ldap), 0, 0.5);

  lbl_test_tls = gtk_label_new ("Encryption:");
  gtk_widget_set_name (lbl_test_tls, "lbl_test_tls");
  gtk_widget_show (lbl_test_tls);
  gtk_table_attach (GTK_TABLE (table3), lbl_test_tls, 0, 1, 6, 7,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_line_wrap (GTK_LABEL (lbl_test_tls), TRUE);
  gtk_misc_set_alignment (GTK_MISC (lbl_test_tls), 0, 0.5);

  lbl_strong_auth = gtk_label_new ("Strong Authentication:");
  gtk_widget_set_name (lbl_strong_auth, "lbl_strong_auth");
  gtk_widget_show (lbl_strong_auth);
  gtk_table_attach (GTK_TABLE (table3), lbl_strong_auth, 0, 1, 7, 8,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_line_wrap (GTK_LABEL (lbl_strong_auth), TRUE);
  gtk_misc_set_alignment (GTK_MISC (lbl_strong_auth), 0, 0.5);

  img_connection = gtk_image_new_from_stock ("gtk-dialog-question", GTK_ICON_SIZE_BUTTON);
  gtk_widget_set_name (img_connection, "img_connection");
  gtk_widget_show (img_connection);
  gtk_table_attach (GTK_TABLE (table3), img_connection, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (img_connection), 1, 0.5);

  img_authenticate = gtk_image_new_from_stock ("gtk-dialog-question", GTK_ICON_SIZE_BUTTON);
  gtk_widget_set_name (img_authenticate, "img_authenticate");
  gtk_widget_show (img_authenticate);
  gtk_table_attach (GTK_TABLE (table3), img_authenticate, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (img_authenticate), 1, 0.5);

  img_search = gtk_image_new_from_stock ("gtk-dialog-question", GTK_ICON_SIZE_BUTTON);
  gtk_widget_set_name (img_search, "img_search");
  gtk_widget_show (img_search);
  gtk_table_attach (GTK_TABLE (table3), img_search, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (img_search), 1, 0.5);

  img_write = gtk_image_new_from_stock ("gtk-dialog-question", GTK_ICON_SIZE_BUTTON);
  gtk_widget_set_name (img_write, "img_write");
  gtk_widget_show (img_write);
  gtk_table_attach (GTK_TABLE (table3), img_write, 1, 2, 3, 4,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (img_write), 1, 0.5);

  img_evolution = gtk_image_new_from_stock ("gtk-dialog-question", GTK_ICON_SIZE_BUTTON);
  gtk_widget_set_name (img_evolution, "img_evolution");
  gtk_widget_show (img_evolution);
  gtk_table_attach (GTK_TABLE (table3), img_evolution, 1, 2, 4, 5,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (img_evolution), 1, 0.5);

  img_ldap = gtk_image_new_from_stock ("gtk-dialog-question", GTK_ICON_SIZE_BUTTON);
  gtk_widget_set_name (img_ldap, "img_ldap");
  gtk_widget_show (img_ldap);
  gtk_table_attach (GTK_TABLE (table3), img_ldap, 1, 2, 5, 6,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (img_ldap), 1, 0.5);

  img_encrypt = gtk_image_new_from_stock ("gtk-dialog-question", GTK_ICON_SIZE_BUTTON);
  gtk_widget_set_name (img_encrypt, "img_encrypt");
  gtk_widget_show (img_encrypt);
  gtk_table_attach (GTK_TABLE (table3), img_encrypt, 1, 2, 6, 7,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (img_encrypt), 1, 0.5);

  img_strong_auth = gtk_image_new_from_stock ("gtk-dialog-question", GTK_ICON_SIZE_BUTTON);
  gtk_widget_set_name (img_strong_auth, "img_strong_auth");
  gtk_widget_show (img_strong_auth);
  gtk_table_attach (GTK_TABLE (table3), img_strong_auth, 1, 2, 7, 8,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (img_strong_auth), 1, 0.5);

  hbuttonbox3 = gtk_hbutton_box_new ();
  gtk_widget_set_name (hbuttonbox3, "hbuttonbox3");
  gtk_widget_show (hbuttonbox3);
  gtk_table_attach (GTK_TABLE (table3), hbuttonbox3, 0, 2, 8, 9,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox3), GTK_BUTTONBOX_SPREAD);
  gtk_box_set_spacing (GTK_BOX (hbuttonbox3), 12);

  lbl_test_server = gtk_label_new ("Connection:");
  gtk_widget_set_name (lbl_test_server, "lbl_test_server");
  gtk_widget_show (lbl_test_server);
  gtk_table_attach (GTK_TABLE (table3), lbl_test_server, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_line_wrap (GTK_LABEL (lbl_test_server), TRUE);
  gtk_misc_set_alignment (GTK_MISC (lbl_test_server), 0, 0.5);

  hbuttonbox5 = gtk_hbutton_box_new ();
  gtk_widget_set_name (hbuttonbox5, "hbuttonbox5");
  gtk_widget_show (hbuttonbox5);
  gtk_box_pack_start (GTK_BOX (vbox3), hbuttonbox5, FALSE, TRUE, 0);

  btn_test = gtk_button_new ();
  gtk_widget_set_name (btn_test, "btn_test");
  gtk_widget_show (btn_test);
  gtk_container_add (GTK_CONTAINER (hbuttonbox5), btn_test);
  GTK_WIDGET_SET_FLAGS (btn_test, 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_test), alignment2);

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

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

  label23 = gtk_label_new_with_mnemonic ("Test Server Connection");
  gtk_widget_set_name (label23, "label23");
  gtk_widget_show (label23);
  gtk_box_pack_start (GTK_BOX (hbox8), label23, FALSE, FALSE, 0);

  lbl_nbk2 = gtk_label_new ("Server features");
  gtk_widget_set_name (lbl_nbk2, "lbl_nbk2");
  gtk_widget_show (lbl_nbk2);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 1), lbl_nbk2);

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

  label20 = gtk_label_new_with_mnemonic ("<span weight='bold'>Debug options:</span>");
  gtk_widget_set_name (label20, "label20");
  gtk_widget_show (label20);
  gtk_box_pack_start (GTK_BOX (vbox4), label20, FALSE, FALSE, 0);
  gtk_label_set_use_markup (GTK_LABEL (label20), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label20), 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 (vbox4), hbox5, TRUE, TRUE, 0);

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

  table4 = gtk_table_new (1, 2, FALSE);
  gtk_widget_set_name (table4, "table4");
  gtk_widget_show (table4);
  gtk_box_pack_start (GTK_BOX (hbox5), table4, TRUE, TRUE, 0);
  gtk_table_set_row_spacings (GTK_TABLE (table4), 6);
  gtk_table_set_col_spacings (GTK_TABLE (table4), 12);

  lbl_debug = gtk_label_new ("Debug Level:");
  gtk_widget_set_name (lbl_debug, "lbl_debug");
  gtk_widget_show (lbl_debug);
  gtk_table_attach (GTK_TABLE (table4), lbl_debug, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_line_wrap (GTK_LABEL (lbl_debug), TRUE);
  gtk_misc_set_alignment (GTK_MISC (lbl_debug), 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_table_attach (GTK_TABLE (table4), cmb_debug, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  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_entry2 = GTK_COMBO (cmb_debug)->entry;
  gtk_widget_set_name (combo_entry2, "combo_entry2");
  gtk_widget_show (combo_entry2);

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

  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_auth_mechs, "clicked",
                    G_CALLBACK (on_btn_auth_mechs_clicked),
                    NULL);
  g_signal_connect ((gpointer) chk_anonymous, "toggled",
                    G_CALLBACK (on_chk_anonymous_toggled),
                    NULL);
  g_signal_connect ((gpointer) btn_test, "clicked",
                    G_CALLBACK (on_btn_test_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);

  /* 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, hbox2, "hbox2");
  GLADE_HOOKUP_OBJECT (wnd_options, txt_server, "txt_server");
  GLADE_HOOKUP_OBJECT (wnd_options, lbl_port, "lbl_port");
  GLADE_HOOKUP_OBJECT (wnd_options, txt_port, "txt_port");
  GLADE_HOOKUP_OBJECT (wnd_options, txt_binddn, "txt_binddn");
  GLADE_HOOKUP_OBJECT (wnd_options, lbl_passwd, "lbl_passwd");
  GLADE_HOOKUP_OBJECT (wnd_options, txt_passwd, "txt_passwd");
  GLADE_HOOKUP_OBJECT (wnd_options, label14, "label14");
  GLADE_HOOKUP_OBJECT (wnd_options, hbuttonbox4, "hbuttonbox4");
  GLADE_HOOKUP_OBJECT (wnd_options, btn_auth_mechs, "btn_auth_mechs");
  GLADE_HOOKUP_OBJECT (wnd_options, alignment1, "alignment1");
  GLADE_HOOKUP_OBJECT (wnd_options, hbox7, "hbox7");
  GLADE_HOOKUP_OBJECT (wnd_options, image1, "image1");
  GLADE_HOOKUP_OBJECT (wnd_options, label22, "label22");
  GLADE_HOOKUP_OBJECT (wnd_options, lbl_auth, "lbl_auth");
  GLADE_HOOKUP_OBJECT (wnd_options, opt_encryption, "opt_encryption");
  GLADE_HOOKUP_OBJECT (wnd_options, menu1, "menu1");
  GLADE_HOOKUP_OBJECT (wnd_options, lbl_tls, "lbl_tls");
  GLADE_HOOKUP_OBJECT (wnd_options, chk_anonymous, "chk_anonymous");
  GLADE_HOOKUP_OBJECT (wnd_options, cmb_authmech, "cmb_authmech");
  GLADE_HOOKUP_OBJECT (wnd_options, txt_authmech, "txt_authmech");
  GLADE_HOOKUP_OBJECT (wnd_options, label15, "label15");
  GLADE_HOOKUP_OBJECT (wnd_options, hbox3, "hbox3");
  GLADE_HOOKUP_OBJECT (wnd_options, label16, "label16");
  GLADE_HOOKUP_OBJECT (wnd_options, table2, "table2");
  GLADE_HOOKUP_OBJECT (wnd_options, lbl_searchbase, "lbl_searchbase");
  GLADE_HOOKUP_OBJECT (wnd_options, lbl_filter, "lbl_filter");
  GLADE_HOOKUP_OBJECT (wnd_options, txt_filter, "txt_filter");
  GLADE_HOOKUP_OBJECT (wnd_options, lbl_scope, "lbl_scope");
  GLADE_HOOKUP_OBJECT (wnd_options, chk_write, "chk_write");
  GLADE_HOOKUP_OBJECT (wnd_options, txt_searchbase, "txt_searchbase");
  GLADE_HOOKUP_OBJECT (wnd_options, opt_scope, "opt_scope");
  GLADE_HOOKUP_OBJECT (wnd_options, lbl_nbk1, "lbl_nbk1");
  GLADE_HOOKUP_OBJECT (wnd_options, vbox3, "vbox3");
  GLADE_HOOKUP_OBJECT (wnd_options, label17, "label17");
  GLADE_HOOKUP_OBJECT (wnd_options, hbox4, "hbox4");
  GLADE_HOOKUP_OBJECT (wnd_options, label18, "label18");
  GLADE_HOOKUP_OBJECT (wnd_options, table3, "table3");
  GLADE_HOOKUP_OBJECT (wnd_options, lbl_test_bind, "lbl_test_bind");
  GLADE_HOOKUP_OBJECT (wnd_options, lbl_test_search, "lbl_test_search");
  GLADE_HOOKUP_OBJECT (wnd_options, lbl_test_add, "lbl_test_add");
  GLADE_HOOKUP_OBJECT (wnd_options, lbl_test_evolution, "lbl_test_evolution");
  GLADE_HOOKUP_OBJECT (wnd_options, lbl_test_ldap, "lbl_test_ldap");
  GLADE_HOOKUP_OBJECT (wnd_options, lbl_test_tls, "lbl_test_tls");
  GLADE_HOOKUP_OBJECT (wnd_options, lbl_strong_auth, "lbl_strong_auth");
  GLADE_HOOKUP_OBJECT (wnd_options, img_connection, "img_connection");
  GLADE_HOOKUP_OBJECT (wnd_options, img_authenticate, "img_authenticate");
  GLADE_HOOKUP_OBJECT (wnd_options, img_search, "img_search");
  GLADE_HOOKUP_OBJECT (wnd_options, img_write, "img_write");
  GLADE_HOOKUP_OBJECT (wnd_options, img_evolution, "img_evolution");
  GLADE_HOOKUP_OBJECT (wnd_options, img_ldap, "img_ldap");
  GLADE_HOOKUP_OBJECT (wnd_options, img_encrypt, "img_encrypt");
  GLADE_HOOKUP_OBJECT (wnd_options, img_strong_auth, "img_strong_auth");
  GLADE_HOOKUP_OBJECT (wnd_options, hbuttonbox3, "hbuttonbox3");
  GLADE_HOOKUP_OBJECT (wnd_options, lbl_test_server, "lbl_test_server");
  GLADE_HOOKUP_OBJECT (wnd_options, hbuttonbox5, "hbuttonbox5");
  GLADE_HOOKUP_OBJECT (wnd_options, btn_test, "btn_test");
  GLADE_HOOKUP_OBJECT (wnd_options, alignment2, "alignment2");
  GLADE_HOOKUP_OBJECT (wnd_options, hbox8, "hbox8");
  GLADE_HOOKUP_OBJECT (wnd_options, image2, "image2");
  GLADE_HOOKUP_OBJECT (wnd_options, label23, "label23");
  GLADE_HOOKUP_OBJECT (wnd_options, lbl_nbk2, "lbl_nbk2");
  GLADE_HOOKUP_OBJECT (wnd_options, vbox4, "vbox4");
  GLADE_HOOKUP_OBJECT (wnd_options, label20, "label20");
  GLADE_HOOKUP_OBJECT (wnd_options, hbox5, "hbox5");
  GLADE_HOOKUP_OBJECT (wnd_options, label21, "label21");
  GLADE_HOOKUP_OBJECT (wnd_options, table4, "table4");
  GLADE_HOOKUP_OBJECT (wnd_options, lbl_debug, "lbl_debug");
  GLADE_HOOKUP_OBJECT (wnd_options, cmb_debug, "cmb_debug");
  GLADE_HOOKUP_OBJECT (wnd_options, combo_entry2, "combo_entry2");
  GLADE_HOOKUP_OBJECT (wnd_options, label19, "label19");
  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;
}

