Ales Hvezda wrote:
Hi Dan,
[snip]
This a question for those with better knowledge of gschem internals.
I see where system-gschemrc defines all of the menus, but what I'm
wondering is if it is possible to write a callback entirely within
scheme. In other words I want to have my gschemrc load my own scheme
file which will have something like:
(add-menu "MyMenu" my:menu-items)
but I want to write the my-about, my-manual, my-menuitem actions in
scheme.
Anyone know if this is possible with the current gschem or what it might
take to be able to do this?
[snip]
This should be quite possible. Are you having trouble with
your implementation? I looked at the diffs, I didn't see anything
glaring wrong (just a quick quick quick look).
Its just that I can't figure out how to have the menu action execute
scheme code :) Do you mean this is possible with the current gschem
code or it should be possible to add this capability?
I'm thinking it might be useful to link in with guile-gtk too so users
could hook in gui stuff into their own menu choices.
Any suggestions?
This might be tricky with guile-gtk. I don't know what state these
bindings are in. The last time I looked guile-gtk was only for gtk+ 1.2.x.
However, it looks like guile-gnome might be more current. I would hate
to introduce a forced dependancy on gnome.
ick. Don't worry, I have zero desire to have gnome as a requirement.
Whenever I come across some package which needs gnome, I pretty much
just move along. On my aging solaris box thats just too much.
Neat. I'm all of this if it can be contained and doesn't
introduce too many forced dependancies. That might turn out to be tricky.
I was hoping there would be no extra dependency incurred. Now that I
look at it, it appears that you're correct. guile-gtk is only for
gtk-1.2 and guile-gnome seems to be pretty old too. Since I really
don't need all of gtk, I'm wondering if I could just provide access to
the few things of importance. In other words, if I had scheme access to
a file select dialog box, and a message dialog box, I _think_ thats
about all I'd need/want. While that would mean touching the core of
gschem, those features would be pretty generic.
-Dan