Created
January 19, 2011 14:22
-
-
Save moyashi/786221 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ReederMacPatcherShareTwitter.m | |
// ReederMacPatcher | |
// | |
// Created by moyashi on 11/01/16. | |
// Copyright 2011 __MyCompanyName__. All rights reserved. | |
// | |
#import "ReederMacPatcherShareTwitter.h" | |
@implementation NSViewController (ReederMacPatcherShareTwitter) | |
-(void)willPresentPostForm_SwizzledByReederMacPatcher { | |
[self willPresentPostForm_SwizzledByReederMacPatcher]; | |
[self addText:[NSString stringWithFormat:@" \"%@\" ", [[self object]title]]]; | |
if ([[self object] shortening]) { | |
[self addText:[[self object] shortenedUrl]]; | |
} else { | |
[[self object] shortenUrlWithDelegate:self]; | |
viaReederMacPatcher = YES; | |
} | |
for (id element in [self postCells]) { | |
if ([[element class] isEqual:objc_getClass("ShareFormButton")]) { | |
[[element button] setKeyEquivalent:@"m"]; | |
[[element button] setKeyEquivalentModifierMask:NSCommandKeyMask]; | |
} | |
} | |
return; | |
} | |
- (void)shareObjectDidShortenUrl_SwizzledByReederMacPatcher:(id)arg1 { | |
[self shareObjectDidShortenUrl_SwizzledByReederMacPatcher:arg1]; | |
[self addText:[[self object] shortenedUrl]]; | |
/* | |
if ([[self object] shortening]) { | |
[self addText:[[self object] shortenedUrl]]; | |
} else { | |
[self addText:[[self object] url]]; | |
} | |
*/ | |
if (viaReederMacPatcher) { | |
[[[self textareaCellWithName:@"status"] input] setSelectedRange:NSMakeRange(0, 0)]; | |
viaReederMacPatcher = NO; | |
} | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment