changeset 749:9e147366147b

Code cleanup.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Wed, 16 Mar 2011 15:35:45 +0000
parents f39745844175
children e6a9f1c7b0d7
files mac/dw.m
diffstat 1 files changed, 10 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/mac/dw.m	Wed Mar 16 15:31:01 2011 +0000
+++ b/mac/dw.m	Wed Mar 16 15:35:45 2011 +0000
@@ -2639,21 +2639,20 @@
  */
 HWND API dw_bitmapbutton_new(char *text, ULONG resid)
 {
-    /* TODO: Implement tooltips */
     NSBundle *bundle = [NSBundle mainBundle];
     NSString *respath = [bundle resourcePath];
     NSString *filepath = [respath stringByAppendingFormat:@"/%u.png", resid];
-	NSImage *image = [[NSImage alloc] initWithContentsOfFile:filepath];
-	DWButton *button = _button_new("", resid);
+    NSImage *image = [[NSImage alloc] initWithContentsOfFile:filepath];
+    DWButton *button = _button_new("", resid);
     if(image)
     {
         [button setImage:image];
         [button setButtonType:NSMomentaryLight];
-    [   button setBordered:NO];
+        [button setBordered:NO];
     }
     [button setToolTip:[NSString stringWithUTF8String:text]];
     [image release];
-	return button;
+    return button;
 }
 
 /*
@@ -2674,7 +2673,7 @@
         nstr = [nstr stringByAppendingString:@".png"];
         image = [[NSImage alloc] initWithContentsOfFile:nstr];
     }
-	DWButton *button = _button_new("", cid);
+    DWButton *button = _button_new("", cid);
     if(image)
     {
         [button setImage:image];
@@ -2683,7 +2682,7 @@
     }
     [button setToolTip:[NSString stringWithUTF8String:text]];
     [image release];
-	return button;
+    return button;
 }
 
 /*
@@ -2697,9 +2696,9 @@
  */
 HWND API dw_bitmapbutton_new_from_data(char *text, unsigned long cid, char *data, int len)
 {
-	NSData *thisdata = [[NSData alloc] dataWithBytes:data length:len];
-	NSImage *image = [[NSImage alloc] initWithData:thisdata];
-	DWButton *button = _button_new("", cid);
+    NSData *thisdata = [[NSData alloc] dataWithBytes:data length:len];
+    NSImage *image = [[NSImage alloc] initWithData:thisdata];
+    DWButton *button = _button_new("", cid);
     if(image)
     {
         [button setImage:image];
@@ -2708,7 +2707,7 @@
     }
     [button setToolTip:[NSString stringWithUTF8String:text]];
     [image release];
-	return button;
+    return button;
 }
 
 /*