« android手机HTC Hero如何使用vpn | Main | "原理小解"读后感 »

修正Quicksilver的Trigger"无法保存"问题

作者:virushuo 发表于 2010-03-06 17:03 最后更新于 2010-03-06 17:03
版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本声明


Quicksilver 是 OS X上的神器。如果没有这个工具,OS X对我的吸引力至少降低1/3。强烈推荐给所有新用户使用,并且去youtube上看看其他用户使用这个工具
的视频,绝对大开眼界。

我推荐给笑来这个软件的时候,他说自定义的Trigger无法保存,一退出就没。我就试了一下,发现果然如此。这实在让人受不了。于是从svn拿了代码debug(这么强大的软件竟然是开源的)

很容易就在QSTriggerCenter.m找到了writeTriggers方法,其中performSelector的时候竟然是afterDelay:10.0,也就是说延迟10秒运行。这样创建了一堆触发器,如果没等够10秒退出了Quicksilver就不会保存了。

这地方的处理很奇怪,这地方保存的数据量和开销都很小,没必要延时。我就给改成了0,编译了一个版本出来。不一定适合所有人,所以也没向Quicksilver提交patch。

有兴趣自己修改的,可修改:
Quicksilver/Code-QuickStepCore/QSTriggerCenter.m

第144行

- (void)writeTriggers {
[self performSelector:@selector(writeTriggersNow) withObject:nil afterDelay:10.0 extend:YES];
}

把10.0修改成0.0就是立刻保存了,用XCode编译,然后把之前使用的Quicksilver中的Plugins目录( Quicksilver.app/Contents/PlugIns/ )复制过来,就可以正常使用了。

不想自己动手的可以下载我这个做好补丁,放入了基本的Plugi的版本 for 10.6 i368 http://dl.dropbox.com/u/3181901/Quicksilver.zip (请自行翻墙)

Comments

感谢感谢
另外如果有时间的话也想请博主试一下用qs来上传图片到flickr
我每次到最后上传的一步 就意外自动退出
一直不得其解
恳请帮忙

Thanks for sharing this post. This is a very helpful and informative material. Good post and keep it up. Websites are always helpful in one way or the other, that’s cool stuff, anyways, a good way to get started to renovate your dreams into the world of reality.I will write more in detail after my a+ certification very soon. Thanks!

Thanks for sharing this post. This is a very helpful and informative material. Good post and keep it up. Websites are always helpful in one way or the other, that’s cool stuff, anyways, a good way to get started to renovate your dreams into the world of reality.I will write more in detail after my a+ certification very soon. Thanks!

Thanks for sharing this post. This is a very helpful and informative material. Good post and keep it up. Websites are always helpful in one way or the other, that’s cool stuff, anyways, a good way to get started to renovate your dreams into the world of reality.I will write more in detail after my a+ certification very soon. Thanks!

如何重写writeTriggers,博主有高见没

Post a comment


about me:
me.jpg
CC License. Some rights reserved.
署名·非商业用途·保持一致
本站之所有未作特别说明的内容均使用 创作共用协议.
POWERED_BY_MT_3.2