From: Ben Pfaff Date: Tue, 27 Mar 2012 06:21:28 +0000 (-0700) Subject: psppire-var-store: Remove. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4ae90b2fe74d2d1427afad35d32c9e5584211ed;p=pspp psppire-var-store: Remove. PsppireVarStore used to provide a model to allow GtkSheet to display a dictionary. Now, it is just a superfluous wrapper for PsppireDict, so this commit removes it in favor of using PsppireDict directly. --- diff --git a/src/ui/gui/aggregate-dialog.c b/src/ui/gui/aggregate-dialog.c index 7a48fce850..7348cd5ed2 100644 --- a/src/ui/gui/aggregate-dialog.c +++ b/src/ui/gui/aggregate-dialog.c @@ -469,8 +469,6 @@ aggregate_dialog (PsppireDataWindow *dw) struct aggregate fd; gint response; - PsppireVarStore *vs; - GtkWidget *dialog ; GtkWidget *source ; @@ -566,11 +564,9 @@ aggregate_dialog (PsppireDataWindow *dw) g_signal_connect_swapped (dialog, "refresh", G_CALLBACK (refresh), &fd); - g_object_get (fd.de->data_editor, "var-store", &vs, NULL); - gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (fd.de)); - g_object_get (vs, "dictionary", &fd.dict, NULL); + g_object_get (fd.de->data_editor, "dictionary", &fd.dict, NULL); g_object_set (source, "model", fd.dict, NULL); diff --git a/src/ui/gui/automake.mk b/src/ui/gui/automake.mk index b852ceabde..aa1047b4c3 100644 --- a/src/ui/gui/automake.mk +++ b/src/ui/gui/automake.mk @@ -283,8 +283,6 @@ src_ui_gui_psppire_SOURCES = \ src/ui/gui/psppire-var-ptr.h \ src/ui/gui/psppire-var-sheet.c \ src/ui/gui/psppire-var-sheet.h \ - src/ui/gui/psppire-var-store.c \ - src/ui/gui/psppire-var-store.h \ src/ui/gui/psppire-vbuttonbox.h \ src/ui/gui/psppire-window.c \ src/ui/gui/psppire-window.h \ diff --git a/src/ui/gui/autorecode-dialog.c b/src/ui/gui/autorecode-dialog.c index f303e18d0f..8c771ce222 100644 --- a/src/ui/gui/autorecode-dialog.c +++ b/src/ui/gui/autorecode-dialog.c @@ -271,7 +271,6 @@ autorecode_dialog (PsppireDataWindow *de) gint response; GtkBuilder *xml = builder_new ("autorecode.ui"); - PsppireVarStore *vs; GtkWidget *dialog = get_widget_assert (xml, "autorecode-dialog"); GtkWidget *source = get_widget_assert (xml, "dict-view"); @@ -324,11 +323,10 @@ autorecode_dialog (PsppireDataWindow *de) } - g_object_get (de->data_editor, "var-store", &vs, NULL); gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de)); - g_object_get (vs, "dictionary", &rd.dict, NULL); + g_object_get (de->data_editor, "dictionary", &rd.dict, NULL); g_object_set (source, "model", rd.dict, NULL); diff --git a/src/ui/gui/binomial-dialog.c b/src/ui/gui/binomial-dialog.c index ee3fbd7bf2..90d9118ea6 100644 --- a/src/ui/gui/binomial-dialog.c +++ b/src/ui/gui/binomial-dialog.c @@ -146,7 +146,6 @@ binomial_dialog (PsppireDataWindow *dw) struct binomial_dialog bin_d; GtkBuilder *xml = builder_new ("binomial.ui"); - PsppireVarStore *vs; GtkWidget *dialog = get_widget_assert (xml, "binomial-dialog"); @@ -154,8 +153,6 @@ binomial_dialog (PsppireDataWindow *dw) GtkWidget *dict_view = get_widget_assert (xml, "dict-view"); - g_object_get (dw->data_editor, "var-store", &vs, NULL); - gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (dw)); bin_d.var_view = get_widget_assert (xml, "variables-treeview"); @@ -165,7 +162,7 @@ binomial_dialog (PsppireDataWindow *dw) bin_d.cutpoint_entry = get_widget_assert (xml, "cutpoint-entry"); bin_d.cutpoint_button = get_widget_assert (xml, "radiobutton4"); - g_object_get (vs, "dictionary", &bin_d.dict, NULL); + g_object_get (dw->data_editor, "dictionary", &bin_d.dict, NULL); g_object_set (dict_view, "model", bin_d.dict, "predicate", var_is_numeric, diff --git a/src/ui/gui/chi-square-dialog.c b/src/ui/gui/chi-square-dialog.c index dfa39f06eb..64a6356ce1 100644 --- a/src/ui/gui/chi-square-dialog.c +++ b/src/ui/gui/chi-square-dialog.c @@ -162,7 +162,6 @@ chisquare_dialog (PsppireDataWindow *dw) struct chisquare_dialog csd; GtkBuilder *xml = builder_new ("chi-square.ui"); - PsppireVarStore *vs; GtkWidget *dialog = get_widget_assert (xml, "chisquare-dialog"); @@ -189,12 +188,10 @@ chisquare_dialog (PsppireDataWindow *dw) csd.values_button = get_widget_assert (xml, "radiobutton2"); - g_object_get (dw->data_editor, "var-store", &vs, NULL); - gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (dw)); - g_object_get (vs, "dictionary", &csd.dict, NULL); + g_object_get (dw->data_editor, "dictionary", &csd.dict, NULL); g_object_set (dict_view, "model", csd.dict, "predicate", var_is_numeric, diff --git a/src/ui/gui/comments-dialog.c b/src/ui/gui/comments-dialog.c index 68249afdcb..1d31777379 100644 --- a/src/ui/gui/comments-dialog.c +++ b/src/ui/gui/comments-dialog.c @@ -22,7 +22,6 @@ #include "psppire-data-editor.h" #include "executor.h" #include "helper.h" -#include "psppire-var-store.h" #include #include "comments-dialog.h" @@ -104,9 +103,6 @@ comments_dialog (PsppireDataWindow *de) GtkWidget *label = get_widget_assert (xml, "column-number-label"); GtkTextBuffer *buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (textview)); - PsppireVarStore *vs = NULL; - - g_object_get (de->data_editor, "var-store", &vs, NULL); gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de)); @@ -144,7 +140,7 @@ comments_dialog (PsppireDataWindow *de) } cd.xml = xml; - g_object_get (vs, "dictionary", &cd.dict, NULL); + g_object_get (de->data_editor, "dictionary", &cd.dict, NULL); g_signal_connect (buffer, "mark-set", G_CALLBACK (set_column_number), label); diff --git a/src/ui/gui/compute-dialog.c b/src/ui/gui/compute-dialog.c index debc412341..9ddb66d48e 100644 --- a/src/ui/gui/compute-dialog.c +++ b/src/ui/gui/compute-dialog.c @@ -21,7 +21,6 @@ #include "psppire-dialog.h" #include "psppire-keypad.h" #include "psppire-data-window.h" -#include "psppire-var-store.h" #include "psppire-selector.h" #include "dialog-common.h" #include @@ -369,7 +368,6 @@ compute_dialog (PsppireDataWindow *de) { gint response; - PsppireVarStore *vs = NULL; struct compute_dialog scd; GtkBuilder *xml = builder_new ("compute.ui"); @@ -388,8 +386,7 @@ compute_dialog (PsppireDataWindow *de) get_widget_assert (xml, "radio-button-expression-label"); - g_object_get (de->data_editor, "var-store", &vs, NULL); - g_object_get (vs, "dictionary", &scd.dict, NULL); + g_object_get (de->data_editor, "dictionary", &scd.dict, NULL); scd.use_type = FALSE; g_signal_connect (expression, "toggled", diff --git a/src/ui/gui/count-dialog.c b/src/ui/gui/count-dialog.c index b0d417f8eb..135cc47330 100644 --- a/src/ui/gui/count-dialog.c +++ b/src/ui/gui/count-dialog.c @@ -114,7 +114,6 @@ dialog_state_valid (gpointer data) void count_dialog (PsppireDataWindow *de) { gint response; - PsppireVarStore *vs = NULL; struct cnt_dialog cnt; GtkBuilder *builder = builder_new ("count.ui"); @@ -137,9 +136,7 @@ void count_dialog (PsppireDataWindow *de) g_signal_connect (cnt.dialog, "refresh", G_CALLBACK (refresh), &cnt); - g_object_get (de->data_editor, "var-store", &vs, NULL); - - g_object_get (vs, "dictionary", &cnt.dict, NULL); + g_object_get (de->data_editor, "dictionary", &cnt.dict, NULL); gtk_window_set_transient_for (GTK_WINDOW (cnt.dialog), GTK_WINDOW (de)); diff --git a/src/ui/gui/crosstabs-dialog.c b/src/ui/gui/crosstabs-dialog.c index dc046679c7..3cb8218b91 100644 --- a/src/ui/gui/crosstabs-dialog.c +++ b/src/ui/gui/crosstabs-dialog.c @@ -28,7 +28,6 @@ #include #include "executor.h" #include -#include #include #include "helper.h" @@ -350,7 +349,6 @@ crosstabs_dialog (PsppireDataWindow *de) struct crosstabs_dialog cd; GtkBuilder *xml = builder_new ("crosstabs.ui"); - PsppireVarStore *vs = NULL; PsppireDict *dict = NULL; @@ -366,8 +364,6 @@ crosstabs_dialog (PsppireDataWindow *de) cd.stat_view = get_widget_assert (xml, "stats-view"); cd.cell_view = get_widget_assert (xml, "cell-view"); - 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, N_CROSSTABS_STATS, @@ -381,12 +377,12 @@ crosstabs_dialog (PsppireDataWindow *de) gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de)); - g_object_get (vs, "dictionary", &dict, NULL); + g_object_get (de->data_editor, "dictionary", &dict, NULL); g_object_set (source, "model", dict, NULL); cd.row_vars = GTK_TREE_VIEW (dest_rows); cd.col_vars = GTK_TREE_VIEW (dest_cols); - g_object_get (vs, "dictionary", &cd.dict, NULL); + g_object_get (de->data_editor, "dictionary", &cd.dict, NULL); cd.format_dialog = get_widget_assert (xml, "format-dialog"); cd.table_button = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "print-tables")); cd.pivot_button = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "pivot")); diff --git a/src/ui/gui/find-dialog.c b/src/ui/gui/find-dialog.c index 1f929b6485..1bdf35e422 100644 --- a/src/ui/gui/find-dialog.c +++ b/src/ui/gui/find-dialog.c @@ -49,9 +49,6 @@ which match particular strings */ #define N_(msgid) msgid -/* FIXME: These shouldn't be here */ -#include "psppire-var-store.h" - struct find_dialog { GtkBuilder *xml; @@ -196,7 +193,6 @@ find_dialog (PsppireDataWindow *de) GtkWidget *buttonbox; - PsppireVarStore *vs ; PsppireDataStore *ds ; fd.xml = builder_new ("find.ui"); @@ -215,12 +211,10 @@ find_dialog (PsppireDataWindow *de) selector = get_widget_assert (fd.xml, "find-selector"); g_object_get (de->data_editor, - "var-store", &vs, + "dictionary", &fd.dict, "data-store", &ds, NULL); - g_object_get (vs, "dictionary", &fd.dict, NULL); - fd.data = ds->datasheet; fd.variable_entry = get_widget_assert (fd.xml, "find-variable-entry"); diff --git a/src/ui/gui/frequencies-dialog.c b/src/ui/gui/frequencies-dialog.c index 8db8ddc88b..32871e0a8b 100644 --- a/src/ui/gui/frequencies-dialog.c +++ b/src/ui/gui/frequencies-dialog.c @@ -28,7 +28,6 @@ #include #include #include -#include #include "executor.h" #include "helper.h" @@ -468,10 +467,6 @@ frequencies_dialog (PsppireDataWindow *de) GtkWidget *charts_button = get_widget_assert (xml, "charts-button"); GtkWidget *stats_treeview = get_widget_assert (xml, "stats-treeview"); - PsppireVarStore *vs = NULL; - - g_object_get (de->data_editor, "var-store", &vs, NULL); - put_checkbox_items_in_treeview (GTK_TREE_VIEW(stats_treeview), B_FS_DEFAULT, N_FREQUENCY_STATS, @@ -481,7 +476,7 @@ frequencies_dialog (PsppireDataWindow *de) gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de)); - g_object_get (vs, "dictionary", &fd.dict, NULL); + g_object_get (de->data_editor, "dictionary", &fd.dict, NULL); g_object_set (source, "model", fd.dict, NULL); fd.stat_vars = GTK_TREE_VIEW (dest); diff --git a/src/ui/gui/k-related-dialog.c b/src/ui/gui/k-related-dialog.c index 171894527c..867583ade1 100644 --- a/src/ui/gui/k-related-dialog.c +++ b/src/ui/gui/k-related-dialog.c @@ -126,14 +126,11 @@ k_related_dialog (PsppireDataWindow *dw) struct k_related_dialog krd; GtkBuilder *xml = builder_new ("k-related.ui"); - PsppireVarStore *vs; GtkWidget *dialog = get_widget_assert (xml, "k-related-dialog"); GtkWidget *dict_view = get_widget_assert (xml, "dict-view"); - g_object_get (dw->data_editor, "var-store", &vs, NULL); - gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (dw)); krd.var_view = get_widget_assert (xml, "variables-treeview"); @@ -142,7 +139,7 @@ k_related_dialog (PsppireDataWindow *dw) krd.kendal = get_widget_assert (xml, "kendal-checkbutton"); krd.cochran = get_widget_assert (xml, "cochran-checkbutton"); - g_object_get (vs, "dictionary", &krd.dict, NULL); + g_object_get (dw->data_editor, "dictionary", &krd.dict, NULL); g_object_set (dict_view, "model", krd.dict, "predicate", var_is_numeric, diff --git a/src/ui/gui/ks-one-sample-dialog.c b/src/ui/gui/ks-one-sample-dialog.c index afdac0817f..ba27e58bf3 100644 --- a/src/ui/gui/ks-one-sample-dialog.c +++ b/src/ui/gui/ks-one-sample-dialog.c @@ -106,8 +106,6 @@ ks_one_sample_dialog (PsppireDataWindow *dw) struct ks_one_sample fd; gint response; - PsppireVarStore *vs; - GtkWidget *dialog ; GtkWidget *source ; @@ -128,11 +126,9 @@ ks_one_sample_dialog (PsppireDataWindow *dw) fd.variables = get_widget_assert (fd.xml, "psppire-var-view1"); - g_object_get (fd.de->data_editor, "var-store", &vs, NULL); - gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (fd.de)); - g_object_get (vs, "dictionary", &fd.dict, NULL); + g_object_get (fd.de->data_editor, "dictionary", &fd.dict, NULL); g_object_set (source, "model", fd.dict, "predicate", var_is_numeric, NULL); diff --git a/src/ui/gui/npar-two-sample-related.c b/src/ui/gui/npar-two-sample-related.c index ac3bcd54e5..c26f6114ea 100644 --- a/src/ui/gui/npar-two-sample-related.c +++ b/src/ui/gui/npar-two-sample-related.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2011 Free Software Foundation + Copyright (C) 2011, 2012 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 @@ -23,7 +23,6 @@ #include "psppire-var-view.h" #include "psppire-dict.h" -#include "psppire-var-store.h" #include "dialog-common.h" #include "psppire-dialog.h" diff --git a/src/ui/gui/oneway-anova-dialog.c b/src/ui/gui/oneway-anova-dialog.c index 387fa4f2ec..7992b94c71 100644 --- a/src/ui/gui/oneway-anova-dialog.c +++ b/src/ui/gui/oneway-anova-dialog.c @@ -19,7 +19,6 @@ #include #include "oneway-anova-dialog.h" #include "psppire-dict.h" -#include "psppire-var-store.h" #include "psppire-var-view.h" #include "builder-wrapper.h" #include "psppire-data-window.h" @@ -126,8 +125,6 @@ oneway_anova_dialog (PsppireDataWindow *de) { gint response; - PsppireVarStore *vs = NULL; - struct oneway_anova_dialog ow; GtkBuilder *builder = builder_new ("oneway.ui"); @@ -156,9 +153,7 @@ oneway_anova_dialog (PsppireDataWindow *de) ow.homogeneity = GTK_TOGGLE_BUTTON (get_widget_assert (builder, "checkbutton2")); - g_object_get (de->data_editor, "var-store", &vs, NULL); - - g_object_get (vs, "dictionary", &ow.dict, NULL); + g_object_get (de->data_editor, "dictionary", &ow.dict, NULL); ow.dialog = GTK_WINDOW (get_widget_assert (builder, "oneway-anova-dialog")); diff --git a/src/ui/gui/paired-dialog.c b/src/ui/gui/paired-dialog.c index 2b61903fd9..3cf2aa31d3 100644 --- a/src/ui/gui/paired-dialog.c +++ b/src/ui/gui/paired-dialog.c @@ -27,7 +27,6 @@ #include "psppire-var-view.h" #include "psppire-dict.h" -#include "psppire-var-store.h" #include "dialog-common.h" #include "psppire-dialog.h" @@ -147,8 +146,6 @@ two_sample_dialog_create (PsppireDataWindow *de) GtkWidget *selector ; struct paired_samples_dialog *tt_d = g_malloc (sizeof *tt_d); - PsppireVarStore *vs = NULL; - tt_d->xml = builder_new ("paired-samples.ui"); dict_view = get_widget_assert (tt_d->xml, "paired-samples-t-test-treeview1"); @@ -157,9 +154,7 @@ two_sample_dialog_create (PsppireDataWindow *de) tt_d->dialog = get_widget_assert (tt_d->xml, "t-test-paired-samples-dialog"); - g_object_get (de->data_editor, "var-store", &vs, NULL); - - g_object_get (vs, "dictionary", &tt_d->dict, NULL); + g_object_get (de->data_editor, "dictionary", &tt_d->dict, NULL); tt_d->pairs_treeview = get_widget_assert (tt_d->xml, "paired-samples-t-test-treeview2"); diff --git a/src/ui/gui/psppire-data-editor.c b/src/ui/gui/psppire-data-editor.c index 575307e8c8..b5f22735cf 100644 --- a/src/ui/gui/psppire-data-editor.c +++ b/src/ui/gui/psppire-data-editor.c @@ -91,10 +91,10 @@ psppire_data_editor_dispose (GObject *obj) de->data_store = NULL; } - if (de->var_store) + if (de->dict) { - g_object_unref (de->var_store); - de->var_store = NULL; + g_object_unref (de->dict); + de->dict = NULL; } if (de->font != NULL) @@ -117,7 +117,7 @@ enum { PROP_0, PROP_DATA_STORE, - PROP_VAR_STORE, + PROP_DICTIONARY, PROP_VALUE_LABELS, PROP_SPLIT_WINDOW, PROP_UI_MANAGER @@ -132,7 +132,7 @@ psppire_data_editor_refresh_model (PsppireDataEditor *de) FOR_EACH_DATA_SHEET (data_sheet, i, de) psppire_data_sheet_set_data_store (data_sheet, de->data_store); - psppire_var_sheet_set_dictionary (var_sheet, de->var_store->dictionary); + psppire_var_sheet_set_dictionary (var_sheet, de->dict); } static void @@ -167,13 +167,14 @@ psppire_data_editor_set_property (GObject *object, G_CALLBACK (refresh_entry), de); break; - case PROP_VAR_STORE: - if ( de->var_store) g_object_unref (de->var_store); - de->var_store = g_value_get_pointer (value); - g_object_ref (de->var_store); + case PROP_DICTIONARY: + if (de->dict) + g_object_unref (de->dict); + de->dict = g_value_get_pointer (value); + g_object_ref (de->dict); psppire_var_sheet_set_dictionary (PSPPIRE_VAR_SHEET (de->var_sheet), - de->var_store->dictionary); + de->dict); break; case PROP_VALUE_LABELS: FOR_EACH_DATA_SHEET (data_sheet, i, de) @@ -203,8 +204,8 @@ psppire_data_editor_get_property (GObject *object, case PROP_DATA_STORE: g_value_set_pointer (value, de->data_store); break; - case PROP_VAR_STORE: - g_value_set_pointer (value, de->var_store); + case PROP_DICTIONARY: + g_value_set_pointer (value, de->dict); break; case PROP_VALUE_LABELS: g_value_set_boolean (value, @@ -241,7 +242,7 @@ static void psppire_data_editor_class_init (PsppireDataEditorClass *klass) { GParamSpec *data_store_spec ; - GParamSpec *var_store_spec ; + GParamSpec *dict_spec ; GParamSpec *value_labels_spec; GParamSpec *split_window_spec; GParamSpec *ui_manager_spec; @@ -269,15 +270,15 @@ psppire_data_editor_class_init (PsppireDataEditorClass *klass) PROP_DATA_STORE, data_store_spec); - var_store_spec = - g_param_spec_pointer ("var-store", - "Variable Store", - "A pointer to the variable store associated with this editor", + dict_spec = + g_param_spec_pointer ("dictionary", + "Dictionary", + "A pointer to the dictionary associated with this editor", G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE | G_PARAM_READABLE ); g_object_class_install_property (object_class, - PROP_VAR_STORE, - var_store_spec); + PROP_DICTIONARY, + dict_spec); value_labels_spec = g_param_spec_boolean ("value-labels", @@ -743,11 +744,11 @@ psppire_data_editor_init (PsppireDataEditor *de) } GtkWidget* -psppire_data_editor_new (PsppireVarStore *var_store, +psppire_data_editor_new (PsppireDict *dict, PsppireDataStore *data_store) { return g_object_new (PSPPIRE_DATA_EDITOR_TYPE, - "var-store", var_store, + "dictionary", dict, "data-store", data_store, NULL); } diff --git a/src/ui/gui/psppire-data-editor.h b/src/ui/gui/psppire-data-editor.h index ea08f01317..879953d6d8 100644 --- a/src/ui/gui/psppire-data-editor.h +++ b/src/ui/gui/psppire-data-editor.h @@ -32,7 +32,6 @@ #include #include -#include "psppire-var-store.h" #include "psppire-data-store.h" #include "ui/gui/pspp-sheet-view.h" @@ -55,7 +54,7 @@ struct _PsppireDataEditor /* */ PsppireDataStore *data_store; - PsppireVarStore *var_store; + PsppireDict *dict; /* Font to use in var sheet and data sheet(s), NULL to use system default. */ struct _PangoFontDescription *font; @@ -82,7 +81,7 @@ struct _PsppireDataEditorClass GType psppire_data_editor_get_type (void); -GtkWidget* psppire_data_editor_new (PsppireVarStore *, PsppireDataStore *); +GtkWidget* psppire_data_editor_new (PsppireDict *, PsppireDataStore *); void psppire_data_editor_show_grid (PsppireDataEditor *, gboolean); void psppire_data_editor_set_font (PsppireDataEditor *, PangoFontDescription *); void psppire_data_editor_split_window (PsppireDataEditor *, gboolean ); diff --git a/src/ui/gui/psppire-data-window.c b/src/ui/gui/psppire-data-window.c index 8ef17fae00..3d9774579a 100644 --- a/src/ui/gui/psppire-data-window.c +++ b/src/ui/gui/psppire-data-window.c @@ -201,13 +201,11 @@ on_filter_change (GObject *o, gint filter_index, gpointer data) } else { - PsppireVarStore *vs = NULL; PsppireDict *dict = NULL; struct variable *var ; gchar *text ; - g_object_get (de->data_editor, "var-store", &vs, NULL); - g_object_get (vs, "dictionary", &dict, NULL); + g_object_get (de->data_editor, "dictionary", &dict, NULL); var = psppire_dict_get_variable (dict, filter_index); @@ -274,12 +272,10 @@ on_weight_change (GObject *o, gint weight_index, gpointer data) else { struct variable *var ; - PsppireVarStore *vs = NULL; PsppireDict *dict = NULL; gchar *text; - g_object_get (de->data_editor, "var-store", &vs, NULL); - g_object_get (vs, "dictionary", &dict, NULL); + g_object_get (de->data_editor, "dictionary", &dict, NULL); var = psppire_dict_get_variable (dict, weight_index); @@ -868,8 +864,6 @@ psppire_data_window_finish_init (PsppireDataWindow *de, transformation_change_callback, /* transformations_changed */ }; - PsppireDict *dict; - GtkWidget *menubar; GtkWidget *hb ; GtkWidget *sb ; @@ -877,9 +871,8 @@ psppire_data_window_finish_init (PsppireDataWindow *de, GtkWidget *box = gtk_vbox_new (FALSE, 0); de->dataset = ds; - dict = psppire_dict_new_from_dict (dataset_dict (ds)); - de->var_store = psppire_var_store_new (dict); - de->data_store = psppire_data_store_new (dict); + de->dict = psppire_dict_new_from_dict (dataset_dict (ds)); + de->data_store = psppire_data_store_new (de->dict); psppire_data_store_set_reader (de->data_store, NULL); menubar = get_widget_assert (de->builder, "menubar"); @@ -890,8 +883,7 @@ psppire_data_window_finish_init (PsppireDataWindow *de, de->merge_id = 0; de->data_editor = - PSPPIRE_DATA_EDITOR (psppire_data_editor_new (de->var_store, - de->data_store)); + PSPPIRE_DATA_EDITOR (psppire_data_editor_new (de->dict, de->data_store)); g_signal_connect (de->data_editor, "switch-page", G_CALLBACK (on_switch_page), de); @@ -915,15 +907,15 @@ psppire_data_window_finish_init (PsppireDataWindow *de, gtk_container_add (GTK_CONTAINER (de), box); - g_signal_connect (dict, "weight-changed", + g_signal_connect (de->dict, "weight-changed", G_CALLBACK (on_weight_change), de); - g_signal_connect (dict, "filter-changed", + g_signal_connect (de->dict, "filter-changed", G_CALLBACK (on_filter_change), de); - g_signal_connect (dict, "split-changed", + g_signal_connect (de->dict, "split-changed", G_CALLBACK (on_split_change), de); @@ -1067,10 +1059,10 @@ psppire_data_window_dispose (GObject *object) dw->builder = NULL; } - if (dw->var_store) + if (dw->dict) { - g_object_unref (dw->var_store); - dw->var_store = NULL; + g_object_unref (dw->dict); + dw->dict = NULL; } if (dw->data_store) @@ -1227,7 +1219,7 @@ psppire_data_window_new (struct dataset *ds) bool psppire_data_window_is_empty (PsppireDataWindow *dw) { - return psppire_var_store_get_var_cnt (dw->var_store) == 0; + return psppire_dict_get_var_cnt (dw->dict) == 0; } static void diff --git a/src/ui/gui/psppire-data-window.h b/src/ui/gui/psppire-data-window.h index f939d9ff15..d63f49aed7 100644 --- a/src/ui/gui/psppire-data-window.h +++ b/src/ui/gui/psppire-data-window.h @@ -61,7 +61,7 @@ struct _PsppireDataWindow GtkBuilder *builder; GtkUIManager *ui_manager; - PsppireVarStore *var_store; + PsppireDict *dict; struct dataset *dataset; PsppireDataStore *data_store; diff --git a/src/ui/gui/psppire-dialog-action-var-info.c b/src/ui/gui/psppire-dialog-action-var-info.c index 0d22e775f5..0c17222fa3 100644 --- a/src/ui/gui/psppire-dialog-action-var-info.c +++ b/src/ui/gui/psppire-dialog-action-var-info.c @@ -31,7 +31,6 @@ #include "ui/gui/psppire-data-window.h" #include "ui/gui/psppire-dialog.h" #include "ui/gui/psppire-dictview.h" -#include "ui/gui/psppire-var-store.h" #include "ui/gui/var-display.h" static void psppire_dialog_action_var_info_init (PsppireDialogActionVarInfo *act); diff --git a/src/ui/gui/psppire-dialog-action.c b/src/ui/gui/psppire-dialog-action.c index 2a23fa6139..1a19ebb9a5 100644 --- a/src/ui/gui/psppire-dialog-action.c +++ b/src/ui/gui/psppire-dialog-action.c @@ -88,7 +88,6 @@ psppire_dialog_action_activate (PsppireDialogAction *act) { gint response; - PsppireVarStore *vs; PsppireDialogActionClass *class = PSPPIRE_DIALOG_ACTION_GET_CLASS (act); GSList *sl = gtk_ui_manager_get_toplevels (act->uim, GTK_UI_MANAGER_MENUBAR | GTK_UI_MANAGER_TOOLBAR); @@ -97,9 +96,7 @@ psppire_dialog_action_activate (PsppireDialogAction *act) act->toplevel = gtk_widget_get_toplevel (GTK_WIDGET (sl->data)); g_slist_free (sl); - vs = PSPPIRE_DATA_WINDOW(act->toplevel)->var_store; - - g_object_get (vs, "dictionary", &act->dict, NULL); + act->dict = PSPPIRE_DATA_WINDOW(act->toplevel)->dict; g_object_set (act->source, "model", act->dict, NULL); diff --git a/src/ui/gui/psppire-var-sheet.c b/src/ui/gui/psppire-var-sheet.c index 037af7b93e..b937608c37 100644 --- a/src/ui/gui/psppire-var-sheet.c +++ b/src/ui/gui/psppire-var-sheet.c @@ -31,7 +31,6 @@ #include "ui/gui/psppire-dialog-action-var-info.h" #include "ui/gui/psppire-empty-list-store.h" #include "ui/gui/psppire-marshal.h" -#include "ui/gui/psppire-var-store.h" #include "ui/gui/val-labs-dialog.h" #include "ui/gui/var-display.h" #include "ui/gui/var-type-dialog.h" diff --git a/src/ui/gui/psppire-var-store.c b/src/ui/gui/psppire-var-store.c deleted file mode 100644 index f76d1b9c7b..0000000000 --- a/src/ui/gui/psppire-var-store.c +++ /dev/null @@ -1,206 +0,0 @@ -/* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2006, 2009, 2010, 2011, 2012 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 . */ - -#include -#include -#include -#include -#define _(msgid) gettext (msgid) -#define N_(msgid) msgid - -#include - -#include - -#include "psppire-var-store.h" -#include "helper.h" - -#include -#include -#include -#include - -#include "val-labs-dialog.h" -#include "missing-val-dialog.h" -#include - -#include "var-display.h" - -enum - { - PROP_0, - PSPPIRE_VAR_STORE_DICT - }; - -static void psppire_var_store_init (PsppireVarStore *var_store); -static void psppire_var_store_class_init (PsppireVarStoreClass *class); -static void psppire_var_store_finalize (GObject *object); -static void psppire_var_store_dispose (GObject *object); - - -static GObjectClass *parent_class = NULL; - -GType -psppire_var_store_get_type (void) -{ - static GType var_store_type = 0; - - if (!var_store_type) - { - static const GTypeInfo var_store_info = - { - sizeof (PsppireVarStoreClass), - NULL, /* base_init */ - NULL, /* base_finalize */ - (GClassInitFunc) psppire_var_store_class_init, - NULL, /* class_finalize */ - NULL, /* class_data */ - sizeof (PsppireVarStore), - 0, - (GInstanceInitFunc) psppire_var_store_init, - }; - - var_store_type = g_type_register_static (G_TYPE_OBJECT, "PsppireVarStore", &var_store_info, 0); - } - - return var_store_type; -} - -static void -psppire_var_store_set_property (GObject *object, - guint property_id, - const GValue *value, - GParamSpec *pspec) -{ - PsppireVarStore *self = (PsppireVarStore *) object; - - switch (property_id) - { - case PSPPIRE_VAR_STORE_DICT: - if ( self->dictionary) - g_object_unref (self->dictionary); - self->dictionary = g_value_dup_object (value); - break; - - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); - break; - } -} - -static void -psppire_var_store_get_property (GObject *object, - guint property_id, - GValue *value, - GParamSpec *pspec) -{ - PsppireVarStore *self = (PsppireVarStore *) object; - - switch (property_id) - { - case PSPPIRE_VAR_STORE_DICT: - g_value_take_object (value, self->dictionary); - break; - - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} - - -static void -psppire_var_store_class_init (PsppireVarStoreClass *class) -{ - GObjectClass *object_class; - GParamSpec *dict_pspec; - - parent_class = g_type_class_peek_parent (class); - object_class = (GObjectClass*) class; - - object_class->finalize = psppire_var_store_finalize; - object_class->dispose = psppire_var_store_dispose; - object_class->set_property = psppire_var_store_set_property; - object_class->get_property = psppire_var_store_get_property; - - dict_pspec = g_param_spec_object ("dictionary", - "Dictionary", - "The PsppireDict represented by this var store", - PSPPIRE_TYPE_DICT, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT); - - g_object_class_install_property (object_class, - PSPPIRE_VAR_STORE_DICT, - dict_pspec); -} - -static void -psppire_var_store_init (PsppireVarStore *var_store) -{ - var_store->dictionary = NULL; -} - -struct variable * -psppire_var_store_get_var (PsppireVarStore *store, glong row) -{ - return psppire_dict_get_variable (store->dictionary, row); -} - -/** - * psppire_var_store_new: - * @dict: The dictionary for this var_store. - * - * - * Return value: a new #PsppireVarStore - **/ -PsppireVarStore * -psppire_var_store_new (PsppireDict *dict) -{ - PsppireVarStore *retval; - - retval = g_object_new (GTK_TYPE_VAR_STORE, "dictionary", dict, NULL); - - // psppire_var_store_set_dictionary (retval, dict); - - return retval; -} - -static void -psppire_var_store_finalize (GObject *object) -{ - /* must chain up */ - (* parent_class->finalize) (object); -} - -static void -psppire_var_store_dispose (GObject *object) -{ - PsppireVarStore *self = PSPPIRE_VAR_STORE (object); - - if (self->dictionary) - g_object_unref (self->dictionary); - - /* must chain up */ - (* parent_class->finalize) (object); -} - - -/* Return the number of variables */ -gint -psppire_var_store_get_var_cnt (PsppireVarStore *store) -{ - return psppire_dict_get_var_cnt (store->dictionary); -} diff --git a/src/ui/gui/psppire-var-store.h b/src/ui/gui/psppire-var-store.h deleted file mode 100644 index de199fa0cc..0000000000 --- a/src/ui/gui/psppire-var-store.h +++ /dev/null @@ -1,75 +0,0 @@ -/* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2006, 2011, 2012 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 . */ - -#ifndef __PSPPIRE_VAR_STORE_H__ -#define __PSPPIRE_VAR_STORE_H__ - -#include "psppire-dict.h" -#include - -G_BEGIN_DECLS - -/* PSPPIRE variable store. */ -#define GTK_TYPE_VAR_STORE (psppire_var_store_get_type ()) - -#define PSPPIRE_VAR_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ - GTK_TYPE_VAR_STORE, PsppireVarStore)) - -#define PSPPIRE_VAR_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), \ - GTK_TYPE_VAR_STORE, \ - PsppireVarStoreClass)) - -#define PSPPIRE_IS_VAR_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_VAR_STORE)) - -#define PSPPIRE_IS_VAR_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_VAR_STORE)) - -#define PSPPIRE_VAR_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), \ - GTK_TYPE_VAR_STORE, \ - PsppireVarStoreClass)) - -typedef struct _PsppireVarStore PsppireVarStore; -typedef struct _PsppireVarStoreClass PsppireVarStoreClass; - -struct _PsppireVarStore -{ - GObject parent; - - /*< private >*/ - PsppireDict *dictionary; -}; - -struct _PsppireVarStoreClass -{ - GObjectClass parent_class; - - /* Padding for future expansion */ - void (*_gtk_reserved1) (void); - void (*_gtk_reserved2) (void); - void (*_gtk_reserved3) (void); - void (*_gtk_reserved4) (void); -}; - - -GType psppire_var_store_get_type (void) G_GNUC_CONST; -PsppireVarStore *psppire_var_store_new (PsppireDict *dict); -struct variable * psppire_var_store_get_var (PsppireVarStore *store, glong row); - -/* Return the number of variables */ -gint psppire_var_store_get_var_cnt (PsppireVarStore *var_store); - -G_END_DECLS - -#endif /* __PSPPIRE_VAR_STORE_H__ */ diff --git a/src/ui/gui/psppire.c b/src/ui/gui/psppire.c index 8bd6b6fe5e..36716f3a26 100644 --- a/src/ui/gui/psppire.c +++ b/src/ui/gui/psppire.c @@ -51,7 +51,6 @@ #include "ui/gui/psppire-output-window.h" #include "ui/gui/psppire-syntax-window.h" #include "ui/gui/psppire-selector.h" -#include "ui/gui/psppire-var-store.h" #include "ui/gui/psppire-var-view.h" #include "ui/gui/psppire-window-register.h" #include "ui/gui/widgets.h" diff --git a/src/ui/gui/recode-dialog.c b/src/ui/gui/recode-dialog.c index 012b2f26c1..eddb4f0d62 100644 --- a/src/ui/gui/recode-dialog.c +++ b/src/ui/gui/recode-dialog.c @@ -37,7 +37,6 @@ #include #include "helper.h" #include -#include #include "psppire-val-chooser.h" @@ -611,9 +610,6 @@ recode_dialog (PsppireDataWindow *de, gboolean diff) GtkWidget *output_variable_box = get_widget_assert (builder,"frame4"); - PsppireVarStore *vs = NULL; - g_object_get (de->data_editor, "var-store", &vs, NULL); - rd.change_button = get_widget_assert (builder, "change-button"); rd.varmap = NULL; rd.dialog = get_widget_assert (builder, "recode-dialog"); @@ -622,7 +618,7 @@ recode_dialog (PsppireDataWindow *de, gboolean diff) rd.new_name_entry = get_widget_assert (builder, "dest-name-entry"); rd.new_label_entry = get_widget_assert (builder, "dest-label-entry"); - g_object_get (vs, "dictionary", &rd.dict, NULL); + g_object_get (de->data_editor, "dictionary", &rd.dict, NULL); rd.value_map = gtk_list_store_new (2, old_value_get_type (), diff --git a/src/ui/gui/runs-dialog.c b/src/ui/gui/runs-dialog.c index 6f877e827d..7bc05f2422 100644 --- a/src/ui/gui/runs-dialog.c +++ b/src/ui/gui/runs-dialog.c @@ -122,8 +122,6 @@ runs_dialog (PsppireDataWindow *dw) struct runs fd; gint response; - PsppireVarStore *vs; - GtkWidget *dialog ; GtkWidget *source ; @@ -145,11 +143,9 @@ runs_dialog (PsppireDataWindow *dw) fd.variables = get_widget_assert (fd.xml, "psppire-var-view1"); - g_object_get (fd.de->data_editor, "var-store", &vs, NULL); - gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (fd.de)); - g_object_get (vs, "dictionary", &fd.dict, NULL); + g_object_get (fd.de->data_editor, "dictionary", &fd.dict, NULL); g_object_set (source, "model", fd.dict, "predicate", var_is_numeric, NULL); diff --git a/src/ui/gui/split-file-dialog.c b/src/ui/gui/split-file-dialog.c index 6e9259ee42..82ef631545 100644 --- a/src/ui/gui/split-file-dialog.c +++ b/src/ui/gui/split-file-dialog.c @@ -34,9 +34,6 @@ #include "dialog-common.h" -/* FIXME: These shouldn't be here */ -#include "psppire-var-store.h" - struct split_file_dialog { @@ -165,7 +162,6 @@ split_file_dialog (PsppireDataWindow *de) { gint response; struct split_file_dialog sfd; - PsppireVarStore *vs ; GtkWidget *dialog ; GtkWidget *source ; @@ -181,9 +177,7 @@ split_file_dialog (PsppireDataWindow *de) sfd.tv = GTK_TREE_VIEW (get_widget_assert (sfd.xml, "split-file-grouping-vars")); - g_object_get (de->data_editor, "var-store", &vs, NULL); - - g_object_get (vs, "dictionary", &sfd.dict, NULL); + g_object_get (de->data_editor, "dictionary", &sfd.dict, NULL); sfd.selector = PSPPIRE_SELECTOR (get_widget_assert (sfd.xml, "split-file-selector")); diff --git a/src/ui/gui/t-test-one-sample.c b/src/ui/gui/t-test-one-sample.c index 02d3eff345..d2bc126383 100644 --- a/src/ui/gui/t-test-one-sample.c +++ b/src/ui/gui/t-test-one-sample.c @@ -20,7 +20,6 @@ #include #include "t-test-one-sample.h" #include "psppire-dict.h" -#include "psppire-var-store.h" #include "psppire-var-view.h" #include "builder-wrapper.h" #include "psppire-data-window.h" @@ -125,8 +124,6 @@ t_test_one_sample_dialog (PsppireDataWindow *de) struct tt_one_sample_dialog tt_d; gint response; - PsppireVarStore *vs = NULL; - GtkBuilder *xml = builder_new ("t-test.ui"); GtkWidget *dict_view = @@ -137,9 +134,7 @@ t_test_one_sample_dialog (PsppireDataWindow *de) GtkWidget *dialog = get_widget_assert (xml, "t-test-one-sample-dialog"); - g_object_get (de->data_editor, "var-store", &vs, NULL); - - g_object_get (vs, "dictionary", &tt_d.dict, NULL); + g_object_get (de->data_editor, "dictionary", &tt_d.dict, NULL); tt_d.vars_treeview = get_widget_assert (xml, "one-sample-t-test-treeview1"); tt_d.test_value_entry = get_widget_assert (xml, "test-value-entry"); tt_d.opt = tt_options_dialog_create (GTK_WINDOW (de)); diff --git a/src/ui/gui/t-test-paired-samples.c b/src/ui/gui/t-test-paired-samples.c index 212691d39b..1b1cfbc87f 100644 --- a/src/ui/gui/t-test-paired-samples.c +++ b/src/ui/gui/t-test-paired-samples.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2011 Free Software Foundation + Copyright (C) 2011, 2012 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 @@ -26,7 +26,6 @@ #include "psppire-var-view.h" #include "psppire-dict.h" -#include "psppire-var-store.h" #include "dialog-common.h" #include "psppire-dialog.h" diff --git a/src/ui/gui/text-data-import-dialog.c b/src/ui/gui/text-data-import-dialog.c index a30178664c..b5a50cbaba 100644 --- a/src/ui/gui/text-data-import-dialog.c +++ b/src/ui/gui/text-data-import-dialog.c @@ -48,7 +48,6 @@ #include "ui/gui/psppire-empty-list-store.h" #include "ui/gui/psppire-scanf.h" #include "ui/gui/psppire-var-sheet.h" -#include "ui/gui/psppire-var-store.h" #include "ui/syntax-gen.h" #include "gl/error.h" diff --git a/src/ui/gui/transpose-dialog.c b/src/ui/gui/transpose-dialog.c index f91b55258c..742dff527b 100644 --- a/src/ui/gui/transpose-dialog.c +++ b/src/ui/gui/transpose-dialog.c @@ -36,10 +36,6 @@ #define N_(msgid) msgid -/* FIXME: These shouldn't be here */ -#include "psppire-var-store.h" - - static gchar * generate_syntax (PsppireDict *dict, GtkBuilder *xml); static void @@ -84,15 +80,11 @@ transpose_dialog (PsppireDataWindow *de) GtkBuilder *xml = builder_new ("psppire.ui"); - PsppireVarStore *vs = NULL; - GtkWidget *dialog = get_widget_assert (xml, "transpose-dialog"); GtkWidget *source = get_widget_assert (xml, "source-treeview"); GtkWidget *selector2 = get_widget_assert (xml, "psppire-selector3"); - g_object_get (de->data_editor, "var-store", &vs, NULL); - - g_object_get (vs, "dictionary", &dict, NULL); + g_object_get (de->data_editor, "dictionary", &dict, NULL); g_object_set (source, "model", dict, NULL); psppire_selector_set_filter_func (PSPPIRE_SELECTOR (selector2), diff --git a/src/ui/gui/univariate-dialog.c b/src/ui/gui/univariate-dialog.c index 44e341a26b..2f24149860 100644 --- a/src/ui/gui/univariate-dialog.c +++ b/src/ui/gui/univariate-dialog.c @@ -114,13 +114,9 @@ univariate_dialog (PsppireDataWindow * de) GtkWidget *factor_selector = get_widget_assert (xml, "factor-selector"); - PsppireVarStore *vs = NULL; - uv_d.dep_entry = get_widget_assert (xml, "dep-entry"); uv_d.factor_list = get_widget_assert (xml, "factors-view"); - g_object_get (de->data_editor, "var-store", &vs, NULL); - gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de)); g_signal_connect (dialog, "refresh", G_CALLBACK (refresh), &uv_d); @@ -128,7 +124,7 @@ univariate_dialog (PsppireDataWindow * de) dialog_state_valid, &uv_d); - g_object_get (vs, "dictionary", &uv_d.dict, NULL); + g_object_get (de->data_editor, "dictionary", &uv_d.dict, NULL); g_object_set (source, "model", uv_d.dict, NULL); psppire_selector_set_allow (PSPPIRE_SELECTOR (dep_selector), diff --git a/src/ui/gui/val-labs-dialog.c b/src/ui/gui/val-labs-dialog.c index ad28681105..5b4f7cffba 100644 --- a/src/ui/gui/val-labs-dialog.c +++ b/src/ui/gui/val-labs-dialog.c @@ -26,7 +26,6 @@ #include "val-labs-dialog.h" #include #include -#include "psppire-var-store.h" #include #include "helper.h" diff --git a/src/ui/gui/val-labs-dialog.h b/src/ui/gui/val-labs-dialog.h index 3440ebd4c4..89b85d073e 100644 --- a/src/ui/gui/val-labs-dialog.h +++ b/src/ui/gui/val-labs-dialog.h @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2005, 2011 Free Software Foundation + Copyright (C) 2005, 2011, 2012 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 @@ -24,7 +24,6 @@ #include #include -#include "psppire-var-store.h" struct val_labs; diff --git a/src/ui/gui/var-type-dialog.h b/src/ui/gui/var-type-dialog.h index e194771667..8e11160e3e 100644 --- a/src/ui/gui/var-type-dialog.h +++ b/src/ui/gui/var-type-dialog.h @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2005, 2011 Free Software Foundation + Copyright (C) 2005, 2011, 2012 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 @@ -20,8 +20,6 @@ #include -#include "psppire-var-store.h" - /* This module describes the behaviour of the Variable Type dialog box, used for input of the variable type parameter in the var sheet */ diff --git a/src/ui/gui/weight-cases-dialog.c b/src/ui/gui/weight-cases-dialog.c index c19eda0d06..27b4fc03a1 100644 --- a/src/ui/gui/weight-cases-dialog.c +++ b/src/ui/gui/weight-cases-dialog.c @@ -32,8 +32,6 @@ #define N_(msgid) msgid -#include "psppire-var-store.h" - struct weight_cases_dialog { PsppireDict *dict; @@ -119,10 +117,7 @@ weight_cases_dialog (PsppireDataWindow *de) GtkWidget *selector = get_widget_assert (xml, "weight-cases-selector"); - PsppireVarStore *vs = NULL; - - g_object_get (de->data_editor, "var-store", &vs, NULL); - g_object_get (vs, "dictionary", &wcd.dict, NULL); + g_object_get (de->data_editor, "dictionary", &wcd.dict, NULL); gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de));