X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=OSX%2FInvertedSlider.m;h=6ac0b4196bb31f0d28cb9d1c88c9fc990485a9b1;hb=aa75c7476aeaa84cf3abc192b376a8b03c325213;hp=605d6e2dea70da61c3c1004243a5fa1caca82528;hpb=4ade52359b6eba3621566dac79793a33aa4c915f;p=xscreensaver diff --git a/OSX/InvertedSlider.m b/OSX/InvertedSlider.m index 605d6e2d..6ac0b419 100644 --- a/OSX/InvertedSlider.m +++ b/OSX/InvertedSlider.m @@ -1,16 +1,16 @@ -/* xscreensaver, Copyright (c) 2006-2013 Jamie Zawinski -* -* Permission to use, copy, modify, distribute, and sell this software and its -* documentation for any purpose is hereby granted without fee, provided that -* the above copyright notice appear in all copies and that both that -* copyright notice and this permission notice appear in supporting -* documentation. No representations are made about the suitability of this -* software for any purpose. It is provided "as is" without express or -* implied warranty. -* -* This is a subclass of NSSlider that is flipped horizontally: -* the high value is on the left and the low value is on the right. -*/ +/* xscreensaver, Copyright (c) 2006-2015 Jamie Zawinski + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation. No representations are made about the suitability of this + * software for any purpose. It is provided "as is" without express or + * implied warranty. + * + * This is a subclass of NSSlider that is flipped horizontally: + * the high value is on the left and the low value is on the right. + */ #import "InvertedSlider.h" @@ -83,8 +83,8 @@ - (NSAttributedString *)attributedStringValue; { - // #### "Build and Analyze" says this leaks. Unsure whether this is true. - return [[NSAttributedString alloc] initWithString:[self stringValue]]; + return [[[NSAttributedString alloc] initWithString:[self stringValue]] + autorelease]; } -(void)setFloatValue:(float)v { [self setDoubleValue: (double) v]; }