Mercurial > dwindows
diff gtk/dw.c @ 438:fac2afe7bda3
Only throw up the messagebox when expand and size are both 0 and the item
being packed is not a box. Also moved some private OS/2 prototypes out
of the header.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 29 May 2003 09:18:54 +0000 |
parents | f977c80a1dfa |
children | 7c8bd3bc6c27 |
line wrap: on
line diff
--- a/gtk/dw.c Wed May 28 08:00:11 2003 +0000 +++ b/gtk/dw.c Thu May 29 09:18:54 2003 +0000 @@ -6169,18 +6169,6 @@ if(!box) return; -/* Can't use dw_messagebox() !!! */ -if ( width == 0 && hsize == FALSE ) - dw_messagebox("dw_box_pack_end()", DW_MB_OK|DW_MB_ERROR, "Width and expand Horizonal both unset for box: %x item: %x",box,item); -if ( height == 0 && vsize == FALSE ) - dw_messagebox("dw_box_pack_end()", DW_MB_OK|DW_MB_ERROR, "Height and expand Vertical both unset for box: %x item: %x",box,item); -/* -if ( width == 0 && hsize == FALSE ) - fprintf(stderr,"dw_box_pack_end() - Width and expand Horizonal both unset for box: %lx item: %lx",(long)box,(long)item); -if ( height == 0 && vsize == FALSE ) - fprintf(stderr,"dw_box_pack_end() - Height and expand Vertical both unset for box: %lx item: %lx",(long)box,(long)item); -*/ - DW_MUTEX_LOCK; if((tmp = gtk_object_get_data(GTK_OBJECT(box), "_dw_boxhandle"))) @@ -6213,6 +6201,14 @@ item = eventbox; } } + else + { + /* Only show warning if item is not a box */ + if ( width == 0 && hsize == FALSE ) + dw_messagebox("dw_box_pack_end()", DW_MB_OK|DW_MB_ERROR, "Width and expand Horizonal both unset for box: %x item: %x",box,item); + if ( height == 0 && vsize == FALSE ) + dw_messagebox("dw_box_pack_end()", DW_MB_OK|DW_MB_ERROR, "Height and expand Vertical both unset for box: %x item: %x",box,item); + } if(boxtype == DW_VERT) gtk_table_resize(GTK_TABLE(box), boxcount + 1, 1); @@ -6251,6 +6247,14 @@ item = eventbox; } } + else + { + /* Only show warning if item is not a box */ + if ( width == 0 && hsize == FALSE ) + dw_messagebox("dw_box_pack_end()", DW_MB_OK|DW_MB_ERROR, "Width and expand Horizonal both unset for box: %x item: %x",box,item); + if ( height == 0 && vsize == FALSE ) + dw_messagebox("dw_box_pack_end()", DW_MB_OK|DW_MB_ERROR, "Height and expand Vertical both unset for box: %x item: %x",box,item); + } gtk_container_border_width(GTK_CONTAINER(box), pad); gtk_container_add(GTK_CONTAINER(box), vbox); @@ -7342,11 +7346,6 @@ if(!box) return; -if ( width == 0 && hsize == FALSE ) - dw_messagebox("dw_box_pack_start()", DW_MB_OK|DW_MB_ERROR, "Width and expand Horizonal both unset for box: %x item: %x",box,item); -if ( height == 0 && vsize == FALSE ) - dw_messagebox("dw_box_pack_start()", DW_MB_OK|DW_MB_ERROR, "Height and expand Vertical both unset for box: %x item: %x",box,item); - DW_MUTEX_LOCK; if((tmp = gtk_object_get_data(GTK_OBJECT(box), "_dw_boxhandle"))) @@ -7380,6 +7379,14 @@ item = eventbox; } } + else + { + /* Only show warning if item is not a box */ + if ( width == 0 && hsize == FALSE ) + dw_messagebox("dw_box_pack_start()", DW_MB_OK|DW_MB_ERROR, "Width and expand Horizonal both unset for box: %x item: %x",box,item); + if ( height == 0 && vsize == FALSE ) + dw_messagebox("dw_box_pack_start()", DW_MB_OK|DW_MB_ERROR, "Height and expand Vertical both unset for box: %x item: %x",box,item); + } if(boxtype == DW_VERT) { @@ -7426,6 +7433,14 @@ item = eventbox; } } + else + { + /* Only show warning if item is not a box */ + if ( width == 0 && hsize == FALSE ) + dw_messagebox("dw_box_pack_start()", DW_MB_OK|DW_MB_ERROR, "Width and expand Horizonal both unset for box: %x item: %x",box,item); + if ( height == 0 && vsize == FALSE ) + dw_messagebox("dw_box_pack_start()", DW_MB_OK|DW_MB_ERROR, "Height and expand Vertical both unset for box: %x item: %x",box,item); + } gtk_container_border_width(GTK_CONTAINER(box), pad); gtk_container_add(GTK_CONTAINER(box), vbox);