Logo Search packages:      
Sourcecode: happydigger version File versions

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;
  GList *typecombo_items = NULL;
  GtkWidget *typeentry;
  GtkWidget *hbox11;
  GtkWidget *label7;
  GtkWidget *materialcombo;
  GList *materialcombo_items = NULL;
  GtkWidget *materialentry;
  GtkWidget *hbox25;
  GtkWidget *label14;
  GtkWidget *periodcombo;
  GList *periodcombo_items = NULL;
  GtkWidget *periodentry;
  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 *hbox18;
  GtkWidget *image2entry;
  GtkWidget *image2button;
  GtkWidget *hbox19;
  GtkWidget *image1;
  GtkWidget *image2;
  GtkWidget *label1;
  GtkTooltips *tooltips;

  tooltips = gtk_tooltips_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);

  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);

  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);

  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);

  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_widget_set_size_request (ffbutton, 54, -1);
  gtk_tooltips_set_tip (tooltips, ffbutton, _("+5"), NULL);

  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);

  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, _("Apply changes"), NULL);

  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, _("Remove record"), NULL);

  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);

  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);

  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);

  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);

  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_new ();
  g_object_set_data (G_OBJECT (GTK_COMBO (typecombo)->popwin),
                     "GladeParentKey", typecombo);
  gtk_widget_show (typecombo);
  gtk_box_pack_start (GTK_BOX (hbox4), typecombo, TRUE, TRUE, 0);
  gtk_widget_set_size_request (typecombo, 100, -1);
  typecombo_items = g_list_append (typecombo_items, (gpointer) "");
  gtk_combo_set_popdown_strings (GTK_COMBO (typecombo), typecombo_items);
  g_list_free (typecombo_items);

  typeentry = GTK_COMBO (typecombo)->entry;
  gtk_widget_show (typeentry);
  gtk_entry_set_max_length (GTK_ENTRY (typeentry), 80);
  gtk_editable_set_editable (GTK_EDITABLE (typeentry), FALSE);

  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_new ();
  g_object_set_data (G_OBJECT (GTK_COMBO (materialcombo)->popwin),
                     "GladeParentKey", materialcombo);
  gtk_widget_show (materialcombo);
  gtk_box_pack_start (GTK_BOX (hbox11), materialcombo, TRUE, TRUE, 0);
  gtk_widget_set_size_request (materialcombo, 100, -1);
  materialcombo_items = g_list_append (materialcombo_items, (gpointer) "");
  gtk_combo_set_popdown_strings (GTK_COMBO (materialcombo), materialcombo_items);
  g_list_free (materialcombo_items);

  materialentry = GTK_COMBO (materialcombo)->entry;
  gtk_widget_show (materialentry);
  gtk_entry_set_max_length (GTK_ENTRY (materialentry), 80);
  gtk_editable_set_editable (GTK_EDITABLE (materialentry), FALSE);

  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_new ();
  g_object_set_data (G_OBJECT (GTK_COMBO (periodcombo)->popwin),
                     "GladeParentKey", periodcombo);
  gtk_widget_show (periodcombo);
  gtk_box_pack_start (GTK_BOX (hbox25), periodcombo, TRUE, TRUE, 0);
  gtk_widget_set_size_request (periodcombo, 100, -1);
  periodcombo_items = g_list_append (periodcombo_items, (gpointer) "");
  gtk_combo_set_popdown_strings (GTK_COMBO (periodcombo), periodcombo_items);
  g_list_free (periodcombo_items);

  periodentry = GTK_COMBO (periodcombo)->entry;
  gtk_widget_show (periodentry);
  gtk_entry_set_max_length (GTK_ENTRY (periodentry), 80);
  gtk_editable_set_editable (GTK_EDITABLE (periodentry), FALSE);

  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_with_mnemonic (_("..."));
  gtk_widget_show (image1button);
  gtk_box_pack_start (GTK_BOX (hbox17), image1button, FALSE, FALSE, 0);
  gtk_widget_set_size_request (image1button, -1, 27);

  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_with_mnemonic (_("..."));
  gtk_widget_show (image2button);
  gtk_box_pack_start (GTK_BOX (hbox18), image2button, FALSE, FALSE, 0);
  gtk_widget_set_size_request (image2button, -1, 27);

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

  image1 = gtk_image_new_from_stock ("gtk-missing-image", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image1);
  gtk_box_pack_start (GTK_BOX (hbox19), image1, FALSE, FALSE, 0);
  gtk_widget_set_size_request (image1, 100, 100);

  image2 = gtk_image_new_from_stock ("gtk-missing-image", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image2);
  gtk_box_pack_start (GTK_BOX (hbox19), image2, FALSE, FALSE, 0);
  gtk_widget_set_size_request (image2, 100, 100);

  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) image1button, "clicked",
                    G_CALLBACK (on_image1button_clicked),
                    NULL);
  g_signal_connect ((gpointer) image2button, "clicked",
                    G_CALLBACK (on_image2button_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, typeentry, "typeentry");
  GLADE_HOOKUP_OBJECT (window, hbox11, "hbox11");
  GLADE_HOOKUP_OBJECT (window, label7, "label7");
  GLADE_HOOKUP_OBJECT (window, materialcombo, "materialcombo");
  GLADE_HOOKUP_OBJECT (window, materialentry, "materialentry");
  GLADE_HOOKUP_OBJECT (window, hbox25, "hbox25");
  GLADE_HOOKUP_OBJECT (window, label14, "label14");
  GLADE_HOOKUP_OBJECT (window, periodcombo, "periodcombo");
  GLADE_HOOKUP_OBJECT (window, periodentry, "periodentry");
  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, hbox18, "hbox18");
  GLADE_HOOKUP_OBJECT (window, image2entry, "image2entry");
  GLADE_HOOKUP_OBJECT (window, image2button, "image2button");
  GLADE_HOOKUP_OBJECT (window, hbox19, "hbox19");
  GLADE_HOOKUP_OBJECT (window, image1, "image1");
  GLADE_HOOKUP_OBJECT (window, image2, "image2");
  GLADE_HOOKUP_OBJECT (window, label1, "label1");
  GLADE_HOOKUP_OBJECT_NO_REF (window, tooltips, "tooltips");

  return window;
}

