diff gtk/dw.c @ 429:f977c80a1dfa

Check for inconsistent parameters in dw_box_pack_start() and dw_box_pack_end(). Throw up messagebox if an error.
author mhessling@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 27 May 2003 03:41:57 +0000
parents b0e2ba7c46c5
children fac2afe7bda3
line wrap: on
line diff
--- 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")))