On Tue, 2008-09-30 at 19:47 +0200, Stefan Salewski wrote: > pcb version 20080202 (GTK) > > Program writes preferences file (size of main window ...) to > ~/.pcb/preferences when program is terminated by clicking on cross at > right upper corner of window, but not if program is terminated by > File/QuitProgram. > > Maybe this is an old/known/minor bug, but it was new and confusing to > me.
Not sure how to fix this one. Since the HID asks the core to quit, and the core just does a rather unfriendly exit(0), nothing gets saved. The save only happens when the GUI quits (or perhaps - prompts to quit) as a result of pushing the "X" button. I thought it might be possible to move the config save handler from the "delete" event handler (The WM's "X" button), to the destroy handler of the window - but it looks rather like a progmatic shutdown will never get to that handler - PCB just quits unceremoniously. Options: Catch all paths where the GUI asks the core to quit. Add a HID function HID->quit, to do the final death - in the GTK case, that would be by calling gtk_main_quit(). Install an atexit() handler. Seems a little low level for this functionality though. Can we override the "Quit" action as a GUI action - then call back into the core's "Quit" action? -- Peter Clifton Electrical Engineering Division, Engineering Department, University of Cambridge, 9, JJ Thomson Avenue, Cambridge CB3 0FA Tel: +44 (0)7729 980173 - (No signal in the lab!) _______________________________________________ geda-user mailing list [email protected] http://www.seul.org/cgi-bin/mailman/listinfo/geda-user

