/*
 * 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[] =
{
  GNOMEUIINFO_END
};

static GnomeUIInfo menu1_uiinfo[] =
{
  GNOMEUIINFO_END
};

static GnomeUIInfo convertwidget2_uiinfo[] =
{
  GNOMEUIINFO_END
};

GtkWidget*
create_optwin (void)
{
  GtkWidget *optwin;
  GtkWidget *vbox1;
  GtkWidget *label4;
  GtkWidget *hbox1;
  GtkWidget *label5;
  GtkWidget *calendarmenu;
  AtkObject *atko;
  GtkWidget *convertwidget1;
  GtkWidget *label6;
  GtkWidget *hbox2;
  GtkWidget *label7;
  GtkWidget *addressbookmenu;
  GtkWidget *menu1;
  GtkWidget *label8;
  GtkWidget *hbox3;
  GtkWidget *label9;
  GtkWidget *todomenu;
  GtkWidget *convertwidget2;
  GtkWidget *hseparator1;
  GtkWidget *hbuttonbox;
  GtkWidget *cancelbutton;
  GtkWidget *okbutton;

  optwin = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_container_set_border_width (GTK_CONTAINER (optwin), 12);
  gtk_window_set_title (GTK_WINDOW (optwin), "Evolution2 Options");

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

  label4 = gtk_label_new ("<span weight='bold'>Calendar:</span>");
  gtk_widget_show (label4);
  gtk_box_pack_start (GTK_BOX (vbox1), label4, FALSE, FALSE, 0);
  gtk_label_set_use_markup (GTK_LABEL (label4), TRUE);
  gtk_label_set_justify (GTK_LABEL (label4), GTK_JUSTIFY_LEFT);
  gtk_misc_set_alignment (GTK_MISC (label4), 0, 0.5);

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

  label5 = gtk_label_new ("    ");
  gtk_widget_show (label5);
  gtk_box_pack_start (GTK_BOX (hbox1), label5, FALSE, FALSE, 0);
  gtk_label_set_justify (GTK_LABEL (label5), GTK_JUSTIFY_LEFT);

  calendarmenu = gtk_option_menu_new ();
  gtk_widget_show (calendarmenu);
  gtk_box_pack_start (GTK_BOX (hbox1), calendarmenu, TRUE, TRUE, 0);

  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 (calendarmenu), convertwidget1);

  label6 = gtk_label_new ("<span weight='bold'>Addressbook:</span>");
  gtk_widget_show (label6);
  gtk_box_pack_start (GTK_BOX (vbox1), label6, FALSE, FALSE, 0);
  gtk_label_set_use_markup (GTK_LABEL (label6), TRUE);
  gtk_label_set_justify (GTK_LABEL (label6), GTK_JUSTIFY_LEFT);
  gtk_misc_set_alignment (GTK_MISC (label6), 0, 0.5);

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

  label7 = gtk_label_new ("    ");
  gtk_widget_show (label7);
  gtk_box_pack_start (GTK_BOX (hbox2), label7, FALSE, FALSE, 0);
  gtk_label_set_justify (GTK_LABEL (label7), GTK_JUSTIFY_LEFT);

  addressbookmenu = gtk_option_menu_new ();
  gtk_widget_show (addressbookmenu);
  gtk_box_pack_start (GTK_BOX (hbox2), addressbookmenu, TRUE, TRUE, 0);

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

  gtk_option_menu_set_menu (GTK_OPTION_MENU (addressbookmenu), menu1);

  label8 = gtk_label_new ("<span weight='bold'>Tasks:</span>");
  gtk_widget_show (label8);
  gtk_box_pack_start (GTK_BOX (vbox1), label8, FALSE, FALSE, 0);
  gtk_label_set_use_markup (GTK_LABEL (label8), TRUE);
  gtk_label_set_justify (GTK_LABEL (label8), GTK_JUSTIFY_LEFT);
  gtk_misc_set_alignment (GTK_MISC (label8), 0, 0.5);

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

  label9 = gtk_label_new ("    ");
  gtk_widget_show (label9);
  gtk_box_pack_start (GTK_BOX (hbox3), label9, FALSE, FALSE, 0);
  gtk_label_set_justify (GTK_LABEL (label9), GTK_JUSTIFY_LEFT);

  todomenu = gtk_option_menu_new ();
  gtk_widget_show (todomenu);
  gtk_box_pack_start (GTK_BOX (hbox3), todomenu, TRUE, TRUE, 0);

  convertwidget2 = gtk_menu_new ();
  gnome_app_fill_menu (GTK_MENU_SHELL (convertwidget2), convertwidget2_uiinfo,
                       NULL, FALSE, 0);

  gtk_option_menu_set_menu (GTK_OPTION_MENU (todomenu), convertwidget2);

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

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

  cancelbutton = gtk_button_new_from_stock ("gtk-cancel");
  gtk_widget_show (cancelbutton);
  gtk_container_add (GTK_CONTAINER (hbuttonbox), 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 (hbuttonbox), okbutton);
  GTK_WIDGET_SET_FLAGS (okbutton, GTK_CAN_DEFAULT);

  g_signal_connect ((gpointer) optwin, "delete_event",
                    G_CALLBACK (evo2_optwin_delete_event),
                    NULL);
  g_signal_connect ((gpointer) cancelbutton, "clicked",
                    G_CALLBACK (evo2_cancelbutton_clicked),
                    NULL);
  g_signal_connect ((gpointer) okbutton, "clicked",
                    G_CALLBACK (evo2_okbutton_clicked),
                    NULL);

  atko = gtk_widget_get_accessible (calendarmenu);
  atk_object_set_description (atko, "Select the calendar you wish to sync.");

  atko = gtk_widget_get_accessible (addressbookmenu);
  atk_object_set_description (atko, "Select the addressbook you wish to sync.");

  atko = gtk_widget_get_accessible (todomenu);
  atk_object_set_description (atko, "Select the tasks you wish to sync.");


  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (optwin, optwin, "optwin");
  GLADE_HOOKUP_OBJECT (optwin, vbox1, "vbox1");
  GLADE_HOOKUP_OBJECT (optwin, label4, "label4");
  GLADE_HOOKUP_OBJECT (optwin, hbox1, "hbox1");
  GLADE_HOOKUP_OBJECT (optwin, label5, "label5");
  GLADE_HOOKUP_OBJECT (optwin, calendarmenu, "calendarmenu");
  GLADE_HOOKUP_OBJECT (optwin, convertwidget1, "convertwidget1");
  GLADE_HOOKUP_OBJECT (optwin, label6, "label6");
  GLADE_HOOKUP_OBJECT (optwin, hbox2, "hbox2");
  GLADE_HOOKUP_OBJECT (optwin, label7, "label7");
  GLADE_HOOKUP_OBJECT (optwin, addressbookmenu, "addressbookmenu");
  GLADE_HOOKUP_OBJECT (optwin, menu1, "menu1");
  GLADE_HOOKUP_OBJECT (optwin, label8, "label8");
  GLADE_HOOKUP_OBJECT (optwin, hbox3, "hbox3");
  GLADE_HOOKUP_OBJECT (optwin, label9, "label9");
  GLADE_HOOKUP_OBJECT (optwin, todomenu, "todomenu");
  GLADE_HOOKUP_OBJECT (optwin, convertwidget2, "convertwidget2");
  GLADE_HOOKUP_OBJECT (optwin, hseparator1, "hseparator1");
  GLADE_HOOKUP_OBJECT (optwin, hbuttonbox, "hbuttonbox");
  GLADE_HOOKUP_OBJECT (optwin, cancelbutton, "cancelbutton");
  GLADE_HOOKUP_OBJECT (optwin, okbutton, "okbutton");

  return optwin;
}

