[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pspp-cvs] pspp/src/ui/gui var-sheet.c
From: |
John Darrington |
Subject: |
[Pspp-cvs] pspp/src/ui/gui var-sheet.c |
Date: |
Sat, 29 Jul 2006 09:37:19 +0000 |
CVSROOT: /sources/pspp
Module name: pspp
Changes by: John Darrington <jmd> 06/07/29 09:37:19
Modified files:
src/ui/gui : var-sheet.c
Log message:
Made the variable sheet automatically add variables when clickes in a
blank
row.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/var-sheet.c?cvsroot=pspp&r1=1.7&r2=1.8
Patches:
Index: var-sheet.c
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/var-sheet.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- var-sheet.c 4 Jun 2006 08:02:44 -0000 1.7
+++ var-sheet.c 29 Jul 2006 09:37:18 -0000 1.8
@@ -192,13 +192,15 @@
}
/* If the destination cell is outside the current variables, then
- accept the destination only as the name column of the first blank row
+ automatically create variables for the new rows.
*/
- if ( *new_row > n_vars)
- return FALSE;
-
- if ( *new_row >= n_vars && *new_column != COL_NAME)
- return FALSE;
+ if ( (*new_row > n_vars) ||
+ (*new_row == n_vars && *new_column != COL_NAME) )
+ {
+ gint i;
+ for ( i = n_vars ; i <= *new_row; ++i )
+ psppire_dict_insert_variable(var_store->dict, i, NULL);
+ }
return TRUE;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pspp-cvs] pspp/src/ui/gui var-sheet.c,
John Darrington <=