More small changes, including to window placement.

This commit is contained in:
Mitchell Livingston 2006-10-21 20:41:10 +00:00
parent baee0d4398
commit 5b882ce015
7 changed files with 27 additions and 20 deletions

View File

@ -3,7 +3,7 @@
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>IBDocumentLocation</key> <key>IBDocumentLocation</key>
<string>69 61 356 240 0 0 1152 842 </string> <string>58 51 356 240 0 0 1024 746 </string>
<key>IBEditorPositions</key> <key>IBEditorPositions</key>
<dict> <dict>
<key>549</key> <key>549</key>

View File

@ -13,7 +13,7 @@
<key>1603</key> <key>1603</key>
<string>337 545 477 67 0 0 1152 842 </string> <string>337 545 477 67 0 0 1152 842 </string>
<key>29</key> <key>29</key>
<string>280 699 451 44 0 0 1152 842 </string> <string>229 615 451 44 0 0 1024 746 </string>
<key>456</key> <key>456</key>
<string>340 316 240 225 0 0 1024 746 </string> <string>340 316 240 225 0 0 1024 746 </string>
<key>581</key> <key>581</key>
@ -24,15 +24,13 @@
<key>IBFramework Version</key> <key>IBFramework Version</key>
<string>446.1</string> <string>446.1</string>
<key>IBLockedObjects</key> <key>IBLockedObjects</key>
<array> <array/>
<integer>21</integer>
</array>
<key>IBOldestOS</key> <key>IBOldestOS</key>
<integer>3</integer> <integer>3</integer>
<key>IBOpenObjects</key> <key>IBOpenObjects</key>
<array> <array>
<integer>29</integer>
<integer>21</integer> <integer>21</integer>
<integer>29</integer>
</array> </array>
<key>IBSystem Version</key> <key>IBSystem Version</key>
<string>8L127</string> <string>8L127</string>

Binary file not shown.

View File

@ -59,14 +59,20 @@
@implementation InfoWindowController @implementation InfoWindowController
- (id) initWithWindowNibName: (NSString *) name
{
if ((self = [super initWithWindowNibName: name]))
{
fAppIcon = [[NSApp applicationIconImage] copy];
fDotGreen = [NSImage imageNamed: @"GreenDot.tiff"];
fDotRed = [NSImage imageNamed: @"RedDot.tiff"];
fCheckImage = [NSImage imageNamed: @"NSMenuCheckmark"];
}
return self;
}
- (void) awakeFromNib - (void) awakeFromNib
{ {
fAppIcon = [[NSApp applicationIconImage] copy];
fDotGreen = [NSImage imageNamed: @"GreenDot.tiff"];
fDotRed = [NSImage imageNamed: @"RedDot.tiff"];
fCheckImage = [NSImage imageNamed: @"NSMenuCheckmark"];
fTorrents = [[NSArray alloc] init];
fPeers = [[NSMutableArray alloc] initWithCapacity: 30]; fPeers = [[NSMutableArray alloc] initWithCapacity: 30];
fFiles = [[NSMutableArray alloc] initWithCapacity: 6]; fFiles = [[NSMutableArray alloc] initWithCapacity: 6];
[fFileTable setDoubleAction: @selector(revealFile:)]; [fFileTable setDoubleAction: @selector(revealFile:)];
@ -107,7 +113,8 @@
- (void) updateInfoForTorrents: (NSArray *) torrents - (void) updateInfoForTorrents: (NSArray *) torrents
{ {
[fTorrents release]; if (fTorrents)
[fTorrents release];
fTorrents = [torrents retain]; fTorrents = [torrents retain];
int numberSelected = [fTorrents count]; int numberSelected = [fTorrents count];

View File

@ -72,6 +72,8 @@
- (void) awakeFromNib - (void) awakeFromNib
{ {
[[self window] center];
int level = [[NSUserDefaults standardUserDefaults] integerForKey: @"MessageLevel"]; int level = [[NSUserDefaults standardUserDefaults] integerForKey: @"MessageLevel"];
if (level == TR_MSG_ERR) if (level == TR_MSG_ERR)
[fLevelButton selectItemAtIndex: LEVEL_ERROR]; [fLevelButton selectItemAtIndex: LEVEL_ERROR];

View File

@ -68,6 +68,13 @@
fDefaults = [NSUserDefaults standardUserDefaults]; fDefaults = [NSUserDefaults standardUserDefaults];
fHandle = handle; fHandle = handle;
//checks for old version upload speed of -1
if ([fDefaults integerForKey: @"UploadLimit"] < 0)
{
[fDefaults setInteger: 20 forKey: @"UploadLimit"];
[fDefaults setBool: NO forKey: @"CheckUpload"];
}
[[self window] update]; //make sure nib is loaded right away [[self window] update]; //make sure nib is loaded right away
} }
return self; return self;
@ -137,13 +144,6 @@
fNatStatusTimer = [NSTimer scheduledTimerWithTimeInterval: 5.0 target: self fNatStatusTimer = [NSTimer scheduledTimerWithTimeInterval: 5.0 target: self
selector: @selector(updateNatStatus) userInfo: nil repeats: YES]; selector: @selector(updateNatStatus) userInfo: nil repeats: YES];
//checks for old version upload speed of -1
if ([fDefaults integerForKey: @"UploadLimit"] < 0)
{
[fDefaults setInteger: 20 forKey: @"UploadLimit"];
[fDefaults setBool: NO forKey: @"CheckUpload"];
}
//set upload limit //set upload limit
BOOL checkUpload = [fDefaults boolForKey: @"CheckUpload"]; BOOL checkUpload = [fDefaults boolForKey: @"CheckUpload"];
int uploadLimit = [fDefaults integerForKey: @"UploadLimit"]; int uploadLimit = [fDefaults integerForKey: @"UploadLimit"];