Guest User

Untitled

a guest
Jul 20th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. //
  2. // ReederMacPatcherShareTwitter.m
  3. // ReederMacPatcher
  4. //
  5. // Created by moyashi on 11/01/16.
  6. // Copyright 2011 __MyCompanyName__. All rights reserved.
  7. //
  8.  
  9. #import "ReederMacPatcherShareTwitter.h"
  10.  
  11. @implementation NSViewController (ReederMacPatcherShareTwitter)
  12.  
  13. -(void)willPresentPostForm_SwizzledByReederMacPatcher {
  14. [self willPresentPostForm_SwizzledByReederMacPatcher];
  15. [self addText:[NSString stringWithFormat:@" \"%@\" ", [[self object]title]]];
  16. if ([[self object] shortening]) {
  17. [self addText:[[self object] shortenedUrl]];
  18. } else {
  19. [[self object] shortenUrlWithDelegate:self];
  20. viaReederMacPatcher = YES;
  21. }
  22. for (id element in [self postCells]) {
  23. if ([[element class] isEqual:objc_getClass("ShareFormButton")]) {
  24. [[element button] setKeyEquivalent:@"m"];
  25. [[element button] setKeyEquivalentModifierMask:NSCommandKeyMask];
  26. }
  27. }
  28. return;
  29. }
  30.  
  31. - (void)shareObjectDidShortenUrl_SwizzledByReederMacPatcher:(id)arg1 {
  32. [self shareObjectDidShortenUrl_SwizzledByReederMacPatcher:arg1];
  33. [self addText:[[self object] shortenedUrl]];
  34. /*
  35. if ([[self object] shortening]) {
  36. [self addText:[[self object] shortenedUrl]];
  37. } else {
  38. [self addText:[[self object] url]];
  39. }
  40. */
  41. if (viaReederMacPatcher) {
  42. [[[self textareaCellWithName:@"status"] input] setSelectedRange:NSMakeRange(0, 0)];
  43. viaReederMacPatcher = NO;
  44. }
  45. }
  46.  
  47. @end
Add Comment
Please, Sign In to add comment