comparison 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
comparison
equal deleted inserted replaced
1412:246aadf8fbd4 1413:28210f7941c7
8372 } 8372 }
8373 g_object_set_data(G_OBJECT(box), "_dw_boxcount", GINT_TO_POINTER(boxcount + 1)); 8373 g_object_set_data(G_OBJECT(box), "_dw_boxcount", GINT_TO_POINTER(boxcount + 1));
8374 /* Set the requested size of the widget */ 8374 /* Set the requested size of the widget */
8375 if(GTK_IS_SCROLLED_WINDOW(item)) 8375 if(GTK_IS_SCROLLED_WINDOW(item))
8376 { 8376 {
8377 gtk_scrolled_window_set_min_content_width(GTK_SCROLLED_WINDOW(item), width); 8377 if(width > 0)
8378 gtk_scrolled_window_set_min_content_height(GTK_SCROLLED_WINDOW(item), height); 8378 gtk_scrolled_window_set_min_content_width(GTK_SCROLLED_WINDOW(item), width);
8379 if(height > 0)
8380 gtk_scrolled_window_set_min_content_height(GTK_SCROLLED_WINDOW(item), height);
8379 } 8381 }
8380 else 8382 else
8381 gtk_widget_set_size_request(item, width, height); 8383 gtk_widget_set_size_request(item, width, height);
8382 if(GTK_IS_RADIO_BUTTON(item)) 8384 if(GTK_IS_RADIO_BUTTON(item))
8383 { 8385 {