Cleaned up GUI, by objectifying the data editor. Removed a number of global variables.
authorJohn Darrington <john@darrington.wattle.id.au>
Sat, 23 Dec 2006 09:03:44 +0000 (09:03 +0000)
committerJohn Darrington <john@darrington.wattle.id.au>
Sat, 23 Dec 2006 09:03:44 +0000 (09:03 +0000)
26 files changed:
AUTHORS
glade.patch [new file with mode: 0644]
src/data/value.h
src/libpspp/automake.mk
src/libpspp/version.h
src/ui/gui/about.c [new file with mode: 0644]
src/ui/gui/about.h [new file with mode: 0644]
src/ui/gui/automake.mk
src/ui/gui/data-editor.c [new file with mode: 0644]
src/ui/gui/data-editor.glade [new file with mode: 0644]
src/ui/gui/data-editor.h [new file with mode: 0644]
src/ui/gui/data-sheet.c
src/ui/gui/menu-actions.c [deleted file]
src/ui/gui/menu-actions.h [deleted file]
src/ui/gui/message-dialog.c
src/ui/gui/psppire.c
src/ui/gui/psppire.glade
src/ui/gui/syntax-editor-source.c
src/ui/gui/syntax-editor.c
src/ui/gui/syntax-editor.glade [new file with mode: 0644]
src/ui/gui/syntax-editor.h
src/ui/gui/var-sheet.c
src/ui/gui/var-sheet.h
src/ui/gui/var-type-dialog.c
src/ui/gui/window-manager.c [new file with mode: 0644]
src/ui/gui/window-manager.h [new file with mode: 0644]

diff --git a/AUTHORS b/AUTHORS
index 0b1915dcf0beed34254dcf68f7727b18cfdde613..3322a0f2f70076b0f7d1f4bce85db1ef118c38ed 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,14 +1,10 @@
-                                 PSPP Authors
-                                       
-     * Ben Pfaff wrote most of the program and the manual.
+* Ben Pfaff wrote most of the program and the manual.
 
-     * John Williams originally wrote the T-TEST procedure, which was 
-       subsequently re-written by John Darrington.
+* John Darrington wrote the graphical user interface, and the 
+T-TEST, ONEWAY, EXAMINE, RANK and  NPAR TESTS commands, implemented
+support for long variable names and made numerous revisions to other 
+modules.
 
-     * John Darrington wrote the T-TEST, ONEWAY, and EXAMINE
-       procedures, implemented support for long variable names and
-       made numerous revisions to other modules.
-
-     * Jason Stover contributed statistical and numerical
-       functionality, including lib/gslextras.  (Jason is also an
-       important contributor to libgsl used by PSPP.)
+* Jason Stover contributed statistical and numerical
+functionality, including lib/gslextras.  (Jason is also an
+important contributor to libgsl used by PSPP.)
diff --git a/glade.patch b/glade.patch
new file mode 100644 (file)
index 0000000..dc143a9
--- /dev/null
@@ -0,0 +1,62 @@
+This patch mitigates a bug in glade-2, which silently deletes stock_ids, which it
+thinks are not valid.   You may have to apply this patch after editing data-editor.glade
+with glade-2
+==============
+--- src/ui/gui/data-editor.glade,old   2006-12-23 17:30:32.000000000 +0900
++++ src/ui/gui/data-editor.glade       2006-12-23 17:30:36.000000000 +0900
+@@ -619,6 +619,7 @@
+                 <property name="visible">True</property>
+                 <property name="sensitive">False</property>
+                 <property name="tooltip" translatable="yes">Variables</property>
++                  <property name="stock_id">pspp-goto-variable</property>
+                 <property name="label" translatable="yes"></property>
+                 <property name="use_underline">True</property>
+                 <property name="visible_horizontal">True</property>
+@@ -678,6 +679,7 @@
+                 <property name="visible">True</property>
+                 <property name="sensitive">False</property>
+                 <property name="tooltip" translatable="yes">Insert Case</property>
++                  <property name="stock_id">pspp-insert-case</property>
+                 <property name="label" translatable="yes"></property>
+                 <property name="use_underline">True</property>
+                 <property name="visible_horizontal">True</property>
+@@ -696,6 +698,7 @@
+                 <property name="visible">True</property>
+                 <property name="sensitive">False</property>
+                 <property name="tooltip" translatable="yes">Insert Variable</property>
++                  <property name="stock_id">pspp-insert-variable</property>
+                 <property name="label" translatable="yes"></property>
+                 <property name="use_underline">True</property>
+                 <property name="visible_horizontal">True</property>
+@@ -726,6 +729,7 @@
+                 <property name="visible">True</property>
+                 <property name="sensitive">False</property>
+                 <property name="tooltip" translatable="yes">Split File</property>
++                  <property name="stock_id">pspp-split-file</property>
+                 <property name="label" translatable="yes"></property>
+                 <property name="use_underline">True</property>
+                 <property name="visible_horizontal">True</property>
+@@ -743,6 +747,7 @@
+                 <property name="visible">True</property>
+                 <property name="sensitive">False</property>
+                 <property name="tooltip" translatable="yes">Weight Cases</property>
++                  <property name="stock_id">pspp-weight-cases</property>
+                 <property name="label" translatable="yes"></property>
+                 <property name="use_underline">True</property>
+                 <property name="visible_horizontal">True</property>
+@@ -760,6 +765,7 @@
+                 <property name="visible">True</property>
+                 <property name="sensitive">False</property>
+                 <property name="tooltip" translatable="yes">Select Cases</property>
++                  <property name="stock_id">pspp-select-cases</property>
+                 <property name="label" translatable="yes"></property>
+                 <property name="use_underline">True</property>
+                 <property name="visible_horizontal">True</property>
+@@ -789,6 +795,7 @@
+               <widget class="GtkToggleToolButton" id="togglebutton-value-labels">
+                 <property name="visible">True</property>
+                 <property name="tooltip" translatable="yes">Value Labels</property>
++                  <property name="stock_id">pspp-value-labels</property>
+                 <property name="label" translatable="yes"></property>
+                 <property name="use_underline">True</property>
+                 <property name="visible_horizontal">True</property>
index d3754d6c9875147c4adbc34c650f2f7e813afcae..97d07b4632ed972e009b94a965ec9900e1eb9b14 100644 (file)
@@ -22,6 +22,7 @@
 #include <float.h>
 #include <libpspp/misc.h>
 #include "minmax.h"
+#include <config.h>
 
 /* Values. */
 
index 305a7c214f1c60a14b1669ff4e98d462cdc83de6..f4a3c95ea4ae46bd9c5d3fd4bf1f33b927f2f419 100644 (file)
@@ -57,8 +57,9 @@ nodist_src_libpspp_libpspp_a_SOURCES = src/libpspp/version.c
 
 src/libpspp/version.c:
        @$(top_srcdir)/mkinstalldirs  src/libpspp
-       echo "#include <config.h>" > $@
-       echo "#include \"version.h\"" > $@
+       echo "/*        -*- mode: c; buffer-read-only: t -*-" > $@
+       echo "   Generated by src/libpspp/automake.mk --- Do not edit. */">> $@
+       echo "#include \"version.h\"" >> $@
        echo "const char bare_version[] = \"@VERSION@\";" >> $@
        echo "const char version[] = \"GNU @PACKAGE@ @VERSION@\";" >> $@
        echo "const char stat_version[] = \"GNU @PACKAGE@ @VERSION@ \
@@ -70,5 +71,7 @@ src/libpspp/version.c:
        echo "const char include_path[] =\
 \"./:~/.pspp/include:$(pkgdatadir)\";" >> $@
        echo "const char locale_dir[] = \"$(datadir)/locale\";" >> $@
-
+       echo "const char *const authors[] = {" >> $@
+       sed -e 's/^/  \"/' -e 's/$$/\",/' $(top_srcdir)/AUTHORS >> $@
+       echo "0 };" >> $@
 
index 3465874967c6bdb752a0b5c1ba0699f0e1999b4d..d2c0fe0a9ddbb49092f5f8ffaa89fa0f2dcc4a89 100644 (file)
@@ -44,4 +44,7 @@ extern const char include_path[];
 /* Locale directory. */
 extern const char locale_dir[];
 
+/* From the AUTHORS file */
+extern const char *const authors[];
+
 #endif /* !version_h */
diff --git a/src/ui/gui/about.c b/src/ui/gui/about.c
new file mode 100644 (file)
index 0000000..258e96d
--- /dev/null
@@ -0,0 +1,36 @@
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+
+#include <libpspp/version.h>
+#include "about.h"
+#include "helper.h"
+
+void
+about_new (GtkMenuItem *m, GtkWindow *parent)
+{
+  GladeXML *xml = glade_xml_new (PKGDATADIR "/psppire.glade", NULL, NULL);
+
+  GtkWidget *about =  get_widget_assert (xml, "aboutdialog1");
+
+  GdkPixbuf *pb =
+    gdk_pixbuf_new_from_file_at_size (PKGDATADIR "/pspplogo.png", 64, 64, 0);
+
+  gtk_about_dialog_set_logo (GTK_ABOUT_DIALOG(about), pb);
+
+
+  gtk_window_set_icon_from_file (GTK_WINDOW(about),
+                                PKGDATADIR "/psppicon.png", 0);
+
+
+  gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (about), authors);
+
+  gtk_window_set_transient_for (GTK_WINDOW(about), parent);
+
+  gtk_window_set_modal (GTK_WINDOW (about), TRUE);
+
+  gtk_window_set_keep_above (GTK_WINDOW (about), TRUE);
+
+
+  gtk_widget_show (about);
+}
+
diff --git a/src/ui/gui/about.h b/src/ui/gui/about.h
new file mode 100644 (file)
index 0000000..4065a80
--- /dev/null
@@ -0,0 +1,3 @@
+
+
+void about_new (GtkMenuItem *m, GtkWindow *parent);
index ac5f7ed96d4813ae32ccb4cdbbf56c97bcce3e50..e35af3654994e4f81bdfd05dac6de87a9972b13f 100644 (file)
@@ -28,6 +28,8 @@ src_ui_gui_psppiredir = $(pkgdatadir)
 
 dist_src_ui_gui_psppire_DATA = \
        $(top_srcdir)/src/ui/gui/psppire.glade \
+       $(top_srcdir)/src/ui/gui/syntax-editor.glade \
+       $(top_srcdir)/src/ui/gui/data-editor.glade \
        $(top_srcdir)/src/ui/gui/psppicon.png \
        $(top_srcdir)/src/ui/gui/pspplogo.png \
        $(top_srcdir)/src/ui/gui/icons/value-labels.png \
@@ -40,17 +42,19 @@ dist_src_ui_gui_psppire_DATA = \
 
 
 src_ui_gui_psppire_SOURCES = \
+       src/ui/gui/about.c \
+       src/ui/gui/about.h \
        src/ui/gui/customentry.c \
        src/ui/gui/customentry.h \
        src/ui/gui/data-sheet.c \
        src/ui/gui/data-sheet.h \
+       src/ui/gui/data-editor.c \
+       src/ui/gui/data-editor.h \
        src/ui/gui/flexifile-factory.h \
        src/ui/gui/flexifile-factory.c \
        src/ui/gui/message-dialog.c \
        src/ui/gui/message-dialog.h \
        src/ui/gui/psppire.c \
-       src/ui/gui/menu-actions.c \
-       src/ui/gui/menu-actions.h \
        src/ui/gui/helper.c \
        src/ui/gui/helper.h \
        src/ui/gui/missing-val-dialog.c \
@@ -76,4 +80,5 @@ src_ui_gui_psppire_SOURCES = \
        src/ui/gui/var-sheet.c \
        src/ui/gui/var-sheet.h \
        src/ui/gui/var-type-dialog.c \
