From: Kent Sutherland Date: Sat, 20 Dec 2003 03:21:22 +0000 (+0000) Subject: Added a reset prefs status window for when the user first upgrades to 1.2 X-Git-Tag: v1.2~8 X-Git-Url: http://git.ithinksw.org/MenuTunes.git/commitdiff_plain/5c68843e215011cab04f402cb4dc66bec3225081 Added a reset prefs status window for when the user first upgrades to 1.2 --- diff --git a/MainController.m b/MainController.m index 9313f11..2ac5ac6 100755 --- a/MainController.m +++ b/MainController.m @@ -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]; diff --git a/StatusWindowController.h b/StatusWindowController.h index a57c128..ab96a26 100755 --- a/StatusWindowController.h +++ b/StatusWindowController.h @@ -40,6 +40,7 @@ typedef enum { - (void)showSetupQueryWindow; - (void)showRegistrationQueryWindow; - (void)showReconnectQueryWindow; +- (void)showPreferencesUpdateWindow; - (void)showSongInfoWindowWithSource:(ITMTRemotePlayerSource)source title: (NSString *)title diff --git a/StatusWindowController.m b/StatusWindowController.m index 0a83819..5cac976 100755 --- a/StatusWindowController.m +++ b/StatusWindowController.m @@ -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 diff --git a/libValidate.a b/libValidate.a index 7424448..a795800 100755 Binary files a/libValidate.a and b/libValidate.a differ