rendered paste bodyIndex: macosx/PeerProgressIndicatorCell.h
===================================================================
--- macosx/PeerProgressIndicatorCell.h (revision 3202)
+++ macosx/PeerProgressIndicatorCell.h (working copy)
@@ -27,6 +27,7 @@
@interface PeerProgressIndicatorCell : NSLevelIndicatorCell
{
BOOL fIsHidden;
+ NSUserDefaults *fDefaults;
NSImage * fCheckImage;
}
@end
Index: macosx/PeerProgressIndicatorCell.m
===================================================================
--- macosx/PeerProgressIndicatorCell.m (revision 3202)
+++ macosx/PeerProgressIndicatorCell.m (working copy)
@@ -41,18 +41,45 @@
if (!fIsHidden)
{
[super drawWithFrame: cellFrame inView: controlView];
- if ([self floatValue] >= 1.0)
+ if (!fDefaults)
{
- if (!fCheckImage)
+ fDefaults = [NSUserDefaults standardUserDefaults];
+ }
+
+ if ([fDefaults boolForKey:@"DisplayPeerPercentage"])
+ {
+ NSMutableParagraphStyle *centeredStyle = [[NSMutableParagraphStyle alloc] init];
+ [centeredStyle setAlignment:NSCenterTextAlignment];
+
+ [[NSString stringWithFormat:@"%.1f", [self floatValue] * 100]
+ drawInRect:cellFrame
+ withAttributes:
+ [NSDictionary dictionaryWithObjects:
+ [NSArray arrayWithObjects:
+ [NSFont systemFontOfSize:[NSFont smallSystemFontSize]],
+ centeredStyle,
+ nil]
+ forKeys:
+ [NSArray arrayWithObjects:
+ NSFontAttributeName,
+ NSParagraphStyleAttributeName,
+ nil]]];
+ }
+ else
+ {
+ if ([self floatValue] >= 1.0)
{
- fCheckImage = [NSImage imageNamed: @"CompleteCheck.png"];
- [fCheckImage setFlipped: YES];
+ if (!fCheckImage)
+ {
+ fCheckImage = [NSImage imageNamed: @"CompleteCheck.png"];
+ [fCheckImage setFlipped: YES];
+ }
+
+ NSSize imageSize = [fCheckImage size];
+ NSRect rect = NSMakeRect(cellFrame.origin.x + (cellFrame.size.width - imageSize.width) * 0.5,
+ cellFrame.origin.y + (cellFrame.size.height - imageSize.height) * 0.5, imageSize.width, imageSize.height);
+ [fCheckImage drawInRect: rect fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0];
}
-
- NSSize imageSize = [fCheckImage size];
- NSRect rect = NSMakeRect(cellFrame.origin.x + (cellFrame.size.width - imageSize.width) * 0.5,
- cellFrame.origin.y + (cellFrame.size.height - imageSize.height) * 0.5, imageSize.width, imageSize.height);
- [fCheckImage drawInRect: rect fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0];
}
}
}
Index: macosx/en.lproj/PrefsWindow.nib/info.nib
===================================================================
--- macosx/en.lproj/PrefsWindow.nib/info.nib (revision 3202)
+++ macosx/en.lproj/PrefsWindow.nib/info.nib (working copy)
@@ -3,17 +3,17 @@
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
- <string>32 103 356 240 0 0 1680 1028 </string>
+ <string>22 70 356 240 0 0 1280 778 </string>
<key>IBEditorPositions</key>
<dict>
<key>153</key>
- <string>558 568 563 268 0 0 1680 1028 </string>
+ <string>358 386 563 268 0 0 1280 778 </string>
<key>28</key>
- <string>558 545 563 314 0 0 1680 1028 </string>
+ <string>358 363 563 314 0 0 1280 778 </string>
<key>41</key>
- <string>558 550 563 305 0 0 1680 1028 </string>
+ <string>243 341 563 342 0 0 1280 778 </string>
<key>66</key>
- <string>558 578 563 249 0 0 1680 1028 </string>
+ <string>358 395 563 249 0 0 1280 778 </string>
</dict>
<key>IBFramework Version</key>
<string>446.1</string>
@@ -24,8 +24,11 @@
<key>IBOpenObjects</key>
<array>
<integer>66</integer>
+ <integer>41</integer>
+ <integer>153</integer>
+ <integer>28</integer>
</array>
<key>IBSystem Version</key>
- <string>8R4031</string>
+ <string>8R2218</string>
</dict>
</plist>
Index: macosx/en.lproj/PrefsWindow.nib/keyedobjects.nib
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: macosx/Controller.m
===================================================================
--- macosx/Controller.m (revision 3202)
+++ macosx/Controller.m (working copy)
@@ -225,7 +225,7 @@
//set table size
if ([fDefaults boolForKey: @"SmallView"])
[fTableView setRowHeight: ROW_HEIGHT_SMALL];
-
+
//window min height
NSSize contentMinSize = [fWindow contentMinSize];
contentMinSize.height = [[fWindow contentView] frame].size.height - [fScrollView frame].size.height