[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gEDA: Attributes



On Tue, 18 Apr 2000, Ales Hvezda wrote:

> thinking about the pulldown menus over the past few months.  I would
> like to put the hotkeystrokes into the menus.  That would unfortunately
> require a slight rewrite of the pulldown code, but while I'm doing that,
> I would also like a way to configure what goes into the pulldowns via
> scheme.  Now I could come up with something that's not coupled to the
> current keymapping scheme code, but I would rather not have two different
> decoupled ways of specifying keymaps/functions.  Any ideas on how this
> could be done (nicely)?

In my experimental version of gwave, I made menus configurable from guile
by evicting the entire menu-building code out of C and into scheme, and
using guile-gtk to build the menus themselves.  Constructing Gtk+ menus is
much easier when you build a few little helper function anyway (whether in
C or guile), so I would imagine that a suitable guile function could
construct and attach a menu item, and also bind a keystroke to the same
action procedure. 

This also forced me to go through and make sure that all primitives I
wanted accessible from menus were exported to guile.  The only remnant of
menus in my C code is the creation of an empty Gtk+ menu bar in each
window. 

And speaking of gwave, my day job is showing signs of easing up to just
the normal level of chaos shortly, so I hope to release a new version of
the waveform viewer sometime soon.

 Steve

-- 
Steve Tell | tell@cs.unc.edu | http://www.cs.unc.edu/~tell | KF4ZPF
On Leave from UNC working at Chip2Chip, Inc.  tell@chip2chip.com/919-929-0991