Mercurial > dwindows
diff gtk3/dw.c @ 1413:28210f7941c7
Safety checks for -1 parameter to dw_box_pack*() for GTK3.
Updated the readme with dw_box_pack*() changes.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Fri, 02 Dec 2011 09:25:37 +0000 |
parents | ccd383e11ff8 |
children | 38c4484f5b90 |
line wrap: on
line diff
--- a/gtk3/dw.c Fri Dec 02 08:52:21 2011 +0000 +++ b/gtk3/dw.c Fri Dec 02 09:25:37 2011 +0000 @@ -8374,8 +8374,10 @@ /* Set the requested size of the widget */ if(GTK_IS_SCROLLED_WINDOW(item)) { - gtk_scrolled_window_set_min_content_width(GTK_SCROLLED_WINDOW(item), width); - gtk_scrolled_window_set_min_content_height(GTK_SCROLLED_WINDOW(item), height); + if(width > 0) + gtk_scrolled_window_set_min_content_width(GTK_SCROLLED_WINDOW(item), width); + if(height > 0) + gtk_scrolled_window_set_min_content_height(GTK_SCROLLED_WINDOW(item), height); } else gtk_widget_set_size_request(item, width, height);