X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/9c8f6e1b9b0b947d898a3d9bae3acb3999879791..fb7602562afcd4350ae64c7e2a81fdd7eb2b4a15:/MTShizzleWindow.m?ds=sidebyside diff --git a/MTShizzleWindow.m b/MTShizzleWindow.m index ede4cd2..53a3072 100755 --- a/MTShizzleWindow.m +++ b/MTShizzleWindow.m @@ -1,4 +1,5 @@ #import "MTShizzleWindow.h" +#import "MainController.h" @interface MTShizzleWindow (Private) - (void)setBling:(id)bling; @@ -32,11 +33,21 @@ static MTShizzleWindow *_privateSharedWindow = nil; styleMask:styleMask backing:backingType defer:flag]) ) { + [self setLevel:NSStatusWindowLevel]; [self buildWindow]; } return self; } +- (void)makeKeyAndOrderFront:(id)sender { + if ( ( [[NSDate date] timeIntervalSinceDate:[[MainController sharedController] getBlingTime]] >= 604800 ) && ([[regLater title] isEqualToString:@"Register Later"]) ) { + [regLater setTitle:@"Quit"]; + [regLater setTarget:[NSApplication sharedApplication]]; + [regLater setAction:@selector(terminate:)]; + } + [super makeKeyAndOrderFront:sender]; +} + - (void)dealloc { [regMessage release]; @@ -65,11 +76,11 @@ static MTShizzleWindow *_privateSharedWindow = nil; unichar returnChar = '\r'; [self setReleasedWhenClosed:NO]; - [self setTitle:[NSString stringWithFormat:@"Register %@", @"MenuTunes"]]; + [self setTitle:NSLocalizedString(@"registerMenuTunes", @"Register MenuTunes")]; contentView = [self contentView]; regMessage = [[NSTextField alloc] initWithFrame:NSMakeRect(20, 282, 345, 51)]; - [regMessage setStringValue:[NSString stringWithFormat:@"%@ is shareware. If you find it to be a valuable tool, please click the button below to buy your copy. Your support is greatly appreciated.", @"MenuTunes"]]; + [regMessage setStringValue:NSLocalizedString(@"sharewareMessage", @"MenuTunes is shareware. If you find it to be a valuable tool, please click the button below to buy your copy. Your support is greatly appreciated.")]; [regMessage setBordered:NO]; [regMessage setBezeled:NO]; [regMessage setEditable:NO]; @@ -93,17 +104,17 @@ static MTShizzleWindow *_privateSharedWindow = nil; [[box contentView] addSubview:registerButton]; regBenefits = [[NSTextField alloc] initWithFrame:NSMakeRect(152, 16, 175, 42)]; - [regBenefits setStringValue:[NSString stringWithUTF8String:"• Register instantly and easily.\n• Fast, secure transaction.\n• Major credit cards accepted."]]; + [regBenefits setStringValue:NSLocalizedString(@"regPoints", @"Registration Points")]; [regBenefits setBordered:NO]; [regBenefits setBezeled:NO]; [regBenefits setEditable:NO]; [regBenefits setSelectable:NO]; [regBenefits setDrawsBackground:NO]; - [regBenefits setFont:[NSFont fontWithName:@"Lucida Grande" size:11]]; + [regBenefits setFont:[NSFont fontWithName:@"LucidaGrande" size:11]]; [[box contentView] addSubview:regBenefits]; enterInfo = [[NSTextField alloc] initWithFrame:NSMakeRect(20, 148, 345, 17)]; - [enterInfo setStringValue:@"Please enter your registration information below."]; + [enterInfo setStringValue:NSLocalizedString(@"regInfo", @"Please enter your registration information below.")]; [enterInfo setBordered:NO]; [enterInfo setBezeled:NO]; [enterInfo setEditable:NO]; @@ -113,7 +124,7 @@ static MTShizzleWindow *_privateSharedWindow = nil; [contentView addSubview:enterInfo]; owner = [[NSTextField alloc] initWithFrame:NSMakeRect(20, 126, 345, 14)]; - [owner setStringValue:@"License Owner:"]; + [owner setStringValue:NSLocalizedString(@"licenseOwner", @"License Owner:")]; [owner setBordered:NO]; [owner setBezeled:NO]; [owner setEditable:NO]; @@ -123,7 +134,7 @@ static MTShizzleWindow *_privateSharedWindow = nil; [contentView addSubview:owner]; key = [[NSTextField alloc] initWithFrame:NSMakeRect(20, 82, 345, 14)]; - [key setStringValue:@"License Key:"]; + [key setStringValue:NSLocalizedString(@"licenseKey", @"License Key:")]; [key setBordered:NO]; [key setBezeled:NO]; [key setEditable:NO]; @@ -143,7 +154,7 @@ static MTShizzleWindow *_privateSharedWindow = nil; [contentView addSubview:keyEntry]; regLater = [[NSButton alloc] initWithFrame:NSMakeRect(138, 16, 116, 25)]; - [regLater setTitle:@"Register Later"]; + [regLater setTitle:NSLocalizedString(@"registerLater", @"Register Later")]; [regLater setFont:[NSFont systemFontOfSize:[NSFont systemFontSize]]]; [regLater setTarget:_sender]; [regLater setAction:@selector(registerLater:)]; @@ -151,7 +162,7 @@ static MTShizzleWindow *_privateSharedWindow = nil; [contentView addSubview:regLater]; verifyKey = [[NSButton alloc] initWithFrame:NSMakeRect(255, 16, 116, 25)]; - [verifyKey setTitle:@"Verify Key"]; + [verifyKey setTitle:NSLocalizedString(@"verifyKey", @"Verify Key")]; [verifyKey setFont:[NSFont systemFontOfSize:[NSFont systemFontSize]]]; [verifyKey setTarget:_sender]; [verifyKey setAction:@selector(verifyKey:)];