Re: entry completion

Espen S Johnsen <[email protected]> 17 Oct 2007 20:28:45 +0200
Newsgroups gmane.lisp.clg.devel
Message-ID <[email protected]>
"Walter C. Pelissero" <[email protected]> writes:

> Is it just me or entry completions don't work quite right?
> 
> I've tried this code but the drop-down I get is tiny and apparently
> empty.  You can select a completion, but it's more or less a blind
> action as you can't read them.
> 
> (defun test-completion ()
>   (let ((window (make-instance 'window))
> 	(entry (make-instance 'entry))
> 	(store (make-instance 'list-store :column-types '(string)))
> 	(completion (make-instance 'entry-completion)))
>     (dolist (string '("foo" "bar" "foobar"))
>       (list-store-append store (vector string)))
>     (setf (entry-completion-text-column completion) 0)
>     (setf (entry-completion-model completion) store)
>     (setf (entry-completion entry) completion)
>     (container-add window entry)
>     (widget-show-all window)))
> 
> I know this is not the most elegant way to write a completed entry but
> I wanted it too look as close as possible to the C equivalent (which
> works):

Hi,

I finally cracked this one, which turned out to be a bug in Gtk it
self. Setting the text column through the GObject property mechanism,
which clg used, didn't add a cell renderer to the tree view in the drop
down box. The C code which called the setter function directly, worked
as expected. I've checked in a fixed for it and also applied the patches
you supplied some time ago.

-- 
Espen

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/