Added a reset prefs status window for when the user first upgrades to 1.2
authorKent Sutherland <ksuther@ithinksw.com>
Sat, 20 Dec 2003 03:21:22 +0000 (03:21 +0000)
committerKent Sutherland <ksuther@ithinksw.com>
Sat, 20 Dec 2003 03:21:22 +0000 (03:21 +0000)
MainController.m
StatusWindowController.h
StatusWindowController.m
libValidate.a

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];
index a57c128..ab96a26 100755 (executable)
@@ -40,6 +40,7 @@ typedef enum {
 - (void)showSetupQueryWindow;
 - (void)showRegistrationQueryWindow;
 - (void)showReconnectQueryWindow;
+- (void)showPreferencesUpdateWindow;
 
 - (void)showSongInfoWindowWithSource:(ITMTRemotePlayerSource)source
                                title:            (NSString *)title
index 0a83819..5cac976 100755 (executable)
@@ -276,4 +276,21 @@ static StatusWindowController *sharedController;
     [_window setLocked:YES];
 }
 
+- (void)showPreferencesUpdateWindow
+{
+    NSString *message = @"The new features in this version of MenuTunes\nrequire you to reconfigure your preferences.";
+
+    [_window setImage:[NSImage imageNamed:@"Setup"]];
+    [_window setSizing:(StatusWindowSizing)[df integerForKey:@"statusWindowSizing"]];
+    [_window buildDialogWindowWithMessage:message
+                            defaultButton:@"Show Preferences"
+                          alternateButton:@"OK"
+                                   target:[MainController sharedController]
+                            defaultAction:@selector(showPreferencesAndClose)
+                          alternateAction:@selector(cancelReconnect)];
+
+    [_window appear:self];
+    [_window setLocked:YES];
+}
+
 @end
\ No newline at end of file
index 7424448..a795800 100755 (executable)
Binary files a/libValidate.a and b/libValidate.a differ