Get rid of unnecessary class by merging ellipsis code into StringAdditions.

This commit is contained in:
Mitchell Livingston
2006-06-14 20:08:51 +00:00
parent 341b6ef526
commit 4eb8918f3a
6 changed files with 26 additions and 45 deletions

View File

@@ -29,7 +29,6 @@
#import "TorrentCell.h"
#import "TorrentTableView.h"
#import "StringAdditions.h"
#import "Utils.h"
#import <Sparkle/Sparkle.h>
@@ -1272,17 +1271,17 @@ static void sleepCallBack( void * controller, io_service_t y,
}
//append or remove ellipsis when needed
NSString * title = [menuItem title];
NSString * title = [menuItem title], * ellipsis = [NSString ellipsis];
if (active && [fDefaults boolForKey: @"CheckRemove"])
{
if (![title hasSuffix: NS_ELLIPSIS])
[menuItem setTitle: [title stringByAppendingString: NS_ELLIPSIS]];
if (![title hasSuffix: ellipsis])
[menuItem setTitle: [title stringByAppendingEllipsis]];
}
else
{
if ([title hasSuffix: NS_ELLIPSIS])
if ([title hasSuffix: ellipsis])
[menuItem setTitle: [title substringToIndex:
[title rangeOfString: NS_ELLIPSIS].location]];
[title rangeOfString: ellipsis].location]];
}
return canUseMenu && [fTableView numberOfSelectedRows] > 0;
}