psppire-data-window: Only allow saving a file with at least one variable.
authorBen Pfaff <blp@cs.stanford.edu>
Sun, 25 Nov 2012 05:41:00 +0000 (21:41 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Sun, 25 Nov 2012 05:41:00 +0000 (21:41 -0800)
commitf0eacba971be04bd52971a8a23263d38cde0e661
treef6480e54cf3f7c16446d5d1037fabe89c37c3534
parentc3dd7acbbaca2931e601b6327a39a209f6cc0d9e
psppire-data-window: Only allow saving a file with at least one variable.

A data file with no variables can't be saved to a file.  Until now, this
wasn't detected until the user had already chosen a file name, and the
message used to report it was confusing: "SAVE is allowed only after the
active file has been defined."  With this commit, the menu item and toolbar
item for save operations is, instead, disabled if the file has no
variables.

Bug #30700.
Reported by eric thivant, via Harry Thijssen, with help from Michel
Boaventura.
src/ui/gui/psppire-data-window.c