summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorJonathan Blandford <jrb@redhat.com>2004-03-01 21:52:04 +0000
committerJonathan Blandford <jrb@src.gnome.org>2004-03-01 21:52:04 +0000
commita11c1bd6f32f63f0539fa70da41e4c62211714f4 (patch)
tree02b5521cbcda05a86de8920ff5f942a0ac05038b /gtk
parente6b21aec267339fd1e68d458b86ecab093a7c9cf (diff)
downloadgtk+-a11c1bd6f32f63f0539fa70da41e4c62211714f4.tar.gz
only store the size if we can resize in that direction.
Mon Mar 1 16:51:21 2004 Jonathan Blandford <jrb@redhat.com> * gtk/gtkfilechooserdialog.c (file_chooser_widget_default_size_changed): only store the size if we can resize in that direction.
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkfilechooserdefault.c7
-rw-r--r--gtk/gtkfilechooserdialog.c13
2 files changed, 16 insertions, 4 deletions
diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c
index c56a01060e..41f7dc6865 100644
--- a/gtk/gtkfilechooserdefault.c
+++ b/gtk/gtkfilechooserdefault.c
@@ -1886,7 +1886,7 @@ save_widgets_create (GtkFileChooserDefault *impl)
gtk_widget_show (widget);
impl->save_file_name_entry = gtk_entry_new ();
- gtk_entry_set_width_chars (GTK_ENTRY (impl->save_file_name_entry), 25);
+ gtk_entry_set_width_chars (GTK_ENTRY (impl->save_file_name_entry), 45);
gtk_entry_set_activates_default (GTK_ENTRY (impl->save_file_name_entry), TRUE);
gtk_table_attach (GTK_TABLE (table), impl->save_file_name_entry,
1, 2, 0, 1,
@@ -3193,7 +3193,10 @@ gtk_file_chooser_default_get_resizable_hints (GtkFileChooserEmbed *chooser_embed
impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)
{
if (! gtk_expander_get_expanded (GTK_EXPANDER (impl->save_expander)))
- *resize_vertically = FALSE;
+ {
+ *resize_vertically = FALSE;
+ *resize_horizontally = FALSE;
+ }
}
}
}
diff --git a/gtk/gtkfilechooserdialog.c b/gtk/gtkfilechooserdialog.c
index db4dff6676..d40664eb4c 100644
--- a/gtk/gtkfilechooserdialog.c
+++ b/gtk/gtkfilechooserdialog.c
@@ -184,6 +184,8 @@ file_chooser_widget_default_size_changed (GtkWidget *widget,
gint extra_height;
gint width, height;
GtkRequisition req;
+ gboolean resize_horizontally;
+ gboolean resize_vertically;
priv = GTK_FILE_CHOOSER_DIALOG_GET_PRIVATE (dialog);
@@ -221,8 +223,15 @@ file_chooser_widget_default_size_changed (GtkWidget *widget,
{
gtk_window_resize (GTK_WINDOW (dialog), width, height);
}
- priv->default_width = width;
- priv->default_height = height;
+
+ _gtk_file_chooser_embed_get_resizable_hints (GTK_FILE_CHOOSER_EMBED (priv->widget),
+ &resize_horizontally,
+ &resize_vertically);
+ /* Only store the size if we can resize in that direction. */
+ if (resize_horizontally)
+ priv->default_width = width;
+ if (resize_vertically)
+ priv->default_height = height;
}