Mercurial > dwindows
diff mac/dw.m @ 940:b5ae9cf15f68
Fix for returning wrong extension in _dw_get_image_extension; only worked for .ico files
author | mhessling@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Wed, 27 Apr 2011 09:59:14 +0000 |
parents | 0ba3003272a1 |
children | 18f194e1d71d |
line wrap: on
line diff
--- a/mac/dw.m Wed Apr 27 09:00:53 2011 +0000 +++ b/mac/dw.m Wed Apr 27 09:59:14 2011 +0000 @@ -95,7 +95,7 @@ } if ( found_ext == 1 ) { - return image_exts[found_ext]; + return image_exts[i]; } return NULL; } @@ -7202,32 +7202,32 @@ else if([object isKindOfClass:[DWBox class]] || [object isKindOfClass:[NSControl class]]) { DWBox *parent = (DWBox *)[object superview]; - + if([parent isKindOfClass:[DWBox class]]) { Box *thisbox = [parent box]; int z, index = -1; Item *tmpitem, *thisitem = thisbox->items; - + [object removeFromSuperview]; /* Do we need to release? * [object release]; */ - + for(z=0;z<thisbox->count;z++) { if(thisitem[z].hwnd == handle) index = z; } - + if(index == -1) { DW_MUTEX_UNLOCK; return 0; } - + tmpitem = malloc(sizeof(Item)*(thisbox->count-1)); - + /* Copy all but the current entry to the new list */ for(z=0;z<index;z++) { @@ -7237,10 +7237,10 @@ { tmpitem[z-1] = thisitem[z]; } - + thisbox->items = tmpitem; free(thisitem); - thisbox->count--; + thisbox->count--; } } DW_MUTEX_UNLOCK;