gEDA-dev: [PATCH] gschem: remember dialog size and position
Ivan Stankovic
ivan.stankovic at fer.hr
Tue May 1 05:16:00 EDT 2007
On Mon, Apr 30, 2007 at 10:29:39PM +0100, Peter Clifton wrote:
> I'd not inline the functions - they don't appear to be called in a
> performance critical path. Also, they might be useful outside the
> x_dialog.c code?
Perhaps, I didn't spend much time thinking of it.
The functions are only inlined if glib is older that 2.6.0 in which
case there's no point in wasting either time or space.
> I'm being lazy here.. do all the dialogs come via x_dialog.c? I thought
> the component selector at least sub-classed GtkDialog internally.
Well, I only looked at x_dialog.c so the component selector and a few
other dialogs are unaffected.
> Perhaps we could sub-class GtkDialog, to "GschemDialog" or "GedaDialog",
> which adds the size save/restore functionality, then sub-class
> "GSCHEM_TYPE_DIALOG" or "GEDA_TYPE_DIALOG", catching appropriate events
> to make it happen auto-magically for the whole app.
>
> Again, this is a way to make things auto-magically work for many cases
> without having to explicitly add hooks to every dialog.
Yes, this is the way to go. However, I have no desire to dive into the
glib object system. If you (or anyone else) could come up with a GschemDialog
or GedaDialog, I would be very happy to modify all of x_dialog.c to use
that. In this light, I see my patch only as a temporary solution, something
that's usable until we get our own dialog widget that will handle all
resizing and positioning automatically.
> We'd want the functionality for the main window probably too, so I guess
> you can just call the same set size hooks on that manually.
Sure. Thanks for the comments!
--
Ivan Stankovic, ivan.stankovic at fer.hr
"Protect your digital freedom and privacy, eliminate DRM,
learn more at http://www.defectivebydesign.org/what_is_drm"
More information about the geda-dev
mailing list