diff win/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 98d6c00fe11e
children 7f39be80dec3
line wrap: on
line diff
--- a/win/dw.c	Wed May 28 08:00:11 2003 +0000
+++ b/win/dw.c	Thu May 29 09:18:54 2003 +0000
@@ -4733,11 +4733,6 @@
 {
 	Box *thisbox;
 
-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);
-
 	thisbox = (Box *)GetWindowLong(box, GWL_USERDATA);
 	if(thisbox)
 	{
@@ -4762,7 +4757,14 @@
 		if(strnicmp(tmpbuf, FRAMECLASSNAME, 2)==0)
 			tmpitem[thisbox->count].type = TYPEBOX;
 		else
+		{
+			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);
+
 			tmpitem[thisbox->count].type = TYPEITEM;
+		}
 
 		tmpitem[thisbox->count].hwnd = item;
 		tmpitem[thisbox->count].origwidth = tmpitem[thisbox->count].width = width;
@@ -7530,11 +7532,6 @@
 {
 	Box *thisbox;
 
-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);
-
 	thisbox = (Box *)GetWindowLong(box, GWL_USERDATA);
 	if(thisbox)
 	{
@@ -7559,7 +7556,14 @@
 		if(strnicmp(tmpbuf, FRAMECLASSNAME, 2)==0)
 			tmpitem[0].type = TYPEBOX;
 		else
+		{
+			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);
+
 			tmpitem[0].type = TYPEITEM;
+		}
 
 		tmpitem[0].hwnd = item;
 		tmpitem[0].origwidth = tmpitem[0].width = width;