- if (flag) {
- NSDictionary *itemDict = [NSDictionary dictionaryWithObjectsAndKeys:
- [[NSBundle mainBundle] bundlePath], @"Path",
- [NSNumber numberWithInt:0], @"Hide", nil];
- [loginarray addObject:itemDict];
- } else {
- int i;
- for (i = 0; i < [loginarray count]; i++) {
- NSDictionary *tempDict = [loginarray objectAtIndex:i];
- if ([[[tempDict objectForKey:@"Path"] lastPathComponent] isEqualToString:[[[NSBundle mainBundle] bundlePath] lastPathComponent]]) {
- [loginarray removeObjectAtIndex:i];
- break;
- }
+ float time = ([df floatForKey:@"statusWindowAppearanceSpeed"] ? [df floatForKey:@"statusWindowAppearanceSpeed"] : 0.8);
+ [df setObject:NSStringFromClass(effectClass) forKey:@"statusWindowAppearanceEffect"];
+
+ [sw setEntryEffect:[[[effectClass alloc] initWithWindow:sw] autorelease]];
+ [[sw entryEffect] setEffectTime:time];
+}
+
+- (void)setStatusWindowExitEffect:(Class)effectClass
+{
+ StatusWindow *sw = [StatusWindow sharedWindow];
+
+ float time = ([df floatForKey:@"statusWindowVanishSpeed"] ? [df floatForKey:@"statusWindowVanishSpeed"] : 0.8);
+ [df setObject:NSStringFromClass(effectClass) forKey:@"statusWindowVanishEffect"];
+
+ [sw setExitEffect:[[[effectClass alloc] initWithWindow:sw] autorelease]];
+ [[sw exitEffect] setEffectTime:time];
+}
+
+- (void)setCustomColor:(NSColor *)color updateWell:(BOOL)update
+{
+ [(ITTSWBackgroundView *)[[StatusWindow sharedWindow] contentView] setBackgroundColor:color];
+ [df setObject:[NSArchiver archivedDataWithRootObject:color] forKey:@"statusWindowBackgroundColor"];
+
+ if ( update ) {
+ [backgroundColorWell setColor:color];
+ }
+}
+
+- (void)repopulateEffectPopupsForVerticalPosition:(ITVerticalWindowPosition)vPos horizontalPosition:(ITHorizontalWindowPosition)hPos
+{
+ NSEnumerator *effectEnum = [effectClasses objectEnumerator];
+ id anItem;
+
+ [appearanceEffectPopup removeAllItems];
+ [vanishEffectPopup removeAllItems];
+
+ while ( (anItem = [effectEnum nextObject]) ) {
+ [appearanceEffectPopup addItemWithTitle:[anItem effectName]];
+ [vanishEffectPopup addItemWithTitle:[anItem effectName]];
+
+ [[appearanceEffectPopup lastItem] setRepresentedObject:anItem];
+ [[vanishEffectPopup lastItem] setRepresentedObject:anItem];
+
+ if ( [self effect:anItem supportsVerticalPosition:vPos withHorizontalPosition:hPos] ) {
+ [[appearanceEffectPopup lastItem] setEnabled:YES];
+ [[vanishEffectPopup lastItem] setEnabled:YES];
+ } else {
+ [[appearanceEffectPopup lastItem] setEnabled:NO];
+ [[vanishEffectPopup lastItem] setEnabled:NO];