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.
This commit is contained in:
Benjamin Otte
2011-04-27 19:59:02 +02:00
parent 1763b3a0b5
commit 38ea7abaae

View File

@@ -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