Mercurial > dwindows
changeset 1340:890890c31ba6
Another printing cancel fix for the Mac and updated the readme.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sun, 13 Nov 2011 23:01:35 +0000 |
parents | c6d6788e207f |
children | 184b3aedc2ff |
files | mac/dw.m readme |
diffstat | 2 files changed, 17 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/mac/dw.m Sun Nov 13 22:52:31 2011 +0000 +++ b/mac/dw.m Sun Nov 13 23:01:35 2011 +0000 @@ -9998,18 +9998,21 @@ { /* Call the application's draw function */ p->drawfunc(print, pixmap, x, p->drawdata); - /* Internal representation is flipped... so flip again so we can print */ - _flip_image(image, rep2, size); -#ifdef DEBUG_PRINT - /* Save it to file to see what we have */ - NSData *data = [rep2 representationUsingType: NSPNGFileType properties: nil]; - [data writeToFile: @"print.png" atomically: NO]; -#endif - /* Print the image view */ - [po runOperation]; - /* Fill the pixmap with white in case we are printing more pages */ - dw_color_foreground_set(DW_CLR_WHITE); - dw_draw_rect(0, pixmap, TRUE, 0, 0, (int)size.width, (int)size.height); + if(p->drawfunc) + { + /* Internal representation is flipped... so flip again so we can print */ + _flip_image(image, rep2, size); + #ifdef DEBUG_PRINT + /* Save it to file to see what we have */ + NSData *data = [rep2 representationUsingType: NSPNGFileType properties: nil]; + [data writeToFile: @"print.png" atomically: NO]; + #endif + /* Print the image view */ + [po runOperation]; + /* Fill the pixmap with white in case we are printing more pages */ + dw_color_foreground_set(DW_CLR_WHITE); + dw_draw_rect(0, pixmap, TRUE, 0, 0, (int)size.width, (int)size.height); + } } if(p->drawfunc) result = DW_ERROR_NONE;
--- a/readme Sun Nov 13 22:52:31 2011 +0000 +++ b/readme Sun Nov 13 23:01:35 2011 +0000 @@ -60,6 +60,8 @@ same as TRUE so code using the old scheme should still work unchanged. Added DW_MENU_AUTO and DW_MENU_POPUP constants for autogenerating menu IDs. Added dw_debug() function for sending debug messages to the console. +Added path and/or filename support to dw_file_browse() on OS/2, Windows, + GTK2, GTK3 and Mac 10.6 or higher. Improved container optimization on Mac, header width now taken into account. Fixes for incorrect return codes from the dw_event_* functions on Windows. Fixes for incorrect behavior on key_press callbacks on Mac and Windows.