git.ithinksw.org
/
MenuTunes.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed the problem with canciling reg to keep MT running. Need to block
[MenuTunes.git]
/
MTBlingController.m
diff --git
a/MTBlingController.m
b/MTBlingController.m
index
bc20477
..
eeb7174
100755
(executable)
--- a/
MTBlingController.m
+++ b/
MTBlingController.m
@@
-8,6
+8,7
@@
#import "MTBlingController.h"
#import "MTeSerialNumber.h"
#import "MTBlingController.h"
#import "MTeSerialNumber.h"
+#import "MainController.h"
#define APP_SUPPORT_PATH_STRING [@"~/Library/Application Support/MenuTunes/" stringByExpandingTildeInPath]
#define LICENSE_PATH_STRING [APP_SUPPORT_PATH_STRING stringByAppendingString:@"/.license"]
#define APP_SUPPORT_PATH_STRING [@"~/Library/Application Support/MenuTunes/" stringByExpandingTildeInPath]
#define LICENSE_PATH_STRING [APP_SUPPORT_PATH_STRING stringByAppendingString:@"/.license"]
@@
-31,6
+32,9
@@
- (void)_IT {}
- (void)_YOU {}
- (void)_TIGHTWAD {}
- (void)_IT {}
- (void)_YOU {}
- (void)_TIGHTWAD {}
+- (void)_HAHAHA {}
+- (void)_LOLOL {}
+- (void)_FIVERSKATES {}
- (id)init
{
- (id)init
{
@@
-46,10
+50,11
@@
if ( ! window ) {
window = [MTShizzleWindow sharedWindowForSender:self];
}
if ( ! window ) {
window = [MTShizzleWindow sharedWindowForSender:self];
}
-
+ [NSApp activateIgnoringOtherApps:YES];
[window center];
[window center];
- [window makeKeyAndOrderFront:nil];
- [window setLevel:NSStatusWindowLevel];
+ [window orderFrontRegardless];
+ [window makeKeyWindow];
+// [window setLevel:NSStatusWindowLevel];
}
- (void)showPanelIfNeeded
}
- (void)showPanelIfNeeded
@@
-71,6
+76,9
@@
- (void)registerLater:(id)sender
{
[window orderOut:self];
- (void)registerLater:(id)sender
{
[window orderOut:self];
+ if ([[NSDate date] timeIntervalSinceDate:[[MainController sharedController] getBlingTime]] >= 604800) {
+ [NSApp terminate:nil];
+ }
}
- (void)verifyKey:(id)sender
}
- (void)verifyKey:(id)sender
@@
-82,7
+90,7
@@
name:o
extra:nil
publisher:@"04611"] autorelease];
name:o
extra:nil
publisher:@"04611"] autorelease];
- if (
[s isValid] == ITeSerialNumberIsValid && ( [[s infoDictionary] objectForKey:@"appIdentifier"] == @"MT"
) ) {
+ if (
([s isValid] == ITeSerialNumberIsValid) && ( [[[s infoDictionary] objectForKey:@"appIdentifier"] isEqualToString:@"MT"]
) ) {
NSFileManager *fm = [NSFileManager defaultManager];
NSFileManager *fm = [NSFileManager defaultManager];
@@
-115,7
+123,7
@@
nil, nil, nil,
NSLocalizedString(@"failed_msg", @"Failed Message"));
}
nil, nil, nil,
NSLocalizedString(@"failed_msg", @"Failed Message"));
}
-
+ [[MainController sharedController] blingTime];
}
- (int)checkKeyFile
}
- (int)checkKeyFile
@@
-124,7
+132,7
@@
MTeSerialNumber *k = [[[MTeSerialNumber alloc] initWithContentsOfFile:p
extra:@""
publisher:@"04611"] autorelease];
MTeSerialNumber *k = [[[MTeSerialNumber alloc] initWithContentsOfFile:p
extra:@""
publisher:@"04611"] autorelease];
- if ( k &&
[k isValid] == ITeSerialNumberIsValid && ( [[k infoDictionary] objectForKey:@"appIdentifier"] == @"MT"
)) {
+ if ( k &&
([k isValid] == ITeSerialNumberIsValid) && ( [[[k infoDictionary] objectForKey:@"appIdentifier"] isEqualToString:@"MT"]
)) {
return 7465;
} else {
[[NSFileManager defaultManager] removeFileAtPath:p handler:nil];
return 7465;
} else {
[[NSFileManager defaultManager] removeFileAtPath:p handler:nil];
@@
-135,6
+143,13
@@
- (int)checkDone
{
- (int)checkDone
{
+ if ( ! (checkDone == 2475) ) {
+ if ( ! ([self checkKeyFile] == 7465) ) {
+ checkDone = 0;
+ } else {
+ checkDone = 2475;
+ }
+ }
return checkDone;
}
return checkDone;
}