Added multiscreen options. Doesn't save them across runs, but I'll add that.
authorKent Sutherland <ksuther@ithinksw.com>
Wed, 1 Dec 2004 02:38:13 +0000 (02:38 +0000)
committerKent Sutherland <ksuther@ithinksw.com>
Wed, 1 Dec 2004 02:38:13 +0000 (02:38 +0000)
Enabled the popup in the nib, and added code in prefscontroller to
populate it if needed.

English.lproj/Preferences.nib/classes.nib
English.lproj/Preferences.nib/keyedobjects.nib
PreferencesController.h
PreferencesController.m
StatusWindow.m

index 6405f45..0b64f56 100755 (executable)
@@ -45,6 +45,7 @@
                 positionMatrix = NSMatrix; 
                 ratingCheckbox = NSButton; 
                 runScriptsCheckbox = NSButton; 
+                screenPopup = NSPopUpButton; 
                 selectPlayerBox = NSBox; 
                 selectPlayerSheet = NSPanel; 
                 selectSharedPlayerButton = NSButton; 
index 026313a..82b46aa 100755 (executable)
Binary files a/English.lproj/Preferences.nib/keyedobjects.nib and b/English.lproj/Preferences.nib/keyedobjects.nib differ
index 844f4ed..aa4c1c6 100755 (executable)
@@ -48,6 +48,7 @@
     IBOutlet NSMatrix *positionMatrix;
     IBOutlet NSButton *ratingCheckbox;
     IBOutlet NSButton *runScriptsCheckbox;
+       IBOutlet NSPopUpButton *screenPopup;
     IBOutlet NSTextField *selectedPlayerTextField;
     IBOutlet NSBox *selectPlayerBox;
     IBOutlet NSPanel *selectPlayerSheet;
index 7e953d9..8d74cc7 100755 (executable)
@@ -464,7 +464,9 @@ static PreferencesController *prefs = nil;
     } else if ( [sender tag] == 2020) {
     
         // Update screen selection.
-        
+               [[StatusWindow sharedWindow] setScreen:[[NSScreen screens] objectAtIndex:[sender indexOfSelectedItem]]];
+        [(MainController *)controller showCurrentTrackInfo];
+               
     } else if ( [sender tag] == 2030) {
     
         [self setStatusWindowEntryEffect:[[sender selectedItem] representedObject]];
@@ -781,7 +783,8 @@ static PreferencesController *prefs = nil;
     NSData         *colorData;
     int selectedBGStyle;
     id anItem;
-    
+    NSArray *screens = [NSScreen screens];
+       
     [df setInteger:MT_CURRENT_VERSION forKey:@"appVersion"];
     
     ITDebugLog(@"Setting up preferences UI.");
@@ -800,6 +803,18 @@ static PreferencesController *prefs = nil;
         }
     }
     
+       ITDebugLog(@"Setting up screen popup");
+       if ([screens count] > 1) {
+               int i;
+               [screenPopup setEnabled:YES];
+               for (i = 0; i < [screens count]; i++) {
+                       NSScreen *screen = [screens objectAtIndex:i];
+                       if (![screen isEqual:[NSScreen mainScreen]]) {
+                               [screenPopup addItemWithTitle:[NSString stringWithFormat:@"Screen %i", i + 1]];
+                       }
+               }
+       }
+       
     ITDebugLog(@"Setting up track info checkboxes.");
     // Check current track info buttons
     [albumCheckbox setState:[df boolForKey:@"showAlbum"] ? NSOnState : NSOffState];
index 9c8888a..253f075 100755 (executable)
@@ -53,7 +53,7 @@
 
 - (void)dealloc
 {
-    [_image     release];
+    [_image release];
     [super dealloc];
 }
 
@@ -80,7 +80,6 @@
     _sizing = newSizing;
 }
 
-
 /*************************************************************************/
 #pragma mark -
 #pragma mark INSTANCE METHODS
     ITImageView *imageView;
     BOOL         shouldAnimate = ( ! (([self visibilityState] == ITWindowAppearingState) ||
                                       ([self visibilityState] == ITWindowVanishingState)) );
-        
+       
     if ( _sizing == ITTransientStatusWindowSmall ) {
         divisor = SMALL_DIVISOR;
     } else if ( _sizing == ITTransientStatusWindowMini ) {