Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // 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
Add Comment
Please, Sign In to add comment