gEDA-dev: [PATCH] gschem: remember dialog size and position

Peter Clifton pcjc2 at cam.ac.uk
Tue May 1 19:06:21 EDT 2007


On Tue, 2007-05-01 at 13:01 +0200, Ivan Stankovic wrote:
> On Tue, May 01, 2007 at 11:30:20AM +0100, Peter Clifton wrote:

> > Assuming any people more knowledgeable than myself about best-practise
> > GTK agree that a subclass of GtkDialog is the way to go, I'll write an
> > implementation next week. It shouldn't be very long or complex.
> 
> Great, looking forward to it!

I've had a first stab - the boilerplate is pretty easy, but it turns out
hooking closure of a GtkDialog is deceptively hard to pin down. Looks
like hooking (GtkWidgetClass)->unmap on the dialog works though.

For some reason, I'm not getting "unmap-event" back from GDK, and the
"delete" event seems to get eaten too. (Possibly the dialog is being
destroyed in a response handler called by the first delete event hook.)

Hooking the response handler is possible - but not directly helpful, as
we don't know which response codes result in gschem deciding to close
the dialog.

On the plus side, I spotted some redundant code which manually closes a
dialog on pressing the "ESCAPE" key - which GTK does its-self anyway -
certainly in a late 2.4 GTK.

I'm away from tomorrow, but I'll keep looking when I'm back next week.

-- 
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!)



More information about the geda-dev mailing list