X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-var-sheet.c;h=dcec70bd3af7015418adbdda45abfe8779e97548;hb=37d5f592081a2ec8fa461c20c84087e8bf5dc560;hp=3ebea2ea182a23b2e0dab2324127f434b42555d7;hpb=04d2c99833753252b724dd9d4f15cc3a80b6bec8;p=pspp diff --git a/src/ui/gui/psppire-var-sheet.c b/src/ui/gui/psppire-var-sheet.c index 3ebea2ea18..dcec70bd3a 100644 --- a/src/ui/gui/psppire-var-sheet.c +++ b/src/ui/gui/psppire-var-sheet.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2008, 2009 Free Software Foundation, Inc. + Copyright (C) 2008, 2009, 2011 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 @@ -251,6 +251,9 @@ traverse_cell_callback (PsppireSheet *sheet, 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; @@ -260,10 +263,10 @@ traverse_cell_callback (PsppireSheet *sheet, 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->dictionary, name, TRUE)) return TRUE; - psppire_dict_insert_variable (var_store->dict, existing_cell->row, name); + psppire_dict_insert_variable (var_store->dictionary, existing_cell->row, name); return FALSE; } @@ -278,7 +281,7 @@ traverse_cell_callback (PsppireSheet *sheet, { 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->dictionary, i, NULL); } return FALSE; @@ -428,7 +431,7 @@ var_sheet_change_active_cell (PsppireVarSheet *vs, const gint current_value = g_strtod (s, NULL); GtkObject *adj ; - const struct fmt_spec *fmt = var_get_write_format (var); + const struct fmt_spec *fmt = var_get_print_format (var); switch (column) { case PSPPIRE_VAR_STORE_COL_WIDTH: @@ -448,9 +451,9 @@ var_sheet_change_active_cell (PsppireVarSheet *vs, } 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); @@ -478,8 +481,8 @@ 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), - PSPPIRE_SHEET (vs)); + vs->val_labs_dialog = val_labs_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));