Re: GtkComboBox design issues



On Thu, 16 Nov 2000, Kristian Rietveld wrote:

> Hi All!
> 
> I'm still hacking on the new combobox and I've got a few design-issues. I
> need some help chosing the correct option... :).
> 
> 1. The GtkComboBoxText now uses the 'standard' GtkTreeModel. I think this
> isn't the right one, and it should use ListStore or the new TreeModelSort
> instead. But which one? Do we want sorting or not?

Well, GtkTreeModelSort is not a storage model (that is, it doesn't store
the values of the list).  Instead, it acts as a filter for the content of
some other model.  So you almost definitely want to use GtkListStore
(unless it makes sense to have a combo box with a tree
structure?).  Adding sorting capabilities is just a matter of putting a
GtkTreeModelSort between your GtkListStore and GtkTreeView.  I would
expect that that this sort of change would only result in the addition of
an API, rather than breakage of what you already have.

> 
> 2. Owen told about the issue of duplicates in his mail of Oct 26. I think
> this problem only applies to the GtkComboBoxText. Having the same
> GtkWidget on the grid of the GtkComboBoxGrid twice isn't possible. But the
> question is: Do we want duplicates or not? Do we want an option to switch
> the allowance of duplicates on/off?

Given that there will probably be situations where someone wants
duplicates, if the combo box doesn't support it, then they will have to do
some weird hack to get the behaviour they desire.

> 
> 3. Which kind of {tab,auto}completion do we want in the
> GtkComboBoxText? It now has tabcompletion when typing and it'll try to
> autocomplete if the user presses enter.

If you decide on the form of completion found in most web browsers these
days, please do it similarly to mozilla, and put in a delay before
performing the completion.  It is really annoying to type in the exact
string you want and press enter, only to find that the program has
appended something extra onto the end.

James.





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