Re: Autocompletion for GtkEntry
- From: Ricardo Fernández Pascual <ric users sourceforge net>
- To: gtk-devel <gtk-devel-list gnome org>
- Cc: Kristian Rietveld <kris gtk org>
- Subject: Re: Autocompletion for GtkEntry
- Date: 09 Oct 2002 16:50:52 +0200
El mar, 08-10-2002 a las 22:43, Kristian Rietveld escribió:
> I didn't read the source, but I did a bit of browsing through the
> document you attached to your mail to gnome-hackers. I have this feeling
> wondering if this completion-thing is suitable for gtk+. I see your
> point that having a general completion-thing would help consistency, but
> I really wonder if such an advanced completion-thing belongs in gtk+.
> It's advanced, big and complex, I wonder how many apps would need such
> an advanced completion feature.
>
If you implement a simple autocompletion functionality in gtk+ that is
not extensible enough for apps like galeon or evolution it will be
useless. The apps that need the complexity are precisely the ones that
will be more benefited by having consistent autocompletion.
Also, this is not really that complex. Specially for the user of the
API. The public api is just:
- one class (EggAtucompletion): really easy to use: you just add
EggCompletionSources to it and pass it to a Egg/GtkEntry.
- one interface (EggAutocompletionSource): easy to implement.
Certainly easier to implement than a GtkTreeModel[1].
- A few extra methods to GtkEntry, to enable autocompletion.
> Note that I don't want to promote my own thing here, but I'm feeling
> that having a small and simple completion-thing would be more suited for
> gtk+. It would be good enough for most gnome apps (including nautilus),
> but not galeon. Completion for internetbrowsers remains difficult and
> very specific IMHO.
The most complex part is the UI, and it belongs to GTK+. The rest may
not be trivial but it is certainly easier.
> 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.
Thanks for your comments, but I think that doing it too simple will be
bad in the long term. GtkList was simpler than GtkCList and that was
simpler than GtkTreeView....
[1]: It would be really easy to create a wrapper class that implements
EggAutocompletionSource iterating thorough the items in a GtkTreeModel,
if you think that GtkTreeModels will be used as completion sources
usually.
--
Ricardo Fernández Pascual
ric users sourceforge net
Murcia. España.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]