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.
This commit is contained in:
Jonathan Blandford 2004-03-01 21:52:04 +00:00 committed by Jonathan Blandford
parent e6b21aec26
commit a11c1bd6f3
7 changed files with 46 additions and 4 deletions

View File

@ -1,3 +1,9 @@
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.
Mon Mar 1 16:32:52 2004 Jonathan Blandford <jrb@redhat.com> Mon Mar 1 16:32:52 2004 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkfilechooserwidget.c * gtk/gtkfilechooserwidget.c

View File

@ -1,3 +1,9 @@
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.
Mon Mar 1 16:32:52 2004 Jonathan Blandford <jrb@redhat.com> Mon Mar 1 16:32:52 2004 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkfilechooserwidget.c * gtk/gtkfilechooserwidget.c

View File

@ -1,3 +1,9 @@
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.
Mon Mar 1 16:32:52 2004 Jonathan Blandford <jrb@redhat.com> Mon Mar 1 16:32:52 2004 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkfilechooserwidget.c * gtk/gtkfilechooserwidget.c

View File

@ -1,3 +1,9 @@
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.
Mon Mar 1 16:32:52 2004 Jonathan Blandford <jrb@redhat.com> Mon Mar 1 16:32:52 2004 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkfilechooserwidget.c * gtk/gtkfilechooserwidget.c

View File

@ -1,3 +1,9 @@
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.
Mon Mar 1 16:32:52 2004 Jonathan Blandford <jrb@redhat.com> Mon Mar 1 16:32:52 2004 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkfilechooserwidget.c * gtk/gtkfilechooserwidget.c

View File

@ -1886,7 +1886,7 @@ save_widgets_create (GtkFileChooserDefault *impl)
gtk_widget_show (widget); gtk_widget_show (widget);
impl->save_file_name_entry = gtk_entry_new (); 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_entry_set_activates_default (GTK_ENTRY (impl->save_file_name_entry), TRUE);
gtk_table_attach (GTK_TABLE (table), impl->save_file_name_entry, gtk_table_attach (GTK_TABLE (table), impl->save_file_name_entry,
1, 2, 0, 1, 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) impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)
{ {
if (! gtk_expander_get_expanded (GTK_EXPANDER (impl->save_expander))) if (! gtk_expander_get_expanded (GTK_EXPANDER (impl->save_expander)))
*resize_vertically = FALSE; {
*resize_vertically = FALSE;
*resize_horizontally = FALSE;
}
} }
} }
} }

View File

@ -184,6 +184,8 @@ file_chooser_widget_default_size_changed (GtkWidget *widget,
gint extra_height; gint extra_height;
gint width, height; gint width, height;
GtkRequisition req; GtkRequisition req;
gboolean resize_horizontally;
gboolean resize_vertically;
priv = GTK_FILE_CHOOSER_DIALOG_GET_PRIVATE (dialog); 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); 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;
} }