Logo Search packages:      
Sourcecode: happydigger version File versions  Download package

interface.c

/*
 * 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_window (void)
{
  GtkWidget *window;
  GdkPixbuf *window_icon_pixbuf;
  GtkWidget *vbox;
  GtkWidget *handlebox1;
  GtkWidget *hbox2;
  GtkWidget *firstbutton;
  GtkWidget *image6;
  GtkWidget *rewindbutton;
  GtkWidget *hbox20;
  GtkWidget *image9;
  GtkWidget *image10;
  GtkWidget *previousbutton;
  GtkWidget *image5;
  GtkWidget *entry;
  GtkWidget *identry;
  GtkWidget *nextbutton;
  GtkWidget *image4;
  GtkWidget *ffbutton;
  GtkWidget *hbox21;
  GtkWidget *image11;
  GtkWidget *image12;
  GtkWidget *lastbutton;
  GtkWidget *image7;
  GtkWidget *vseparator1;
  GtkWidget *applybutton;
  GtkWidget *image15;
  GtkWidget *removebutton;
  GtkWidget *image16;
  GtkWidget *newbutton;
  GtkWidget *image17;
  GtkWidget *vseparator2;
  GtkWidget *listbutton;
  GtkWidget *image19;
  GtkWidget *prefsbutton;
  GtkWidget *image20;
  GtkWidget *helpbutton;
  GtkWidget *image21;
  GtkWidget *hbox24;
  GtkWidget *frame3;
  GtkWidget *vbox7;
  GtkWidget *hbox12;
  GtkWidget *label8;
  GtkWidget *nrentry;
  GtkWidget *hbox3;
  GtkWidget *label5;
  GtkWidget *descriptionentry;
  GtkWidget *hbox4;
  GtkWidget *label6;
  GtkWidget *typecombo;
  GtkWidget *hbox11;
  GtkWidget *label7;
  GtkWidget *materialcombo;
  GtkWidget *hbox25;
  GtkWidget *label14;
  GtkWidget *periodcombo;
  GtkWidget *hbox23;
  GtkWidget *label13;
  GtkWidget *scrolledwindow2;
  GtkWidget *notes;
  GtkWidget *hbox26;
  GtkWidget *label15;
  GtkWidget *dateentry;
  GtkWidget *hbox27;
  GtkWidget *label16;
  GtkWidget *valueentry;
  GtkWidget *hbox28;
  GtkWidget *label17;
  GtkWidget *referenceentry;
  GtkWidget *label3;
  GtkWidget *vbox11;
  GtkWidget *frame4;
  GtkWidget *vbox8;
  GtkWidget *hbox13;
  GtkWidget *label9;
  GtkWidget *finddateentry;
  GtkWidget *hbox14;
  GtkWidget *label10;
  GtkWidget *locationentry;
  GtkWidget *hbox15;
  GtkWidget *label11;
  GtkWidget *coordinatesentry;
  GtkWidget *hbox16;
  GtkWidget *label12;
  GtkWidget *scrolledwindow1;
  GtkWidget *spotnotes;
  GtkWidget *label4;
  GtkWidget *frame1;
  GtkWidget *vbox9;
  GtkWidget *hbox17;
  GtkWidget *image1entry;
  GtkWidget *image1button;
  GtkWidget *image24;
  GtkWidget *hbox18;
  GtkWidget *image2entry;
  GtkWidget *image2button;
  GtkWidget *image25;
  GtkWidget *hbox19;
  GtkWidget *imagebutton1;
  GtkWidget *imagebutton2;
  GtkWidget *label1;
  GtkAccelGroup *accel_group;
  GtkTooltips *tooltips;

  tooltips = gtk_tooltips_new ();

  accel_group = gtk_accel_group_new ();

  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_widget_set_size_request (window, 640, -1);
  gtk_window_set_title (GTK_WINDOW (window), _("happydigger"));
  window_icon_pixbuf = create_pixbuf ("happydigger.png");
  if (window_icon_pixbuf)
    {
      gtk_window_set_icon (GTK_WINDOW (window), window_icon_pixbuf);
      gdk_pixbuf_unref (window_icon_pixbuf);
    }

  vbox = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox);
  gtk_container_add (GTK_CONTAINER (window), vbox);

  handlebox1 = gtk_handle_box_new ();
  gtk_widget_show (handlebox1);
  gtk_box_pack_start (GTK_BOX (vbox), handlebox1, FALSE, FALSE, 0);

  hbox2 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox2);
  gtk_container_add (GTK_CONTAINER (handlebox1), hbox2);

  firstbutton = gtk_button_new ();
  gtk_widget_show (firstbutton);
  gtk_box_pack_start (GTK_BOX (hbox2), firstbutton, TRUE, TRUE, 0);
  GTK_WIDGET_UNSET_FLAGS (firstbutton, GTK_CAN_FOCUS);
  gtk_tooltips_set_tip (tooltips, firstbutton, _("First"), NULL);
  gtk_widget_add_accelerator (firstbutton, "clicked", accel_group,
                              GDK_Up, (GdkModifierType) GDK_CONTROL_MASK,
                              GTK_ACCEL_VISIBLE);

  image6 = gtk_image_new_from_stock ("gtk-goto-first", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image6);
  gtk_container_add (GTK_CONTAINER (firstbutton), image6);

  rewindbutton = gtk_button_new ();
  gtk_widget_show (rewindbutton);
  gtk_box_pack_start (GTK_BOX (hbox2), rewindbutton, TRUE, TRUE, 0);
  GTK_WIDGET_UNSET_FLAGS (rewindbutton, GTK_CAN_FOCUS);
  gtk_tooltips_set_tip (tooltips, rewindbutton, _("-5"), NULL);
  gtk_widget_add_accelerator (rewindbutton, "clicked", accel_group,
                              GDK_Left, (GdkModifierType) GDK_CONTROL_MASK | GDK_SHIFT_MASK,
                              GTK_ACCEL_VISIBLE);

  hbox20 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox20);
  gtk_container_add (GTK_CONTAINER (rewindbutton), hbox20);

  image9 = gtk_image_new_from_stock ("gtk-go-back", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image9);
  gtk_box_pack_start (GTK_BOX (hbox20), image9, TRUE, TRUE, 0);

  image10 = gtk_image_new_from_stock ("gtk-go-back", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image10);
  gtk_box_pack_start (GTK_BOX (hbox20), image10, TRUE, TRUE, 0);

  previousbutton = gtk_button_new ();
  gtk_widget_show (previousbutton);
  gtk_box_pack_start (GTK_BOX (hbox2), previousbutton, TRUE, TRUE, 0);
  GTK_WIDGET_UNSET_FLAGS (previousbutton, GTK_CAN_FOCUS);
  gtk_tooltips_set_tip (tooltips, previousbutton, _("Previous"), NULL);
  gtk_widget_add_accelerator (previousbutton, "clicked", accel_group,
                              GDK_Left, (GdkModifierType) GDK_CONTROL_MASK,
                              GTK_ACCEL_VISIBLE);

  image5 = gtk_image_new_from_stock ("gtk-go-back", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image5);
  gtk_container_add (GTK_CONTAINER (previousbutton), image5);

  entry = gtk_entry_new ();
  gtk_widget_show (entry);
  gtk_box_pack_start (GTK_BOX (hbox2), entry, FALSE, TRUE, 0);
  gtk_widget_set_size_request (entry, 40, -1);
  gtk_entry_set_max_length (GTK_ENTRY (entry), 80);
  gtk_editable_set_editable (GTK_EDITABLE (entry), FALSE);

  identry = gtk_entry_new ();
  gtk_widget_show (identry);
  gtk_box_pack_start (GTK_BOX (hbox2), identry, FALSE, TRUE, 0);
  gtk_widget_set_size_request (identry, 40, -1);
  gtk_editable_set_editable (GTK_EDITABLE (identry), FALSE);

  nextbutton = gtk_button_new ();
  gtk_widget_show (nextbutton);
  gtk_box_pack_start (GTK_BOX (hbox2), nextbutton, TRUE, TRUE, 0);
  GTK_WIDGET_UNSET_FLAGS (nextbutton, GTK_CAN_FOCUS);
  gtk_tooltips_set_tip (tooltips, nextbutton, _("Next"), NULL);
  gtk_widget_add_accelerator (nextbutton, "clicked", accel_group,
                              GDK_Right, (GdkModifierType) GDK_CONTROL_MASK,
                              GTK_ACCEL_VISIBLE);

  image4 = gtk_image_new_from_stock ("gtk-go-forward", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image4);
  gtk_container_add (GTK_CONTAINER (nextbutton), image4);

  ffbutton = gtk_button_new ();
  gtk_widget_show (ffbutton);
  gtk_box_pack_start (GTK_BOX (hbox2), ffbutton, TRUE, TRUE, 0);
  gtk_tooltips_set_tip (tooltips, ffbutton, _("+5"), NULL);
  gtk_widget_add_accelerator (ffbutton, "clicked", accel_group,
                              GDK_Right, (GdkModifierType) GDK_CONTROL_MASK | GDK_SHIFT_MASK,
                              GTK_ACCEL_VISIBLE);

  hbox21 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox21);
  gtk_container_add (GTK_CONTAINER (ffbutton), hbox21);

  image11 = gtk_image_new_from_stock ("gtk-go-forward", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image11);
  gtk_box_pack_start (GTK_BOX (hbox21), image11, TRUE, TRUE, 0);

  image12 = gtk_image_new_from_stock ("gtk-go-forward", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image12);
  gtk_box_pack_start (GTK_BOX (hbox21), image12, TRUE, TRUE, 0);

  lastbutton = gtk_button_new ();
  gtk_widget_show (lastbutton);
  gtk_box_pack_start (GTK_BOX (hbox2), lastbutton, TRUE, TRUE, 0);
  gtk_tooltips_set_tip (tooltips, lastbutton, _("Last"), NULL);
  gtk_widget_add_accelerator (lastbutton, "clicked", accel_group,
                              GDK_Down, (GdkModifierType) GDK_CONTROL_MASK,
                              GTK_ACCEL_VISIBLE);

  image7 = gtk_image_new_from_stock ("gtk-goto-last", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image7);
  gtk_container_add (GTK_CONTAINER (lastbutton), image7);

  vseparator1 = gtk_vseparator_new ();
  gtk_widget_show (vseparator1);
  gtk_box_pack_start (GTK_BOX (hbox2), vseparator1, FALSE, FALSE, 4);

  applybutton = gtk_button_new ();
  gtk_widget_show (applybutton);
  gtk_box_pack_start (GTK_BOX (hbox2), applybutton, TRUE, TRUE, 0);
  GTK_WIDGET_UNSET_FLAGS (applybutton, GTK_CAN_FOCUS);
  gtk_tooltips_set_tip (tooltips, applybutton, _("Update changes"), NULL);
  gtk_widget_add_accelerator (applybutton, "clicked", accel_group,
                              GDK_u, (GdkModifierType) GDK_CONTROL_MASK,
                              GTK_ACCEL_VISIBLE);

  image15 = gtk_image_new_from_stock ("gtk-apply", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image15);
  gtk_container_add (GTK_CONTAINER (applybutton), image15);

  removebutton = gtk_button_new ();
  gtk_widget_show (removebutton);
  gtk_box_pack_start (GTK_BOX (hbox2), removebutton, TRUE, TRUE, 0);
  GTK_WIDGET_UNSET_FLAGS (removebutton, GTK_CAN_FOCUS);
  gtk_tooltips_set_tip (tooltips, removebutton, _("Delete record"), NULL);
  gtk_widget_add_accelerator (removebutton, "clicked", accel_group,
                              GDK_d, (GdkModifierType) GDK_CONTROL_MASK,
                              GTK_ACCEL_VISIBLE);

  image16 = gtk_image_new_from_stock ("gtk-remove", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image16);
  gtk_container_add (GTK_CONTAINER (removebutton), image16);

  newbutton = gtk_button_new ();
  gtk_widget_show (newbutton);
  gtk_box_pack_start (GTK_BOX (hbox2), newbutton, TRUE, TRUE, 0);
  GTK_WIDGET_UNSET_FLAGS (newbutton, GTK_CAN_FOCUS);
  gtk_tooltips_set_tip (tooltips, newbutton, _("New record"), NULL);
  gtk_widget_add_accelerator (newbutton, "clicked", accel_group,
                              GDK_n, (GdkModifierType) GDK_CONTROL_MASK,
                              GTK_ACCEL_VISIBLE);

  image17 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image17);
  gtk_container_add (GTK_CONTAINER (newbutton), image17);

  vseparator2 = gtk_vseparator_new ();
  gtk_widget_show (vseparator2);
  gtk_box_pack_start (GTK_BOX (hbox2), vseparator2, FALSE, FALSE, 4);

  listbutton = gtk_button_new ();
  gtk_widget_show (listbutton);
  gtk_box_pack_start (GTK_BOX (hbox2), listbutton, TRUE, TRUE, 0);
  GTK_WIDGET_UNSET_FLAGS (listbutton, GTK_CAN_FOCUS);
  gtk_tooltips_set_tip (tooltips, listbutton, _("List view"), NULL);
  gtk_widget_add_accelerator (listbutton, "clicked", accel_group,
                              GDK_l, (GdkModifierType) GDK_CONTROL_MASK,
                              GTK_ACCEL_VISIBLE);

  image19 = gtk_image_new_from_stock ("gtk-index", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image19);
  gtk_container_add (GTK_CONTAINER (listbutton), image19);

  prefsbutton = gtk_button_new ();
  gtk_widget_show (prefsbutton);
  gtk_box_pack_start (GTK_BOX (hbox2), prefsbutton, TRUE, TRUE, 0);
  GTK_WIDGET_UNSET_FLAGS (prefsbutton, GTK_CAN_FOCUS);
  gtk_tooltips_set_tip (tooltips, prefsbutton, _("Preferences"), NULL);
  gtk_widget_add_accelerator (prefsbutton, "clicked", accel_group,
                              GDK_p, (GdkModifierType) GDK_CONTROL_MASK,
                              GTK_ACCEL_VISIBLE);

  image20 = gtk_image_new_from_stock ("gtk-preferences", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image20);
  gtk_container_add (GTK_CONTAINER (prefsbutton), image20);

  helpbutton = gtk_button_new ();
  gtk_widget_show (helpbutton);
  gtk_box_pack_start (GTK_BOX (hbox2), helpbutton, TRUE, TRUE, 0);
  GTK_WIDGET_UNSET_FLAGS (helpbutton, GTK_CAN_FOCUS);
  gtk_tooltips_set_tip (tooltips, helpbutton, _("Help"), NULL);
  gtk_widget_add_accelerator (helpbutton, "clicked", accel_group,
                              GDK_h, (GdkModifierType) GDK_CONTROL_MASK,
                              GTK_ACCEL_VISIBLE);

  image21 = gtk_image_new_from_stock ("gtk-help", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image21);
  gtk_container_add (GTK_CONTAINER (helpbutton), image21);

  hbox24 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox24);
  gtk_box_pack_start (GTK_BOX (vbox), hbox24, FALSE, FALSE, 0);

  frame3 = gtk_frame_new (NULL);
  gtk_widget_show (frame3);
  gtk_box_pack_start (GTK_BOX (hbox24), frame3, TRUE, TRUE, 0);
  gtk_widget_set_size_request (frame3, 300, -1);

  vbox7 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox7);
  gtk_container_add (GTK_CONTAINER (frame3), vbox7);

  hbox12 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox12);
  gtk_box_pack_start (GTK_BOX (vbox7), hbox12, FALSE, FALSE, 1);

  label8 = gtk_label_new (_("Number"));
  gtk_widget_show (label8);
  gtk_box_pack_start (GTK_BOX (hbox12), label8, FALSE, FALSE, 0);
  gtk_widget_set_size_request (label8, 100, -1);
  gtk_label_set_justify (GTK_LABEL (label8), GTK_JUSTIFY_CENTER);
  gtk_label_set_line_wrap (GTK_LABEL (label8), TRUE);

  nrentry = gtk_entry_new ();
  gtk_widget_show (nrentry);
  gtk_box_pack_start (GTK_BOX (hbox12), nrentry, TRUE, TRUE, 0);
  gtk_widget_set_size_request (nrentry, 100, -1);
  gtk_entry_set_max_length (GTK_ENTRY (nrentry), 80);

  hbox3 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox3);
  gtk_box_pack_start (GTK_BOX (vbox7), hbox3, FALSE, FALSE, 1);

  label5 = gtk_label_new (_("Description"));
  gtk_widget_show (label5);
  gtk_box_pack_start (GTK_BOX (hbox3), label5, FALSE, FALSE, 0);
  gtk_widget_set_size_request (label5, 100, -1);
  gtk_label_set_justify (GTK_LABEL (label5), GTK_JUSTIFY_CENTER);
  gtk_label_set_line_wrap (GTK_LABEL (label5), TRUE);

  descriptionentry = gtk_entry_new ();
  gtk_widget_show (descriptionentry);
  gtk_box_pack_start (GTK_BOX (hbox3), descriptionentry, TRUE, TRUE, 0);
  gtk_widget_set_size_request (descriptionentry, 100, -1);
  gtk_entry_set_max_length (GTK_ENTRY (descriptionentry), 80);

  hbox4 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox4);
  gtk_box_pack_start (GTK_BOX (vbox7), hbox4, FALSE, FALSE, 1);

  label6 = gtk_label_new (_("Type"));
  gtk_widget_show (label6);
  gtk_box_pack_start (GTK_BOX (hbox4), label6, FALSE, FALSE, 0);
  gtk_widget_set_size_request (label6, 100, -1);
  gtk_label_set_justify (GTK_LABEL (label6), GTK_JUSTIFY_CENTER);
  gtk_label_set_line_wrap (GTK_LABEL (label6), TRUE);

  typecombo = gtk_combo_box_new_text ();
  gtk_widget_show (typecombo);
  gtk_box_pack_start (GTK_BOX (hbox4), typecombo, TRUE, TRUE, 0);

  hbox11 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox11);
  gtk_box_pack_start (GTK_BOX (vbox7), hbox11, FALSE, FALSE, 1);

  label7 = gtk_label_new (_("Material"));
  gtk_widget_show (label7);
  gtk_box_pack_start (GTK_BOX (hbox11), label7, FALSE, FALSE, 0);
  gtk_widget_set_size_request (label7, 100, -1);
  gtk_label_set_justify (GTK_LABEL (label7), GTK_JUSTIFY_CENTER);
  gtk_label_set_line_wrap (GTK_LABEL (label7), TRUE);

  materialcombo = gtk_combo_box_new_text ();
  gtk_widget_show (materialcombo);
  gtk_box_pack_start (GTK_BOX (hbox11), materialcombo, TRUE, TRUE, 0);

  hbox25 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox25);
  gtk_box_pack_start (GTK_BOX (vbox7), hbox25, FALSE, FALSE, 1);

  label14 = gtk_label_new (_("Period"));
  gtk_widget_show (label14);
  gtk_box_pack_start (GTK_BOX (hbox25), label14, FALSE, FALSE, 0);
  gtk_widget_set_size_request (label14, 100, -1);
  gtk_label_set_justify (GTK_LABEL (label14), GTK_JUSTIFY_CENTER);
  gtk_label_set_line_wrap (GTK_LABEL (label14), TRUE);

  periodcombo = gtk_combo_box_new_text ();
  gtk_widget_show (periodcombo);
  gtk_box_pack_start (GTK_BOX (hbox25), periodcombo, TRUE, TRUE, 0);

  hbox23 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox23);
  gtk_box_pack_start (GTK_BOX (vbox7), hbox23, TRUE, TRUE, 1);

  label13 = gtk_label_new (_("Findnotes"));
  gtk_widget_show (label13);
  gtk_box_pack_start (GTK_BOX (hbox23), label13, FALSE, FALSE, 0);
  gtk_widget_set_size_request (label13, 100, -1);
  gtk_label_set_justify (GTK_LABEL (label13), GTK_JUSTIFY_CENTER);
  gtk_label_set_line_wrap (GTK_LABEL (label13), TRUE);

  scrolledwindow2 = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_show (scrolledwindow2);
  gtk_box_pack_start (GTK_BOX (hbox23), scrolledwindow2, TRUE, TRUE, 0);
  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow2), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow2), GTK_SHADOW_ETCHED_IN);

  notes = gtk_text_view_new ();
  gtk_widget_show (notes);
  gtk_container_add (GTK_CONTAINER (scrolledwindow2), notes);
  gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (notes), GTK_WRAP_WORD);

  hbox26 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox26);
  gtk_box_pack_start (GTK_BOX (vbox7), hbox26, FALSE, FALSE, 1);

  label15 = gtk_label_new (_("Date"));
  gtk_widget_show (label15);
  gtk_box_pack_start (GTK_BOX (hbox26), label15, FALSE, FALSE, 0);
  gtk_widget_set_size_request (label15, 100, -1);
  gtk_label_set_justify (GTK_LABEL (label15), GTK_JUSTIFY_CENTER);
  gtk_label_set_line_wrap (GTK_LABEL (label15), TRUE);

  dateentry = gtk_entry_new ();
  gtk_widget_show (dateentry);
  gtk_box_pack_start (GTK_BOX (hbox26), dateentry, TRUE, TRUE, 0);
  gtk_widget_set_size_request (dateentry, 100, -1);
  gtk_entry_set_max_length (GTK_ENTRY (dateentry), 80);

  hbox27 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox27);
  gtk_box_pack_start (GTK_BOX (vbox7), hbox27, FALSE, FALSE, 1);

  label16 = gtk_label_new (_("Value"));
  gtk_widget_show (label16);
  gtk_box_pack_start (GTK_BOX (hbox27), label16, FALSE, FALSE, 0);
  gtk_widget_set_size_request (label16, 100, -1);
  gtk_label_set_justify (GTK_LABEL (label16), GTK_JUSTIFY_CENTER);
  gtk_label_set_line_wrap (GTK_LABEL (label16), TRUE);

  valueentry = gtk_entry_new ();
  gtk_widget_show (valueentry);
  gtk_box_pack_start (GTK_BOX (hbox27), valueentry, TRUE, TRUE, 0);
  gtk_widget_set_size_request (valueentry, 100, -1);
  gtk_entry_set_max_length (GTK_ENTRY (valueentry), 80);

  hbox28 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox28);
  gtk_box_pack_start (GTK_BOX (vbox7), hbox28, FALSE, FALSE, 1);

  label17 = gtk_label_new (_("Reference"));
  gtk_widget_show (label17);
  gtk_box_pack_start (GTK_BOX (hbox28), label17, FALSE, FALSE, 0);
  gtk_widget_set_size_request (label17, 100, -1);
  gtk_label_set_justify (GTK_LABEL (label17), GTK_JUSTIFY_CENTER);
  gtk_label_set_line_wrap (GTK_LABEL (label17), TRUE);

  referenceentry = gtk_entry_new ();
  gtk_widget_show (referenceentry);
  gtk_box_pack_start (GTK_BOX (hbox28), referenceentry, TRUE, TRUE, 0);
  gtk_widget_set_size_request (referenceentry, 100, -1);
  gtk_entry_set_max_length (GTK_ENTRY (referenceentry), 80);

  label3 = gtk_label_new (_("Find description"));
  gtk_widget_show (label3);
  gtk_frame_set_label_widget (GTK_FRAME (frame3), label3);

  vbox11 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox11);
  gtk_box_pack_start (GTK_BOX (hbox24), vbox11, TRUE, TRUE, 0);

  frame4 = gtk_frame_new (NULL);
  gtk_widget_show (frame4);
  gtk_box_pack_start (GTK_BOX (vbox11), frame4, TRUE, TRUE, 0);
  gtk_widget_set_size_request (frame4, 300, -1);

  vbox8 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox8);
  gtk_container_add (GTK_CONTAINER (frame4), vbox8);

  hbox13 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox13);
  gtk_box_pack_start (GTK_BOX (vbox8), hbox13, FALSE, FALSE, 1);

  label9 = gtk_label_new (_("Find date"));
  gtk_widget_show (label9);
  gtk_box_pack_start (GTK_BOX (hbox13), label9, FALSE, FALSE, 0);
  gtk_widget_set_size_request (label9, 100, -1);
  gtk_label_set_justify (GTK_LABEL (label9), GTK_JUSTIFY_CENTER);
  gtk_label_set_line_wrap (GTK_LABEL (label9), TRUE);

  finddateentry = gtk_entry_new ();
  gtk_widget_show (finddateentry);
  gtk_box_pack_start (GTK_BOX (hbox13), finddateentry, TRUE, TRUE, 0);
  gtk_widget_set_size_request (finddateentry, 100, -1);
  gtk_entry_set_max_length (GTK_ENTRY (finddateentry), 80);

  hbox14 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox14);
  gtk_box_pack_start (GTK_BOX (vbox8), hbox14, FALSE, FALSE, 1);

  label10 = gtk_label_new (_("Location"));
  gtk_widget_show (label10);
  gtk_box_pack_start (GTK_BOX (hbox14), label10, FALSE, FALSE, 0);
  gtk_widget_set_size_request (label10, 100, -1);
  gtk_label_set_justify (GTK_LABEL (label10), GTK_JUSTIFY_CENTER);
  gtk_label_set_line_wrap (GTK_LABEL (label10), TRUE);

  locationentry = gtk_entry_new ();
  gtk_widget_show (locationentry);
  gtk_box_pack_start (GTK_BOX (hbox14), locationentry, TRUE, TRUE, 0);
  gtk_widget_set_size_request (locationentry, 100, -1);
  gtk_entry_set_max_length (GTK_ENTRY (locationentry), 80);

  hbox15 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox15);
  gtk_box_pack_start (GTK_BOX (vbox8), hbox15, FALSE, FALSE, 1);

  label11 = gtk_label_new (_("Coordinates"));
  gtk_widget_show (label11);
  gtk_box_pack_start (GTK_BOX (hbox15), label11, FALSE, FALSE, 0);
  gtk_widget_set_size_request (label11, 100, -1);
  gtk_label_set_justify (GTK_LABEL (label11), GTK_JUSTIFY_CENTER);
  gtk_label_set_line_wrap (GTK_LABEL (label11), TRUE);

  coordinatesentry = gtk_entry_new ();
  gtk_widget_show (coordinatesentry);
  gtk_box_pack_start (GTK_BOX (hbox15), coordinatesentry, TRUE, TRUE, 0);
  gtk_widget_set_size_request (coordinatesentry, 100, -1);
  gtk_entry_set_max_length (GTK_ENTRY (coordinatesentry), 80);

  hbox16 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox16);
  gtk_box_pack_start (GTK_BOX (vbox8), hbox16, FALSE, FALSE, 1);

  label12 = gtk_label_new (_("Spotnotes"));
  gtk_widget_show (label12);
  gtk_box_pack_start (GTK_BOX (hbox16), label12, FALSE, FALSE, 0);
  gtk_widget_set_size_request (label12, 100, -1);
  gtk_label_set_justify (GTK_LABEL (label12), GTK_JUSTIFY_CENTER);
  gtk_label_set_line_wrap (GTK_LABEL (label12), TRUE);

  scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_show (scrolledwindow1);
  gtk_box_pack_start (GTK_BOX (hbox16), scrolledwindow1, TRUE, TRUE, 0);
  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_SHADOW_ETCHED_IN);

  spotnotes = gtk_text_view_new ();
  gtk_widget_show (spotnotes);
  gtk_container_add (GTK_CONTAINER (scrolledwindow1), spotnotes);
  gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (spotnotes), GTK_WRAP_WORD);

  label4 = gtk_label_new (_("Findspot details"));
  gtk_widget_show (label4);
  gtk_frame_set_label_widget (GTK_FRAME (frame4), label4);

  frame1 = gtk_frame_new (NULL);
  gtk_widget_show (frame1);
  gtk_box_pack_start (GTK_BOX (vbox11), frame1, TRUE, TRUE, 0);

  vbox9 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox9);
  gtk_container_add (GTK_CONTAINER (frame1), vbox9);

  hbox17 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox17);
  gtk_box_pack_start (GTK_BOX (vbox9), hbox17, FALSE, FALSE, 1);

  image1entry = gtk_entry_new ();
  gtk_widget_show (image1entry);
  gtk_box_pack_start (GTK_BOX (hbox17), image1entry, TRUE, TRUE, 0);
  gtk_entry_set_max_length (GTK_ENTRY (image1entry), 80);

  image1button = gtk_button_new ();
  gtk_widget_show (image1button);
  gtk_box_pack_start (GTK_BOX (hbox17), image1button, FALSE, FALSE, 0);
  gtk_widget_set_size_request (image1button, -1, 27);

  image24 = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image24);
  gtk_container_add (GTK_CONTAINER (image1button), image24);

  hbox18 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox18);
  gtk_box_pack_start (GTK_BOX (vbox9), hbox18, FALSE, FALSE, 1);

  image2entry = gtk_entry_new ();
  gtk_widget_show (image2entry);
  gtk_box_pack_start (GTK_BOX (hbox18), image2entry, TRUE, TRUE, 0);
  gtk_entry_set_max_length (GTK_ENTRY (image2entry), 80);

  image2button = gtk_button_new ();
  gtk_widget_show (image2button);
  gtk_box_pack_start (GTK_BOX (hbox18), image2button, FALSE, FALSE, 0);
  gtk_widget_set_size_request (image2button, -1, 27);

  image25 = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image25);
  gtk_container_add (GTK_CONTAINER (image2button), image25);

  hbox19 = gtk_hbox_new (TRUE, 0);
  gtk_widget_show (hbox19);
  gtk_box_pack_start (GTK_BOX (vbox9), hbox19, FALSE, FALSE, 1);

  imagebutton1 = gtk_button_new ();
  gtk_widget_show (imagebutton1);
  gtk_box_pack_start (GTK_BOX (hbox19), imagebutton1, FALSE, FALSE, 0);
  gtk_widget_add_accelerator (imagebutton1, "clicked", accel_group,
                              GDK_1, (GdkModifierType) GDK_CONTROL_MASK,
                              GTK_ACCEL_VISIBLE);
  gtk_button_set_relief (GTK_BUTTON (imagebutton1), GTK_RELIEF_NONE);

  imagebutton2 = gtk_button_new_with_mnemonic ("");
  gtk_widget_show (imagebutton2);
  gtk_box_pack_start (GTK_BOX (hbox19), imagebutton2, FALSE, FALSE, 0);
  gtk_widget_add_accelerator (imagebutton2, "clicked", accel_group,
                              GDK_2, (GdkModifierType) GDK_CONTROL_MASK,
                              GTK_ACCEL_VISIBLE);
  gtk_button_set_relief (GTK_BUTTON (imagebutton2), GTK_RELIEF_NONE);

  label1 = gtk_label_new (_("Images"));
  gtk_widget_show (label1);
  gtk_frame_set_label_widget (GTK_FRAME (frame1), label1);

  g_signal_connect ((gpointer) window, "delete_event",
                    G_CALLBACK (exit_program),
                    NULL);
  g_signal_connect ((gpointer) firstbutton, "clicked",
                    G_CALLBACK (on_firstbutton_clicked),
                    NULL);
  g_signal_connect ((gpointer) rewindbutton, "clicked",
                    G_CALLBACK (on_rewindbutton_clicked),
                    NULL);
  g_signal_connect ((gpointer) previousbutton, "clicked",
                    G_CALLBACK (on_previousbutton_clicked),
                    NULL);
  g_signal_connect ((gpointer) nextbutton, "clicked",
                    G_CALLBACK (on_nextbutton_clicked),
                    NULL);
  g_signal_connect ((gpointer) ffbutton, "clicked",
                    G_CALLBACK (on_ffbutton_clicked),
                    NULL);
  g_signal_connect ((gpointer) lastbutton, "clicked",
                    G_CALLBACK (on_lastbutton_clicked),
                    NULL);
  g_signal_connect ((gpointer) applybutton, "clicked",
                    G_CALLBACK (on_applybutton_clicked),
                    NULL);
  g_signal_connect ((gpointer) removebutton, "clicked",
                    G_CALLBACK (on_removebutton_clicked),
                    NULL);
  g_signal_connect ((gpointer) newbutton, "clicked",
                    G_CALLBACK (on_newbutton_clicked),
                    NULL);
  g_signal_connect ((gpointer) listbutton, "clicked",
                    G_CALLBACK (on_listbutton_clicked),
                    NULL);
  g_signal_connect ((gpointer) prefsbutton, "clicked",
                    G_CALLBACK (on_prefsbutton_clicked),
                    NULL);
  g_signal_connect ((gpointer) helpbutton, "clicked",
                    G_CALLBACK (on_helpbutton_clicked),
                    NULL);
  g_signal_connect ((gpointer) image1entry, "changed",
                    G_CALLBACK (on_image1entry_changed),
                    NULL);
  g_signal_connect ((gpointer) image1button, "clicked",
                    G_CALLBACK (on_image1button_clicked),
                    NULL);
  g_signal_connect ((gpointer) image2entry, "changed",
                    G_CALLBACK (on_image2entry_changed),
                    NULL);
  g_signal_connect ((gpointer) image2button, "clicked",
                    G_CALLBACK (on_image2button_clicked),
                    NULL);
  g_signal_connect ((gpointer) imagebutton1, "clicked",
                    G_CALLBACK (on_imagebutton1_clicked),
                    NULL);
  g_signal_connect ((gpointer) imagebutton2, "clicked",
                    G_CALLBACK (on_imagebutton2_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (window, window, "window");
  GLADE_HOOKUP_OBJECT (window, vbox, "vbox");
  GLADE_HOOKUP_OBJECT (window, handlebox1, "handlebox1");
  GLADE_HOOKUP_OBJECT (window, hbox2, "hbox2");
  GLADE_HOOKUP_OBJECT (window, firstbutton, "firstbutton");
  GLADE_HOOKUP_OBJECT (window, image6, "image6");
  GLADE_HOOKUP_OBJECT (window, rewindbutton, "rewindbutton");
  GLADE_HOOKUP_OBJECT (window, hbox20, "hbox20");
  GLADE_HOOKUP_OBJECT (window, image9, "image9");
  GLADE_HOOKUP_OBJECT (window, image10, "image10");
  GLADE_HOOKUP_OBJECT (window, previousbutton, "previousbutton");
  GLADE_HOOKUP_OBJECT (window, image5, "image5");
  GLADE_HOOKUP_OBJECT (window, entry, "entry");
  GLADE_HOOKUP_OBJECT (window, identry, "identry");
  GLADE_HOOKUP_OBJECT (window, nextbutton, "nextbutton");
  GLADE_HOOKUP_OBJECT (window, image4, "image4");
  GLADE_HOOKUP_OBJECT (window, ffbutton, "ffbutton");
  GLADE_HOOKUP_OBJECT (window, hbox21, "hbox21");
  GLADE_HOOKUP_OBJECT (window, image11, "image11");
  GLADE_HOOKUP_OBJECT (window, image12, "image12");
  GLADE_HOOKUP_OBJECT (window, lastbutton, "lastbutton");
  GLADE_HOOKUP_OBJECT (window, image7, "image7");
  GLADE_HOOKUP_OBJECT (window, vseparator1, "vseparator1");
  GLADE_HOOKUP_OBJECT (window, applybutton, "applybutton");
  GLADE_HOOKUP_OBJECT (window, image15, "image15");
  GLADE_HOOKUP_OBJECT (window, removebutton, "removebutton");
  GLADE_HOOKUP_OBJECT (window, image16, "image16");
  GLADE_HOOKUP_OBJECT (window, newbutton, "newbutton");
  GLADE_HOOKUP_OBJECT (window, image17, "image17");
  GLADE_HOOKUP_OBJECT (window, vseparator2, "vseparator2");
  GLADE_HOOKUP_OBJECT (window, listbutton, "listbutton");
  GLADE_HOOKUP_OBJECT (window, image19, "image19");
  GLADE_HOOKUP_OBJECT (window, prefsbutton, "prefsbutton");
  GLADE_HOOKUP_OBJECT (window, image20, "image20");
  GLADE_HOOKUP_OBJECT (window, helpbutton, "helpbutton");
  GLADE_HOOKUP_OBJECT (window, image21, "image21");
  GLADE_HOOKUP_OBJECT (window, hbox24, "hbox24");
  GLADE_HOOKUP_OBJECT (window, frame3, "frame3");
  GLADE_HOOKUP_OBJECT (window, vbox7, "vbox7");
  GLADE_HOOKUP_OBJECT (window, hbox12, "hbox12");
  GLADE_HOOKUP_OBJECT (window, label8, "label8");
  GLADE_HOOKUP_OBJECT (window, nrentry, "nrentry");
  GLADE_HOOKUP_OBJECT (window, hbox3, "hbox3");
  GLADE_HOOKUP_OBJECT (window, label5, "label5");
  GLADE_HOOKUP_OBJECT (window, descriptionentry, "descriptionentry");
  GLADE_HOOKUP_OBJECT (window, hbox4, "hbox4");
  GLADE_HOOKUP_OBJECT (window, label6, "label6");
  GLADE_HOOKUP_OBJECT (window, typecombo, "typecombo");
  GLADE_HOOKUP_OBJECT (window, hbox11, "hbox11");
  GLADE_HOOKUP_OBJECT (window, label7, "label7");
  GLADE_HOOKUP_OBJECT (window, materialcombo, "materialcombo");
  GLADE_HOOKUP_OBJECT (window, hbox25, "hbox25");
  GLADE_HOOKUP_OBJECT (window, label14, "label14");
  GLADE_HOOKUP_OBJECT (window, periodcombo, "periodcombo");
  GLADE_HOOKUP_OBJECT (window, hbox23, "hbox23");
  GLADE_HOOKUP_OBJECT (window, label13, "label13");
  GLADE_HOOKUP_OBJECT (window, scrolledwindow2, "scrolledwindow2");
  GLADE_HOOKUP_OBJECT (window, notes, "notes");
  GLADE_HOOKUP_OBJECT (window, hbox26, "hbox26");
  GLADE_HOOKUP_OBJECT (window, label15, "label15");
  GLADE_HOOKUP_OBJECT (window, dateentry, "dateentry");
  GLADE_HOOKUP_OBJECT (window, hbox27, "hbox27");
  GLADE_HOOKUP_OBJECT (window, label16, "label16");
  GLADE_HOOKUP_OBJECT (window, valueentry, "valueentry");
  GLADE_HOOKUP_OBJECT (window, hbox28, "hbox28");
  GLADE_HOOKUP_OBJECT (window, label17, "label17");
  GLADE_HOOKUP_OBJECT (window, referenceentry, "referenceentry");
  GLADE_HOOKUP_OBJECT (window, label3, "label3");
  GLADE_HOOKUP_OBJECT (window, vbox11, "vbox11");
  GLADE_HOOKUP_OBJECT (window, frame4, "frame4");
  GLADE_HOOKUP_OBJECT (window, vbox8, "vbox8");
  GLADE_HOOKUP_OBJECT (window, hbox13, "hbox13");
  GLADE_HOOKUP_OBJECT (window, label9, "label9");
  GLADE_HOOKUP_OBJECT (window, finddateentry, "finddateentry");
  GLADE_HOOKUP_OBJECT (window, hbox14, "hbox14");
  GLADE_HOOKUP_OBJECT (window, label10, "label10");
  GLADE_HOOKUP_OBJECT (window, locationentry, "locationentry");
  GLADE_HOOKUP_OBJECT (window, hbox15, "hbox15");
  GLADE_HOOKUP_OBJECT (window, label11, "label11");
  GLADE_HOOKUP_OBJECT (window, coordinatesentry, "coordinatesentry");
  GLADE_HOOKUP_OBJECT (window, hbox16, "hbox16");
  GLADE_HOOKUP_OBJECT (window, label12, "label12");
  GLADE_HOOKUP_OBJECT (window, scrolledwindow1, "scrolledwindow1");
  GLADE_HOOKUP_OBJECT (window, spotnotes, "spotnotes");
  GLADE_HOOKUP_OBJECT (window, label4, "label4");
  GLADE_HOOKUP_OBJECT (window, frame1, "frame1");
  GLADE_HOOKUP_OBJECT (window, vbox9, "vbox9");
  GLADE_HOOKUP_OBJECT (window, hbox17, "hbox17");
  GLADE_HOOKUP_OBJECT (window, image1entry, "image1entry");
  GLADE_HOOKUP_OBJECT (window, image1button, "image1button");
  GLADE_HOOKUP_OBJECT (window, image24, "image24");
  GLADE_HOOKUP_OBJECT (window, hbox18, "hbox18");
  GLADE_HOOKUP_OBJECT (window, image2entry, "image2entry");
  GLADE_HOOKUP_OBJECT (window, image2button, "image2button");
  GLADE_HOOKUP_OBJECT (window, image25, "image25");
  GLADE_HOOKUP_OBJECT (window, hbox19, "hbox19");
  GLADE_HOOKUP_OBJECT (window, imagebutton1, "imagebutton1");
  GLADE_HOOKUP_OBJECT (window, imagebutton2, "imagebutton2");
  GLADE_HOOKUP_OBJECT (window, label1, "label1");
  GLADE_HOOKUP_OBJECT_NO_REF (window, tooltips, "tooltips");

  gtk_window_add_accel_group (GTK_WINDOW (window), accel_group);

  return window;
}

GtkWidget*
create_listwindow (void)
{
  GtkWidget *listwindow;
  GdkPixbuf *listwindow_icon_pixbuf;

  listwindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_widget_set_size_request (listwindow, 550, 400);
  gtk_window_set_title (GTK_WINDOW (listwindow), _("happydigger - list view"));
  gtk_window_set_position (GTK_WINDOW (listwindow), GTK_WIN_POS_MOUSE);
  listwindow_icon_pixbuf = create_pixbuf ("happydigger.png");
  if (listwindow_icon_pixbuf)
    {
      gtk_window_set_icon (GTK_WINDOW (listwindow), listwindow_icon_pixbuf);
      gdk_pixbuf_unref (listwindow_icon_pixbuf);
    }

  g_signal_connect ((gpointer) listwindow, "delete_event",
                    G_CALLBACK (on_listwindow_delete_event),
                    NULL);

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

  return listwindow;
}

GtkWidget*
create_preferencesdialog (void)
{
  GtkWidget *preferencesdialog;
  GdkPixbuf *preferencesdialog_icon_pixbuf;
  GtkWidget *dialog_vbox1;
  GtkWidget *vbox12;
  GtkWidget *frame5;
  GtkWidget *vbox13;
  GtkWidget *label19;
  GtkWidget *ptypesentry;
  GtkWidget *label20;
  GtkWidget *pmaterialsentry;
  GtkWidget *label21;
  GtkWidget *pperiodsentry;
  GtkWidget *label18;
  GtkWidget *frame6;
  GtkWidget *vbox14;
  GtkWidget *label23;
  GtkWidget *hseparator1;
  GtkWidget *hbox30;
  GtkWidget *frame7;
  GtkWidget *vbox17;
  GtkWidget *p1;
  GtkWidget *p2;
  GtkWidget *p3;
  GtkWidget *p4;
  GtkWidget *p5;
  GtkWidget *p6;
  GtkWidget *p7;
  GtkWidget *p8;
  GtkWidget *p9;
  GtkWidget *label24;
  GtkWidget *vbox16;
  GtkWidget *frame8;
  GtkWidget *vbox18;
  GtkWidget *p10;
  GtkWidget *p11;
  GtkWidget *p12;
  GtkWidget *p13;
  GtkWidget *label25;
  GtkWidget *frame9;
  GtkWidget *vbox19;
  GtkWidget *p14;
  GtkWidget *p15;
  GtkWidget *label26;
  GtkWidget *label22;
  GtkWidget *dialog_action_area1;
  GtkWidget *preferencescancelbutton;
  GtkWidget *preferencesokbutton;

  preferencesdialog = gtk_dialog_new ();
  gtk_window_set_title (GTK_WINDOW (preferencesdialog), _("happydigger - preferences"));
  gtk_window_set_position (GTK_WINDOW (preferencesdialog), GTK_WIN_POS_MOUSE);
  preferencesdialog_icon_pixbuf = create_pixbuf ("happydigger.png");
  if (preferencesdialog_icon_pixbuf)
    {
      gtk_window_set_icon (GTK_WINDOW (preferencesdialog), preferencesdialog_icon_pixbuf);
      gdk_pixbuf_unref (preferencesdialog_icon_pixbuf);
    }
  gtk_window_set_type_hint (GTK_WINDOW (preferencesdialog), GDK_WINDOW_TYPE_HINT_DIALOG);

  dialog_vbox1 = GTK_DIALOG (preferencesdialog)->vbox;
  gtk_widget_show (dialog_vbox1);

  vbox12 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox12);
  gtk_box_pack_start (GTK_BOX (dialog_vbox1), vbox12, TRUE, TRUE, 0);

  frame5 = gtk_frame_new (NULL);
  gtk_widget_show (frame5);
  gtk_box_pack_start (GTK_BOX (vbox12), frame5, TRUE, TRUE, 0);

  vbox13 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox13);
  gtk_container_add (GTK_CONTAINER (frame5), vbox13);

  label19 = gtk_label_new (_("Comma separated list to use for types"));
  gtk_widget_show (label19);
  gtk_box_pack_start (GTK_BOX (vbox13), label19, FALSE, FALSE, 1);
  gtk_label_set_justify (GTK_LABEL (label19), GTK_JUSTIFY_CENTER);
  gtk_label_set_line_wrap (GTK_LABEL (label19), TRUE);

  ptypesentry = gtk_entry_new ();
  gtk_widget_show (ptypesentry);
  gtk_box_pack_start (GTK_BOX (vbox13), ptypesentry, FALSE, FALSE, 1);
  gtk_entry_set_max_length (GTK_ENTRY (ptypesentry), 200);

  label20 = gtk_label_new (_("Comma separated list to use for materials"));
  gtk_widget_show (label20);
  gtk_box_pack_start (GTK_BOX (vbox13), label20, FALSE, FALSE, 1);
  gtk_label_set_justify (GTK_LABEL (label20), GTK_JUSTIFY_CENTER);
  gtk_label_set_line_wrap (GTK_LABEL (label20), TRUE);

  pmaterialsentry = gtk_entry_new ();
  gtk_widget_show (pmaterialsentry);
  gtk_box_pack_start (GTK_BOX (vbox13), pmaterialsentry, FALSE, FALSE, 1);
  gtk_entry_set_max_length (GTK_ENTRY (pmaterialsentry), 200);

  label21 = gtk_label_new (_("Comma separated list to use for periods"));
  gtk_widget_show (label21);
  gtk_box_pack_start (GTK_BOX (vbox13), label21, FALSE, FALSE, 1);
  gtk_label_set_justify (GTK_LABEL (label21), GTK_JUSTIFY_CENTER);
  gtk_label_set_line_wrap (GTK_LABEL (label21), TRUE);

  pperiodsentry = gtk_entry_new ();
  gtk_widget_show (pperiodsentry);
  gtk_box_pack_start (GTK_BOX (vbox13), pperiodsentry, FALSE, FALSE, 1);
  gtk_entry_set_max_length (GTK_ENTRY (pperiodsentry), 200);

  label18 = gtk_label_new (_("Selections"));
  gtk_widget_show (label18);
  gtk_frame_set_label_widget (GTK_FRAME (frame5), label18);

  frame6 = gtk_frame_new (NULL);
  gtk_widget_show (frame6);
  gtk_box_pack_start (GTK_BOX (vbox12), frame6, TRUE, TRUE, 0);

  vbox14 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox14);
  gtk_container_add (GTK_CONTAINER (frame6), vbox14);

  label23 = gtk_label_new (_("Items to display in the list view"));
  gtk_widget_show (label23);
  gtk_box_pack_start (GTK_BOX (vbox14), label23, FALSE, FALSE, 5);
  gtk_label_set_justify (GTK_LABEL (label23), GTK_JUSTIFY_CENTER);
  gtk_label_set_line_wrap (GTK_LABEL (label23), TRUE);

  hseparator1 = gtk_hseparator_new ();
  gtk_widget_show (hseparator1);
  gtk_box_pack_start (GTK_BOX (vbox14), hseparator1, TRUE, TRUE, 5);

  hbox30 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox30);
  gtk_box_pack_start (GTK_BOX (vbox14), hbox30, TRUE, TRUE, 0);

  frame7 = gtk_frame_new (NULL);
  gtk_widget_show (frame7);
  gtk_box_pack_start (GTK_BOX (hbox30), frame7, TRUE, TRUE, 0);

  vbox17 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox17);
  gtk_container_add (GTK_CONTAINER (frame7), vbox17);

  p1 = gtk_check_button_new_with_mnemonic (_("Number"));
  gtk_widget_show (p1);
  gtk_box_pack_start (GTK_BOX (vbox17), p1, FALSE, FALSE, 0);

  p2 = gtk_check_button_new_with_mnemonic (_("Description"));
  gtk_widget_show (p2);
  gtk_box_pack_start (GTK_BOX (vbox17), p2, FALSE, FALSE, 0);

  p3 = gtk_check_button_new_with_mnemonic (_("Type"));
  gtk_widget_show (p3);
  gtk_box_pack_start (GTK_BOX (vbox17), p3, FALSE, FALSE, 0);

  p4 = gtk_check_button_new_with_mnemonic (_("Material"));
  gtk_widget_show (p4);
  gtk_box_pack_start (GTK_BOX (vbox17), p4, FALSE, FALSE, 0);

  p5 = gtk_check_button_new_with_mnemonic (_("Period"));
  gtk_widget_show (p5);
  gtk_box_pack_start (GTK_BOX (vbox17), p5, FALSE, FALSE, 0);

  p6 = gtk_check_button_new_with_mnemonic (_("Findnotes"));
  gtk_widget_show (p6);
  gtk_box_pack_start (GTK_BOX (vbox17), p6, FALSE, FALSE, 0);

  p7 = gtk_check_button_new_with_mnemonic (_("Date"));
  gtk_widget_show (p7);
  gtk_box_pack_start (GTK_BOX (vbox17), p7, FALSE, FALSE, 0);

  p8 = gtk_check_button_new_with_mnemonic (_("Value"));
  gtk_widget_show (p8);
  gtk_box_pack_start (GTK_BOX (vbox17), p8, FALSE, FALSE, 0);

  p9 = gtk_check_button_new_with_mnemonic (_("Reference"));
  gtk_widget_show (p9);
  gtk_box_pack_start (GTK_BOX (vbox17), p9, FALSE, FALSE, 0);

  label24 = gtk_label_new (_("Find description"));
  gtk_widget_show (label24);
  gtk_frame_set_label_widget (GTK_FRAME (frame7), label24);

  vbox16 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox16);
  gtk_box_pack_start (GTK_BOX (hbox30), vbox16, TRUE, TRUE, 0);

  frame8 = gtk_frame_new (NULL);
  gtk_widget_show (frame8);
  gtk_box_pack_start (GTK_BOX (vbox16), frame8, FALSE, FALSE, 0);

  vbox18 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox18);
  gtk_container_add (GTK_CONTAINER (frame8), vbox18);

  p10 = gtk_check_button_new_with_mnemonic (_("Find date"));
  gtk_widget_show (p10);
  gtk_box_pack_start (GTK_BOX (vbox18), p10, FALSE, FALSE, 0);

  p11 = gtk_check_button_new_with_mnemonic (_("Location"));
  gtk_widget_show (p11);
  gtk_box_pack_start (GTK_BOX (vbox18), p11, FALSE, FALSE, 0);

  p12 = gtk_check_button_new_with_mnemonic (_("Coordinates"));
  gtk_widget_show (p12);
  gtk_box_pack_start (GTK_BOX (vbox18), p12, FALSE, FALSE, 0);

  p13 = gtk_check_button_new_with_mnemonic (_("Spotnotes"));
  gtk_widget_show (p13);
  gtk_box_pack_start (GTK_BOX (vbox18), p13, FALSE, FALSE, 0);

  label25 = gtk_label_new (_("Findspot details"));
  gtk_widget_show (label25);
  gtk_frame_set_label_widget (GTK_FRAME (frame8), label25);

  frame9 = gtk_frame_new (NULL);
  gtk_widget_show (frame9);
  gtk_box_pack_start (GTK_BOX (vbox16), frame9, TRUE, TRUE, 0);

  vbox19 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox19);
  gtk_container_add (GTK_CONTAINER (frame9), vbox19);

  p14 = gtk_check_button_new_with_mnemonic (_("Image1"));
  gtk_widget_show (p14);
  gtk_box_pack_start (GTK_BOX (vbox19), p14, FALSE, FALSE, 0);

  p15 = gtk_check_button_new_with_mnemonic (_("Image2"));
  gtk_widget_show (p15);
  gtk_box_pack_start (GTK_BOX (vbox19), p15, FALSE, FALSE, 0);

  label26 = gtk_label_new (_("Images"));
  gtk_widget_show (label26);
  gtk_frame_set_label_widget (GTK_FRAME (frame9), label26);

  label22 = gtk_label_new (_("List view"));
  gtk_widget_show (label22);
  gtk_frame_set_label_widget (GTK_FRAME (frame6), label22);

  dialog_action_area1 = GTK_DIALOG (preferencesdialog)->action_area;
  gtk_widget_show (dialog_action_area1);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);

  preferencescancelbutton = gtk_button_new_from_stock ("gtk-cancel");
  gtk_widget_show (preferencescancelbutton);
  gtk_dialog_add_action_widget (GTK_DIALOG (preferencesdialog), preferencescancelbutton, GTK_RESPONSE_CANCEL);
  GTK_WIDGET_SET_FLAGS (preferencescancelbutton, GTK_CAN_DEFAULT);

  preferencesokbutton = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (preferencesokbutton);
  gtk_dialog_add_action_widget (GTK_DIALOG (preferencesdialog), preferencesokbutton, GTK_RESPONSE_OK);
  GTK_WIDGET_SET_FLAGS (preferencesokbutton, GTK_CAN_DEFAULT);

  g_signal_connect ((gpointer) preferencesdialog, "delete_event",
                    G_CALLBACK (on_preferencesdialog_delete_event),
                    NULL);
  g_signal_connect ((gpointer) preferencescancelbutton, "clicked",
                    G_CALLBACK (on_preferencescancelbutton_clicked),
                    NULL);
  g_signal_connect ((gpointer) preferencesokbutton, "clicked",
                    G_CALLBACK (on_preferencesokbutton_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (preferencesdialog, preferencesdialog, "preferencesdialog");
  GLADE_HOOKUP_OBJECT_NO_REF (preferencesdialog, dialog_vbox1, "dialog_vbox1");
  GLADE_HOOKUP_OBJECT (preferencesdialog, vbox12, "vbox12");
  GLADE_HOOKUP_OBJECT (preferencesdialog, frame5, "frame5");
  GLADE_HOOKUP_OBJECT (preferencesdialog, vbox13, "vbox13");
  GLADE_HOOKUP_OBJECT (preferencesdialog, label19, "label19");
  GLADE_HOOKUP_OBJECT (preferencesdialog, ptypesentry, "ptypesentry");
  GLADE_HOOKUP_OBJECT (preferencesdialog, label20, "label20");
  GLADE_HOOKUP_OBJECT (preferencesdialog, pmaterialsentry, "pmaterialsentry");
  GLADE_HOOKUP_OBJECT (preferencesdialog, label21, "label21");
  GLADE_HOOKUP_OBJECT (preferencesdialog, pperiodsentry, "pperiodsentry");
  GLADE_HOOKUP_OBJECT (preferencesdialog, label18, "label18");
  GLADE_HOOKUP_OBJECT (preferencesdialog, frame6, "frame6");
  GLADE_HOOKUP_OBJECT (preferencesdialog, vbox14, "vbox14");
  GLADE_HOOKUP_OBJECT (preferencesdialog, label23, "label23");
  GLADE_HOOKUP_OBJECT (preferencesdialog, hseparator1, "hseparator1");
  GLADE_HOOKUP_OBJECT (preferencesdialog, hbox30, "hbox30");
  GLADE_HOOKUP_OBJECT (preferencesdialog, frame7, "frame7");
  GLADE_HOOKUP_OBJECT (preferencesdialog, vbox17, "vbox17");
  GLADE_HOOKUP_OBJECT (preferencesdialog, p1, "p1");
  GLADE_HOOKUP_OBJECT (preferencesdialog, p2, "p2");
  GLADE_HOOKUP_OBJECT (preferencesdialog, p3, "p3");
  GLADE_HOOKUP_OBJECT (preferencesdialog, p4, "p4");
  GLADE_HOOKUP_OBJECT (preferencesdialog, p5, "p5");
  GLADE_HOOKUP_OBJECT (preferencesdialog, p6, "p6");
  GLADE_HOOKUP_OBJECT (preferencesdialog, p7, "p7");
  GLADE_HOOKUP_OBJECT (preferencesdialog, p8, "p8");
  GLADE_HOOKUP_OBJECT (preferencesdialog, p9, "p9");
  GLADE_HOOKUP_OBJECT (preferencesdialog, label24, "label24");
  GLADE_HOOKUP_OBJECT (preferencesdialog, vbox16, "vbox16");
  GLADE_HOOKUP_OBJECT (preferencesdialog, frame8, "frame8");
  GLADE_HOOKUP_OBJECT (preferencesdialog, vbox18, "vbox18");
  GLADE_HOOKUP_OBJECT (preferencesdialog, p10, "p10");
  GLADE_HOOKUP_OBJECT (preferencesdialog, p11, "p11");
  GLADE_HOOKUP_OBJECT (preferencesdialog, p12, "p12");
  GLADE_HOOKUP_OBJECT (preferencesdialog, p13, "p13");
  GLADE_HOOKUP_OBJECT (preferencesdialog, label25, "label25");
  GLADE_HOOKUP_OBJECT (preferencesdialog, frame9, "frame9");
  GLADE_HOOKUP_OBJECT (preferencesdialog, vbox19, "vbox19");
  GLADE_HOOKUP_OBJECT (preferencesdialog, p14, "p14");
  GLADE_HOOKUP_OBJECT (preferencesdialog, p15, "p15");
  GLADE_HOOKUP_OBJECT (preferencesdialog, label26, "label26");
  GLADE_HOOKUP_OBJECT (preferencesdialog, label22, "label22");
  GLADE_HOOKUP_OBJECT_NO_REF (preferencesdialog, dialog_action_area1, "dialog_action_area1");
  GLADE_HOOKUP_OBJECT (preferencesdialog, preferencescancelbutton, "preferencescancelbutton");
  GLADE_HOOKUP_OBJECT (preferencesdialog, preferencesokbutton, "preferencesokbutton");

  gtk_widget_grab_default (preferencesokbutton);
  return preferencesdialog;
}

GtkWidget*
create_helpwindow (void)
{
  GtkWidget *helpwindow;
  GdkPixbuf *helpwindow_icon_pixbuf;
  GtkWidget *scrolledwindow3;
  GtkWidget *helptextview;

  helpwindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_widget_set_size_request (helpwindow, 650, 400);
  gtk_window_set_title (GTK_WINDOW (helpwindow), _("happydigger - help"));
  gtk_window_set_position (GTK_WINDOW (helpwindow), GTK_WIN_POS_MOUSE);
  helpwindow_icon_pixbuf = create_pixbuf ("happydigger.png");
  if (helpwindow_icon_pixbuf)
    {
      gtk_window_set_icon (GTK_WINDOW (helpwindow), helpwindow_icon_pixbuf);
      gdk_pixbuf_unref (helpwindow_icon_pixbuf);
    }

  scrolledwindow3 = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_show (scrolledwindow3);
  gtk_container_add (GTK_CONTAINER (helpwindow), scrolledwindow3);
  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow3), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);

  helptextview = gtk_text_view_new ();
  gtk_widget_show (helptextview);
  gtk_container_add (GTK_CONTAINER (scrolledwindow3), helptextview);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (helpwindow, helpwindow, "helpwindow");
  GLADE_HOOKUP_OBJECT (helpwindow, scrolledwindow3, "scrolledwindow3");
  GLADE_HOOKUP_OBJECT (helpwindow, helptextview, "helptextview");

  return helpwindow;
}

GtkWidget*
create_imagechooserdialog (void)
{
  GtkWidget *imagechooserdialog;
  GdkPixbuf *imagechooserdialog_icon_pixbuf;
  GtkWidget *dialog_vbox2;
  GtkWidget *dialog_action_area2;
  GtkWidget *cancel_button;
  GtkWidget *ok_button;

  imagechooserdialog = gtk_file_chooser_dialog_new (_("happydigger - select an image"), NULL, GTK_FILE_CHOOSER_ACTION_OPEN, NULL);
  imagechooserdialog_icon_pixbuf = create_pixbuf ("happydigger.png");
  if (imagechooserdialog_icon_pixbuf)
    {
      gtk_window_set_icon (GTK_WINDOW (imagechooserdialog), imagechooserdialog_icon_pixbuf);
      gdk_pixbuf_unref (imagechooserdialog_icon_pixbuf);
    }
  gtk_window_set_type_hint (GTK_WINDOW (imagechooserdialog), GDK_WINDOW_TYPE_HINT_DIALOG);

  dialog_vbox2 = GTK_DIALOG (imagechooserdialog)->vbox;
  gtk_widget_show (dialog_vbox2);

  dialog_action_area2 = GTK_DIALOG (imagechooserdialog)->action_area;
  gtk_widget_show (dialog_action_area2);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area2), GTK_BUTTONBOX_END);

  cancel_button = gtk_button_new_from_stock ("gtk-cancel");
  gtk_widget_show (cancel_button);
  gtk_dialog_add_action_widget (GTK_DIALOG (imagechooserdialog), cancel_button, GTK_RESPONSE_CANCEL);
  GTK_WIDGET_SET_FLAGS (cancel_button, GTK_CAN_DEFAULT);

  ok_button = gtk_button_new_from_stock ("gtk-open");
  gtk_widget_show (ok_button);
  gtk_dialog_add_action_widget (GTK_DIALOG (imagechooserdialog), ok_button, GTK_RESPONSE_OK);
  GTK_WIDGET_SET_FLAGS (ok_button, GTK_CAN_DEFAULT);

  g_signal_connect ((gpointer) imagechooserdialog, "delete_event",
                    G_CALLBACK (on_fileselection_delete_event),
                    NULL);
  g_signal_connect ((gpointer) cancel_button, "clicked",
                    G_CALLBACK (on_fileselection_cancel_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) ok_button, "clicked",
                    G_CALLBACK (on_fileselection_ok_button_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (imagechooserdialog, imagechooserdialog, "imagechooserdialog");
  GLADE_HOOKUP_OBJECT_NO_REF (imagechooserdialog, dialog_vbox2, "dialog_vbox2");
  GLADE_HOOKUP_OBJECT_NO_REF (imagechooserdialog, dialog_action_area2, "dialog_action_area2");
  GLADE_HOOKUP_OBJECT (imagechooserdialog, cancel_button, "cancel_button");
  GLADE_HOOKUP_OBJECT (imagechooserdialog, ok_button, "ok_button");

  gtk_widget_grab_default (ok_button);
  return imagechooserdialog;
}

GtkWidget*
create_imagewindow (void)
{
  GtkWidget *imagewindow;
  GdkPixbuf *imagewindow_icon_pixbuf;

  imagewindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (imagewindow), _("happydigger - image view"));
  imagewindow_icon_pixbuf = create_pixbuf ("happydigger.png");
  if (imagewindow_icon_pixbuf)
    {
      gtk_window_set_icon (GTK_WINDOW (imagewindow), imagewindow_icon_pixbuf);
      gdk_pixbuf_unref (imagewindow_icon_pixbuf);
    }

  g_signal_connect ((gpointer) imagewindow, "delete_event",
                    G_CALLBACK (on_imagewindow_delete_event),
                    NULL);

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

  return imagewindow;
}

GtkWidget*
create_startupwindow (void)
{
  GtkWidget *startupwindow;
  GdkPixbuf *startupwindow_icon_pixbuf;
  GtkWidget *vbox20;
  GtkWidget *label27;
  GtkWidget *tablecombo;
  GtkWidget *hbox31;
  GtkWidget *newbutton;
  GtkWidget *alignment2;
  GtkWidget *hbox33;
  GtkWidget *image23;
  GtkWidget *label29;
  GtkWidget *startbutton;
  GtkWidget *alignment1;
  GtkWidget *hbox32;
  GtkWidget *image22;
  GtkWidget *label28;
  GtkWidget *exitbutton;

  startupwindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_widget_set_size_request (startupwindow, -1, 150);
  gtk_window_set_title (GTK_WINDOW (startupwindow), _("happydigger - startup"));
  startupwindow_icon_pixbuf = create_pixbuf ("happydigger.png");
  if (startupwindow_icon_pixbuf)
    {
      gtk_window_set_icon (GTK_WINDOW (startupwindow), startupwindow_icon_pixbuf);
      gdk_pixbuf_unref (startupwindow_icon_pixbuf);
    }

  vbox20 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox20);
  gtk_container_add (GTK_CONTAINER (startupwindow), vbox20);

  label27 = gtk_label_new (_("Select a table or create a new one"));
  gtk_widget_show (label27);
  gtk_box_pack_start (GTK_BOX (vbox20), label27, TRUE, TRUE, 0);

  tablecombo = gtk_combo_box_entry_new_text ();
  gtk_widget_show (tablecombo);
  gtk_box_pack_start (GTK_BOX (vbox20), tablecombo, FALSE, TRUE, 0);

  hbox31 = gtk_hbox_new (TRUE, 0);
  gtk_widget_show (hbox31);
  gtk_box_pack_start (GTK_BOX (vbox20), hbox31, FALSE, TRUE, 20);

  newbutton = gtk_button_new ();
  gtk_widget_show (newbutton);
  gtk_box_pack_start (GTK_BOX (hbox31), newbutton, FALSE, FALSE, 0);

  alignment2 = gtk_alignment_new (0.5, 0.5, 0, 0);
  gtk_widget_show (alignment2);
  gtk_container_add (GTK_CONTAINER (newbutton), alignment2);

  hbox33 = gtk_hbox_new (FALSE, 2);
  gtk_widget_show (hbox33);
  gtk_container_add (GTK_CONTAINER (alignment2), hbox33);

  image23 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image23);
  gtk_box_pack_start (GTK_BOX (hbox33), image23, FALSE, FALSE, 0);

  label29 = gtk_label_new_with_mnemonic (_("_New Table"));
  gtk_widget_show (label29);
  gtk_box_pack_start (GTK_BOX (hbox33), label29, FALSE, FALSE, 0);

  startbutton = gtk_button_new ();
  gtk_widget_show (startbutton);
  gtk_box_pack_start (GTK_BOX (hbox31), startbutton, FALSE, FALSE, 0);

  alignment1 = gtk_alignment_new (0.5, 0.5, 0, 0);
  gtk_widget_show (alignment1);
  gtk_container_add (GTK_CONTAINER (startbutton), alignment1);

  hbox32 = gtk_hbox_new (FALSE, 2);
  gtk_widget_show (hbox32);
  gtk_container_add (GTK_CONTAINER (alignment1), hbox32);

  image22 = gtk_image_new_from_stock ("gtk-execute", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image22);
  gtk_box_pack_start (GTK_BOX (hbox32), image22, FALSE, FALSE, 0);

  label28 = gtk_label_new_with_mnemonic (_("_Start Happydigger"));
  gtk_widget_show (label28);
  gtk_box_pack_start (GTK_BOX (hbox32), label28, FALSE, FALSE, 0);

  exitbutton = gtk_button_new_from_stock ("gtk-quit");
  gtk_widget_show (exitbutton);
  gtk_box_pack_start (GTK_BOX (hbox31), exitbutton, FALSE, FALSE, 0);

  g_signal_connect ((gpointer) startupwindow, "delete_event",
                    G_CALLBACK (on_startupwindow_delete_event),
                    NULL);
  g_signal_connect ((gpointer) newbutton, "clicked",
                    G_CALLBACK (on_newtablebutton_clicked),
                    NULL);
  g_signal_connect ((gpointer) startbutton, "clicked",
                    G_CALLBACK (on_startbutton_clicked),
                    NULL);
  g_signal_connect ((gpointer) exitbutton, "clicked",
                    G_CALLBACK (on_exitbutton_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (startupwindow, startupwindow, "startupwindow");
  GLADE_HOOKUP_OBJECT (startupwindow, vbox20, "vbox20");
  GLADE_HOOKUP_OBJECT (startupwindow, label27, "label27");
  GLADE_HOOKUP_OBJECT (startupwindow, tablecombo, "tablecombo");
  GLADE_HOOKUP_OBJECT (startupwindow, hbox31, "hbox31");
  GLADE_HOOKUP_OBJECT (startupwindow, newbutton, "newbutton");
  GLADE_HOOKUP_OBJECT (startupwindow, alignment2, "alignment2");
  GLADE_HOOKUP_OBJECT (startupwindow, hbox33, "hbox33");
  GLADE_HOOKUP_OBJECT (startupwindow, image23, "image23");
  GLADE_HOOKUP_OBJECT (startupwindow, label29, "label29");
  GLADE_HOOKUP_OBJECT (startupwindow, startbutton, "startbutton");
  GLADE_HOOKUP_OBJECT (startupwindow, alignment1, "alignment1");
  GLADE_HOOKUP_OBJECT (startupwindow, hbox32, "hbox32");
  GLADE_HOOKUP_OBJECT (startupwindow, image22, "image22");
  GLADE_HOOKUP_OBJECT (startupwindow, label28, "label28");
  GLADE_HOOKUP_OBJECT (startupwindow, exitbutton, "exitbutton");

  return startupwindow;
}

GtkWidget*
create_newdialog (void)
{
  GtkWidget *newdialog;
  GdkPixbuf *newdialog_icon_pixbuf;
  GtkWidget *dialog_vbox3;
  GtkWidget *vbox21;
  GtkWidget *label30;
  GtkWidget *newentry;
  GtkWidget *dialog_action_area3;
  GtkWidget *newcancelbutton;
  GtkWidget *newokbutton;

  newdialog = gtk_dialog_new ();
  gtk_window_set_title (GTK_WINDOW (newdialog), _("happydigger - new table"));
  newdialog_icon_pixbuf = create_pixbuf ("happydigger.png");
  if (newdialog_icon_pixbuf)
    {
      gtk_window_set_icon (GTK_WINDOW (newdialog), newdialog_icon_pixbuf);
      gdk_pixbuf_unref (newdialog_icon_pixbuf);
    }
  gtk_window_set_type_hint (GTK_WINDOW (newdialog), GDK_WINDOW_TYPE_HINT_DIALOG);

  dialog_vbox3 = GTK_DIALOG (newdialog)->vbox;
  gtk_widget_show (dialog_vbox3);

  vbox21 = gtk_vbox_new (TRUE, 0);
  gtk_widget_show (vbox21);
  gtk_box_pack_start (GTK_BOX (dialog_vbox3), vbox21, TRUE, TRUE, 0);

  label30 = gtk_label_new (_("Enter a name for this table"));
  gtk_widget_show (label30);
  gtk_box_pack_start (GTK_BOX (vbox21), label30, FALSE, FALSE, 4);

  newentry = gtk_entry_new ();
  gtk_widget_show (newentry);
  gtk_box_pack_start (GTK_BOX (vbox21), newentry, FALSE, FALSE, 0);

  dialog_action_area3 = GTK_DIALOG (newdialog)->action_area;
  gtk_widget_show (dialog_action_area3);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area3), GTK_BUTTONBOX_END);

  newcancelbutton = gtk_button_new_from_stock ("gtk-cancel");
  gtk_widget_show (newcancelbutton);
  gtk_dialog_add_action_widget (GTK_DIALOG (newdialog), newcancelbutton, GTK_RESPONSE_CANCEL);
  GTK_WIDGET_SET_FLAGS (newcancelbutton, GTK_CAN_DEFAULT);

  newokbutton = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (newokbutton);
  gtk_dialog_add_action_widget (GTK_DIALOG (newdialog), newokbutton, GTK_RESPONSE_OK);
  GTK_WIDGET_SET_FLAGS (newokbutton, GTK_CAN_DEFAULT);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (newdialog, newdialog, "newdialog");
  GLADE_HOOKUP_OBJECT_NO_REF (newdialog, dialog_vbox3, "dialog_vbox3");
  GLADE_HOOKUP_OBJECT (newdialog, vbox21, "vbox21");
  GLADE_HOOKUP_OBJECT (newdialog, label30, "label30");
  GLADE_HOOKUP_OBJECT (newdialog, newentry, "newentry");
  GLADE_HOOKUP_OBJECT_NO_REF (newdialog, dialog_action_area3, "dialog_action_area3");
  GLADE_HOOKUP_OBJECT (newdialog, newcancelbutton, "newcancelbutton");
  GLADE_HOOKUP_OBJECT (newdialog, newokbutton, "newokbutton");

  return newdialog;
}


Generated by  Doxygen 1.6.0   Back to index