comparison 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
comparison
equal deleted inserted replaced
428:fdf111cb0986 429:f977c80a1dfa
1234 dw_box_pack_start(texttargetbox, stext, 235+extra_width, 50, TRUE, TRUE, 2); 1234 dw_box_pack_start(texttargetbox, stext, 235+extra_width, 50, TRUE, TRUE, 2);
1235 1235
1236 /* Buttons */ 1236 /* Buttons */
1237 buttonbox = dw_box_new(DW_HORZ, 10); 1237 buttonbox = dw_box_new(DW_HORZ, 10);
1238 1238
1239 dw_box_pack_start(mainbox, buttonbox, 0, 0, TRUE, FALSE, 0); 1239 dw_box_pack_start(mainbox, buttonbox, 0, 40, TRUE, FALSE, 0);
1240 1240
1241 dwwait = dw_dialog_new((void *)entrywindow); 1241 dwwait = dw_dialog_new((void *)entrywindow);
1242 1242
1243 /* which buttons ? */ 1243 /* which buttons ? */
1244 if(flags & DW_MB_OK) 1244 if(flags & DW_MB_OK)
6167 GtkWidget *tmp; 6167 GtkWidget *tmp;
6168 6168
6169 if(!box) 6169 if(!box)
6170 return; 6170 return;
6171 6171
6172 /* Can't use dw_messagebox() !!! */
6173 if ( width == 0 && hsize == FALSE )
6174 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);
6175 if ( height == 0 && vsize == FALSE )
6176 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);
6177 /*
6178 if ( width == 0 && hsize == FALSE )
6179 fprintf(stderr,"dw_box_pack_end() - Width and expand Horizonal both unset for box: %lx item: %lx",(long)box,(long)item);
6180 if ( height == 0 && vsize == FALSE )
6181 fprintf(stderr,"dw_box_pack_end() - Height and expand Vertical both unset for box: %lx item: %lx",(long)box,(long)item);
6182 */
6183
6172 DW_MUTEX_LOCK; 6184 DW_MUTEX_LOCK;
6173 6185
6174 if((tmp = gtk_object_get_data(GTK_OBJECT(box), "_dw_boxhandle"))) 6186 if((tmp = gtk_object_get_data(GTK_OBJECT(box), "_dw_boxhandle")))
6175 box = tmp; 6187 box = tmp;
6176 6188
7327 int _locked_by_me = FALSE; 7339 int _locked_by_me = FALSE;
7328 GtkWidget *tmp; 7340 GtkWidget *tmp;
7329 7341
7330 if(!box) 7342 if(!box)
7331 return; 7343 return;
7344
7345 if ( width == 0 && hsize == FALSE )
7346 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);
7347 if ( height == 0 && vsize == FALSE )
7348 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);
7332 7349
7333 DW_MUTEX_LOCK; 7350 DW_MUTEX_LOCK;
7334 7351
7335 if((tmp = gtk_object_get_data(GTK_OBJECT(box), "_dw_boxhandle"))) 7352 if((tmp = gtk_object_get_data(GTK_OBJECT(box), "_dw_boxhandle")))
7336 box = tmp; 7353 box = tmp;