Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting QS as scope does not work for triggers #174

Closed
sinewave opened this issue Apr 12, 2011 · 3 comments
Closed

Setting QS as scope does not work for triggers #174

sinewave opened this issue Apr 12, 2011 · 3 comments
Assignees
Labels

Comments

@sinewave
Copy link

Basically looking for a way to specify a trigger to only work when the QS command window is active. I have tried enabling both the Menu & Dock items however the only way i have been able to get this to work is if i have the QS prefs dialog in the bg so that Quicksilver is shown as the active application.

10.6.6
3841

@pjrobertson
Copy link
Member

Only important for people wishing to develop/fix this

I've looked into this quite a bit. It doesn't seem like it would be easily fixable.

The way in which the shelf and clipboard module can let you open them only when QS is open is by adding a menu item called 'Clipboard History' and when you run CMD + L when the QS is open what you're actually doing is pressing the shortcut for the menu item 'Clipboard History'. See if for yourself if you run QS with the Dock, then you can see the menu items under 'Plug-ins'.

The only way I can think of doing it with triggers is to either:
a) add a menu item on launch for each trigger which the corresponding modifier keys
b) somehow figure out how to tell if the QSUI is the frontMostWindow

I've tried: isKeyWindow, applicationIsFrontmost etc.
QS's 'appChanged' methods don't pick up anything to do with 'invisible' apps such as QS (nor does NSWorkspace's activeApplication)

Maybe the thing to do would be to add a new Obeserver to the [NSNotificationCenter defaultCenter] with something like QSCommandWindowIsActive.

We could then run, when the UI is activated:

[[NSNotificationCenter defaultCenter] postNotificationName:@"QSCommandWindowIsActive" object:self];

...as usual, whilst typing stuff I get a clearer picture in my head.

There are already:

InterfaceActivated notification in the IBAction 'showInterface' (QSInterfaceController) and
InterfaceDeactivated notification in the void 'willHideMainWindow' (QSInterfaceController)

If we could somehow tap into these notifications and see if InterfaceActivated is the case, then we'd be good to go!

@pjrobertson
Copy link
Member

Just to let anyone who's interested know, I've fixed this, and it should be in ß60.

But the whole Triggers stuff is a complete mess (hence why I think Alcor re-wrote Catalyst). I might look at Catalyst or just steal some things from it.

@pjrobertson
Copy link
Member

This will be fixed in ß61 - merged into master with 'Triggers' branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants