Lots of code to keep MT from being bad when iTunes locks. Fixed leak in
[MenuTunes.git] / StatusWindow.m
index ffbc1e6..9c8888a 100755 (executable)
             divisor = MINI_DIVISOR;
         }
 
             divisor = MINI_DIVISOR;
         }
 
-        font = [NSFont fontWithName:@"Lucida Grande Bold" size:(baseFontSize / divisor)];
+        font = [NSFont fontWithName:@"LucidaGrande-Bold" size:(baseFontSize / divisor)];
         attr = [NSDictionary dictionaryWithObject:font forKey:NSFontAttributeName];
         
 //      Iterate over each line to get text width and height
         attr = [NSDictionary dictionaryWithObject:font forKey:NSFontAttributeName];
         
 //      Iterate over each line to get text width and height
             divisor = MINI_DIVISOR;
         }
         
             divisor = MINI_DIVISOR;
         }
         
-        font        = [NSFont fontWithName:@"Lucida Grande Bold" size:( size / divisor )];
+        font        = [NSFont fontWithName:@"LucidaGrande-Bold" size:( size / divisor )];
         attr        = [NSDictionary dictionaryWithObject:font forKey:NSFontAttributeName];
         charSize    = [character sizeWithAttributes:attr];
         cellHeight  = ( charSize.height + 4.0 );  // Add 4.0 for shadow
         attr        = [NSDictionary dictionaryWithObject:font forKey:NSFontAttributeName];
         charSize    = [character sizeWithAttributes:attr];
         cellHeight  = ( charSize.height + 4.0 );  // Add 4.0 for shadow
             divisor = MINI_DIVISOR;
         }
         
             divisor = MINI_DIVISOR;
         }
         
-        font = [NSFont fontWithName:@"Lucida Grande Bold" size:(baseFontSize / divisor)];
+        font = [NSFont fontWithName:@"LucidaGrande-Bold" size:(baseFontSize / divisor)];
         attr = [NSDictionary dictionaryWithObject:font forKey:NSFontAttributeName];
         attr = [NSDictionary dictionaryWithObject:font forKey:NSFontAttributeName];
-        buttonFont = [NSFont fontWithName:@"Lucida Grande Bold" size:(14 / divisor)];
+        buttonFont = [NSFont fontWithName:@"LucidaGrande-Bold" size:(14 / divisor)];
         buttonAttr = [NSDictionary dictionaryWithObjectsAndKeys:
             buttonFont , NSFontAttributeName,
             textColor  , NSForegroundColorAttributeName, 
         buttonAttr = [NSDictionary dictionaryWithObjectsAndKeys:
             buttonFont , NSFontAttributeName,
             textColor  , NSForegroundColorAttributeName, 
         }
         
 //      Make the buttons, set the titles, and size them to fit their titles
         }
         
 //      Make the buttons, set the titles, and size them to fit their titles
-        okButton     = [[ITButton alloc] initWithFrame:NSMakeRect(0, 0, 300, 24)];
-        cancelButton = [[ITButton alloc] initWithFrame:NSMakeRect(0, 0, 300, 24)];
+        okButton     = [[[ITButton alloc] initWithFrame:NSMakeRect(0, 0, 300, 24)] autorelease];
+        cancelButton = [[[ITButton alloc] initWithFrame:NSMakeRect(0, 0, 300, 24)] autorelease];
         [okButton     setTarget:target];
         [cancelButton setTarget:target];
         [okButton     setAction:okAction];
         [okButton     setTarget:target];
         [cancelButton setTarget:target];
         [okButton     setAction:okAction];