GNOME Bugzilla – Bug 527499
FileFilter combo becames too wide
Last modified: 2010-08-19 23:14:13 UTC
Please describe the problem: When there are a lot of file extension in filter, the width of the combo can make the dialog bigger than the screen. Besides, this dialog can not be resized. Steps to reproduce: 1. Open a FileChooserDialog in a context with a long filter. For example, uploading images to flickr (http://flickr.com/photos/upload/). Actual results: The FileChooserDialog gets bigger than screen. Expected results: The file filter appears partially. For example, ending with dots (...) Does this happen every time? Yes Other information:
Created attachment 109045 [details] Dialog screenshot
Created attachment 111330 [details] a pygtk example demonstrating the bug This can be easily demonstrated using a simple PyGTK+ program.
*** Bug 534329 has been marked as a duplicate of this bug. ***
I see two possible solutions to this problem: 1. change gtkfilechooserdefault.c to use a full model and cell renderers and set text ellipsizing on the GtkComboBox 2. add a property to GtkComboBox to ellipsize text when in text mode. 1. is probably easiest, because it can be pushed out in a point-release of GTK+.
Created attachment 111336 [details] [review] Use an ellipsized cell renderer for the filter combo box.
I just wrote a patch more or less exactly like this, but I don't think it's correct since filters that are a sensible length will now appear in a really big combo box, rather than one that is a useful size. In effect the combo box needs to be set to not expand, but have a size clamp beyond which point it will ellipsize.
> In effect the combo box needs to be set to not expand, but have a size clamp > beyond which point it will ellipsize. That is already solved by extended layout (bug 101968).
I've not yet looked at how to use extended layout yet, is there any documentation on it?
Created attachment 111339 [details] [review] a dodgy patch that pokes around in size-request Ok, this is a dodgy patch that is very similar to 111336, but it doesn't set the combo to expand. It currently uses ::size-request to clamp the requisition width to 400px and set ellipsizing.
Extended layout is not commited to SVN trunk yet ...
I am aware of this, but any solution that lands now should be mindful of a superior solution in the future.
When filter text has been ellipsized, do it possible to has the full text in tool tip balloon ? So user can know what the full text is.
*** Bug 549470 has been marked as a duplicate of this bug. ***
Any updates in this bug?
*** Bug 531654 has been marked as a duplicate of this bug. ***
*** Bug 567782 has been marked as a duplicate of this bug. ***
I saw bug title was changed. I think it is becomes or gets. Sorry.
*** Bug 574482 has been marked as a duplicate of this bug. ***
*** Bug 580208 has been marked as a duplicate of this bug. ***
Can't we just skip showing the file extension and only show this via tooltips? A partial fix would be to only have one of the lowercase / uppercase extensions.
Couldn't there be a simple fix like trimming the text length to an arbitrary number of characters? This bug has been bothering me for quite a while. I've tried to report it before, but once spent one hour trying (unsuccessfully at that time) to identify how the relevant GTK widget was named. (I should have searched bugzilla for "flickr", would have been more efficient.) A partial fix would be better than nothing.
*** Bug 603768 has been marked as a duplicate of this bug. ***
Note, although significant progress has been made in this direction in the native-layout branch; the cell renderer work particularly still needs attention. Combo boxes are tied into cell renderers so to make them behave "naturally" we're going to block on more work on cell renderers...
Now we have height-for-width resizing combo boxes (with their underlying cellviews and renderers and popup menus). Set the combo box to ellipsize, the combo will be allocated the width of the largest item in the file-filter list and start to ellipsize once it spans the entire file list (the dialog will not grow for the sake of the file filter combo).
@Tristan: You are my hero.