#import <arpa/inet.h>
#import <openssl/sha.h>
+#import <ITFoundation/ITFoundation.h>
+
#import <ITKit/ITHotKeyCenter.h>
#import <ITKit/ITKeyCombo.h>
#import <ITKit/ITKeyComboPanel.h>
#import <ITKit/ITKeyBroadcaster.h>
#import <ITKit/ITTSWBackgroundView.h>
+#import <ITKit/ITWindowEffect.h>
#import <ITKit/ITCutWindowEffect.h>
#import <ITKit/ITDissolveWindowEffect.h>
#import <ITKit/ITSlideHorizontallyWindowEffect.h>
- (void)setupCustomizationTables;
- (void)setupMenuItems;
- (void)setupUI;
+- (NSArray *)effectNamesFromDictionary:(NSDictionary *)infoDict;
- (void)setCustomColor:(NSColor *)color updateWell:(BOOL)update;
- (IBAction)changeMenus:(id)sender;
- (void)setLaunchesAtLogin:(BOOL)flag;
[self setCustomColor:[NSColor colorWithCalibratedWhite:0.15 alpha:0.70] updateWell:YES];
}
+ } else if ( [sender tag] == 2095) {
+ [sw vanish:self];
+ [df setInteger:[sender indexOfSelectedItem] forKey:@"statusWindowSizing"];
}
[df synchronize];
nil] forKey:@"menu"];
[df setInteger:5 forKey:@"SongsInAdvance"];
- // [df setBool:YES forKey:@"showName"]; // Song info will always show song title.
+// [df setBool:YES forKey:@"showName"]; // Song info will always show song title.
[df setBool:YES forKey:@"showArtist"];
[df setBool:NO forKey:@"showAlbum"];
[df setBool:NO forKey:@"showTime"];
- [df setInteger:2100 forKey:@"statusWindowAppearanceEffect"];
- [df setInteger:2101 forKey:@"statusWindowVanishEffect"];
+ [df setObject:@"ITCutWindowEffect" forKey:@"statusWindowAppearanceEffect"];
+ [df setObject:@"ITDissolveWindowEffect" forKey:@"statusWindowVanishEffect"];
[df setFloat:0.8 forKey:@"statusWindowAppearanceSpeed"];
[df setFloat:0.8 forKey:@"statusWindowVanishSpeed"];
[df setFloat:4.0 forKey:@"statusWindowVanishDelay"];
+ [df setInteger:(int)ITWindowPositionBottom forKey:@"statusWindowVerticalPosition"];
+ [df setInteger:(int)ITWindowPositionLeft forKey:@"statusWindowHorizontalPosition"];
[df setBool:YES forKey:@"showSongInfoOnChange"];
-
+
+ [df setObject:[NSArchiver archivedDataWithRootObject:[NSColor blueColor]] forKey:@"statusWindowBackgroundColor"];
+
[df synchronize];
loginWindow = [[df persistentDomainForName:@"loginwindow"] mutableCopy];
{
NSMutableDictionary *loginwindow;
NSMutableArray *loginarray;
- NSEnumerator *loginEnum, *keyArrayEnum;
- NSString *serverName;
+ NSEnumerator *loginEnum;
+ NSEnumerator *keyArrayEnum;
+ NSString *serverName;
+ NSData *colorData;
+ NSArray *effectClasses = [ITWindowEffect effectClasses];
+// NSEnumerator *effectEnum = [effectList objectEnumerator];
int selectedBGStyle;
id anItem;
// Setup the positioning controls
// Setup effects controls
+ // Populate the effects popups
+ [appearanceEffectPopup removeItemAtIndex:0];
+ [vanishEffectPopup removeItemAtIndex:0];
+ [appearanceEffectPopup addItemsWithTitles:[[effectList allValues] objectsForKey:@"Name"]]; // category method
+ [vanishEffectPopup addItemsWithTitles:[[effectList allValues] objectsForKey:@"Name"]]; // category method
+
+ // Attempt to find the pref'd effect in the list.
+ // If it's not there, use cut/dissolve.
+
+
[appearanceEffectPopup selectItem:[appearanceEffectPopup itemAtIndex:[appearanceEffectPopup indexOfItemWithTag:[df integerForKey:@"statusWindowAppearanceEffect"]]]];
[vanishEffectPopup selectItem:[vanishEffectPopup itemAtIndex:[vanishEffectPopup indexOfItemWithTag:[df integerForKey:@"statusWindowVanishEffect"]]]];
[appearanceSpeedSlider setFloatValue:-([df floatForKey:@"statusWindowAppearanceSpeed"])];
[vanishDelaySlider setFloatValue:[df floatForKey:@"statusWindowVanishDelay"]];
// Setup General Controls
-
selectedBGStyle = [df integerForKey:@"statusWindowBackgroundMode"];
[backgroundStylePopup selectItem:[backgroundStylePopup itemAtIndex:[backgroundStylePopup indexOfItemWithTag:selectedBGStyle]]];
[backgroundColorPopup setEnabled:NO];
}
- [backgroundColorWell setColor:(NSColor *)[NSUnarchiver unarchiveObjectWithData:[df dataForKey:@"statusWindowBackgroundColor"]]];
+ colorData = [df dataForKey:@"statusWindowBackgroundColor"];
+
+ if ( colorData ) {
+ [backgroundColorWell setColor:(NSColor *)[NSUnarchiver unarchiveObjectWithData:colorData]];
+ } else {
+ [backgroundColorWell setColor:[NSColor blueColor]];
+ }
+
[showOnChangeCheckbox setState:([df boolForKey:@"showSongInfoOnChange"] ? NSOnState : NSOffState)];
+
+ [windowSizingPopup selectItem:[windowSizingPopup itemAtIndex:[windowSizingPopup indexOfItemWithTag:[df integerForKey:@"statusWindowSizing"]]]];
// Setup the sharing controls
if ([df boolForKey:@"enableSharing"]) {
}
}
+- (NSArray *)effectNamesFromDictionary:(NSDictionary *)infoDict
+{
+
+}
+
- (IBAction)changeMenus:(id)sender
{
ITDebugLog(@"Synchronizing menus");