mirror of
https://github.com/transmission/transmission
synced 2024-12-25 17:17:31 +00:00
trivial changes
This commit is contained in:
parent
389439e552
commit
5b2f63e781
5 changed files with 17 additions and 16 deletions
|
@ -47,7 +47,7 @@ AboutWindowController * fAboutBoxInstance = nil;
|
|||
[[NSBundle mainBundle] pathForResource: @"Credits" ofType: @"rtf"] documentAttributes: nil] autorelease]];
|
||||
|
||||
//size license button
|
||||
float oldButtonWidth = [fLicenseButton frame].size.width;
|
||||
CGFloat oldButtonWidth = [fLicenseButton frame].size.width;
|
||||
|
||||
[fLicenseButton setTitle: NSLocalizedString(@"License", "About window -> license button")];
|
||||
[fLicenseButton sizeToFit];
|
||||
|
|
|
@ -29,12 +29,12 @@
|
|||
{
|
||||
tr_handle * fLib;
|
||||
|
||||
int fCompleted;
|
||||
NSInteger fCompleted;
|
||||
|
||||
//tiger-only fields
|
||||
NSImage * fDockIcon, * fBadge;
|
||||
NSDictionary * fAttributes;
|
||||
int fCompletedBadged;
|
||||
NSInteger fCompletedBadged;
|
||||
BOOL fSpeedBadge, fQuittingTiger;
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
{
|
||||
[fButton setTitle: NSLocalizedString(@"Cancel", "Blocklist -> cancel button")];
|
||||
|
||||
float oldWidth = [fButton frame].size.width;
|
||||
CGFloat oldWidth = [fButton frame].size.width;
|
||||
[fButton sizeToFit];
|
||||
NSRect buttonFrame = [fButton frame];
|
||||
buttonFrame.size.width += 12.0; //sizeToFit sizes a bit too small
|
||||
|
|
|
@ -36,7 +36,7 @@ typedef enum
|
|||
{
|
||||
id fDelegate;
|
||||
port_status_t fStatus;
|
||||
int fPortNumber;
|
||||
NSInteger fPortNumber;
|
||||
|
||||
NSURLConnection * fConnection;
|
||||
NSMutableData * fPortProbeData;
|
||||
|
@ -44,10 +44,9 @@ typedef enum
|
|||
NSTimer * fTimer;
|
||||
}
|
||||
|
||||
- (id) initForPort: (int) portNumber delay: (BOOL) delay withDelegate: (id) delegate;
|
||||
- (id) initForPort: (NSInteger) portNumber delay: (BOOL) delay withDelegate: (id) delegate;
|
||||
- (void) cancelProbe;
|
||||
|
||||
- (void) callBackWithStatus: (port_status_t) status;
|
||||
- (port_status_t) status;
|
||||
|
||||
@end
|
||||
|
|
|
@ -32,11 +32,13 @@
|
|||
|
||||
- (void) startProbe;
|
||||
|
||||
- (void) callBackWithStatus: (port_status_t) status;
|
||||
|
||||
@end
|
||||
|
||||
@implementation PortChecker
|
||||
|
||||
- (id) initForPort: (int) portNumber delay: (BOOL) delay withDelegate: (id) delegate
|
||||
- (id) initForPort: (NSInteger) portNumber delay: (BOOL) delay withDelegate: (id) delegate
|
||||
{
|
||||
if ((self = [super init]))
|
||||
{
|
||||
|
@ -77,14 +79,6 @@
|
|||
[fConnection cancel];
|
||||
}
|
||||
|
||||
- (void) callBackWithStatus: (port_status_t) status
|
||||
{
|
||||
fStatus = status;
|
||||
|
||||
if (fDelegate && [fDelegate respondsToSelector: @selector(portCheckerDidFinishProbing:)])
|
||||
[fDelegate performSelectorOnMainThread: @selector(portCheckerDidFinishProbing:) withObject: self waitUntilDone: NO];
|
||||
}
|
||||
|
||||
- (void) connection: (NSURLConnection *) connection didReceiveResponse: (NSURLResponse *) response
|
||||
{
|
||||
[fPortProbeData setLength: 0];
|
||||
|
@ -149,5 +143,13 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (void) callBackWithStatus: (port_status_t) status
|
||||
{
|
||||
fStatus = status;
|
||||
|
||||
if (fDelegate && [fDelegate respondsToSelector: @selector(portCheckerDidFinishProbing:)])
|
||||
[fDelegate performSelectorOnMainThread: @selector(portCheckerDidFinishProbing:) withObject: self waitUntilDone: NO];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
|
Loading…
Reference in a new issue