Re: [PATCH]: gobject: also loop args after #:gsignal. Fixes multiple signals per class.
Mark H Weaver <[email protected]> Tue, 09 Apr 2013 01:51:15 -0400
| Newsgroups | gmane.lisp.guile.user,gmane.lisp.guile.gtk |
|---|---|
| Message-ID | <[email protected]> |
Hi Jan, Jan Nieuwenhuizen <[email protected]> writes: > I suggest these patches. Until then, I'm using inheritance and define > one signal per class. [...] > diff --git a/glib/gnome/gobject/gobject.scm b/glib/gnome/gobject/gobject.scm > index 3e5f07d..ad6abed 100644 > --- a/glib/gnome/gobject/gobject.scm > +++ b/glib/gnome/gobject/gobject.scm > @@ -131,7 +131,7 @@ > (define (install-signals!) > ;; We parse a #:gsignal initialization argument to install signals. > (let loop ((args initargs)) > - (if (not (null? args)) > + (when (not (null? args)) > (if (eq? (car args) #:gsignal) > (let ((signal (cadr args))) > (if (not (and (list? signal) (>= (length signal) 2))) > @@ -142,8 +142,8 @@ > (generic (gtype-class-create-signal class name return-type param-types))) > ;; Some magic to define the generic > (module-define! (current-module) > - (generic-function-name generic) generic))) > - (loop (cddr args)))))) > + (generic-function-name generic) generic)))) > + (loop (cddr args))))) Looks good to me. I just pushed a similar patch to guile-gnome git. However, I avoided 'when' because we are still supporting Guile 1.8.x. Thanks! Mark