Mercurial > dwindows
changeset 1068:efaa9ceeb253
Removed test for class member for itemdata in dw_tree_item_get_data()
author | mhessling@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Fri, 24 Jun 2011 04:22:39 +0000 |
parents | 6ca1132a240e |
children | a1deca9b0876 |
files | mac/dw.m |
diffstat | 1 files changed, 14 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/mac/dw.m Fri Jun 24 02:10:45 2011 +0000 +++ b/mac/dw.m Fri Jun 24 04:22:39 2011 +0000 @@ -334,7 +334,7 @@ char *text = (char *)event; void *user = NULL; LONG x,y; - + /* Fill in both items for the tree */ if([object isKindOfClass:[NSOutlineView class]]) { @@ -382,7 +382,7 @@ { text = NULL; } - + NSValue *value = [item objectAtIndex:2]; if(value && [value isKindOfClass:[NSValue class]]) { @@ -1140,13 +1140,13 @@ @end @implementation DWFontChoose --(BOOL)windowShouldClose:(id)window -{ +-(BOOL)windowShouldClose:(id)window +{ DWDialog *d = dialog; dialog = nil; NSFont *pickedfont = [fontManager selectedFont]; - dw_dialog_dismiss(d, pickedfont); - [window orderOut:nil]; - return NO; + dw_dialog_dismiss(d, pickedfont); + [window orderOut:nil]; + return NO; } -(void)setDialog:(DWDialog *)input { dialog = input; } -(void)setFontManager:(NSFontManager *)input { fontManager = input; } @@ -1626,7 +1626,7 @@ { NSMutableArray *pnt = [node objectAtIndex:z]; NSMutableArray *children = nil; - + if(pnt && [pnt isMemberOfClass:[NSMutableArray class]]) { children = (NSMutableArray *)[pnt objectAtIndex:3]; @@ -5151,7 +5151,7 @@ DW_MUTEX_LOCK; NSMutableArray *array = (NSMutableArray *)item; NSValue *value = [array objectAtIndex:2]; - if(value && [value isMemberOfClass:[NSValue class]]) + if(value) { result = [value pointerValue]; } @@ -7280,10 +7280,10 @@ static NSFontManager *fontManager = nil; DWDialog *dialog; NSFont *font = nil; - + if(currfont) font = _dw_font_by_name(currfont); - + if(fontDlg) { dialog = [fontDlg dialog]; @@ -7299,7 +7299,7 @@ fontManager = [NSFontManager sharedFontManager]; fontDlg = (DWFontChoose *)[fontManager fontPanel:YES]; } - + dialog = dw_dialog_new(fontDlg); if(font) [fontManager setSelectedFont:font isMultiple:NO]; @@ -7309,14 +7309,14 @@ [fontDlg setFontManager:fontManager]; [fontManager orderFrontFontPanel:fontManager]; - + /* Wait for them to pick a color */ font = (NSFont *)dw_dialog_wait(dialog); if(font) { NSString *fontname = [font displayName]; NSString *output = [NSString stringWithFormat:@"%d.%s", (int)[font pointSize], [fontname UTF8String]]; - return strdup([output UTF8String]); + return strdup([output UTF8String]); } return NULL; }