Re: combobox 01122001



On 18 Jan 2001, Havoc Pennington wrote:
> Kristian Rietveld <kristian planet nl> writes:
> >
> > I updated my CVS gtk+ today, and it broke the GtkComboBox. So I fixed
> > those issues and here's a new snapshot. It should now compile properly
> > against the current HEAD branch.
>
> Heh, it broke again. ;-)

It still compiles here with a CVS checkout of Jan 19.

>
> Some comments anyhow. Sorry to take so long to respond; really
> busy. :-(
>
> For these "select" signals:
>
>   void  (*select)        (GtkComboBoxText   *cboxtext,
> 			  const gchar       *string);
>
> I think it's better to be consistent with OptionMenu and Entry, and
> just have "changed" with no arguments. Then people call get_selected()
> to get the current text.

Ok, changed.

>
> What is the autocompleted signal used for? I'm not sure of its
> purpose:
>
>   void  (*autocompleted) (GtkComboBoxText   *cboxtext,
> 			  const gchar       *string);

Oops, forgot to remove this signal when I was removing the autocomplete
code from the ComboBoxText. It's gone now.

>
> I feel like we probably already discussed it, but I'm still in the
> dark what this function is for:
>
> void       gtk_combo_box_text_remove_matches       (GtkComboBoxText   *cboxtext,
> 						    const gchar       *pattern);
>
> I have a feeling if I looked in the archives I'd see a rationale. ;-)

It has been a part of the autocompletion code. During the removal of the
autocompletion code I thought that this function could be useful. Because
it is able to remove every item in the list that matches a given pattern
on a easy way...

>
> [snip]
>
> Some thoughts:
>
> [snip]
>
> One issue is that we probably can't implement the autocompletion
> feature on GtkEntry by 2.0. It's a pretty complex/tricky UI. Maybe we
> could, but it will be tough.  That would render ComboBoxText kind of
> lame, with just history and no completion, I would guess.
>
> Perhaps we could do 2.0 autocompletion in a relatively stupid way
> instead of the spiffier way newer web browsers are using, and change
> it later. e.g. it could just be tab completion for now and become real
> autocompletion later, or it could use the cheesy
> select-the-autocompleted-part hack.

I think this is the best option for now. I'm now working on some code to
add the autocompletion and history stuff on a easy and
not-so-beautiful-way. Still experimenting with it, I'll post some details
when it starts to work ...

>
> Anyhow, I think our options are:
>
>  - put your current work in 2.0 very soon, implement very
>    simple autocomplete in GtkEntry, and consider
>    nicer autocomplete plus a GtkOptionMenu replacement in the
>    future

Ok.

>
>  - Consider stripping ComboBox base class and ComboBoxGrid,
>    then having only ComboBoxText and a snazzed-up option menu
>    with grid layout and ability to look combo-like; probably
>    pushes us into the 2.2 timeframe
>
>  - Postpone decision to 2.2, possibly doing the nicer autocomplete
>    for 2.2 before we put in the new widgets
>

I think it will be better to create a new widget which does everything the
ComboBox/Entry/OptionMenu did than building upon the old code. But we'll
see by the time the 2.1 branch is created.


	Kris

-- 
Bus error -- please leave by the rear door.
	(taken from fortune-mode-1.0-11)










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