/*
 * 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 <gdk/gdkkeysyms.h>
#include <gtk/gtk.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_window1 (void)
{
  GtkWidget *window1;
  GtkWidget *fixed1;
  GtkWidget *menubar1;
  GtkWidget *menuitem1;
  GtkWidget *menuitem1_menu;
  GtkWidget *new1;
  GtkWidget *open1;
  GtkWidget *save1;
  GtkWidget *save_as1;
  GtkWidget *separatormenuitem1;
  GtkWidget *quit1;
  GtkWidget *menuitem2;
  GtkWidget *menuitem2_menu;
  GtkWidget *cut1;
  GtkWidget *copy1;
  GtkWidget *paste1;
  GtkWidget *delete1;
  GtkWidget *menuitem3;
  GtkWidget *hscrollbar1;
  GtkWidget *vscrollbar1;
  GtkWidget *togglebutton2;
  GtkWidget *notebook1;
  GtkWidget *fixed2;
  GtkWidget *frame1;
  GtkWidget *fixed_frame;
  GtkWidget *entry1;
  GtkWidget *checkbutton1;
  GtkWidget *radiobutton1;
  GSList *radiobutton1_group = NULL;
  GtkWidget *radiobutton2;
  GtkWidget *checkbutton2;
  GtkWidget *combobox2;
  GtkWidget *viewport1;
  GtkWidget *fixed4;
  GtkObject *spinbutton1_adj;
  GtkWidget *spinbutton1;
  GtkWidget *progressbar1;
  GtkWidget *progressbar2;
  GtkWidget *label7;
  GtkWidget *label5;
  GtkWidget *hscale1;
  GtkWidget *label4;
  GtkWidget *label1;
  GtkWidget *fixed3;
  GtkWidget *label2;
  GtkWidget *empty_notebook_page;
  GtkWidget *label3;
  GtkWidget *togglebutton1;
  GtkWidget *button1;
  GtkWidget *toolbar1;
  gint tmp_toolbar_icon_size;
  GtkWidget *tmp_image;
  GtkWidget *toolbutton2;
  GtkWidget *toggletoolbutton1;
  GtkAccelGroup *accel_group;

  accel_group = gtk_accel_group_new ();

  window1 = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (window1), _("ThemePreview-2 by roberTO"));

  fixed1 = gtk_fixed_new ();
  gtk_widget_show (fixed1);
  gtk_container_add (GTK_CONTAINER (window1), fixed1);
  gtk_widget_set_size_request (fixed1, 355, -1);

  menubar1 = gtk_menu_bar_new ();
  gtk_widget_show (menubar1);
  gtk_fixed_put (GTK_FIXED (fixed1), menubar1, 0, 0);
  gtk_widget_set_size_request (menubar1, 355, 24);

  menuitem1 = gtk_menu_item_new_with_mnemonic (_("_File"));
  gtk_widget_show (menuitem1);
  gtk_container_add (GTK_CONTAINER (menubar1), menuitem1);

  menuitem1_menu = gtk_menu_new ();
  gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem1), menuitem1_menu);

  new1 = gtk_image_menu_item_new_from_stock ("gtk-new", accel_group);
  gtk_widget_show (new1);
  gtk_container_add (GTK_CONTAINER (menuitem1_menu), new1);

  open1 = gtk_image_menu_item_new_from_stock ("gtk-open", accel_group);
  gtk_widget_show (open1);
  gtk_container_add (GTK_CONTAINER (menuitem1_menu), open1);

  save1 = gtk_image_menu_item_new_from_stock ("gtk-save", accel_group);
  gtk_widget_show (save1);
  gtk_container_add (GTK_CONTAINER (menuitem1_menu), save1);

  save_as1 = gtk_image_menu_item_new_from_stock ("gtk-save-as", accel_group);
  gtk_widget_show (save_as1);
  gtk_container_add (GTK_CONTAINER (menuitem1_menu), save_as1);

  separatormenuitem1 = gtk_separator_menu_item_new ();
  gtk_widget_show (separatormenuitem1);
  gtk_container_add (GTK_CONTAINER (menuitem1_menu), separatormenuitem1);
  gtk_widget_set_sensitive (separatormenuitem1, FALSE);

  quit1 = gtk_image_menu_item_new_from_stock ("gtk-quit", accel_group);
  gtk_widget_show (quit1);
  gtk_container_add (GTK_CONTAINER (menuitem1_menu), quit1);

  menuitem2 = gtk_menu_item_new_with_mnemonic (_("_Edit"));
  gtk_widget_show (menuitem2);
  gtk_container_add (GTK_CONTAINER (menubar1), menuitem2);

  menuitem2_menu = gtk_menu_new ();
  gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem2), menuitem2_menu);

  cut1 = gtk_image_menu_item_new_from_stock ("gtk-cut", accel_group);
  gtk_widget_show (cut1);
  gtk_container_add (GTK_CONTAINER (menuitem2_menu), cut1);

  copy1 = gtk_image_menu_item_new_from_stock ("gtk-copy", accel_group);
  gtk_widget_show (copy1);
  gtk_container_add (GTK_CONTAINER (menuitem2_menu), copy1);

  paste1 = gtk_image_menu_item_new_from_stock ("gtk-paste", accel_group);
  gtk_widget_show (paste1);
  gtk_container_add (GTK_CONTAINER (menuitem2_menu), paste1);

  delete1 = gtk_image_menu_item_new_from_stock ("gtk-delete", accel_group);
  gtk_widget_show (delete1);
  gtk_container_add (GTK_CONTAINER (menuitem2_menu), delete1);

  menuitem3 = gtk_menu_item_new_with_mnemonic (_("_View"));
  gtk_widget_show (menuitem3);
  gtk_container_add (GTK_CONTAINER (menubar1), menuitem3);

  hscrollbar1 = gtk_hscrollbar_new (GTK_ADJUSTMENT (gtk_adjustment_new (60, 0, 200, 200, 200, 80)));
  gtk_widget_show (hscrollbar1);
  gtk_fixed_put (GTK_FIXED (fixed1), hscrollbar1, 8, 299);
  gtk_widget_set_size_request (hscrollbar1, 323, 17);

  vscrollbar1 = gtk_vscrollbar_new (GTK_ADJUSTMENT (gtk_adjustment_new (60, 0, 200, 200, 200, 80)));
  gtk_widget_show (vscrollbar1);
  gtk_fixed_put (GTK_FIXED (fixed1), vscrollbar1, 330, 88);
  gtk_widget_set_size_request (vscrollbar1, 17, 212);

  togglebutton2 = gtk_toggle_button_new_with_mnemonic (_("Prelight"));
  gtk_widget_show (togglebutton2);
  gtk_fixed_put (GTK_FIXED (fixed1), togglebutton2, 176, 328);
  gtk_widget_set_size_request (togglebutton2, 80, 26);
  gtk_button_set_focus_on_click (GTK_BUTTON (togglebutton2), FALSE);

  notebook1 = gtk_notebook_new ();
  gtk_widget_show (notebook1);
  gtk_fixed_put (GTK_FIXED (fixed1), notebook1, 8, 64);
  gtk_widget_set_size_request (notebook1, 320, 233);

  fixed2 = gtk_fixed_new ();
  gtk_widget_show (fixed2);
  gtk_container_add (GTK_CONTAINER (notebook1), fixed2);

  frame1 = gtk_frame_new (NULL);
  gtk_widget_show (frame1);
  gtk_fixed_put (GTK_FIXED (fixed2), frame1, 8, 8);
  gtk_widget_set_size_request (frame1, 293, 185);

  fixed_frame = gtk_fixed_new ();
  gtk_widget_show (fixed_frame);
  gtk_container_add (GTK_CONTAINER (frame1), fixed_frame);

  entry1 = gtk_entry_new ();
  gtk_widget_show (entry1);
  gtk_fixed_put (GTK_FIXED (fixed_frame), entry1, 8, 8);
  gtk_widget_set_size_request (entry1, 120, 22);
  gtk_entry_set_text (GTK_ENTRY (entry1), _("TextEntry"));

  checkbutton1 = gtk_check_button_new_with_mnemonic (_("CheckButtonOff"));
  gtk_widget_show (checkbutton1);
  gtk_fixed_put (GTK_FIXED (fixed_frame), checkbutton1, 8, 72);
  gtk_widget_set_size_request (checkbutton1, 130, 20);

  radiobutton1 = gtk_radio_button_new_with_mnemonic (NULL, _("RadioButtonOff"));
  gtk_widget_show (radiobutton1);
  gtk_fixed_put (GTK_FIXED (fixed_frame), radiobutton1, 8, 120);
  gtk_widget_set_size_request (radiobutton1, 130, 20);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton1), radiobutton1_group);
  radiobutton1_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton1));

  radiobutton2 = gtk_radio_button_new_with_mnemonic (NULL, _("RadioButtonOn"));
  gtk_widget_show (radiobutton2);
  gtk_fixed_put (GTK_FIXED (fixed_frame), radiobutton2, 8, 144);
  gtk_widget_set_size_request (radiobutton2, 130, 20);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton2), radiobutton1_group);
  radiobutton1_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton2));
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radiobutton2), TRUE);

  checkbutton2 = gtk_check_button_new_with_mnemonic (_("CheckButtonOn"));
  gtk_widget_show (checkbutton2);
  gtk_fixed_put (GTK_FIXED (fixed_frame), checkbutton2, 8, 96);
  gtk_widget_set_size_request (checkbutton2, 130, 20);
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (checkbutton2), TRUE);

  combobox2 = gtk_combo_box_new_text ();
  gtk_widget_show (combobox2);
  gtk_fixed_put (GTK_FIXED (fixed_frame), combobox2, 8, 40);
  gtk_widget_set_size_request (combobox2, 120, 24);
  gtk_combo_box_append_text (GTK_COMBO_BOX (combobox2), _("ComboBox"));
  gtk_combo_box_append_text (GTK_COMBO_BOX (combobox2), _("ComboMenu1"));
  gtk_combo_box_append_text (GTK_COMBO_BOX (combobox2), _("ComboMenu2"));

  viewport1 = gtk_viewport_new (NULL, NULL);
  gtk_widget_show (viewport1);
  gtk_fixed_put (GTK_FIXED (fixed_frame), viewport1, 137, 8);
  gtk_widget_set_size_request (viewport1, 142, 151);

  fixed4 = gtk_fixed_new ();
  gtk_widget_show (fixed4);
  gtk_container_add (GTK_CONTAINER (viewport1), fixed4);

  spinbutton1_adj = gtk_adjustment_new (100, 0, 100, 1, 10, 10);
  spinbutton1 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton1_adj), 1, 1);
  gtk_widget_show (spinbutton1);
  gtk_fixed_put (GTK_FIXED (fixed4), spinbutton1, 36, 8);
  gtk_widget_set_size_request (spinbutton1, 64, 22);

  progressbar1 = gtk_progress_bar_new ();
  gtk_widget_show (progressbar1);
  gtk_fixed_put (GTK_FIXED (fixed4), progressbar1, 0, 121);
  gtk_widget_set_size_request (progressbar1, 110, 22);
  gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (progressbar1), 0.5);
  gtk_progress_bar_set_text (GTK_PROGRESS_BAR (progressbar1), _("ProgressBar"));

  progressbar2 = gtk_progress_bar_new ();
  gtk_widget_show (progressbar2);
  gtk_fixed_put (GTK_FIXED (fixed4), progressbar2, 112, 31);
  gtk_widget_set_size_request (progressbar2, 22, 110);
  gtk_progress_bar_set_orientation (GTK_PROGRESS_BAR (progressbar2), GTK_PROGRESS_BOTTOM_TO_TOP);
  gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (progressbar2), 0.5);

  label7 = gtk_label_new (_("Slider"));
  gtk_widget_show (label7);
  gtk_fixed_put (GTK_FIXED (fixed4), label7, 37, 64);
  gtk_widget_set_size_request (label7, 38, 16);

  label5 = gtk_label_new (_("SpinButton"));
  gtk_widget_show (label5);
  gtk_fixed_put (GTK_FIXED (fixed4), label5, 25, 29);
  gtk_widget_set_size_request (label5, 80, 16);

  hscale1 = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (50, 0, 100, 0, 0, 0)));
  gtk_widget_show (hscale1);
  gtk_fixed_put (GTK_FIXED (fixed4), hscale1, 0, 68);
  gtk_widget_set_size_request (hscale1, 110, 35);
  gtk_scale_set_draw_value (GTK_SCALE (hscale1), FALSE);

  label4 = gtk_label_new (_("Controls"));
  gtk_widget_show (label4);
  gtk_frame_set_label_widget (GTK_FRAME (frame1), label4);

  label1 = gtk_label_new (_("Active Tab"));
  gtk_widget_show (label1);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 0), label1);

  fixed3 = gtk_fixed_new ();
  gtk_widget_show (fixed3);
  gtk_container_add (GTK_CONTAINER (notebook1), fixed3);

  label2 = gtk_label_new (_("Inactive Tab"));
  gtk_widget_show (label2);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 1), label2);

  empty_notebook_page = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (empty_notebook_page);
  gtk_container_add (GTK_CONTAINER (notebook1), empty_notebook_page);

  label3 = gtk_label_new (_("InactiveTab"));
  gtk_widget_show (label3);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 2), label3);

  togglebutton1 = gtk_toggle_button_new_with_mnemonic (_("Pressed"));
  gtk_widget_show (togglebutton1);
  gtk_fixed_put (GTK_FIXED (fixed1), togglebutton1, 264, 328);
  gtk_widget_set_size_request (togglebutton1, 80, 26);
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (togglebutton1), TRUE);

  button1 = gtk_button_new_with_mnemonic (_("Normal"));
  gtk_widget_show (button1);
  gtk_fixed_put (GTK_FIXED (fixed1), button1, 88, 328);
  gtk_widget_set_size_request (button1, 80, 26);
  gtk_button_set_focus_on_click (GTK_BUTTON (button1), FALSE);

  toolbar1 = gtk_toolbar_new ();
  gtk_widget_show (toolbar1);
  gtk_fixed_put (GTK_FIXED (fixed1), toolbar1, 0, 24);
  gtk_widget_set_size_request (toolbar1, 355, 36);
  gtk_toolbar_set_style (GTK_TOOLBAR (toolbar1), GTK_TOOLBAR_BOTH_HORIZ);
  tmp_toolbar_icon_size = gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar1));

  tmp_image = gtk_image_new_from_stock ("gtk-close", tmp_toolbar_icon_size);
  gtk_widget_show (tmp_image);
  toolbutton2 = (GtkWidget*) gtk_tool_button_new (tmp_image, _("Quit ThemePreview!"));
  gtk_widget_show (toolbutton2);
  gtk_container_add (GTK_CONTAINER (toolbar1), toolbutton2);
  gtk_tool_item_set_is_important (GTK_TOOL_ITEM (toolbutton2), TRUE);

  toggletoolbutton1 = (GtkWidget*) gtk_toggle_tool_button_new ();
  gtk_tool_button_set_label (GTK_TOOL_BUTTON (toggletoolbutton1), _("ToggleToolButton"));
  tmp_image = gtk_image_new_from_stock ("gtk-dialog-question", tmp_toolbar_icon_size);
  gtk_widget_show (tmp_image);
  gtk_tool_button_set_icon_widget (GTK_TOOL_BUTTON (toggletoolbutton1), tmp_image);
  gtk_widget_show (toggletoolbutton1);
  gtk_container_add (GTK_CONTAINER (toolbar1), toggletoolbutton1);
  gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (toggletoolbutton1), TRUE);
  gtk_tool_item_set_is_important (GTK_TOOL_ITEM (toggletoolbutton1), TRUE);

  g_signal_connect ((gpointer) new1, "activate",
                    G_CALLBACK (on_new1_activate),
                    NULL);
  g_signal_connect ((gpointer) open1, "activate",
                    G_CALLBACK (on_open1_activate),
                    NULL);
  g_signal_connect ((gpointer) save1, "activate",
                    G_CALLBACK (on_save1_activate),
                    NULL);
  g_signal_connect ((gpointer) save_as1, "activate",
                    G_CALLBACK (on_save_as1_activate),
                    NULL);
  g_signal_connect ((gpointer) quit1, "activate",
                    G_CALLBACK (on_quit1_activate),
                    NULL);
  g_signal_connect ((gpointer) cut1, "activate",
                    G_CALLBACK (on_cut1_activate),
                    NULL);
  g_signal_connect ((gpointer) copy1, "activate",
                    G_CALLBACK (on_copy1_activate),
                    NULL);
  g_signal_connect ((gpointer) paste1, "activate",
                    G_CALLBACK (on_paste1_activate),
                    NULL);
  g_signal_connect ((gpointer) delete1, "activate",
                    G_CALLBACK (on_delete1_activate),
                    NULL);
  g_signal_connect_data ((gpointer) hscale1, "value_changed",
                         G_CALLBACK (on_hscale1_value_changed),
                         GTK_OBJECT (progressbar1),
                         NULL, G_CONNECT_AFTER | G_CONNECT_SWAPPED);
  g_signal_connect ((gpointer) button1, "clicked",
                    G_CALLBACK (gtk_main_quit),
                    NULL);
  g_signal_connect ((gpointer) toolbutton2, "clicked",
                    G_CALLBACK (gtk_main_quit),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (window1, window1, "window1");
  GLADE_HOOKUP_OBJECT (window1, fixed1, "fixed1");
  GLADE_HOOKUP_OBJECT (window1, menubar1, "menubar1");
  GLADE_HOOKUP_OBJECT (window1, menuitem1, "menuitem1");
  GLADE_HOOKUP_OBJECT (window1, menuitem1_menu, "menuitem1_menu");
  GLADE_HOOKUP_OBJECT (window1, new1, "new1");
  GLADE_HOOKUP_OBJECT (window1, open1, "open1");
  GLADE_HOOKUP_OBJECT (window1, save1, "save1");
  GLADE_HOOKUP_OBJECT (window1, save_as1, "save_as1");
  GLADE_HOOKUP_OBJECT (window1, separatormenuitem1, "separatormenuitem1");
  GLADE_HOOKUP_OBJECT (window1, quit1, "quit1");
  GLADE_HOOKUP_OBJECT (window1, menuitem2, "menuitem2");
  GLADE_HOOKUP_OBJECT (window1, menuitem2_menu, "menuitem2_menu");
  GLADE_HOOKUP_OBJECT (window1, cut1, "cut1");
  GLADE_HOOKUP_OBJECT (window1, copy1, "copy1");
  GLADE_HOOKUP_OBJECT (window1, paste1, "paste1");
  GLADE_HOOKUP_OBJECT (window1, delete1, "delete1");
  GLADE_HOOKUP_OBJECT (window1, menuitem3, "menuitem3");
  GLADE_HOOKUP_OBJECT (window1, hscrollbar1, "hscrollbar1");
  GLADE_HOOKUP_OBJECT (window1, vscrollbar1, "vscrollbar1");
  GLADE_HOOKUP_OBJECT (window1, togglebutton2, "togglebutton2");
  GLADE_HOOKUP_OBJECT (window1, notebook1, "notebook1");
  GLADE_HOOKUP_OBJECT (window1, fixed2, "fixed2");
  GLADE_HOOKUP_OBJECT (window1, frame1, "frame1");
  GLADE_HOOKUP_OBJECT (window1, fixed_frame, "fixed_frame");
  GLADE_HOOKUP_OBJECT (window1, entry1, "entry1");
  GLADE_HOOKUP_OBJECT (window1, checkbutton1, "checkbutton1");
  GLADE_HOOKUP_OBJECT (window1, radiobutton1, "radiobutton1");
  GLADE_HOOKUP_OBJECT (window1, radiobutton2, "radiobutton2");
  GLADE_HOOKUP_OBJECT (window1, checkbutton2, "checkbutton2");
  GLADE_HOOKUP_OBJECT (window1, combobox2, "combobox2");
  GLADE_HOOKUP_OBJECT (window1, viewport1, "viewport1");
  GLADE_HOOKUP_OBJECT (window1, fixed4, "fixed4");
  GLADE_HOOKUP_OBJECT (window1, spinbutton1, "spinbutton1");
  GLADE_HOOKUP_OBJECT (window1, progressbar1, "progressbar1");
  GLADE_HOOKUP_OBJECT (window1, progressbar2, "progressbar2");
  GLADE_HOOKUP_OBJECT (window1, label7, "label7");
  GLADE_HOOKUP_OBJECT (window1, label5, "label5");
  GLADE_HOOKUP_OBJECT (window1, hscale1, "hscale1");
  GLADE_HOOKUP_OBJECT (window1, label4, "label4");
  GLADE_HOOKUP_OBJECT (window1, label1, "label1");
  GLADE_HOOKUP_OBJECT (window1, fixed3, "fixed3");
  GLADE_HOOKUP_OBJECT (window1, label2, "label2");
  GLADE_HOOKUP_OBJECT (window1, label3, "label3");
  GLADE_HOOKUP_OBJECT (window1, togglebutton1, "togglebutton1");
  GLADE_HOOKUP_OBJECT (window1, button1, "button1");
  GLADE_HOOKUP_OBJECT (window1, toolbar1, "toolbar1");
  GLADE_HOOKUP_OBJECT (window1, toolbutton2, "toolbutton2");
  GLADE_HOOKUP_OBJECT (window1, toggletoolbutton1, "toggletoolbutton1");

  gtk_window_add_accel_group (GTK_WINDOW (window1), accel_group);

  return window1;
}

