GNOME Bugzilla – Bug 559199
The dialog window resizes too often
Last modified: 2008-12-23 01:42:52 UTC
Please describe the problem: When we have to choose a file, a dialog box appears. This box changes too often its dimensions. Steps to reproduce: 1. For example, in Firefox, go to a web page that has a "Choose file" field. 2. Click on this field. A dialog box appears to allow us to choose a file in our computer. This box first appears in small for a fraction of a second, and then resizes in large to fit with the bottom and the right of the screen. If we choose an image, a panel appears in the right of the box, so all the text of the box moves to the left. Actual results: Just for choosing an image, the dialog box resizes from small to large and then moves to the left. Expected results: The dialog box should be more fixed, for example to appear in large and have a default right panel, although there's no image selected. Does this happen every time? Yes. Other information: I will attach 3 screen shots.
Created attachment 121923 [details] Dialog box, screen shot 1 I click on a "Choose file" field. The dialog box appears in small for a fraction of a second.
Created attachment 121924 [details] Dialog box, screen shot 2 The dialog box then resizes to fit with the bottom and the right of the screen.
Created attachment 121925 [details] Dialog box, screen shot 3 Then, I click on an image. A right panel appears and moves the box to the left.
-> GtkFileChooser
I observe the same behavior in GTK+ 2.14.[34]. This appears to be a 2.14 regression; the GtkFileChooser window displays as expected (with no size changes) in 2.12.12.
Created attachment 123132 [details] [review] Quick-and-dirty workaround to prevent resizing while window is visible While certainly not the "correct" solution, this patch at least prevents the dialog window from resizing while visible (100/100 times on Seamonkey 1.1.13 File/Open) and doesn't seem to break anything from my quick testing (10/10 in testgtk, 10/10 in GIMP 2.4.7), so I offer it as a starting point for those more familiar with the codebase.
Hi Andrew, Thanks for this patch. I try to apply it on Ubuntu 8.10. Here's what I've done: - I downloaded the source: http://archive.ubuntu.com/ubuntu/pool/main/g/gtk+2.0/gtk+2.0_2.14.4.orig.tar.gz - Then I applied the Ubuntu patch: http://archive.ubuntu.com/ubuntu/pool/main/g/gtk+2.0/gtk+2.0_2.14.4-0ubuntu1.diff.gz - Then I applied your patch file-chooser-resize-workaround.diff Now, what I have to do? Do I have to compile all the gtk source? Is there a tutorial on the Gnome's website to explain the steps? I'm not still accustomed with compilation. Thanks.
If the patch applied correctly, then yes, all you should have to do is compile the source. I don't (at a glance) see any information about compilation on the GNOME website, but GTK+ follows the typical "configure; make; make install" process used by many open source programs. It should _probably_ be sufficient to do the following in the top directory of the GTK+ sources: $ ./configure --prefix=/usr $ make $ sudo make install (if you don't have sudo, then run "make install" after su'ing to root) That said, each distribution has its own particular compilation scripts, so it's possible that won't work as expected. It may be possible to do the following: $ chmod +x debian/rules $ sudo debian/rules install but I haven't worked with Debian-style packages recently enough to say for sure whether that'll do the right thing.
This bug is another duplicate of bug 549403, where patches were proposed too. Thanks for your ideas, anyway! Could the reporter make it as duplicate, I'm not allowed to do so...
*** This bug has been marked as a duplicate of 549403 ***