[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gEDA-dev: GschemDialog finally works!
On Sun, May 27, 2007 at 05:10:32PM +0100, Peter Clifton wrote:
> Ivan, here is a slightly updated patch. I'm away this weekend, so
> haven't got this completed yet. It does remove the #if 0 sections, and
> re-introduces a commented out default size for the page manager. (Still
> useful until the settings are saved.)
Thanks!
> I'm uneasy about the use of "atexit(..)" with regards to portability. It
> seems a little low level for us to be using generally like this.
You shouldn't worry about portability, atexit() is required by C89,
C99 and POSIX standards. The only problem might be if the code using it
is dependent on the order in which other on-exit functions are called,
which is clearly not the case here. I actually think using atexit is
quite elegant as it avoids the need to have yet another global function
that should be called on program exit.
> I'm unsure where the correct place to call from is, but x_window_close()
> or gschem_quit() look like contenders. We could add a close handler
> hooking API for this so that we don't have to explicitly add a
> non-static save_geometry_to_file(..) and call it ourselves.
This is a possibility, but what would be the advantage over atexit?
> There was also the question of emitting our own signals, "save-state"
> and "restore-state" for example, which derived dialogs could use to add
> extra saved data.
At this point I think that is fairly easy to add, however, I currently
have no need for this so it's pretty low on my list of priorities. If
you have the time/need, please just go ahead.
--
Ivan Stankovic, ivan.stankovic@fer.hr
"Protect your digital freedom and privacy, eliminate DRM,
learn more at http://www.defectivebydesign.org/what_is_drm"
_______________________________________________
geda-dev mailing list
geda-dev@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev