gEDA-dev: GschemDialog (work in progress)

Peter Clifton pcjc2 at cam.ac.uk
Tue May 8 13:49:22 EDT 2007


Hi all,

I thought I'd post a work-in-progress patch of an attempt at
GschemDialog. For demonstration of added functionality, this also Ivan's
code to save and restore dialog positions.

(I hacked on it during a couple of flights when I was away last week.)

A few points:

1. It might be best to drop the "toplevel" property, as not all gschem
   dialogs need it.

2. A better interface might be to define signals, "state-save" and
   "state-restore" which are emitted appropriately on map and unmap.

   These signals would have the benefit of abstracting the necessity to
   chain up the mapping code, and allow dialogs to more easily overload 
   and chain the signal handler, (or hook it with g_signal_connect).

   Ivan: I've not thought hard about the practicalities, but how easy is
         it to pass a suitable pointer / object with the GKeyFile and
         name straight into the signal handler?

3. Standard GTK dialogs don't gain the extra functionality by default,
   meaning the attached patch doesn't affect the file dialogs. Whether
   or not that is a problem is debatable. I don't think GTK does too 
   badly in positioning and opening its standard dialog windows.

   If we want to save their state, we could just hook up the settings 
   code as in Ivan's original patch.

4. I copy-pasted (then modified) some internal glue code from GTK+-2.4,
   so we can use a variant of gtk_dialog_new_with_buttons(),
   gschem_dialog_new_with_buttons().


As always, comments and criticisms are most welcome.

Regards,

-- 
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!)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: save_state.diff
Type: text/x-patch
Size: 59037 bytes
Desc: not available
Url : http://www.seul.org/pipermail/geda-dev/attachments/20070508/4b287032/save_state-0001.bin


More information about the geda-dev mailing list