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 558776 - Filechooser size sometimes too small
Filechooser size sometimes too small
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
2.14.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
Federico Mena Quintero
: 551209 566619 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-11-01 10:23 UTC by rom
Modified: 2009-06-03 12:53 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
Screenshot for Bug #558776 (32.74 KB, image/png)
2008-11-23 16:54 UTC, Can Berk Güder
Details

Description rom 2008-11-01 10:23:32 UTC
Please describe the problem:
Quite randomly, sometimes the default size of a filechooser (in many gtk programs) is unusable :
http://uploads.imagup.com/06/1225544214_screenshot1.png

I have this problem very often since gnome 2.24 (I don't remember I had this problem in gnome 2.22, so I think it's a regression).

Steps to reproduce:
1. open a filechooser...
2. 
3. 


Actual results:
http://uploads.imagup.com/06/1225544214_screenshot1.png
(too small)

Expected results:
have usable dimensions

Does this happen every time?
no (but often)

Other information:
Comment 1 Pedro Villavicencio 2008-11-17 19:44:23 UTC
also reported on ubuntu here:

https://bugs.edge.launchpad.net/ubuntu/+source/gtk+2.0/+bug/285285
Comment 2 Can Berk Güder 2008-11-23 16:54:37 UTC
Created attachment 123270 [details]
Screenshot for Bug #558776
Comment 3 Can Berk Güder 2008-11-23 16:55:30 UTC
Comment on attachment 123270 [details]
Screenshot for Bug #558776

I confirm this bug. See attached screenshot.
Comment 4 Baptiste Mille-Mathias 2009-01-05 13:14:02 UTC
*** Bug 566619 has been marked as a duplicate of this bug. ***
Comment 5 Federico Mena Quintero 2009-01-14 20:29:55 UTC
Fixed in trunk (see commits 22116, 22117, 22118, 22119):

2009-01-14  Federico Mena Quintero  <federico@novell.com>

	Remember the file chooser's geometry across invocations.

	* gtk/gtkfilechoosersettings.h (struct _GtkFileChooserSettings):
	New fields geometry_x, geometry_y, geometry_width, geometry_height.
	(_gtk_file_chooser_settings_get_geometry): New prototype.
	(_gtk_file_chooser_settings_set_geometry): New prototype.

	* gtk/gtkfilechoosersettings.c (GEOMETRY_X_KEY, GEOMETRY_Y_KEY,
	GEOMETRY_WIDTH_KEY, GEOMETRY_HEIGTH_KEY): New key names.
	(ensure_settings_read): Read the geometry keys.
	(_gtk_file_chooser_settings_save): Save the geometry keys.
	(_gtk_file_chooser_settings_init): Initialize the geometry keys to
	"don't have this value".
	(_gtk_file_chooser_settings_get_geometry): New public function.
	(_gtk_file_chooser_settings_set_geometry): New public function.

	* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_map):
	Don't change the default size in ::map() so we don't flicker...
	(gtk_file_chooser_default_realize): ... so do it in ::realize()
	instead, when the window is not yet visible.  This avoids a
	dialog-that-resizes when you first pop up the file chooser.
	(emit_default_size_changed): Just emit the signal; don't check for
	the widget's state so we can be emitted during the initial
	::realize() when we are not mapped yet.
	(update_preview_widget_visibility): Only emit default_size_changed
	if the widget is not mapped, to avoid resizing the dialog while it
	is visible.

	* gtk/gtkfilechooserdialog.c
	(file_chooser_widget_default_size_changed): Simply resize the
	dialog to the default size without any fancy clamping.  Also,
	leave in place ifdef-ed out code to restore the file chooser's
	position in addition to its size.  The code to restore the
	position doesn't quite work yet, but we'll leave it in as a
	reference.

	* gtk/gtkfilechooserdefault.c (save_dialog_geometry): New function.
	(settings_save): Save the dialog's geometry.
	(gtk_file_chooser_default_get_default_size): Load the geometry
	from the settings.  If it was already saved, return that instead
	of computing an ad-hoc size.

Comment 6 Alexander Kojevnikov 2009-06-03 12:53:18 UTC
*** Bug 551209 has been marked as a duplicate of this bug. ***