Hack to stop all sliding in PBX
Hack to stop all sliding in PBX
- Subject: Hack to stop all sliding in PBX
- From: Bill Bumgarner <email@hidden>
- Date: Sun, 23 Dec 2001 14:29:30 -0500
The very tiny and completely unsuppored/unwarrantied hacque that can be
downloaded from...
http://www.codefab.com/unsupported/PBXNoSlide.tgz
... eliminates all sliding within the Project Builder UI. There is a
default....
defaults write com.apple.ProjectBuilder PBXSlidingTabsSlide NO
... that will turn off sliding for all non-mouse-click initiated tab
changes, but the UI still slides for mouse clicks. With the hack
installed, sliding never happens-- not by mouse click, not by hot key, not
by some automatic action.
The bundle was compiled/built against the Project Builder as provided by
the December Dev Tools. It may not work against any other version. It
may not work anywhere but on my machine, for that matter. Source is
included. Use at your own risk; it is a completely unsupported and
fairly nasty, but very simple.
b.bum
For the curious:
@implementation HackHackHackHack
IMP orig_replaceSubview_slide_;
+ (void) load
{
Class slideClass = NSClassFromString(@"PBXSlideOutTabView");
Class hackClass = NSClassFromString(@"HackHackHackHack");
Method originalMethod;
Method replacementMethod;
NSLog(@"Installing PBX no slide hacque...");
originalMethod = class_getInstanceMethod(slideClass,
@selector(replaceSubview:with:slide:));
replacementMethod = class_getInstanceMethod(hackClass,
@selector(replaceSubview:with:slide:));
orig_replaceSubview_slide_ = originalMethod->method_imp;
originalMethod->method_imp = replacementMethod->method_imp;
}
- (void)replaceSubview:fp12 with:fp16 slide:(char)fp20;
{
orig_replaceSubview_slide_(self, _cmd, fp12, fp16, 0);
}
@end