-       src/ui/gui/var-type-dialog.h
+       src/ui/gui/var-type-dialog.h \
+       src/ui/gui/window-manager.c
diff --git a/src/ui/gui/data-editor.c b/src/ui/gui/data-editor.c
new file mode 100644 (file)
index 0000000..b35f3f1
--- /dev/null
@@ -0,0 +1,483 @@
+/*
+    PSPPIRE --- A Graphical User Interface for PSPP
+    Copyright (C) 2006  Free Software Foundation
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+    02110-1301, USA. */
+
+#include <config.h>
+#include <stdlib.h>
+#include <gettext.h>
+
+#include <glade/glade.h>
+#include <gtk/gtk.h>
+
+
+#include <gtksheet/gtksheet.h>
+
+#include "helper.h"
+#include "about.h"
+
+#define _(msgid) gettext (msgid)
+#define N_(msgid) msgid
+
+#include "data-editor.h"
+#include "syntax-editor.h"
+#include "window-manager.h"
+
+#include "psppire-data-store.h"
+#include "psppire-var-store.h"
+
+/* Switch between the VAR SHEET and the DATA SHEET */
+enum {PAGE_DATA_SHEET = 0, PAGE_VAR_SHEET};
+
+static gboolean click2column (GtkWidget *w, gint col, gpointer data);
+
+static gboolean click2row (GtkWidget *w, gint row, gpointer data);
+
+
+static void select_sheet (struct data_editor *de, guint page_num);
+
+
+static void data_var_select (GtkNotebook *notebook,
+                           GtkNotebookPage *page,
+                           guint page_num,
+                           gpointer user_data);
+
+static void status_bar_activate (GtkCheckMenuItem *, gpointer);
+
+static void grid_lines_activate (GtkCheckMenuItem *, gpointer);
+
+static void data_sheet_activate (GtkCheckMenuItem *, gpointer);
+
+static void variable_sheet_activate (GtkCheckMenuItem *, gpointer );
+
+static void fonts_activate (GtkMenuItem *, gpointer);
+
+static void value_labels_activate (GtkCheckMenuItem *, gpointer);
+static void value_labels_toggled (GtkToggleToolButton *, gpointer);
+
+
+static void file_quit (GtkCheckMenuItem *, gpointer );
+
+
+/*
+  Create a new data editor.
+*/
+struct data_editor *
+new_data_editor (void)
+{
+  struct data_editor *de ;
+  struct editor_window *e;
+
+  de = g_malloc (sizeof (*de));
+
+  e = (struct editor_window *) de;
+
+  de->xml = glade_xml_new (PKGDATADIR "/data-editor.glade", NULL, NULL);
+
+  e->window = get_widget_assert (de->xml, "data_editor");
+
+  g_signal_connect (get_widget_assert (de->xml,"file_new_data"),
+                   "activate",
+                   G_CALLBACK (new_data_window),
+                   e->window);
+
+  g_signal_connect (get_widget_assert (de->xml,"file_open_data"),
+                   "activate",
+                   G_CALLBACK (open_data_window),
+                   e->window);
+
+  g_signal_connect (get_widget_assert (de->xml,"file_new_syntax"),
+                   "activate",
+                   G_CALLBACK (new_syntax_window),
+                   e->window);
+
+  g_signal_connect (get_widget_assert (de->xml,"file_open_syntax"),
+                   "activate",
+                   G_CALLBACK (open_syntax_window),
+                   e->window);
+
+  g_signal_connect (get_widget_assert (de->xml,"help_about"),
+                   "activate",
+                   G_CALLBACK (about_new),
+                   e->window);
+
+
+  g_signal_connect (get_widget_assert (de->xml,"data_sheet"),
+                   "double-click-column",
+                   G_CALLBACK (click2column),
+                   de);
+
+
+  g_signal_connect (get_widget_assert (de->xml, "variable_sheet"),
+                   "double-click-row",
+                   GTK_SIGNAL_FUNC (click2row),
+                   de);
+
+
+  g_signal_connect (get_widget_assert (de->xml, "notebook"),
+                   "switch-page",
+                   G_CALLBACK (data_var_select), de);
+
+
+
+  g_signal_connect (get_widget_assert (de->xml, "view_statusbar"),
+                   "activate",
+                   G_CALLBACK (status_bar_activate), de);
+
+
+  g_signal_connect (get_widget_assert (de->xml, "view_gridlines"),
+                   "activate",
+                   G_CALLBACK (grid_lines_activate), de);
+
+
+
+  g_signal_connect (get_widget_assert (de->xml, "view_data"),
+                   "activate",
+                   G_CALLBACK (data_sheet_activate), de);
+
+  g_signal_connect (get_widget_assert (de->xml, "view_variables"),
+                   "activate",
+                   G_CALLBACK (variable_sheet_activate), de);
+
+
+
+  g_signal_connect (get_widget_assert (de->xml, "view_fonts"),
+                   "activate",
+                   G_CALLBACK (fonts_activate), de);
+
+
+
+  g_signal_connect (get_widget_assert (de->xml, "view_valuelabels"),
+                   "activate",
+                   G_CALLBACK (value_labels_activate), de);
+
+
+  g_signal_connect (get_widget_assert (de->xml, "togglebutton-value-labels"),
+                   "toggled",
+                   G_CALLBACK (value_labels_toggled), de);
+
+
+  g_signal_connect (get_widget_assert (de->xml, "file_quit"),
+                   "activate",
+                   G_CALLBACK (file_quit), de);
+
+
+  select_sheet (de, PAGE_DATA_SHEET);
+
+  return de;
+}
+
+
+/* Callback which occurs when the var sheet's row title
+   button is double clicked */
+static gboolean
+click2row (GtkWidget *w, gint row, gpointer data)
+{
+  struct data_editor *de = data;
+
+  gint current_row, current_column;
+
+  GtkWidget *data_sheet  = get_widget_assert (de->xml, "data_sheet");
+
+  data_editor_select_sheet (de, PAGE_DATA_SHEET);
+
+  gtk_sheet_get_active_cell (GTK_SHEET(data_sheet),
+                            &current_row, &current_column);
+
+  gtk_sheet_set_active_cell (GTK_SHEET(data_sheet), current_row, row);
+
+  return FALSE;
+}
+
+
+/* Callback which occurs when the data sheet's column title
+   is double clicked */
+static gboolean
+click2column (GtkWidget *w, gint col, gpointer data)
+{
+  struct data_editor *de = data;
+
+  gint current_row, current_column;
+
+  GtkWidget *var_sheet  = get_widget_assert (de->xml, "variable_sheet");
+
+  data_editor_select_sheet (de, PAGE_VAR_SHEET);
+
+  gtk_sheet_get_active_cell (GTK_SHEET(var_sheet),
+                            &current_row, &current_column);
+
+  gtk_sheet_set_active_cell (GTK_SHEET(var_sheet), col, current_column);
+
+  return FALSE;
+}
+
+
+
+
+void
+new_data_window (GtkMenuItem *menuitem, gpointer parent)
+{
+  window_create (WINDOW_DATA, NULL);
+}
+
+
+static void
+select_sheet (struct data_editor *de, guint page_num)
+{
+  GtkWidget *insert_variable = get_widget_assert (de->xml, "insert-variable");
+  GtkWidget *insert_cases = get_widget_assert (de->xml, "insert-cases");
+
+  GtkWidget *view_data = get_widget_assert (de->xml, "view_data");
+  GtkWidget *view_variables = get_widget_assert (de->xml, "view_variables");
+
+  switch (page_num)
+    {
+    case PAGE_VAR_SHEET:
+      gtk_widget_hide (view_variables);
+      gtk_widget_show (view_data);
+      gtk_widget_set_sensitive (insert_variable, TRUE);
+      gtk_widget_set_sensitive (insert_cases, FALSE);
+      break;
+    case PAGE_DATA_SHEET:
+      gtk_widget_show (view_variables);
+      gtk_widget_hide (view_data);
+      gtk_widget_set_sensitive (insert_variable, FALSE);
+      gtk_widget_set_sensitive (insert_cases, TRUE);
+      break;
+    default:
+      g_assert_not_reached ();
+      break;
+    }
+}
+
+
+static void
+data_var_select (GtkNotebook *notebook,
+               GtkNotebookPage *page,
+               guint page_num,
+               gpointer user_data)
+{
+  struct data_editor *de = user_data;
+
+  select_sheet (de, page_num);
+}
+
+
+
+
+void
+data_editor_select_sheet (struct data_editor *de, gint page)
+{
+  gtk_notebook_set_current_page
+   (
+    GTK_NOTEBOOK (get_widget_assert (de->xml,"notebook")), page
+    );
+}
+
+
+void
+open_data_window (GtkMenuItem *menuitem, gpointer parent)
+{
+  bool finished = FALSE;
+
+  GtkWidget *dialog;
+
+  GtkFileFilter *filter ;
+
+  dialog = gtk_file_chooser_dialog_new (_("Open"),
+                                       GTK_WINDOW (parent),
+                                       GTK_FILE_CHOOSER_ACTION_OPEN,
+                                       GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+                                       GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
+                                       NULL);
+
+  filter = gtk_file_filter_new ();
+  gtk_file_filter_set_name (filter, _("System Files (*.sav)"));
+  gtk_file_filter_add_pattern (filter, "*.sav");
+  gtk_file_filter_add_pattern (filter, "*.SAV");
+  gtk_file_chooser_add_filter (GTK_FILE_CHOOSER(dialog), filter);
+
+  filter = gtk_file_filter_new ();
+  gtk_file_filter_set_name (filter, _("Portable Files (*.por) "));
+  gtk_file_filter_add_pattern (filter, "*.por");
+  gtk_file_filter_add_pattern (filter, "*.POR");
+  gtk_file_chooser_add_filter (GTK_FILE_CHOOSER(dialog), filter);
+
+  filter = gtk_file_filter_new ();
+  gtk_file_filter_set_name (filter, _("All Files"));
+  gtk_file_filter_add_pattern (filter, "*");
+  gtk_file_chooser_add_filter (GTK_FILE_CHOOSER(dialog), filter);
+
+  do {
+
+    if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
+      {
+       gchar *file_name =
+         gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
+
+       g_free (file_name);
+      }
+    else
+      finished = TRUE;
+
+  } while ( ! finished ) ;
+
+  gtk_widget_destroy (dialog);
+}
+
+
+
+
+static void
+status_bar_activate (GtkCheckMenuItem *menuitem, gpointer data)
+{
+  struct data_editor *de = data;
+  GtkWidget *statusbar = get_widget_assert (de->xml, "statusbar");
+
+  if ( gtk_check_menu_item_get_active (menuitem) )
+    gtk_widget_show (statusbar);
+  else
+    gtk_widget_hide (statusbar);
+}
+
+
+
+
+static void
+grid_lines_activate (GtkCheckMenuItem *menuitem, gpointer data)
+{
+  struct data_editor *de = data;
+  const bool grid_visible = gtk_check_menu_item_get_active (menuitem);
+
+  gtk_sheet_show_grid (GTK_SHEET (get_widget_assert (de->xml,
+                                                    "variable_sheet")),
+                      grid_visible);
+
+  gtk_sheet_show_grid (GTK_SHEET (get_widget_assert (de->xml, "data_sheet")),
+                      grid_visible);
+}
+
+
+
+static void
+data_sheet_activate (GtkCheckMenuItem *menuitem, gpointer data)
+{
+  struct data_editor *de = data;
+
+  data_editor_select_sheet (de, PAGE_DATA_SHEET);
+}
+
+
+static void
+variable_sheet_activate (GtkCheckMenuItem *menuitem, gpointer data)
+{
+  struct data_editor *de = data;
+
+  data_editor_select_sheet (de, PAGE_VAR_SHEET);
+}
+
+
+static void
+fonts_activate (GtkMenuItem *menuitem, gpointer data)
+{
+  struct data_editor *de = data;
+  GtkWidget *dialog =
+    gtk_font_selection_dialog_new (_("Font Selection"));
+
+  gtk_window_set_transient_for (GTK_WINDOW (dialog),
+                               GTK_WINDOW (get_widget_assert (de->xml,
+                                                              "data_editor")));
+  if ( GTK_RESPONSE_OK == gtk_dialog_run (GTK_DIALOG (dialog)) )
+    {
+      GtkSheet *data_sheet =
+       GTK_SHEET(get_widget_assert (de->xml, "data_sheet"));
+
+      GtkSheet *var_sheet =
+       GTK_SHEET(get_widget_assert (de->xml, "variable_sheet"));
+
+      PsppireDataStore *ds = PSPPIRE_DATA_STORE (gtk_sheet_get_model (data_sheet));
+      PsppireVarStore *vs = PSPPIRE_VAR_STORE (gtk_sheet_get_model (var_sheet));
+
+      const gchar *font = gtk_font_selection_dialog_get_font_name
+       (GTK_FONT_SELECTION_DIALOG (dialog));
+
+      PangoFontDescription* font_desc =
+       pango_font_description_from_string (font);
+
+      psppire_var_store_set_font (vs, font_desc);
+      psppire_data_store_set_font (ds, font_desc);
+    }
+
+  gtk_widget_hide (dialog);
+}
+
+
+/* The next two callbacks are mutually co-operative */
+
+/* Callback for the value labels menu item */
+static void
+value_labels_activate (GtkCheckMenuItem *menuitem, gpointer data)
+{
+  struct data_editor *de = data;
+
+  GtkSheet *data_sheet = GTK_SHEET (get_widget_assert (de->xml, "data_sheet"));
+
+  GtkToggleToolButton *tb =
+    GTK_TOGGLE_TOOL_BUTTON (get_widget_assert (de->xml,
+                                              "togglebutton-value-labels"));
+
+  PsppireDataStore *ds = PSPPIRE_DATA_STORE (gtk_sheet_get_model (data_sheet));
+
+  gboolean show_value_labels = gtk_check_menu_item_get_active (menuitem);
+
+  gtk_toggle_tool_button_set_active (tb, show_value_labels);
+
+  psppire_data_store_show_labels (ds, show_value_labels);
+}
+
+
+/* Callback for the value labels tooglebutton */
+static void
+value_labels_toggled (GtkToggleToolButton *toggle_tool_button,
+                     gpointer data)
+{
+  struct data_editor *de = data;
+
+  GtkSheet *data_sheet = GTK_SHEET (get_widget_assert (de->xml, "data_sheet"));
+
+  GtkCheckMenuItem *item =
+    GTK_CHECK_MENU_ITEM (get_widget_assert (de->xml, "view_valuelabels"));
+
+  PsppireDataStore *ds = PSPPIRE_DATA_STORE (gtk_sheet_get_model (data_sheet));
+
+  gboolean show_value_labels =
+    gtk_toggle_tool_button_get_active (toggle_tool_button);
+
+  gtk_check_menu_item_set_active (item, show_value_labels);
+
+  psppire_data_store_show_labels (ds, show_value_labels);
+}
+
+
+static void
+file_quit (GtkCheckMenuItem *menuitem, gpointer data)
+{
+  /* FIXME: Need to be more intelligent here.
+     Give the user the opportunity to save any unsaved data.
+  */
+  gtk_main_quit ();
+}
diff --git a/src/ui/gui/data-editor.glade b/src/ui/gui/data-editor.glade
new file mode 100644 (file)
index 0000000..6962555
--- /dev/null
@@ -0,0 +1,2939 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkWindow" id="data_editor">
+  <property name="title">Psppire Data Editor</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="default_width">975</property>
+  <property name="default_height">480</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+
+  <child>
+    <widget class="GtkVBox" id="vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+       <widget class="GtkMenuBar" id="menubar1">
+         <property name="visible">True</property>
+         <property name="pack_direction">GTK_PACK_DIRECTION_LTR</property>
+         <property name="child_pack_direction">GTK_PACK_DIRECTION_LTR</property>
+
+         <child>
+           <widget class="GtkMenuItem" id="menuitem1">
+             <property name="visible">True</property>
+             <property name="label" translatable="yes">_File</property>
+             <property name="use_underline">True</property>
+
+             <child>
+               <widget class="GtkMenu" id="menuitem1_menu">
+
+                 <child>
+                   <widget class="GtkImageMenuItem" id="new1">
+                     <property name="visible">True</property>
+                     <property name="label">gtk-new</property>
+                     <property name="use_stock">True</property>
+
+                     <child>
+                       <widget class="GtkMenu" id="new1_menu">
+
+                         <child>
+                           <widget class="GtkMenuItem" id="file_new_syntax">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">_Syntax</property>
+                             <property name="use_underline">True</property>
+                           </widget>
+                         </child>
+
+                         <child>
+                           <widget class="GtkMenuItem" id="file_new_data">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">_Data</property>
+                             <property name="use_underline">True</property>
+                           </widget>
+                         </child>
+                       </widget>
+                     </child>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkImageMenuItem" id="open1">
+                     <property name="visible">True</property>
+                     <property name="label">gtk-open</property>
+                     <property name="use_stock">True</property>
+
+                     <child>
+                       <widget class="GtkMenu" id="open1_menu">
+
+                         <child>
+                           <widget class="GtkMenuItem" id="file_open_syntax">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">_Syntax</property>
+                             <property name="use_underline">True</property>
+                           </widget>
+                         </child>
+
+                         <child>
+                           <widget class="GtkMenuItem" id="file_open_data">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">_Data</property>
+                             <property name="use_underline">True</property>
+                           </widget>
+                         </child>
+                       </widget>
+                     </child>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkImageMenuItem" id="save1">
+                     <property name="visible">True</property>
+                     <property name="sensitive">False</property>
+                     <property name="label">gtk-save</property>
+                     <property name="use_stock">True</property>
+                     <signal name="activate" handler="on_save1_activate" last_modification_time="Tue, 23 Mar 2004 10:22:51 GMT"/>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkImageMenuItem" id="save_as1">
+                     <property name="visible">True</property>
+                     <property name="sensitive">False</property>
+                     <property name="label">gtk-save-as</property>
+                     <property name="use_stock">True</property>
+                     <signal name="activate" handler="on_save_as1_activate" last_modification_time="Tue, 23 Mar 2004 10:22:51 GMT"/>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkSeparatorMenuItem" id="separatormenuitem1">
+                     <property name="visible">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkImageMenuItem" id="file_quit">
+                     <property name="visible">True</property>
+                     <property name="label">gtk-quit</property>
+                     <property name="use_stock">True</property>
+                     <signal name="activate" handler="on_quit1_activate" last_modification_time="Tue, 23 Mar 2004 10:22:51 GMT"/>
+                   </widget>
+                 </child>
+               </widget>
+             </child>
+           </widget>
+         </child>
+
+         <child>
+           <widget class="GtkMenuItem" id="menuitem2">
+             <property name="visible">True</property>
+             <property name="sensitive">False</property>
+             <property name="label" translatable="yes">_Edit</property>
+             <property name="use_underline">True</property>
+
+             <child>
+               <widget class="GtkMenu" id="menuitem2_menu">
+
+                 <child>
+                   <widget class="GtkImageMenuItem" id="cut1">
+                     <property name="visible">True</property>
+                     <property name="sensitive">False</property>
+                     <property name="label">gtk-cut</property>
+                     <property name="use_stock">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkImageMenuItem" id="copy1">
+                     <property name="visible">True</property>
+                     <property name="sensitive">False</property>
+                     <property name="label">gtk-copy</property>
+                     <property name="use_stock">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkImageMenuItem" id="paste1">
+                     <property name="visible">True</property>
+                     <property name="sensitive">False</property>
+                     <property name="label">gtk-paste</property>
+                     <property name="use_stock">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkMenuItem" id="paste_variables1">
+                     <property name="visible">True</property>
+                     <property name="sensitive">False</property>
+                     <property name="label" translatable="yes">Paste _Variables</property>
+                     <property name="use_underline">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkMenuItem" id="clear1">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">Cl_ear</property>
+                     <property name="use_underline">True</property>
+                     <signal name="activate" handler="on_clear_activate" last_modification_time="Sun, 02 Jul 2006 07:00:12 GMT"/>
+                     <accelerator key="Delete" modifiers="0" signal="activate"/>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkSeparatorMenuItem" id="separator6">
+                     <property name="visible">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkImageMenuItem" id="find1">
+                     <property name="visible">True</property>
+                     <property name="sensitive">False</property>
+                     <property name="label" translatable="yes">_Find</property>
+                     <property name="use_underline">True</property>
+
+                     <child internal-child="image">
+                       <widget class="GtkImage" id="image39">
+                         <property name="visible">True</property>
+                         <property name="stock">gtk-find</property>
+                         <property name="icon_size">1</property>
+                         <property name="xalign">0.5</property>
+                         <property name="yalign">0.5</property>
+                         <property name="xpad">0</property>
+                         <property name="ypad">0</property>
+                       </widget>
+                     </child>
+                   </widget>
+                 </child>
+               </widget>
+             </child>
+           </widget>
+         </child>
+
+         <child>
+           <widget class="GtkMenuItem" id="menuitem3">
+             <property name="visible">True</property>
+             <property name="label" translatable="yes">_View</property>
+             <property name="use_underline">True</property>
+
+             <child>
+               <widget class="GtkMenu" id="menuitem3_menu">
+
+                 <child>
+                   <widget class="GtkCheckMenuItem" id="view_statusbar">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">Status Bar</property>
+                     <property name="use_underline">True</property>
+                     <property name="active">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkMenuItem" id="toolbars">
+                     <property name="label" translatable="yes">Toolbars</property>
+                     <property name="use_underline">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkSeparatorMenuItem" id="separator1">
+                     <property name="visible">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkMenuItem" id="view_fonts">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">Fonts</property>
+                     <property name="use_underline">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkCheckMenuItem" id="view_gridlines">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">Grid Lines</property>
+                     <property name="use_underline">True</property>
+                     <property name="active">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkCheckMenuItem" id="view_valuelabels">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">Value Labels</property>
+                     <property name="use_underline">True</property>
+                     <property name="active">False</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkSeparatorMenuItem" id="separator3">
+                     <property name="visible">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkMenuItem" id="view_data">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">Data</property>
+                     <property name="use_underline">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkMenuItem" id="view_variables">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">Variables</property>
+                     <property name="use_underline">True</property>
+                   </widget>
+                 </child>
+               </widget>
+             </child>
+           </widget>
+         </child>
+
+         <child>
+           <widget class="GtkMenuItem" id="menuitem4">
+             <property name="visible">True</property>
+             <property name="sensitive">False</property>
+             <property name="label" translatable="yes">_Data</property>
+             <property name="use_underline">True</property>
+
+             <child>
+               <widget class="GtkMenu" id="menuitem4_menu">
+
+                 <child>
+                   <widget class="GtkMenuItem" id="insert-variable">
+                     <property name="visible">True</property>
+                     <property name="sensitive">False</property>
+                     <property name="label" translatable="yes">Insert Variable</property>
+                     <property name="use_underline">True</property>
+                     <signal name="activate" handler="on_insert_variable"/>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkMenuItem" id="insert-cases">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">Insert Cases</property>
+                     <property name="use_underline">True</property>
+                     <signal name="activate" handler="on_insert_cases" last_modification_time="Sat, 01 Jul 2006 08:40:06 GMT"/>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkImageMenuItem" id="go_to_case">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">Go To Case</property>
+                     <property name="use_underline">True</property>
+                     <signal name="activate" handler="on_go_to_case_activate" last_modification_time="Mon, 19 Jun 2006 10:29:37 GMT"/>
+
+                     <child internal-child="image">
+                       <widget class="GtkImage" id="image40">
+                         <property name="visible">True</property>
+                         <property name="stock">gtk-jump-to</property>
+                         <property name="icon_size">1</property>
+                         <property name="xalign">0.5</property>
+                         <property name="yalign">0.5</property>
+                         <property name="xpad">0</property>
+                         <property name="ypad">0</property>
+                       </widget>
+                     </child>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkSeparatorMenuItem" id="separator4">
+                     <property name="visible">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkMenuItem" id="sort_cases">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">Sort Cases</property>
+                     <property name="use_underline">True</property>
+                     <signal name="activate" handler="on_sort_cases_activate" last_modification_time="Tue, 20 Jun 2006 10:27:11 GMT"/>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkMenuItem" id="transpose1">
+                     <property name="visible">True</property>
+                     <property name="sensitive">False</property>
+                     <property name="label" translatable="yes">Transpose</property>
+                     <property name="use_underline">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkMenuItem" id="restructure1">
+                     <property name="visible">True</property>
+                     <property name="sensitive">False</property>
+                     <property name="label" translatable="yes">Restructure</property>
+                     <property name="use_underline">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkMenuItem" id="merge_files1">
+                     <property name="visible">True</property>
+                     <property name="sensitive">False</property>
+                     <property name="label" translatable="yes">Merge Files</property>
+                     <property name="use_underline">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkMenuItem" id="aggregate1">
+                     <property name="visible">True</property>
+                     <property name="sensitive">False</property>
+                     <property name="label" translatable="yes">Aggregate</property>
+                     <property name="use_underline">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkSeparatorMenuItem" id="separator5">
+                     <property name="visible">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkMenuItem" id="split_file1">
+                     <property name="visible">True</property>
+                     <property name="sensitive">False</property>
+                     <property name="label" translatable="yes">Split File</property>
+                     <property name="use_underline">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkMenuItem" id="select_cases1">
+                     <property name="visible">True</property>
+                     <property name="sensitive">False</property>
+                     <property name="label" translatable="yes">Select Cases</property>
+                     <property name="use_underline">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkMenuItem" id="weight_cases1">
+                     <property name="visible">True</property>
+                     <property name="sensitive">False</property>
+                     <property name="label" translatable="yes">Weight Cases</property>
+                     <property name="use_underline">True</property>
+                   </widget>
+                 </child>
+               </widget>
+             </child>
+           </widget>
+         </child>
+
+         <child>
+           <widget class="GtkMenuItem" id="menuitem5">
+             <property name="visible">True</property>
+             <property name="label" translatable="yes">_Help</property>
+             <property name="use_underline">True</property>
+
+             <child>
+               <widget class="GtkMenu" id="menuitem5_menu">
+
+                 <child>
+                   <widget class="GtkMenuItem" id="help_about">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">_About</property>
+                     <property name="use_underline">True</property>
+                     <signal name="activate" handler="on_about1_activate" last_modification_time="Fri, 25 Nov 2005 11:54:43 GMT"/>
+                   </widget>
+                 </child>
+               </widget>
+             </child>
+           </widget>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">False</property>
+         <property name="fill">False</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkHandleBox" id="handlebox1">
+         <property name="visible">True</property>
+         <property name="shadow_type">GTK_SHADOW_OUT</property>
+         <property name="handle_position">GTK_POS_LEFT</property>
+         <property name="snap_edge">GTK_POS_TOP</property>
+
+         <child>
+           <widget class="GtkToolbar" id="toolbar1">
+             <property name="visible">True</property>
+             <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
+             <property name="toolbar_style">GTK_TOOLBAR_ICONS</property>
+             <property name="tooltips">True</property>
+             <property name="show_arrow">True</property>
+
+             <child>
+               <widget class="GtkToolButton" id="buttonOpen">
+                 <property name="visible">True</property>
+                 <property name="sensitive">False</property>
+                 <property name="tooltip" translatable="yes">Open</property>
+                 <property name="stock_id">gtk-open</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkToolButton" id="buttonSave">
+                 <property name="visible">True</property>
+                 <property name="sensitive">False</property>
+                 <property name="tooltip" translatable="yes">Save</property>
+                 <property name="stock_id">gtk-save</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
+                 <signal name="clicked" handler="on_save1_activate" last_modification_time="Wed, 02 Nov 2005 13:05:43 GMT"/>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkToolButton" id="buttonPrint">
+                 <property name="visible">True</property>
+                 <property name="sensitive">False</property>
+                 <property name="tooltip" translatable="yes">Print</property>
+                 <property name="stock_id">gtk-print</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkSeparatorToolItem" id="separatortoolitem1">
+                 <property name="visible">True</property>
+                 <property name="draw">True</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">False</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkToolButton" id="toolbutton1">
+                 <property name="visible">True</property>
+                 <property name="sensitive">False</property>
+                 <property name="tooltip" translatable="yes">Undo</property>
+                 <property name="stock_id">gtk-undo</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkToolButton" id="toolbutton2">
+                 <property name="visible">True</property>
+                 <property name="sensitive">False</property>
+                 <property name="tooltip" translatable="yes">Redo</property>
+                 <property name="stock_id">gtk-redo</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkSeparatorToolItem" id="separatortoolitem2">
+                 <property name="visible">True</property>
+                 <property name="draw">True</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">False</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkToolButton" id="buttonGotoCase">
+                 <property name="visible">True</property>
+                 <property name="sensitive">False</property>
+                 <property name="tooltip" translatable="yes">Go To Case</property>
+                 <property name="stock_id">gtk-jump-to</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
+                 <signal name="clicked" handler="on_go_to_case_activate" last_modification_time="Mon, 19 Jun 2006 11:41:44 GMT"/>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkToolButton" id="variables">
+                 <property name="visible">True</property>
+                 <property name="sensitive">False</property>
+                 <property name="tooltip" translatable="yes">Variables</property>
+                  <property name="stock_id">pspp-goto-variable</property>
+                 <property name="label" translatable="yes"></property>
+                 <property name="use_underline">True</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkSeparatorToolItem" id="separatortoolitem5">
+                 <property name="visible">True</property>
+                 <property name="draw">True</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">False</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkToolButton" id="toolbutton3">
+                 <property name="visible">True</property>
+                 <property name="sensitive">False</property>
+                 <property name="tooltip" translatable="yes">Find</property>
+                 <property name="stock_id">gtk-find</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkSeparatorToolItem" id="separatortoolitem4">
+                 <property name="visible">True</property>
+                 <property name="draw">True</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">False</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkToolButton" id="insert_case">
+                 <property name="visible">True</property>
+                 <property name="sensitive">False</property>
+                 <property name="tooltip" translatable="yes">Insert Case</property>
+                  <property name="stock_id">pspp-insert-case</property>
+                 <property name="label" translatable="yes"></property>
+                 <property name="use_underline">True</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
+                 <signal name="clicked" handler="on_insert_case_clicked" last_modification_time="Sat, 01 Jul 2006 08:41:07 GMT"/>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkToolButton" id="insert_variable">
+                 <property name="visible">True</property>
+                 <property name="sensitive">False</property>
+                 <property name="tooltip" translatable="yes">Insert Variable</property>
+                  <property name="stock_id">pspp-insert-variable</property>
+                 <property name="label" translatable="yes"></property>
+                 <property name="use_underline">True</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkSeparatorToolItem" id="separatortoolitem6">
+                 <property name="visible">True</property>
+                 <property name="draw">True</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">False</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkToolButton" id="toolbutton8">
+                 <property name="visible">True</property>
+                 <property name="sensitive">False</property>
+                 <property name="tooltip" translatable="yes">Split File</property>
+                  <property name="stock_id">pspp-split-file</property>
+                 <property name="label" translatable="yes"></property>
+                 <property name="use_underline">True</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkToolButton" id="toolbutton9">
+                 <property name="visible">True</property>
+                 <property name="sensitive">False</property>
+                 <property name="tooltip" translatable="yes">Weight Cases</property>
+                  <property name="stock_id">pspp-weight-cases</property>
+                 <property name="label" translatable="yes"></property>
+                 <property name="use_underline">True</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkToolButton" id="toolbutton10">
+                 <property name="visible">True</property>
+                 <property name="sensitive">False</property>
+                 <property name="tooltip" translatable="yes">Select Cases</property>
+                  <property name="stock_id">pspp-select-cases</property>
+                 <property name="label" translatable="yes"></property>
+                 <property name="use_underline">True</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkSeparatorToolItem" id="separatortoolitem7">
+                 <property name="visible">True</property>
+                 <property name="draw">True</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">False</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkToggleToolButton" id="togglebutton-value-labels">
+                 <property name="visible">True</property>
+                 <property name="tooltip" translatable="yes">Value Labels</property>
+                  <property name="stock_id">pspp-value-labels</property>
+                 <property name="label" translatable="yes"></property>
+                 <property name="use_underline">True</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
+                 <property name="active">False</property>
+                 <signal name="toggled" handler="on_togglebutton_value_labels_toggled" last_modification_time="Mon, 19 Jun 2006 13:09:37 GMT"/>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkToolButton" id="toolbutton12">
+                 <property name="visible">True</property>
+                 <property name="sensitive">False</property>
+                 <property name="tooltip" translatable="yes">Use Sets</property>
+                 <property name="label" translatable="yes"></property>
+                 <property name="use_underline">True</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
+               </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
+             </child>
+           </widget>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">False</property>
+         <property name="fill">False</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkNotebook" id="notebook">
+         <property name="visible">True</property>
+         <property name="can_focus">True</property>
+         <property name="show_tabs">True</property>
+         <property name="show_border">True</property>
+         <property name="tab_pos">GTK_POS_BOTTOM</property>
+         <property name="scrollable">True</property>
+         <property name="enable_popup">True</property>
+
+         <child>
+           <widget class="GtkVBox" id="vbox3">
+             <property name="visible">True</property>
+             <property name="homogeneous">False</property>
+             <property name="spacing">0</property>
+
+             <child>
+               <widget class="GtkTable" id="table2">
+                 <property name="visible">True</property>
+                 <property name="n_rows">1</property>
+                 <property name="n_columns">2</property>
+                 <property name="homogeneous">False</property>
+                 <property name="row_spacing">0</property>
+                 <property name="column_spacing">0</property>
+
+                 <child>
+                   <widget class="GtkEntry" id="entry4">
+                     <property name="visible">True</property>
+                     <property name="can_focus">True</property>
+                     <property name="editable">True</property>
+                     <property name="visibility">True</property>
+                     <property name="max_length">0</property>
+                     <property name="text" translatable="yes"></property>
+                     <property name="has_frame">True</property>
+                     <property name="invisible_char">*</property>
+                     <property name="activates_default">False</property>
+                   </widget>
+                   <packing>
+                     <property name="left_attach">1</property>
+                     <property name="right_attach">2</property>
+                     <property name="top_attach">0</property>
+                     <property name="bottom_attach">1</property>
+                     <property name="y_options"></property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkEntry" id="cell_ref_entry">
+                     <property name="visible">True</property>
+                     <property name="sensitive">False</property>
+                     <property name="editable">False</property>
+                     <property name="visibility">True</property>
+                     <property name="max_length">0</property>
+                     <property name="text" translatable="yes"></property>
+                     <property name="has_frame">True</property>
+                     <property name="invisible_char">*</property>
+                     <property name="activates_default">False</property>
+                     <property name="width_chars">25</property>
+                   </widget>
+                   <packing>
+                     <property name="left_attach">0</property>
+                     <property name="right_attach">1</property>
+                     <property name="top_attach">0</property>
+                     <property name="bottom_attach">1</property>
+                     <property name="x_options">fill</property>
+                     <property name="y_options"></property>
+                   </packing>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">False</property>
+                 <property name="fill">False</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkScrolledWindow" id="scrolledwindow1">
+                 <property name="visible">True</property>
+                 <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
+                 <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+                 <property name="shadow_type">GTK_SHADOW_NONE</property>
+                 <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+                 <child>
+                   <widget class="Custom" id="data_sheet">
+                     <property name="visible">True</property>
+                     <property name="creation_function">psppire_data_sheet_create</property>
+                     <property name="int1">0</property>
+                     <property name="int2">0</property>
+                     <property name="last_modification_time">Sun, 30 Oct 2005 08:53:47 GMT</property>
+                   </widget>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">True</property>
+                 <property name="fill">True</property>
+               </packing>
+             </child>
+           </widget>
+           <packing>
+             <property name="tab_expand">False</property>
+             <property name="tab_fill">True</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkLabel" id="label1">
+             <property name="visible">True</property>
+             <property name="label" translatable="yes">Data View</property>
+             <property name="use_underline">False</property>
+             <property name="use_markup">False</property>
+             <property name="justify">GTK_JUSTIFY_LEFT</property>
+             <property name="wrap">False</property>
+             <property name="selectable">False</property>
+             <property name="xalign">0.5</property>
+             <property name="yalign">0.5</property>
+             <property name="xpad">0</property>
+             <property name="ypad">0</property>
+             <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+             <property name="width_chars">-1</property>
+             <property name="single_line_mode">False</property>
+             <property name="angle">0</property>
+           </widget>
+           <packing>
+             <property name="type">tab</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkScrolledWindow" id="scrolledwindow2">
+             <property name="visible">True</property>
+             <property name="can_focus">True</property>
+             <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
+             <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+             <property name="shadow_type">GTK_SHADOW_NONE</property>
+             <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+             <child>
+               <widget class="Custom" id="variable_sheet">
+                 <property name="visible">True</property>
+                 <property name="creation_function">psppire_variable_sheet_create</property>
+                 <property name="int1">0</property>
+                 <property name="int2">0</property>
+                 <property name="last_modification_time">Sun, 30 Oct 2005 08:54:45 GMT</property>
+               </widget>
+             </child>
+           </widget>
+           <packing>
+             <property name="tab_expand">False</property>
+             <property name="tab_fill">True</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkLabel" id="label2">
+             <property name="visible">True</property>
+             <property name="label" translatable="yes">Variable View</property>
+             <property name="use_underline">False</property>
+             <property name="use_markup">False</property>
+             <property name="justify">GTK_JUSTIFY_LEFT</property>
+             <property name="wrap">False</property>
+             <property name="selectable">False</property>
+             <property name="xalign">0.5</property>
+             <property name="yalign">0.5</property>
+             <property name="xpad">0</property>
+             <property name="ypad">0</property>
+             <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+             <property name="width_chars">-1</property>
+             <property name="single_line_mode">False</property>
+             <property name="angle">0</property>
+           </widget>
+           <packing>
+             <property name="type">tab</property>
+           </packing>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">True</property>
+         <property name="fill">True</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkStatusbar" id="statusbar">
+         <property name="visible">True</property>
+         <property name="has_resize_grip">True</property>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">False</property>
+         <property name="fill">False</property>
+       </packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="var_type_dialog">
+  <property name="border_width">6</property>
+  <property name="title" translatable="yes">Variable Type</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">True</property>
+  <property name="default_width">485</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">True</property>
+  <property name="skip_pager_hint">True</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+
+  <child>
+    <widget class="GtkHBox" id="hbox1">
+      <property name="border_width">5</property>
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">5</property>
+
+      <child>
+       <widget class="GtkVBox" id="vbox2">
+         <property name="border_width">13</property>
+         <property name="visible">True</property>
+         <property name="homogeneous">True</property>
+         <property name="spacing">0</property>
+
+         <child>
+           <widget class="GtkRadioButton" id="radiobutton1">
+             <property name="visible">True</property>
+             <property name="can_focus">True</property>
+             <property name="label" translatable="yes">Numeric</property>
+             <property name="use_underline">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">True</property>
+             <property name="active">True</property>
+             <property name="inconsistent">False</property>
+             <property name="draw_indicator">True</property>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">False</property>
+             <property name="fill">False</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkRadioButton" id="radiobutton2">
+             <property name="visible">True</property>
+             <property name="can_focus">True</property>
+             <property name="label" translatable="yes">Comma</property>
+             <property name="use_underline">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">True</property>
+             <property name="active">False</property>
+             <property name="inconsistent">False</property>
+             <property name="draw_indicator">True</property>
+             <property name="group">radiobutton1</property>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">False</property>
+             <property name="fill">False</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkRadioButton" id="radiobutton3">
+             <property name="visible">True</property>
+             <property name="can_focus">True</property>
+             <property name="label" translatable="yes">Dot</property>
+             <property name="use_underline">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">True</property>
+             <property name="active">False</property>
+             <property name="inconsistent">False</property>
+             <property name="draw_indicator">True</property>
+             <property name="group">radiobutton1</property>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">False</property>
+             <property name="fill">False</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkRadioButton" id="radiobutton4">
+             <property name="visible">True</property>
+             <property name="can_focus">True</property>
+             <property name="label" translatable="yes">Scientific notation</property>
+             <property name="use_underline">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">True</property>
+             <property name="active">False</property>
+             <property name="inconsistent">False</property>
+             <property name="draw_indicator">True</property>
+             <property name="group">radiobutton1</property>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">False</property>
+             <property name="fill">False</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkRadioButton" id="radiobutton5">
+             <property name="visible">True</property>
+             <property name="can_focus">True</property>
+             <property name="label" translatable="yes">Date</property>
+             <property name="use_underline">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">True</property>
+             <property name="active">False</property>
+             <property name="inconsistent">False</property>
+             <property name="draw_indicator">True</property>
+             <property name="group">radiobutton1</property>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">False</property>
+             <property name="fill">False</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkRadioButton" id="radiobutton6">
+             <property name="visible">True</property>
+             <property name="can_focus">True</property>
+             <property name="label" translatable="yes">Dollar</property>
+             <property name="use_underline">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">True</property>
+             <property name="active">False</property>
+             <property name="inconsistent">False</property>
+             <property name="draw_indicator">True</property>
+             <property name="group">radiobutton1</property>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">False</property>
+             <property name="fill">False</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkRadioButton" id="radiobutton7">
+             <property name="visible">True</property>
+             <property name="can_focus">True</property>
+             <property name="label" translatable="yes">Custom currency</property>
+             <property name="use_underline">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">True</property>
+             <property name="active">False</property>
+             <property name="inconsistent">False</property>
+             <property name="draw_indicator">True</property>
+             <property name="group">radiobutton1</property>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">False</property>
+             <property name="fill">False</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkRadioButton" id="radiobutton8">
+             <property name="visible">True</property>
+             <property name="can_focus">True</property>
+             <property name="label" translatable="yes">String</property>
+             <property name="use_underline">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">True</property>
+             <property name="active">False</property>
+             <property name="inconsistent">False</property>
+             <property name="draw_indicator">True</property>
+             <property name="group">radiobutton1</property>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">False</property>
+             <property name="fill">False</property>
+           </packing>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">False</property>
+         <property name="fill">False</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkVBox" id="middle_box">
+         <property name="visible">True</property>
+         <property name="homogeneous">False</property>
+         <property name="spacing">10</property>
+
+         <child>
+           <widget class="GtkScrolledWindow" id="scrolledwindow4">
+             <property name="width_request">20</property>
+             <property name="height_request">194</property>
+             <property name="can_focus">True</property>
+             <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+             <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+             <property name="shadow_type">GTK_SHADOW_IN</property>
+             <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+             <child>
+               <widget class="GtkTreeView" id="date_format_list_view">
+                 <property name="visible">True</property>
+                 <property name="can_focus">True</property>
+                 <property name="headers_visible">False</property>
+                 <property name="rules_hint">False</property>
+                 <property name="reorderable">False</property>
+                 <property name="enable_search">True</property>
+                 <property name="fixed_height_mode">False</property>
+                 <property name="hover_selection">False</property>
+                 <property name="hover_expand">False</property>
+               </widget>
+             </child>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">False</property>
+             <property name="fill">False</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkHBox" id="custom_currency_hbox">
+             <property name="homogeneous">False</property>
+             <property name="spacing">15</property>
+
+             <child>
+               <widget class="GtkScrolledWindow" id="scrolledwindow5">
+                 <property name="width_request">1</property>
+                 <property name="height_request">120</property>
+                 <property name="visible">True</property>
+                 <property name="can_focus">True</property>
+                 <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+                 <property name="vscrollbar_policy">GTK_POLICY_NEVER</property>
+                 <property name="shadow_type">GTK_SHADOW_IN</property>
+                 <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+                 <child>
+                   <widget class="GtkTreeView" id="custom_treeview">
+                     <property name="visible">True</property>
+                     <property name="can_focus">True</property>
+                     <property name="headers_visible">False</property>
+                     <property name="rules_hint">False</property>
+                     <property name="reorderable">False</property>
+                     <property name="enable_search">True</property>
+                     <property name="fixed_height_mode">False</property>
+                     <property name="hover_selection">False</property>
+                     <property name="hover_expand">False</property>
+                   </widget>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">True</property>
+                 <property name="fill">True</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkFrame" id="Sample">
+                 <property name="visible">True</property>
+                 <property name="label_xalign">0</property>
+                 <property name="label_yalign">0.5</property>
+                 <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+                 <child>
+                   <widget class="GtkAlignment" id="alignment2">
+                     <property name="visible">True</property>
+                     <property name="xalign">0.5</property>
+                     <property name="yalign">0.5</property>
+                     <property name="xscale">1</property>
+                     <property name="yscale">1</property>
+                     <property name="top_padding">0</property>
+                     <property name="bottom_padding">0</property>
+                     <property name="left_padding">12</property>
+                     <property name="right_padding">0</property>
+
+                     <child>
+                       <widget class="GtkVBox" id="vbox10">
+                         <property name="visible">True</property>
+                         <property name="homogeneous">True</property>
+                         <property name="spacing">0</property>
+
+                         <child>
+                           <widget class="GtkLabel" id="psample_label">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">positive</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0.5</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
+                             <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                             <property name="width_chars">-1</property>
+                             <property name="single_line_mode">False</property>
+                             <property name="angle">0</property>
+                           </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">True</property>
+                             <property name="fill">True</property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="nsample_label">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">negative</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0.5</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
+                             <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                             <property name="width_chars">-1</property>
+                             <property name="single_line_mode">False</property>
+                             <property name="angle">0</property>
+                           </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">True</property>
+                             <property name="fill">True</property>
+                           </packing>
+                         </child>
+                       </widget>
+                     </child>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkLabel" id="label13">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">Sample</property>
+                     <property name="use_underline">False</property>
+                     <property name="use_markup">True</property>
+                     <property name="justify">GTK_JUSTIFY_LEFT</property>
+                     <property name="wrap">False</property>
+                     <property name="selectable">False</property>
+                     <property name="xalign">0.5</property>
+                     <property name="yalign">0.5</property>
+                     <property name="xpad">0</property>
+                     <property name="ypad">0</property>
+                     <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                     <property name="width_chars">-1</property>
+                     <property name="single_line_mode">False</property>
+                     <property name="angle">0</property>
+                   </widget>
+                   <packing>
+                     <property name="type">label_item</property>
+                   </packing>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">True</property>
+                 <property name="fill">True</property>
+                 <property name="pack_type">GTK_PACK_END</property>
+               </packing>
+             </child>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">True</property>
+             <property name="fill">True</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkScrolledWindow" id="dollar_window">
+             <property name="can_focus">True</property>
+             <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+             <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+             <property name="shadow_type">GTK_SHADOW_IN</property>
+             <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+             <child>
+               <widget class="GtkTreeView" id="dollar_treeview">
+                 <property name="visible">True</property>
+                 <property name="can_focus">True</property>
+                 <property name="headers_visible">False</property>
+                 <property name="rules_hint">False</property>
+                 <property name="reorderable">False</property>
+                 <property name="enable_search">True</property>
+                 <property name="fixed_height_mode">False</property>
+                 <property name="hover_selection">False</property>
+                 <property name="hover_expand">False</property>
+               </widget>
+             </child>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">True</property>
+             <property name="fill">True</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkTable" id="width_decimals">
+             <property name="width_request">100</property>
+             <property name="height_request">50</property>
+             <property name="visible">True</property>
+             <property name="n_rows">2</property>
+             <property name="n_columns">2</property>
+             <property name="homogeneous">False</property>
+             <property name="row_spacing">1</property>
+             <property name="column_spacing">2</property>
+
+             <child>
+               <widget class="GtkLabel" id="decimals_label">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">Decimal Places:</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">False</property>
+                 <property name="justify">GTK_JUSTIFY_RIGHT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                 <property name="width_chars">-1</property>
+                 <property name="single_line_mode">False</property>
+                 <property name="angle">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">1</property>
+                 <property name="bottom_attach">2</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkEntry" id="width_entry">
+                 <property name="width_request">25</property>
+                 <property name="can_focus">True</property>
+                 <property name="editable">True</property>
+                 <property name="visibility">True</property>
+                 <property name="max_length">0</property>
+                 <property name="text" translatable="yes"></property>
+                 <property name="has_frame">True</property>
+                 <property name="invisible_char">*</property>
+                 <property name="activates_default">False</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">1</property>
+                 <property name="right_attach">2</property>
+                 <property name="top_attach">0</property>
+                 <property name="bottom_attach">1</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkEntry" id="decimals_entry">
+                 <property name="width_request">25</property>
+                 <property name="visible">True</property>
+                 <property name="can_focus">True</property>
+                 <property name="editable">True</property>
+                 <property name="visibility">True</property>
+                 <property name="max_length">0</property>
+                 <property name="text" translatable="yes"></property>
+                 <property name="has_frame">True</property>
+                 <property name="invisible_char">*</property>
+                 <property name="activates_default">False</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">1</property>
+                 <property name="right_attach">2</property>
+                 <property name="top_attach">1</property>
+                 <property name="bottom_attach">2</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkHBox" id="hbox2">
+                 <property name="visible">True</property>
+                 <property name="homogeneous">False</property>
+                 <property name="spacing">0</property>
+
+                 <child>
+                   <widget class="GtkLabel" id="width_label">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">Width:</property>
+                     <property name="use_underline">False</property>
+                     <property name="use_markup">False</property>
+                     <property name="justify">GTK_JUSTIFY_RIGHT</property>
+                     <property name="wrap">False</property>
+                     <property name="selectable">False</property>
+                     <property name="xalign">0.5</property>
+                     <property name="yalign">0.5</property>
+                     <property name="xpad">0</property>
+                     <property name="ypad">0</property>
+                     <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                     <property name="width_chars">-1</property>
+                     <property name="single_line_mode">False</property>
+                     <property name="angle">0</property>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">False</property>
+                     <property name="pack_type">GTK_PACK_END</property>
+                   </packing>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">0</property>
+                 <property name="bottom_attach">1</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options">fill</property>
+               </packing>
+             </child>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">True</property>
+             <property name="fill">True</property>
+           </packing>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">True</property>
+         <property name="fill">False</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkVButtonBox" id="vbuttonbox6">
+         <property name="visible">True</property>
+         <property name="layout_style">GTK_BUTTONBOX_START</property>
+         <property name="spacing">5</property>
+
+         <child>
+           <widget class="GtkButton" id="var_type_ok">
+             <property name="visible">True</property>
+             <property name="can_default">True</property>
+             <property name="can_focus">True</property>
+             <property name="label">gtk-ok</property>
+             <property name="use_stock">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">True</property>
+           </widget>
+         </child>
+
+         <child>
+           <widget class="GtkButton" id="var_type_cancel">
+             <property name="visible">True</property>
+             <property name="can_default">True</property>
+             <property name="can_focus">True</property>
+             <property name="label">gtk-cancel</property>
+             <property name="use_stock">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">True</property>
+             <signal name="clicked" handler="on_var_type_cancel_clicked" object="var_type_dialog" last_modification_time="Mon, 31 Oct 2005 09:49:33 GMT"/>
+           </widget>
+         </child>
+
+         <child>
+           <widget class="GtkButton" id="help_button_variable_type">
+             <property name="visible">True</property>
+             <property name="can_default">True</property>
+             <property name="can_focus">True</property>
+             <property name="label">gtk-help</property>
+             <property name="use_stock">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">True</property>
+           </widget>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">True</property>
+         <property name="fill">True</property>
+       </packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="val_labs_dialog">
+  <property name="title" translatable="yes">Value Labels</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">True</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">True</property>
+  <property name="skip_pager_hint">True</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+
+  <child>
+    <widget class="GtkHBox" id="hbox3">
+      <property name="border_width">5</property>
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+       <widget class="GtkFrame" id="frame1">
+         <property name="visible">True</property>
+         <property name="label_xalign">0</property>
+         <property name="label_yalign">0.5</property>
+         <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+         <child>
+           <widget class="GtkAlignment" id="alignment1">
+             <property name="border_width">8</property>
+             <property name="visible">True</property>
+             <property name="xalign">0.5</property>
+             <property name="yalign">0.5</property>
+             <property name="xscale">1</property>
+             <property name="yscale">1</property>
+             <property name="top_padding">0</property>
+             <property name="bottom_padding">0</property>
+             <property name="left_padding">12</property>
+             <property name="right_padding">0</property>
+
+             <child>
+               <widget class="GtkTable" id="table3">
+                 <property name="visible">True</property>
+                 <property name="n_rows">2</property>
+                 <property name="n_columns">2</property>
+                 <property name="homogeneous">False</property>
+                 <property name="row_spacing">5</property>
+                 <property name="column_spacing">0</property>
+
+                 <child>
+                   <widget class="GtkVButtonBox" id="vbuttonbox2">
+                     <property name="border_width">5</property>
+                     <property name="visible">True</property>
+                     <property name="layout_style">GTK_BUTTONBOX_DEFAULT_STYLE</property>
+                     <property name="spacing">0</property>
+
+                     <child>
+                       <widget class="GtkButton" id="val_labs_add">
+                         <property name="visible">True</property>
+                         <property name="sensitive">False</property>
+                         <property name="can_default">True</property>
+                         <property name="can_focus">True</property>
+                         <property name="label">gtk-add</property>
+                         <property name="use_stock">True</property>
+                         <property name="relief">GTK_RELIEF_NORMAL</property>
+                         <property name="focus_on_click">True</property>
+                       </widget>
+                     </child>
+
+                     <child>
+                       <widget class="GtkButton" id="val_labs_change">
+                         <property name="visible">True</property>
+                         <property name="sensitive">False</property>
+                         <property name="can_default">True</property>
+                         <property name="can_focus">True</property>
+                         <property name="label">gtk-apply</property>
+                         <property name="use_stock">True</property>
+                         <property name="relief">GTK_RELIEF_NORMAL</property>
+                         <property name="focus_on_click">True</property>
+                       </widget>
+                     </child>
+
+                     <child>
+                       <widget class="GtkButton" id="val_labs_remove">
+                         <property name="visible">True</property>
+                         <property name="sensitive">False</property>
+                         <property name="can_default">True</property>
+                         <property name="can_focus">True</property>
+                         <property name="label">gtk-remove</property>
+                         <property name="use_stock">True</property>
+                         <property name="relief">GTK_RELIEF_NORMAL</property>
+                         <property name="focus_on_click">True</property>
+                       </widget>
+                     </child>
+                   </widget>
+                   <packing>
+                     <property name="left_attach">0</property>
+                     <property name="right_attach">1</property>
+                     <property name="top_attach">1</property>
+                     <property name="bottom_attach">2</property>
+                     <property name="x_options">fill</property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkTable" id="table4">
+                     <property name="border_width">5</property>
+                     <property name="visible">True</property>
+                     <property name="n_rows">2</property>
+                     <property name="n_columns">2</property>
+                     <property name="homogeneous">False</property>
+                     <property name="row_spacing">4</property>
+                     <property name="column_spacing">5</property>
+
+                     <child>
+                       <widget class="GtkLabel" id="label5">
+                         <property name="visible">True</property>
+                         <property name="label" translatable="yes">Value:</property>
+                         <property name="use_underline">False</property>
+                         <property name="use_markup">False</property>
+                         <property name="justify">GTK_JUSTIFY_LEFT</property>
+                         <property name="wrap">False</property>
+                         <property name="selectable">False</property>
+                         <property name="xalign">0</property>
+                         <property name="yalign">0.5</property>
+                         <property name="xpad">0</property>
+                         <property name="ypad">0</property>
+                         <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                         <property name="width_chars">-1</property>
+                         <property name="single_line_mode">False</property>
+                         <property name="angle">0</property>
+                       </widget>
+                       <packing>
+                         <property name="left_attach">0</property>
+                         <property name="right_attach">1</property>
+                         <property name="top_attach">0</property>
+                         <property name="bottom_attach">1</property>
+                         <property name="x_options">fill</property>
+                         <property name="y_options"></property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkLabel" id="label6">
+                         <property name="visible">True</property>
+                         <property name="label" translatable="yes">Value Label:</property>
+                         <property name="use_underline">False</property>
+                         <property name="use_markup">False</property>
+                         <property name="justify">GTK_JUSTIFY_LEFT</property>
+                         <property name="wrap">False</property>
+                         <property name="selectable">False</property>
+                         <property name="xalign">0</property>
+                         <property name="yalign">0.5</property>
+                         <property name="xpad">0</property>
+                         <property name="ypad">0</property>
+                         <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                         <property name="width_chars">-1</property>
+                         <property name="single_line_mode">False</property>
+                         <property name="angle">0</property>
+                       </widget>
+                       <packing>
+                         <property name="left_attach">0</property>
+                         <property name="right_attach">1</property>
+                         <property name="top_attach">1</property>
+                         <property name="bottom_attach">2</property>
+                         <property name="x_options">fill</property>
+                         <property name="y_options"></property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkEntry" id="label_entry">
+                         <property name="visible">True</property>
+                         <property name="can_focus">True</property>
+                         <property name="editable">True</property>
+                         <property name="visibility">True</property>
+                         <property name="max_length">0</property>
+                         <property name="text" translatable="yes"></property>
+                         <property name="has_frame">True</property>
+                         <property name="invisible_char">*</property>
+                         <property name="activates_default">False</property>
+                       </widget>
+                       <packing>
+                         <property name="left_attach">1</property>
+                         <property name="right_attach">2</property>
+                         <property name="top_attach">1</property>
+                         <property name="bottom_attach">2</property>
+                         <property name="y_options"></property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkHBox" id="hbox4">
+                         <property name="visible">True</property>
+                         <property name="homogeneous">False</property>
+                         <property name="spacing">0</property>
+
+                         <child>
+                           <widget class="GtkEntry" id="value_entry">
+                             <property name="width_request">85</property>
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="editable">True</property>
+                             <property name="visibility">True</property>
+                             <property name="max_length">0</property>
+                             <property name="text" translatable="yes"></property>
+                             <property name="has_frame">True</property>
+                             <property name="invisible_char">*</property>
+                             <property name="activates_default">False</property>
+                           </widget>
+                           <packing>
+                             <property name="padding">1</property>
+                             <property name="expand">False</property>
+                             <property name="fill">False</property>
+                           </packing>
+                         </child>
+                       </widget>
+                       <packing>
+                         <property name="left_attach">1</property>
+                         <property name="right_attach">2</property>
+                         <property name="top_attach">0</property>
+                         <property name="bottom_attach">1</property>
+                         <property name="x_options">fill</property>
+                         <property name="y_options">fill</property>
+                       </packing>
+                     </child>
+                   </widget>
+                   <packing>
+                     <property name="left_attach">0</property>
+                     <property name="right_attach">2</property>
+                     <property name="top_attach">0</property>
+                     <property name="bottom_attach">1</property>
+                     <property name="x_options">fill</property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkScrolledWindow" id="scrolledwindow3">
+                     <property name="visible">True</property>
+                     <property name="can_focus">True</property>
+                     <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+                     <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                     <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+                     <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+                     <child>
+                       <widget class="GtkTreeView" id="treeview1">
+                         <property name="visible">True</property>
+                         <property name="can_focus">True</property>
+                         <property name="headers_visible">False</property>
+                         <property name="rules_hint">False</property>
+                         <property name="reorderable">False</property>
+                         <property name="enable_search">False</property>
+                         <property name="fixed_height_mode">False</property>
+                         <property name="hover_selection">False</property>
+                         <property name="hover_expand">False</property>
+                       </widget>
+                     </child>
+                   </widget>
+                   <packing>
+                     <property name="left_attach">1</property>
+                     <property name="right_attach">2</property>
+                     <property name="top_attach">1</property>
+                     <property name="bottom_attach">2</property>
+                     <property name="x_options">fill</property>
+                     <property name="y_options">fill</property>
+                   </packing>
+                 </child>
+               </widget>
+             </child>
+           </widget>
+         </child>
+
+         <child>
+           <widget class="GtkLabel" id="label7">
+             <property name="visible">True</property>
+             <property name="label" translatable="yes">Value Labels</property>
+             <property name="use_underline">False</property>
+             <property name="use_markup">True</property>
+             <property name="justify">GTK_JUSTIFY_LEFT</property>
+             <property name="wrap">False</property>
+             <property name="selectable">False</property>
+             <property name="xalign">0.5</property>
+             <property name="yalign">0.5</property>
+             <property name="xpad">0</property>
+             <property name="ypad">0</property>
+             <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+             <property name="width_chars">-1</property>
+             <property name="single_line_mode">False</property>
+             <property name="angle">0</property>
+           </widget>
+           <packing>
+             <property name="type">label_item</property>
+           </packing>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">10</property>
+         <property name="expand">True</property>
+         <property name="fill">True</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkVButtonBox" id="vbuttonbox3">
+         <property name="border_width">5</property>
+         <property name="visible">True</property>
+         <property name="layout_style">GTK_BUTTONBOX_START</property>
+         <property name="spacing">5</property>
+
+         <child>
+           <widget class="GtkButton" id="val_labs_ok">
+             <property name="visible">True</property>
+             <property name="can_default">True</property>
+             <property name="can_focus">True</property>
+             <property name="label">gtk-ok</property>
+             <property name="use_stock">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">True</property>
+             <signal name="clicked" handler="gtk_widget_hide" object="val_labs_dialog" last_modification_time="Fri, 25 Nov 2005 23:15:33 GMT"/>
+           </widget>
+         </child>
+
+         <child>
+           <widget class="GtkButton" id="val_labs_cancel">
+             <property name="visible">True</property>
+             <property name="can_default">True</property>
+             <property name="can_focus">True</property>
+             <property name="label">gtk-cancel</property>
+             <property name="use_stock">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">True</property>
+             <signal name="clicked" handler="gtk_widget_hide" object="val_labs_dialog" last_modification_time="Fri, 25 Nov 2005 23:15:44 GMT"/>
+           </widget>
+         </child>
+
+         <child>
+           <widget class="GtkButton" id="help_button_value_labels">
+             <property name="visible">True</property>
+             <property name="can_default">True</property>
+             <property name="can_focus">True</property>
+             <property name="label">gtk-help</property>
+             <property name="use_stock">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">True</property>
+           </widget>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">False</property>
+         <property name="fill">False</property>
+         <property name="pack_type">GTK_PACK_END</property>
+       </packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="missing_values_dialog">
+  <property name="border_width">10</property>
+  <property name="title" translatable="yes">Missing Values</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">True</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">True</property>
+  <property name="skip_pager_hint">True</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+
+  <child>
+    <widget class="GtkTable" id="table6">
+      <property name="visible">True</property>
+      <property name="n_rows">2</property>
+      <property name="n_columns">2</property>
+      <property name="homogeneous">False</property>
+      <property name="row_spacing">0</property>
+      <property name="column_spacing">0</property>
+
+      <child>
+       <widget class="GtkVButtonBox" id="vbuttonbox5">
+         <property name="border_width">5</property>
+         <property name="visible">True</property>
+         <property name="layout_style">GTK_BUTTONBOX_START</property>
+         <property name="spacing">5</property>
+
+         <child>
+           <widget class="GtkButton" id="missing_val_ok">
+             <property name="visible">True</property>
+             <property name="can_default">True</property>
+             <property name="can_focus">True</property>
+             <property name="label">gtk-ok</property>
+             <property name="use_stock">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">True</property>
+             <signal name="clicked" handler="gtk_widget_hide" object="val_labs_dialog" last_modification_time="Fri, 25 Nov 2005 23:15:33 GMT"/>
+           </widget>
+         </child>
+
+         <child>
+           <widget class="GtkButton" id="missing_val_cancel">
+             <property name="visible">True</property>
+             <property name="can_default">True</property>
+             <property name="can_focus">True</property>
+             <property name="label">gtk-cancel</property>
+             <property name="use_stock">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">True</property>
+             <signal name="clicked" handler="gtk_widget_hide" object="val_labs_dialog" last_modification_time="Fri, 25 Nov 2005 23:15:44 GMT"/>
+           </widget>
+         </child>
+
+         <child>
+           <widget class="GtkButton" id="help_button_missing_values">
+             <property name="visible">True</property>
+             <property name="can_default">True</property>
+             <property name="can_focus">True</property>
+             <property name="label">gtk-help</property>
+             <property name="use_stock">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">True</property>
+           </widget>
+         </child>
+       </widget>
+       <packing>
+         <property name="left_attach">1</property>
+         <property name="right_attach">2</property>
+         <property name="top_attach">0</property>
+         <property name="bottom_attach">1</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkVBox" id="vbox5">
+         <property name="visible">True</property>
+         <property name="homogeneous">False</property>
+         <property name="spacing">12</property>
+
+         <child>
+           <widget class="GtkRadioButton" id="no_missing">
+             <property name="visible">True</property>
+             <property name="can_focus">True</property>
+             <property name="label" translatable="yes">_No missing values</property>
+             <property name="use_underline">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">True</property>
+             <property name="active">True</property>
+             <property name="inconsistent">False</property>
+             <property name="draw_indicator">True</property>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">False</property>
+             <property name="fill">False</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkVBox" id="vbox6">
+             <property name="visible">True</property>
+             <property name="homogeneous">False</property>
+             <property name="spacing">0</property>
+
+             <child>
+               <widget class="GtkRadioButton" id="discrete_missing">
+                 <property name="visible">True</property>
+                 <property name="can_focus">True</property>
+                 <property name="label" translatable="yes">_Discrete missing values</property>
+                 <property name="use_underline">True</property>
+                 <property name="relief">GTK_RELIEF_NORMAL</property>
+                 <property name="focus_on_click">False</property>
+                 <property name="active">False</property>
+                 <property name="inconsistent">False</property>
+                 <property name="draw_indicator">True</property>
+                 <property name="group">no_missing</property>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">False</property>
+                 <property name="fill">False</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkHBox" id="hbox10">
+                 <property name="visible">True</property>
+                 <property name="homogeneous">False</property>
+                 <property name="spacing">0</property>
+
+                 <child>
+                   <widget class="GtkHBox" id="hbox5">
+                     <property name="border_width">5</property>
+                     <property name="visible">True</property>
+                     <property name="homogeneous">True</property>
+                     <property name="spacing">5</property>
+
+                     <child>
+                       <widget class="GtkEntry" id="mv0">
+                         <property name="width_request">75</property>
+                         <property name="visible">True</property>
+                         <property name="can_focus">True</property>
+                         <property name="editable">True</property>
+                         <property name="visibility">True</property>
+                         <property name="max_length">0</property>
+                         <property name="text" translatable="yes"></property>
+                         <property name="has_frame">True</property>
+                         <property name="invisible_char">*</property>
+                         <property name="activates_default">False</property>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">False</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkEntry" id="mv1">
+                         <property name="width_request">75</property>
+                         <property name="visible">True</property>
+                         <property name="can_focus">True</property>
+                         <property name="editable">True</property>
+                         <property name="visibility">True</property>
+                         <property name="max_length">0</property>
+                         <property name="text" translatable="yes"></property>
+                         <property name="has_frame">True</property>
+                         <property name="invisible_char">*</property>
+                         <property name="activates_default">False</property>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">False</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkEntry" id="mv2">
+                         <property name="width_request">75</property>
+                         <property name="visible">True</property>
+                         <property name="can_focus">True</property>
+                         <property name="editable">True</property>
+                         <property name="visibility">True</property>
+                         <property name="max_length">0</property>
+                         <property name="text" translatable="yes"></property>
+                         <property name="has_frame">True</property>
+                         <property name="invisible_char">*</property>
+                         <property name="activates_default">False</property>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">False</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+                   </widget>
+                   <packing>
+                     <property name="padding">20</property>
+                     <property name="expand">True</property>
+                     <property name="fill">True</property>
+                   </packing>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">True</property>
+                 <property name="fill">True</property>
+               </packing>
+             </child>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">False</property>
+             <property name="fill">False</property>
+           </packing>
+         </child>
+       </widget>
+       <packing>
+         <property name="left_attach">0</property>
+         <property name="right_attach">1</property>
+         <property name="top_attach">0</property>
+         <property name="bottom_attach">1</property>
+         <property name="y_options">fill</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkVBox" id="vbox7">
+         <property name="visible">True</property>
+         <property name="homogeneous">False</property>
+         <property name="spacing">0</property>
+
+         <child>
+           <widget class="GtkRadioButton" id="range_missing">
+             <property name="visible">True</property>
+             <property name="can_focus">True</property>
+             <property name="label" translatable="yes">_Range plus one optional discrete missing value</property>
+             <property name="use_underline">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">False</property>
+             <property name="active">False</property>
+             <property name="inconsistent">False</property>
+             <property name="draw_indicator">True</property>
+             <property name="group">no_missing</property>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">False</property>
+             <property name="fill">False</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkVBox" id="vbox8">
+             <property name="visible">True</property>
+             <property name="homogeneous">False</property>
+             <property name="spacing">5</property>
+
+             <child>
+               <widget class="GtkHBox" id="hbox7">
+                 <property name="visible">True</property>
+                 <property name="homogeneous">False</property>
+                 <property name="spacing">0</property>
+
+                 <child>
+                   <widget class="GtkHBox" id="hbox8">
+                     <property name="visible">True</property>
+                     <property name="homogeneous">False</property>
+                     <property name="spacing">0</property>
+
+                     <child>
+                       <widget class="GtkLabel" id="label11">
+                         <property name="visible">True</property>
+                         <property name="label" translatable="yes">_Low:</property>
+                         <property name="use_underline">True</property>
+                         <property name="use_markup">False</property>
+                         <property name="justify">GTK_JUSTIFY_LEFT</property>
+                         <property name="wrap">False</property>
+                         <property name="selectable">False</property>
+                         <property name="xalign">0.5</property>
+                         <property name="yalign">0.5</property>
+                         <property name="xpad">0</property>
+                         <property name="ypad">0</property>
+                         <property name="mnemonic_widget">mv-low</property>
+                         <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                         <property name="width_chars">-1</property>
+                         <property name="single_line_mode">False</property>
+                         <property name="angle">0</property>
+                       </widget>
+                       <packing>
+                         <property name="padding">20</property>
+                         <property name="expand">False</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkEntry" id="mv-low">
+                         <property name="width_request">75</property>
+                         <property name="visible">True</property>
+                         <property name="can_focus">True</property>
+                         <property name="editable">True</property>
+                         <property name="visibility">True</property>
+                         <property name="max_length">0</property>
+                         <property name="text" translatable="yes"></property>
+                         <property name="has_frame">True</property>
+                         <property name="invisible_char">*</property>
+                         <property name="activates_default">False</property>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">False</property>
+                         <property name="fill">True</property>
+                       </packing>
+                     </child>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">True</property>
+                     <property name="fill">True</property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkHBox" id="hbox9">
+                     <property name="visible">True</property>
+                     <property name="homogeneous">False</property>
+                     <property name="spacing">0</property>
+
+                     <child>
+                       <widget class="GtkLabel" id="label12">
+                         <property name="visible">True</property>
+                         <property name="label" translatable="yes">_High:</property>
+                         <property name="use_underline">True</property>
+                         <property name="use_markup">False</property>
+                         <property name="justify">GTK_JUSTIFY_LEFT</property>
+                         <property name="wrap">False</property>
+                         <property name="selectable">False</property>
+                         <property name="xalign">0.5</property>
+                         <property name="yalign">0.5</property>
+                         <property name="xpad">0</property>
+                         <property name="ypad">0</property>
+                         <property name="mnemonic_widget">mv-high</property>
+                         <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                         <property name="width_chars">-1</property>
+                         <property name="single_line_mode">False</property>
+                         <property name="angle">0</property>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">False</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkEntry" id="mv-high">
+                         <property name="width_request">75</property>
+                         <property name="visible">True</property>
+                         <property name="can_focus">True</property>
+                         <property name="editable">True</property>
+                         <property name="visibility">True</property>
+                         <property name="max_length">0</property>
+                         <property name="text" translatable="yes"></property>
+                         <property name="has_frame">True</property>
+                         <property name="invisible_char">*</property>
+                         <property name="activates_default">False</property>
+                       </widget>
+                       <packing>
+                         <property name="padding">5</property>
+                         <property name="expand">True</property>
+                         <property name="fill">True</property>
+                       </packing>
+                     </child>
+                   </widget>
+                   <packing>
+                     <property name="padding">20</property>
+                     <property name="expand">True</property>
+                     <property name="fill">False</property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <placeholder/>
+                 </child>
+
+                 <child>
+                   <placeholder/>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">True</property>
+                 <property name="fill">True</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkHBox" id="hbox6">
+                 <property name="visible">True</property>
+                 <property name="homogeneous">False</property>
+                 <property name="spacing">0</property>
+
+                 <child>
+                   <widget class="GtkLabel" id="label10">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">Di_screte value:</property>
+                     <property name="use_underline">True</property>
+                     <property name="use_markup">False</property>
+                     <property name="justify">GTK_JUSTIFY_LEFT</property>
+                     <property name="wrap">False</property>
+                     <property name="selectable">False</property>
+                     <property name="xalign">0.5</property>
+                     <property name="yalign">0.5</property>
+                     <property name="xpad">0</property>
+                     <property name="ypad">0</property>
+                     <property name="mnemonic_widget">mv-discrete</property>
+                     <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                     <property name="width_chars">-1</property>
+                     <property name="single_line_mode">False</property>
+                     <property name="angle">0</property>
+                   </widget>
+                   <packing>
+                     <property name="padding">20</property>
+                     <property name="expand">False</property>
+                     <property name="fill">False</property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkEntry" id="mv-discrete">
+                     <property name="width_request">75</property>
+                     <property name="visible">True</property>
+                     <property name="can_focus">True</property>
+                     <property name="editable">True</property>
+                     <property name="visibility">True</property>
+                     <property name="max_length">0</property>
+                     <property name="text" translatable="yes"></property>
+                     <property name="has_frame">True</property>
+                     <property name="invisible_char">*</property>
+                     <property name="activates_default">False</property>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">True</property>
+                   </packing>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">True</property>
+                 <property name="fill">True</property>
+               </packing>
+             </child>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">True</property>
+             <property name="fill">True</property>
+           </packing>
+         </child>
+       </widget>
+       <packing>
+         <property name="left_attach">0</property>
+         <property name="right_attach">2</property>
+         <property name="top_attach">1</property>
+         <property name="bottom_attach">2</property>
+         <property name="x_options">fill</property>
+       </packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkDialog" id="go_to_case_dialog">
+  <property name="title" translatable="yes">Go To Case</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">True</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">True</property>
+  <property name="skip_pager_hint">True</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <property name="has_separator">False</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+       <widget class="GtkHButtonBox" id="dialog-action_area1">
+         <property name="visible">True</property>
+         <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+         <child>
+           <widget class="GtkButton" id="button_go_to_case_ok">
+             <property name="visible">True</property>
+             <property name="can_default">True</property>
+             <property name="can_focus">True</property>
+             <property name="label">gtk-ok</property>
+             <property name="use_stock">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">True</property>
+             <property name="response_id">-5</property>
+           </widget>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">False</property>
+         <property name="fill">True</property>
+         <property name="pack_type">GTK_PACK_END</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkHBox" id="hbox11">
+         <property name="visible">True</property>
+         <property name="homogeneous">False</property>
+         <property name="spacing">3</property>
+
+         <child>
+           <widget class="GtkLabel" id="label14">
+             <property name="visible">True</property>
+             <property name="label" translatable="yes">Case Number:</property>
+             <property name="use_underline">False</property>
+             <property name="use_markup">False</property>
+             <property name="justify">GTK_JUSTIFY_LEFT</property>
+             <property name="wrap">False</property>
+             <property name="selectable">False</property>
+             <property name="xalign">0.5</property>
+             <property name="yalign">0.5</property>
+             <property name="xpad">0</property>
+             <property name="ypad">0</property>
+             <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+             <property name="width_chars">-1</property>
+             <property name="single_line_mode">False</property>
+             <property name="angle">0</property>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">False</property>
+             <property name="fill">False</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkEntry" id="entry_go_to_case">
+             <property name="width_request">50</property>
+             <property name="visible">True</property>
+             <property name="can_focus">True</property>
+             <property name="editable">True</property>
+             <property name="visibility">True</property>
+             <property name="max_length">0</property>
+             <property name="text" translatable="yes"></property>
+             <property name="has_frame">True</property>
+             <property name="invisible_char">*</property>
+             <property name="activates_default">False</property>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">True</property>
+             <property name="fill">True</property>
+           </packing>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">True</property>
+         <property name="fill">True</property>
+       </packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="sort-cases-dialog">
+  <property name="border_width">10</property>
+  <property name="can_focus">True</property>
+  <property name="title" translatable="yes">Sort Cases</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">True</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">True</property>
+  <property name="skip_pager_hint">True</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+
+  <child>
+    <widget class="GtkHBox" id="hbox12">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">9</property>
+
+      <child>
+       <widget class="GtkScrolledWindow" id="scrolledwindow6">
+         <property name="border_width">10</property>
+         <property name="visible">True</property>
+         <property name="can_focus">True</property>
+         <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+         <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+         <property name="shadow_type">GTK_SHADOW_IN</property>
+         <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+         <child>
+           <widget class="GtkTreeView" id="sort-cases-treeview-dict">
+             <property name="visible">True</property>
+             <property name="can_focus">True</property>
+             <property name="headers_visible">False</property>
+             <property name="rules_hint">False</property>
+             <property name="reorderable">True</property>
+             <property name="enable_search">True</property>
+             <property name="fixed_height_mode">True</property>
+             <property name="hover_selection">False</property>
+             <property name="hover_expand">False</property>
+           </widget>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">True</property>
+         <property name="fill">True</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkAlignment" id="alignment3">
+         <property name="visible">True</property>
+         <property name="xalign">0.5</property>
+         <property name="yalign">0.25</property>
+         <property name="xscale">0.460000008345</property>
+         <property name="yscale">0.0799999982119</property>
+         <property name="top_padding">0</property>
+         <property name="bottom_padding">0</property>
+         <property name="left_padding">0</property>
+         <property name="right_padding">0</property>
+
+         <child>
+           <widget class="GtkButton" id="sort-cases-button">
+             <property name="visible">True</property>
+             <property name="can_focus">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">True</property>
+
+             <child>
+               <widget class="GtkArrow" id="sort-cases-arrow">
+                 <property name="visible">True</property>
+                 <property name="arrow_type">GTK_ARROW_RIGHT</property>
+                 <property name="shadow_type">GTK_SHADOW_OUT</property>
+                 <property name="xalign">0.5</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+               </widget>
+             </child>
+           </widget>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">True</property>
+         <property name="fill">True</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkVBox" id="vbox11">
+         <property name="visible">True</property>
+         <property name="homogeneous">False</property>
+         <property name="spacing">4</property>
+
+         <child>
+           <widget class="GtkFrame" id="Sort Order">
+             <property name="height_request">75</property>
+             <property name="visible">True</property>
+             <property name="label_xalign">0</property>
+             <property name="label_yalign">0.5</property>
+             <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+             <child>
+               <widget class="GtkVBox" id="vbox13">
+                 <property name="border_width">12</property>
+                 <property name="height_request">66</property>
+                 <property name="visible">True</property>
+                 <property name="homogeneous">True</property>
+                 <property name="spacing">5</property>
+
+                 <child>
+                   <widget class="GtkRadioButton" id="sort-cases-button-ascending">
+                     <property name="visible">True</property>
+                     <property name="can_focus">True</property>
+                     <property name="label" translatable="yes">Ascending</property>
+                     <property name="use_underline">True</property>
+                     <property name="relief">GTK_RELIEF_NORMAL</property>
+                     <property name="focus_on_click">True</property>
+                     <property name="active">False</property>
+                     <property name="inconsistent">False</property>
+                     <property name="draw_indicator">True</property>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">False</property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkRadioButton" id="radiobutton-descending">
+                     <property name="visible">True</property>
+                     <property name="can_focus">True</property>
+                     <property name="label" translatable="yes">Descending</property>
+                     <property name="use_underline">True</property>
+                     <property name="relief">GTK_RELIEF_NORMAL</property>
+                     <property name="focus_on_click">True</property>
+                     <property name="active">False</property>
+                     <property name="inconsistent">False</property>
+                     <property name="draw_indicator">True</property>
+                     <property name="group">sort-cases-button-ascending</property>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">False</property>
+                   </packing>
+                 </child>
+               </widget>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="label15">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">Sort Order</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">True</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0.5</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                 <property name="width_chars">-1</property>
+                 <property name="single_line_mode">False</property>
+                 <property name="angle">0</property>
+               </widget>
+               <packing>
+                 <property name="type">label_item</property>
+               </packing>
+             </child>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">False</property>
+             <property name="fill">True</property>
+             <property name="pack_type">GTK_PACK_END</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkVBox" id="vbox12">
+             <property name="visible">True</property>
+             <property name="homogeneous">False</property>
+             <property name="spacing">0</property>
+
+             <child>
+               <widget class="GtkLabel" id="label16">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">Sort by:</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">False</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                 <property name="width_chars">-1</property>
+                 <property name="single_line_mode">False</property>
+                 <property name="angle">0</property>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">False</property>
+                 <property name="fill">False</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkScrolledWindow" id="scrolledwindow7">
+                 <property name="visible">True</property>
+                 <property name="can_focus">True</property>
+                 <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+                 <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                 <property name="shadow_type">GTK_SHADOW_IN</property>
+                 <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+                 <child>
+                   <widget class="GtkTreeView" id="sort-cases-treeview-criteria">
+                     <property name="visible">True</property>
+                     <property name="can_focus">True</property>
+                     <property name="headers_visible">False</property>
+                     <property name="rules_hint">False</property>
+                     <property name="reorderable">False</property>
+                     <property name="enable_search">True</property>
+                     <property name="fixed_height_mode">True</property>
+                     <property name="hover_selection">False</property>
+                     <property name="hover_expand">False</property>
+                   </widget>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">True</property>
+                 <property name="fill">True</property>
+               </packing>
+             </child>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">True</property>
+             <property name="fill">True</property>
+             <property name="pack_type">GTK_PACK_END</property>
+           </packing>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">True</property>
+         <property name="fill">True</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkVButtonBox" id="vbuttonbox7">
+         <property name="visible">True</property>
+         <property name="layout_style">GTK_BUTTONBOX_DEFAULT_STYLE</property>
+         <property name="spacing">0</property>
+
+         <child>
+           <widget class="GtkButton" id="sort-cases-ok">
+             <property name="visible">True</property>
+             <property name="can_default">True</property>
+             <property name="can_focus">True</property>
+             <property name="label">gtk-ok</property>
+             <property name="use_stock">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">True</property>
+           </widget>
+         </child>
+
+         <child>
+           <widget class="GtkButton" id="sort-cases-paste">
+             <property name="visible">True</property>
+             <property name="sensitive">False</property>
+             <property name="can_default">True</property>
+             <property name="can_focus">True</property>
+             <property name="label">gtk-paste</property>
+             <property name="use_stock">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">True</property>
+           </widget>
+         </child>
+
+         <child>
+           <widget class="GtkButton" id="sort-cases-reset">
+             <property name="visible">True</property>
+             <property name="can_default">True</property>
+             <property name="can_focus">True</property>
+             <property name="label">gtk-refresh</property>
+             <property name="use_stock">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">True</property>
+           </widget>
+         </child>
+
+         <child>
+           <widget class="GtkButton" id="sort-cases-cancel">
+             <property name="visible">True</property>
+             <property name="can_default">True</property>
+             <property name="can_focus">True</property>
+             <property name="label">gtk-cancel</property>
+             <property name="use_stock">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">True</property>
+           </widget>
+         </child>
+
+         <child>
+           <widget class="GtkButton" id="help_button_sort_cases">
+             <property name="visible">True</property>
+             <property name="can_default">True</property>
+             <property name="can_focus">True</property>
+             <property name="label">gtk-help</property>
+             <property name="use_stock">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">True</property>
+           </widget>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">6</property>
+         <property name="expand">True</property>
+         <property name="fill">False</property>
+       </packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
diff --git a/src/ui/gui/data-editor.h b/src/ui/gui/data-editor.h
new file mode 100644 (file)
index 0000000..d0c6d09
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+    PSPPIRE --- A Graphical User Interface for PSPP
+    Copyright (C) 2006  Free Software Foundation
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+    02110-1301, USA. */
+
+
+#ifndef DATA_EDITOR_H
+#define DATA_EDITOR_H
+
+#include <glade/glade.h>
+#include <gtk/gtk.h>
+#include "window-manager.h"
+
+struct data_editor
+{
+  struct editor_window parent;
+  GladeXML *xml;
+};
+
+
+struct data_editor * new_data_editor (void);
+
+void new_data_window (GtkMenuItem *, gpointer);
+
+void open_data_window (GtkMenuItem *, gpointer);
+
+void data_editor_select_sheet(struct data_editor *de, gint page);
+
+
+#endif
index 03cf1c4f73022af91bb36b21cec21fffee7de6b2..6cd26bce09b6e3c90572e68e6172cbb3480f6993 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
    PSPPIRE --- A Graphical User Interface for PSPP
    Copyright (C) 2004, 2005, 2006  Free Software Foundation
 
