After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 131916 - GtkEntryCompletion width should be changable
GtkEntryCompletion width should be changable
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkComboBox
2.3.x
Other Linux
: Normal enhancement
: Small API
Assigned To: gtk-bugs
gtk-bugs
: 127602 (view as bug list)
Depends on:
Blocks: 172453
 
 
Reported: 2004-01-19 12:27 UTC by Ross Burton
Modified: 2005-04-04 05:17 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement



Description Ross Burton 2004-01-19 12:27:00 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.
Comment 1 Matthias Clasen 2004-01-26 08:36:03 UTC
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.
Comment 2 Matthias Clasen 2004-01-26 08:57:01 UTC
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.
Comment 3 Matthias Clasen 2004-01-26 09:01:20 UTC
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.
Comment 4 Matthias Clasen 2004-02-27 11:14:04 UTC
decided to lump entry completion bugs together with combobox bugs.
Comment 5 Matthias Clasen 2004-03-09 08:46:46 UTC
*** Bug 127602 has been marked as a duplicate of this bug. ***
Comment 6 Jonathan Blandford 2005-04-02 21:46:43 UTC
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.
Comment 7 Matthias Clasen 2005-04-04 05:17:01 UTC
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.