Added a reset prefs status window for when the user first upgrades to 1.2
[MenuTunes.git] / MainController.m
index 9313f11..2ac5ac6 100755 (executable)
@@ -55,6 +55,12 @@ static MainController *sharedController;
         SetITDebugMode(YES);
     }
     
+    if (![df stringForKey:@"appVersion"]) {
+        [df removePersistentDomainForName:@"com.ithinksw.menutunes"];
+        [df setObject:@"1.2" forKey:@"appVersion"];
+        [[StatusWindowController sharedController] showPreferencesUpdateWindow];
+    }
+    
     currentRemote = [self loadRemote];
     [[self currentRemote] begin];
     
@@ -476,6 +482,15 @@ static MainController *sharedController;
     [[PreferencesController sharedPrefs] showPrefsWindow:self];
 }
 
+- (void)showPreferencesAndClose
+{
+    ITDebugLog(@"Show preferences.");
+    [[PreferencesController sharedPrefs] showPrefsWindow:self];
+    [[StatusWindow sharedWindow] setLocked:NO];
+    [[StatusWindow sharedWindow] vanish:self];
+    [[StatusWindow sharedWindow] setIgnoresMouseEvents:YES];
+}
+
 - (void)showTestWindow
 {
     [self showCurrentTrackInfo];