changeset 1719:032c3388dda6

Fix dw_window_set_bitmap_from_data() not using the resource ID if data is NULL. Also updated the readme file with recent changes and note an OS/2 bug.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 08 May 2012 18:53:03 +0000
parents fae374a0055b
children 47e322354293
files mac/dw.m readme.txt
diffstat 2 files changed, 36 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/mac/dw.m	Tue May 08 18:28:39 2012 +0000
+++ b/mac/dw.m	Tue May 08 18:53:03 2012 +0000
@@ -8860,25 +8860,32 @@
     NSObject *object = handle;
     if([ object isKindOfClass:[ NSImageView class ] ])
     {
-        NSImageView *iv = handle;
-        NSData *thisdata = [NSData dataWithBytes:data length:len];
-        NSImage *pixmap = [[NSImage alloc] initWithData:thisdata];
-
-        if(pixmap)
-        {
-            [iv setImage:pixmap];
-        }
-        [pixmap release];
-        /* If we changed the text... */
-        Item *item = _box_item(handle);
-       
-        /* Check to see if any of the sizes need to be recalculated */
-        if(item && (item->origwidth == -1 || item->origheight == -1))
-        {
-            _control_size(handle, item->origwidth == -1 ? &item->width : NULL, item->origheight == -1 ? &item->height : NULL);        
-            /* Queue a redraw on the top-level window */
-            _dw_redraw([iv window], TRUE);
-        }
+        if(data)
+        {
+            DW_LOCAL_POOL_IN;
+            NSImageView *iv = handle;
+            NSData *thisdata = [NSData dataWithBytes:data length:len];
+            NSImage *pixmap = [[NSImage alloc] initWithData:thisdata];
+            
+            if(pixmap)
+            {
+                [iv setImage:pixmap];
+            }
+            [pixmap release];
+            /* If we changed the text... */
+            Item *item = _box_item(handle);
+            
+            /* Check to see if any of the sizes need to be recalculated */
+            if(item && (item->origwidth == -1 || item->origheight == -1))
+            {
+                _control_size(handle, item->origwidth == -1 ? &item->width : NULL, item->origheight == -1 ? &item->height : NULL);        
+                /* Queue a redraw on the top-level window */
+                _dw_redraw([iv window], TRUE);
+            }
+            DW_LOCAL_POOL_OUT;
+        }
+        else
+            dw_window_set_bitmap(handle, cid, NULL);
     }
 }
 
--- a/readme.txt	Tue May 08 18:28:39 2012 +0000
+++ b/readme.txt	Tue May 08 18:53:03 2012 +0000
@@ -10,6 +10,8 @@
 GTK3 due to changes in the core architecture does not support
     widgets that are smaller than what is contained within them
     unless they use scrolled windows. GTK2 and other platforms do.
+OS/2 Bitmap widget has the image anchored to the bottom left corner
+    of the widget instead of centered like other platforms.
 
 Known limitations:
 
@@ -32,6 +34,11 @@
 Added DW_POINTER() macro for casting parameters to (void *).
 Added dw_box_remove() and dw_box_remove_at_index() for removing items
    from boxes without destroying them. Also allows removal of padding.
+Added GBM (Generalized Bitmap Module) support for OS/2 and eCS for loading
+   Non-OS/2 native file formats. GBM comes with eCS 1.2 and later.
+   It is also available at http://hobbes.nmsu.edu
+Added resizing HICNs to 24x24 max size on platforms which do not 
+   do it automatically (Mac and GTK). OS/2 and Windows limit the size.
 Fixed dwindows-config --version not returning the version at all.
 Fixed value changed events not working for spinbuttons on OS/2 and Windows.
 Fixed issues drawing arcs on GTK2, GTK3 and Mac.
@@ -42,6 +49,9 @@
 Fixed issues with bitmap buttons using icon/pointers on OS/2 and Windows.
 Fixed an issue with dw_window_destroy() on Mac.
 Fixed issues rendering to printer pixmaps on Windows with GDI+ enabled.
+Fixed dw_window_set_bitmap_from_data() prefering the resource ID 
+   over the data passed in on most platforms.
+Fixed dw_container_delete_row() failing and/or crashing on Mac.
 Updated the test program removing deprecated flags and using new ones.
 
 Dynamic Windows Documentation is available at: