Fixed the F13 key equivalent. Was showing up as F3
[MenuTunes.git] / MTBlingController.m
index d270412..7541747 100755 (executable)
@@ -8,6 +8,7 @@
 
 #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"]
@@ -82,7 +83,7 @@
                                                                    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];
         
                           nil, nil, nil,
                           NSLocalizedString(@"failed_msg", @"Failed Message"));
     }
-    
+    [[MainController sharedController] blingTime];
 }
 
 - (int)checkKeyFile
     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];
 
 - (int)checkDone
 {
+    if ( ! (checkDone == 2475) ) {
+        if ( ! ([self checkKeyFile] == 7465) ) {
+            checkDone = 0;
+        } else {
+            checkDone = 2475;
+        }
+    }
     return checkDone;
 }