comparison mac/dw.m @ 1672:42890a2b8d3e

Fix minor issues with dw_box_remove_at_index() on Mac.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Thu, 26 Apr 2012 23:26:35 +0000
parents d5f39d32c4da
children db393069b27d
comparison
equal deleted inserted replaced
1671:d5f39d32c4da 1672:42890a2b8d3e
4002 int z; 4002 int z;
4003 Item *tmpitem, *thisitem = thisbox->items; 4003 Item *tmpitem, *thisitem = thisbox->items;
4004 4004
4005 object = thisitem[index].hwnd; 4005 object = thisitem[index].hwnd;
4006 4006
4007 [object retain]; 4007 if(object)
4008 [object removeFromSuperview]; 4008 {
4009 [object retain];
4010 [object removeFromSuperview];
4011 }
4009 4012
4010 tmpitem = malloc(sizeof(Item)*(thisbox->count-1)); 4013 tmpitem = malloc(sizeof(Item)*(thisbox->count-1));
4011 4014
4012 /* Copy all but the current entry to the new list */ 4015 /* Copy all but the current entry to the new list */
4013 for(z=0;z<index;z++) 4016 for(z=0;z<index;z++)
4026 _dw_redraw(window, TRUE); 4029 _dw_redraw(window, TRUE);
4027 } 4030 }
4028 } 4031 }
4029 DW_MUTEX_UNLOCK; 4032 DW_MUTEX_UNLOCK;
4030 DW_LOCAL_POOL_OUT; 4033 DW_LOCAL_POOL_OUT;
4031 return 0; 4034 return object;
4032 } 4035 }
4033 4036
4034 /* 4037 /*
4035 * Pack windows (widgets) into a box at an arbitrary location. 4038 * Pack windows (widgets) into a box at an arbitrary location.
4036 * Parameters: 4039 * Parameters: