From 5c68843e215011cab04f402cb4dc66bec3225081 Mon Sep 17 00:00:00 2001 From: Kent Sutherland Date: Sat, 20 Dec 2003 03:21:22 +0000 Subject: [PATCH] Added a reset prefs status window for when the user first upgrades to 1.2 --- MainController.m | 15 +++++++++++++++ StatusWindowController.h | 1 + StatusWindowController.m | 17 +++++++++++++++++ libValidate.a | Bin 8032 -> 8032 bytes 4 files changed, 33 insertions(+) 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 7424448534b1f4e8255c0f520d49a6bbb7815813..a795800f40eca14eb3cf55f9405a838e6d869d12 100755 GIT binary patch delta 16 XcmaE0_rPv~EUTq~v6=ZsB|CWlG)o02 delta 16 XcmaE0_rPv~EUSfusinn6B|CWlG^YhM -- 2.20.1