psppire-dialog: Add "acceptable" predicate.
authorBen Pfaff <blp@cs.stanford.edu>
Sun, 19 Aug 2012 17:30:36 +0000 (10:30 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Sun, 19 Aug 2012 18:37:35 +0000 (11:37 -0700)
commitc3f06028950f69cd695062fe01a64ba73e164b3e
tree37343aad6a1f09d37bea42c008ca83e704d82e87
parent8de0368d4ec642662fdff99aefc5fbf19ce5afc9
psppire-dialog: Add "acceptable" predicate.

PsppireDialog already has a validity predicate that allows a dialog
to easily disable "OK" and other buttons when the dialog has not
yet been completely filled.  It should usually be obvious to the
user why this is the case.

The upcoming GObjectification of the missing value dialog calls for
a different kind of predicate, one where the reason is not obvious
to the user (typically because he has just made a typo or does not
understand a variable's format).  In this case, the user needs more
feedback, such as a message explaining the problem.

This commit therefore introduces a second kind of predicate, the
"accept" predicate.  This predicate is only checked when the user
clicks on the "OK" button.
src/ui/gui/psppire-buttonbox.c
src/ui/gui/psppire-dialog.c
src/ui/gui/psppire-dialog.h