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 543308 - FileChooser size problems since gtk+-2.13.x
FileChooser size problems since gtk+-2.13.x
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
2.13.x
Other All
: Normal normal
: ---
Assigned To: Federico Mena Quintero
Federico Mena Quintero
Depends on:
Blocks:
 
 
Reported: 2008-07-16 16:42 UTC by Peter Sääf
Modified: 2008-08-20 01:18 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
Screenshot (17.56 KB, image/png)
2008-07-16 16:42 UTC, Peter Sääf
  Details
gtk2-bgo543308-file-chooser-sizing.diff (17.01 KB, patch)
2008-08-20 01:17 UTC, Federico Mena Quintero
committed Details | Review

Description Peter Sääf 2008-07-16 16:42:15 UTC
Please describe the problem:
The fileChooser in 'compact' mode persists on using the same size as in 'open' mode. See screenshot. If in 'compact mode' it is resized the windowsize is not remembered.
I don't recall exactly but I think this began with 2.13.2.


Steps to reproduce:
Click 'Browse for other folders' to change between compact and normal size.


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Peter Sääf 2008-07-16 16:42:53 UTC
Created attachment 114676 [details]
Screenshot

FileChooser screenshot
Comment 2 Matthias Clasen 2008-07-18 01:39:34 UTC
This was broken by the following commit: 

2008-05-19  Federico Mena Quintero  <federico@novell.com>

	http://bugzilla.gnome.org/show_bug.cgi?id=322298 - Save dialog
	can't be resized until you expand the "Browse for other folders"
	section.


Comment 3 Federico Mena Quintero 2008-08-20 01:17:38 UTC
Created attachment 117020 [details] [review]
gtk2-bgo543308-file-chooser-sizing.diff

I've committed this patchset to trunk.  This fixes the problem and makes the code simpler.
Comment 4 Federico Mena Quintero 2008-08-20 01:18:06 UTC
Marking as fixed.

2008-08-19  Federico Mena Quintero  <federico@novell.com>

	http://bugzilla.gnome.org/show_bug.cgi?id=543308 - The file
	chooser in "compact" mode uses the same size as in "open" mode.

	* gtk/gtkfilechooserdialog.c (gtk_file_chooser_dialog_map): Don't
	force the default size here.  Let GtkFileChooserDefault be solely
	in charge of default sizing.
	(set_default_size): Removed obsolete code.

	* gtk/gtkfilechooserdefault.c (emit_default_size_changed): New
	helper function, to avoid dupliated code.  Only emits the signal
	if the widget is mapped, because that is when we actually know the
	size we'll want.
	(update_preview_widget_visibility): Use emit_default_size_changed()
	(update_appearance): Likewise.
	(gtk_file_chooser_default_style_set): Likewise.
	(gtk_file_chooser_default_screen_changed): Likewise.
	(gtk_file_chooser_default_map): Likewise.
	(find_good_size_from_style): Unconditionally compute a good
	default size for the "OPEN" modes; don't store it in internal fields.
	(gtk_file_chooser_default_get_default_size): Only compute the
	font-based size if we are in one of the "OPEN" modes or in
	expanded mode.

	* gtk/gtkfilechooserprivate.h (struct _GtkFileChooserDefault):
	Removed default_width/default_height; we don't store these
	anymore.  This will make recycled file choosers (like in the GIMP)
	not "remember" their size across invocations.  However, this
	prepares the way for actually remembering the user's size globally
	in the settings file.