Skip to content

Commit

Permalink
prevent the Command Builder from responding to notifications meant fo…
Browse files Browse the repository at this point in the history
…r the main interface
  • Loading branch information
skurfer committed Apr 10, 2012
1 parent 025b235 commit 292ecd3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Quicksilver/Code-QuickStepInterface/QSCommandBuilder.m
Expand Up @@ -10,15 +10,15 @@ - (id)init {
}
- (void)windowDidLoad {
[super windowDidLoad];
[dSelector setDropMode:QSSelectDropMode];
[aSelector setDropMode:QSRejectDropMode];
[iSelector setDropMode:QSSelectDropMode];
NSArray *theControls = [NSArray arrayWithObjects:dSelector, aSelector, iSelector, nil];
for(QSSearchObjectView *theControl in theControls) {
[theControl setDropMode:QSSelectDropMode];
QSObjectCell *theCell = [theControl cell];
[theCell setHighlightColor:[NSColor lightGrayColor]];
[theCell setTextColor:[NSColor blackColor]];
}
// don't observe notifications meant for the main interface
[self ignoreInterfaceNotifications];
}

- (IBAction)hideWindows:(id)sender {
Expand Down
Expand Up @@ -95,4 +95,5 @@
- (void)setPreview:(BOOL)flag;

- (void)clearObjectView:(QSSearchObjectView *)view;
- (void)ignoreInterfaceNotifications;
@end
8 changes: 8 additions & 0 deletions Quicksilver/Code-QuickStepInterface/QSInterfaceController.m
Expand Up @@ -468,6 +468,14 @@ - (void)clear:(NSTimer *)timer {
[self updateActionsNow];
}

- (void)ignoreInterfaceNotifications
{
// subclasses (namely the Command Builder) need a way to overlook notifications meant for the main interface
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
[nc removeObserver:self name:@"QSSourceArrayCreated" object:nil];
[nc removeObserver:self name:@"QSSourceArrayUpdated" object:nil];
}

#pragma mark -
#pragma mark NSWindow
#pragma mark Delegate
Expand Down

0 comments on commit 292ecd3

Please sign in to comment.