Handle shrinking/growing.

Mon Mar  1 12:05:54 2004  Jonathan Blandford  <jrb@redhat.com>

        * gtk/gtkfilechooserdialog.c
        (file_chooser_widget_resizable_hints_changed): Handle
        shrinking/growing.
This commit is contained in:
Jonathan Blandford 2004-03-01 17:08:19 +00:00 committed by Jonathan Blandford
parent ebd7d1688a
commit 8f190fbf2f
7 changed files with 59 additions and 3 deletions

View File

@ -1,3 +1,9 @@
Mon Mar 1 12:05:54 2004 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkfilechooserdialog.c
(file_chooser_widget_resizable_hints_changed): Handle
shrinking/growing.
2004-03-01 Michael Natterer <mitch@gimp.org>
* gtk/gtktextbtree.c: removed underscores from calls to

View File

@ -1,3 +1,9 @@
Mon Mar 1 12:05:54 2004 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkfilechooserdialog.c
(file_chooser_widget_resizable_hints_changed): Handle
shrinking/growing.
2004-03-01 Michael Natterer <mitch@gimp.org>
* gtk/gtktextbtree.c: removed underscores from calls to

View File

@ -1,3 +1,9 @@
Mon Mar 1 12:05:54 2004 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkfilechooserdialog.c
(file_chooser_widget_resizable_hints_changed): Handle
shrinking/growing.
2004-03-01 Michael Natterer <mitch@gimp.org>
* gtk/gtktextbtree.c: removed underscores from calls to

View File

@ -1,3 +1,9 @@
Mon Mar 1 12:05:54 2004 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkfilechooserdialog.c
(file_chooser_widget_resizable_hints_changed): Handle
shrinking/growing.
2004-03-01 Michael Natterer <mitch@gimp.org>
* gtk/gtktextbtree.c: removed underscores from calls to

View File

@ -1,3 +1,9 @@
Mon Mar 1 12:05:54 2004 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkfilechooserdialog.c
(file_chooser_widget_resizable_hints_changed): Handle
shrinking/growing.
2004-03-01 Michael Natterer <mitch@gimp.org>
* gtk/gtktextbtree.c: removed underscores from calls to

View File

@ -1849,9 +1849,6 @@ expander_changed_cb (GtkExpander *expander,
GParamSpec *pspec,
GtkFileChooserDefault *impl)
{
gboolean active;
active = gtk_expander_get_expanded (expander);
update_appearance (impl);
}
@ -2193,6 +2190,7 @@ update_appearance (GtkFileChooserDefault *impl)
}
g_signal_emit_by_name (impl, "default-size-changed");
g_signal_emit_by_name (impl, "resizable-hints-changed");
}
static void

View File

@ -149,6 +149,32 @@ file_chooser_widget_file_activated (GtkFileChooser *chooser,
gtk_window_activate_default (GTK_WINDOW (dialog));
}
static void
file_chooser_widget_resizable_hints_changed (GtkWidget *widget,
GtkFileChooserDialog *dialog)
{
GtkFileChooserDialogPrivate *priv;
gboolean resize_horizontally;
gboolean resize_vertically;
GdkGeometry geometry;
priv = GTK_FILE_CHOOSER_DIALOG_GET_PRIVATE (dialog);
_gtk_file_chooser_embed_get_resizable_hints (GTK_FILE_CHOOSER_EMBED (priv->widget),
&resize_horizontally,
&resize_vertically);
geometry.min_width = -1;
geometry.min_height = -1;
geometry.max_width = (resize_horizontally?G_MAXSHORT:-1);
geometry.max_height = (resize_vertically?G_MAXSHORT:-1);
gtk_window_set_geometry_hints (GTK_WINDOW (dialog), NULL,
&geometry,
GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE);
}
static void
file_chooser_widget_default_size_changed (GtkWidget *widget,
GtkFileChooserDialog *dialog)
@ -226,6 +252,8 @@ gtk_file_chooser_dialog_constructor (GType type,
G_CALLBACK (file_chooser_widget_file_activated), object);
g_signal_connect (priv->widget, "default-size-changed",
G_CALLBACK (file_chooser_widget_default_size_changed), object);
g_signal_connect (priv->widget, "resizable-hints-changed",
G_CALLBACK (file_chooser_widget_resizable_hints_changed), object);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (object)->vbox), priv->widget, TRUE, TRUE, 0);
gtk_widget_show (priv->widget);