/*
 * 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_mWindow (void)
{
  GtkWidget *mWindow;
  GtkWidget *vbox1;
  GtkWidget *mScrolledWindow;
  GtkWidget *mWordListView;
  GtkWidget *vbox2;
  GtkWidget *label1;
  GtkWidget *hbox1;
  GtkWidget *mSpellingRadio;
  GSList *mSpellingRadio_group = NULL;
  GtkWidget *mSoundRadio;
  GtkWidget *hbox2;
  GtkWidget *mSearchEntry;
  GtkWidget *alignment6;
  GtkWidget *hbuttonbox1;
  GtkWidget *mSaveButton;
  GtkWidget *mAddButton;
  GtkWidget *mRemoveButton;
  GtkWidget *mChangeModeButton;
  GtkWidget *mQuitButton;
  GtkAccelGroup *accel_group;

  accel_group = gtk_accel_group_new ();

  mWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (mWindow), _("Kasumi"));

  vbox1 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox1);
  gtk_container_add (GTK_CONTAINER (mWindow), vbox1);

  mScrolledWindow = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_show (mScrolledWindow);
  gtk_box_pack_start (GTK_BOX (vbox1), mScrolledWindow, TRUE, TRUE, 0);
  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (mScrolledWindow), GTK_SHADOW_IN);

  mWordListView = gtk_tree_view_new ();
  gtk_widget_show (mWordListView);
  gtk_container_add (GTK_CONTAINER (mScrolledWindow), mWordListView);

  vbox2 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox2);
  gtk_box_pack_start (GTK_BOX (vbox1), vbox2, FALSE, FALSE, 0);

  label1 = gtk_label_new (_("search"));
  gtk_widget_show (label1);
  gtk_box_pack_start (GTK_BOX (vbox2), label1, FALSE, FALSE, 0);
  gtk_misc_set_alignment (GTK_MISC (label1), 0, 0.5);
  gtk_misc_set_padding (GTK_MISC (label1), 10, 0);

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

  mSpellingRadio = gtk_radio_button_new_with_mnemonic (NULL, _("Search by Spelling"));
  gtk_widget_show (mSpellingRadio);
  gtk_box_pack_start (GTK_BOX (hbox1), mSpellingRadio, FALSE, FALSE, 20);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (mSpellingRadio), mSpellingRadio_group);
  mSpellingRadio_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (mSpellingRadio));

  mSoundRadio = gtk_radio_button_new_with_mnemonic (NULL, _("Search by Sound"));
  gtk_widget_show (mSoundRadio);
  gtk_box_pack_start (GTK_BOX (hbox1), mSoundRadio, FALSE, FALSE, 0);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (mSoundRadio), mSpellingRadio_group);
  mSpellingRadio_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (mSoundRadio));

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

  mSearchEntry = gtk_entry_new ();
  gtk_widget_show (mSearchEntry);
  gtk_box_pack_start (GTK_BOX (hbox2), mSearchEntry, TRUE, TRUE, 40);

  alignment6 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment6);
  gtk_box_pack_start (GTK_BOX (vbox1), alignment6, FALSE, FALSE, 8);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment6), 0, 0, 12, 12);

  hbuttonbox1 = gtk_hbutton_box_new ();
  gtk_widget_show (hbuttonbox1);
  gtk_container_add (GTK_CONTAINER (alignment6), hbuttonbox1);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox1), GTK_BUTTONBOX_SPREAD);

  mSaveButton = gtk_button_new_from_stock ("gtk-save");
  gtk_widget_show (mSaveButton);
  gtk_container_add (GTK_CONTAINER (hbuttonbox1), mSaveButton);
  GTK_WIDGET_SET_FLAGS (mSaveButton, GTK_CAN_DEFAULT);
  gtk_widget_add_accelerator (mSaveButton, "clicked", accel_group,
                              GDK_S, (GdkModifierType) GDK_CONTROL_MASK,
                              GTK_ACCEL_VISIBLE);

  mAddButton = gtk_button_new_from_stock ("gtk-add");
  gtk_widget_show (mAddButton);
  gtk_container_add (GTK_CONTAINER (hbuttonbox1), mAddButton);
  GTK_WIDGET_SET_FLAGS (mAddButton, GTK_CAN_DEFAULT);
  gtk_widget_add_accelerator (mAddButton, "clicked", accel_group,
                              GDK_A, (GdkModifierType) GDK_CONTROL_MASK,
                              GTK_ACCEL_VISIBLE);

  mRemoveButton = gtk_button_new_from_stock ("gtk-delete");
  gtk_widget_show (mRemoveButton);
  gtk_container_add (GTK_CONTAINER (hbuttonbox1), mRemoveButton);
  GTK_WIDGET_SET_FLAGS (mRemoveButton, GTK_CAN_DEFAULT);
  gtk_widget_add_accelerator (mRemoveButton, "clicked", accel_group,
                              GDK_R, (GdkModifierType) GDK_CONTROL_MASK,
                              GTK_ACCEL_VISIBLE);
  gtk_widget_add_accelerator (mRemoveButton, "clicked", accel_group,
                              GDK_Delete, (GdkModifierType) 0,
                              GTK_ACCEL_VISIBLE);

  mChangeModeButton = gtk_button_new_with_mnemonic (_("Add mode"));
  gtk_widget_show (mChangeModeButton);
  gtk_container_add (GTK_CONTAINER (hbuttonbox1), mChangeModeButton);
  GTK_WIDGET_SET_FLAGS (mChangeModeButton, GTK_CAN_DEFAULT);
  gtk_widget_add_accelerator (mChangeModeButton, "clicked", accel_group,
                              GDK_M, (GdkModifierType) GDK_CONTROL_MASK,
                              GTK_ACCEL_VISIBLE);

  mQuitButton = gtk_button_new_from_stock ("gtk-quit");
  gtk_widget_show (mQuitButton);
  gtk_container_add (GTK_CONTAINER (hbuttonbox1), mQuitButton);
  GTK_WIDGET_SET_FLAGS (mQuitButton, GTK_CAN_DEFAULT);
  gtk_widget_add_accelerator (mQuitButton, "clicked", accel_group,
                              GDK_Q, (GdkModifierType) GDK_CONTROL_MASK,
                              GTK_ACCEL_VISIBLE);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (mWindow, mWindow, "mWindow");
  GLADE_HOOKUP_OBJECT (mWindow, vbox1, "vbox1");
  GLADE_HOOKUP_OBJECT (mWindow, mScrolledWindow, "mScrolledWindow");
  GLADE_HOOKUP_OBJECT (mWindow, mWordListView, "mWordListView");
  GLADE_HOOKUP_OBJECT (mWindow, vbox2, "vbox2");
  GLADE_HOOKUP_OBJECT (mWindow, label1, "label1");
  GLADE_HOOKUP_OBJECT (mWindow, hbox1, "hbox1");
  GLADE_HOOKUP_OBJECT (mWindow, mSpellingRadio, "mSpellingRadio");
  GLADE_HOOKUP_OBJECT (mWindow, mSoundRadio, "mSoundRadio");
  GLADE_HOOKUP_OBJECT (mWindow, hbox2, "hbox2");
  GLADE_HOOKUP_OBJECT (mWindow, mSearchEntry, "mSearchEntry");
  GLADE_HOOKUP_OBJECT (mWindow, alignment6, "alignment6");
  GLADE_HOOKUP_OBJECT (mWindow, hbuttonbox1, "hbuttonbox1");
  GLADE_HOOKUP_OBJECT (mWindow, mSaveButton, "mSaveButton");
  GLADE_HOOKUP_OBJECT (mWindow, mAddButton, "mAddButton");
  GLADE_HOOKUP_OBJECT (mWindow, mRemoveButton, "mRemoveButton");
  GLADE_HOOKUP_OBJECT (mWindow, mChangeModeButton, "mChangeModeButton");
  GLADE_HOOKUP_OBJECT (mWindow, mQuitButton, "mQuitButton");

  gtk_window_add_accel_group (GTK_WINDOW (mWindow), accel_group);

  return mWindow;
}

