GNOME Bugzilla – Bug 131916
GtkEntryCompletion width should be changable
Last modified: 2005-04-04 05:17:01 UTC
I've written an applet which uses GtkEntryCompletion to perform autocompletion on names against the evolution addressbook. However, the completion drop-down is the width of the applet, which is a little too small for showing an entire name. My use case is the user only types in three characters from a name, thus needs a small entry, but the completion shows the full name, thus should be large. I think a new method should be added: gtk_entry_completion_set_width_behaviour(int) which takes either -1 (size of parent, current behavior), 0 (autosize based on content) or >=1 (fixed size). I had a quick hack on this but was hitting strange size request issues with multiple uses of the completion, so advise would be great.
I've just tested the behaviour of IE on Windows, and it seems to never make the dropdown smaller than the entry, but has a minimal size for the dropdown, so that the dropdown will be larger than the entry when the entry gets very small.
On windows you can also find completion dropdowns (eg in the search pane of the windows explorer) which have a resize handle in the lower left corner and are resizable.
My first comment above was wrong, the completion dropdown of the location entry in IE will come up smaller than the entry occasionally, it looks as if it always comes up large enough to fit the content.
decided to lump entry completion bugs together with combobox bugs.
*** Bug 127602 has been marked as a duplicate of this bug. ***
I ran into this in evince (see bug #172453 for what we want to do.) I'd like to see this go in too. It might be nice to set the width in terms of width chars, like the entry currently does, as pixels aren't really what we want.
2005-04-04 Matthias Clasen <mclasen@redhat.com> Allow completion popups to be wider than the entry. (#131916, Ross Burton) * gtk/gtkentrycompletion.[hc]: Add a boolean popup-set-width property. * gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup): Don't force the popup to have the same width as the entry if popup-set-width is FALSE. * gtk/gtk.symbols: Add new functions.