/*
 * 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>

#if 0
#include <bonobo.h>
#include <gnome.h>
#endif
#include <gtk/gtk.h>
#include <gtk/gtkcheckbutton.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)

GtkWidget*
create_window (void)
{
  GtkWidget *window;
  GtkWidget *vbox1;
  GtkWidget *hbox6;
  GtkWidget *image2;
  GtkWidget *label9;
  GtkWidget *frame1;
  GtkWidget *alignment1;
  GtkWidget *vbox2;
  GtkWidget *c_alpha;
  GtkWidget *c_numbers;
  GtkWidget *c_symbols;
  GtkWidget *hbox1;
  GtkWidget *c_custom;
  GtkWidget *c_custom_details;
  GtkWidget *label1;
  GtkWidget *frame2;
  GtkWidget *alignment2;
  GtkWidget *vbox3;
  GtkWidget *hbox3;
  GtkWidget *label5;
  GtkObject *length_adj;
  GtkWidget *length;
  GtkWidget *label4;
  GtkWidget *frame3;
  GtkWidget *alignment4;
  GtkWidget *pass_lbl;
  GtkWidget *label7;
  GtkWidget *hbox4;
  GtkWidget *generate_btn;
  GtkWidget *alignment3;
  GtkWidget *hbox5;
  GtkWidget *image1;
  GtkWidget *label;
  GtkWidget *button2;
  GtkWidget *about_btn;

  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (window), "Password generator - by TeamQ");

  vbox1 = gtk_vbox_new (FALSE, 7);
  gtk_widget_show (vbox1);
  gtk_container_add (GTK_CONTAINER (window), vbox1);
  gtk_container_set_border_width (GTK_CONTAINER (vbox1), 5);

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

#if 0
  image2 = gtk_image_new_from_stock ("gnome-stock-authentication", GTK_ICON_SIZE_DND);
  gtk_widget_show (image2);
  gtk_box_pack_start (GTK_BOX (hbox6), image2, FALSE, TRUE, 0);
#endif

  label9 = gtk_label_new ("Password generator - by TeamQ");
  gtk_widget_show (label9);
  gtk_box_pack_start (GTK_BOX (hbox6), label9, FALSE, FALSE, 0);
#if 0
  gtk_label_set_use_markup (GTK_LABEL (label9), TRUE);

  frame1 = gtk_frame_new (NULL);
#endif
  frame1 = gtk_frame_new ("Characters to use");

  gtk_widget_show (frame1);
  gtk_box_pack_start (GTK_BOX (vbox1), frame1, FALSE, TRUE, 0);
  gtk_frame_set_shadow_type (GTK_FRAME (frame1), GTK_SHADOW_IN);

#if 0
  alignment1 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment1);
  gtk_container_add (GTK_CONTAINER (frame1), alignment1);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment1), 0, 0, 12, 0);
#endif

  vbox2 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox2);
#if 0
  gtk_container_add (GTK_CONTAINER (alignment1), vbox2);
#else
  gtk_container_add (GTK_CONTAINER (frame1), vbox2);
#endif

#if 0
  c_alpha = gtk_check_button_new_with_mnemonic ("Standard alphabet");
#else
  c_alpha = gtk_check_button_new_with_label ("Standard alphabet");
#endif
  gtk_widget_show (c_alpha);
  gtk_box_pack_start (GTK_BOX (vbox2), c_alpha, FALSE, FALSE, 0);
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (c_alpha), TRUE);

#if 0
  c_numbers = gtk_check_button_new_with_mnemonic ("Numbers");
#else
  c_numbers = gtk_check_button_new_with_label ("Numbers");
#endif
  gtk_widget_show (c_numbers);
  gtk_box_pack_start (GTK_BOX (vbox2), c_numbers, FALSE, FALSE, 0);

#if 0
  c_symbols = gtk_check_button_new_with_mnemonic ("Symbols");
#else
  c_symbols = gtk_check_button_new_with_label ("Symbols");
#endif
  gtk_widget_show (c_symbols);
  gtk_box_pack_start (GTK_BOX (vbox2), c_symbols, FALSE, FALSE, 0);

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

#if 0 
  c_custom = gtk_check_button_new_with_mnemonic ("Custom");
#else
  c_custom = gtk_check_button_new_with_label ("Custom");
#endif
  gtk_widget_show (c_custom);
  gtk_box_pack_start (GTK_BOX (hbox1), c_custom, FALSE, FALSE, 0);

  c_custom_details = gtk_entry_new ();
  gtk_widget_show (c_custom_details);
  gtk_box_pack_start (GTK_BOX (hbox1), c_custom_details, TRUE, TRUE, 0);
  gtk_widget_set_sensitive (c_custom_details, FALSE);

  label1 = gtk_label_new ("Characters to use");
#if 0
  gtk_widget_show (label1);
  gtk_frame_set_label_widget (GTK_FRAME (frame1), label1);
  gtk_label_set_use_markup (GTK_LABEL (label1), TRUE);

  frame2 = gtk_frame_new (NULL);
#endif
  frame2 = gtk_frame_new ("Details");
  gtk_widget_show (frame2);
  gtk_box_pack_start (GTK_BOX (vbox1), frame2, FALSE, TRUE, 0);
  gtk_frame_set_shadow_type (GTK_FRAME (frame2), GTK_SHADOW_IN);

#if 0
  alignment2 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment2);
  gtk_container_add (GTK_CONTAINER (frame2), alignment2);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment2), 0, 0, 12, 0);
#endif

  vbox3 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox3);
#if 0
  gtk_container_add (GTK_CONTAINER (alignment2), vbox3);
#else
  gtk_container_add (GTK_CONTAINER (frame2), vbox3);
#endif

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

  label5 = gtk_label_new ("Length:");
  gtk_widget_show (label5);
  gtk_box_pack_start (GTK_BOX (hbox3), label5, FALSE, FALSE, 0);

  length_adj = gtk_adjustment_new (8, 0, 100, 1, 10, 10);
  length = gtk_spin_button_new (GTK_ADJUSTMENT (length_adj), 1, 0);
  gtk_widget_show (length);
  gtk_box_pack_start (GTK_BOX (hbox3), length, FALSE, TRUE, 0);

  label4 = gtk_label_new ("<b>Details</b>");
#if 0
  gtk_widget_show (label4);
  gtk_frame_set_label_widget (GTK_FRAME (frame2), label4);
  gtk_label_set_use_markup (GTK_LABEL (label4), TRUE);

  frame3 = gtk_frame_new (NULL);
#endif
  frame3 = gtk_frame_new ("Password generated");
  gtk_widget_show (frame3);
  gtk_box_pack_start (GTK_BOX (vbox1), frame3, FALSE, TRUE, 0);
  gtk_frame_set_shadow_type (GTK_FRAME (frame3), GTK_SHADOW_IN);

#if 0
  alignment4 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment4);
  gtk_container_add (GTK_CONTAINER (frame3), alignment4);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment4), 0, 0, 12, 0);
#endif

  pass_lbl = gtk_label_new ("");
  gtk_widget_show (pass_lbl);
#if 0
  gtk_container_add (GTK_CONTAINER (alignment4), pass_lbl);
#else
  gtk_container_add (GTK_CONTAINER (frame3), pass_lbl);
#endif
  GTK_WIDGET_SET_FLAGS (pass_lbl, GTK_CAN_FOCUS);
#if 0
  gtk_label_set_use_markup (GTK_LABEL (pass_lbl), TRUE);
#endif
  gtk_label_set_selectable (GTK_LABEL (pass_lbl), TRUE);

  label7 = gtk_label_new ("<b>Password generated</b>");
#if 0
  gtk_widget_show (label7);
  gtk_frame_set_label_widget (GTK_FRAME (frame3), label7);
  gtk_label_set_use_markup (GTK_LABEL (label7), TRUE);
#endif

  hbox4 = gtk_hbox_new (FALSE, 4);
  gtk_widget_show (hbox4);
  gtk_box_pack_start (GTK_BOX (vbox1), hbox4, FALSE, TRUE, 0);
  gtk_widget_set_size_request (hbox4, -1, 47);
  gtk_container_set_border_width (GTK_CONTAINER (hbox4), 6);

  generate_btn = gtk_button_new_with_label ("Generate");
  gtk_widget_show (generate_btn);
  gtk_box_pack_start (GTK_BOX (hbox4), generate_btn, FALSE, FALSE, 0);
#if 0

  alignment3 = gtk_alignment_new (0.5, 0.5, 0, 0);
  gtk_widget_show (alignment3);
  gtk_container_add (GTK_CONTAINER (generate_btn), alignment3);

  hbox5 = gtk_hbox_new (FALSE, 2);
  gtk_widget_show (hbox5);
  gtk_container_add (GTK_CONTAINER (alignment3), hbox5);
  gtk_container_add (GTK_CONTAINER (generate_btn), hbox5);
#endif

#if 0
  image1 = gtk_image_new_from_stock ("gtk-index", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image1);
  gtk_box_pack_start (GTK_BOX (hbox5), image1, FALSE, FALSE, 0);
#endif

#if 0
  label = gtk_label_new_with_mnemonic ("Generate");
  gtk_widget_show (label);
  gtk_box_pack_start (GTK_BOX (hbox5), label, FALSE, FALSE, 0);
#endif

#if 0
  button2 = gtk_button_new_from_stock ("gtk-close");
#else
  button2 = gtk_button_new_with_label ("Close");
#endif
  gtk_widget_show (button2);
  gtk_box_pack_start (GTK_BOX (hbox4), button2, FALSE, FALSE, 0);

#if 0
  about_btn = gtk_button_new_from_stock ("gtk-about");
  gtk_widget_show (about_btn);
  gtk_box_pack_end (GTK_BOX (hbox4), about_btn, FALSE, FALSE, 0);
#endif

  g_signal_connect ((gpointer) window, "delete_event",
                    G_CALLBACK (gtk_main_quit),
                    NULL);
  g_signal_connect ((gpointer) c_custom, "toggled",
                    G_CALLBACK (on_c_custom_toggled),
                    NULL);
  g_signal_connect ((gpointer) generate_btn, "pressed",
                    G_CALLBACK (on_generate_btn_pressed),
                    NULL);
  g_signal_connect ((gpointer) generate_btn, "released",
                    G_CALLBACK (on_generate_btn_released),
                    NULL);
  g_signal_connect ((gpointer) button2, "clicked",
                    G_CALLBACK (gtk_main_quit),
                    NULL);
#if 0
  g_signal_connect ((gpointer) about_btn, "clicked",
                    G_CALLBACK (on_about_btn_clicked),
                    NULL);
#endif

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (window, window, "window");
  GLADE_HOOKUP_OBJECT (window, vbox1, "vbox1");
  GLADE_HOOKUP_OBJECT (window, hbox6, "hbox6");
  GLADE_HOOKUP_OBJECT (window, image2, "image2");
  GLADE_HOOKUP_OBJECT (window, label9, "label9");
  GLADE_HOOKUP_OBJECT (window, frame1, "frame1");
#if 0
  GLADE_HOOKUP_OBJECT (window, alignment1, "alignment1");
#endif
  GLADE_HOOKUP_OBJECT (window, vbox2, "vbox2");
  GLADE_HOOKUP_OBJECT (window, c_alpha, "c_alpha");
  GLADE_HOOKUP_OBJECT (window, c_numbers, "c_numbers");
  GLADE_HOOKUP_OBJECT (window, c_symbols, "c_symbols");
  GLADE_HOOKUP_OBJECT (window, hbox1, "hbox1");
  GLADE_HOOKUP_OBJECT (window, c_custom, "c_custom");
  GLADE_HOOKUP_OBJECT (window, c_custom_details, "c_custom_details");
  GLADE_HOOKUP_OBJECT (window, label1, "label1");
  GLADE_HOOKUP_OBJECT (window, frame2, "frame2");
#if 0
  GLADE_HOOKUP_OBJECT (window, alignment2, "alignment2");
#endif
  GLADE_HOOKUP_OBJECT (window, vbox3, "vbox3");
  GLADE_HOOKUP_OBJECT (window, hbox3, "hbox3");
  GLADE_HOOKUP_OBJECT (window, label5, "label5");
  GLADE_HOOKUP_OBJECT (window, length, "length");
  GLADE_HOOKUP_OBJECT (window, label4, "label4");
  GLADE_HOOKUP_OBJECT (window, frame3, "frame3");
#if 0
  GLADE_HOOKUP_OBJECT (window, alignment4, "alignment4");
#endif
  GLADE_HOOKUP_OBJECT (window, pass_lbl, "pass_lbl");
  GLADE_HOOKUP_OBJECT (window, label7, "label7");
  GLADE_HOOKUP_OBJECT (window, hbox4, "hbox4");
  GLADE_HOOKUP_OBJECT (window, generate_btn, "generate_btn");
#if 0
  GLADE_HOOKUP_OBJECT (window, alignment3, "alignment3");
  GLADE_HOOKUP_OBJECT (window, hbox5, "hbox5");
#endif
  GLADE_HOOKUP_OBJECT (window, image1, "image1");
#if 0
  GLADE_HOOKUP_OBJECT (window, label, "label");
#endif
  GLADE_HOOKUP_OBJECT (window, button2, "button2");
#if 0
  GLADE_HOOKUP_OBJECT (window, about_btn, "about_btn");
#endif

  return window;
}

#if 0
GtkWidget*
create_about (void)
{
  const gchar *authors[] = {
    "Staff TeamQ",
    NULL
  };
  const gchar *documenters[] = { NULL };
  gchar *translators = NULL;
  GdkPixbuf *about_logo_pixbuf;
  GtkWidget *about;

  about_logo_pixbuf = create_pixbuf ("gpassutil/icon.png");
  about = gnome_about_new ("GPassUtil", VERSION,
                        "© Copyright 2005 TeamQ\nhttp://www.teamq.info/",
                        "A quick password generator.",
                        authors,
                        documenters,
                        translators,
                        about_logo_pixbuf);
  gtk_container_set_border_width (GTK_CONTAINER (about), 5);
  gtk_window_set_type_hint (GTK_WINDOW (about), GDK_WINDOW_TYPE_HINT_DIALOG);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (about, about, "about");

  return about;
}
#endif

