projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gui: Fix temporary filtering by a variable's value.
[pspp]
/
src
/
ui
/
gui
/
psppire-var-sheet.c
diff --git
a/src/ui/gui/psppire-var-sheet.c
b/src/ui/gui/psppire-var-sheet.c
index c0d0059bd7b0a371fd51ba33aa47b30a44d1a95f..48f34f6d03f9ae7211b3bb63d95cecfe923ca011 100644
(file)
--- a/
src/ui/gui/psppire-var-sheet.c
+++ b/
src/ui/gui/psppire-var-sheet.c
@@
-251,6
+251,9
@@
traverse_cell_callback (PsppireSheet *sheet,
gint n_vars = psppire_var_store_get_var_cnt (var_store);
gint n_vars = psppire_var_store_get_var_cnt (var_store);
+ if (new_cell->col >= PSPPIRE_VAR_STORE_n_COLS)
+ return TRUE;
+
if (new_cell->row >= n_vars && !var_sheet->may_create_vars)
return TRUE;
if (new_cell->row >= n_vars && !var_sheet->may_create_vars)
return TRUE;
@@
-260,10
+263,10
@@
traverse_cell_callback (PsppireSheet *sheet,
const gchar *name = gtk_entry_get_text (entry);
const gchar *name = gtk_entry_get_text (entry);
- if (! psppire_dict_check_name (var_store->dict, name, TRUE))
+ if (! psppire_dict_check_name (var_store->dict
ionary
, name, TRUE))
return TRUE;
return TRUE;
- psppire_dict_insert_variable (var_store->dict, existing_cell->row, name);
+ psppire_dict_insert_variable (var_store->dict
ionary
, existing_cell->row, name);
return FALSE;
}
return FALSE;
}
@@
-278,7
+281,7
@@
traverse_cell_callback (PsppireSheet *sheet,
{
gint i;
for ( i = n_vars ; i <= new_cell->row; ++i )
{
gint i;
for ( i = n_vars ; i <= new_cell->row; ++i )
- psppire_dict_insert_variable (var_store->dict, i, NULL);
+ psppire_dict_insert_variable (var_store->dict
ionary
, i, NULL);
}
return FALSE;
}
return FALSE;
@@
-384,7
+387,7
@@
var_sheet_change_active_cell (PsppireVarSheet *vs,
vs->missing_val_dialog->pv =
psppire_var_store_get_var (var_store, row);
vs->missing_val_dialog->pv =
psppire_var_store_get_var (var_store, row);
- vs->missing_val_dialog->dict = var_store->dict
->dict
;
+ vs->missing_val_dialog->dict = var_store->dict
ionary
;
g_signal_connect_swapped (customEntry,
"clicked",
g_signal_connect_swapped (customEntry,
"clicked",
@@
-450,9
+453,9
@@
var_sheet_change_active_cell (PsppireVarSheet *vs,
}
adj = gtk_adjustment_new (current_value,
}
adj = gtk_adjustment_new (current_value,
- r_min, r_max,
-
1.0, 1.0, 1.0
/* steps */
- );
+
r_min, r_max,
+
1.0, 1.0,
/* steps */
+
0
);
psppire_sheet_change_entry (sheet, GTK_TYPE_SPIN_BUTTON);
psppire_sheet_change_entry (sheet, GTK_TYPE_SPIN_BUTTON);
@@
-481,9
+484,11
@@
psppire_var_sheet_realize (GtkWidget *w)
GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (vs));
vs->val_labs_dialog = val_labs_dialog_create (GTK_WINDOW (toplevel),
GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (vs));
vs->val_labs_dialog = val_labs_dialog_create (GTK_WINDOW (toplevel),
- PSPPIRE_SHEET (vs));
+ PSPPIRE_VAR_STORE (psppire_sheet_get_model (PSPPIRE_SHEET (vs))));
+
vs->missing_val_dialog = missing_val_dialog_create (GTK_WINDOW (toplevel));
vs->missing_val_dialog = missing_val_dialog_create (GTK_WINDOW (toplevel));
- vs->var_type_dialog = var_type_dialog_create (GTK_WINDOW (toplevel));
+ vs->var_type_dialog = var_type_dialog_create (GTK_WINDOW (toplevel),
+ PSPPIRE_VAR_STORE (psppire_sheet_get_model (PSPPIRE_SHEET (vs))));
/* Chain up to the parent class */
GTK_WIDGET_CLASS (parent_class)->realize (w);
/* Chain up to the parent class */
GTK_WIDGET_CLASS (parent_class)->realize (w);