GtkWidget*
create_fileselection (void)
{
  GtkWidget *fileselection;
  GdkPixbuf *fileselection_icon_pixbuf;
  GtkWidget *fileselection_ok_button;
  GtkWidget *fileselection_cancel_button;

  fileselection = gtk_file_selection_new (_("happydigger - select an image"));
  gtk_container_set_border_width (GTK_CONTAINER (fileselection), 10);
  gtk_window_set_position (GTK_WINDOW (fileselection), GTK_WIN_POS_MOUSE);
  fileselection_icon_pixbuf = create_pixbuf ("happydigger.png");
  if (fileselection_icon_pixbuf)
    {
      gtk_window_set_icon (GTK_WINDOW (fileselection), fileselection_icon_pixbuf);
      gdk_pixbuf_unref (fileselection_icon_pixbuf);
    }
  gtk_window_set_type_hint (GTK_WINDOW (fileselection), GDK_WINDOW_TYPE_HINT_DIALOG);

  fileselection_ok_button = GTK_FILE_SELECTION (fileselection)->ok_button;
  gtk_widget_show (fileselection_ok_button);
  GTK_WIDGET_SET_FLAGS (fileselection_ok_button, GTK_CAN_DEFAULT);

  fileselection_cancel_button = GTK_FILE_SELECTION (fileselection)->cancel_button;
  gtk_widget_show (fileselection_cancel_button);
  GTK_WIDGET_SET_FLAGS (fileselection_cancel_button, GTK_CAN_DEFAULT);

  g_signal_connect ((gpointer) fileselection, "delete_event",
                    G_CALLBACK (on_fileselection_delete_event),
                    NULL);
  g_signal_connect ((gpointer) fileselection_ok_button, "clicked",
                    G_CALLBACK (on_fileselection_ok_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) fileselection_cancel_button, "clicked",
                    G_CALLBACK (on_fileselection_cancel_button_clicked),
                    NULL);

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

  gtk_widget_grab_default (fileselection_ok_button);
  return fileselection;
}

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, 550, 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;
}


Generated by  Doxygen 1.6.0   Back to index