From: Kent Sutherland Date: Fri, 14 Nov 2003 00:30:54 +0000 (+0000) Subject: Initial hookup of the new positioning into MT. The corner effects work, X-Git-Tag: v1.2~37 X-Git-Url: http://git.ithinksw.org/MenuTunes.git/commitdiff_plain/6f6c21caaebee598943084dd66a15f21a7f65cb5 Initial hookup of the new positioning into MT. The corner effects work, except for pivot on the right side. There is no error checking to make sure that the effect and the position are a valid combo, so you can make some interesting things happen still. Have to add sanity checking in PreferencesController still. Look at EffectsSupport.txt in ITKit to see what is allowed where. --- diff --git a/English.lproj/Preferences.nib/info.nib b/English.lproj/Preferences.nib/info.nib index 3ef736f..670f459 100755 --- a/English.lproj/Preferences.nib/info.nib +++ b/English.lproj/Preferences.nib/info.nib @@ -20,8 +20,9 @@ IBOpenObjects 6 + 634 IBSystem Version - 7B85 + 7C107 diff --git a/English.lproj/Preferences.nib/keyedobjects.nib b/English.lproj/Preferences.nib/keyedobjects.nib index 695eb60..8563020 100755 Binary files a/English.lproj/Preferences.nib/keyedobjects.nib and b/English.lproj/Preferences.nib/keyedobjects.nib differ diff --git a/PreferencesController.m b/PreferencesController.m index 3fc842e..f5ffe1c 100755 --- a/PreferencesController.m +++ b/PreferencesController.m @@ -364,6 +364,7 @@ static PreferencesController *prefs = nil; if ( [sender tag] == 2010) { [df setInteger:[sender selectedRow] forKey:@"statusWindowVerticalPosition"]; [df setInteger:[sender selectedColumn] forKey:@"statusWindowHorizontalPosition"]; + [[StatusWindowController sharedController] readDefaults]; // update the window's position here } else if ( [sender tag] == 2020) { // update screen selection diff --git a/StatusWindowController.h b/StatusWindowController.h index 11d7fe8..7e9aae5 100755 --- a/StatusWindowController.h +++ b/StatusWindowController.h @@ -33,6 +33,8 @@ typedef enum { + (StatusWindowController *)sharedController; +- (void)readDefaults; + - (void)showUpcomingSongsWindowWithTitles:(NSArray *)titleStrings; - (void)showVolumeWindowWithLevel:(float)level; diff --git a/StatusWindowController.m b/StatusWindowController.m index 6c8841c..e28bf71 100755 --- a/StatusWindowController.m +++ b/StatusWindowController.m @@ -93,6 +93,14 @@ static StatusWindowController *sharedController; [super dealloc]; } +- (void)readDefaults +{ + ITHorizontalWindowPosition horizontalPosition = [[NSUserDefaults standardUserDefaults] integerForKey:@"statusWindowHorizontalPosition"]; + ITVerticalWindowPosition verticalPosition = [[NSUserDefaults standardUserDefaults] integerForKey:@"statusWindowVerticalPosition"]; + [_window setHorizontalPosition:horizontalPosition]; + [_window setVerticalPosition:verticalPosition]; +} + - (void)showSongInfoWindowWithSource:(ITMTRemotePlayerSource)source title: (NSString *)title album: (NSString *)album