@@ -15,7 +15,7 @@
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-   02110-1301, USA. 
+   02110-1301, USA.
 */
 
 #include <config.h>
 #include <data/case.h>
 #include <data/data-in.h>
 
-#include "menu-actions.h"
 #include "data-sheet.h"
 
 
-
-extern GladeXML *xml;
-
-static gboolean 
-traverse_callback (GtkSheet * sheet, 
-                  gint row, gint col, 
+static gboolean
+traverse_callback (GtkSheet * sheet,
+                  gint row, gint col,
                   gint *new_row, gint *new_column
                   )
 {
   gint case_count;
-  PsppireDataStore *data_store = PSPPIRE_DATA_STORE(gtk_sheet_get_model(sheet));
-  const gint n_vars = psppire_dict_get_var_cnt(data_store->dict);
+  gint n_vars;
+
+  PsppireDataStore *data_store =
+    PSPPIRE_DATA_STORE(gtk_sheet_get_model(sheet));
+
 
-  if ( *new_column >= n_vars ) 
+  g_assert (data_store);
+
+  n_vars = psppire_dict_get_var_cnt(data_store->dict);
+
+  if ( *new_column >= n_vars )
     return FALSE;
 
   case_count = psppire_case_file_get_case_count(data_store->case_file);
@@ -62,7 +65,7 @@ traverse_callback (GtkSheet * sheet,
     {
       gint i;
 
-      for ( i = case_count ; i <= *new_row; ++i ) 
+      for ( i = case_count ; i <= *new_row; ++i )
        psppire_data_store_insert_new_case (data_store, i);
 
       return TRUE;
@@ -73,28 +76,13 @@ traverse_callback (GtkSheet * sheet,
 
 
 
-/* Callback which occurs when the column title is double clicked */
-static gboolean
-click2column(GtkWidget *w, gint col, gpointer data)
-{
-  gint current_row, current_column;
-  GtkWidget *var_sheet  = get_widget_assert(xml, "variable_sheet");
-
-  select_sheet(PAGE_VAR_SHEET);
-
-  gtk_sheet_get_active_cell(GTK_SHEET(var_sheet), 
-                           &current_row, &current_column);
-
-  gtk_sheet_set_active_cell(GTK_SHEET(var_sheet), col, current_column);
-
-  return FALSE;
-}
-
-
 /* Update the data_ref_entry with the reference of the active cell */
-gint 
+gint
 update_data_ref_entry(const GtkSheet *sheet, gint row, gint col)
 {
+  GladeXML *data_editor_xml = NULL; /* FIXME !!!! */
+
 
   /* The entry where the reference to the current cell is displayed */
   GtkEntry *cell_ref_entry;
@@ -102,19 +90,20 @@ update_data_ref_entry(const GtkSheet *sheet, gint row, gint col)
   PsppireDataStore *data_store = PSPPIRE_DATA_STORE(gtk_sheet_get_model(sheet));
   if (data_store)
     {
-      const struct variable *pv = 
+      const struct variable *pv =
        psppire_dict_get_variable(data_store->dict, col);
 
       gchar *text ;
       gchar *s ;
 
-      if ( !xml) 
+      if ( !data_editor_xml)
        return FALSE;
 
-      text = g_strdup_printf("%d: %s", row, 
+      text = g_strdup_printf("%d: %s", row,
                             pv ? var_get_name (pv) : "");
-  
-      cell_ref_entry = GTK_ENTRY(get_widget_assert(xml, "cell_ref_entry"));
+      cell_ref_entry = GTK_ENTRY(get_widget_assert (data_editor_xml,
+                                                  "cell_ref_entry"));
 
       s = pspp_locale_to_utf8(text, -1, 0);
 
@@ -128,11 +117,11 @@ update_data_ref_entry(const GtkSheet *sheet, gint row, gint col)
   return FALSE;
 }
 
-extern PsppireDataStore *data_store ;
+extern PsppireDataStore *the_data_store ;
 
 
 /* Return the width that an  'M' character would occupy when typeset in WIDGET */
-static guint 
+static guint
 calc_m_width(GtkWidget *widget, const PangoFontDescription *font_desc)
 {
   PangoRectangle rect;
@@ -145,7 +134,7 @@ calc_m_width(GtkWidget *widget, const PangoFontDescription *font_desc)
   g_assert (layout);
 
   pango_layout_set_text (layout, "M", 1);
-  
   pango_layout_set_font_description (layout, font_desc);
 
   pango_layout_get_extents (layout, NULL, &rect);
@@ -173,10 +162,10 @@ psppire_data_sheet_create (gchar *widget_name, gchar *string1, gchar *string2,
 {
   GtkWidget *sheet;
 
-  sheet = gtk_sheet_new(G_SHEET_ROW(data_store), 
-                       G_SHEET_COLUMN(data_store), "data sheet", 0); 
+  sheet = gtk_sheet_new(G_SHEET_ROW(the_data_store),
+                       G_SHEET_COLUMN(the_data_store), "data sheet", 0);
 
-  data_store->width_of_m = calc_m_width(sheet, data_store->font_desc);
+  the_data_store->width_of_m = calc_m_width(sheet, the_data_store->font_desc);
 
   g_signal_connect (G_OBJECT (sheet), "activate",
                    G_CALLBACK (update_data_ref_entry),
@@ -186,14 +175,14 @@ psppire_data_sheet_create (gchar *widget_name, gchar *string1, gchar *string2,
                    G_CALLBACK (traverse_callback), 0);
 
 
-  g_signal_connect (G_OBJECT (sheet), "double-click-column",
-                   G_CALLBACK (click2column),
-                   0);
-
-  g_signal_connect (G_OBJECT (data_store), "font-changed",
+  g_signal_connect (G_OBJECT (the_data_store), "font-changed",
                    G_CALLBACK (font_change_callback), sheet);
 
   gtk_sheet_set_active_cell(GTK_SHEET(sheet), -1, -1);
+
+
+  gtk_sheet_set_model(sheet, G_SHEET_MODEL(the_data_store));
+
   gtk_widget_show(sheet);
 
   return sheet;
diff --git a/src/ui/gui/menu-actions.c b/src/ui/gui/menu-actions.c
deleted file mode 100644 (file)
index 265cd6c..0000000
+++ /dev/null
@@ -1,734 +0,0 @@
-/*
-    PSPPIRE --- A Graphical User Interface for PSPP
-    Copyright (C) 2004, 2005, 2006  Free Software Foundation
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-    02110-1301, USA. */
-
-#include <config.h>
-#include <stdlib.h>
-#include <gettext.h>
-#define _(msgid) gettext (msgid)
-#define N_(msgid) msgid
-
-#include <math/sort.h>
-
-#include <data/casefile.h>
-#include <data/file-handle-def.h>
-#include <data/sys-file-reader.h>
-#include <data/case.h>
-#include <data/variable.h>
-
-#include <glade/glade.h>
-#include <gtk/gtk.h>
-
-#include <libpspp/str.h>
-
-#include <gtksheet/gtksheet.h>
-#include "helper.h"
-#include "menu-actions.h"
-
-#include "psppire-dict.h"
-
-#include "var-sheet.h"
-#include "data-sheet.h"
-
-#include "psppire-var-store.h"
-#include "psppire-data-store.h"
-
-#include "sort-cases-dialog.h"
-
-
-extern GladeXML *xml;
-
-
-extern PsppireDict *the_dictionary ;
-
-static struct file_handle *psppire_handle = 0;
-
-static const gchar handle_name[] = "psppire_handle";
-
-static const gchar untitled[] = N_("Untitled");
-
-static const gchar window_title[] = N_("PSPP Data Editor");
-
-
-/* Sets the title bar to TEXT */
-static void
-psppire_set_window_title(const gchar *text)
-{
-  GtkWidget *data_editor = get_widget_assert(xml, "data_editor");
-
-  gchar *title = g_strdup_printf("%s --- %s", text, gettext(window_title));
-
-  gtk_window_set_title(GTK_WINDOW(data_editor), title);
-
-  g_free(title);
-}
-
-/* Clear the active file and set the data and var sheets to
-   reflect this.
- */
-gboolean
-clear_file(void)
-{
-  PsppireDataStore *data_store ;
-  GtkSheet *data_sheet = GTK_SHEET(get_widget_assert(xml, "data_sheet"));
-  GtkSheet *var_sheet = GTK_SHEET(get_widget_assert(xml, "variable_sheet"));
-
-  gtk_sheet_set_active_cell(data_sheet, -1, -1);
-  gtk_sheet_set_active_cell(var_sheet, 0, 0);
-
-  if ( GTK_WIDGET_REALIZED(GTK_WIDGET(data_sheet)))
-    gtk_sheet_unselect_range(data_sheet);
-
-  if ( GTK_WIDGET_REALIZED(GTK_WIDGET(var_sheet)))
-    gtk_sheet_unselect_range(var_sheet);
-
-  gtk_sheet_moveto(data_sheet, 0, 0, 0.0, 0.0);
-  gtk_sheet_moveto(var_sheet,  0, 0, 0.0, 0.0);
-
-  data_store = PSPPIRE_DATA_STORE(gtk_sheet_get_model(data_sheet));
-
-  psppire_data_store_clear(data_store);
-
-  psppire_set_window_title(gettext(untitled));
-
-  if (psppire_handle)
-    fh_free(psppire_handle);
-  psppire_handle = 0 ;
-
-  return TRUE;
-}
-
-void
-on_new1_activate                       (GtkMenuItem     *menuitem,
-                                        gpointer         user_data)
-{
-  clear_file();
-}
-
-
-
-/* Load a system file.
-   Return TRUE if successfull
-*/
-gboolean
-load_system_file(const gchar *file_name)
-{
-  int var_cnt ;
-
-  PsppireVarStore *var_store ;
-  PsppireDataStore *data_store ;
-  struct dictionary *new_dict;
-  struct sfm_read_info ri;
-  struct sfm_reader *reader ;
-
-  GtkWidget *data_sheet = get_widget_assert(xml, "data_sheet");
-  GtkWidget *var_sheet = get_widget_assert(xml, "variable_sheet");
-
-  g_assert(data_sheet);
-  g_assert(var_sheet);
-
-  clear_file();
-
-  psppire_handle =
-    fh_create_file (handle_name, file_name, fh_default_properties());
-
-  if ( !psppire_handle )
-    {
-      g_warning("Cannot read handle for reading system file \"%s\"\n",
-               file_name);
-      return FALSE;
-    }
-
-  reader = sfm_open_reader (psppire_handle, &new_dict, &ri);
-
-  if ( ! reader )
-    return FALSE;
-
-  /* FIXME: We need a better way of updating a dictionary than this */
-  the_dictionary = psppire_dict_new_from_dict(new_dict);
-
-  var_store =
-    PSPPIRE_VAR_STORE(gtk_sheet_get_model(GTK_SHEET(var_sheet)));
-
-  psppire_var_store_set_dictionary(var_store, the_dictionary);
-
-
-  data_store =
-    PSPPIRE_DATA_STORE(gtk_sheet_get_model(GTK_SHEET(data_sheet)));
-
-  psppire_data_store_set_dictionary(data_store,
-                                   the_dictionary);
-
-  psppire_set_window_title(basename(file_name));
-
-  var_cnt = dict_get_next_value_idx(the_dictionary->dict);
-  if ( var_cnt == 0 )
-    return FALSE;
-
-
-  for(;;)
-    {
-      struct ccase c;
-      case_create(&c, var_cnt);
-      if ( 0 == sfm_read_case (reader, &c) )
-       {
-         case_destroy(&c);
-         break;
-       }
-
-      if ( !psppire_case_file_append_case(data_store->case_file, &c) )
-       {
-         g_warning("Cannot write case to casefile\n");
-         break;
-       }
-      case_destroy(&c);
-    }
-
-  sfm_close_reader(reader);
-
-  psppire_case_file_get_case_count(data_store->case_file);
-
-  return TRUE;
-}
-
-void
-open_data                      (GtkMenuItem     *menuitem,
-                               gpointer         user_data)
-{
-  bool finished = FALSE;
-
-  GtkWidget *dialog;
-  GtkWidget *data_editor  = get_widget_assert(xml, "data_editor");
-  GtkFileFilter *filter ;
-
-  dialog = gtk_file_chooser_dialog_new (_("Open"),
-                                       GTK_WINDOW(data_editor),
-                                       GTK_FILE_CHOOSER_ACTION_OPEN,
-                                       GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
-                                       GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
-                                       NULL);
-
-  filter = gtk_file_filter_new();
-  gtk_file_filter_set_name(filter, _("System Files (*.sav)"));
-  gtk_file_filter_add_pattern(filter, "*.sav");
-  gtk_file_filter_add_pattern(filter, "*.SAV");
-  gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter);
-
-  filter = gtk_file_filter_new();
-  gtk_file_filter_set_name(filter, _("Portable Files (*.por) "));
-  gtk_file_filter_add_pattern(filter, "*.por");
-  gtk_file_filter_add_pattern(filter, "*.POR");
-  gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter);
-
-  filter = gtk_file_filter_new();
-  gtk_file_filter_set_name(filter, _("All Files"));
-  gtk_file_filter_add_pattern(filter, "*");
-  gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter);
-
-  do {
-
-    if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
-      {
-       gchar *file_name =
-         gtk_file_chooser_get_filename(GTK_FILE_CHOOSER (dialog));
-
-       finished =  load_system_file(file_name) ;
-
-       g_free(file_name);
-      }
-    else
-      finished = TRUE;
-
-  } while ( ! finished ) ;
-
-  gtk_widget_destroy (dialog);
-}
-
-
-void
-on_data3_activate                      (GtkMenuItem     *menuitem,
-                                       gpointer         user_data)
-{
-  open_data(menuitem, user_data);
-}
-
-void
-on_data5_activate                      (GtkMenuItem     *menuitem,
-                                       gpointer         user_data)
-{
-  open_data(menuitem, user_data);
-}
-
-
-/* Re initialise HANDLE, by interrogating the user for a new file name */
-static gboolean
-recreate_save_handle(struct file_handle **handle)
-{
-  gint response;
-  GtkWidget *dialog;
-
-  GtkWidget *data_editor  = get_widget_assert(xml, "data_editor");
-
-  dialog = gtk_file_chooser_dialog_new (_("Save Data As"),
-                                       GTK_WINDOW(data_editor),
-                                       GTK_FILE_CHOOSER_ACTION_SAVE,
-                                       GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
-                                       GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
-                                       NULL);
-
-  response = gtk_dialog_run (GTK_DIALOG (dialog));
-
-  if (response == GTK_RESPONSE_ACCEPT)
-    {
-      char *file_name = gtk_file_chooser_get_filename
-       (GTK_FILE_CHOOSER (dialog));
-
-
-      if ( *handle )
-       fh_free(*handle);
-
-      *handle = fh_create_file (handle_name, file_name,
-                       fh_default_properties());
-
-      psppire_set_window_title(basename(file_name));
-
-      g_free (file_name);
-    }
-
-  gtk_widget_destroy (dialog);
-
-  return ( response == GTK_RESPONSE_ACCEPT ) ;
-}
-
-void
-on_save1_activate                      (GtkMenuItem     *menuitem,
-                                        gpointer         user_data)
-{
-  GtkSheet *data_sheet ;
-  PsppireDataStore *data_store ;
-
-  if ( ! psppire_handle )
-    {
-      if ( ! recreate_save_handle(&psppire_handle) )
-       return;
-    }
-
-  data_sheet = GTK_SHEET(get_widget_assert(xml, "data_sheet"));
-  data_store = PSPPIRE_DATA_STORE(gtk_sheet_get_model(data_sheet));
-
-  if ( psppire_handle )
-    psppire_data_store_create_system_file(data_store,
-                                      psppire_handle);
-}
-
-
-void
-on_save_as1_activate                   (GtkMenuItem     *menuitem,
-                                        gpointer         user_data)
-{
-  GtkSheet *data_sheet ;
-  PsppireDataStore *data_store ;
-
-  if ( ! recreate_save_handle(&psppire_handle) )
-    return ;
-
-  if ( ! psppire_handle )
-    return ;
-
-  data_sheet = GTK_SHEET(get_widget_assert(xml, "data_sheet"));
-  data_store = PSPPIRE_DATA_STORE(gtk_sheet_get_model(data_sheet));
-
-  if ( psppire_handle )
-    psppire_data_store_create_system_file(data_store,
-                                      psppire_handle);
-}
-
-
-void
-on_quit1_activate                      (GtkMenuItem     *menuitem,
-                                        gpointer         user_data)
-{
-  gtk_main_quit();
-}
-
-
-void
-on_clear_activate                    (GtkMenuItem     *menuitem,
-                                     gpointer         user_data)
-{
-  GtkNotebook *notebook = GTK_NOTEBOOK(get_widget_assert(xml, "notebook1"));
-  gint page = -1;
-
-  page = gtk_notebook_get_current_page(notebook);
-
-  switch (page)
-    {
-    case PAGE_VAR_SHEET:
-           break;
-    case PAGE_DATA_SHEET:
-      {
-       GtkSheet *data_sheet = GTK_SHEET(get_widget_assert(xml, "data_sheet"));
-       PsppireDataStore *data_store =
-         PSPPIRE_DATA_STORE(gtk_sheet_get_model(data_sheet));
-
-
-       switch ( data_sheet->state )
-         {
-         case GTK_SHEET_ROW_SELECTED:
-           psppire_case_file_delete_cases(data_store->case_file,
-                                          data_sheet->range.rowi
-                                          - data_sheet->range.row0 + 1,
-                                          data_sheet->range.row0);
-           break;
-         case GTK_SHEET_COLUMN_SELECTED:
-           {
-             gint fv;
-             struct variable *pv =
-               psppire_dict_get_variable (the_dictionary,
-                                          data_sheet->range.col0);
-
-             fv = var_get_case_index (pv);
-
-             psppire_dict_delete_variables (the_dictionary,
-                                            data_sheet->range.col0,
-                                            1);
-
-             psppire_case_file_insert_values (data_store->case_file,
-                                              -1, fv);
-           }
-           break;
-         default:
-           gtk_sheet_cell_clear (data_sheet,
-                                 data_sheet->active_cell.row,
-                                 data_sheet->active_cell.col);
-           break;
-         }
-
-      }
-      break;
-    }
-
-}
-
-void
-on_about1_activate(GtkMenuItem     *menuitem,
-                  gpointer         user_data)
-{
-  GtkWidget *about =  get_widget_assert(xml, "aboutdialog1");
-
-
-  GdkPixbuf *pb  = gdk_pixbuf_new_from_file_at_size( "pspplogo.png", 64, 64, 0);
-
-  gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(about), pb);
-
-  gtk_widget_show(about);
-
-  gtk_window_set_transient_for(GTK_WINDOW(about),
-                               GTK_WINDOW(get_widget_assert(xml, "data_editor")));
-}
-
-
-/* Set the value labels state from the toolbar's toggle button */
-void
-on_togglebutton_value_labels_toggled(GtkToggleToolButton *toggle_tool_button,
-                                    gpointer             user_data)
-{
-  GtkSheet *data_sheet = GTK_SHEET(get_widget_assert(xml, "data_sheet"));
-  GtkCheckMenuItem *item =
-    GTK_CHECK_MENU_ITEM(get_widget_assert(xml, "menuitem-value-labels"));
-
-  PsppireDataStore *ds = PSPPIRE_DATA_STORE(gtk_sheet_get_model(data_sheet));
-
-  gboolean show_value_labels = gtk_toggle_tool_button_get_active(toggle_tool_button);
-
-  gtk_check_menu_item_set_active(item, show_value_labels);
-
-  psppire_data_store_show_labels(ds, show_value_labels);
-}
-
-/* Set the value labels state from the view menu */
-void
-on_value_labels_activate(GtkCheckMenuItem     *menuitem,
-                         gpointer         user_data)
-{
-  GtkSheet *data_sheet = GTK_SHEET(get_widget_assert(xml, "data_sheet"));
-  GtkToggleToolButton *tb =
-   GTK_TOGGLE_TOOL_BUTTON(get_widget_assert(xml, "togglebutton-value-labels"));
-
-  PsppireDataStore *ds = PSPPIRE_DATA_STORE(gtk_sheet_get_model(data_sheet));
-
-  gboolean show_value_labels = gtk_check_menu_item_get_active(menuitem);
-
-  gtk_toggle_tool_button_set_active(tb, show_value_labels);
-
-  psppire_data_store_show_labels(ds, show_value_labels);
-}
-
-void
-on_status_bar1_activate(GtkCheckMenuItem     *menuitem,
- gpointer         user_data)
-{
-
-  if ( gtk_check_menu_item_get_active(menuitem) )
-    gtk_widget_show(get_widget_assert(xml, "statusbar1"));
-  else
-    gtk_widget_hide(get_widget_assert(xml, "statusbar1"));
-}
-
-void
-on_grid_lines1_activate(GtkCheckMenuItem     *menuitem,
- gpointer         user_data)
-{
-
-  const bool grid_visible = gtk_check_menu_item_get_active(menuitem);
-
-  gtk_sheet_show_grid(GTK_SHEET(get_widget_assert(xml, "variable_sheet")),
-                     grid_visible);
-
-  gtk_sheet_show_grid(GTK_SHEET(get_widget_assert(xml, "data_sheet")),
-                     grid_visible);
-}
-
-
-void
-on_fonts1_activate(GtkMenuItem     *menuitem,
- gpointer         user_data)
-{
-  static GtkWidget *dialog = 0 ;
-  if ( !dialog )
-    dialog   = gtk_font_selection_dialog_new(_("Font Selection"));
-
-  gtk_window_set_transient_for(GTK_WINDOW(dialog),
-                               GTK_WINDOW(get_widget_assert(xml, "data_editor")));
-
-
-  if ( GTK_RESPONSE_OK == gtk_dialog_run(GTK_DIALOG(dialog)) )
-    {
-      GtkSheet *data_sheet =
-       GTK_SHEET(get_widget_assert(xml, "data_sheet"));
-
-      GtkSheet *var_sheet =
-       GTK_SHEET(get_widget_assert(xml, "variable_sheet"));
-
-      PsppireDataStore *ds = PSPPIRE_DATA_STORE(gtk_sheet_get_model(data_sheet));
-      PsppireVarStore *vs = PSPPIRE_VAR_STORE(gtk_sheet_get_model(var_sheet));
-
-      const gchar *font = gtk_font_selection_dialog_get_font_name
-       (GTK_FONT_SELECTION_DIALOG(dialog));
-
-      PangoFontDescription* font_desc =
-       pango_font_description_from_string(font);
-
-      psppire_var_store_set_font(vs, font_desc);
-      psppire_data_store_set_font(ds, font_desc);
-    }
-
-  gtk_widget_hide(dialog);
-
-}
-
-
-static GtkWidget *menuitems[2];
-static GtkNotebook *notebook = 0;
-
-static void
-switch_menus(gint page)
-{
-  GtkWidget *insert_variable = get_widget_assert(xml, "insert-variable");
-  GtkWidget *insert_cases = get_widget_assert(xml, "insert-cases");
-
-  switch (page)
-    {
-    case PAGE_VAR_SHEET:
-      gtk_widget_hide(menuitems[PAGE_VAR_SHEET]);
-      gtk_widget_show(menuitems[PAGE_DATA_SHEET]);
-      gtk_widget_set_sensitive(insert_variable, TRUE);
-      gtk_widget_set_sensitive(insert_cases, FALSE);
-      break;
-    case PAGE_DATA_SHEET:
-      gtk_widget_show(menuitems[PAGE_VAR_SHEET]);
-      gtk_widget_hide(menuitems[PAGE_DATA_SHEET]);
-      gtk_widget_set_sensitive(insert_variable, FALSE);
-      gtk_widget_set_sensitive(insert_cases, TRUE);
-      break;
-    default:
-      g_assert_not_reached();
-      break;
-    }
-}
-
-
-void
-select_sheet(gint page)
-{
-  gtk_notebook_set_current_page(notebook, page);
-  switch_menus(page);
-}
-
-
-
-static void
-data_var_select(GtkNotebook *notebook,
-               GtkNotebookPage *page,
-               guint page_num,
-               gpointer user_data)
-{
-  switch_menus(page_num);
-}
-
-
-/* Initialised things on the variable sheet */
-void
-var_data_selection_init(void)
-{
-  notebook = GTK_NOTEBOOK(get_widget_assert(xml, "notebook1"));
-  menuitems[PAGE_DATA_SHEET] = get_widget_assert(xml, "data1");
-  menuitems[PAGE_VAR_SHEET] = get_widget_assert(xml, "variables1");
-
-  gtk_notebook_set_current_page(notebook, PAGE_DATA_SHEET);
-  gtk_widget_hide(menuitems[PAGE_DATA_SHEET]);
-  gtk_widget_show(menuitems[PAGE_VAR_SHEET]);
-
-
-  g_signal_connect(G_OBJECT(notebook), "switch-page",
-                  G_CALLBACK(data_var_select), 0);
-
-}
-
-
-void
-on_data1_activate(GtkMenuItem     *menuitem,
-                 gpointer         user_data)
-{
-  select_sheet(PAGE_DATA_SHEET);
-}
-
-
-void
-on_variables1_activate(GtkMenuItem     *menuitem,
-                 gpointer         user_data)
-{
-  select_sheet(PAGE_VAR_SHEET);
-}
-
-
-
-void
-on_go_to_case_activate(GtkMenuItem     *menuitem,
-                      gpointer         user_data)
-{
-  GtkWidget *dialog = get_widget_assert(xml, "go_to_case_dialog");
-  GtkEntry *entry = GTK_ENTRY(get_widget_assert(xml, "entry_go_to_case"));
-  GtkSheet *data_sheet = GTK_SHEET(get_widget_assert(xml, "data_sheet"));
-
-  gint result = gtk_dialog_run(GTK_DIALOG(dialog));
-
-
-
-  switch (result)
-    {
-    case GTK_RESPONSE_OK:
-      {
-       gint row, column;
-       const gchar *text = gtk_entry_get_text(entry);
-       gint casenum = g_strtod(text, NULL);
-
-       gtk_sheet_get_active_cell(data_sheet, &row, &column);
-       if ( column < 0 ) column = 0;
-       if ( row < 0 ) row = 0;
-
-       gtk_sheet_set_active_cell(data_sheet, casenum, column);
-      }
-      break;
-    default:
-      break;
-    }
-
-  gtk_widget_hide(dialog);
-  gtk_entry_set_text(entry, "");
-}
-
-
-
-void
-on_sort_cases_activate (GtkMenuItem     *menuitem,
-                       gpointer         user_data)
-{
-  gint response;
-  PsppireDataStore *data_store ;
-
-  struct sort_criteria criteria;
-  static struct sort_cases_dialog *dialog ;
-
-  GtkSheet *data_sheet = GTK_SHEET(get_widget_assert(xml, "data_sheet"));
-
-  data_store = PSPPIRE_DATA_STORE(gtk_sheet_get_model(data_sheet));
-
-  if ( NULL == dialog)
-    dialog = sort_cases_dialog_create(xml);
-
-  response = sort_cases_dialog_run(dialog, the_dictionary, &criteria);
-
-  switch ( response)
-    {
-    case GTK_RESPONSE_OK:
-      psppire_case_file_sort(data_store->case_file, &criteria);
-      break;
-    }
-}
-
-
-static void
-insert_case(void)
-{
-  gint row, col;
-  PsppireDataStore *data_store ;
-  GtkSheet *data_sheet = GTK_SHEET(get_widget_assert(xml, "data_sheet"));
-
-  data_store = PSPPIRE_DATA_STORE(gtk_sheet_get_model(data_sheet));
-
-  gtk_sheet_get_active_cell(data_sheet, &row, &col);
-
-  psppire_data_store_insert_new_case(data_store, row);
-}
-
-void
-on_insert_case_clicked (GtkButton *button, gpointer user_data)
-{
-  insert_case();
-}
-
-void
-on_insert_cases (GtkMenuItem *menuitem, gpointer user_data)
-{
-  insert_case();
-}
-
-
-void
-on_insert_variable (GtkMenuItem *menuitem, gpointer user_data)
-{
-  gint row, col;
-  GtkSheet *var_sheet = GTK_SHEET(get_widget_assert(xml, "variable_sheet"));
-
-  gtk_sheet_get_active_cell(var_sheet, &row, &col);
-
-  psppire_dict_insert_variable(the_dictionary, row, NULL);
-}
-
-
diff --git a/src/ui/gui/menu-actions.h b/src/ui/gui/menu-actions.h
deleted file mode 100644 (file)
index 281e1f0..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-/* 
-    PSPPIRE --- A Graphical User Interface for PSPP
-    Copyright (C) 2004  Free Software Foundation
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-    02110-1301, USA. */
-
-#ifndef MENU_ACTIONS_H
-#define MENU_ACTIONS_H 
-
-#include <gtk/gtk.h>
-
-
-void
-on_new1_activate                       (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_open1_activate                      (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_save1_activate                      (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_save_as1_activate                   (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_quit1_activate                      (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_cut1_activate                       (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_copy1_activate                      (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_paste1_activate                     (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_delete1_activate                    (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_about1_activate                     (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-GtkWidget*
-psppire_data_sheet_create (gchar *widget_name, gchar *string1, gchar *string2,
-                gint int1, gint int2);
-
-GtkWidget*
-psppire_data_sheet_create (gchar *widget_name, gchar *string1, gchar *string2,
-                gint int1, gint int2);
-
-GtkWidget*
-psppire_variable_sheet_create (gchar *widget_name, gchar *string1, gchar *string2,
-                gint int1, gint int2);
-
-
-/* Switch between the VAR SHEET and the DATA SHEET */
-enum {PAGE_DATA_SHEET = 0, PAGE_VAR_SHEET};
-
-gboolean load_system_file(const gchar *file_name);
-gboolean clear_file(void);
-
-void select_sheet(gint page);
-void var_data_selection_init(void);
-
-
-#endif
-
-
-
index 8b910ce242a093d74fa4451c4f50c372b1688ce7..f550e8fce853c1abd2ea6e297e2974c9a5764c26 100644 (file)
 
 #include "helper.h"
 
-extern GladeXML *xml;
-
-
-
 static void enqueue_msg (const struct msg *m);
 
 
@@ -137,9 +133,7 @@ popup_message(const struct msg *m)
       break;
     };
 
-  parent = GTK_WINDOW(get_widget_assert(xml, "data_editor"));
-
-  dialog = gtk_message_dialog_new(parent,
+  dialog = gtk_message_dialog_new ( NULL,
                                  GTK_DIALOG_MODAL,
                                  message_type,
                                  GTK_BUTTONS_CLOSE,
@@ -151,7 +145,7 @@ popup_message(const struct msg *m)
                                           m->where.line_number,
                                           m->text);
 
-  gtk_window_set_transient_for(GTK_WINDOW(dialog), parent);
+  gtk_window_set_keep_above (GTK_WINDOW(dialog), TRUE);
 
   gtk_dialog_run(GTK_DIALOG(dialog));
 
index ed4c790b95a38797dbbe8e730ffa9cfa1c9b0fe4..59dde1b082f44fe96191361a16bb01db33cd6c3d 100644 (file)
@@ -23,6 +23,7 @@
 #include <libintl.h>
 
 
+#include "data-editor.h"
 #include <libpspp/version.h>
 #include <libpspp/copyleft.h>
 #include <data/file-handle-def.h>
@@ -37,7 +38,6 @@
 #include <gtk/gtk.h>
 #include <gtk/gtk.h>
 #include <glade/glade.h>
-#include "menu-actions.h"
 #include "psppire-dict.h"
 #include "psppire-var-store.h"
 #include "psppire-data-store.h"
 #include "message-dialog.h"
 #include "flexifile-factory.h"
 
-GladeXML *xml;
-
-
-PsppireDict *the_dictionary = 0;
-
-PsppireDataStore *data_store = 0;
+PsppireDataStore *the_data_store = 0;
 
 
 static bool parse_command_line (int *argc, char ***argv, 
@@ -78,7 +73,7 @@ give_help(void)
   popup_message(&m);
 }
 
-PsppireVarStore *var_store = 0;
+PsppireVarStore *the_var_store = 0;
 
 void create_icon_factory (void);
 
@@ -91,6 +86,8 @@ int
 main(int argc, char *argv[]) 
 {
   struct casefile_factory *factory;
+  PsppireDict *dictionary = 0;
+
 
   GtkWidget *data_editor ;
   GtkSheet *var_sheet ; 
@@ -139,7 +136,7 @@ main(int argc, char *argv[])
 
   message_dialog_init (the_source_stream);
 
-  the_dictionary =
+  dictionary =
     psppire_dict_new_from_dict (
                                dataset_dict (the_dataset)
                                );
@@ -147,46 +144,44 @@ main(int argc, char *argv[])
   bind_textdomain_codeset(PACKAGE, "UTF-8");
 
   /* Create the model for the var_sheet */
-  var_store = psppire_var_store_new(the_dictionary);
+  the_var_store = psppire_var_store_new(dictionary);
 
-  data_store = psppire_data_store_new(the_dictionary);
+
+  the_data_store = psppire_data_store_new (dictionary);
 
   create_icon_factory();
 
+#if 0
   /* load the interface */
-  xml = glade_xml_new(PKGDATADIR "/psppire.glade", NULL, NULL);
+  data_editor_xml = glade_xml_new(PKGDATADIR "/data-editor.glade", NULL, NULL);
 
-  if ( !xml ) return 1;
+  if ( !data_editor_xml ) return 1;
 
-  data_editor = get_widget_assert(xml, "data_editor");
-  gtk_window_set_icon_from_file(GTK_WINDOW(data_editor),
-                               PKGDATADIR "/psppicon.png",0);
+  data_editor = get_widget_assert(data_editor_xml, "data_editor");
 
   /* connect the signals in the interface */
-  glade_xml_signal_autoconnect(xml);
-
-  var_sheet  = GTK_SHEET(get_widget_assert(xml, "variable_sheet"));
-  data_sheet = GTK_SHEET(get_widget_assert(xml, "data_sheet"));
+  glade_xml_signal_autoconnect(data_editor_xml);
 
-  gtk_sheet_set_model(var_sheet, G_SHEET_MODEL(var_store));
+  var_sheet  = GTK_SHEET(get_widget_assert(data_editor_xml, "variable_sheet"));
+  data_sheet = GTK_SHEET(get_widget_assert(data_editor_xml, "data_sheet"));
 
-  gtk_sheet_set_model(data_sheet, G_SHEET_MODEL(data_store));
+  gtk_sheet_set_model(var_sheet, G_SHEET_MODEL(the_var_store));
 
-  if (filename)
-    gtk_init_add((GtkFunction)load_system_file, filename);
-  else
-    gtk_init_add((GtkFunction)clear_file, 0);
+  gtk_sheet_set_model(data_sheet, G_SHEET_MODEL(the_data_store));
 
   var_data_selection_init();
 
   {
-  GList *helps = glade_xml_get_widget_prefix(xml, "help_button_");
+  GList *helps = glade_xml_get_widget_prefix(data_editor_xml, "help_button_");
 
   GList *i;
   for ( i = g_list_first(helps); i ; i = g_list_next(i))
       g_signal_connect(GTK_WIDGET(i->data), "clicked", give_help, 0);
   }
 
+#endif
+
+  new_data_window (NULL, NULL);
 
   /* start the event loop */
   gtk_main();
index c98446b03eb0cd7a41be0770d452c1823be3cf2b..d8a9bbee31685400a02e20e1238b6b5809ca8d57 100644 (file)
 
 <glade-interface>
 
-<widget class="GtkWindow" id="data_editor">
-  <property name="visible">True</property>
-  <property name="title">Psppire Data Editor</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="default_width">975</property>
-  <property name="default_height">480</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-
-  <child>
-    <widget class="GtkVBox" id="vbox1">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">0</property>
-
-      <child>
-       <widget class="GtkMenuBar" id="menubar1">
-         <property name="visible">True</property>
-         <property name="pack_direction">GTK_PACK_DIRECTION_LTR</property>
-         <property name="child_pack_direction">GTK_PACK_DIRECTION_LTR</property>
-
-         <child>
-           <widget class="GtkMenuItem" id="menuitem1">
-             <property name="visible">True</property>
-             <property name="label" translatable="yes">_File</property>
-             <property name="use_underline">True</property>
-
-             <child>
-               <widget class="GtkMenu" id="menuitem1_menu">
-
-                 <child>
-                   <widget class="GtkImageMenuItem" id="new1">
-                     <property name="visible">True</property>
-                     <property name="label">gtk-new</property>
-                     <property name="use_stock">True</property>
-
-                     <child>
-                       <widget class="GtkMenu" id="new1_menu">
-
-                         <child>
-                           <widget class="GtkMenuItem" id="syntax1">
-                             <property name="visible">True</property>
-                             <property name="label" translatable="yes">_Syntax</property>
-                             <property name="use_underline">True</property>
-                             <signal name="activate" handler="on_syntax1_activate" last_modification_time="Tue, 05 Dec 2006 01:39:48 GMT"/>
-                           </widget>
-                         </child>
-
-                         <child>
-                           <widget class="GtkMenuItem" id="data2">
-                             <property name="visible">True</property>
-                             <property name="label" translatable="yes">_Data</property>
-                             <property name="use_underline">True</property>
-                           </widget>
-                         </child>
-                       </widget>
-                     </child>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkImageMenuItem" id="open1">
-                     <property name="visible">True</property>
-                     <property name="label">gtk-open</property>
-                     <property name="use_stock">True</property>
-
-                     <child>
-                       <widget class="GtkMenu" id="open1_menu">
-
-                         <child>
-                           <widget class="GtkMenuItem" id="syntax2">
-                             <property name="visible">True</property>
-                             <property name="label" translatable="yes">_Syntax</property>
-                             <property name="use_underline">True</property>
-                             <signal name="activate" handler="on_syntax2_activate" last_modification_time="Tue, 05 Dec 2006 01:39:48 GMT"/>
-                           </widget>
-                         </child>
-
-                         <child>
-                           <widget class="GtkMenuItem" id="data3">
-                             <property name="visible">True</property>
-                             <property name="label" translatable="yes">_Data</property>
-                             <property name="use_underline">True</property>
-                             <signal name="activate" handler="on_data3_activate" last_modification_time="Tue, 05 Dec 2006 01:39:48 GMT"/>
-                           </widget>
-                         </child>
-                       </widget>
-                     </child>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkImageMenuItem" id="save1">
-                     <property name="visible">True</property>
-                     <property name="label">gtk-save</property>
-                     <property name="use_stock">True</property>
-                     <signal name="activate" handler="on_save1_activate" last_modification_time="Tue, 23 Mar 2004 10:22:51 GMT"/>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkImageMenuItem" id="save_as1">
-                     <property name="visible">True</property>
-                     <property name="label">gtk-save-as</property>
-                     <property name="use_stock">True</property>
-                     <signal name="activate" handler="on_save_as1_activate" last_modification_time="Tue, 23 Mar 2004 10:22:51 GMT"/>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkSeparatorMenuItem" id="separatormenuitem1">
-                     <property name="visible">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkImageMenuItem" id="quit1">
-                     <property name="visible">True</property>
-                     <property name="label">gtk-quit</property>
-                     <property name="use_stock">True</property>
-                     <signal name="activate" handler="on_quit1_activate" last_modification_time="Tue, 23 Mar 2004 10:22:51 GMT"/>
-                   </widget>
-                 </child>
-               </widget>
-             </child>
-           </widget>
-         </child>
-
-         <child>
-           <widget class="GtkMenuItem" id="menuitem2">
-             <property name="visible">True</property>
-             <property name="label" translatable="yes">_Edit</property>
-             <property name="use_underline">True</property>
-
-             <child>
-               <widget class="GtkMenu" id="menuitem2_menu">
-
-                 <child>
-                   <widget class="GtkImageMenuItem" id="cut1">
-                     <property name="visible">True</property>
-                     <property name="sensitive">False</property>
-                     <property name="label">gtk-cut</property>
-                     <property name="use_stock">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkImageMenuItem" id="copy1">
-                     <property name="visible">True</property>
-                     <property name="sensitive">False</property>
-                     <property name="label">gtk-copy</property>
-                     <property name="use_stock">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkImageMenuItem" id="paste1">
-                     <property name="visible">True</property>
-                     <property name="sensitive">False</property>
-                     <property name="label">gtk-paste</property>
-                     <property name="use_stock">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkMenuItem" id="paste_variables1">
-                     <property name="visible">True</property>
-                     <property name="sensitive">False</property>
-                     <property name="label" translatable="yes">Paste _Variables</property>
-                     <property name="use_underline">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkMenuItem" id="clear1">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">Cl_ear</property>
-                     <property name="use_underline">True</property>
-                     <signal name="activate" handler="on_clear_activate" last_modification_time="Sun, 02 Jul 2006 07:00:12 GMT"/>
-                     <accelerator key="Delete" modifiers="0" signal="activate"/>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkSeparatorMenuItem" id="separator6">
-                     <property name="visible">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkImageMenuItem" id="find1">
-                     <property name="visible">True</property>
-                     <property name="sensitive">False</property>
-                     <property name="label" translatable="yes">_Find</property>
-                     <property name="use_underline">True</property>
-
-                     <child internal-child="image">
-                       <widget class="GtkImage" id="image15">
-                         <property name="visible">True</property>
-                         <property name="stock">gtk-find</property>
-                         <property name="icon_size">1</property>
-                         <property name="xalign">0.5</property>
-                         <property name="yalign">0.5</property>
-                         <property name="xpad">0</property>
-                         <property name="ypad">0</property>
-                       </widget>
-                     </child>
-                   </widget>
-                 </child>
-               </widget>
-             </child>
-           </widget>
-         </child>
-
-         <child>
-           <widget class="GtkMenuItem" id="menuitem3">
-             <property name="visible">True</property>
-             <property name="label" translatable="yes">_View</property>
-             <property name="use_underline">True</property>
-
-             <child>
-               <widget class="GtkMenu" id="menuitem3_menu">
-
-                 <child>
-                   <widget class="GtkCheckMenuItem" id="status_bar1">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">Status Bar</property>
-                     <property name="use_underline">True</property>
-                     <property name="active">True</property>
-                     <signal name="activate" handler="on_status_bar1_activate" last_modification_time="Thu, 24 Nov 2005 10:41:01 GMT"/>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkMenuItem" id="toolbars">
-                     <property name="label" translatable="yes">Toolbars</property>
-                     <property name="use_underline">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkSeparatorMenuItem" id="separator1">
-                     <property name="visible">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkMenuItem" id="fonts1">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">Fonts</property>
-                     <property name="use_underline">True</property>
-                     <signal name="activate" handler="on_fonts1_activate" last_modification_time="Thu, 24 Nov 2005 10:41:29 GMT"/>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkCheckMenuItem" id="grid_lines1">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">Grid Lines</property>
-                     <property name="use_underline">True</property>
-                     <property name="active">True</property>
-                     <signal name="activate" handler="on_grid_lines1_activate" last_modification_time="Thu, 24 Nov 2005 10:41:44 GMT"/>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkCheckMenuItem" id="menuitem-value-labels">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">Value Labels</property>
-                     <property name="use_underline">True</property>
-                     <property name="active">False</property>
-                     <signal name="activate" handler="on_value_labels_activate" last_modification_time="Thu, 24 Nov 2005 10:42:04 GMT"/>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkSeparatorMenuItem" id="separator3">
-                     <property name="visible">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkMenuItem" id="data1">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">Data</property>
-                     <property name="use_underline">True</property>
-                     <signal name="activate" handler="on_data1_activate" last_modification_time="Sun, 27 Nov 2005 02:18:20 GMT"/>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkMenuItem" id="variables1">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">Variables</property>
-                     <property name="use_underline">True</property>
-                     <signal name="activate" handler="on_variables1_activate" last_modification_time="Sun, 27 Nov 2005 02:18:20 GMT"/>
-                   </widget>
-                 </child>
-               </widget>
-             </child>
-           </widget>
-         </child>
-
-         <child>
-           <widget class="GtkMenuItem" id="menuitem4">
-             <property name="visible">True</property>
-             <property name="label" translatable="yes">_Data</property>
-             <property name="use_underline">True</property>
-
-             <child>
-               <widget class="GtkMenu" id="menuitem4_menu">
-
-                 <child>
-                   <widget class="GtkMenuItem" id="insert-variable">
-                     <property name="visible">True</property>
-                     <property name="sensitive">False</property>
-                     <property name="label" translatable="yes">Insert Variable</property>
-                     <property name="use_underline">True</property>
-                     <signal name="activate" handler="on_insert_variable"/>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkMenuItem" id="insert-cases">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">Insert Cases</property>
-                     <property name="use_underline">True</property>
-                     <signal name="activate" handler="on_insert_cases" last_modification_time="Sat, 01 Jul 2006 08:40:06 GMT"/>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkImageMenuItem" id="go_to_case">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">Go To Case</property>
-                     <property name="use_underline">True</property>
-                     <signal name="activate" handler="on_go_to_case_activate" last_modification_time="Mon, 19 Jun 2006 10:29:37 GMT"/>
-
-                     <child internal-child="image">
-                       <widget class="GtkImage" id="image16">
-                         <property name="visible">True</property>
-                         <property name="stock">gtk-jump-to</property>
-                         <property name="icon_size">1</property>
-                         <property name="xalign">0.5</property>
-                         <property name="yalign">0.5</property>
-                         <property name="xpad">0</property>
-                         <property name="ypad">0</property>
-                       </widget>
-                     </child>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkSeparatorMenuItem" id="separator4">
-                     <property name="visible">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkMenuItem" id="sort_cases">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">Sort Cases</property>
-                     <property name="use_underline">True</property>
-                     <signal name="activate" handler="on_sort_cases_activate" last_modification_time="Tue, 20 Jun 2006 10:27:11 GMT"/>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkMenuItem" id="transpose1">
-                     <property name="visible">True</property>
-                     <property name="sensitive">False</property>
-                     <property name="label" translatable="yes">Transpose</property>
-                     <property name="use_underline">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkMenuItem" id="restructure1">
-                     <property name="visible">True</property>
-                     <property name="sensitive">False</property>
-                     <property name="label" translatable="yes">Restructure</property>
-                     <property name="use_underline">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkMenuItem" id="merge_files1">
-                     <property name="visible">True</property>
-                     <property name="sensitive">False</property>
-                     <property name="label" translatable="yes">Merge Files</property>
-                     <property name="use_underline">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkMenuItem" id="aggregate1">
-                     <property name="visible">True</property>
-                     <property name="sensitive">False</property>
-                     <property name="label" translatable="yes">Aggregate</property>
-                     <property name="use_underline">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkSeparatorMenuItem" id="separator5">
-                     <property name="visible">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkMenuItem" id="split_file1">
-                     <property name="visible">True</property>
-                     <property name="sensitive">False</property>
-                     <property name="label" translatable="yes">Split File</property>
-                     <property name="use_underline">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkMenuItem" id="select_cases1">
-                     <property name="visible">True</property>
-                     <property name="sensitive">False</property>
-                     <property name="label" translatable="yes">Select Cases</property>
-                     <property name="use_underline">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkMenuItem" id="weight_cases1">
-                     <property name="visible">True</property>
-                     <property name="sensitive">False</property>
-                     <property name="label" translatable="yes">Weight Cases</property>
-                     <property name="use_underline">True</property>
-                   </widget>
-                 </child>
-               </widget>
-             </child>
-           </widget>
-         </child>
-
-         <child>
-           <widget class="GtkMenuItem" id="menuitem5">
-             <property name="visible">True</property>
-             <property name="label" translatable="yes">_Help</property>
-             <property name="use_underline">True</property>
-
-             <child>
-               <widget class="GtkMenu" id="menuitem5_menu">
-
-                 <child>
-                   <widget class="GtkMenuItem" id="about1">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">_About</property>
-                     <property name="use_underline">True</property>
-                     <signal name="activate" handler="on_about1_activate" last_modification_time="Fri, 25 Nov 2005 11:54:43 GMT"/>
-                   </widget>
-                 </child>
-               </widget>
-             </child>
-           </widget>
-         </child>
-       </widget>
-       <packing>
-         <property name="padding">0</property>
-         <property name="expand">False</property>
-         <property name="fill">False</property>
-       </packing>
-      </child>
-
-      <child>
-       <widget class="GtkHandleBox" id="handlebox1">
-         <property name="visible">True</property>
-         <property name="shadow_type">GTK_SHADOW_OUT</property>
-         <property name="handle_position">GTK_POS_LEFT</property>
-         <property name="snap_edge">GTK_POS_TOP</property>
-
-         <child>
-           <widget class="GtkToolbar" id="toolbar1">
-             <property name="visible">True</property>
-             <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
-             <property name="toolbar_style">GTK_TOOLBAR_ICONS</property>
-             <property name="tooltips">True</property>
-             <property name="show_arrow">True</property>
-
-             <child>
-               <widget class="GtkToolButton" id="buttonOpen">
-                 <property name="visible">True</property>
-                 <property name="tooltip" translatable="yes">Open</property>
-                 <property name="stock_id">gtk-open</property>
-                 <property name="visible_horizontal">True</property>
-                 <property name="visible_vertical">True</property>
-                 <property name="is_important">False</property>
-               </widget>
-               <packing>
-                 <property name="expand">False</property>
-                 <property name="homogeneous">True</property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkToolButton" id="buttonSave">
-                 <property name="visible">True</property>
-                 <property name="tooltip" translatable="yes">Save</property>
-                 <property name="stock_id">gtk-save</property>
-                 <property name="visible_horizontal">True</property>
-                 <property name="visible_vertical">True</property>
-                 <property name="is_important">False</property>
-                 <signal name="clicked" handler="on_save1_activate" last_modification_time="Wed, 02 Nov 2005 13:05:43 GMT"/>
-               </widget>
-               <packing>
-                 <property name="expand">False</property>
-                 <property name="homogeneous">True</property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkToolButton" id="buttonPrint">
-                 <property name="visible">True</property>
-                 <property name="tooltip" translatable="yes">Print</property>
-                 <property name="stock_id">gtk-print</property>
-                 <property name="visible_horizontal">True</property>
-                 <property name="visible_vertical">True</property>
-                 <property name="is_important">False</property>
-               </widget>
-               <packing>
-                 <property name="expand">False</property>
-                 <property name="homogeneous">True</property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkSeparatorToolItem" id="separatortoolitem1">
-                 <property name="visible">True</property>
-                 <property name="draw">True</property>
-                 <property name="visible_horizontal">True</property>
-                 <property name="visible_vertical">True</property>
-               </widget>
-               <packing>
-                 <property name="expand">False</property>
-                 <property name="homogeneous">False</property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkToolButton" id="toolbutton1">
-                 <property name="visible">True</property>
-                 <property name="tooltip" translatable="yes">Undo</property>
-                 <property name="stock_id">gtk-undo</property>
-                 <property name="visible_horizontal">True</property>
-                 <property name="visible_vertical">True</property>
-                 <property name="is_important">False</property>
-               </widget>
-               <packing>
-                 <property name="expand">False</property>
-                 <property name="homogeneous">True</property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkToolButton" id="toolbutton2">
-                 <property name="visible">True</property>
-                 <property name="tooltip" translatable="yes">Redo</property>
-                 <property name="stock_id">gtk-redo</property>
-                 <property name="visible_horizontal">True</property>
-                 <property name="visible_vertical">True</property>
-                 <property name="is_important">False</property>
-               </widget>
-               <packing>
-                 <property name="expand">False</property>
-                 <property name="homogeneous">True</property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkSeparatorToolItem" id="separatortoolitem2">
-                 <property name="visible">True</property>
-                 <property name="draw">True</property>
-                 <property name="visible_horizontal">True</property>
-                 <property name="visible_vertical">True</property>
-               </widget>
-               <packing>
-                 <property name="expand">False</property>
-                 <property name="homogeneous">False</property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkToolButton" id="buttonGotoCase">
-                 <property name="visible">True</property>
-                 <property name="tooltip" translatable="yes">Go To Case</property>
-                 <property name="stock_id">gtk-jump-to</property>
-                 <property name="visible_horizontal">True</property>
-                 <property name="visible_vertical">True</property>
-                 <property name="is_important">False</property>
-                 <signal name="clicked" handler="on_go_to_case_activate" last_modification_time="Mon, 19 Jun 2006 11:41:44 GMT"/>
-               </widget>
-               <packing>
-                 <property name="expand">False</property>
-                 <property name="homogeneous">True</property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkToolButton" id="variables">
-                 <property name="visible">True</property>
-                 <property name="tooltip" translatable="yes">Variables</property>
-                  <property name="stock_id">pspp-goto-variable</property>
-                 <property name="label" translatable="yes"></property>
-                 <property name="use_underline">True</property>
-                 <property name="visible_horizontal">True</property>
-                 <property name="visible_vertical">True</property>
-                 <property name="is_important">False</property>
-               </widget>
-               <packing>
-                 <property name="expand">False</property>
-                 <property name="homogeneous">True</property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkSeparatorToolItem" id="separatortoolitem5">
-                 <property name="visible">True</property>
-                 <property name="draw">True</property>
-                 <property name="visible_horizontal">True</property>
-                 <property name="visible_vertical">True</property>
-               </widget>
-               <packing>
-                 <property name="expand">False</property>
-                 <property name="homogeneous">False</property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkToolButton" id="toolbutton3">
-                 <property name="visible">True</property>
-                 <property name="tooltip" translatable="yes">Find</property>
-                 <property name="stock_id">gtk-find</property>
-                 <property name="visible_horizontal">True</property>
-                 <property name="visible_vertical">True</property>
-                 <property name="is_important">False</property>
-               </widget>
-               <packing>
-                 <property name="expand">False</property>
-                 <property name="homogeneous">True</property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkSeparatorToolItem" id="separatortoolitem4">
-                 <property name="visible">True</property>
-                 <property name="draw">True</property>
-                 <property name="visible_horizontal">True</property>
-                 <property name="visible_vertical">True</property>
-               </widget>
-               <packing>
-                 <property name="expand">False</property>
-                 <property name="homogeneous">False</property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkToolButton" id="insert_case">
-                 <property name="visible">True</property>
-                 <property name="tooltip" translatable="yes">Insert Case</property>
-                  <property name="stock_id">pspp-insert-case</property>
-                 <property name="label" translatable="yes"></property>
-                 <property name="use_underline">True</property>
-                 <property name="visible_horizontal">True</property>
-                 <property name="visible_vertical">True</property>
-                 <property name="is_important">False</property>
-                 <signal name="clicked" handler="on_insert_case_clicked" last_modification_time="Sat, 01 Jul 2006 08:41:07 GMT"/>
-               </widget>
-               <packing>
-                 <property name="expand">False</property>
-                 <property name="homogeneous">True</property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkToolButton" id="insert_variable">
-                 <property name="visible">True</property>
-                 <property name="tooltip" translatable="yes">Insert Variable</property>
-                  <property name="stock_id">pspp-insert-variable</property>
-                 <property name="label" translatable="yes"></property>
-                 <property name="use_underline">True</property>
-                 <property name="visible_horizontal">True</property>
-                 <property name="visible_vertical">True</property>
-                 <property name="is_important">False</property>
-               </widget>
-               <packing>
-                 <property name="expand">False</property>
-                 <property name="homogeneous">True</property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkSeparatorToolItem" id="separatortoolitem6">
-                 <property name="visible">True</property>
-                 <property name="draw">True</property>
-                 <property name="visible_horizontal">True</property>
-                 <property name="visible_vertical">True</property>
-               </widget>
-               <packing>
-                 <property name="expand">False</property>
-                 <property name="homogeneous">False</property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkToolButton" id="toolbutton8">
-                 <property name="visible">True</property>
-                 <property name="tooltip" translatable="yes">Split File</property>
-                  <property name="stock_id">pspp-split-file</property>
-                 <property name="label" translatable="yes"></property>
-                 <property name="use_underline">True</property>
-                 <property name="visible_horizontal">True</property>
-                 <property name="visible_vertical">True</property>
-                 <property name="is_important">False</property>
-               </widget>
-               <packing>
-                 <property name="expand">False</property>
-                 <property name="homogeneous">True</property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkToolButton" id="toolbutton9">
-                 <property name="visible">True</property>
-                 <property name="tooltip" translatable="yes">Weight Cases</property>
-                  <property name="stock_id">pspp-weight-cases</property>
-                 <property name="label" translatable="yes"></property>
-                 <property name="use_underline">True</property>
-                 <property name="visible_horizontal">True</property>
-                 <property name="visible_vertical">True</property>
-                 <property name="is_important">False</property>
-               </widget>
-               <packing>
-                 <property name="expand">False</property>
-                 <property name="homogeneous">True</property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkToolButton" id="toolbutton10">
-                 <property name="visible">True</property>
-                 <property name="tooltip" translatable="yes">Select Cases</property>
-                  <property name="stock_id">pspp-select-cases</property>
-                 <property name="label" translatable="yes"></property>
-                 <property name="use_underline">True</property>
-                 <property name="visible_horizontal">True</property>
-                 <property name="visible_vertical">True</property>
-                 <property name="is_important">False</property>
-               </widget>
-               <packing>
-                 <property name="expand">False</property>
-                 <property name="homogeneous">True</property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkSeparatorToolItem" id="separatortoolitem7">
-                 <property name="visible">True</property>
-                 <property name="draw">True</property>
-                 <property name="visible_horizontal">True</property>
-                 <property name="visible_vertical">True</property>
-               </widget>
-               <packing>
-                 <property name="expand">False</property>
-                 <property name="homogeneous">False</property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkToggleToolButton" id="togglebutton-value-labels">
-                 <property name="visible">True</property>
-                 <property name="tooltip" translatable="yes">Value Labels</property>
-                  <property name="stock_id">pspp-value-labels</property>
-                 <property name="label" translatable="yes"></property>
-                 <property name="use_underline">True</property>
-                 <property name="visible_horizontal">True</property>
-                 <property name="visible_vertical">True</property>
-                 <property name="is_important">False</property>
-                 <property name="active">False</property>
-                 <signal name="toggled" handler="on_togglebutton_value_labels_toggled" last_modification_time="Mon, 19 Jun 2006 13:09:37 GMT"/>
-               </widget>
-               <packing>
-                 <property name="expand">False</property>
-                 <property name="homogeneous">True</property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkToolButton" id="toolbutton12">
-                 <property name="visible">True</property>
-                 <property name="sensitive">False</property>
-                 <property name="tooltip" translatable="yes">Use Sets</property>
-                 <property name="label" translatable="yes"></property>
-                 <property name="use_underline">True</property>
-                 <property name="visible_horizontal">True</property>
-                 <property name="visible_vertical">True</property>
-                 <property name="is_important">False</property>
-               </widget>
-               <packing>
-                 <property name="expand">False</property>
-                 <property name="homogeneous">True</property>
-               </packing>
-             </child>
-           </widget>
-         </child>
-       </widget>
-       <packing>
-         <property name="padding">0</property>
-         <property name="expand">False</property>
-         <property name="fill">False</property>
-       </packing>
-      </child>
-
-      <child>
-       <widget class="GtkNotebook" id="notebook1">
-         <property name="visible">True</property>
-         <property name="can_focus">True</property>
-         <property name="show_tabs">True</property>
-         <property name="show_border">True</property>
-         <property name="tab_pos">GTK_POS_BOTTOM</property>
-         <property name="scrollable">True</property>
-         <property name="enable_popup">True</property>
-
-         <child>
-           <widget class="GtkVBox" id="vbox3">
-             <property name="visible">True</property>
-             <property name="homogeneous">False</property>
-             <property name="spacing">0</property>
-
-             <child>
-               <widget class="GtkTable" id="table2">
-                 <property name="visible">True</property>
-                 <property name="n_rows">1</property>
-                 <property name="n_columns">2</property>
-                 <property name="homogeneous">False</property>
-                 <property name="row_spacing">0</property>
-                 <property name="column_spacing">0</property>
-
-                 <child>
-                   <widget class="GtkEntry" id="entry4">
-                     <property name="visible">True</property>
-                     <property name="can_focus">True</property>
-                     <property name="editable">True</property>
-                     <property name="visibility">True</property>
-                     <property name="max_length">0</property>
-                     <property name="text" translatable="yes"></property>
-                     <property name="has_frame">True</property>
-                     <property name="invisible_char">*</property>
-                     <property name="activates_default">False</property>
-                   </widget>
-                   <packing>
-                     <property name="left_attach">1</property>
-                     <property name="right_attach">2</property>
-                     <property name="top_attach">0</property>
-                     <property name="bottom_attach">1</property>
-                     <property name="y_options"></property>
-                   </packing>
-                 </child>
-
-                 <child>
-                   <widget class="GtkEntry" id="cell_ref_entry">
-                     <property name="visible">True</property>
-                     <property name="sensitive">False</property>
-                     <property name="editable">False</property>
-                     <property name="visibility">True</property>
-                     <property name="max_length">0</property>
-                     <property name="text" translatable="yes"></property>
-                     <property name="has_frame">True</property>
-                     <property name="invisible_char">*</property>
-                     <property name="activates_default">False</property>
-                     <property name="width_chars">25</property>
-                   </widget>
-                   <packing>
-                     <property name="left_attach">0</property>
-                     <property name="right_attach">1</property>
-                     <property name="top_attach">0</property>
-                     <property name="bottom_attach">1</property>
-                     <property name="x_options">fill</property>
-                     <property name="y_options"></property>
-                   </packing>
-                 </child>
-               </widget>
-               <packing>
-                 <property name="padding">0</property>
-                 <property name="expand">False</property>
-                 <property name="fill">False</property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkScrolledWindow" id="scrolledwindow1">
-                 <property name="visible">True</property>
-                 <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
-                 <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
-                 <property name="shadow_type">GTK_SHADOW_NONE</property>
-                 <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-                 <child>
-                   <widget class="Custom" id="data_sheet">
-                     <property name="visible">True</property>
-                     <property name="creation_function">psppire_data_sheet_create</property>
-                     <property name="int1">0</property>
-                     <property name="int2">0</property>
-                     <property name="last_modification_time">Sun, 30 Oct 2005 08:53:47 GMT</property>
-                   </widget>
-                 </child>
-               </widget>
-               <packing>
-                 <property name="padding">0</property>
-                 <property name="expand">True</property>
-                 <property name="fill">True</property>
-               </packing>
-             </child>
-           </widget>
-           <packing>
-             <property name="tab_expand">False</property>
-             <property name="tab_fill">True</property>
-           </packing>
-         </child>
-
-         <child>
-           <widget class="GtkLabel" id="label1">
-             <property name="visible">True</property>
-             <property name="label" translatable="yes">Data View</property>
-             <property name="use_underline">False</property>
-             <property name="use_markup">False</property>
-             <property name="justify">GTK_JUSTIFY_LEFT</property>
-             <property name="wrap">False</property>
-             <property name="selectable">False</property>
-             <property name="xalign">0.5</property>
-             <property name="yalign">0.5</property>
-             <property name="xpad">0</property>
-             <property name="ypad">0</property>
-             <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-             <property name="width_chars">-1</property>
-             <property name="single_line_mode">False</property>
-             <property name="angle">0</property>
-           </widget>
-           <packing>
-             <property name="type">tab</property>
-           </packing>
-         </child>
-
-         <child>
-           <widget class="GtkScrolledWindow" id="scrolledwindow2">
-             <property name="visible">True</property>
-             <property name="can_focus">True</property>
-             <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
-             <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
-             <property name="shadow_type">GTK_SHADOW_NONE</property>
-             <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-             <child>
-               <widget class="Custom" id="variable_sheet">
-                 <property name="visible">True</property>
-                 <property name="creation_function">psppire_variable_sheet_create</property>
-                 <property name="int1">0</property>
-                 <property name="int2">0</property>
-                 <property name="last_modification_time">Sun, 30 Oct 2005 08:54:45 GMT</property>
-               </widget>
-             </child>
-           </widget>
-           <packing>
-             <property name="tab_expand">False</property>
-             <property name="tab_fill">True</property>
-           </packing>
-         </child>
-
-         <child>
-           <widget class="GtkLabel" id="label2">
-             <property name="visible">True</property>
-             <property name="label" translatable="yes">Variable View</property>
-             <property name="use_underline">False</property>
-             <property name="use_markup">False</property>
-             <property name="justify">GTK_JUSTIFY_LEFT</property>
-             <property name="wrap">False</property>
-             <property name="selectable">False</property>
-             <property name="xalign">0.5</property>
-             <property name="yalign">0.5</property>
-             <property name="xpad">0</property>
-             <property name="ypad">0</property>
-             <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-             <property name="width_chars">-1</property>
-             <property name="single_line_mode">False</property>
-             <property name="angle">0</property>
-           </widget>
-           <packing>
-             <property name="type">tab</property>
-           </packing>
-         </child>
-       </widget>
-       <packing>
-         <property name="padding">0</property>
-         <property name="expand">True</property>
-         <property name="fill">True</property>
-       </packing>
-      </child>
-
-      <child>
-       <widget class="GtkStatusbar" id="statusbar1">
-         <property name="visible">True</property>
-         <property name="has_resize_grip">True</property>
-       </widget>
-       <packing>
-         <property name="padding">0</property>
-         <property name="expand">False</property>
-         <property name="fill">False</property>
-       </packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
 <widget class="GtkAboutDialog" id="aboutdialog1">
   <property name="destroy_with_parent">False</property>
   <property name="name">PSPPire</property>
   <property name="logo">pspplogo.png</property>
 </widget>
 
-<widget class="GtkWindow" id="var_type_dialog">
-  <property name="border_width">6</property>
-  <property name="title" translatable="yes">Variable Type</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">True</property>
-  <property name="default_width">485</property>
-  <property name="resizable">False</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">True</property>
-  <property name="skip_pager_hint">True</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-
-  <child>
-    <widget class="GtkHBox" id="hbox1">
-      <property name="border_width">5</property>
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">5</property>
-
-      <child>
-       <widget class="GtkVBox" id="vbox2">
-         <property name="border_width">13</property>
-         <property name="visible">True</property>
-         <property name="homogeneous">True</property>
-         <property name="spacing">0</property>
-
-         <child>
-           <widget class="GtkRadioButton" id="radiobutton1">
-             <property name="visible">True</property>
-             <property name="can_focus">True</property>
-             <property name="label" translatable="yes">Numeric</property>
-             <property name="use_underline">True</property>
-             <property name="relief">GTK_RELIEF_NORMAL</property>
-             <property name="focus_on_click">True</property>
-             <property name="active">True</property>
-             <property name="inconsistent">False</property>
-             <property name="draw_indicator">True</property>
-           </widget>
-           <packing>
-             <property name="padding">0</property>
-             <property name="expand">False</property>
-             <property name="fill">False</property>
-           </packing>
-         </child>
-
-         <child>
-           <widget class="GtkRadioButton" id="radiobutton2">
-             <property name="visible">True</property>
-             <property name="can_focus">True</property>
-             <property name="label" translatable="yes">Comma</property>
-             <property name="use_underline">True</property>
-             <property name="relief">GTK_RELIEF_NORMAL</property>
-             <property name="focus_on_click">True</property>
-             <property name="active">False</property>
-             <property name="inconsistent">False</property>
-             <property name="draw_indicator">True</property>
-             <property name="group">radiobutton1</property>
-           </widget>
-           <packing>
-             <property name="padding">0</property>
-             <property name="expand">False</property>
-             <property name="fill">False</property>
-           </packing>
-         </child>
-
-         <child>
-           <widget class="GtkRadioButton" id="radiobutton3">
-             <property name="visible">True</property>
-             <property name="can_focus">True</property>
-             <property name="label" translatable="yes">Dot</property>
-             <property name="use_underline">True</property>
-             <property name="relief">GTK_RELIEF_NORMAL</property>
-             <property name="focus_on_click">True</property>
-             <property name="active">False</property>
-             <property name="inconsistent">False</property>
-             <property name="draw_indicator">True</property>
-             <property name="group">radiobutton1</property>
-           </widget>
-           <packing>
-             <property name="padding">0</property>
-             <property name="expand">False</property>
-             <property name="fill">False</property>
-           </packing>
-         </child>
-
-         <child>
-           <widget class="GtkRadioButton" id="radiobutton4">
-             <property name="visible">True</property>
-             <property name="can_focus">True</property>
-             <property name="label" translatable="yes">Scientific notation</property>
-             <property name="use_underline">True</property>
-             <property name="relief">GTK_RELIEF_NORMAL</property>
-             <property name="focus_on_click">True</property>
-             <property name="active">False</property>
-             <property name="inconsistent">False</property>
-             <property name="draw_indicator">True</property>
-             <property name="group">radiobutton1</property>
-           </widget>
-           <packing>
-             <property name="padding">0</property>
-             <property name="expand">False</property>
-             <property name="fill">False</property>
-           </packing>
-         </child>
-
-         <child>
-           <widget class="GtkRadioButton" id="radiobutton5">
-             <property name="visible">True</property>
-             <property name="can_focus">True</property>
-             <property name="label" translatable="yes">Date</property>
-             <property name="use_underline">True</property>
-             <property name="relief">GTK_RELIEF_NORMAL</property>
-             <property name="focus_on_click">True</property>
-             <property name="active">False</property>
-             <property name="inconsistent">False</property>
-             <property name="draw_indicator">True</property>
-             <property name="group">radiobutton1</property>
-           </widget>
-           <packing>
-             <property name="padding">0</property>
-             <property name="expand">False</property>
-             <property name="fill">False</property>
-           </packing>
-         </child>
-
-         <child>
-           <widget class="GtkRadioButton" id="radiobutton6">
-             <property name="visible">True</property>
-             <property name="can_focus">True</property>
-             <property name="label" translatable="yes">Dollar</property>
-             <property name="use_underline">True</property>
-             <property name="relief">GTK_RELIEF_NORMAL</property>
-             <property name="focus_on_click">True</property>
-             <property name="active">False</property>
-             <property name="inconsistent">False</property>
-             <property name="draw_indicator">True</property>
-             <property name="group">radiobutton1</property>
-           </widget>
-           <packing>
-             <property name="padding">0</property>
-             <property name="expand">False</property>
-             <property name="fill">False</property>
-           </packing>
-         </child>
-
-         <child>
-           <widget class="GtkRadioButton" id="radiobutton7">
-             <property name="visible">True</property>
-             <property name="can_focus">True</property>
-             <property name="label" translatable="yes">Custom currency</property>
-             <property name="use_underline">True</property>
-             <property name="relief">GTK_RELIEF_NORMAL</property>
-             <property name="focus_on_click">True</property>
-             <property name="active">False</property>
-             <property name="inconsistent">False</property>
-             <property name="draw_indicator">True</property>
-             <property name="group">radiobutton1</property>
-           </widget>
-           <packing>
-             <property name="padding">0</property>
-             <property name="expand">False</property>
-             <property name="fill">False</property>
-           </packing>
-         </child>
-
-         <child>
-           <widget class="GtkRadioButton" id="radiobutton8">
-             <property name="visible">True</property>
-             <property name="can_focus">True</property>
-             <property name="label" translatable="yes">String</property>
-             <property name="use_underline">True</property>
-             <property name="relief">GTK_RELIEF_NORMAL</property>
-             <property name="focus_on_click">True</property>
-             <property name="active">False</property>
-             <property name="inconsistent">False</property>
-             <property name="draw_indicator">True</property>
-             <property name="group">radiobutton1</property>
-           </widget>
-           <packing>
-             <property name="padding">0</property>
-             <property name="expand">False</property>
-             <property name="fill">False</property>
-           </packing>
-         </child>
-       </widget>
-       <packing>
-         <property name="padding">0</property>
-         <property name="expand">False</property>
-         <property name="fill">False</property>
-       </packing>
-      </child>
-
-      <child>
-       <widget class="GtkVBox" id="middle_box">
-         <property name="visible">True</property>
-         <property name="homogeneous">False</property>
-         <property name="spacing">10</property>
-
-         <child>
-           <widget class="GtkScrolledWindow" id="scrolledwindow4">
-             <property name="width_request">20</property>
-             <property name="height_request">194</property>
-             <property name="can_focus">True</property>
-             <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-             <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
-             <property name="shadow_type">GTK_SHADOW_IN</property>
-             <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-             <child>
-               <widget class="GtkTreeView" id="date_format_list_view">
-                 <property name="visible">True</property>
-                 <property name="can_focus">True</property>
-                 <property name="headers_visible">False</property>
-                 <property name="rules_hint">False</property>
-                 <property name="reorderable">False</property>
-                 <property name="enable_search">True</property>
-                 <property name="fixed_height_mode">False</property>
-                 <property name="hover_selection">False</property>
-                 <property name="hover_expand">False</property>
-               </widget>
-             </child>
-           </widget>
-           <packing>
-             <property name="padding">0</property>
-             <property name="expand">False</property>
-             <property name="fill">False</property>
-           </packing>
-         </child>
-
-         <child>
-           <widget class="GtkHBox" id="custom_currency_hbox">
-             <property name="homogeneous">False</property>
-             <property name="spacing">15</property>
-
-             <child>
-               <widget class="GtkScrolledWindow" id="scrolledwindow5">
-                 <property name="width_request">1</property>
-                 <property name="height_request">120</property>
-                 <property name="visible">True</property>
-                 <property name="can_focus">True</property>
-                 <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                 <property name="vscrollbar_policy">GTK_POLICY_NEVER</property>
-                 <property name="shadow_type">GTK_SHADOW_IN</property>
-                 <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-                 <child>
-                   <widget class="GtkTreeView" id="custom_treeview">
-                     <property name="visible">True</property>
-                     <property name="can_focus">True</property>
-                     <property name="headers_visible">False</property>
-                     <property name="rules_hint">False</property>
-                     <property name="reorderable">False</property>
-                     <property name="enable_search">True</property>
-                     <property name="fixed_height_mode">False</property>
-                     <property name="hover_selection">False</property>
-                     <property name="hover_expand">False</property>
-                   </widget>
-                 </child>
-               </widget>
-               <packing>
-                 <property name="padding">0</property>
-                 <property name="expand">True</property>
-                 <property name="fill">True</property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkFrame" id="Sample">
-                 <property name="visible">True</property>
-                 <property name="label_xalign">0</property>
-                 <property name="label_yalign">0.5</property>
-                 <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-                 <child>
-                   <widget class="GtkAlignment" id="alignment2">
-                     <property name="visible">True</property>
-                     <property name="xalign">0.5</property>
-                     <property name="yalign">0.5</property>
-                     <property name="xscale">1</property>
-                     <property name="yscale">1</property>
-                     <property name="top_padding">0</property>
-                     <property name="bottom_padding">0</property>
-                     <property name="left_padding">12</property>
-                     <property name="right_padding">0</property>
-
-                     <child>
-                       <widget class="GtkVBox" id="vbox10">
-                         <property name="visible">True</property>
-                         <property name="homogeneous">True</property>
-                         <property name="spacing">0</property>
-
-                         <child>
-                           <widget class="GtkLabel" id="psample_label">
-                             <property name="visible">True</property>
-                             <property name="label" translatable="yes">positive</property>
-                             <property name="use_underline">False</property>
-                             <property name="use_markup">False</property>
-                             <property name="justify">GTK_JUSTIFY_LEFT</property>
-                             <property name="wrap">False</property>
-                             <property name="selectable">False</property>
-                             <property name="xalign">0.5</property>
-                             <property name="yalign">0.5</property>
-                             <property name="xpad">0</property>
-                             <property name="ypad">0</property>
-                             <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-                             <property name="width_chars">-1</property>
-                             <property name="single_line_mode">False</property>
-                             <property name="angle">0</property>
-                           </widget>
-                           <packing>
-                             <property name="padding">0</property>
-                             <property name="expand">True</property>
-                             <property name="fill">True</property>
-                           </packing>
-                         </child>
-
-                         <child>
-                           <widget class="GtkLabel" id="nsample_label">
-                             <property name="visible">True</property>
-                             <property name="label" translatable="yes">negative</property>
-                             <property name="use_underline">False</property>
-                             <property name="use_markup">False</property>
-                             <property name="justify">GTK_JUSTIFY_LEFT</property>
-                             <property name="wrap">False</property>
-                             <property name="selectable">False</property>
-                             <property name="xalign">0.5</property>
-                             <property name="yalign">0.5</property>
-                             <property name="xpad">0</property>
-                             <property name="ypad">0</property>
-                             <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-                             <property name="width_chars">-1</property>
-                             <property name="single_line_mode">False</property>
-                             <property name="angle">0</property>
-                           </widget>
-                           <packing>
-                             <property name="padding">0</property>
-                             <property name="expand">True</property>
-                             <property name="fill">True</property>
-                           </packing>
-                         </child>
-                       </widget>
-                     </child>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkLabel" id="label13">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">Sample</property>
-                     <property name="use_underline">False</property>
-                     <property name="use_markup">True</property>
-                     <property name="justify">GTK_JUSTIFY_LEFT</property>
-                     <property name="wrap">False</property>
-                     <property name="selectable">False</property>
-                     <property name="xalign">0.5</property>
-                     <property name="yalign">0.5</property>
-                     <property name="xpad">0</property>
-                     <property name="ypad">0</property>
-                     <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-                     <property name="width_chars">-1</property>
-                     <property name="single_line_mode">False</property>
-                     <property name="angle">0</property>
-                   </widget>
-                   <packing>
-                     <property name="type">label_item</property>
-                   </packing>
-                 </child>
-               </widget>
-               <packing>
-                 <property name="padding">0</property>
-                 <property name="expand">True</property>
-                 <property name="fill">True</property>
-                 <property name="pack_type">GTK_PACK_END</property>
-               </packing>
-             </child>
-           </widget>
-           <packing>
-             <property name="padding">0</property>
-             <property name="expand">True</property>
-             <property name="fill">True</property>
-           </packing>
-         </child>
-
-         <child>
-           <widget class="GtkScrolledWindow" id="dollar_window">
-             <property name="can_focus">True</property>
-             <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-             <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
-             <property name="shadow_type">GTK_SHADOW_IN</property>
-             <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-             <child>
-               <widget class="GtkTreeView" id="dollar_treeview">
-                 <property name="visible">True</property>
-                 <property name="can_focus">True</property>
-                 <property name="headers_visible">False</property>
-                 <property name="rules_hint">False</property>
-                 <property name="reorderable">False</property>
-                 <property name="enable_search">True</property>
-                 <property name="fixed_height_mode">False</property>
-                 <property name="hover_selection">False</property>
-                 <property name="hover_expand">False</property>
-               </widget>
-             </child>
-           </widget>
-           <packing>
-             <property name="padding">0</property>
-             <property name="expand">True</property>
-             <property name="fill">True</property>
-           </packing>
-         </child>
-
-         <child>
-           <widget class="GtkTable" id="width_decimals">
-             <property name="width_request">100</property>
-             <property name="height_request">50</property>
-             <property name="visible">True</property>
-             <property name="n_rows">2</property>
-             <property name="n_columns">2</property>
-             <property name="homogeneous">False</property>
-             <property name="row_spacing">1</property>
-             <property name="column_spacing">2</property>
-
-             <child>
-               <widget class="GtkLabel" id="decimals_label">
-                 <property name="visible">True</property>
-                 <property name="label" translatable="yes">Decimal Places:</property>
-                 <property name="use_underline">False</property>
-                 <property name="use_markup">False</property>
-                 <property name="justify">GTK_JUSTIFY_RIGHT</property>
-                 <property name="wrap">False</property>
-                 <property name="selectable">False</property>
-                 <property name="xalign">0</property>
-                 <property name="yalign">0.5</property>
-                 <property name="xpad">0</property>
-                 <property name="ypad">0</property>
-                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-                 <property name="width_chars">-1</property>
-                 <property name="single_line_mode">False</property>
-                 <property name="angle">0</property>
-               </widget>
-               <packing>
-                 <property name="left_attach">0</property>
-                 <property name="right_attach">1</property>
-                 <property name="top_attach">1</property>
-                 <property name="bottom_attach">2</property>
-                 <property name="x_options">fill</property>
-                 <property name="y_options"></property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkEntry" id="width_entry">
-                 <property name="width_request">25</property>
-                 <property name="can_focus">True</property>
-                 <property name="editable">True</property>
-                 <property name="visibility">True</property>
-                 <property name="max_length">0</property>
-                 <property name="text" translatable="yes"></property>
-                 <property name="has_frame">True</property>
-                 <property name="invisible_char">*</property>
-                 <property name="activates_default">False</property>
-               </widget>
-               <packing>
-                 <property name="left_attach">1</property>
-                 <property name="right_attach">2</property>
-                 <property name="top_attach">0</property>
-                 <property name="bottom_attach">1</property>
-                 <property name="y_options"></property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkEntry" id="decimals_entry">
-                 <property name="width_request">25</property>
-                 <property name="visible">True</property>
-                 <property name="can_focus">True</property>
-                 <property name="editable">True</property>
-                 <property name="visibility">True</property>
-                 <property name="max_length">0</property>
-                 <property name="text" translatable="yes"></property>
-                 <property name="has_frame">True</property>
-                 <property name="invisible_char">*</property>
-                 <property name="activates_default">False</property>
-               </widget>
-               <packing>
-                 <property name="left_attach">1</property>
-                 <property name="right_attach">2</property>
-                 <property name="top_attach">1</property>
-                 <property name="bottom_attach">2</property>
-                 <property name="y_options"></property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkHBox" id="hbox2">
-                 <property name="visible">True</property>
-                 <property name="homogeneous">False</property>
-                 <property name="spacing">0</property>
-
-                 <child>
-                   <widget class="GtkLabel" id="width_label">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">Width:</property>
-                     <property name="use_underline">False</property>
-                     <property name="use_markup">False</property>
-                     <property name="justify">GTK_JUSTIFY_RIGHT</property>
-                     <property name="wrap">False</property>
-                     <property name="selectable">False</property>
-                     <property name="xalign">0.5</property>
-                     <property name="yalign">0.5</property>
-                     <property name="xpad">0</property>
-                     <property name="ypad">0</property>
-                     <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-                     <property name="width_chars">-1</property>
-                     <property name="single_line_mode">False</property>
-                     <property name="angle">0</property>
-                   </widget>
-                   <packing>
-                     <property name="padding">0</property>
-                     <property name="expand">False</property>
-                     <property name="fill">False</property>
-                     <property name="pack_type">GTK_PACK_END</property>
-                   </packing>
-                 </child>
-               </widget>
-               <packing>
-                 <property name="left_attach">0</property>
-                 <property name="right_attach">1</property>
-                 <property name="top_attach">0</property>
-                 <property name="bottom_attach">1</property>
-                 <property name="x_options">fill</property>
-                 <property name="y_options">fill</property>
-               </packing>
-             </child>
-           </widget>
-           <packing>
-             <property name="padding">0</property>
-             <property name="expand">True</property>
-             <property name="fill">True</property>
-           </packing>
-         </child>
-       </widget>
-       <packing>
-         <property name="padding">0</property>
-         <property name="expand">True</property>
-         <property name="fill">False</property>
-       </packing>
-      </child>
-
-      <child>
-       <widget class="GtkVButtonBox" id="vbuttonbox6">
-         <property name="visible">True</property>
-         <property name="layout_style">GTK_BUTTONBOX_START</property>
-         <property name="spacing">5</property>
-
-         <child>
-           <widget class="GtkButton" id="var_type_ok">
-             <property name="visible">True</property>
-             <property name="can_default">True</property>
-             <property name="can_focus">True</property>
-             <property name="label">gtk-ok</property>
-             <property name="use_stock">True</property>
-             <property name="relief">GTK_RELIEF_NORMAL</property>
-             <property name="focus_on_click">True</property>
-           </widget>
-         </child>
-
-         <child>
-           <widget class="GtkButton" id="var_type_cancel">
-             <property name="visible">True</property>
-             <property name="can_default">True</property>
-             <property name="can_focus">True</property>
-             <property name="label">gtk-cancel</property>
-             <property name="use_stock">True</property>
-             <property name="relief">GTK_RELIEF_NORMAL</property>
-             <property name="focus_on_click">True</property>
-             <signal name="clicked" handler="on_var_type_cancel_clicked" object="var_type_dialog" last_modification_time="Mon, 31 Oct 2005 09:49:33 GMT"/>
-           </widget>
-         </child>
-
-         <child>
-           <widget class="GtkButton" id="help_button_variable_type">
-             <property name="visible">True</property>
-             <property name="can_default">True</property>
-             <property name="can_focus">True</property>
-             <property name="label">gtk-help</property>
-             <property name="use_stock">True</property>
-             <property name="relief">GTK_RELIEF_NORMAL</property>
-             <property name="focus_on_click">True</property>
-           </widget>
-         </child>
-       </widget>
-       <packing>
-         <property name="padding">0</property>
-         <property name="expand">True</property>
-         <property name="fill">True</property>
-       </packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkWindow" id="val_labs_dialog">
-  <property name="title" translatable="yes">Value Labels</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">True</property>
-  <property name="resizable">False</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">True</property>
-  <property name="skip_pager_hint">True</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-
-  <child>
-    <widget class="GtkHBox" id="hbox3">
-      <property name="border_width">5</property>
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">0</property>
-
-      <child>
-       <widget class="GtkFrame" id="frame1">
-         <property name="visible">True</property>
-         <property name="label_xalign">0</property>
-         <property name="label_yalign">0.5</property>
-         <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-         <child>
-           <widget class="GtkAlignment" id="alignment1">
-             <property name="border_width">8</property>
-             <property name="visible">True</property>
-             <property name="xalign">0.5</property>
-             <property name="yalign">0.5</property>
-             <property name="xscale">1</property>
-             <property name="yscale">1</property>
-             <property name="top_padding">0</property>
-             <property name="bottom_padding">0</property>
-             <property name="left_padding">12</property>
-             <property name="right_padding">0</property>
-
-             <child>
-               <widget class="GtkTable" id="table3">
-                 <property name="visible">True</property>
-                 <property name="n_rows">2</property>
-                 <property name="n_columns">2</property>
-                 <property name="homogeneous">False</property>
-                 <property name="row_spacing">5</property>
-                 <property name="column_spacing">0</property>
-
-                 <child>
-                   <widget class="GtkVButtonBox" id="vbuttonbox2">
-                     <property name="border_width">5</property>
-                     <property name="visible">True</property>
-                     <property name="layout_style">GTK_BUTTONBOX_DEFAULT_STYLE</property>
-                     <property name="spacing">0</property>
-
-                     <child>
-                       <widget class="GtkButton" id="val_labs_add">
-                         <property name="visible">True</property>
-                         <property name="sensitive">False</property>
-                         <property name="can_default">True</property>
-                         <property name="can_focus">True</property>
-                         <property name="label">gtk-add</property>
-                         <property name="use_stock">True</property>
-                         <property name="relief">GTK_RELIEF_NORMAL</property>
-                         <property name="focus_on_click">True</property>
-                       </widget>
-                     </child>
-
-                     <child>
-                       <widget class="GtkButton" id="val_labs_change">
-                         <property name="visible">True</property>
-                         <property name="sensitive">False</property>
-                         <property name="can_default">True</property>
-                         <property name="can_focus">True</property>
-                         <property name="label">gtk-apply</property>
-                         <property name="use_stock">True</property>
-                         <property name="relief">GTK_RELIEF_NORMAL</property>
-                         <property name="focus_on_click">True</property>
-                       </widget>
-                     </child>
-
-                     <child>
-                       <widget class="GtkButton" id="val_labs_remove">
-                         <property name="visible">True</property>
-                         <property name="sensitive">False</property>
-                         <property name="can_default">True</property>
-                         <property name="can_focus">True</property>
-                         <property name="label">gtk-remove</property>
-                         <property name="use_stock">True</property>
-                         <property name="relief">GTK_RELIEF_NORMAL</property>
-                         <property name="focus_on_click">True</property>
-                       </widget>
-                     </child>
-                   </widget>
-                   <packing>
-                     <property name="left_attach">0</property>
-                     <property name="right_attach">1</property>
-                     <property name="top_attach">1</property>
-                     <property name="bottom_attach">2</property>
-                     <property name="x_options">fill</property>
-                   </packing>
-                 </child>
-
-                 <child>
-                   <widget class="GtkTable" id="table4">
-                     <property name="border_width">5</property>
-                     <property name="visible">True</property>
-                     <property name="n_rows">2</property>
-                     <property name="n_columns">2</property>
-                     <property name="homogeneous">False</property>
-                     <property name="row_spacing">4</property>
-                     <property name="column_spacing">5</property>
-
-                     <child>
-                       <widget class="GtkLabel" id="label5">
-                         <property name="visible">True</property>
-                         <property name="label" translatable="yes">Value:</property>
-                         <property name="use_underline">False</property>
-                         <property name="use_markup">False</property>
-                         <property name="justify">GTK_JUSTIFY_LEFT</property>
-                         <property name="wrap">False</property>
-                         <property name="selectable">False</property>
-                         <property name="xalign">0</property>
-                         <property name="yalign">0.5</property>
-                         <property name="xpad">0</property>
-                         <property name="ypad">0</property>
-                         <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-                         <property name="width_chars">-1</property>
-                         <property name="single_line_mode">False</property>
-                         <property name="angle">0</property>
-                       </widget>
-                       <packing>
-                         <property name="left_attach">0</property>
-                         <property name="right_attach">1</property>
-                         <property name="top_attach">0</property>
-                         <property name="bottom_attach">1</property>
-                         <property name="x_options">fill</property>
-                         <property name="y_options"></property>
-                       </packing>
-                     </child>
-
-                     <child>
-                       <widget class="GtkLabel" id="label6">
-                         <property name="visible">True</property>
-                         <property name="label" translatable="yes">Value Label:</property>
-                         <property name="use_underline">False</property>
-                         <property name="use_markup">False</property>
-                         <property name="justify">GTK_JUSTIFY_LEFT</property>
-                         <property name="wrap">False</property>
-                         <property name="selectable">False</property>
-                         <property name="xalign">0</property>
-                         <property name="yalign">0.5</property>
-                         <property name="xpad">0</property>
-                         <property name="ypad">0</property>
-                         <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-                         <property name="width_chars">-1</property>
-                         <property name="single_line_mode">False</property>
-                         <property name="angle">0</property>
-                       </widget>
-                       <packing>
-                         <property name="left_attach">0</property>
-                         <property name="right_attach">1</property>
-                         <property name="top_attach">1</property>
-                         <property name="bottom_attach">2</property>
-                         <property name="x_options">fill</property>
-                         <property name="y_options"></property>
-                       </packing>
-                     </child>
-
-                     <child>
-                       <widget class="GtkEntry" id="label_entry">
-                         <property name="visible">True</property>
-                         <property name="can_focus">True</property>
-                         <property name="editable">True</property>
-                         <property name="visibility">True</property>
-                         <property name="max_length">0</property>
-                         <property name="text" translatable="yes"></property>
-                         <property name="has_frame">True</property>
-                         <property name="invisible_char">*</property>
-                         <property name="activates_default">False</property>
-                       </widget>
-                       <packing>
-                         <property name="left_attach">1</property>
-                         <property name="right_attach">2</property>
-                         <property name="top_attach">1</property>
-                         <property name="bottom_attach">2</property>
-                         <property name="y_options"></property>
-                       </packing>
-                     </child>
-
-                     <child>
-                       <widget class="GtkHBox" id="hbox4">
-                         <property name="visible">True</property>
-                         <property name="homogeneous">False</property>
-                         <property name="spacing">0</property>
-
-                         <child>
-                           <widget class="GtkEntry" id="value_entry">
-                             <property name="width_request">85</property>
-                             <property name="visible">True</property>
-                             <property name="can_focus">True</property>
-                             <property name="editable">True</property>
-                             <property name="visibility">True</property>
-                             <property name="max_length">0</property>
-                             <property name="text" translatable="yes"></property>
-                             <property name="has_frame">True</property>
-                             <property name="invisible_char">*</property>
-                             <property name="activates_default">False</property>
-                           </widget>
-                           <packing>
-                             <property name="padding">1</property>
-                             <property name="expand">False</property>
-                             <property name="fill">False</property>
-                           </packing>
-                         </child>
-                       </widget>
-                       <packing>
-                         <property name="left_attach">1</property>
-                         <property name="right_attach">2</property>
-                         <property name="top_attach">0</property>
-                         <property name="bottom_attach">1</property>
-                         <property name="x_options">fill</property>
-                         <property name="y_options">fill</property>
-                       </packing>
-                     </child>
-                   </widget>
-                   <packing>
-                     <property name="left_attach">0</property>
-                     <property name="right_attach">2</property>
-                     <property name="top_attach">0</property>
-                     <property name="bottom_attach">1</property>
-                     <property name="x_options">fill</property>
-                   </packing>
-                 </child>
-
-                 <child>
-                   <widget class="GtkScrolledWindow" id="scrolledwindow3">
-                     <property name="visible">True</property>
-                     <property name="can_focus">True</property>
-                     <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                     <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                     <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-                     <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-                     <child>
-                       <widget class="GtkTreeView" id="treeview1">
-                         <property name="visible">True</property>
-                         <property name="can_focus">True</property>
-                         <property name="headers_visible">False</property>
-                         <property name="rules_hint">False</property>
-                         <property name="reorderable">False</property>
-                         <property name="enable_search">False</property>
-                         <property name="fixed_height_mode">False</property>
-                         <property name="hover_selection">False</property>
-                         <property name="hover_expand">False</property>
-                       </widget>
-                     </child>
-                   </widget>
-                   <packing>
-                     <property name="left_attach">1</property>
-                     <property name="right_attach">2</property>
-                     <property name="top_attach">1</property>
-                     <property name="bottom_attach">2</property>
-                     <property name="x_options">fill</property>
-                     <property name="y_options">fill</property>
-                   </packing>
-                 </child>
-               </widget>
-             </child>
-           </widget>
-         </child>
-
-         <child>
-           <widget class="GtkLabel" id="label7">
-             <property name="visible">True</property>
-             <property name="label" translatable="yes">Value Labels</property>
-             <property name="use_underline">False</property>
-             <property name="use_markup">True</property>
-             <property name="justify">GTK_JUSTIFY_LEFT</property>
-             <property name="wrap">False</property>
-             <property name="selectable">False</property>
-             <property name="xalign">0.5</property>
-             <property name="yalign">0.5</property>
-             <property name="xpad">0</property>
-             <property name="ypad">0</property>
-             <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-             <property name="width_chars">-1</property>
-             <property name="single_line_mode">False</property>
-             <property name="angle">0</property>
-           </widget>
-           <packing>
-             <property name="type">label_item</property>
-           </packing>
-         </child>
-       </widget>
-       <packing>
-         <property name="padding">10</property>
-         <property name="expand">True</property>
-         <property name="fill">True</property>
-       </packing>
-      </child>
-
-      <child>
-       <widget class="GtkVButtonBox" id="vbuttonbox3">
-         <property name="border_width">5</property>
-         <property name="visible">True</property>
-         <property name="layout_style">GTK_BUTTONBOX_START</property>
-         <property name="spacing">5</property>
-
-         <child>
-           <widget class="GtkButton" id="val_labs_ok">
-             <property name="visible">True</property>
-             <property name="can_default">True</property>
-             <property name="can_focus">True</property>
-             <property name="label">gtk-ok</property>
-             <property name="use_stock">True</property>
-             <property name="relief">GTK_RELIEF_NORMAL</property>
-             <property name="focus_on_click">True</property>
-             <signal name="clicked" handler="gtk_widget_hide" object="val_labs_dialog" last_modification_time="Fri, 25 Nov 2005 23:15:33 GMT"/>
-           </widget>
-         </child>
-
-         <child>
-           <widget class="GtkButton" id="val_labs_cancel">
-             <property name="visible">True</property>
-             <property name="can_default">True</property>
-             <property name="can_focus">True</property>
-             <property name="label">gtk-cancel</property>
-             <property name="use_stock">True</property>
-             <property name="relief">GTK_RELIEF_NORMAL</property>
-             <property name="focus_on_click">True</property>
-             <signal name="clicked" handler="gtk_widget_hide" object="val_labs_dialog" last_modification_time="Fri, 25 Nov 2005 23:15:44 GMT"/>
-           </widget>
-         </child>
-
-         <child>
-           <widget class="GtkButton" id="help_button_value_labels">
-             <property name="visible">True</property>
-             <property name="can_default">True</property>
-             <property name="can_focus">True</property>
-             <property name="label">gtk-help</property>
-             <property name="use_stock">True</property>
-             <property name="relief">GTK_RELIEF_NORMAL</property>
-             <property name="focus_on_click">True</property>
-           </widget>
-         </child>
-       </widget>
-       <packing>
-         <property name="padding">0</property>
-         <property name="expand">False</property>
-         <property name="fill">False</property>
-         <property name="pack_type">GTK_PACK_END</property>
-       </packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkWindow" id="missing_values_dialog">
-  <property name="border_width">10</property>
-  <property name="title" translatable="yes">Missing Values</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">True</property>
-  <property name="resizable">False</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">True</property>
-  <property name="skip_pager_hint">True</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-
-  <child>
-    <widget class="GtkTable" id="table6">
-      <property name="visible">True</property>
-      <property name="n_rows">2</property>
-      <property name="n_columns">2</property>
-      <property name="homogeneous">False</property>
-      <property name="row_spacing">0</property>
-      <property name="column_spacing">0</property>
-
-      <child>
-       <widget class="GtkVButtonBox" id="vbuttonbox5">
-         <property name="border_width">5</property>
-         <property name="visible">True</property>
-         <property name="layout_style">GTK_BUTTONBOX_START</property>
-         <property name="spacing">5</property>
-
-         <child>
-           <widget class="GtkButton" id="missing_val_ok">
-             <property name="visible">True</property>
-             <property name="can_default">True</property>
-             <property name="can_focus">True</property>
-             <property name="label">gtk-ok</property>
-             <property name="use_stock">True</property>
-             <property name="relief">GTK_RELIEF_NORMAL</property>
-             <property name="focus_on_click">True</property>
-             <signal name="clicked" handler="gtk_widget_hide" object="val_labs_dialog" last_modification_time="Fri, 25 Nov 2005 23:15:33 GMT"/>
-           </widget>
-         </child>
-
-         <child>
-           <widget class="GtkButton" id="missing_val_cancel">
-             <property name="visible">True</property>
-             <property name="can_default">True</property>
-             <property name="can_focus">True</property>
-             <property name="label">gtk-cancel</property>
-             <property name="use_stock">True</property>
-             <property name="relief">GTK_RELIEF_NORMAL</property>
-             <property name="focus_on_click">True</property>
-             <signal name="clicked" handler="gtk_widget_hide" object="val_labs_dialog" last_modification_time="Fri, 25 Nov 2005 23:15:44 GMT"/>
-           </widget>
-         </child>
-
-         <child>
-           <widget class="GtkButton" id="help_button_missing_values">
-             <property name="visible">True</property>
-             <property name="can_default">True</property>
-             <property name="can_focus">True</property>
-             <property name="label">gtk-help</property>
-             <property name="use_stock">True</property>
-             <property name="relief">GTK_RELIEF_NORMAL</property>
-             <property name="focus_on_click">True</property>
-           </widget>
-         </child>
-       </widget>
-       <packing>
-         <property name="left_attach">1</property>
-         <property name="right_attach">2</property>
-         <property name="top_attach">0</property>
-         <property name="bottom_attach">1</property>
-       </packing>
-      </child>
-
-      <child>
-       <widget class="GtkVBox" id="vbox5">
-         <property name="visible">True</property>
-         <property name="homogeneous">False</property>
-         <property name="spacing">12</property>
-
-         <child>
-           <widget class="GtkRadioButton" id="no_missing">
-             <property name="visible">True</property>
-             <property name="can_focus">True</property>
-             <property name="label" translatable="yes">_No missing values</property>
-             <property name="use_underline">True</property>
-             <property name="relief">GTK_RELIEF_NORMAL</property>
-             <property name="focus_on_click">True</property>
-             <property name="active">True</property>
-             <property name="inconsistent">False</property>
-             <property name="draw_indicator">True</property>
-           </widget>
-           <packing>
-             <property name="padding">0</property>
-             <property name="expand">False</property>
-             <property name="fill">False</property>
-           </packing>
-         </child>
-
-         <child>
-           <widget class="GtkVBox" id="vbox6">
-             <property name="visible">True</property>
-             <property name="homogeneous">False</property>
-             <property name="spacing">0</property>
-
-             <child>
-               <widget class="GtkRadioButton" id="discrete_missing">
-                 <property name="visible">True</property>
-                 <property name="can_focus">True</property>
-                 <property name="label" translatable="yes">_Discrete missing values</property>
-                 <property name="use_underline">True</property>
-                 <property name="relief">GTK_RELIEF_NORMAL</property>
-                 <property name="focus_on_click">False</property>
-                 <property name="active">False</property>
-                 <property name="inconsistent">False</property>
-                 <property name="draw_indicator">True</property>
-                 <property name="group">no_missing</property>
-               </widget>
-               <packing>
-                 <property name="padding">0</property>
-                 <property name="expand">False</property>
-                 <property name="fill">False</property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkHBox" id="hbox10">
-                 <property name="visible">True</property>
-                 <property name="homogeneous">False</property>
-                 <property name="spacing">0</property>
-
-                 <child>
-                   <widget class="GtkHBox" id="hbox5">
-                     <property name="border_width">5</property>
-                     <property name="visible">True</property>
-                     <property name="homogeneous">True</property>
-                     <property name="spacing">5</property>
-
-                     <child>
-                       <widget class="GtkEntry" id="mv0">
-                         <property name="width_request">75</property>
-                         <property name="visible">True</property>
-                         <property name="can_focus">True</property>
-                         <property name="editable">True</property>
-                         <property name="visibility">True</property>
-                         <property name="max_length">0</property>
-                         <property name="text" translatable="yes"></property>
-                         <property name="has_frame">True</property>
-                         <property name="invisible_char">*</property>
-                         <property name="activates_default">False</property>
-                       </widget>
-                       <packing>
-                         <property name="padding">0</property>
-                         <property name="expand">False</property>
-                         <property name="fill">False</property>
-                       </packing>
-                     </child>
-
-                     <child>
-                       <widget class="GtkEntry" id="mv1">
-                         <property name="width_request">75</property>
-                         <property name="visible">True</property>
-                         <property name="can_focus">True</property>
-                         <property name="editable">True</property>
-                         <property name="visibility">True</property>
-                         <property name="max_length">0</property>
-                         <property name="text" translatable="yes"></property>
-                         <property name="has_frame">True</property>
-                         <property name="invisible_char">*</property>
-                         <property name="activates_default">False</property>
-                       </widget>
-                       <packing>
-                         <property name="padding">0</property>
-                         <property name="expand">False</property>
-                         <property name="fill">False</property>
-                       </packing>
-                     </child>
-
-                     <child>
-                       <widget class="GtkEntry" id="mv2">
-                         <property name="width_request">75</property>
-                         <property name="visible">True</property>
-                         <property name="can_focus">True</property>
-                         <property name="editable">True</property>
-                         <property name="visibility">True</property>
-                         <property name="max_length">0</property>
-                         <property name="text" translatable="yes"></property>
-                         <property name="has_frame">True</property>
-                         <property name="invisible_char">*</property>
-                         <property name="activates_default">False</property>
-                       </widget>
-                       <packing>
-                         <property name="padding">0</property>
-                         <property name="expand">False</property>
-                         <property name="fill">False</property>
-                       </packing>
-                     </child>
-                   </widget>
-                   <packing>
-                     <property name="padding">20</property>
-                     <property name="expand">True</property>
-                     <property name="fill">True</property>
-                   </packing>
-                 </child>
-               </widget>
-               <packing>
-                 <property name="padding">0</property>
-                 <property name="expand">True</property>
-                 <property name="fill">True</property>
-               </packing>
-             </child>
-           </widget>
-           <packing>
-             <property name="padding">0</property>
-             <property name="expand">False</property>
-             <property name="fill">False</property>
-           </packing>
-         </child>
-       </widget>
-       <packing>
-         <property name="left_attach">0</property>
-         <property name="right_attach">1</property>
-         <property name="top_attach">0</property>
-         <property name="bottom_attach">1</property>
-         <property name="y_options">fill</property>
-       </packing>
-      </child>
-
-      <child>
-       <widget class="GtkVBox" id="vbox7">
-         <property name="visible">True</property>
-         <property name="homogeneous">False</property>
-         <property name="spacing">0</property>
-
-         <child>
-           <widget class="GtkRadioButton" id="range_missing">
-             <property name="visible">True</property>
-             <property name="can_focus">True</property>
-             <property name="label" translatable="yes">_Range plus one optional discrete missing value</property>
-             <property name="use_underline">True</property>
-             <property name="relief">GTK_RELIEF_NORMAL</property>
-             <property name="focus_on_click">False</property>
-             <property name="active">False</property>
-             <property name="inconsistent">False</property>
-             <property name="draw_indicator">True</property>
-             <property name="group">no_missing</property>
-           </widget>
-           <packing>
-             <property name="padding">0</property>
-             <property name="expand">False</property>
-             <property name="fill">False</property>
-           </packing>
-         </child>
-
-         <child>
-           <widget class="GtkVBox" id="vbox8">
-             <property name="visible">True</property>
-             <property name="homogeneous">False</property>
-             <property name="spacing">5</property>
-
-             <child>
-               <widget class="GtkHBox" id="hbox7">
-                 <property name="visible">True</property>
-                 <property name="homogeneous">False</property>
-                 <property name="spacing">0</property>
-
-                 <child>
-                   <widget class="GtkHBox" id="hbox8">
-                     <property name="visible">True</property>
-                     <property name="homogeneous">False</property>
-                     <property name="spacing">0</property>
-
-                     <child>
-                       <widget class="GtkLabel" id="label11">
-                         <property name="visible">True</property>
-                         <property name="label" translatable="yes">_Low:</property>
-                         <property name="use_underline">True</property>
-                         <property name="use_markup">False</property>
-                         <property name="justify">GTK_JUSTIFY_LEFT</property>
-                         <property name="wrap">False</property>
-                         <property name="selectable">False</property>
-                         <property name="xalign">0.5</property>
-                         <property name="yalign">0.5</property>
-                         <property name="xpad">0</property>
-                         <property name="ypad">0</property>
-                         <property name="mnemonic_widget">mv-low</property>
-                         <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-                         <property name="width_chars">-1</property>
-                         <property name="single_line_mode">False</property>
-                         <property name="angle">0</property>
-                       </widget>
-                       <packing>
-                         <property name="padding">20</property>
-                         <property name="expand">False</property>
-                         <property name="fill">False</property>
-                       </packing>
-                     </child>
-
-                     <child>
-                       <widget class="GtkEntry" id="mv-low">
-                         <property name="width_request">75</property>
-                         <property name="visible">True</property>
-                         <property name="can_focus">True</property>
-                         <property name="editable">True</property>
-                         <property name="visibility">True</property>
-                         <property name="max_length">0</property>
-                         <property name="text" translatable="yes"></property>
-                         <property name="has_frame">True</property>
-                         <property name="invisible_char">*</property>
-                         <property name="activates_default">False</property>
-                       </widget>
-                       <packing>
-                         <property name="padding">0</property>
-                         <property name="expand">False</property>
-                         <property name="fill">True</property>
-                       </packing>
-                     </child>
-                   </widget>
-                   <packing>
-                     <property name="padding">0</property>
-                     <property name="expand">True</property>
-                     <property name="fill">True</property>
-                   </packing>
-                 </child>
-
-                 <child>
-                   <widget class="GtkHBox" id="hbox9">
-                     <property name="visible">True</property>
-                     <property name="homogeneous">False</property>
-                     <property name="spacing">0</property>
-
-                     <child>
-                       <widget class="GtkLabel" id="label12">
-                         <property name="visible">True</property>
-                         <property name="label" translatable="yes">_High:</property>
-                         <property name="use_underline">True</property>
-                         <property name="use_markup">False</property>
-                         <property name="justify">GTK_JUSTIFY_LEFT</property>
-                         <property name="wrap">False</property>
-                         <property name="selectable">False</property>
-                         <property name="xalign">0.5</property>
-                         <property name="yalign">0.5</property>
-                         <property name="xpad">0</property>
-                         <property name="ypad">0</property>
-                         <property name="mnemonic_widget">mv-high</property>
-                         <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-                         <property name="width_chars">-1</property>
-                         <property name="single_line_mode">False</property>
-                         <property name="angle">0</property>
-                       </widget>
-                       <packing>
-                         <property name="padding">0</property>
-                         <property name="expand">False</property>
-                         <property name="fill">False</property>
-                       </packing>
-                     </child>
-
-                     <child>
-                       <widget class="GtkEntry" id="mv-high">
-                         <property name="width_request">75</property>
-                         <property name="visible">True</property>
-                         <property name="can_focus">True</property>
-                         <property name="editable">True</property>
-                         <property name="visibility">True</property>
-                         <property name="max_length">0</property>
-                         <property name="text" translatable="yes"></property>
-                         <property name="has_frame">True</property>
-                         <property name="invisible_char">*</property>
-                         <property name="activates_default">False</property>
-                       </widget>
-                       <packing>
-                         <property name="padding">5</property>
-                         <property name="expand">True</property>
-                         <property name="fill">True</property>
-                       </packing>
-                     </child>
-                   </widget>
-                   <packing>
-                     <property name="padding">20</property>
-                     <property name="expand">True</property>
-                     <property name="fill">False</property>
-                   </packing>
-                 </child>
-
-                 <child>
-                   <placeholder/>
-                 </child>
-
-                 <child>
-                   <placeholder/>
-                 </child>
-               </widget>
-               <packing>
-                 <property name="padding">0</property>
-                 <property name="expand">True</property>
-                 <property name="fill">True</property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkHBox" id="hbox6">
-                 <property name="visible">True</property>
-                 <property name="homogeneous">False</property>
-                 <property name="spacing">0</property>
-
-                 <child>
-                   <widget class="GtkLabel" id="label10">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">Di_screte value:</property>
-                     <property name="use_underline">True</property>
-                     <property name="use_markup">False</property>
-                     <property name="justify">GTK_JUSTIFY_LEFT</property>
-                     <property name="wrap">False</property>
-                     <property name="selectable">False</property>
-                     <property name="xalign">0.5</property>
-                     <property name="yalign">0.5</property>
-                     <property name="xpad">0</property>
-                     <property name="ypad">0</property>
-                     <property name="mnemonic_widget">mv-discrete</property>
-                     <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-                     <property name="width_chars">-1</property>
-                     <property name="single_line_mode">False</property>
-                     <property name="angle">0</property>
-                   </widget>
-                   <packing>
-                     <property name="padding">20</property>
-                     <property name="expand">False</property>
-                     <property name="fill">False</property>
-                   </packing>
-                 </child>
-
-                 <child>
-                   <widget class="GtkEntry" id="mv-discrete">
-                     <property name="width_request">75</property>
-                     <property name="visible">True</property>
-                     <property name="can_focus">True</property>
-                     <property name="editable">True</property>
-                     <property name="visibility">True</property>
-                     <property name="max_length">0</property>
-                     <property name="text" translatable="yes"></property>
-                     <property name="has_frame">True</property>
-                     <property name="invisible_char">*</property>
-                     <property name="activates_default">False</property>
-                   </widget>
-                   <packing>
-                     <property name="padding">0</property>
-                     <property name="expand">False</property>
-                     <property name="fill">True</property>
-                   </packing>
-                 </child>
-               </widget>
-               <packing>
-                 <property name="padding">0</property>
-                 <property name="expand">True</property>
-                 <property name="fill">True</property>
-               </packing>
-             </child>
-           </widget>
-           <packing>
-             <property name="padding">0</property>
-             <property name="expand">True</property>
-             <property name="fill">True</property>
-           </packing>
-         </child>
-       </widget>
-       <packing>
-         <property name="left_attach">0</property>
-         <property name="right_attach">2</property>
-         <property name="top_attach">1</property>
-         <property name="bottom_attach">2</property>
-         <property name="x_options">fill</property>
-       </packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkDialog" id="go_to_case_dialog">
-  <property name="title" translatable="yes">Go To Case</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">True</property>
-  <property name="resizable">False</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">True</property>
-  <property name="skip_pager_hint">True</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-  <property name="has_separator">False</property>
-
-  <child internal-child="vbox">
-    <widget class="GtkVBox" id="dialog-vbox1">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">0</property>
-
-      <child internal-child="action_area">
-       <widget class="GtkHButtonBox" id="dialog-action_area1">
-         <property name="visible">True</property>
-         <property name="layout_style">GTK_BUTTONBOX_END</property>
-
-         <child>
-           <widget class="GtkButton" id="button_go_to_case_ok">
-             <property name="visible">True</property>
-             <property name="can_default">True</property>
-             <property name="can_focus">True</property>
-             <property name="label">gtk-ok</property>
-             <property name="use_stock">True</property>
-             <property name="relief">GTK_RELIEF_NORMAL</property>
-             <property name="focus_on_click">True</property>
-             <property name="response_id">-5</property>
-           </widget>
-         </child>
-       </widget>
-       <packing>
-         <property name="padding">0</property>
-         <property name="expand">False</property>
-         <property name="fill">True</property>
-         <property name="pack_type">GTK_PACK_END</property>
-       </packing>
-      </child>
-
-      <child>
-       <widget class="GtkHBox" id="hbox11">
-         <property name="visible">True</property>
-         <property name="homogeneous">False</property>
-         <property name="spacing">3</property>
-
-         <child>
-           <widget class="GtkLabel" id="label14">
-             <property name="visible">True</property>
-             <property name="label" translatable="yes">Case Number:</property>
-             <property name="use_underline">False</property>
-             <property name="use_markup">False</property>
-             <property name="justify">GTK_JUSTIFY_LEFT</property>
-             <property name="wrap">False</property>
-             <property name="selectable">False</property>
-             <property name="xalign">0.5</property>
-             <property name="yalign">0.5</property>
-             <property name="xpad">0</property>
-             <property name="ypad">0</property>
-             <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-             <property name="width_chars">-1</property>
-             <property name="single_line_mode">False</property>
-             <property name="angle">0</property>
-           </widget>
-           <packing>
-             <property name="padding">0</property>
-             <property name="expand">False</property>
-             <property name="fill">False</property>
-           </packing>
-         </child>
-
-         <child>
-           <widget class="GtkEntry" id="entry_go_to_case">
-             <property name="width_request">50</property>
-             <property name="visible">True</property>
-             <property name="can_focus">True</property>
-             <property name="editable">True</property>
-             <property name="visibility">True</property>
-             <property name="max_length">0</property>
-             <property name="text" translatable="yes"></property>
-             <property name="has_frame">True</property>
-             <property name="invisible_char">*</property>
-             <property name="activates_default">False</property>
-           </widget>
-           <packing>
-             <property name="padding">0</property>
-             <property name="expand">True</property>
-             <property name="fill">True</property>
-           </packing>
-         </child>
-       </widget>
-       <packing>
-         <property name="padding">0</property>
-         <property name="expand">True</property>
-         <property name="fill">True</property>
-       </packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkWindow" id="sort-cases-dialog">
-  <property name="border_width">10</property>
-  <property name="can_focus">True</property>
-  <property name="title" translatable="yes">Sort Cases</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">True</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">True</property>
-  <property name="skip_pager_hint">True</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-
-  <child>
-    <widget class="GtkHBox" id="hbox12">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">9</property>
-
-      <child>
-       <widget class="GtkScrolledWindow" id="scrolledwindow6">
-         <property name="border_width">10</property>
-         <property name="visible">True</property>
-         <property name="can_focus">True</property>
-         <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-         <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-         <property name="shadow_type">GTK_SHADOW_IN</property>
-         <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-         <child>
-           <widget class="GtkTreeView" id="sort-cases-treeview-dict">
-             <property name="visible">True</property>
-             <property name="can_focus">True</property>
-             <property name="headers_visible">False</property>
-             <property name="rules_hint">False</property>
-             <property name="reorderable">True</property>
-             <property name="enable_search">True</property>
-             <property name="fixed_height_mode">True</property>
-             <property name="hover_selection">False</property>
-             <property name="hover_expand">False</property>
-           </widget>
-         </child>
-       </widget>
-       <packing>
-         <property name="padding">0</property>
-         <property name="expand">True</property>
-         <property name="fill">True</property>
-       </packing>
-      </child>
-
-      <child>
-       <widget class="GtkAlignment" id="alignment3">
-         <property name="visible">True</property>
-         <property name="xalign">0.5</property>
-         <property name="yalign">0.25</property>
-         <property name="xscale">0.460000008345</property>
-         <property name="yscale">0.0799999982119</property>
-         <property name="top_padding">0</property>
-         <property name="bottom_padding">0</property>
-         <property name="left_padding">0</property>
-         <property name="right_padding">0</property>
-
-         <child>
-           <widget class="GtkButton" id="sort-cases-button">
-             <property name="visible">True</property>
-             <property name="can_focus">True</property>
-             <property name="relief">GTK_RELIEF_NORMAL</property>
-             <property name="focus_on_click">True</property>
-
-             <child>
-               <widget class="GtkArrow" id="sort-cases-arrow">
-                 <property name="visible">True</property>
-                 <property name="arrow_type">GTK_ARROW_RIGHT</property>
-                 <property name="shadow_type">GTK_SHADOW_OUT</property>
-                 <property name="xalign">0.5</property>
-                 <property name="yalign">0.5</property>
-                 <property name="xpad">0</property>
-                 <property name="ypad">0</property>
-               </widget>
-             </child>
-           </widget>
-         </child>
-       </widget>
-       <packing>
-         <property name="padding">0</property>
-         <property name="expand">True</property>
-         <property name="fill">True</property>
-       </packing>
-      </child>
-
-      <child>
-       <widget class="GtkVBox" id="vbox11">
-         <property name="visible">True</property>
-         <property name="homogeneous">False</property>
-         <property name="spacing">4</property>
-
-         <child>
-           <widget class="GtkFrame" id="Sort Order">
-             <property name="height_request">75</property>
-             <property name="visible">True</property>
-             <property name="label_xalign">0</property>
-             <property name="label_yalign">0.5</property>
-             <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-             <child>
-               <widget class="GtkVBox" id="vbox13">
-                 <property name="border_width">12</property>
-                 <property name="height_request">66</property>
-                 <property name="visible">True</property>
-                 <property name="homogeneous">True</property>
-                 <property name="spacing">5</property>
-
-                 <child>
-                   <widget class="GtkRadioButton" id="sort-cases-button-ascending">
-                     <property name="visible">True</property>
-                     <property name="can_focus">True</property>
-                     <property name="label" translatable="yes">Ascending</property>
-                     <property name="use_underline">True</property>
-                     <property name="relief">GTK_RELIEF_NORMAL</property>
-                     <property name="focus_on_click">True</property>
-                     <property name="active">False</property>
-                     <property name="inconsistent">False</property>
-                     <property name="draw_indicator">True</property>
-                   </widget>
-                   <packing>
-                     <property name="padding">0</property>
-                     <property name="expand">False</property>
-                     <property name="fill">False</property>
-                   </packing>
-                 </child>
-
-                 <child>
-                   <widget class="GtkRadioButton" id="radiobutton-descending">
-                     <property name="visible">True</property>
-                     <property name="can_focus">True</property>
-                     <property name="label" translatable="yes">Descending</property>
-                     <property name="use_underline">True</property>
-                     <property name="relief">GTK_RELIEF_NORMAL</property>
-                     <property name="focus_on_click">True</property>
-                     <property name="active">False</property>
-                     <property name="inconsistent">False</property>
-                     <property name="draw_indicator">True</property>
-                     <property name="group">sort-cases-button-ascending</property>
-                   </widget>
-                   <packing>
-                     <property name="padding">0</property>
-                     <property name="expand">False</property>
-                     <property name="fill">False</property>
-                   </packing>
-                 </child>
-               </widget>
-             </child>
-
-             <child>
-               <widget class="GtkLabel" id="label15">
-                 <property name="visible">True</property>
-                 <property name="label" translatable="yes">Sort Order</property>
-                 <property name="use_underline">False</property>
-                 <property name="use_markup">True</property>
-                 <property name="justify">GTK_JUSTIFY_LEFT</property>
-                 <property name="wrap">False</property>
-                 <property name="selectable">False</property>
-                 <property name="xalign">0.5</property>
-                 <property name="yalign">0.5</property>
-                 <property name="xpad">0</property>
-                 <property name="ypad">0</property>
-                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-                 <property name="width_chars">-1</property>
-                 <property name="single_line_mode">False</property>
-                 <property name="angle">0</property>
-               </widget>
-               <packing>
-                 <property name="type">label_item</property>
-               </packing>
-             </child>
-           </widget>
-           <packing>
-             <property name="padding">0</property>
-             <property name="expand">False</property>
-             <property name="fill">True</property>
-             <property name="pack_type">GTK_PACK_END</property>
-           </packing>
-         </child>
-
-         <child>
-           <widget class="GtkVBox" id="vbox12">
-             <property name="visible">True</property>
-             <property name="homogeneous">False</property>
-             <property name="spacing">0</property>
-
-             <child>
-               <widget class="GtkLabel" id="label16">
-                 <property name="visible">True</property>
-                 <property name="label" translatable="yes">Sort by:</property>
-                 <property name="use_underline">False</property>
-                 <property name="use_markup">False</property>
-                 <property name="justify">GTK_JUSTIFY_LEFT</property>
-                 <property name="wrap">False</property>
-                 <property name="selectable">False</property>
-                 <property name="xalign">0</property>
-                 <property name="yalign">0.5</property>
-                 <property name="xpad">0</property>
-                 <property name="ypad">0</property>
-                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-                 <property name="width_chars">-1</property>
-                 <property name="single_line_mode">False</property>
-                 <property name="angle">0</property>
-               </widget>
-               <packing>
-                 <property name="padding">0</property>
-                 <property name="expand">False</property>
-                 <property name="fill">False</property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkScrolledWindow" id="scrolledwindow7">
-                 <property name="visible">True</property>
-                 <property name="can_focus">True</property>
-                 <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                 <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                 <property name="shadow_type">GTK_SHADOW_IN</property>
-                 <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-                 <child>
-                   <widget class="GtkTreeView" id="sort-cases-treeview-criteria">
-                     <property name="visible">True</property>
-                     <property name="can_focus">True</property>
-                     <property name="headers_visible">False</property>
-                     <property name="rules_hint">False</property>
-                     <property name="reorderable">False</property>
-                     <property name="enable_search">True</property>
-                     <property name="fixed_height_mode">True</property>
-                     <property name="hover_selection">False</property>
-                     <property name="hover_expand">False</property>
-                   </widget>
-                 </child>
-               </widget>
-               <packing>
-                 <property name="padding">0</property>
-                 <property name="expand">True</property>
-                 <property name="fill">True</property>
-               </packing>
-             </child>
-           </widget>
-           <packing>
-             <property name="padding">0</property>
-             <property name="expand">True</property>
-             <property name="fill">True</property>
-             <property name="pack_type">GTK_PACK_END</property>
-           </packing>
-         </child>
-       </widget>
-       <packing>
-         <property name="padding">0</property>
-         <property name="expand">True</property>
-         <property name="fill">True</property>
-       </packing>
-      </child>
-
-      <child>
-       <widget class="GtkVButtonBox" id="vbuttonbox7">
-         <property name="visible">True</property>
-         <property name="layout_style">GTK_BUTTONBOX_DEFAULT_STYLE</property>
-         <property name="spacing">0</property>
-
-         <child>
-           <widget class="GtkButton" id="sort-cases-ok">
-             <property name="visible">True</property>
-             <property name="can_default">True</property>
-             <property name="can_focus">True</property>
-             <property name="label">gtk-ok</property>
-             <property name="use_stock">True</property>
-             <property name="relief">GTK_RELIEF_NORMAL</property>
-             <property name="focus_on_click">True</property>
-           </widget>
-         </child>
-
-         <child>
-           <widget class="GtkButton" id="sort-cases-paste">
-             <property name="visible">True</property>
-             <property name="sensitive">False</property>
-             <property name="can_default">True</property>
-             <property name="can_focus">True</property>
-             <property name="label">gtk-paste</property>
-             <property name="use_stock">True</property>
-             <property name="relief">GTK_RELIEF_NORMAL</property>
-             <property name="focus_on_click">True</property>
-           </widget>
-         </child>
-
-         <child>
-           <widget class="GtkButton" id="sort-cases-reset">
-             <property name="visible">True</property>
-             <property name="can_default">True</property>
-             <property name="can_focus">True</property>
-             <property name="label">gtk-refresh</property>
-             <property name="use_stock">True</property>
-             <property name="relief">GTK_RELIEF_NORMAL</property>
-             <property name="focus_on_click">True</property>
-           </widget>
-         </child>
-
-         <child>
-           <widget class="GtkButton" id="sort-cases-cancel">
-             <property name="visible">True</property>
-             <property name="can_default">True</property>
-             <property name="can_focus">True</property>
-             <property name="label">gtk-cancel</property>
-             <property name="use_stock">True</property>
-             <property name="relief">GTK_RELIEF_NORMAL</property>
-             <property name="focus_on_click">True</property>
-           </widget>
-         </child>
-
-         <child>
-           <widget class="GtkButton" id="help_button_sort_cases">
-             <property name="visible">True</property>
-             <property name="can_default">True</property>
-             <property name="can_focus">True</property>
-             <property name="label">gtk-help</property>
-             <property name="use_stock">True</property>
-             <property name="relief">GTK_RELIEF_NORMAL</property>
-             <property name="focus_on_click">True</property>
-           </widget>
-         </child>
-       </widget>
-       <packing>
-         <property name="padding">6</property>
-         <property name="expand">True</property>
-         <property name="fill">False</property>
-       </packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkWindow" id="syntax_editor">
-  <property name="width_request">640</property>
-  <property name="height_request">480</property>
-  <property name="can_focus">True</property>
-  <property name="title" translatable="yes">Psppire Syntax Editor</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-
-  <child>
-    <widget class="GtkVBox" id="vbox14">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">0</property>
-
-      <child>
-       <widget class="GtkMenuBar" id="menubar2">
-         <property name="visible">True</property>
-         <property name="pack_direction">GTK_PACK_DIRECTION_LTR</property>
-         <property name="child_pack_direction">GTK_PACK_DIRECTION_LTR</property>
-
-         <child>
-           <widget class="GtkMenuItem" id="menu_syntax_file">
-             <property name="visible">True</property>
-             <property name="label" translatable="yes">_File</property>
-             <property name="use_underline">True</property>
-
-             <child>
-               <widget class="GtkMenu" id="menu_syntax_file_menu">
-
-                 <child>
-                   <widget class="GtkImageMenuItem" id="new2">
-                     <property name="visible">True</property>
-                     <property name="label">gtk-new</property>
-                     <property name="use_stock">True</property>
-
-                     <child>
-                       <widget class="GtkMenu" id="new2_menu">
-
-                         <child>
-                           <widget class="GtkMenuItem" id="file_new_syntax">
-                             <property name="visible">True</property>
-                             <property name="label" translatable="yes">_Syntax</property>
-                             <property name="use_underline">True</property>
-                           </widget>
-                         </child>
-
-                         <child>
-                           <widget class="GtkMenuItem" id="data4">
-                             <property name="visible">True</property>
-                             <property name="label" translatable="yes">_Data</property>
-                             <property name="use_underline">True</property>
-                           </widget>
-                         </child>
-                       </widget>
-                     </child>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkImageMenuItem" id="open2">
-                     <property name="visible">True</property>
-                     <property name="label">gtk-open</property>
-                     <property name="use_stock">True</property>
-
-                     <child>
-                       <widget class="GtkMenu" id="open2_menu">
-
-                         <child>
-                           <widget class="GtkMenuItem" id="file_open_syntax">
-                             <property name="visible">True</property>
-                             <property name="label" translatable="yes">_Syntax</property>
-                             <property name="use_underline">True</property>
-                             <signal name="activate" handler="on_syntax4_activate" last_modification_time="Tue, 05 Dec 2006 01:43:21 GMT"/>
-                           </widget>
-                         </child>
-
-                         <child>
-                           <widget class="GtkMenuItem" id="data5">
-                             <property name="visible">True</property>
-                             <property name="label" translatable="yes">_Data</property>
-                             <property name="use_underline">True</property>
-                             <signal name="activate" handler="on_data5_activate" last_modification_time="Tue, 05 Dec 2006 01:43:21 GMT"/>
-                           </widget>
-                         </child>
-                       </widget>
-                     </child>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkImageMenuItem" id="file_save">
-                     <property name="visible">True</property>
-                     <property name="label">gtk-save</property>
-                     <property name="use_stock">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkImageMenuItem" id="file_save_as">
-                     <property name="visible">True</property>
-                     <property name="label">gtk-save-as</property>
-                     <property name="use_stock">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkSeparatorMenuItem" id="separatormenuitem2">
-                     <property name="visible">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkImageMenuItem" id="file_quit">
-                     <property name="visible">True</property>
-                     <property name="label">gtk-quit</property>
-                     <property name="use_stock">True</property>
-                   </widget>
-                 </child>
-               </widget>
-             </child>
-           </widget>
-         </child>
-
-         <child>
-           <widget class="GtkMenuItem" id="menuitem7">
-             <property name="visible">True</property>
-             <property name="label" translatable="yes">_Edit</property>
-             <property name="use_underline">True</property>
-
-             <child>
-               <widget class="GtkMenu" id="menuitem7_menu">
-
-                 <child>
-                   <widget class="GtkImageMenuItem" id="cut2">
-                     <property name="visible">True</property>
-                     <property name="label">gtk-cut</property>
-                     <property name="use_stock">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkImageMenuItem" id="copy2">
-                     <property name="visible">True</property>
-                     <property name="label">gtk-copy</property>
-                     <property name="use_stock">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkImageMenuItem" id="paste2">
-                     <property name="visible">True</property>
-                     <property name="label">gtk-paste</property>
-                     <property name="use_stock">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkImageMenuItem" id="delete1">
-                     <property name="visible">True</property>
-                     <property name="label">gtk-delete</property>
-                     <property name="use_stock">True</property>
-                   </widget>
-                 </child>
-               </widget>
-             </child>
-           </widget>
-         </child>
-
-         <child>
-           <widget class="GtkMenuItem" id="run1">
-             <property name="visible">True</property>
-             <property name="label" translatable="yes">_Run</property>
-             <property name="use_underline">True</property>
-
-             <child>
-               <widget class="GtkMenu" id="run1_menu">
-
-                 <child>
-                   <widget class="GtkMenuItem" id="run_all">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">All</property>
-                     <property name="use_underline">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkMenuItem" id="run_selection">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">Selection</property>
-                     <property name="use_underline">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkMenuItem" id="run_current_line">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">Current Line</property>
-                     <property name="use_underline">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkMenuItem" id="run_to_end">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">To End</property>
-                     <property name="use_underline">True</property>
-                   </widget>
-                 </child>
-               </widget>
-             </child>
-           </widget>
-         </child>
-
-         <child>
-           <widget class="GtkMenuItem" id="menuitem9">
-             <property name="visible">True</property>
-             <property name="label" translatable="yes">_Help</property>
-             <property name="use_underline">True</property>
-
-             <child>
-               <widget class="GtkMenu" id="menuitem9_menu">
-
-                 <child>
-                   <widget class="GtkMenuItem" id="about2">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">_About</property>
-                     <property name="use_underline">True</property>
-                   </widget>
-                 </child>
-               </widget>
-             </child>
-           </widget>
-         </child>
-       </widget>
-       <packing>
-         <property name="padding">0</property>
-         <property name="expand">False</property>
-         <property name="fill">False</property>
-       </packing>
-      </child>
-
-      <child>
-       <widget class="GtkScrolledWindow" id="scrolledwindow8">
-         <property name="visible">True</property>
-         <property name="can_focus">True</property>
-         <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
-         <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
-         <property name="shadow_type">GTK_SHADOW_IN</property>
-         <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-         <child>
-           <widget class="GtkTextView" id="syntax_text_view">
-             <property name="visible">True</property>
-             <property name="can_focus">True</property>
-             <property name="editable">True</property>
-             <property name="overwrite">False</property>
-             <property name="accepts_tab">True</property>
-             <property name="justification">GTK_JUSTIFY_LEFT</property>
-             <property name="wrap_mode">GTK_WRAP_NONE</property>
-             <property name="cursor_visible">True</property>
-             <property name="pixels_above_lines">0</property>
-             <property name="pixels_below_lines">0</property>
-             <property name="pixels_inside_wrap">0</property>
-             <property name="left_margin">0</property>
-             <property name="right_margin">0</property>
-             <property name="indent">0</property>
-             <property name="text" translatable="yes"></property>
-           </widget>
-         </child>
-       </widget>
-       <packing>
-         <property name="padding">0</property>
-         <property name="expand">True</property>
-         <property name="fill">True</property>
-       </packing>
-      </child>
-
-      <child>
-       <widget class="GtkStatusbar" id="statusbar2">
-         <property name="visible">True</property>
-         <property name="has_resize_grip">True</property>
-       </widget>
-       <packing>
-         <property name="padding">0</property>
-         <property name="expand">False</property>
-         <property name="fill">False</property>
-       </packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
 </glade-interface>
index 53478d2027f51e4b2e584fbec84a6bd72416ea79..dcb644a3036107582ee597b794fce67f52e01d4d 100644 (file)
@@ -52,7 +52,7 @@ name (const struct getl_interface *i)
   const struct syntax_editor_source *ses =
     (const struct syntax_editor_source *) i;
 
-  return ses->se->name;
+  return window_name ((struct window_editor *) ses->se);
 }
 
 
index 20f6e1b09456547e1f7f9f9dedb5ec06b820bec8..05a4c8851b09019fd156db44fbfcd6e95f78bf6c 100644 (file)
 #include <libpspp/message.h>
 #include <libpspp/getl.h>
 #include "helper.h"
+#include "data-editor.h"
+#include "about.h"
 
-
+#include "window-manager.h"
 
 #include <language/command.h>
 #include <data/procedure.h>
@@ -40,8 +42,6 @@ extern struct source_stream *the_source_stream ;
 extern struct lexer *the_lexer;
 extern struct dataset *the_dataset;
 
-extern GladeXML *xml;
-
 static gboolean save_editor_to_file (struct syntax_editor *se,
                                     const gchar *filename,
                                     GError **err);
@@ -52,16 +52,17 @@ static gboolean save_editor_to_file (struct syntax_editor *se,
 static void
 save_if_modified (struct syntax_editor *se)
 {
+  struct editor_window *e = (struct editor_window *) se;
   if ( TRUE == gtk_text_buffer_get_modified (se->buffer))
     {
       gint response;
       GtkWidget *dialog =
-       gtk_message_dialog_new (GTK_WINDOW(se->window),
+       gtk_message_dialog_new (GTK_WINDOW(e->window),
                                GTK_DIALOG_MODAL,
                                GTK_MESSAGE_QUESTION,
                                GTK_BUTTONS_NONE,
                                _("Save contents of syntax editor to %s?"),
-                               se->name ? se->name : _("Untitled")
+                               e->name ? e->name : _("Untitled")
                                );
 
       gtk_dialog_add_button  (GTK_DIALOG(dialog),
@@ -83,7 +84,7 @@ save_if_modified (struct syntax_editor *se)
        {
          GError *err = NULL;
 
-         if ( ! save_editor_to_file (se, se->name ? se->name : _("Untitled"),
+         if ( ! save_editor_to_file (se, e->name ? e->name : _("Untitled"),
                                      &err) )
            {
              msg (ME, err->message);
@@ -95,7 +96,7 @@ save_if_modified (struct syntax_editor *se)
        return ;
     }
 
-  gtk_widget_destroy (se->window);
+  gtk_widget_destroy (e->window);
 }
 
 /* Callback for the File->SaveAs menuitem */
@@ -106,10 +107,11 @@ on_syntax_save_as   (GtkMenuItem     *menuitem,
   GtkFileFilter *filter;
   gint response;
   struct syntax_editor *se = user_data;
+  struct editor_window *e = user_data;
 
   GtkWidget *dialog =
     gtk_file_chooser_dialog_new (_("Save Syntax"),
-                                GTK_WINDOW(se->window),
+                                GTK_WINDOW(e->window),
                                 GTK_FILE_CHOOSER_ACTION_SAVE,
                                 GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
                                 GTK_STOCK_SAVE,   GTK_RESPONSE_ACCEPT,
@@ -138,8 +140,8 @@ on_syntax_save_as   (GtkMenuItem     *menuitem,
 
       if ( save_editor_to_file (se, filename, &err) )
        {
-         g_free (se->name);
-         se->name = g_strdup (filename);
+         g_free (e->name);
+         e->name = g_strdup (filename);
        }
       else
        {
@@ -159,13 +161,14 @@ on_syntax_save   (GtkMenuItem     *menuitem,
                  gpointer         user_data)
 {
   struct syntax_editor *se = user_data;
+  struct editor_window *e = user_data;
 
-  if ( se->name == NULL )
+  if ( e->name == NULL )
     on_syntax_save_as (menuitem, user_data);
   else
     {
       GError *err;
-      save_editor_to_file (se, se->name, &err);
+      save_editor_to_file (se, e->name, &err);
       msg (ME, err->message);
       g_error_free (err);
     }
@@ -215,73 +218,86 @@ on_run_all (GtkMenuItem *menuitem, gpointer user_data)
 }
 
 
-void
-new_syntax_window (GtkMenuItem     *menuitem,
-                  gpointer         user_data);
-
-
-
-static void open_syntax_window (GtkMenuItem *menuitem,
-                               gpointer user_data);
 
 
 /*
   Create a new syntax editor with NAME.
   If NAME is NULL, a name will be automatically assigned
 */
-static struct syntax_editor *
-new_syntax_editor (const gchar *name)
+struct syntax_editor *
+new_syntax_editor (void)
 {
-  GladeXML *new_xml ;
+  GladeXML *xml =
+    glade_xml_new (PKGDATADIR "/syntax-editor.glade", NULL, NULL);
+
   GtkWidget *text_view;
   struct syntax_editor *se ;
-
-  new_xml = glade_xml_new  (xml->filename, "syntax_editor", NULL);
+  struct editor_window *e;
 
   se = g_malloc (sizeof (*se));
 
-  se->window = get_widget_assert (new_xml, "syntax_editor");
-  text_view = get_widget_assert (new_xml, "syntax_text_view");
+  e = (struct editor_window *)se;
+
+  e->window = get_widget_assert (xml, "syntax_editor");
+  text_view = get_widget_assert (xml, "syntax_text_view");
   se->buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW(text_view));
-  if ( name )
-    se->name = g_strdup (name);
-  else
-    se->name = NULL;
 
-  g_signal_connect (get_widget_assert (new_xml,"file_new_syntax"),
+  g_signal_connect (get_widget_assert (xml,"file_new_syntax"),
                    "activate",
                    G_CALLBACK(new_syntax_window),
-                   se->window);
+                   e->window);
 
-  g_signal_connect (get_widget_assert (new_xml,"file_open_syntax"),
+  g_signal_connect (get_widget_assert (xml,"file_open_syntax"),
                    "activate",
                    G_CALLBACK(open_syntax_window),
-                   se->window);
+                   e->window);
 
-  g_signal_connect (get_widget_assert (new_xml,"file_quit"),
+  g_signal_connect (get_widget_assert (xml,"file_new_data"),
+                   "activate",
+                   G_CALLBACK(new_data_window),
+                   e->window);
+
+  g_signal_connect (get_widget_assert (xml,"file_open_data"),
+                   "activate",
+                   G_CALLBACK(open_data_window),
+                   e->window);
+
+
+  g_signal_connect (get_widget_assert (xml,"help_about"),
+                   "activate",
+                   G_CALLBACK(about_new),
+                   e->window);
+
+
+#if 0
+
+  g_signal_connect (get_widget_assert (xml,"file_quit"),
                    "activate",
                    G_CALLBACK(on_quit),
                    se);
 
-  g_signal_connect (get_widget_assert (new_xml,"file_save"),
+  g_signal_connect (get_widget_assert (xml,"file_save"),
                    "activate",
                    G_CALLBACK(on_syntax_save),
                    se);
 
-  g_signal_connect (get_widget_assert (new_xml,"file_save_as"),
+  g_signal_connect (get_widget_assert (xml,"file_save_as"),
                    "activate",
                    G_CALLBACK(on_syntax_save_as),
                    se);
 
+#endif
 
-  g_signal_connect (get_widget_assert (new_xml,"run_all"),
+  g_signal_connect (get_widget_assert (xml,"run_all"),
                    "activate",
                    G_CALLBACK(on_run_all),
                    se);
 
-  g_object_unref (new_xml);
 
-  g_signal_connect (se->window, "delete-event",
+
+  g_object_unref (xml);
+
+  g_signal_connect (e->window, "delete-event",
                    G_CALLBACK(on_delete), se);
 
   return se;
@@ -294,25 +310,7 @@ void
 new_syntax_window (GtkMenuItem     *menuitem,
                   gpointer         user_data)
 {
-  struct syntax_editor *se =   new_syntax_editor (NULL);
-  gtk_widget_show (se->window);
-}
-
-
-static void
-set_window_title_from_filename (struct syntax_editor *se,
-                               const gchar *filename)
-{
-  gchar *title;
-  gchar *basename ;
-  g_free (se->name);
-  se->name = strdup (filename);
-  basename = g_path_get_basename (filename);
-  title =
-    g_strdup_printf (_("%s --- PSPP Syntax Editor"), basename);
-  g_free (basename);
-  gtk_window_set_title (GTK_WINDOW(se->window), title);
-  g_free (title);
+  window_create (WINDOW_SYNTAX, NULL);
 }
 
 
@@ -347,7 +345,7 @@ save_editor_to_file (struct syntax_editor *se,
 
   if ( result )
     {
-      set_window_title_from_filename (se, filename);
+      window_set_name_from_filename ((struct editor_window *) se, filename);
       gtk_text_buffer_set_modified (buffer, FALSE);
     }
 
@@ -384,7 +382,7 @@ load_editor_from_file (struct syntax_editor *se,
 
   gtk_text_buffer_insert (buffer, &iter, text, -1);
 
-  set_window_title_from_filename (se, filename);
+  window_set_name_from_filename ((struct editor_window *)se, filename);
   gtk_text_buffer_set_modified (buffer, FALSE);
 
   return TRUE;
@@ -392,7 +390,7 @@ load_editor_from_file (struct syntax_editor *se,
 
 
 /* Callback for the File->Open->Syntax menuitem */
-static void
+void
 open_syntax_window (GtkMenuItem *menuitem, gpointer parent)
 {
   GtkFileFilter *filter;
@@ -424,44 +422,16 @@ open_syntax_window (GtkMenuItem *menuitem, gpointer parent)
       const char *file_name = gtk_file_chooser_get_filename
        (GTK_FILE_CHOOSER (dialog));
 
-      struct syntax_editor *se = new_syntax_editor (file_name);
+      struct syntax_editor *se = (struct syntax_editor *)
+       window_create (WINDOW_SYNTAX, file_name);
 
       load_editor_from_file (se, file_name, NULL);
-
-      gtk_widget_show (se->window);
     }
 
   gtk_widget_destroy (dialog);
 }
 
 
-#if 1
-/* FIXME: get rid of these functions */
-void
-on_syntax4_activate   (GtkMenuItem     *menuitem,
-                      gpointer         user_data)
-{
-  g_print ("%s\n", __FUNCTION__);
-}
-
-
-
-void
-on_syntax2_activate   (GtkMenuItem     *menuitem,
-                      gpointer         user_data)
-{
-  g_print ("%s\n", __FUNCTION__);
-}
-
-void
-on_syntax1_activate   (GtkMenuItem     *menuitem,
-                      gpointer         user_data)
-{
-  g_print ("%s\n", __FUNCTION__);
-  new_syntax_window (menuitem, user_data);
-}
-#endif
-
 
 
 
diff --git a/src/ui/gui/syntax-editor.glade b/src/ui/gui/syntax-editor.glade
new file mode 100644 (file)
index 0000000..62e409b
--- /dev/null
@@ -0,0 +1,311 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkWindow" id="syntax_editor">
+  <property name="width_request">640</property>
+  <property name="height_request">480</property>
+  <property name="can_focus">True</property>
+  <property name="title" translatable="yes">Psppire Syntax Editor</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+
+  <child>
+    <widget class="GtkVBox" id="vbox14">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+       <widget class="GtkMenuBar" id="menubar2">
+         <property name="visible">True</property>
+         <property name="pack_direction">GTK_PACK_DIRECTION_LTR</property>
+         <property name="child_pack_direction">GTK_PACK_DIRECTION_LTR</property>
+
+         <child>
+           <widget class="GtkMenuItem" id="menu_syntax_file">
+             <property name="visible">True</property>
+             <property name="label" translatable="yes">_File</property>
+             <property name="use_underline">True</property>
+
+             <child>
+               <widget class="GtkMenu" id="menu_syntax_file_menu">
+
+                 <child>
+                   <widget class="GtkImageMenuItem" id="new2">
+                     <property name="visible">True</property>
+                     <property name="label">gtk-new</property>
+                     <property name="use_stock">True</property>
+
+                     <child>
+                       <widget class="GtkMenu" id="new2_menu">
+
+                         <child>
+                           <widget class="GtkMenuItem" id="file_new_syntax">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">_Syntax</property>
+                             <property name="use_underline">True</property>
+                           </widget>
+                         </child>
+
+                         <child>
+                           <widget class="GtkMenuItem" id="file_new_data">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">_Data</property>
+                             <property name="use_underline">True</property>
+                           </widget>
+                         </child>
+                       </widget>
+                     </child>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkImageMenuItem" id="open2">
+                     <property name="visible">True</property>
+                     <property name="label">gtk-open</property>
+                     <property name="use_stock">True</property>
+
+                     <child>
+                       <widget class="GtkMenu" id="open2_menu">
+
+                         <child>
+                           <widget class="GtkMenuItem" id="file_open_syntax">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">_Syntax</property>
+                             <property name="use_underline">True</property>
+                             <signal name="activate" handler="on_syntax4_activate" last_modification_time="Tue, 05 Dec 2006 01:43:21 GMT"/>
+                           </widget>
+                         </child>
+
+                         <child>
+                           <widget class="GtkMenuItem" id="file_open_data">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">_Data</property>
+                             <property name="use_underline">True</property>
+                           </widget>
+                         </child>
+                       </widget>
+                     </child>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkImageMenuItem" id="file_save">
+                     <property name="visible">True</property>
+                     <property name="label">gtk-save</property>
+                     <property name="use_stock">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkImageMenuItem" id="file_save_as">
+                     <property name="visible">True</property>
+                     <property name="label">gtk-save-as</property>
+                     <property name="use_stock">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkSeparatorMenuItem" id="separatormenuitem2">
+                     <property name="visible">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkImageMenuItem" id="file_quit">
+                     <property name="visible">True</property>
+                     <property name="label">gtk-quit</property>
+                     <property name="use_stock">True</property>
+                   </widget>
+                 </child>
+               </widget>
+             </child>
+           </widget>
+         </child>
+
+         <child>
+           <widget class="GtkMenuItem" id="menuitem7">
+             <property name="visible">True</property>
+             <property name="sensitive">False</property>
+             <property name="label" translatable="yes">_Edit</property>
+             <property name="use_underline">True</property>
+
+             <child>
+               <widget class="GtkMenu" id="menuitem7_menu">
+
+                 <child>
+                   <widget class="GtkImageMenuItem" id="cut2">
+                     <property name="visible">True</property>
+                     <property name="label">gtk-cut</property>
+                     <property name="use_stock">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkImageMenuItem" id="copy2">
+                     <property name="visible">True</property>
+                     <property name="label">gtk-copy</property>
+                     <property name="use_stock">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkImageMenuItem" id="paste2">
+                     <property name="visible">True</property>
+                     <property name="label">gtk-paste</property>
+                     <property name="use_stock">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkImageMenuItem" id="delete1">
+                     <property name="visible">True</property>
+                     <property name="label">gtk-delete</property>
+                     <property name="use_stock">True</property>
+                   </widget>
+                 </child>
+               </widget>
+             </child>
+           </widget>
+         </child>
+
+         <child>
+           <widget class="GtkMenuItem" id="run1">
+             <property name="visible">True</property>
+             <property name="label" translatable="yes">_Run</property>
+             <property name="use_underline">True</property>
+
+             <child>
+               <widget class="GtkMenu" id="run1_menu">
+
+                 <child>
+                   <widget class="GtkMenuItem" id="run_all">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">All</property>
+                     <property name="use_underline">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkMenuItem" id="run_selection">
+                     <property name="visible">True</property>
+                     <property name="sensitive">False</property>
+                     <property name="label" translatable="yes">Selection</property>
+                     <property name="use_underline">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkMenuItem" id="run_current_line">
+                     <property name="visible">True</property>
+                     <property name="sensitive">False</property>
+                     <property name="label" translatable="yes">Current Line</property>
+                     <property name="use_underline">True</property>
+                   </widget>
+                 </child>
+
+                 <child>
+                   <widget class="GtkMenuItem" id="run_to_end">
+                     <property name="visible">True</property>
+                     <property name="sensitive">False</property>
+                     <property name="label" translatable="yes">To End</property>
+                     <property name="use_underline">True</property>
+                   </widget>
+                 </child>
+               </widget>
+             </child>
+           </widget>
+         </child>
+
+         <child>
+           <widget class="GtkMenuItem" id="menuitem9">
+             <property name="visible">True</property>
+             <property name="label" translatable="yes">_Help</property>
+             <property name="use_underline">True</property>
+
+             <child>
+               <widget class="GtkMenu" id="menuitem9_menu">
+
+                 <child>
+                   <widget class="GtkMenuItem" id="help_about">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">_About</property>
+                     <property name="use_underline">True</property>
+                   </widget>
+                 </child>
+               </widget>
+             </child>
+           </widget>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">False</property>
+         <property name="fill">False</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkScrolledWindow" id="scrolledwindow8">
+         <property name="visible">True</property>
+         <property name="can_focus">True</property>
+         <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
+         <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+         <property name="shadow_type">GTK_SHADOW_IN</property>
+         <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+         <child>
+           <widget class="GtkTextView" id="syntax_text_view">
+             <property name="visible">True</property>
+             <property name="can_focus">True</property>
+             <property name="editable">True</property>
+             <property name="overwrite">False</property>
+             <property name="accepts_tab">True</property>
+             <property name="justification">GTK_JUSTIFY_LEFT</property>
+             <property name="wrap_mode">GTK_WRAP_NONE</property>
+             <property name="cursor_visible">True</property>
+             <property name="pixels_above_lines">0</property>
+             <property name="pixels_below_lines">0</property>
+             <property name="pixels_inside_wrap">0</property>
+             <property name="left_margin">0</property>
+             <property name="right_margin">0</property>
+             <property name="indent">0</property>
+             <property name="text" translatable="yes"></property>
+           </widget>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">True</property>
+         <property name="fill">True</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkStatusbar" id="statusbar2">
+         <property name="visible">True</property>
+         <property name="has_resize_grip">True</property>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">False</property>
+         <property name="fill">False</property>
+       </packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
index 038e10624e439d74940a0ebffed5a4e1c1a52480..cfb49803dea1afbd2ecaadef7854f546eb760b95 100644 (file)
 
 #include <gtk/gtk.h>
 
-
+#include "window-manager.h"
 
 struct syntax_editor
 {
-  GtkWidget *window;      /* The top level window of the editor */
+  struct editor_window parent;
   GtkTextBuffer *buffer;  /* The buffer which contains the text */
-  gchar *name;            /* The name of this syntax buffer/editor */
 };
 
 
+struct syntax_editor * new_syntax_editor (void);
+
+void new_syntax_window (GtkMenuItem *, gpointer);
+
+void open_syntax_window (GtkMenuItem *, gpointer);
+
+
 #endif
index b65c6e89ddf8cd0482091d97444588ff56132928..09e23b477dccc3347339fda16b865d5768111b41 100644 (file)
@@ -43,7 +43,6 @@
 
 #include "psppire-var-store.h"
 #include "helper.h"
-#include "menu-actions.h"
 #include "psppire-dict.h"
 #include "var-type-dialog.h"
 #include "var-sheet.h"
@@ -57,7 +56,6 @@
 static const gint n_initial_rows = 40;
 
 
-extern GladeXML *xml;
 
 struct column_parameters
 {
@@ -79,32 +77,15 @@ static const struct column_parameters column_def[] = {
 };
 
 
-static gboolean
-click2row(GtkWidget *w, gint row, gpointer data)
-{
-  gint current_row, current_column;
-  GtkWidget *data_sheet  = get_widget_assert(xml, "data_sheet");
-
-  select_sheet(PAGE_DATA_SHEET);
-
-  gtk_sheet_get_active_cell(GTK_SHEET(data_sheet), 
-                           &current_row, &current_column);
-
-  gtk_sheet_set_active_cell(GTK_SHEET(data_sheet), current_row, row);
-
-  return FALSE;
-}
-
-
 
-const gchar *alignments[n_ALIGNMENTS + 1]={
+const gchar *const alignments[n_ALIGNMENTS + 1]={
   N_("Left"),
   N_("Right"),
   N_("Centre"),
   0
 };
 
-const gchar *measures[n_MEASURES + 1]={
+const gchar *const measures[n_MEASURES + 1]={
   N_("Nominal"),
   N_("Ordinal"),
   N_("Scale"),
@@ -204,30 +185,44 @@ traverse_cell_callback (GtkSheet * sheet,
 }
 
 
-/* Callback whenever the cell on the var sheet is entered or left.
-   It sets the entry box type appropriately.
+
+
+/*
+   Callback whenever the cell on the var sheet is left
 */
-static gboolean 
-var_sheet_cell_change_entry (GtkSheet * sheet, gint row, gint column, 
-                            gpointer leaving)
+static gboolean
+var_sheet_cell_entry_leave (GtkSheet * sheet, gint row, gint column,
+                           gpointer data)
+{
+  gtk_sheet_change_entry(sheet, GTK_TYPE_ENTRY);
+  return TRUE;
+}
+
+
+
+/*
+   Callback whenever the cell on the var sheet is entered.
+*/
+static gboolean
+var_sheet_cell_entry_enter (GtkSheet * sheet, gint row, gint column,
+                           gpointer data)
 {
   GtkSheetCellAttr attributes;
   PsppireVarStore *var_store ;
   struct variable *pv ;
 
+  GladeXML *xml;
+
   g_return_val_if_fail(sheet != NULL, FALSE);
 
-  var_store = PSPPIRE_VAR_STORE(gtk_sheet_get_model(sheet));
+  var_store = PSPPIRE_VAR_STORE (gtk_sheet_get_model(sheet));
+
+  g_assert (var_store);
 
   if ( row >= psppire_var_store_get_var_cnt(var_store))
     return TRUE;
 
-  if ( leaving ) 
-    {
-      gtk_sheet_change_entry(sheet, GTK_TYPE_ENTRY);
-      return TRUE;
-    }
-
+  xml = glade_xml_new (PKGDATADIR "/data-editor.glade", NULL, NULL);
 
   gtk_sheet_get_attributes(sheet, row, column, &attributes);
 
@@ -357,46 +352,44 @@ var_sheet_cell_change_entry (GtkSheet * sheet, gint row, gint column,
 
            const gchar *s = gtk_sheet_cell_get_text(sheet, row, column);
 
-           if (!s) 
-             return FALSE;
-
-           {
-             GtkSpinButton *spinButton ;
-             const gint current_value  = atoi(s);
-             GtkObject *adj ;
-
-             const struct fmt_spec *fmt = var_get_write_format (pv);
-             switch (column) 
-               {
-               case COL_WIDTH:
-                 r_min = MAX (fmt->d + 1, fmt_min_output_width (fmt->type));
-                 r_max = fmt_max_output_width (fmt->type);
-                 break;
-               case COL_DECIMALS:
-                 r_min = 0 ; 
-                 r_max = fmt_max_output_decimals (fmt->type, fmt->w);
-                 break;
-               case COL_COLUMNS:
-                 r_min = 1;
-                 r_max = 255 ; /* Is this a sensible value ? */
-                 break;
-               default:
-                 g_assert_not_reached();
-               }
-
-             adj = gtk_adjustment_new(current_value,
-                                      r_min, r_max,
-                                      1.0, 1.0, 1.0 /* steps */
-                                      );
-
-             gtk_sheet_change_entry(sheet, GTK_TYPE_SPIN_BUTTON);
-
-             spinButton = 
-               GTK_SPIN_BUTTON(gtk_sheet_get_entry(sheet));
-
-             gtk_spin_button_set_adjustment(spinButton, GTK_ADJUSTMENT(adj));
-             gtk_spin_button_set_digits(spinButton, 0);
-           }
+           if (s) 
+             {
+               GtkSpinButton *spinButton ;
+               const gint current_value  = atoi(s);
+               GtkObject *adj ;
+
+               const struct fmt_spec *fmt = var_get_write_format (pv);
+               switch (column) 
+                 {
+                 case COL_WIDTH:
+                   r_min = MAX (fmt->d + 1, fmt_min_output_width (fmt->type));
+                   r_max = fmt_max_output_width (fmt->type);
+                   break;
+                 case COL_DECIMALS:
+                   r_min = 0 ; 
+                   r_max = fmt_max_output_decimals (fmt->type, fmt->w);
+                   break;
+                 case COL_COLUMNS:
+                   r_min = 1;
+                   r_max = 255 ; /* Is this a sensible value ? */
+                   break;
+                 default:
+                   g_assert_not_reached();
+                 }
+
+               adj = gtk_adjustment_new(current_value,
+                                        r_min, r_max,
+                                        1.0, 1.0, 1.0 /* steps */
+                                        );
+
+               gtk_sheet_change_entry(sheet, GTK_TYPE_SPIN_BUTTON);
+
+               spinButton = 
+                 GTK_SPIN_BUTTON(gtk_sheet_get_entry(sheet));
+
+               gtk_spin_button_set_adjustment(spinButton, GTK_ADJUSTMENT(adj));
+               gtk_spin_button_set_digits(spinButton, 0);
+             }
          }
       }
       break; 
@@ -406,11 +399,14 @@ var_sheet_cell_change_entry (GtkSheet * sheet, gint row, gint column,
       break;
     }
 
+
+  g_object_unref (xml);
+
   return TRUE;
 }
 
 
-extern PsppireVarStore *var_store;
+extern PsppireVarStore *the_var_store;
 
 
 /* Create the var sheet */
@@ -426,25 +422,27 @@ psppire_variable_sheet_create (gchar *widget_name,
 
   GObject *geo = g_sheet_hetero_column_new(75, n_COLS);
 
-  sheet = gtk_sheet_new(G_SHEET_ROW(var_store),
+  g_assert (the_var_store);
+
+  sheet = gtk_sheet_new(G_SHEET_ROW(the_var_store),
                        G_SHEET_COLUMN(geo), 
                        "variable sheet", 0); 
 
+
   g_signal_connect (GTK_OBJECT (sheet), "activate",
-                   GTK_SIGNAL_FUNC (var_sheet_cell_change_entry),
+                   GTK_SIGNAL_FUNC (var_sheet_cell_entry_enter),
                    0);
 
   g_signal_connect (GTK_OBJECT (sheet), "deactivate",
-                   GTK_SIGNAL_FUNC (var_sheet_cell_change_entry),
-                   (void *) 1);
+                   GTK_SIGNAL_FUNC (var_sheet_cell_entry_leave),
+                   0);
 
   g_signal_connect (GTK_OBJECT (sheet), "traverse",
                    GTK_SIGNAL_FUNC (traverse_cell_callback), 0);
 
 
-  g_signal_connect (GTK_OBJECT (sheet), "double-click-row",
-                   GTK_SIGNAL_FUNC (click2row),
-                   sheet);
+  gtk_sheet_set_model(sheet, G_SHEET_MODEL(the_var_store));
+
 
   /* Since this happens inside glade_xml_new, we must prevent strings from 
    * being re-encoded twice */
index 6a3d0a22ed6f9e3286674f866bfc3c331c8f7c0d..4cfe6847cdaefa9ed3ec2aedd088d50bbdaa3b3d 100644 (file)
@@ -51,11 +51,11 @@ GtkWidget* psppire_variable_sheet_create (gchar *widget_name,
 
 #define n_ALIGNMENTS 3
 
-extern const gchar *alignments[n_ALIGNMENTS + 1];
+extern const gchar *const alignments[n_ALIGNMENTS + 1];
 
 #define n_MEASURES 3
 
-extern const gchar *measures[n_MEASURES + 1];
+extern const gchar *const measures[n_MEASURES + 1];
 
 
 #endif
index 5643956843ac1123a3fdb85ac6b5cba55f1eab8d..7433b93e4b0237d3a07cc9dd5bb3e1fb32a2f2cf 100644 (file)
@@ -325,7 +325,7 @@ set_format_type_from_treeview(GtkTreeView *treeview, gpointer data)
 
 /* Create the structure from the XML definitions */
 struct var_type_dialog *
-var_type_dialog_create(GladeXML *xml)
+var_type_dialog_create (GladeXML *xml)
 {
   gint i;
   struct var_type_dialog *dialog = g_malloc(sizeof(struct var_type_dialog));
diff --git a/src/ui/gui/window-manager.c b/src/ui/gui/window-manager.c
new file mode 100644 (file)
index 0000000..5fcf39d
--- /dev/null
@@ -0,0 +1,133 @@
+#include "syntax-editor.h"
+#include "data-editor.h"
+
+#include <gettext.h>
+#define _(msgid) gettext (msgid)
+#define N_(msgid) msgid
+
+
+#include "window-manager.h"
+
+
+static int window_count = 0;
+
+static void
+deregister (GtkObject *o, gpointer data)
+{
+  window_count --;
+
+  if ( 0 == window_count )
+    gtk_main_quit ();
+};
+
+static void set_window_name (struct editor_window *e, const gchar *name );
+
+
+struct editor_window *
+window_create (enum window_type type, const gchar *name)
+{
+  struct editor_window *e;
+  switch (type)
+    {
+    case WINDOW_SYNTAX:
+      e = (struct editor_window *) new_syntax_editor ();
+      break;
+    case WINDOW_DATA:
+      e = (struct editor_window *) new_data_editor ();
+      break;
+    default:
+      g_assert_not_reached ();
+    };
+
+  e->type = type;
+  e->name = NULL;
+
+  set_window_name (e, name);
+
+
+  gtk_window_set_icon_from_file (GTK_WINDOW(e->window),
+                                PKGDATADIR "/psppicon.png", 0);
+
+  g_signal_connect (e->window, "destroy", G_CALLBACK (deregister), NULL);
+
+  gtk_widget_show (e->window);
+
+  window_count ++;
+
+  return e;
+}
+
+
+static void
+set_window_name (struct editor_window *e,
+                const gchar *name )
+{
+  gchar *title ;
+  g_free (e->name);
+
+
+  if ( name )
+    {
+      e->name = g_strdup (name);
+      return ;
+    }
+
+  switch (e->type )
+    {
+    case WINDOW_SYNTAX:
+      e->name = g_strdup_printf (_("Syntax%d"), window_count);
+      title = g_strdup_printf (_("%s --- PSPP Syntax Editor"), e->name);
+      break;
+    case WINDOW_DATA:
+      e->name = g_strdup_printf (_("Untitled%d"), window_count);
+      title = g_strdup_printf (_("%s --- PSPP Data Editor"), e->name);
+      break;
+    default:
+      g_assert_not_reached ();
+    }
+
+  gtk_window_set_title (GTK_WINDOW(e->window), title);
+
+  g_free (title);
+}
+
+
+void
+window_set_name_from_filename (struct editor_window *e,
+                              const gchar *filename)
+{
+  gchar *title;
+  gchar *basename = g_path_get_basename (filename);
+
+  set_window_name (e, filename);
+
+  switch (e->type )
+    {
+    case WINDOW_SYNTAX:
+      title = g_strdup_printf (_("%s --- PSPP Syntax Editor"), basename);
+      break;
+    case WINDOW_DATA:
+      title = g_strdup_printf (_("%s --- PSPP Data Editor"), basename);
+      break;
+    default:
+      g_assert_not_reached ();
+    }
+  g_free (basename);
+
+  gtk_window_set_title (GTK_WINDOW(e->window), title);
+
+  g_free (title);
+}
+
+
+GtkWindow *
+window_toplevel (const struct editor_window *e)
+{
+  return GTK_WINDOW(e->window);
+}
+
+const gchar *
+window_name (const struct editor_window *e)
+{
+  return e->name;
+}
diff --git a/src/ui/gui/window-manager.h b/src/ui/gui/window-manager.h
new file mode 100644 (file)
index 0000000..ee137db
--- /dev/null
@@ -0,0 +1,31 @@
+#ifndef WINDOW_MANAGER_H
+#define WINDOW_MANAGER_H
+
+#include <gtk/gtk.h>
+
+enum window_type
+  {
+    WINDOW_DATA,
+    WINDOW_SYNTAX
+  };
+
+
+struct editor_window
+ {
+  GtkWidget *window;      /* The top level window of the editor */
+  gchar *name;            /* The name of this editor */
+  enum window_type type;
+ } ;
+
+struct editor_window * window_create (enum window_type type,
+                                     const gchar *name);
+
+
+GtkWindow * window_toplevel (const struct editor_window *);
+
+const gchar * window_name (const struct editor_window *);
+
+void window_set_name_from_filename (struct editor_window *e,
+                                   const gchar *filename);
+
+#endif