Implemented the Examine dialog
authorJohn Darrington <john@darrington.wattle.id.au>
Mon, 18 Feb 2008 08:35:27 +0000 (08:35 +0000)
committerJohn Darrington <john@darrington.wattle.id.au>
Mon, 18 Feb 2008 08:35:27 +0000 (08:35 +0000)
src/ui/gui/automake.mk
src/ui/gui/data-editor.c
src/ui/gui/data-editor.glade
src/ui/gui/data-editor.h
src/ui/gui/examine-dialog.c [new file with mode: 0644]
src/ui/gui/examine-dialog.h [new file with mode: 0644]
src/ui/gui/examine.glade [new file with mode: 0644]

index 12be6283dfc180e9f05047dd9a97ba6d5b54b7fc..d5b5ec959cb49a35d9819aaad248af48d3fec755 100644 (file)
@@ -51,6 +51,7 @@ src_ui_gui_psppiredir = $(pkgdatadir)
 dist_src_ui_gui_psppire_DATA = \
        $(top_srcdir)/src/ui/gui/data-editor.glade \
        $(top_srcdir)/src/ui/gui/descriptives-dialog.glade \
+       $(top_srcdir)/src/ui/gui/examine.glade \
        $(top_srcdir)/src/ui/gui/crosstabs.glade \
        $(top_srcdir)/src/ui/gui/frequencies.glade \
        $(top_srcdir)/src/ui/gui/message-dialog.glade \
@@ -104,6 +105,8 @@ src_ui_gui_psppire_SOURCES = \
        src/ui/gui/data-editor.h \
        src/ui/gui/descriptives-dialog.c \
        src/ui/gui/descriptives-dialog.h \
+       src/ui/gui/examine-dialog.c \
+       src/ui/gui/examine-dialog.h \
        src/ui/gui/find-dialog.c \
        src/ui/gui/find-dialog.h \
        src/ui/gui/dialog-common.c \
index 318d059f4479584b97d4d81681b9044f3d8bdc39..038b9685f7242be8fc26bf052e33f618c6b2bfb4 100644 (file)
@@ -44,6 +44,7 @@
 #include "descriptives-dialog.h"
 #include "crosstabs-dialog.h"
 #include "frequencies-dialog.h"
+#include "examine-dialog.h"
 #include "dict-display.h"
 #include "clipboard.h"
 
@@ -721,6 +722,17 @@ new_data_editor (void)
                    G_CALLBACK (crosstabs_dialog), de);
 
 
+  de->invoke_examine_dialog =
+    gtk_action_new ("examine-dialog",
+                   _("_Explore"),
+                   _("Examine Data by Factors"),
+                   "pspp-examine");
+
+  g_signal_connect (de->invoke_examine_dialog, "activate",
+                   G_CALLBACK (examine_dialog), de);
+
+
+
   e->window = GTK_WINDOW (get_widget_assert (de->xml, "data_editor"));
 
   g_signal_connect_swapped (get_widget_assert (de->xml,"file_new_data"),
@@ -886,6 +898,12 @@ new_data_editor (void)
                            get_widget_assert (de->xml, "analyze_frequencies")
                            );
 
