Set click point before displaying so that mouse up on a button instantly
deselects it. Store application icon when first loaded so it doesn't have badges on it. Move a few things into the nib file Put ellipis at end of name / tracker / announce if it doesn't fit
This commit is contained in:
parent
bd8dc9752c
commit
10ce5c72c6
|
@ -67,6 +67,7 @@
|
|||
IBOutlet NSTextField * fInfoLeechers;
|
||||
IBOutlet NSTextField * fInfoDownloaded;
|
||||
IBOutlet NSTextField * fInfoUploaded;
|
||||
NSImage * fAppIcon;
|
||||
|
||||
io_connect_t fRootPort;
|
||||
NSArray * fFilenames;
|
||||
|
|
|
@ -64,18 +64,17 @@ static void sleepCallBack( void * controller, io_service_t y,
|
|||
{
|
||||
[fTorrents release];
|
||||
tr_close( fLib );
|
||||
[fAppIcon release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void) awakeFromNib
|
||||
{
|
||||
[fWindow setContentMinSize: NSMakeSize( 400, 120 )];
|
||||
fAppIcon = [[NSApp applicationIconImage] copy];
|
||||
|
||||
[fPrefsController setPrefsWindow: fLib];
|
||||
fDefaults = [NSUserDefaults standardUserDefaults];
|
||||
|
||||
[fInfoPanel setFrameAutosaveName:@"InfoPanel"];
|
||||
|
||||
//check advanced bar menu item
|
||||
[fAdvancedBarItem setState: [fDefaults
|
||||
boolForKey:@"UseAdvancedBar"] ? NSOnState : NSOffState];
|
||||
|
@ -176,14 +175,14 @@ static void sleepCallBack( void * controller, io_service_t y,
|
|||
|
||||
- (BOOL) windowShouldClose: (id) sender
|
||||
{
|
||||
[fWindow orderOut: NULL];
|
||||
[fWindow orderOut: nil];
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (BOOL) applicationShouldHandleReopen: (NSApplication *) app
|
||||
hasVisibleWindows: (BOOL) flag
|
||||
{
|
||||
[self showMainWindow: NULL];
|
||||
[self showMainWindow: nil];
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
@ -561,8 +560,8 @@ static void sleepCallBack( void * controller, io_service_t y,
|
|||
|
||||
if( row < 0 )
|
||||
{
|
||||
[fInfoImageView setImage: [NSApp applicationIconImage]];
|
||||
[fInfoName setStringValue: @"No torrent selected"];
|
||||
[fInfoImageView setImage: fAppIcon];
|
||||
[fInfoName setStringValue: @"No Torrent Selected"];
|
||||
[fInfoSize setStringValue: @""];
|
||||
[fInfoTracker setStringValue: @""];
|
||||
[fInfoAnnounce setStringValue: @""];
|
||||
|
@ -586,8 +585,7 @@ static void sleepCallBack( void * controller, io_service_t y,
|
|||
[fInfoAnnounce setStringValue: [torrent announce]];
|
||||
[fInfoPieceSize setStringValue: [NSString
|
||||
stringForFileSize: [torrent pieceSize]]];
|
||||
[fInfoPieces setStringValue: [NSString
|
||||
stringWithInt: [torrent pieceCount]]];
|
||||
[fInfoPieces setIntValue: [torrent pieceCount]];
|
||||
[fInfoHash1 setStringValue: [torrent hash1]];
|
||||
[fInfoHash2 setStringValue: [torrent hash2]];
|
||||
int seeders = [torrent seeders], leechers = [torrent leechers];
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<integer>3</integer>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>273</integer>
|
||||
<integer>21</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>8G1454</string>
|
||||
|
|
Binary file not shown.
|
@ -137,8 +137,8 @@
|
|||
}
|
||||
else;
|
||||
|
||||
[self display];
|
||||
fClickPoint = NSMakePoint( 0, 0 );
|
||||
[self display];
|
||||
}
|
||||
|
||||
- (NSMenu *) menuForEvent: (NSEvent *) e
|
||||
|
|
Loading…
Reference in New Issue