X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-var-sheet.c;h=9ad915157146e6f7cac9efc667d59670e5c64ecd;hb=c5bf90ff8baa7a81274421acb24a915c953e560f;hp=256f3c93930a66dcbaf849ed2234f306414ad81b;hpb=bfcde1ce3ccb59f9203ae7e6b7ad7cadc6b06306;p=pspp-builds.git diff --git a/src/ui/gui/psppire-var-sheet.c b/src/ui/gui/psppire-var-sheet.c index 256f3c93..9ad91515 100644 --- a/src/ui/gui/psppire-var-sheet.c +++ b/src/ui/gui/psppire-var-sheet.c @@ -251,12 +251,12 @@ change_measure (GtkComboBox *cb, } - +/* Moves the focus to a new cell. + Returns TRUE iff the move should be disallowed */ static gboolean traverse_cell_callback (GtkSheet *sheet, gint row, gint column, - gint *new_row, gint *new_column - ) + gint *new_row, gint *new_column) { PsppireVarSheet *var_sheet = PSPPIRE_VAR_SHEET (sheet); PsppireVarStore *var_store = PSPPIRE_VAR_STORE (gtk_sheet_get_model (sheet)); @@ -264,7 +264,7 @@ traverse_cell_callback (GtkSheet *sheet, gint n_vars = psppire_var_store_get_var_cnt (var_store); if (*new_row >= n_vars && !var_sheet->may_create_vars) - return FALSE; + return TRUE; if ( row == n_vars && *new_row >= n_vars) { @@ -273,11 +273,11 @@ traverse_cell_callback (GtkSheet *sheet, const gchar *name = gtk_entry_get_text (entry); if (! psppire_dict_check_name (var_store->dict, name, TRUE)) - return FALSE; + return TRUE; psppire_dict_insert_variable (var_store->dict, row, name); - return TRUE; + return FALSE; } /* If the destination cell is outside the current variables, then @@ -291,12 +291,11 @@ traverse_cell_callback (GtkSheet *sheet, psppire_dict_insert_variable (var_store->dict, i, NULL); } - return TRUE; + return FALSE; } - /* Callback whenever the pointer leaves a cell on the var sheet. */