/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009 Free Software Foundation, Inc.
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 <config.h>
#include "psppire-var-sheet.h"
-#include <ui/gui/sheet/psppire-axis-impl.h>
+#include <ui/gui/sheet/psppire-axis.h>
#include "helper.h"
-
/*
Callback whenever the active cell changes on the var sheet.
*/
gint oldrow, gint oldcolumn,
gpointer data)
{
- PsppireSheetCellAttr attributes;
PsppireVarStore *var_store;
PsppireVarSheetClass *vs_class =
PSPPIRE_VAR_SHEET_CLASS(G_OBJECT_GET_CLASS (vs));
g_return_if_fail (oldcolumn == PSPPIRE_VAR_STORE_COL_NAME ||
row < psppire_var_store_get_var_cnt (var_store));
- psppire_sheet_get_attributes (sheet, row, column, &attributes);
-
var = psppire_var_store_get_var (var_store, row);
switch (column)
customEntry =
PSPPIRE_CUSTOM_ENTRY (psppire_sheet_get_entry (sheet));
- if ( var_is_long_string (var))
- g_object_set (customEntry,
- "editable", FALSE,
- NULL);
-
val_labs_dialog_set_target_variable (vs->val_labs_dialog, var);
g_signal_connect_swapped (customEntry,
customEntry =
PSPPIRE_CUSTOM_ENTRY (psppire_sheet_get_entry (sheet));
- if ( var_is_long_string (var))
- g_object_set (customEntry,
- "editable", FALSE,
- NULL);
-
-
vs->missing_val_dialog->pv =
psppire_var_store_get_var (var_store, row);
+ vs->missing_val_dialog->dict = var_store->dict->dict;
+
g_signal_connect_swapped (customEntry,
"clicked",
G_CALLBACK (missing_val_dialog_show),
case PSPPIRE_VAR_STORE_COL_DECIMALS:
case PSPPIRE_VAR_STORE_COL_COLUMNS:
{
- if ( attributes.is_editable)
+ if ( psppire_sheet_model_is_editable (PSPPIRE_SHEET_MODEL(var_store),
+ row, column))
{
gint r_min, r_max;
GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (vs));
- vs->val_labs_dialog = val_labs_dialog_create (GTK_WINDOW (toplevel));
+ vs->val_labs_dialog = val_labs_dialog_create (GTK_WINDOW (toplevel),
+ PSPPIRE_SHEET (vs));
vs->missing_val_dialog = missing_val_dialog_create (GTK_WINDOW (toplevel));
vs->var_type_dialog = var_type_dialog_create (GTK_WINDOW (toplevel));
psppire_var_sheet_new (void)
{
gint i;
- PsppireAxisImpl *ha = psppire_axis_impl_new ();
- PsppireAxisImpl *va = psppire_axis_impl_new ();
+ PsppireAxis *ha = psppire_axis_new ();
+ PsppireAxis *va = psppire_axis_new ();
GtkWidget *w = g_object_new (psppire_var_sheet_get_type (), NULL);
for (i = 0 ; i < 10 ; ++i)
- psppire_axis_impl_append (ha, column_def[i].width);
+ psppire_axis_append (ha, column_def[i].width);
g_object_set (va,
"default-size", 25,