# HG changeset patch # User mhessling@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1054006917 0 # Node ID f977c80a1dfa2acd6247ca1fda3a8779b146465f # Parent fdf111cb09867c5a554b973b7c175c038d44384e Check for inconsistent parameters in dw_box_pack_start() and dw_box_pack_end(). Throw up messagebox if an error. diff -r fdf111cb0986 -r f977c80a1dfa gtk/dw.c --- a/gtk/dw.c Tue May 27 03:40:42 2003 +0000 +++ b/gtk/dw.c Tue May 27 03:41:57 2003 +0000 @@ -1236,7 +1236,7 @@ /* Buttons */ buttonbox = dw_box_new(DW_HORZ, 10); - dw_box_pack_start(mainbox, buttonbox, 0, 0, TRUE, FALSE, 0); + dw_box_pack_start(mainbox, buttonbox, 0, 40, TRUE, FALSE, 0); dwwait = dw_dialog_new((void *)entrywindow); @@ -6169,6 +6169,18 @@ 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"))) @@ -7330,6 +7342,11 @@ 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"))) diff -r fdf111cb0986 -r f977c80a1dfa os2/dw.c --- a/os2/dw.c Tue May 27 03:40:42 2003 +0000 +++ b/os2/dw.c Tue May 27 03:41:57 2003 +0000 @@ -4976,6 +4976,11 @@ { 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); + if(WinWindowFromID(box, FID_CLIENT)) { box = WinWindowFromID(box, FID_CLIENT); @@ -7615,6 +7620,11 @@ { 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); + if(WinWindowFromID(box, FID_CLIENT)) { box = WinWindowFromID(box, FID_CLIENT); diff -r fdf111cb0986 -r f977c80a1dfa win/dw.c --- a/win/dw.c Tue May 27 03:40:42 2003 +0000 +++ b/win/dw.c Tue May 27 03:41:57 2003 +0000 @@ -4720,6 +4720,11 @@ { 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) { @@ -7511,6 +7516,11 @@ { 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) {