GNOME Bugzilla – Bug 756353
Support entry tags
Last modified: 2018-05-02 16:46:42 UTC
libgd has a popular GtkEntry subclass (GdTaggedEntry) that allows for adding tags to it. It is desirable to have that supported in GTK proper. One current limitation of GtkEntry is that, since it's not a GtkContainer, it can't have child widgets. That means that in the current implementation tags are not widgets. I am not sure this is a limitation that can be fixed before GTK 4; in such case I would propose that we use the current implementation for the time being.
Benjamin, I am interested on working on this, but Matthias mentioned you might have plans to deprecate GtkContainer and give any widget the ability to have children. Since that might impact this feature, let me know your thoughts.
With GdTaggedEntry being as widely used as it is now, I don't think we should wait until GTK+ 4 with this.
My idea was to just make it into a composite widget with an hbox with entry + button + button + ... and the right CSS machinery to make it look like a tagged entry. There's some challenges there though: - API of the tagged entry: Do we need/want to duplicate all of the entry APIs? - focus - convincing the theme to style the outer widget with the entry borders instead of the entry But I don't think my goal of making GtkWidget into a container is relevant here because I'm really uneasy about subclassing GtkEntry. Every time we do that (think spinbutton) we create a lot of implicit assumptions on what we can get away with and poke in stuff that should be internal to the entry widget.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/577.