+
+  gtk_action_connect_proxy (de->invoke_examine_dialog,
+                           get_widget_assert (de->xml, "analyze_explore")
+                           );
+
+
   g_signal_connect (get_widget_assert (de->xml,"help_about"),
                    "activate",
                    G_CALLBACK (about_new),
index 1746d9e77d32055357450e97dc156d028ae6a571..e3cff71c5a016db334b169d23a97c708b3682efd 100644 (file)
                               </widget>
                             </child>
                             <child>
-                              <widget class="GtkMenuItem" id="explore">
+                              <widget class="GtkMenuItem" id="analyze_explore">
                                 <property name="visible">True</property>
                                 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                                 <property name="label" translatable="yes">_Explore</property>
index ca69dd5a4df717d1eec983ef510daa9c4546ca5a..8d79082ca4bf4e09ef1ab3a2dd49b3e3265cd286 100644 (file)
@@ -50,6 +50,7 @@ struct data_editor
   GtkAction *invoke_crosstabs_dialog;
   GtkAction *invoke_descriptives_dialog;
   GtkAction *invoke_frequencies_dialog;
+  GtkAction *invoke_examine_dialog;
 
   GtkAction *invoke_t_test_independent_samples_dialog;
   GtkAction *invoke_t_test_paired_samples_dialog;
diff --git a/src/ui/gui/examine-dialog.c b/src/ui/gui/examine-dialog.c
new file mode 100644 (file)
index 0000000..14679d7
--- /dev/null
@@ -0,0 +1,365 @@
+/* PSPPIRE - a graphical user interface for PSPP.
+   Copyright (C) 2007, 2008  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 3 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, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "examine-dialog.h"
+
+#include <gtk/gtk.h>
+#include <gtksheet/gtksheet.h>
+#include <stdlib.h>
+
+#include <language/syntax-string-source.h>
+#include <ui/gui/data-editor.h>
+#include <ui/gui/dialog-common.h>
+#include <ui/gui/dict-display.h>
+#include <ui/gui/helper.h>
+#include <ui/gui/psppire-dialog.h>
+#include <ui/gui/psppire-var-store.h>
+#include <ui/gui/syntax-editor.h>
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+#define N_(msgid) msgid
+
+enum opts
+  {
+    OPT_LISTWISE,
+    OPT_PAIRWISE,
+    OPT_REPORT
+  };
+
+
+#define     STAT_DESCRIPTIVES  0x01
+#define     STAT_EXTREMES      0x02
+#define     STAT_PERCENTILES   0x04
+
+
+struct examine_dialog
+{
+  PsppireDict *dict;
+
+  GtkWidget *dep_list ;
+  GtkWidget *fct_list ;
+  GtkWidget *id_entry ;
+
+  GtkWidget *stats_dialog;
+  GtkWidget *opts_dialog;
+
+  /* Options */
+  enum opts opts;
+  guint stats;
+  GtkWidget *listwise;
+  GtkWidget *pairwise;
+  GtkWidget *report;
+
+  GtkToggleButton *descriptives_button;
+  GtkToggleButton *extremes_button;
+  GtkToggleButton *percentiles_button;
+};
+
+static void
+refresh (PsppireDialog *dialog, struct examine_dialog *ex_d)
+{
+  GtkTreeModel *liststore =
+    gtk_tree_view_get_model (GTK_TREE_VIEW (ex_d->dep_list));
+
+  gtk_list_store_clear (GTK_LIST_STORE (liststore));
+
+  liststore = gtk_tree_view_get_model (GTK_TREE_VIEW (ex_d->fct_list));
+  gtk_list_store_clear (GTK_LIST_STORE (liststore));
+
+
+  gtk_entry_set_text (GTK_ENTRY (ex_d->id_entry), "");
+
+  ex_d->opts = OPT_LISTWISE;
+  ex_d->stats = 0x00;
+}
+
+static char *
+generate_syntax (const struct examine_dialog *ed)
+{
+  const char *label;
+  gchar *text = NULL;
+  GString *str = g_string_new ("EXAMINE ");
+
+  g_string_append (str, "\n\t/VARIABLES=");
+  append_variable_names (str, ed->dict, GTK_TREE_VIEW (ed->dep_list), 0);
+
+  if ( 0  < gtk_tree_model_iter_n_children
+       (gtk_tree_view_get_model (GTK_TREE_VIEW (ed->fct_list)), NULL))
+    {
+      g_string_append (str, "\n\tBY ");
+      append_variable_names (str, ed->dict, GTK_TREE_VIEW (ed->fct_list), 0);
+    }
+
+  label = gtk_entry_get_text (GTK_ENTRY (ed->id_entry));
+  if ( 0 != strcmp (label, "") )
+    {
+      g_string_append (str, "\n\t/ID = ");
+      g_string_append (str, label);
+    }
+
+  if ( ed->stats & (STAT_DESCRIPTIVES | STAT_EXTREMES))
+    {
+      g_string_append (str, "\n\t/STATISTICS =");
+
+      if ( ed->stats & STAT_DESCRIPTIVES)
+       g_string_append (str, " DESCRIPTIVES");
+
+      if ( ed->stats & STAT_EXTREMES)
+       g_string_append (str, " EXTREME");
+    }
+
+  if ( ed->stats & STAT_PERCENTILES)
+    g_string_append (str, "\n\t/PERCENTILES");
+
+  g_string_append (str, "\n\t/MISSING=");
+  switch (ed->opts)
+    {
+    case OPT_REPORT:
+      g_string_append (str, "REPORT");
+      break;
+    case OPT_PAIRWISE:
+      g_string_append (str, "PAIRWISE");
+      break;
+    default:
+      g_string_append (str, "LISTWISE");
+      break;
+    };
+
+  g_string_append (str, ".");
+
+  text = str->str;
+
+  g_string_free (str, FALSE);
+
+  return text;
+}
+
+/* Dialog is valid iff at least one variable has been selected */
+static gboolean
+dialog_state_valid (gpointer data)
+{
+  struct examine_dialog *ex_d = data;
+
+  GtkTreeModel *vars =
+    gtk_tree_view_get_model (GTK_TREE_VIEW (ex_d->dep_list));
+
+  GtkTreeIter notused;
+
+  return gtk_tree_model_get_iter_first (vars, &notused);
+}
+
+
+static void
+run_stats_dialog (struct examine_dialog *ed)
+{
+  gint response;
+
+  gtk_toggle_button_set_active (ed->descriptives_button,
+                               ed->stats & STAT_DESCRIPTIVES);
+
+  gtk_toggle_button_set_active (ed->extremes_button,
+                               ed->stats & STAT_EXTREMES);
+
+  gtk_toggle_button_set_active (ed->percentiles_button,
+                               ed->stats & STAT_PERCENTILES);
+
+  response = psppire_dialog_run (PSPPIRE_DIALOG (ed->stats_dialog));
+
+  if ( response == PSPPIRE_RESPONSE_CONTINUE )
+    {
+      ed->stats = 0;
+      if ( gtk_toggle_button_get_active (ed->descriptives_button) )
+       ed->stats |= STAT_DESCRIPTIVES;
+
+      if ( gtk_toggle_button_get_active (ed->extremes_button) )
+       ed->stats |= STAT_EXTREMES;
+
+      if ( gtk_toggle_button_get_active (ed->percentiles_button) )
+       ed->stats |= STAT_PERCENTILES;
+    }
+}
+
+static void
+run_opts_dialog (struct examine_dialog *ed)
+{
+  gint response;
+
+
+  switch (ed->opts)
+    {
+    case OPT_LISTWISE:
+      gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (ed->listwise), TRUE);
+      break;
+    case OPT_PAIRWISE:
+      gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (ed->pairwise), TRUE);
+      break;
+    case OPT_REPORT:
+      gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (ed->report), TRUE);
+      break;
+    default:
+      g_assert_not_reached ();
+      break;
+    };
+
+  response = psppire_dialog_run (PSPPIRE_DIALOG (ed->opts_dialog));
+
+  if ( response == PSPPIRE_RESPONSE_CONTINUE )
+    {
+      if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (ed->listwise)))
+       ed->opts = OPT_LISTWISE;
+      if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (ed->pairwise)))
+       ed->opts = OPT_PAIRWISE;
+      if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (ed->report)))
+       ed->opts = OPT_REPORT;
+  }
+}
+
+
+
+/* Pops up the Examine dialog box */
+void
+examine_dialog (GObject *o, gpointer data)
+{
+  gint response;
+  struct data_editor *de = data;
+
+  struct examine_dialog ex_d;
+
+
+  GladeXML *xml = XML_NEW ("examine.glade");
+
+
+  GtkWidget *dialog = get_widget_assert   (xml, "examine-dialog");
+  GtkWidget *source = get_widget_assert   (xml, "treeview1");
+
+  GtkWidget *stats_button = get_widget_assert   (xml, "stats-button");
+  GtkWidget *opts_button = get_widget_assert   (xml, "opts-button");
+
+
+  GtkWidget *dep_selector = get_widget_assert (xml, "psppire-selector1");
+  GtkWidget *fct_selector = get_widget_assert (xml, "psppire-selector2");
+  GtkWidget *id_selector = get_widget_assert (xml, "psppire-selector3");
+
+  GtkSheet *var_sheet =
+    GTK_SHEET (get_widget_assert (de->xml, "variable_sheet"));
+
+  PsppireVarStore *vs = PSPPIRE_VAR_STORE (gtk_sheet_get_model (var_sheet));
+
+  ex_d.dep_list =   get_widget_assert   (xml, "treeview2");
+  ex_d.fct_list =   get_widget_assert   (xml, "treeview3");
+  ex_d.id_entry =   get_widget_assert   (xml, "entry1");
+  ex_d.stats_dialog =   get_widget_assert   (xml, "statistics-dialog");
+  ex_d.opts_dialog =   get_widget_assert   (xml, "options-dialog");
+  ex_d.listwise = get_widget_assert (xml, "radiobutton1");
+  ex_d.pairwise = get_widget_assert (xml, "radiobutton2");
+  ex_d.report   = get_widget_assert (xml, "radiobutton3");
+
+  ex_d.descriptives_button = GTK_TOGGLE_BUTTON
+    (get_widget_assert (xml, "descriptives-button"));
+
+  ex_d.extremes_button    = GTK_TOGGLE_BUTTON
+    (get_widget_assert (xml, "extremes-button"));
+
+  ex_d.percentiles_button = GTK_TOGGLE_BUTTON
+    (get_widget_assert (xml, "percentiles-button"));
+
+  gtk_window_set_transient_for (GTK_WINDOW (dialog), de->parent.window);
+  gtk_window_set_transient_for (GTK_WINDOW (ex_d.stats_dialog), de->parent.window);
+  gtk_window_set_transient_for (GTK_WINDOW (ex_d.opts_dialog), de->parent.window);
+
+  attach_dictionary_to_treeview (GTK_TREE_VIEW (source),
+                                vs->dict,
+                                GTK_SELECTION_MULTIPLE, NULL);
+
+
+  set_dest_model (GTK_TREE_VIEW (ex_d.dep_list), vs->dict);
+  ex_d.dict = vs->dict;
+
+
+  psppire_selector_set_subjects (PSPPIRE_SELECTOR (dep_selector),
+                                source,
+                                ex_d.dep_list,
+                                insert_source_row_into_tree_view,
+                                NULL, NULL);
+
+  psppire_selector_set_allow (PSPPIRE_SELECTOR (dep_selector),
+                             numeric_only);
+
+  set_dest_model (GTK_TREE_VIEW (ex_d.fct_list), vs->dict);
+
+
+  psppire_selector_set_subjects (PSPPIRE_SELECTOR (fct_selector),
+                                source,
+                                ex_d.fct_list,
+                                insert_source_row_into_tree_view,
+                                NULL, NULL);
+
+
+  psppire_selector_set_subjects (PSPPIRE_SELECTOR (id_selector),
+                                source,
+                                ex_d.id_entry,
+                                insert_source_row_into_entry,
+                                NULL, NULL);
+
+  g_signal_connect (dialog, "refresh", G_CALLBACK (refresh),  &ex_d);
+
+  psppire_dialog_set_valid_predicate (PSPPIRE_DIALOG (dialog),
+                                     dialog_state_valid, &ex_d);
+
+
+  g_signal_connect_swapped (stats_button, "clicked",
+                   G_CALLBACK (run_stats_dialog), &ex_d);
+
+  g_signal_connect_swapped (opts_button, "clicked",
+                   G_CALLBACK (run_opts_dialog), &ex_d);
+
+  response = psppire_dialog_run (PSPPIRE_DIALOG (dialog));
+
+
+  switch (response)
+    {
+    case GTK_RESPONSE_OK:
+      {
+       gchar *syntax = generate_syntax (&ex_d);
+
+       struct getl_interface *sss = create_syntax_string_source (syntax);
+
+       execute_syntax (sss);
+
+       g_free (syntax);
+      }
+      break;
+    case PSPPIRE_RESPONSE_PASTE:
+      {
+       gchar *syntax = generate_syntax (&ex_d);
+
+       struct syntax_editor *se =
+         (struct syntax_editor *) window_create (WINDOW_SYNTAX, NULL);
+
+       gtk_text_buffer_insert_at_cursor (se->buffer, syntax, -1);
+
+       g_free (syntax);
+      }
+      break;
+    default:
+      break;
+    }
+
+  g_object_unref (xml);
+}
diff --git a/src/ui/gui/examine-dialog.h b/src/ui/gui/examine-dialog.h
new file mode 100644 (file)
index 0000000..b8e7027
--- /dev/null
@@ -0,0 +1,27 @@
+/* PSPPIRE - a graphical user interface for PSPP.
+   Copyright (C) 2007  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 3 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef __EXAMINE_DIALOG_H
+#define __EXAMINE_DIALOG_H
+
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+
+
+void examine_dialog (GObject *o, gpointer data);
+
+#endif
diff --git a/src/ui/gui/examine.glade b/src/ui/gui/examine.glade
new file mode 100644 (file)
index 0000000..0078539
--- /dev/null
@@ -0,0 +1,449 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--Generated with glade3 3.2.0 on Tue Feb 12 20:44:51 2008 by john@marilyn-->
+<glade-interface>
+  <requires lib="psppire"/>
+  <widget class="PsppireDialog" id="examine-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title">Explore</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <widget class="GtkHBox" id="dialog-hbox1">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <widget class="GtkVBox" id="vbox1">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="spacing">5</property>
+            <child>
+              <widget class="GtkTable" id="table1">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="n_rows">3</property>
+                <property name="n_columns">3</property>
+                <child>
+                  <widget class="GtkScrolledWindow" id="scrolledwindow1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</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>
+                    <child>
+                      <widget class="GtkTreeView" id="treeview1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="headers_visible">False</property>
+                        <property name="headers_clickable">True</property>
+                      </widget>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="bottom_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="PsppireSelector" id="psppire-selector1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="border_width">5</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="x_options"></property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="PsppireSelector" id="psppire-selector2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="border_width">5</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="x_options"></property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="PsppireSelector" id="psppire-selector3">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="border_width">5</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                    <property name="x_options"></property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkFrame" id="frame1">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="shadow_type">GTK_SHADOW_NONE</property>
+                    <child>
+                      <widget class="GtkAlignment" id="alignment1">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <widget class="GtkScrolledWindow" id="scrolledwindow2">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</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>
+                            <child>
+                              <widget class="GtkTreeView" id="treeview2">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="headers_visible">False</property>
+                                <property name="headers_clickable">True</property>
+                              </widget>
+                            </child>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label1">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">Dependent List:</property>
+                        <property name="use_markup">True</property>
+                      </widget>
+                      <packing>
+                        <property name="type">label_item</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkFrame" id="frame2">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="shadow_type">GTK_SHADOW_NONE</property>
+                    <child>
+                      <widget class="GtkAlignment" id="alignment2">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <widget class="GtkScrolledWindow" id="scrolledwindow3">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</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>
+                            <child>
+                              <widget class="GtkTreeView" id="treeview3">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="headers_visible">False</property>
+                                <property name="headers_clickable">True</property>
+                              </widget>
+                            </child>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label2">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">Factor List:</property>
+                        <property name="use_markup">True</property>
+                      </widget>
+                      <packing>
+                        <property name="type">label_item</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkFrame" id="frame3">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="shadow_type">GTK_SHADOW_NONE</property>
+                    <child>
+                      <widget class="GtkAlignment" id="alignment3">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <widget class="GtkEntry" id="entry1">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label3">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">Label Cases by:</property>
+                        <property name="use_markup">True</property>
+                      </widget>
+                      <packing>
+                        <property name="type">label_item</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                  </packing>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkHButtonBox" id="hbuttonbox1">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="layout_style">GTK_BUTTONBOX_SPREAD</property>
+                <child>
+                  <widget class="GtkButton" id="stats-button">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">Statistics...</property>
+                  </widget>
+                </child>
+                <child>
+                  <widget class="GtkButton" id="opts-button">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">Options...</property>
+                  </widget>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="padding">5</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+        </child>
+        <child>
+          <widget class="PsppireVButtonBox" id="psppire-vbuttonbox1">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">GTK_PACK_END</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+  <widget class="PsppireDialog" id="statistics-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title">Explore: Statistics</property>
+    <property name="modal">True</property>
+    <property name="orientation">PSPPIRE_VERTICAL</property>
+    <child internal-child="hbox">
+      <widget class="GtkVBox" id="dialog-hbox2">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <widget class="GtkVBox" id="vbox2">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="homogeneous">True</property>
+            <child>
+              <widget class="GtkCheckButton" id="descriptives-button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label" translatable="yes">Descriptives</property>
+                <property name="draw_indicator">True</property>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkCheckButton" id="extremes-button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label" translatable="yes">Extremes</property>
+                <property name="draw_indicator">True</property>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkCheckButton" id="percentiles-button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label" translatable="yes">Percentiles</property>
+                <property name="draw_indicator">True</property>
+              </widget>
+              <packing>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </widget>
+        </child>
+        <child>
+          <widget class="PsppireHButtonBox" id="psppire-hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+            <property name="layout_style">GTK_BUTTONBOX_SPREAD</property>
+            <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">GTK_PACK_END</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+  <widget class="PsppireDialog" id="options-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title">Explore: Options</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <widget class="GtkHBox" id="dialog-hbox3">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <widget class="GtkFrame" id="frame5">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <child>
+              <widget class="GtkAlignment" id="alignment5">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="left_padding">12</property>
+                <child>
+                  <widget class="GtkVBox" id="vbox4">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <child>
+                      <widget class="GtkRadioButton" id="radiobutton1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">Exclude cases listwise</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkRadioButton" id="radiobutton2">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">Exclude cases pairwise</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                        <property name="group">radiobutton1</property>
+                      </widget>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkRadioButton" id="radiobutton3">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">Repeat values</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                        <property name="group">radiobutton1</property>
+                      </widget>
+                      <packing>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="label5">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label" translatable="yes">Missing Values</property>
+                <property name="use_markup">True</property>
+              </widget>
+              <packing>
+                <property name="type">label_item</property>
+              </packing>
+            </child>
+          </widget>
+        </child>
+        <child>
+          <widget class="PsppireVButtonBox" id="psppire-vbuttonbox2">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+            <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">GTK_PACK_END</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+</glade-interface>