[CM] Making changes to snd's gui
Guillaume Germain
guillaume at nulko.com
Mon Jul 12 12:11:29 PDT 2004
Kjetil Svalastog Matheussen wrote:
>Guillaume Germain:
>
>
>>[...]
>>
>>
>
>It should be quite easy to do this in scheme. Take a look at the
>mark and selection handling code I have made in gui.scm and
>snd_conffile.scm.
>
>Something like this could be a start:
>
>[...]
>
Thanks a lot for your suggestions and pointers. This is really helping
me to get started.
I've hit a few small snags trying to make 'snd_conffile.scm' works. I
have what I think is the latest version (July 12th), and compiled with
"./configure --with-gtk". The first problem was that Guile reported
'gtk_widget_get_name' to be undefined. I've traced that problem back to
the 'xg' module loading code, present in a few files ('gui.scm',
'gtk-popup.scm', 'snd-gtk.scm', ...), where xm.so is loaded instead of
xg.so:
(if (not (provided? 'xg))
(let ((hxm (dlopen "xm.so"))) ;; Should be xg.so ?
(if (string? hxm)
(snd-error (format #f "snd-gtk.scm needs the xg module: ~A" hxm))
(dlinit hxm "init_xm"))))
The next small problem was in the "-notebook" part of the
snd_conffile.scm around line 1500, (list-ref (main-widgets) 5) is #f for
me so a type error is signaled by string=?, a simple check was enough to
make it load the file succesfully:
(if (or (not use-gtk)
(let ((w (list-ref (main-widgets) 5)))
(and (string? w) (not (string=? "GtkNotebook"
(gtk_widget_get_name w))))))
...)
I found loading "snd_conffile.scm" to be very illustrative of the power
of snd, and I'd like to take that opportunity to thank all those who
contributed to make that great piece of software.
Guillaume
More information about the Cmdist
mailing list