Merge commit 'origin/stable'
[pspp-builds.git] / src / ui / gui / crosstabs-dialog.c
index 70538102b0febcfe2363cfa4ef1e625fd15ba6ef..2c50b461844d38de4587e1bcc9fcad01212b4d04 100644 (file)
 #include "crosstabs-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 "helper.h"
 #include <ui/gui/psppire-dialog.h>
 #include <ui/gui/psppire-var-store.h>
 #include <ui/gui/syntax-editor.h>
@@ -390,9 +389,8 @@ crosstabs_dialog (GObject *o, gpointer data)
 
   struct crosstabs_dialog cd;
 
-  GladeXML *xml = XML_NEW ("crosstabs.glade");
-  GtkSheet *var_sheet;
-  PsppireVarStore *vs;
+  GtkBuilder *xml = builder_new ("crosstabs.ui");
+  PsppireVarStore *vs = NULL;
 
   GtkWidget *dialog = get_widget_assert   (xml, "crosstabs-dialog");
   GtkWidget *source = get_widget_assert   (xml, "dict-treeview");
@@ -408,9 +406,7 @@ crosstabs_dialog (GObject *o, gpointer data)
   cd.stat_view = get_widget_assert (xml, "stats-view");
   cd.cell_view = get_widget_assert (xml, "cell-view");
 
-  var_sheet = GTK_SHEET (get_widget_assert (de->xml, "variable_sheet"));
-
-  vs = PSPPIRE_VAR_STORE (gtk_sheet_get_model (var_sheet));
+  g_object_get (de->data_editor, "var-store", &vs, NULL);
 
   put_checkbox_items_in_treeview (GTK_TREE_VIEW(cd.stat_view),
                                  B_CS_STATS_DEFAULT,