struct aggregate fd;
gint response;
- PsppireVarStore *vs;
-
GtkWidget *dialog ;
GtkWidget *source ;
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);
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 \
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");
}
- 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);
struct binomial_dialog bin_d;
GtkBuilder *xml = builder_new ("binomial.ui");
- PsppireVarStore *vs;
GtkWidget *dialog = get_widget_assert (xml, "binomial-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));
bin_d.var_view = get_widget_assert (xml, "variables-treeview");
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,
struct chisquare_dialog csd;
GtkBuilder *xml = builder_new ("chi-square.ui");
- PsppireVarStore *vs;
GtkWidget *dialog = get_widget_assert (xml, "chisquare-dialog");
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,
#include "psppire-data-editor.h"
#include "executor.h"
#include "helper.h"
-#include "psppire-var-store.h"
#include <ui/syntax-gen.h>
#include "comments-dialog.h"
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));
}
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);
#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 <libpspp/i18n.h>
{
gint response;
- PsppireVarStore *vs = NULL;
struct compute_dialog scd;
GtkBuilder *xml = builder_new ("compute.ui");
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",
void count_dialog (PsppireDataWindow *de)
{
gint response;
- PsppireVarStore *vs = NULL;
struct cnt_dialog cnt;
GtkBuilder *builder = builder_new ("count.ui");
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));
#include <ui/gui/dict-display.h>
#include "executor.h"
#include <ui/gui/psppire-dialog.h>
-#include <ui/gui/psppire-var-store.h>
#include <ui/gui/builder-wrapper.h>
#include "helper.h"
struct crosstabs_dialog cd;
GtkBuilder *xml = builder_new ("crosstabs.ui");
- PsppireVarStore *vs = NULL;
PsppireDict *dict = NULL;
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,
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"));
#define N_(msgid) msgid
-/* FIXME: These shouldn't be here */
-#include "psppire-var-store.h"
-
struct find_dialog
{
GtkBuilder *xml;
GtkWidget *buttonbox;
- PsppireVarStore *vs ;
PsppireDataStore *ds ;
fd.xml = builder_new ("find.ui");
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");
#include <ui/gui/dict-display.h>
#include <ui/gui/builder-wrapper.h>
#include <ui/gui/psppire-dialog.h>
-#include <ui/gui/psppire-var-store.h>
#include "executor.h"
#include "helper.h"
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,
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);
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");
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,
struct ks_one_sample fd;
gint response;
- PsppireVarStore *vs;
-
GtkWidget *dialog ;
GtkWidget *source ;
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);
/* 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
#include "psppire-var-view.h"
#include "psppire-dict.h"
-#include "psppire-var-store.h"
#include "dialog-common.h"
#include "psppire-dialog.h"
#include <gtk/gtk.h>
#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"
{
gint response;
- PsppireVarStore *vs = NULL;
-
struct oneway_anova_dialog ow;
GtkBuilder *builder = builder_new ("oneway.ui");
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"));
#include "psppire-var-view.h"
#include "psppire-dict.h"
-#include "psppire-var-store.h"
#include "dialog-common.h"
#include "psppire-dialog.h"
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");
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");
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)
{
PROP_0,
PROP_DATA_STORE,
- PROP_VAR_STORE,
+ PROP_DICTIONARY,
PROP_VALUE_LABELS,
PROP_SPLIT_WINDOW,
PROP_UI_MANAGER
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
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)
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,
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;
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",
}
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);
}
#include <glib-object.h>
#include <gtk/gtk.h>
-#include "psppire-var-store.h"
#include "psppire-data-store.h"
#include "ui/gui/pspp-sheet-view.h"
/* <private> */
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;
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 );
}
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);
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);
transformation_change_callback, /* transformations_changed */
};
- PsppireDict *dict;
-
GtkWidget *menubar;
GtkWidget *hb ;
GtkWidget *sb ;
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");
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);
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);
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)
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
GtkBuilder *builder;
GtkUIManager *ui_manager;
- PsppireVarStore *var_store;
+ PsppireDict *dict;
struct dataset *dataset;
PsppireDataStore *data_store;
#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);
{
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);
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);
#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"
+++ /dev/null
-/* 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 <http://www.gnu.org/licenses/>. */
-
-#include <config.h>
-#include <string.h>
-#include <stdlib.h>
-#include <gettext.h>
-#define _(msgid) gettext (msgid)
-#define N_(msgid) msgid
-
-#include <libpspp/i18n.h>
-
-#include <gobject/gvaluecollector.h>
-
-#include "psppire-var-store.h"
-#include "helper.h"
-
-#include <data/dictionary.h>
-#include <data/variable.h>
-#include <data/format.h>
-#include <data/missing-values.h>
-
-#include "val-labs-dialog.h"
-#include "missing-val-dialog.h"
-#include <data/value-labels.h>
-
-#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);
-}
+++ /dev/null
-/* 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 <http://www.gnu.org/licenses/>. */
-
-#ifndef __PSPPIRE_VAR_STORE_H__
-#define __PSPPIRE_VAR_STORE_H__
-
-#include "psppire-dict.h"
-#include <gdk/gdk.h>
-
-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__ */
#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"
#include <ui/gui/builder-wrapper.h>
#include "helper.h"
#include <ui/gui/psppire-dialog.h>
-#include <ui/gui/psppire-var-store.h>
#include "psppire-val-chooser.h"
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");
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 (),
struct runs fd;
gint response;
- PsppireVarStore *vs;
-
GtkWidget *dialog ;
GtkWidget *source ;
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);
#include "dialog-common.h"
-/* FIXME: These shouldn't be here */
-#include "psppire-var-store.h"
-
struct split_file_dialog
{
{
gint response;
struct split_file_dialog sfd;
- PsppireVarStore *vs ;
GtkWidget *dialog ;
GtkWidget *source ;
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"));
#include <gtk/gtk.h>
#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"
struct tt_one_sample_dialog tt_d;
gint response;
- PsppireVarStore *vs = NULL;
-
GtkBuilder *xml = builder_new ("t-test.ui");
GtkWidget *dict_view =
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));
/* 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
#include "psppire-var-view.h"
#include "psppire-dict.h"
-#include "psppire-var-store.h"
#include "dialog-common.h"
#include "psppire-dialog.h"
#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"
#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
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),
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);
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),
#include "val-labs-dialog.h"
#include <data/value-labels.h>
#include <data/format.h>
-#include "psppire-var-store.h"
#include <libpspp/i18n.h>
#include "helper.h"
/* 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
#include <gtk/gtk.h>
#include <data/variable.h>
-#include "psppire-var-store.h"
struct val_labs;
/* 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
#include <data/format.h>
-#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 */
#define N_(msgid) msgid
-#include "psppire-var-store.h"
-
struct weight_cases_dialog
{
PsppireDict *dict;
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));