diff options
author | Matthias Clasen <mclasen@redhat.com> | 2007-02-26 19:45:33 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2007-02-26 19:45:33 +0000 |
commit | e4d9a1ccc6d8c30c04770143adf250dd8c1e6b24 (patch) | |
tree | 0827fcab2bc6e16cb277970bd73f44e7d33ecd4d /gtk/gtkfilechooserdialog.c | |
parent | 3f9deb4aeb7978ac1f3d41e0cfe56115f125a400 (diff) | |
download | gtk+-e4d9a1ccc6d8c30c04770143adf250dd8c1e6b24.tar.gz |
Apply a patch by Carlos Garnacho to fix several problems with filechooser
2007-02-26 Matthias Clasen <mclasen@redhat.com>
Apply a patch by Carlos Garnacho to fix several problems
with filechooser size handling (#325477, #151169, 143213,
#153785)
* gtk/gtkfilechooserdefault.c: Increase NUM_LINES slightly.
(browse_widgets_create): Don't force the paned position to 200.
(find_good_size_from_style): Take the size of the extra widget
into account.
* gtk/gtkfilechooserdialog.c (file_chooser_widget_update_hints):
Accept a minimal width parameter. Update all callers.
svn path=/trunk/; revision=17357
Diffstat (limited to 'gtk/gtkfilechooserdialog.c')
-rw-r--r-- | gtk/gtkfilechooserdialog.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gtk/gtkfilechooserdialog.c b/gtk/gtkfilechooserdialog.c index 331f6819f5..7bdb650e39 100644 --- a/gtk/gtkfilechooserdialog.c +++ b/gtk/gtkfilechooserdialog.c @@ -1,3 +1,4 @@ +/* -*- Mode: C; c-file-style: "gnu"; tab-width: 8 -*- */ /* GTK - The GIMP Toolkit * gtkfilechooserdialog.c: File selector dialog * Copyright (C) 2003, Red Hat, Inc. @@ -152,14 +153,15 @@ file_chooser_widget_file_activated (GtkFileChooser *chooser, } static void -file_chooser_widget_update_hints (GtkFileChooserDialog *dialog) +file_chooser_widget_update_hints (GtkFileChooserDialog *dialog, + gint width) { GtkFileChooserDialogPrivate *priv; GdkGeometry geometry; priv = GTK_FILE_CHOOSER_DIALOG_GET_PRIVATE (dialog); - geometry.min_width = -1; + geometry.min_width = (!priv->resize_horizontally ? width : -1); geometry.min_height = -1; geometry.max_width = (priv->resize_horizontally?G_MAXSHORT:-1); geometry.max_height = (priv->resize_vertically?G_MAXSHORT:-1); @@ -249,7 +251,7 @@ file_chooser_widget_default_realized_size_changed (GtkWidget *widget, { update_hints = TRUE; } - + if (resize_vertically && priv->resize_vertically) { dy = default_height - priv->default_height; @@ -282,7 +284,7 @@ file_chooser_widget_default_realized_size_changed (GtkWidget *widget, /* Only store the size if we can resize in that direction. */ if (update_hints) - file_chooser_widget_update_hints (dialog); + file_chooser_widget_update_hints (dialog, width); } static void @@ -307,7 +309,7 @@ file_chooser_widget_default_unrealized_size_changed (GtkWidget *widge height = priv->default_height + GTK_WIDGET (dialog)->requisition.height - priv->widget->requisition.height; gtk_window_set_default_size (GTK_WINDOW (dialog), width, height); - file_chooser_widget_update_hints (dialog); + file_chooser_widget_update_hints (dialog, width); } static void |