gui: Save positions of windows only when they are closed.
When windows in the GUI are moved around the desktop or resized, the
machine's disk can thrash madly in some setups. This is because each
change in a window's position or size triggers a write to the PSPPIRE
preferences file noting the new position as a default for the next
PSPPIRE run. It wasn't always a problem, but newer Glib versions call
fsync() from g_file_set_contents(), the function used to write the
preferences file, which bypasses the OS cache and forces a synchronous
disk write.
This commit makes PSPPIRE update the preferences file only when a window
is closed, which fixes the problem. Avoiding g_file_set_contents() would
be another reasonable solution.
Reported by Grzegorz Artur Daszuta <crefff@gmail.com>.