Allow dictionary 'var_deleted' callback to examine the deleted var.
authorBen Pfaff <blp@cs.stanford.edu>
Tue, 20 Mar 2012 06:00:05 +0000 (23:00 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Tue, 17 Apr 2012 02:22:16 +0000 (19:22 -0700)
commita46ff9d9503e9db1298c896b5a219e402706eb38
tree86a42a7518d03608cb861e2c4c544fbeb735928b
parent6bd3da8129aab0e13dbac97af88295e1d9e20d9c
Allow dictionary 'var_deleted' callback to examine the deleted var.

The dictionary 'var_deleted' callback is the last chance to look at
a variable as it is getting deleted from a dictionary.  For some of
the information in the variable, it legitimately doesn't make any
sense to get it from the variable itself at this point, e.g. the
index into the dictionary or the case, since it no longer is in
a dictionary.  But for most of it, it's reasonable to get it from
the variable itself, but the callback doesn't provide any way to
do that, because it doesn't pass in the variable, just a dictionary
index that is no longer correct.

This commit changes the 'var_deleted' interface to pass in the
variable plus the information that can no longer be obtained from
the variable itself.  An upcoming change to the GUI will make use
of this.

This commit also adapts all the existing users to the new interface.
src/data/dictionary.c
src/data/dictionary.h
src/ui/gui/marshaller-list
src/ui/gui/psppire-data-editor.c
src/ui/gui/psppire-data-store.c
src/ui/gui/psppire-dict.c
src/ui/gui/psppire-var-store.c