Permalink
Browse files

removed id from title

  • Loading branch information...
jfalb committed Dec 18, 2012
1 parent db84c9d commit 51f4ebd22aadfe76378e78b4e573203c1c49c91b
Showing with 7 additions and 1 deletion.
  1. +7 −1 Sources/ReaderMainToolbar.m
@@ -210,7 +210,13 @@ - (id)initWithFrame:(CGRect)frame document:(ReaderDocument *)object
titleLabel.shadowOffset = CGSizeMake(0.0f, 1.0f);
titleLabel.adjustsFontSizeToFitWidth = YES;
titleLabel.minimumFontSize = 14.0f;
- titleLabel.text = [object.fileName stringByDeletingPathExtension];
+
+ NSString *title = [object.fileName stringByDeletingPathExtension];
+ NSRange range = [title rangeOfString:@"_"];
+ if (range.location != NSNotFound) {
+ title = [title substringFromIndex:range.location + range.length];
+ }
+ titleLabel.text = title;
[self addSubview:titleLabel]; [titleLabel release];
}

0 comments on commit 51f4ebd

Please sign in to comment.