Re: Autocompletion for GtkEntry



Havoc Pennington <hp redhat com> writes:
> Kristian Rietveld <kris gtk org> writes: 
> > So this is just how I feel about it, I know that I don't have any real
> > arguments. But I would love to know how others think about this.
> > 
> 
> I think it'd be useful to better define what you mean by complex and
> simple:
> 
>  - what are the use cases we have in mind (file selector, Galeon,
>    nautilus ?)
>  - which use cases are supported by the complex version
>  - which are supported by the simple version
> 
> In short, what are we giving up in the simple version, and is it
> important.
> 

Another way to sort this out might be:

 - what are the minimal hooks needed for GtkEntry to make it possible
   for nautilus/galeon to use its native autocompletion in the
   location bar?

i.e. is the EggCompletionFunc enough of a hook?

Naively I'd say you need to be able to:

 - tell GtkEntry the currently-active completion

 - tell GtkEntry the list of possible completions to show in the
   dropdown

 - if you want the "show titles" feature, a way to pass that in

That's all the core API it seems like we need. Most of the work is in
implementing the UI part (the dropdown, etc.)

After this API, we could also consider convenience API such as doing
completions from a tree model, or the EggAutocompletion object, or
whatever, but that's all extras. The core API is just the
callback-driven hook in GtkEntry. Right?

Havoc



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]