[gtk+] recentchooser: Fix default size setting



commit 38ea7abaaedb7c358691aff9a4466fd44eeb8e2f
Author: Benjamin Otte <otte redhat com>
Date:   Wed Apr 27 19:59:02 2011 +0200

    recentchooser: Fix default size setting
    
    Set the min content size on the scrolled window instead of using
    gtk_widget_set_size_request() on a widget where it's not recognized.

 gtk/gtkrecentchooserdefault.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkrecentchooserdefault.c b/gtk/gtkrecentchooserdefault.c
index 84fe199..6ebfcd2 100644
--- a/gtk/gtkrecentchooserdefault.c
+++ b/gtk/gtkrecentchooserdefault.c
@@ -929,6 +929,7 @@ reload_recent_items (GtkRecentChooserDefault *impl)
 static void
 set_default_size (GtkRecentChooserDefault *impl)
 {
+  GtkScrolledWindow *scrollw;
   GtkWidget *widget;
   gint width, height;
   gint font_size;
@@ -966,7 +967,9 @@ set_default_size (GtkRecentChooserDefault *impl)
   height = MIN (height, monitor.height * 3 / 4);
 
   /* Set size */
-  gtk_widget_set_size_request (impl->recent_view, width, height);
+  scrollw = GTK_SCROLLED_WINDOW (gtk_widget_get_parent (impl->recent_view));
+  gtk_scrolled_window_set_min_content_width (scrollw, width);
+  gtk_scrolled_window_set_min_content_height (scrollw, height);
 }
 
 static void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]