This is the mail archive of the guile-gtk@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gtk-clist-append does not work with shared substrings


Marius Vollmer <mvo@zagadka.ping.de> writes:

> "Greg J. Badros" <gjb@cs.washington.edu> writes:
> 
> > > My current thinking is to convert a composite of mode `in' by copying
> > > it, and one of mode `out' or `inout' by modifying it in place.  Any
> > > thoughts about this?
> > 
> > I've never achieved a deep understanding of the guile-gtk interface
> > description stuff, but my naive take on this stuff is that that would be 
> > sufficient.  You definitely don't want to side-effect an in parameter. 
> 
> Ok, I have now checked in some code for this (also some bug fixes).
> Can you give it a try?  I didn't really test it.

Just tried, and it succeeds with my simple test case:

#!/usr/bin/guile -s 
!#
(use-modules (gtk gtk))

(define w (gtk-window-new 'dialog))
(define clist (gtk-clist-new-with-titles (list "first" "second")))
(define vbox (gtk-vbox-new #f 5))
(gtk-box-pack-start vbox clist)
(gtk-container-add w vbox)
(gtk-clist-append clist (list "foo" "bar"))
(gtk-clist-append clist (list (make-shared-substring "foo") "bar"))
(gtk-widget-show-all w)
(gtk-standalone-main w)


Thanks!

Greg

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]