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 559199 - The dialog window resizes too often
The dialog window resizes too often
Status: RESOLVED DUPLICATE of bug 549403
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
Federico Mena Quintero
Depends on:
Blocks:
 
 
Reported: 2008-11-03 22:59 UTC by Jean-Philippe Fleury
Modified: 2008-12-23 01:42 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
Dialog box, screen shot 1 (39.43 KB, image/png)
2008-11-03 23:01 UTC, Jean-Philippe Fleury
  Details
Dialog box, screen shot 2 (96.18 KB, image/png)
2008-11-03 23:02 UTC, Jean-Philippe Fleury
  Details
Dialog box, screen shot 3 (67.55 KB, image/png)
2008-11-03 23:03 UTC, Jean-Philippe Fleury
  Details
Quick-and-dirty workaround to prevent resizing while window is visible (472 bytes, patch)
2008-11-20 19:54 UTC, Andrew Church
none Details | Review

Description Jean-Philippe Fleury 2008-11-03 22:59:45 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.
Comment 1 Jean-Philippe Fleury 2008-11-03 23:01:37 UTC
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.
Comment 2 Jean-Philippe Fleury 2008-11-03 23:02:44 UTC
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.
Comment 3 Jean-Philippe Fleury 2008-11-03 23:03:36 UTC
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.
Comment 4 A. Walton 2008-11-04 01:15:29 UTC
-> GtkFileChooser
Comment 5 Andrew Church 2008-11-20 19:28:37 UTC
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.
Comment 6 Andrew Church 2008-11-20 19:54:53 UTC
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.
Comment 7 Jean-Philippe Fleury 2008-12-08 01:50:09 UTC
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.
Comment 8 Andrew Church 2008-12-08 04:46:01 UTC
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.
Comment 9 Milan Bouchet-Valat 2008-12-22 22:10:31 UTC
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...
Comment 10 Christian Dywan 2008-12-23 01:42:52 UTC

*** This bug has been marked as a duplicate of 549403 ***