Mercurial > dwindows
comparison mac/dw.m @ 726:ecf47778caff
Possible fix for container string columns not showing correctly.
Also set the pool thread local storage for the main thread so _dw_pool_drain can be used.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Mon, 14 Mar 2011 19:30:36 +0000 |
parents | 4e09c92363df |
children | f190b5c2ce16 |
comparison
equal
deleted
inserted
replaced
725:4e09c92363df | 726:ecf47778caff |
---|---|
4238 { | 4238 { |
4239 object = *((NSImage **)data); | 4239 object = *((NSImage **)data); |
4240 } | 4240 } |
4241 else if(type & DW_CFA_STRING) | 4241 else if(type & DW_CFA_STRING) |
4242 { | 4242 { |
4243 object = [ NSString stringWithUTF8String:data ]; | 4243 char *str = *((char **)data); |
4244 object = [ NSString stringWithUTF8String:str ]; | |
4244 } | 4245 } |
4245 else | 4246 else |
4246 { | 4247 { |
4247 char textbuffer[100]; | 4248 char textbuffer[100]; |
4248 | 4249 |
4324 * data: Pointer to the data to be added. | 4325 * data: Pointer to the data to be added. |
4325 */ | 4326 */ |
4326 void API dw_filesystem_change_file(HWND handle, int row, char *filename, HICN icon) | 4327 void API dw_filesystem_change_file(HWND handle, int row, char *filename, HICN icon) |
4327 { | 4328 { |
4328 dw_container_change_item(handle, 0, row, &icon); | 4329 dw_container_change_item(handle, 0, row, &icon); |
4329 dw_container_change_item(handle, 1, row, filename); | 4330 dw_container_change_item(handle, 1, row, &filename); |
4330 } | 4331 } |
4331 | 4332 |
4332 /* | 4333 /* |
4333 * Sets an item in specified row and column to the given data. | 4334 * Sets an item in specified row and column to the given data. |
4334 * Parameters: | 4335 * Parameters: |
4339 * data: Pointer to the data to be added. | 4340 * data: Pointer to the data to be added. |
4340 */ | 4341 */ |
4341 void API dw_filesystem_set_file(HWND handle, void *pointer, int row, char *filename, HICN icon) | 4342 void API dw_filesystem_set_file(HWND handle, void *pointer, int row, char *filename, HICN icon) |
4342 { | 4343 { |
4343 dw_container_set_item(handle, pointer, 0, row, &icon); | 4344 dw_container_set_item(handle, pointer, 0, row, &icon); |
4344 dw_container_set_item(handle, pointer, 1, row, filename); | 4345 dw_container_set_item(handle, pointer, 1, row, &filename); |
4345 } | 4346 } |
4346 | 4347 |
4347 /* | 4348 /* |
4348 * Sets an item in specified row and column to the given data. | 4349 * Sets an item in specified row and column to the given data. |
4349 * Parameters: | 4350 * Parameters: |
7340 DWHandler = [[DWTimerHandler alloc] init]; | 7341 DWHandler = [[DWTimerHandler alloc] init]; |
7341 /* If we aren't using garbage collection we need autorelease pools */ | 7342 /* If we aren't using garbage collection we need autorelease pools */ |
7342 #if !defined(GARBAGE_COLLECT) | 7343 #if !defined(GARBAGE_COLLECT) |
7343 pthread_key_create(&_dw_pool_key, NULL); | 7344 pthread_key_create(&_dw_pool_key, NULL); |
7344 pool = [[NSAutoreleasePool alloc] init]; | 7345 pool = [[NSAutoreleasePool alloc] init]; |
7346 pthread_setspecific(_dw_pool_key, pool); | |
7345 #endif | 7347 #endif |
7346 /* Create a default main menu, with just the application menu */ | 7348 /* Create a default main menu, with just the application menu */ |
7347 DWMainMenu = _generate_main_menu(); | 7349 DWMainMenu = _generate_main_menu(); |
7348 [DWApp setMainMenu:DWMainMenu]; | 7350 [DWApp setMainMenu:DWMainMenu]; |
7349 DWObj = [[DWObject alloc] init]; | 7351 DWObj = [[DWObject alloc] init]; |