diff --git a/AccessToken.h b/AccessToken.h deleted file mode 100644 index 5fbeac6..0000000 --- a/AccessToken.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// AccessToken.h -// Twittia 2 -// -// Created by Jeena Paradies on 19/09/2011. -// Copyright 2011 __MyCompanyName__. All rights reserved. -// - - - -@interface AccessToken : NSObject { - NSUserDefaults *d; -} - -- (void)setAccessToken:(NSString *)_accessToken; -- (NSString *)accessToken; -- (void)setSecret:(NSString *)_secret; -- (NSString *)secret; -- (void)setUserId:(NSString *)_userId; -- (NSString *)userId; -- (void)setScreenName:(NSString *)_screenName; -- (NSString *)screenName; - -@end \ No newline at end of file diff --git a/AccessToken.m b/AccessToken.m deleted file mode 100644 index 178a2bf..0000000 --- a/AccessToken.m +++ /dev/null @@ -1,77 +0,0 @@ -// -// AccessToken.m -// Twittia 2 -// -// Created by Jeena Paradies on 19/09/2011. -// Copyright 2011 __MyCompanyName__. All rights reserved. -// - -#import "AccessToken.h" - -@implementation AccessToken - -- (id)init -{ - self = [super init]; - if (self) { - // Initialization code here. - d = [NSUserDefaults standardUserDefaults]; - } - - return self; -} - -- (void)setAccessToken:(NSString *)_accessToken -{ - [d setObject:_accessToken forKey:@"accessToken"]; - [d synchronize]; -} - -- (NSString *)accessToken -{ - return [d objectForKey:@"accessToken"]; -} - -- (void)setSecret:(NSString *)_secret -{ - [d setObject:_secret forKey:@"secret"]; - [d synchronize]; -} - -- (NSString *)secret -{ - return [d objectForKey:@"secret"]; -} - -- (void)setUserId:(NSString *)_userId -{ - [d setObject:_userId forKey:@"userId"]; - [d synchronize]; -} - -- (NSString *)userId -{ - return [d objectForKey:@"userId"]; -} - -- (void)setScreenName:(NSString *)_screenName -{ - [d setObject:_screenName forKey:@"screenName"]; - [d synchronize]; -} - -- (NSString *)screenName -{ - return [d objectForKey:@"screenName"]; -} - -+ (BOOL)isSelectorExcludedFromWebScript:(SEL)aSelector { - return NO; -} - -+ (BOOL)isKeyExcludedFromWebScript:(const char *)name { - return NO; -} - - -@end diff --git a/Appcast.xml b/Appcast.xml index 3ae68f8..8804941 100755 --- a/Appcast.xml +++ b/Appcast.xml @@ -2,19 +2,19 @@ Twittia's Changelog - http://github.com/downloads/jeena/Twittia/Appcast.xml + http://wiki.github.com/jeena/twittia/ Most recent changes with links to updates. en - Version 2.4.0 + Version 2.3.1 10.5.0 http://jeenaparadies.net/twittia/ReleaseNotes.html - Sun, 02 Oct 2011 21:23:23 +0200 + Sat, 10 Jan 2011 17:04:02 +0200 + sparkle:dsaSignature="MC4CFQCNlrsp9t1ZAtqtlkxyOoq7MjU09QIVALyH/eo8fxnrnX3c7+Jfx1msI+aB" /> diff --git a/Bookatable.ipa b/Bookatable.ipa new file mode 100644 index 0000000..e033ab0 Binary files /dev/null and b/Bookatable.ipa differ diff --git a/Constants.h b/Constants.h index 99ab1e7..8f22c6f 100644 --- a/Constants.h +++ b/Constants.h @@ -14,6 +14,10 @@ } + +#ifdef USE_TWITTER + +#define API_URL @"http://api.twitter.com/1/" #define OAUTH_CONSUMER_KEY @"JPmU8KJhiBKfpohCiWLg" #define OAUTH_CONSUMER_SECRET @"jtfSrnDrRcUnL1nqTMcAW0055m63EMClmkxhiBjQ" #define OAUTH_SIGNATURE_METHOD @"HMAC-SHA1" @@ -22,6 +26,19 @@ #define OAUTH_ACCESS_TOKEN_URL @"http://twitter.com/oauth/access_token" #define OAUTH_SERVICE_NAME @"twitter.com" +#else + +#define API_URL @"http://identi.ca/api/" +#define OAUTH_CONSUMER_KEY @"76cb48ce4c65a9c760078b60aa9ce18f" +#define OAUTH_CONSUMER_SECRET @"519f5624b2024983369371b2ba389591" +#define OAUTH_SIGNATURE_METHOD @"HMAC-SHA1" +#define OAUTH_REQUEST_TOKEN_URL @"http://identi.ca/api/oauth/request_token" +#define OAUTH_USER_AUTHORIZATION_URL @"http://identi.ca/api/oauth/authorize" +#define OAUTH_ACCESS_TOKEN_URL @"http://identi.ca/api/oauth/access_token" +#define OAUTH_SERVICE_NAME @"identi.ca" + +#endif + #define APP_NAME @"Twittia" #define TWEET_MAX_LENGTH 140 diff --git a/Constants.js b/Constants.js deleted file mode 100644 index d39a649..0000000 --- a/Constants.js +++ /dev/null @@ -1,21 +0,0 @@ -// -// TwittiaOauth.js -// Twittia 2 -// -// Created by Jeena on 19.09.11. -// Licence: BSD (see attached LICENCE.txt file). -// - - -OAUTH_CONSUMER_KEY = "JPmU8KJhiBKfpohCiWLg" -OAUTH_CONSUMER_SECRET = "jtfSrnDrRcUnL1nqTMcAW0055m63EMClmkxhiBjQ" -OAUTH_SIGNATURE_METHOD = "HMAC-SHA1" -OAUTH_REQUEST_TOKEN_URL = "http://twitter.com/oauth/request_token" -OAUTH_USER_AUTHORIZATION_URL = "http://twitter.com/oauth/authorize" -OAUTH_ACCESS_TOKEN_URL = "http://twitter.com/oauth/access_token" -OAUTH_SERVICE_NAME = "twitter.com" - -APP_NAME = "Twittia"; - -API_PATH = "http://api.twitter.com/1/"; -WEBSITE_PATH = "http://twitter.com/"; diff --git a/Controller.h b/Controller.h index 4235a63..577505c 100644 --- a/Controller.h +++ b/Controller.h @@ -11,7 +11,7 @@ #import "ViewDelegate.h" #import #import "Constants.h" -#import "AccessToken.h" +#import "OAuth.h" @interface Controller : NSObject { @@ -22,8 +22,7 @@ IBOutlet NSMenuItem *globalHotkeyMenuItem; IBOutlet NSImageView *logoLayer; ViewDelegate *viewDelegate; - WebView *twittiaOauthView; - AccessToken *accessToken; + OAuth *oauth; } @property (retain, nonatomic) IBOutlet WebView *timelineView; @@ -33,10 +32,8 @@ @property (retain, nonatomic) IBOutlet NSMenuItem *globalHotkeyMenuItem; @property (retain, nonatomic) IBOutlet NSImageView *logoLayer; @property (retain, nonatomic) IBOutlet ViewDelegate *viewDelegate; -@property (retain, nonatomic) WebView *twittiaOauthView; -@property (retain, nonatomic) AccessToken *accessToken; +@property (retain, nonatomic) IBOutlet OAuth *oauth; -- (void)initOauth; - (void)authentificationSucceded:(id)sender; - (void)initWebViews; - (void)initHotKeys; @@ -44,8 +41,6 @@ - (NSString *)pluginURL; - (void)handleGetURLEvent:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent; - (void)unreadMentions:(NSInteger)count; -- (void)openURL:(NSString *)url; -- (void)storeAccessToken:(NSString *)accessToken secret:(NSString *)secret userId:(NSString *)userId andScreenName:(NSString *)screenName; OSStatus handler(EventHandlerCallRef nextHandler, EventRef theEvent, void* userData); diff --git a/Controller.m b/Controller.m index 626978f..e6c074e 100644 --- a/Controller.m +++ b/Controller.m @@ -7,15 +7,13 @@ // #import "Controller.h" -#import "NewTweetWindow.h" +#import "MyDocument.h" #import "TweetModel.h" @implementation Controller -@synthesize timelineView, timelineViewWindow, mentionsView, mentionsViewWindow, globalHotkeyMenuItem, viewDelegate; -@synthesize logoLayer; -@synthesize twittiaOauthView, accessToken; +@synthesize timelineView, timelineViewWindow, mentionsView, mentionsViewWindow, globalHotkeyMenuItem, viewDelegate, oauth, logoLayer; - (void)awakeFromNib { @@ -45,32 +43,9 @@ forEventClass:kInternetEventClass andEventID:kAEGetURL]; - viewDelegate = [[ViewDelegate alloc] init]; - - - accessToken = [[AccessToken alloc] init]; - - //accessToken.accessToken = nil; - if (!accessToken.accessToken) { - [self initOauth]; - } else { - [self initWebViews]; - } -} - -- (void)initOauth { - NSString *path = [[NSBundle mainBundle] resourcePath]; - NSURL *url = [NSURL fileURLWithPath:path]; - NSString *index_string = [NSString stringWithContentsOfFile:[NSString stringWithFormat:@"%@/index_oauth.html", path] encoding:NSUTF8StringEncoding error:nil]; - - - twittiaOauthView = [[WebView alloc] init]; - viewDelegate.twittiaOauthView = twittiaOauthView; - [[twittiaOauthView mainFrame] loadHTMLString:index_string baseURL:url]; - [twittiaOauthView setFrameLoadDelegate:viewDelegate]; - [twittiaOauthView setPolicyDelegate:viewDelegate]; - [twittiaOauthView setUIDelegate:viewDelegate]; - [[twittiaOauthView windowScriptObject] setValue:self forKey:@"controller"]; + if ([oauth accessToken]) { + [self initWebViews]; + } } - (void)initHotKeys { @@ -132,6 +107,8 @@ NSString *path = [[NSBundle mainBundle] resourcePath]; NSURL *url = [NSURL fileURLWithPath:path]; NSString *index_string = [NSString stringWithContentsOfFile:[NSString stringWithFormat:@"%@/index.html", path] encoding:NSUTF8StringEncoding error:nil]; + + viewDelegate = [[ViewDelegate alloc] init]; viewDelegate.timelineView = timelineView; [[timelineView mainFrame] loadHTMLString:index_string baseURL:url]; @@ -168,7 +145,7 @@ - (void)openNewTweetWindowInReplyTo:(NSString *)userName statusId:(NSString *)statusId { [NSApp activateIgnoringOtherApps:YES]; - NewTweetWindow *newTweet = (NewTweetWindow *)[[NSDocumentController sharedDocumentController] openUntitledDocumentAndDisplay:YES error:nil]; + MyDocument *newTweet = (MyDocument *)[[NSDocumentController sharedDocumentController] openUntitledDocumentAndDisplay:YES error:nil]; [newTweet inReplyTo:userName statusId:statusId]; } @@ -178,9 +155,11 @@ NSRange range = [aString rangeOfString:@"oauth_token"]; if (range.length > 0) { - [twittiaOauthView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"twittia_oauth.requestAccessToken('%@')", aString]]; + NSLog(@"test 3 %@", oauth); + + [oauth requestAccessToken]; } else { - NewTweetWindow *newTweet = (NewTweetWindow *)[[NSDocumentController sharedDocumentController] openUntitledDocumentAndDisplay:YES error:nil]; + MyDocument *newTweet = (MyDocument *)[[NSDocumentController sharedDocumentController] openUntitledDocumentAndDisplay:YES error:nil]; [newTweet withString:aString]; } @@ -193,8 +172,7 @@ - (IBAction)sendTweet:(id)sender { TweetModel *tweet = (TweetModel *)[sender object]; - NSString *func = [NSString stringWithFormat:@"twittia_instance.sendNewTweet(\"%@\", \"%@\")", [tweet.text stringByReplacingOccurrencesOfString:@"\"" withString:@"\\\""], tweet.inReplyTostatusId]; - [timelineView stringByEvaluatingJavaScriptFromString:func]; + [oauth updateTweet:tweet.text inReplaToStatus:tweet.inReplyTostatusId]; } - (NSString *)pluginURL { @@ -217,22 +195,6 @@ } } -- (void)openURL:(NSString *)url { - [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:url]]; -} - -- (void)storeAccessToken:(NSString *)_accessToken secret:(NSString *)secret userId:(NSString *)userId andScreenName:(NSString *)screenName -{ - self.accessToken.accessToken = _accessToken; - self.accessToken.secret = secret; - self.accessToken.userId = userId; - self.accessToken.screenName = screenName; - - [timelineViewWindow makeKeyAndOrderFront:self]; - - [[NSNotificationCenter defaultCenter] postNotificationName:@"authentificationSucceded" object:nil]; -} - // Mentions window has been visible - (void)windowDidBecomeKey:(NSNotification *)notification { if ([notification object] == mentionsViewWindow) { diff --git a/English.lproj/Credits.rtf b/English.lproj/Credits.rtf index 9161c9d..264dd94 100644 --- a/English.lproj/Credits.rtf +++ b/English.lproj/Credits.rtf @@ -1,8 +1,7 @@ -{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf170 +{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf250 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} -\viewkind0 -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural \f0\b\fs24 \cf0 Engineering: \b0 \ @@ -16,7 +15,7 @@ \b Documentation: \b0 \ - http://github.com/jeena/Twittia/wiki\ + http://github.com/jeena/Twittia\ \ \b With special thanks to: diff --git a/English.lproj/MainMenu.xib b/English.lproj/MainMenu.xib index 3fe2d8f..8fad43b 100644 --- a/English.lproj/MainMenu.xib +++ b/English.lproj/MainMenu.xib @@ -2,10 +2,10 @@ 1050 - 11C43 - 1617 - 1138.17 - 567.00 + 10J567 + 823 + 1038.35 + 462.00 YES @@ -15,20 +15,15 @@ YES - 1617 - 518 + 823 + 823 - + YES - NSView - NSMenu - NSWindowTemplate - NSMenuItem - WebView - NSImageCell - NSImageView - NSCustomObject + + + YES @@ -36,11 +31,8 @@ com.apple.WebKitIBPlugin - YES - - YES - - + PluginDependencyRecalculationVersion + YES @@ -783,7 +775,7 @@ Twittia NSWindow - + {1.79769e+308, 1.79769e+308} 256 @@ -815,7 +807,6 @@ {397, 581} - @@ -823,8 +814,12 @@ 13 YES - - + + YES + + + YES + NO @@ -847,7 +842,6 @@ {{17, 17}, {363, 547}} - YES 67239424 @@ -871,12 +865,10 @@ {397, 581} - {{0, 0}, {1920, 1178}} - {10000000000000, 10000000000000} + {1.79769e+308, 1.79769e+308} twittia - YES SUUpdater @@ -889,9 +881,9 @@ Mentions NSWindow - + {1.79769e+308, 1.79769e+308} - + 256 YES @@ -929,7 +921,9 @@ YES - + + YES + NO @@ -937,11 +931,14 @@ {376, 581} + {{0, 0}, {1920, 1178}} - {10000000000000, 10000000000000} + {1.79769e+308, 1.79769e+308} mentions - YES + + + OAuth @@ -1379,6 +1376,14 @@ 589 + + + oauth + + + + 591 + @@ -2036,68 +2041,136 @@ + + 590 + + + YES YES - -1.IBPluginDependency - -2.IBPluginDependency -3.IBPluginDependency 130.IBPluginDependency + 130.ImportedFromIB2 + 130.editorWindowContentRectSynchronizationRect 131.IBPluginDependency + 131.ImportedFromIB2 134.IBPluginDependency + 134.ImportedFromIB2 136.IBPluginDependency + 136.ImportedFromIB2 144.IBPluginDependency + 144.ImportedFromIB2 145.IBPluginDependency + 145.ImportedFromIB2 149.IBPluginDependency + 149.ImportedFromIB2 150.IBPluginDependency + 150.ImportedFromIB2 19.IBPluginDependency + 19.ImportedFromIB2 195.IBPluginDependency + 195.ImportedFromIB2 196.IBPluginDependency + 196.ImportedFromIB2 197.IBPluginDependency + 197.ImportedFromIB2 198.IBPluginDependency + 198.ImportedFromIB2 199.IBPluginDependency + 199.ImportedFromIB2 + 200.IBEditorWindowLastContentRect 200.IBPluginDependency + 200.ImportedFromIB2 + 200.editorWindowContentRectSynchronizationRect 201.IBPluginDependency + 201.ImportedFromIB2 202.IBPluginDependency + 202.ImportedFromIB2 203.IBPluginDependency + 203.ImportedFromIB2 204.IBPluginDependency + 204.ImportedFromIB2 + 205.IBEditorWindowLastContentRect 205.IBPluginDependency + 205.ImportedFromIB2 + 205.editorWindowContentRectSynchronizationRect 206.IBPluginDependency + 206.ImportedFromIB2 207.IBPluginDependency + 207.ImportedFromIB2 208.IBPluginDependency + 208.ImportedFromIB2 209.IBPluginDependency + 209.ImportedFromIB2 210.IBPluginDependency + 210.ImportedFromIB2 211.IBPluginDependency + 211.ImportedFromIB2 + 212.IBEditorWindowLastContentRect 212.IBPluginDependency + 212.ImportedFromIB2 + 212.editorWindowContentRectSynchronizationRect 213.IBPluginDependency + 213.ImportedFromIB2 214.IBPluginDependency + 214.ImportedFromIB2 215.IBPluginDependency + 215.ImportedFromIB2 216.IBPluginDependency + 216.ImportedFromIB2 217.IBPluginDependency + 217.ImportedFromIB2 218.IBPluginDependency + 218.ImportedFromIB2 219.IBPluginDependency + 219.ImportedFromIB2 + 220.IBEditorWindowLastContentRect 220.IBPluginDependency + 220.ImportedFromIB2 + 220.editorWindowContentRectSynchronizationRect 221.IBPluginDependency + 221.ImportedFromIB2 23.IBPluginDependency + 23.ImportedFromIB2 236.IBPluginDependency + 236.ImportedFromIB2 239.IBPluginDependency + 239.ImportedFromIB2 + 24.IBEditorWindowLastContentRect 24.IBPluginDependency + 24.ImportedFromIB2 + 24.editorWindowContentRectSynchronizationRect + 29.IBEditorWindowLastContentRect 29.IBPluginDependency + 29.ImportedFromIB2 + 29.WindowOrigin + 29.editorWindowContentRectSynchronizationRect 295.IBPluginDependency + 296.IBEditorWindowLastContentRect 296.IBPluginDependency + 296.editorWindowContentRectSynchronizationRect 297.IBPluginDependency 298.IBPluginDependency 346.IBPluginDependency + 346.ImportedFromIB2 348.IBPluginDependency + 348.ImportedFromIB2 + 349.IBEditorWindowLastContentRect 349.IBPluginDependency + 349.ImportedFromIB2 + 349.editorWindowContentRectSynchronizationRect 350.IBPluginDependency + 350.ImportedFromIB2 351.IBPluginDependency + 351.ImportedFromIB2 354.IBPluginDependency - 419.IBPluginDependency + 354.ImportedFromIB2 449.IBPluginDependency + 450.IBEditorWindowLastContentRect 450.IBPluginDependency 451.IBPluginDependency 452.IBPluginDependency @@ -2110,92 +2183,175 @@ 465.IBPluginDependency 470.IBPluginDependency 491.IBPluginDependency + 492.IBEditorWindowLastContentRect 492.IBPluginDependency 493.IBPluginDependency 5.IBPluginDependency - 533.IBPluginDependency + 5.ImportedFromIB2 + 535.IBEditorWindowLastContentRect 535.IBPluginDependency 535.IBWindowTemplateEditedContentRect 535.NSWindowTemplate.visibleAtLaunch 536.IBPluginDependency 537.IBPluginDependency - 541.IBPluginDependency 542.IBPluginDependency 544.IBPluginDependency 551.IBPluginDependency + 559.IBEditorWindowLastContentRect 559.IBPluginDependency 559.IBWindowTemplateEditedContentRect 559.NSWindowTemplate.visibleAtLaunch 56.IBPluginDependency + 56.ImportedFromIB2 560.IBPluginDependency 561.IBPluginDependency + 57.IBEditorWindowLastContentRect 57.IBPluginDependency + 57.ImportedFromIB2 + 57.editorWindowContentRectSynchronizationRect 58.IBPluginDependency + 58.ImportedFromIB2 + 587.IBEditorWindowLastContentRect 587.IBPluginDependency 588.IBPluginDependency 72.IBPluginDependency + 72.ImportedFromIB2 73.IBPluginDependency + 73.ImportedFromIB2 79.IBPluginDependency + 79.ImportedFromIB2 + 81.IBEditorWindowLastContentRect 81.IBPluginDependency + 81.ImportedFromIB2 + 81.editorWindowContentRectSynchronizationRect 82.IBPluginDependency + 82.ImportedFromIB2 83.IBPluginDependency + 83.ImportedFromIB2 92.IBPluginDependency + 92.ImportedFromIB2 YES com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + + {{436, 809}, {64, 6}} com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + {{656, 201}, {275, 113}} com.apple.InterfaceBuilder.CocoaPlugin + + {{608, 612}, {275, 83}} com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + {{813, 671}, {254, 283}} com.apple.InterfaceBuilder.CocoaPlugin + + {{197, 734}, {243, 243}} com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + {{656, 211}, {164, 43}} com.apple.InterfaceBuilder.CocoaPlugin + + {{608, 612}, {167, 43}} com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + {{642, 251}, {238, 103}} com.apple.InterfaceBuilder.CocoaPlugin + + {{608, 612}, {241, 103}} com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + {{907, 881}, {194, 73}} com.apple.InterfaceBuilder.CocoaPlugin + + {{525, 802}, {197, 73}} + {{371, 736}, {349, 20}} com.apple.InterfaceBuilder.CocoaPlugin + + {74, 862} + {{11, 977}, {478, 20}} com.apple.InterfaceBuilder.CocoaPlugin + {{360, 488}, {231, 43}} com.apple.InterfaceBuilder.CocoaPlugin + {{475, 832}, {234, 43}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + {{642, 181}, {220, 133}} com.apple.InterfaceBuilder.CocoaPlugin + + {{608, 612}, {215, 63}} com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{786, 257}, {170, 63}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -2208,13 +2364,12 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + {{547, 508}, {153, 23}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin + + {{202, 175}, {397, 581}} com.apple.InterfaceBuilder.CocoaPlugin {{202, 175}, {397, 581}} @@ -2223,36 +2378,55 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin + {{344, 175}, {376, 581}} com.apple.InterfaceBuilder.CocoaPlugin {{344, 175}, {376, 581}} com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.WebKitIBPlugin + {{1089, 312}, {229, 173}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{23, 794}, {245, 183}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{21, 1074}, {48, 48}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + {{452, 623}, {181, 113}} com.apple.InterfaceBuilder.CocoaPlugin + + {{155, 774}, {199, 203}} com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin + YES - + + YES + YES - + + YES + 591 @@ -2263,6 +2437,17 @@ Controller NSObject + + authentificationSucceded: + id + + + authentificationSucceded: + + authentificationSucceded: + id + + YES @@ -2271,6 +2456,7 @@ logoLayer mentionsView mentionsViewWindow + oauth timelineView timelineViewWindow viewDelegate @@ -2281,6 +2467,7 @@ NSImageView WebView NSWindow + OAuth WebView NSWindow ViewDelegate @@ -2294,6 +2481,7 @@ logoLayer mentionsView mentionsViewWindow + oauth timelineView timelineViewWindow viewDelegate @@ -2316,6 +2504,10 @@ mentionsViewWindow NSWindow + + oauth + OAuth + timelineView WebView @@ -2332,7 +2524,40 @@ IBProjectSource - ./Classes/Controller.h + Controller.h + + + + OAuth + NSObject + + IBProjectSource + OAuth.h + + + + ViewDelegate + NSObject + + IBProjectSource + ViewDelegate.h + + + + + YES + + NSObject + + IBDocumentRelativeSource + ../Sparkle.framework/Versions/A/Headers/SUAppcast.h + + + + NSObject + + IBDocumentRelativeSource + ../Sparkle.framework/Versions/A/Headers/SUUpdater.h @@ -2360,35 +2585,730 @@ id - - IBProjectSource - ./Classes/SUUpdater.h + + + + + YES + + NSApplication + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSApplication.h - ViewDelegate + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSApplicationScripting.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSColorPanel.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSHelpManager.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSPageLayout.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSUserInterfaceItemSearching.h + + + + NSBrowser + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSBrowser.h + + + + NSCell NSObject - IBProjectSource - ./Classes/ViewDelegate.h + IBFrameworkSource + AppKit.framework/Headers/NSCell.h - WebView + NSControl + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSControl.h + + + + NSDocumentController + NSObject - reloadFromOrigin: - id + YES + + YES + clearRecentDocuments: + newDocument: + openDocument: + saveAllDocuments: + + + YES + id + id + id + id + - reloadFromOrigin: - - reloadFromOrigin: - id + YES + + YES + clearRecentDocuments: + newDocument: + openDocument: + saveAllDocuments: + + + YES + + clearRecentDocuments: + id + + + newDocument: + id + + + openDocument: + id + + + saveAllDocuments: + id + - IBProjectSource - ./Classes/WebView.h + IBFrameworkSource + AppKit.framework/Headers/NSDocumentController.h + + + + NSFontManager + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontManager.h + + + + NSFormatter + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFormatter.h + + + + NSImageCell + NSCell + + IBFrameworkSource + AppKit.framework/Headers/NSImageCell.h + + + + NSImageView + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSImageView.h + + + + NSMatrix + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSMatrix.h + + + + NSMenu + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenu.h + + + + NSMenuItem + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenuItem.h + + + + NSMovieView + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSMovieView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSAccessibility.h + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDictionaryController.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDragging.h + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontPanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSKeyValueBinding.h + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSNibLoading.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSOutlineView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSPasteboard.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSSavePanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSTableView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSToolbarItem.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSView.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObjectScripting.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPortCoder.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptObjectSpecifiers.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptWhoseTests.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLDownload.h + + + + NSObject + + IBFrameworkSource + Print.framework/Headers/PDEPluginInterface.h + + + + NSObject + + IBFrameworkSource + Sparkle.framework/Headers/SUAppcast.h + + + + NSObject + + IBFrameworkSource + Sparkle.framework/Headers/SUUpdater.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebDownload.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebEditingDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebFrameLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebJavaPlugIn.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPlugin.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPluginContainer.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPolicyDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebResourceLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebScriptObject.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebUIDelegate.h + + + + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSInterfaceStyle.h + + + + NSResponder + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSResponder.h + + + + NSTableView + NSControl + + + + NSText + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSText.h + + + + NSTextView + NSText + + IBFrameworkSource + AppKit.framework/Headers/NSTextView.h + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSClipView.h + + + + NSView + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSRulerView.h + + + + NSView + NSResponder + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSDrawer.h + + + + NSWindow + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSWindow.h + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSWindowScripting.h + + + + SUUpdater + NSObject + + checkForUpdates: + id + + + checkForUpdates: + + checkForUpdates: + id + + + + delegate + id + + + delegate + + delegate + id + + + + + + WebView + NSView + + YES + + YES + goBack: + goForward: + makeTextLarger: + makeTextSmaller: + makeTextStandardSize: + reload: + stopLoading: + takeStringURLFrom: + toggleContinuousSpellChecking: + toggleSmartInsertDelete: + + + YES + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + goBack: + goForward: + makeTextLarger: + makeTextSmaller: + makeTextStandardSize: + reload: + stopLoading: + takeStringURLFrom: + toggleContinuousSpellChecking: + toggleSmartInsertDelete: + + + YES + + goBack: + id + + + goForward: + id + + + makeTextLarger: + id + + + makeTextSmaller: + id + + + makeTextStandardSize: + id + + + reload: + id + + + stopLoading: + id + + + takeStringURLFrom: + id + + + toggleContinuousSpellChecking: + id + + + toggleSmartInsertDelete: + id + + + + + IBFrameworkSource + WebKit.framework/Headers/WebView.h @@ -2404,6 +3324,7 @@ YES + ../Twittia 2.xcodeproj 3 YES @@ -2415,7 +3336,7 @@ YES - {512, 512} + {128, 128} {9, 8} {7, 2} diff --git a/English.lproj/MyDocument.xib b/English.lproj/MyDocument.xib new file mode 100644 index 0000000..fd79165 --- /dev/null +++ b/English.lproj/MyDocument.xib @@ -0,0 +1,890 @@ + + + + 1050 + 10D573 + 762 + 1038.29 + 460.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 762 + + + YES + + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + YES + + YES + + + YES + + + + YES + + MyDocument + + + FirstResponder + + + 7 + 2 + {{133, 535}, {299, 113}} + 1886913536 + New Tweet + NSWindow + View + {1.79769e+308, 1.79769e+308} + {94, 86} + + + 256 + + YES + + + 274 + {{0, 22}, {299, 91}} + + YES + + -1809711615 + 272629760 + + + LucidaGrande + 13 + 1044 + + + YES + + 6 + System + textBackgroundColor + + 3 + MQA + + + + 6 + System + textColor + + 3 + MAA + + + + + + + 268 + {{257, 2}, {38, 17}} + + YES + + 68288064 + 71304192 + 140 + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + + + + + {299, 113} + + + {{0, 0}, {1440, 878}} + {94, 108} + {1.79769e+308, 1.79769e+308} + newTweet + NO + 22 + + + NSApplication + + + + + YES + + + window + + + + 18 + + + + sendTweet: + + + + 100031 + + + + textField + + + + 100034 + + + + delegate + + + + 100035 + + + + counter + + + + 100038 + + + + + YES + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + 5 + + + YES + + + + Window + + + 6 + + + YES + + + + + + + -3 + + + Application + + + 100028 + + + YES + + + + + + 100029 + + + + + 100036 + + + YES + + + + + + 100037 + + + + + + + YES + + YES + -3.IBPluginDependency + 100028.IBPluginDependency + 100029.IBPluginDependency + 100036.IBPluginDependency + 100037.IBPluginDependency + 5.IBEditorWindowLastContentRect + 5.IBPluginDependency + 5.IBWindowTemplateEditedContentRect + 5.ImportedFromIB2 + 5.editorWindowContentRectSynchronizationRect + 5.windowTemplate.hasMinSize + 5.windowTemplate.minSize + 6.IBPluginDependency + 6.ImportedFromIB2 + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{127, 736}, {299, 113}} + com.apple.InterfaceBuilder.CocoaPlugin + {{127, 736}, {299, 113}} + + {{201, 387}, {507, 413}} + + {94, 86} + com.apple.InterfaceBuilder.CocoaPlugin + + + + + YES + + + YES + + + + + YES + + + YES + + + + 100038 + + + + YES + + MyDocument + NSDocument + + sendTweet: + NSControl + + + YES + + YES + counter + textField + + + YES + NSTextField + NSTextField + + + + IBProjectSource + MyDocument.h + + + + + YES + + NSActionCell + NSCell + + IBFrameworkSource + AppKit.framework/Headers/NSActionCell.h + + + + NSApplication + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSApplication.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSApplicationScripting.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSColorPanel.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSHelpManager.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSPageLayout.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSUserInterfaceItemSearching.h + + + + NSCell + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSCell.h + + + + NSControl + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSControl.h + + + + NSDocument + NSObject + + YES + + YES + printDocument: + revertDocumentToSaved: + runPageLayout: + saveDocument: + saveDocumentAs: + saveDocumentTo: + + + YES + id + id + id + id + id + id + + + + IBFrameworkSource + AppKit.framework/Headers/NSDocument.h + + + + NSDocument + + IBFrameworkSource + AppKit.framework/Headers/NSDocumentScripting.h + + + + NSFormatter + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFormatter.h + + + + NSMenu + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenu.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSAccessibility.h + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDictionaryController.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDragging.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontManager.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontPanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSKeyValueBinding.h + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSNibLoading.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSOutlineView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSPasteboard.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSSavePanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSTableView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSToolbarItem.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSView.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObjectScripting.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPortCoder.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptObjectSpecifiers.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptWhoseTests.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLDownload.h + + + + NSObject + + IBFrameworkSource + Print.framework/Headers/PDEPluginInterface.h + + + + NSObject + + IBFrameworkSource + Sparkle.framework/Headers/SUAppcast.h + + + + NSObject + + IBFrameworkSource + Sparkle.framework/Headers/SUUpdater.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebDownload.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebEditingDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebFrameLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebJavaPlugIn.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPlugin.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPluginContainer.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPolicyDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebResourceLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebScriptObject.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebUIDelegate.h + + + + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSInterfaceStyle.h + + + + NSResponder + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSResponder.h + + + + NSTextField + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSTextField.h + + + + NSTextFieldCell + NSActionCell + + IBFrameworkSource + AppKit.framework/Headers/NSTextFieldCell.h + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSClipView.h + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSMenuItem.h + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSRulerView.h + + + + NSView + NSResponder + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSDrawer.h + + + + NSWindow + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSWindow.h + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSWindowScripting.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + ../Twittia 2.xcodeproj + 3 + + diff --git a/English.lproj/NewTweetWindow.xib b/English.lproj/NewTweetWindow.xib deleted file mode 100644 index 31ad68a..0000000 --- a/English.lproj/NewTweetWindow.xib +++ /dev/null @@ -1,440 +0,0 @@ - - - - 1050 - 11C43 - 1617 - 1138.17 - 567.00 - - com.apple.InterfaceBuilder.CocoaPlugin - 1617 - - - YES - NSTextField - NSTextFieldCell - NSWindowTemplate - NSView - NSCustomObject - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - - YES - - YES - - - - - YES - - NewTweetWindow - - - FirstResponder - - - 7 - 2 - {{133, 535}, {299, 113}} - 1886913536 - New Tweet - NSWindow - View - - {94, 86} - - - 256 - - YES - - - 274 - {{0, 22}, {299, 91}} - - - YES - - -1809711615 - 272629760 - - - LucidaGrande - 13 - 1044 - - - YES - - 6 - System - textBackgroundColor - - 3 - MQA - - - - 6 - System - textColor - - 3 - MAA - - - - - - - 268 - {{257, 2}, {38, 17}} - - - YES - - 68288064 - 71304192 - 140 - - - - 6 - System - controlColor - - 3 - MC42NjY2NjY2NjY3AA - - - - 6 - System - controlTextColor - - - - - - {299, 113} - - - - {{0, 0}, {1440, 878}} - {94, 108} - {10000000000000, 10000000000000} - newTweet - NO - 22 - YES - - - NSApplication - - - - - YES - - - window - - - - 18 - - - - sendTweet: - - - - 100031 - - - - textField - - - - 100034 - - - - delegate - - - - 100035 - - - - counter - - - - 100038 - - - - - YES - - 0 - - - - - - -2 - - - File's Owner - - - -1 - - - First Responder - - - 5 - - - YES - - - - Window - - - 6 - - - YES - - - - - - - -3 - - - Application - - - 100028 - - - YES - - - - - - 100029 - - - - - 100036 - - - YES - - - - - - 100037 - - - - - - - YES - - YES - -1.IBPluginDependency - -2.IBPluginDependency - -3.IBPluginDependency - 100028.IBPluginDependency - 100029.IBPluginDependency - 100036.IBPluginDependency - 100037.IBPluginDependency - 5.IBPluginDependency - 5.IBWindowTemplateEditedContentRect - 6.IBPluginDependency - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{127, 736}, {299, 113}} - com.apple.InterfaceBuilder.CocoaPlugin - - - - YES - - - - - - YES - - - - - 100038 - - - - YES - - NSDocument - - YES - - YES - printDocument: - revertDocumentToSaved: - runPageLayout: - saveDocument: - saveDocumentAs: - saveDocumentTo: - - - YES - id - id - id - id - id - id - - - - YES - - YES - printDocument: - revertDocumentToSaved: - runPageLayout: - saveDocument: - saveDocumentAs: - saveDocumentTo: - - - YES - - printDocument: - id - - - revertDocumentToSaved: - id - - - runPageLayout: - id - - - saveDocument: - id - - - saveDocumentAs: - id - - - saveDocumentTo: - id - - - - - IBProjectSource - ./Classes/NSDocument.h - - - - NewTweetWindow - NSDocument - - sendTweet: - NSControl - - - sendTweet: - - sendTweet: - NSControl - - - - YES - - YES - counter - textField - - - YES - NSTextField - NSTextField - - - - YES - - YES - counter - textField - - - YES - - counter - NSTextField - - - textField - NSTextField - - - - - IBProjectSource - ./Classes/NewTweetWindow.h - - - - - 0 - IBCocoaFramework - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - - - YES - 3 - - diff --git a/NewTweetWindow.h b/MyDocument.h similarity index 89% rename from NewTweetWindow.h rename to MyDocument.h index ea4c970..c10ff30 100644 --- a/NewTweetWindow.h +++ b/MyDocument.h @@ -1,5 +1,5 @@ // -// NewTweetWindow.h +// MyDocument.h // Twittia 2 // // Created by Jeena on 16.04.10. @@ -10,7 +10,7 @@ #import -@interface NewTweetWindow : NSDocument +@interface MyDocument : NSDocument { IBOutlet NSTextField *textField; IBOutlet NSTextField *counter; diff --git a/NewTweetWindow.m b/MyDocument.m similarity index 97% rename from NewTweetWindow.m rename to MyDocument.m index c6cdd9e..a172f59 100644 --- a/NewTweetWindow.m +++ b/MyDocument.m @@ -1,16 +1,16 @@ // -// NewTweetWindow.m +// MyDocument.m // Twittia 2 // // Created by Jeena on 16.04.10. // Licence: BSD (see attached LICENCE.txt file). // -#import "NewTweetWindow.h" +#import "MyDocument.h" #import "Constants.h" #import "TweetModel.h" -@implementation NewTweetWindow +@implementation MyDocument @synthesize textField, counter; @@ -31,7 +31,7 @@ { // Override returning the nib file name of the document // If you need to use a subclass of NSWindowController or if your document supports multiple NSWindowControllers, you should remove this method and override -makeWindowControllers instead. - return @"NewTweetWindow"; + return @"MyDocument"; } - (NSString *)displayName { diff --git a/OAToken+WebView.h b/OAToken+WebView.h new file mode 100644 index 0000000..317ea8b --- /dev/null +++ b/OAToken+WebView.h @@ -0,0 +1,15 @@ +// +// OAToken+WebView.h +// Twittia 2 +// +// Created by Jeena on 02.05.10. +// Licence: BSD (see attached LICENCE.txt file). +// + +#import +#import + + +@interface OAToken(WebView) + +@end diff --git a/OAToken+WebView.m b/OAToken+WebView.m new file mode 100644 index 0000000..3fa9d81 --- /dev/null +++ b/OAToken+WebView.m @@ -0,0 +1,23 @@ +// +// OAToken+WebView.m +// Twittia 2 +// +// Created by Jeena on 02.05.10. +// Licence: BSD (see attached LICENCE.txt file). +// + +#import "OAToken+WebView.h" + + +// this is just so the JavaScript can get the tokens. +@implementation OAToken(WebView) + ++ (BOOL)isSelectorExcludedFromWebScript:(SEL)aSelector { + return NO; +} + ++ (BOOL)isKeyExcludedFromWebScript:(const char *)name { + return NO; +} + +@end diff --git a/OAuth.h b/OAuth.h new file mode 100644 index 0000000..44c4548 --- /dev/null +++ b/OAuth.h @@ -0,0 +1,31 @@ +// +// OAuth.h +// Twittia 2 +// +// Created by Jeena on 01.05.10. +// Licence: BSD (see attached LICENCE.txt file). +// + +#import +#import +#import +#import "OAToken+WebView.h" + + +@interface OAuth : NSObject { + OAToken *requestToken; + OAToken *accessToken; + OAToken *consumerToken; + OAConsumer *consumer; +} + +@property (nonatomic, retain) OAToken *accessToken; +@property (nonatomic, retain) OAToken *consumerToken; + +- (id)init; +- (void)requestAToken; +- (void)requestAccessToken; +- (void)updateTweet:(NSString *)tweet inReplaToStatus:(NSString *)statusId; + + +@end diff --git a/OAuth.m b/OAuth.m new file mode 100644 index 0000000..6246418 --- /dev/null +++ b/OAuth.m @@ -0,0 +1,180 @@ +// +// OAuth.m +// Twittia 2 +// +// Created by Jeena on 01.05.10. +// Licence: BSD (see attached LICENCE.txt file). +// + +#import "OAuth.h" +#import "Constants.h" +#import +#import +#import +#import + + +@implementation OAuth + +@synthesize accessToken, consumerToken; + ++ (BOOL)isSelectorExcludedFromWebScript:(SEL)aSelector { + return NO; +} + ++ (BOOL)isKeyExcludedFromWebScript:(const char *)name { + return NO; +} + +-(id)init { + if ((self = [super init])) { + self.consumerToken = [[OAToken alloc] initWithKey:OAUTH_CONSUMER_KEY secret:OAUTH_CONSUMER_SECRET]; + self.accessToken = [[OAToken alloc] initWithUserDefaultsUsingServiceProviderName:OAUTH_SERVICE_NAME prefix:APP_NAME]; + consumer = [[OAConsumer alloc] initWithKey:OAUTH_CONSUMER_KEY secret:OAUTH_CONSUMER_SECRET]; + } + return self; +} + +- (void)dealloc { + [consumerToken release]; + [accessToken release]; + [consumer release]; + [super dealloc]; +} + +- (void)awakeFromNib { + if (!self.accessToken) { + [self requestAToken]; + } +} + +-(void)requestAToken { + + NSURL *url = [NSURL URLWithString:OAUTH_REQUEST_TOKEN_URL]; + + OAMutableURLRequest *request = [[OAMutableURLRequest alloc] initWithURL:url + consumer:consumer + token:nil // we don't have a Token yet + realm:nil // our service provider doesn't specify a realm + signatureProvider:nil]; // use the default method, HMAC-SHA1 + + [request setHTTPMethod:@"POST"]; + [request setOAuthParameterName:@"oauth_callback" withValue:@"oob"]; + + OADataFetcher *fetcher = [[OADataFetcher alloc] init]; + NSLog(@"%@", request); + + [fetcher fetchDataWithRequest:request + delegate:self + didFinishSelector:@selector(requestTokenTicket:didFinishWithData:) + didFailSelector:@selector(requestTokenTicket:didFailWithError:)]; +} + +- (void)requestTokenTicket:(OAServiceTicket *)ticket didFinishWithData:(NSData *)data { + NSLog(@"succ: %i %@", ticket.didSucceed, ticket.response); + if (ticket.didSucceed) { + NSString *responseBody = [[NSString alloc] initWithData:data + encoding:NSUTF8StringEncoding]; + requestToken = [[OAToken alloc] initWithHTTPResponseBody:responseBody]; + + NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@?oauth_token=%@", OAUTH_USER_AUTHORIZATION_URL, requestToken.key]]; + [[NSWorkspace sharedWorkspace] openURL:url]; + + } +} + +- (void)requestTokenTicket:(OAServiceTicket *)ticket didFailWithError:(NSError *)error { + NSLog(@"ERROR: %@", error); +} + +- (void)requestAccessToken { + + NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@", OAUTH_ACCESS_TOKEN_URL]]; + + OAMutableURLRequest *request = [[OAMutableURLRequest alloc] initWithURL:url + consumer:consumer + token:requestToken // we don't have a Token yet + realm:nil // our service provider doesn't specify a realm + signatureProvider:nil]; // use the default method, HMAC-SHA1 + + [request setHTTPMethod:@"POST"]; + + + + OADataFetcher *fetcher = [[OADataFetcher alloc] init]; + [fetcher fetchDataWithRequest:request + delegate:self + didFinishSelector:@selector(accessTokenTicket:didFinishWithData:) + didFailSelector:@selector(accessTokenTicket:didFailWithError:)]; + + +} + +- (void)accessTokenTicket:(OAServiceTicket *)ticket didFinishWithData:(NSData *)data { + NSLog(@"%@", ticket); + if (ticket.didSucceed) { + NSString *responseBody = [[NSString alloc] initWithData:data + encoding:NSUTF8StringEncoding]; + + self.accessToken = [[OAToken alloc] initWithHTTPResponseBody:responseBody]; + [accessToken storeInUserDefaultsWithServiceProviderName:OAUTH_SERVICE_NAME prefix:APP_NAME]; + + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + [nc postNotificationName:@"authentificationSucceded" object:self]; + } +} + + + +- (void)accessTokenTicket:(OAServiceTicket *)ticket didFailWithError:(NSError *)error { + NSLog(@"ERROR a: %@", error); + // [self requestAccessToken]; + + NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@?oauth_token=%@", OAUTH_USER_AUTHORIZATION_URL, requestToken.key]]; + [[NSWorkspace sharedWorkspace] openURL:url]; +} + +- (void)updateTweet:(NSString *)tweet inReplaToStatus:(NSString *)statusId { + + NSLog(@"%@ %@", tweet, statusId); + + NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@statuses/update.json", API_URL]]; + OAMutableURLRequest *request = [[OAMutableURLRequest alloc] initWithURL:url + consumer:consumer + token:accessToken + realm:nil + signatureProvider:nil]; + + OARequestParameter *source = [[OARequestParameter alloc] initWithName:@"source" value:@"twittia"]; + OARequestParameter *status = [[OARequestParameter alloc] initWithName:@"status" value:tweet]; + + NSMutableArray *params = [NSMutableArray arrayWithObjects:source, status, nil]; + + if (statusId) { + OARequestParameter *reply = [[OARequestParameter alloc] initWithName:@"in_reply_to_status_id" value:[NSString stringWithString:statusId]]; + [params addObject:reply]; + } + + [request setHTTPMethod:@"POST"]; + [request setParameters:params]; + + OADataFetcher *fetcher = [[OADataFetcher alloc] init]; + [fetcher fetchDataWithRequest:request + delegate:self + didFinishSelector:@selector(updateTweetTicket:didFinishWithData:) + didFailSelector:@selector(updateTweetTokenTicket:didFailWithError:)]; +} + +- (void)updateTweetTicket:(OAServiceTicket *)ticket didFinishWithData:(NSData *)data { + if (ticket.didSucceed) { + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + [nc postNotificationName:@"getTweetUpdates" object:self]; + + } +} + +- (void)updateTweetTokenTicket:(OAServiceTicket *)ticket didFailWithError:(NSError *)error { + NSLog(@"ERROR update tweet: %@", error); +} + +@end diff --git a/OAuthConsumer.framework/Headers b/OAuthConsumer.framework/Headers new file mode 120000 index 0000000..a177d2a --- /dev/null +++ b/OAuthConsumer.framework/Headers @@ -0,0 +1 @@ +Versions/Current/Headers \ No newline at end of file diff --git a/OAuthConsumer.framework/OAuthConsumer b/OAuthConsumer.framework/OAuthConsumer new file mode 120000 index 0000000..c0f839d --- /dev/null +++ b/OAuthConsumer.framework/OAuthConsumer @@ -0,0 +1 @@ +Versions/Current/OAuthConsumer \ No newline at end of file diff --git a/OAuthConsumer.framework/Resources b/OAuthConsumer.framework/Resources new file mode 120000 index 0000000..953ee36 --- /dev/null +++ b/OAuthConsumer.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/OAuthConsumer.framework/Versions/A/Headers/NSMutableURLRequest+Parameters.h b/OAuthConsumer.framework/Versions/A/Headers/NSMutableURLRequest+Parameters.h new file mode 100644 index 0000000..13bf9af --- /dev/null +++ b/OAuthConsumer.framework/Versions/A/Headers/NSMutableURLRequest+Parameters.h @@ -0,0 +1,35 @@ +// +// NSMutableURLRequest+Parameters.h +// +// Created by Jon Crosby on 10/19/07. +// Copyright 2007 Kaboomerang LLC. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +#import "OARequestParameter.h" +#import "NSURL+Base.h" + + +@interface NSMutableURLRequest (OAParameterAdditions) + +- (NSArray *)parameters; +- (void)setParameters:(NSArray *)parameters; + +@end diff --git a/OAuthConsumer.framework/Versions/A/Headers/NSString+URLEncoding.h b/OAuthConsumer.framework/Versions/A/Headers/NSString+URLEncoding.h new file mode 100644 index 0000000..de06fe7 --- /dev/null +++ b/OAuthConsumer.framework/Versions/A/Headers/NSString+URLEncoding.h @@ -0,0 +1,34 @@ +// +// NSString+URLEncoding.h +// +// Created by Jon Crosby on 10/19/07. +// Copyright 2007 Kaboomerang LLC. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + + +#import + + +@interface NSString (OAURLEncodingAdditions) + +- (NSString *)URLEncodedString; +- (NSString *)URLDecodedString; + +@end diff --git a/OAuthConsumer.framework/Versions/A/Headers/NSURL+Base.h b/OAuthConsumer.framework/Versions/A/Headers/NSURL+Base.h new file mode 100644 index 0000000..5d12b69 --- /dev/null +++ b/OAuthConsumer.framework/Versions/A/Headers/NSURL+Base.h @@ -0,0 +1,34 @@ +// +// NSURL+Base.h +// OAuthConsumer +// +// Created by Jon Crosby on 10/19/07. +// Copyright 2007 Kaboomerang LLC. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + + +#import + + +@interface NSURL (OABaseAdditions) + +- (NSString *)URLStringWithoutQuery; + +@end diff --git a/OAuthConsumer.framework/Versions/A/Headers/OAAsynchronousDataFetcher.h b/OAuthConsumer.framework/Versions/A/Headers/OAAsynchronousDataFetcher.h new file mode 100644 index 0000000..83089f3 --- /dev/null +++ b/OAuthConsumer.framework/Versions/A/Headers/OAAsynchronousDataFetcher.h @@ -0,0 +1,45 @@ +// +// OAAsynchronousDataFetcher.h +// OAuthConsumer +// +// Created by Zsombor Szabó on 12/3/08. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#import "OAMutableURLRequest.h" + +@interface OAAsynchronousDataFetcher : NSObject { + OAMutableURLRequest *request; + NSURLResponse *response; + NSURLConnection *connection; + NSMutableData *responseData; + id delegate; + SEL didFinishSelector; + SEL didFailSelector; +} + ++ (id)asynchronousFetcherWithRequest:(OAMutableURLRequest *)aRequest delegate:(id)aDelegate didFinishSelector:(SEL)finishSelector didFailSelector:(SEL)failSelector; +- (id)initWithRequest:(OAMutableURLRequest *)aRequest delegate:(id)aDelegate didFinishSelector:(SEL)finishSelector didFailSelector:(SEL)failSelector; + +- (void)start; +- (void)cancel; + +@end diff --git a/OAuthConsumer.framework/Versions/A/Headers/OAConsumer.h b/OAuthConsumer.framework/Versions/A/Headers/OAConsumer.h new file mode 100644 index 0000000..73bdab6 --- /dev/null +++ b/OAuthConsumer.framework/Versions/A/Headers/OAConsumer.h @@ -0,0 +1,40 @@ +// +// OAConsumer.h +// OAuthConsumer +// +// Created by Jon Crosby on 10/19/07. +// Copyright 2007 Kaboomerang LLC. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + + +#import + + +@interface OAConsumer : NSObject { +@protected + NSString *key; + NSString *secret; +} +@property(retain) NSString *key; +@property(retain) NSString *secret; + +- (id)initWithKey:(NSString *)aKey secret:(NSString *)aSecret; + +@end diff --git a/OAuthConsumer.framework/Versions/A/Headers/OADataFetcher.h b/OAuthConsumer.framework/Versions/A/Headers/OADataFetcher.h new file mode 100644 index 0000000..f2c0240 --- /dev/null +++ b/OAuthConsumer.framework/Versions/A/Headers/OADataFetcher.h @@ -0,0 +1,45 @@ +// +// OADataFetcher.h +// OAuthConsumer +// +// Created by Jon Crosby on 11/5/07. +// Copyright 2007 Kaboomerang LLC. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +#import "OAMutableURLRequest.h" +#import "OAServiceTicket.h" + + +@interface OADataFetcher : NSObject { +@private + OAMutableURLRequest *request; + NSURLResponse *response; + NSURLConnection *connection; + NSError *error; + NSData *responseData; + id delegate; + SEL didFinishSelector; + SEL didFailSelector; +} + +- (void)fetchDataWithRequest:(OAMutableURLRequest *)aRequest delegate:(id)aDelegate didFinishSelector:(SEL)finishSelector didFailSelector:(SEL)failSelector; + +@end diff --git a/OAuthConsumer.framework/Versions/A/Headers/OAHMAC_SHA1SignatureProvider.h b/OAuthConsumer.framework/Versions/A/Headers/OAHMAC_SHA1SignatureProvider.h new file mode 100644 index 0000000..d259c4e --- /dev/null +++ b/OAuthConsumer.framework/Versions/A/Headers/OAHMAC_SHA1SignatureProvider.h @@ -0,0 +1,32 @@ +// +// OAHMAC_SHA1SignatureProvider.h +// OAuthConsumer +// +// Created by Jon Crosby on 10/19/07. +// Copyright 2007 Kaboomerang LLC. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + + +#import +#import "OASignatureProviding.h" + + +@interface OAHMAC_SHA1SignatureProvider : NSObject +@end diff --git a/OAuthConsumer.framework/Versions/A/Headers/OAMutableURLRequest.h b/OAuthConsumer.framework/Versions/A/Headers/OAMutableURLRequest.h new file mode 100644 index 0000000..fdf0a1a --- /dev/null +++ b/OAuthConsumer.framework/Versions/A/Headers/OAMutableURLRequest.h @@ -0,0 +1,68 @@ +// +// OAMutableURLRequest.h +// OAuthConsumer +// +// Created by Jon Crosby on 10/19/07. +// Copyright 2007 Kaboomerang LLC. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + + +#import +#import "OAConsumer.h" +#import "OAToken.h" +#import "OAHMAC_SHA1SignatureProvider.h" +#import "OASignatureProviding.h" +#import "NSMutableURLRequest+Parameters.h" +#import "NSURL+Base.h" + + +@interface OAMutableURLRequest : NSMutableURLRequest { +@protected + OAConsumer *consumer; + OAToken *token; + NSString *realm; + NSString *signature; + id signatureProvider; + NSString *nonce; + NSString *timestamp; + NSMutableDictionary *extraOAuthParameters; +} +@property(readonly) NSString *signature; +@property(readonly) NSString *nonce; + +- (id)initWithURL:(NSURL *)aUrl + consumer:(OAConsumer *)aConsumer + token:(OAToken *)aToken + realm:(NSString *)aRealm +signatureProvider:(id)aProvider; + +- (id)initWithURL:(NSURL *)aUrl + consumer:(OAConsumer *)aConsumer + token:(OAToken *)aToken + realm:(NSString *)aRealm +signatureProvider:(id)aProvider + nonce:(NSString *)aNonce + timestamp:(NSString *)aTimestamp; + +- (void)prepare; + +- (void)setOAuthParameterName:(NSString*)parameterName withValue:(NSString*)parameterValue; + +@end diff --git a/OAuthConsumer.framework/Versions/A/Headers/OAPlaintextSignatureProvider.h b/OAuthConsumer.framework/Versions/A/Headers/OAPlaintextSignatureProvider.h new file mode 100644 index 0000000..96bb2f2 --- /dev/null +++ b/OAuthConsumer.framework/Versions/A/Headers/OAPlaintextSignatureProvider.h @@ -0,0 +1,31 @@ +// +// OAPlaintextSignatureProvider.h +// OAuthConsumer +// +// Created by Jon Crosby on 10/19/07. +// Copyright 2007 Kaboomerang LLC. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + + +#import +#import "OASignatureProviding.h" + +@interface OAPlaintextSignatureProvider : NSObject +@end diff --git a/OAuthConsumer.framework/Versions/A/Headers/OARequestParameter.h b/OAuthConsumer.framework/Versions/A/Headers/OARequestParameter.h new file mode 100644 index 0000000..03eee3e --- /dev/null +++ b/OAuthConsumer.framework/Versions/A/Headers/OARequestParameter.h @@ -0,0 +1,45 @@ +// +// OARequestParameter.h +// OAuthConsumer +// +// Created by Jon Crosby on 10/19/07. +// Copyright 2007 Kaboomerang LLC. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + + +#import +#import "NSString+URLEncoding.h" + + +@interface OARequestParameter : NSObject { +@protected + NSString *name; + NSString *value; +} +@property(retain) NSString *name; +@property(retain) NSString *value; + ++ (id)requestParameterWithName:(NSString *)aName value:(NSString *)aValue; +- (id)initWithName:(NSString *)aName value:(NSString *)aValue; +- (NSString *)URLEncodedName; +- (NSString *)URLEncodedValue; +- (NSString *)URLEncodedNameValuePair; + +@end diff --git a/OAuthConsumer.framework/Versions/A/Headers/OAServiceTicket.h b/OAuthConsumer.framework/Versions/A/Headers/OAServiceTicket.h new file mode 100644 index 0000000..69196df --- /dev/null +++ b/OAuthConsumer.framework/Versions/A/Headers/OAServiceTicket.h @@ -0,0 +1,43 @@ +// +// OAServiceTicket.h +// OAuthConsumer +// +// Created by Jon Crosby on 11/5/07. +// Copyright 2007 Kaboomerang LLC. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + + +#import +#import "OAMutableURLRequest.h" + + +@interface OAServiceTicket : NSObject { +@private + OAMutableURLRequest *request; + NSURLResponse *response; + BOOL didSucceed; +} +@property(retain) OAMutableURLRequest *request; +@property(retain) NSURLResponse *response; +@property(assign) BOOL didSucceed; + +- (id)initWithRequest:(OAMutableURLRequest *)aRequest response:(NSURLResponse *)aResponse didSucceed:(BOOL)success; + +@end diff --git a/OAuthConsumer.framework/Versions/A/Headers/OASignatureProviding.h b/OAuthConsumer.framework/Versions/A/Headers/OASignatureProviding.h new file mode 100644 index 0000000..0c7e4f8 --- /dev/null +++ b/OAuthConsumer.framework/Versions/A/Headers/OASignatureProviding.h @@ -0,0 +1,34 @@ +// +// OASignatureProviding.h +// +// Created by Jon Crosby on 10/19/07. +// Copyright 2007 Kaboomerang LLC. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + + +#import + + +@protocol OASignatureProviding + +- (NSString *)name; +- (NSString *)signClearText:(NSString *)text withSecret:(NSString *)secret; + +@end diff --git a/OAuthConsumer.framework/Versions/A/Headers/OAToken.h b/OAuthConsumer.framework/Versions/A/Headers/OAToken.h new file mode 100644 index 0000000..8dd331e --- /dev/null +++ b/OAuthConsumer.framework/Versions/A/Headers/OAToken.h @@ -0,0 +1,41 @@ +// +// OAToken.h +// OAuthConsumer +// +// Created by Jon Crosby on 10/19/07. +// Copyright 2007 Kaboomerang LLC. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +@interface OAToken : NSObject { +@protected + NSString *key; + NSString *secret; +} +@property(retain) NSString *key; +@property(retain) NSString *secret; + +- (id)initWithKey:(NSString *)aKey secret:(NSString *)aSecret; +- (id)initWithUserDefaultsUsingServiceProviderName:(NSString *)provider prefix:(NSString *)prefix; +- (id)initWithHTTPResponseBody:(NSString *)body; +- (int)storeInUserDefaultsWithServiceProviderName:(NSString *)provider prefix:(NSString *)prefix; + +@end diff --git a/OAuthConsumer.framework/Versions/A/Headers/OAToken_KeychainExtensions.h b/OAuthConsumer.framework/Versions/A/Headers/OAToken_KeychainExtensions.h new file mode 100644 index 0000000..abcb274 --- /dev/null +++ b/OAuthConsumer.framework/Versions/A/Headers/OAToken_KeychainExtensions.h @@ -0,0 +1,19 @@ +// +// OAToken_KeychainExtensions.h +// TouchTheFireEagle +// +// Created by Jonathan Wight on 04/04/08. +// Copyright 2008 __MyCompanyName__. All rights reserved. +// + +#import "OAToken.h" + +#import + +@interface OAToken (OAToken_KeychainExtensions) + +- (id)initWithKeychainUsingAppName:(NSString *)name serviceProviderName:(NSString *)provider; +- (int)storeInDefaultKeychainWithAppName:(NSString *)name serviceProviderName:(NSString *)provider; +- (int)storeInKeychain:(SecKeychainRef)keychain appName:(NSString *)name serviceProviderName:(NSString *)provider; + +@end diff --git a/OAuthConsumer.framework/Versions/A/Headers/OAuthConsumer.h b/OAuthConsumer.framework/Versions/A/Headers/OAuthConsumer.h new file mode 100644 index 0000000..cf9aab0 --- /dev/null +++ b/OAuthConsumer.framework/Versions/A/Headers/OAuthConsumer.h @@ -0,0 +1,39 @@ +// +// OAuthConsumer.h +// OAuthConsumer +// +// Created by Jon Crosby on 10/19/07. +// Copyright 2007 Kaboomerang LLC. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import \ No newline at end of file diff --git a/OAuthConsumer.framework/Versions/A/OAuthConsumer b/OAuthConsumer.framework/Versions/A/OAuthConsumer new file mode 100755 index 0000000..3275e1a Binary files /dev/null and b/OAuthConsumer.framework/Versions/A/OAuthConsumer differ diff --git a/OAuthConsumer.framework/Versions/A/Resources/English.lproj/InfoPlist.strings b/OAuthConsumer.framework/Versions/A/Resources/English.lproj/InfoPlist.strings new file mode 100644 index 0000000..514729a Binary files /dev/null and b/OAuthConsumer.framework/Versions/A/Resources/English.lproj/InfoPlist.strings differ diff --git a/OAuthConsumer.framework/Versions/A/Resources/Info.plist b/OAuthConsumer.framework/Versions/A/Resources/Info.plist new file mode 100644 index 0000000..23f6877 --- /dev/null +++ b/OAuthConsumer.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + OAuthConsumer + CFBundleIdentifier + net.oauth.OAuthConsumer + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + OAuthConsumer + CFBundlePackageType + FMWK + CFBundleSignature + ???? + CFBundleVersion + 0.1.1 + + diff --git a/OAuthConsumer.framework/Versions/Current b/OAuthConsumer.framework/Versions/Current new file mode 120000 index 0000000..8c7e5a6 --- /dev/null +++ b/OAuthConsumer.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/ReleaseNotes.html b/ReleaseNotes.html index 2477f8a..8004562 100644 --- a/ReleaseNotes.html +++ b/ReleaseNotes.html @@ -11,16 +11,6 @@ - - -

Twittia 2.4.0

- -

Rewritten the OAuth parts in pure JavaScript.

-

Small bugfixes.

-

Added thumbnails for Twitter, Twitpic, Yfrog and YouTube links.

-

Raplacing to.co, bit.ly and j.mp links with full URLs.

- -

Twittia 2.3.1

Fixed problem with replay to id where you weren't able to replay to anyone.

diff --git a/Twittia 2.xcodeproj/project.pbxproj b/Twittia 2.xcodeproj/project.pbxproj index 4108261..f0e2937 100644 --- a/Twittia 2.xcodeproj/project.pbxproj +++ b/Twittia 2.xcodeproj/project.pbxproj @@ -3,17 +3,20 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 45; objects = { /* Begin PBXBuildFile section */ - 1DDD582C0DA1D0D100B32029 /* NewTweetWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58280DA1D0D100B32029 /* NewTweetWindow.xib */; }; + 1DDD582C0DA1D0D100B32029 /* MyDocument.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58280DA1D0D100B32029 /* MyDocument.xib */; }; 1DDD582D0DA1D0D100B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD582A0DA1D0D100B32029 /* MainMenu.xib */; }; 1F122D49118E1DE100E83B77 /* Icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 1F122D48118E1DE100E83B77 /* Icon.icns */; }; 1F1990C6117BCA960049BEA7 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1F1990C5117BCA960049BEA7 /* ApplicationServices.framework */; }; 1F2746FC12D9057600339B4F /* dsa_pub.pem in Resources */ = {isa = PBXBuildFile; fileRef = 1FE2FCA6117A8952000504B0 /* dsa_pub.pem */; }; 1F3642EF118C8C35008198EF /* oauth.js in Resources */ = {isa = PBXBuildFile; fileRef = 1F3642ED118C8C35008198EF /* oauth.js */; }; 1F3642F0118C8C35008198EF /* sha1.js in Resources */ = {isa = PBXBuildFile; fileRef = 1F3642EE118C8C35008198EF /* sha1.js */; }; + 1F364398118CBC77008198EF /* OAuth.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F364397118CBC77008198EF /* OAuth.m */; }; + 1F36440F118CC173008198EF /* OAuthConsumer.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 1F36440E118CC173008198EF /* OAuthConsumer.framework */; }; + 1F36465E118DA5A7008198EF /* OAToken+WebView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F36465D118DA5A7008198EF /* OAToken+WebView.m */; }; 1F4673FE1180F7EA006CC37C /* TwittiaCore.js in Resources */ = {isa = PBXBuildFile; fileRef = 1F4673E61180F654006CC37C /* TwittiaCore.js */; }; 1F4674081180F7EE006CC37C /* jQuery.js in Resources */ = {isa = PBXBuildFile; fileRef = 1F4673E21180F519006CC37C /* jQuery.js */; }; 1F4674091180F7F3006CC37C /* jQuery-Plugins.js in Resources */ = {isa = PBXBuildFile; fileRef = 1F4673E41180F590006CC37C /* jQuery-Plugins.js */; }; @@ -22,11 +25,7 @@ 1F70619F1178FBB300C85707 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1F70619E1178FBB300C85707 /* Carbon.framework */; }; 1F77DB47118C5F1C007C7F1E /* Constants.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F77DB46118C5F1C007C7F1E /* Constants.m */; }; 1F98DC9E124BFFD7004289ED /* pin.png in Resources */ = {isa = PBXBuildFile; fileRef = 1F98DC9D124BFFD7004289ED /* pin.png */; }; - 1FA09847144602530079E258 /* libicucore.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1FA09846144602530079E258 /* libicucore.dylib */; }; - 1FC254941427BC050035D84B /* index_oauth.html in Resources */ = {isa = PBXBuildFile; fileRef = 1FC254931427BC050035D84B /* index_oauth.html */; }; - 1FC254951427BF150035D84B /* TwittiaOauth.js in Resources */ = {isa = PBXBuildFile; fileRef = 1FC254911427ADF90035D84B /* TwittiaOauth.js */; }; - 1FC2549F1427DC7F0035D84B /* Constants.js in Resources */ = {isa = PBXBuildFile; fileRef = 1FC2549D1427DC2B0035D84B /* Constants.js */; }; - 1FC254A01427DFAD0035D84B /* AccessToken.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FC2549B1427D9930035D84B /* AccessToken.m */; }; + 1FB074DD118DDAB60013A93C /* OAuthConsumer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1F36440E118CC173008198EF /* OAuthConsumer.framework */; }; 1FE2FC93117A818D000504B0 /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1FE2FC92117A818D000504B0 /* Sparkle.framework */; }; 1FE2FCA4117A83B1000504B0 /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 1FE2FC92117A818D000504B0 /* Sparkle.framework */; }; 1FFA36CD1177D861006C8562 /* even-bg.png in Resources */ = {isa = PBXBuildFile; fileRef = 1FFA36C81177D861006C8562 /* even-bg.png */; }; @@ -38,7 +37,7 @@ 1FFA37071177DAF4006C8562 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1FFA37061177DAF4006C8562 /* WebKit.framework */; }; 8D15AC2C0486D014006FF6A4 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 2A37F4B9FDCFA73011CA2CEA /* Credits.rtf */; }; 8D15AC2F0486D014006FF6A4 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165FFE840EACC02AAC07 /* InfoPlist.strings */; }; - 8D15AC310486D014006FF6A4 /* NewTweetWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A37F4ACFDCFA73011CA2CEA /* NewTweetWindow.m */; settings = {ATTRIBUTES = (); }; }; + 8D15AC310486D014006FF6A4 /* MyDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A37F4ACFDCFA73011CA2CEA /* MyDocument.m */; settings = {ATTRIBUTES = (); }; }; 8D15AC320486D014006FF6A4 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A37F4B0FDCFA73011CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; 8D15AC340486D014006FF6A4 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A7FEA54F5311CA2CBB /* Cocoa.framework */; }; /* End PBXBuildFile section */ @@ -50,6 +49,7 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( + 1F36440F118CC173008198EF /* OAuthConsumer.framework in CopyFiles */, 1FE2FCA4117A83B1000504B0 /* Sparkle.framework in CopyFiles */, ); runOnlyForDeploymentPostprocessing = 0; @@ -60,7 +60,7 @@ 089C1660FE840EACC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; 1058C7A7FEA54F5311CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 13E42FBA07B3F13500E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = ""; }; - 1DDD58290DA1D0D100B32029 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/NewTweetWindow.xib; sourceTree = ""; }; + 1DDD58290DA1D0D100B32029 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MyDocument.xib; sourceTree = ""; }; 1DDD582B0DA1D0D100B32029 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = ""; }; 1F122D48118E1DE100E83B77 /* Icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = Icon.icns; sourceTree = ""; }; 1F198FC7117BC4AB0049BEA7 /* README.markdown */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.markdown; sourceTree = ""; }; @@ -69,7 +69,11 @@ 1F1990E1117BD2650049BEA7 /* ReleaseNotes.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = ReleaseNotes.html; sourceTree = ""; }; 1F3642ED118C8C35008198EF /* oauth.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = oauth.js; sourceTree = ""; }; 1F3642EE118C8C35008198EF /* sha1.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = sha1.js; sourceTree = ""; }; + 1F364396118CBC77008198EF /* OAuth.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OAuth.h; sourceTree = ""; }; + 1F364397118CBC77008198EF /* OAuth.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OAuth.m; sourceTree = ""; }; 1F36440E118CC173008198EF /* OAuthConsumer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = OAuthConsumer.framework; sourceTree = ""; }; + 1F36465C118DA5A7008198EF /* OAToken+WebView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "OAToken+WebView.h"; sourceTree = ""; }; + 1F36465D118DA5A7008198EF /* OAToken+WebView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "OAToken+WebView.m"; sourceTree = ""; }; 1F4673E21180F519006CC37C /* jQuery.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jQuery.js; sourceTree = ""; }; 1F4673E41180F590006CC37C /* jQuery-Plugins.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = "jQuery-Plugins.js"; sourceTree = ""; }; 1F4673E61180F654006CC37C /* TwittiaCore.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = TwittiaCore.js; sourceTree = ""; }; @@ -80,12 +84,6 @@ 1F77DB45118C5F1C007C7F1E /* Constants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Constants.h; sourceTree = ""; }; 1F77DB46118C5F1C007C7F1E /* Constants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Constants.m; sourceTree = ""; }; 1F98DC9D124BFFD7004289ED /* pin.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = pin.png; sourceTree = ""; }; - 1FA09846144602530079E258 /* libicucore.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libicucore.dylib; path = usr/lib/libicucore.dylib; sourceTree = SDKROOT; }; - 1FC254911427ADF90035D84B /* TwittiaOauth.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = TwittiaOauth.js; sourceTree = ""; }; - 1FC254931427BC050035D84B /* index_oauth.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = index_oauth.html; sourceTree = ""; }; - 1FC2549A1427D9930035D84B /* AccessToken.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccessToken.h; sourceTree = ""; }; - 1FC2549B1427D9930035D84B /* AccessToken.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AccessToken.m; sourceTree = ""; }; - 1FC2549D1427DC2B0035D84B /* Constants.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = Constants.js; sourceTree = ""; }; 1FE2FC92117A818D000504B0 /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Sparkle.framework; sourceTree = ""; }; 1FE2FCA6117A8952000504B0 /* dsa_pub.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = dsa_pub.pem; sourceTree = ""; }; 1FFA36C81177D861006C8562 /* even-bg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "even-bg.png"; sourceTree = ""; }; @@ -98,8 +96,8 @@ 1FFA36D51177D879006C8562 /* ViewDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewDelegate.m; sourceTree = ""; }; 1FFA37061177DAF4006C8562 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; }; 2564AD2C0F5327BB00F57823 /* Twittia_2_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Twittia_2_Prefix.pch; sourceTree = ""; }; - 2A37F4ACFDCFA73011CA2CEA /* NewTweetWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NewTweetWindow.m; sourceTree = ""; }; - 2A37F4AEFDCFA73011CA2CEA /* NewTweetWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NewTweetWindow.h; sourceTree = ""; }; + 2A37F4ACFDCFA73011CA2CEA /* MyDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyDocument.m; sourceTree = ""; }; + 2A37F4AEFDCFA73011CA2CEA /* MyDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyDocument.h; sourceTree = ""; }; 2A37F4B0FDCFA73011CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 2A37F4BAFDCFA73011CA2CEA /* English */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = English; path = English.lproj/Credits.rtf; sourceTree = ""; }; 2A37F4C4FDCFA73011CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; @@ -113,7 +111,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 1FA09847144602530079E258 /* libicucore.dylib in Frameworks */, + 1FB074DD118DDAB60013A93C /* OAuthConsumer.framework in Frameworks */, 8D15AC340486D014006FF6A4 /* Cocoa.framework in Frameworks */, 1FFA37071177DAF4006C8562 /* WebKit.framework in Frameworks */, 1F70619F1178FBB300C85707 /* Carbon.framework in Frameworks */, @@ -162,13 +160,10 @@ 1F3642ED118C8C35008198EF /* oauth.js */, 1F3642EE118C8C35008198EF /* sha1.js */, 1F4673E61180F654006CC37C /* TwittiaCore.js */, - 1FC254911427ADF90035D84B /* TwittiaOauth.js */, - 1FC2549D1427DC2B0035D84B /* Constants.js */, 1FFA36C81177D861006C8562 /* even-bg.png */, 1F98DC9D124BFFD7004289ED /* pin.png */, 1F705EA5117889FA00C85707 /* sprite-icons.png */, 1FFA36C91177D861006C8562 /* index.html */, - 1FC254931427BC050035D84B /* index_oauth.html */, 1FFA36CA1177D861006C8562 /* odd-bg.png */, 1FFA36CB1177D861006C8562 /* default.css */, 1F4673E21180F519006CC37C /* jQuery.js */, @@ -180,7 +175,6 @@ 2A37F4AAFDCFA73011CA2CEA /* Twittia 2 */ = { isa = PBXGroup; children = ( - 1FA09846144602530079E258 /* libicucore.dylib */, 2A37F4ABFDCFA73011CA2CEA /* Classes */, 2A37F4AFFDCFA73011CA2CEA /* Other Sources */, 2A37F4B8FDCFA73011CA2CEA /* Resources */, @@ -197,14 +191,16 @@ 1FFA36D31177D879006C8562 /* Controller.m */, 1FFA36D41177D879006C8562 /* ViewDelegate.h */, 1FFA36D51177D879006C8562 /* ViewDelegate.m */, - 2A37F4AEFDCFA73011CA2CEA /* NewTweetWindow.h */, - 2A37F4ACFDCFA73011CA2CEA /* NewTweetWindow.m */, + 2A37F4AEFDCFA73011CA2CEA /* MyDocument.h */, + 2A37F4ACFDCFA73011CA2CEA /* MyDocument.m */, + 1F364396118CBC77008198EF /* OAuth.h */, + 1F364397118CBC77008198EF /* OAuth.m */, 1F77DB45118C5F1C007C7F1E /* Constants.h */, 1F77DB46118C5F1C007C7F1E /* Constants.m */, + 1F36465C118DA5A7008198EF /* OAToken+WebView.h */, + 1F36465D118DA5A7008198EF /* OAToken+WebView.m */, 1F618EC812DB5E6100E500D9 /* TweetModel.h */, 1F618EC912DB5E6100E500D9 /* TweetModel.m */, - 1FC2549A1427D9930035D84B /* AccessToken.h */, - 1FC2549B1427D9930035D84B /* AccessToken.m */, ); name = Classes; sourceTree = ""; @@ -228,7 +224,7 @@ 2A37F4B9FDCFA73011CA2CEA /* Credits.rtf */, 8D15AC360486D014006FF6A4 /* Twittia_2-Info.plist */, 089C165FFE840EACC02AAC07 /* InfoPlist.strings */, - 1DDD58280DA1D0D100B32029 /* NewTweetWindow.xib */, + 1DDD58280DA1D0D100B32029 /* MyDocument.xib */, 1DDD582A0DA1D0D100B32029 /* MainMenu.xib */, 1F1990E1117BD2650049BEA7 /* ReleaseNotes.html */, 1F1990DF117BD2250049BEA7 /* Appcast.xml */, @@ -272,11 +268,8 @@ /* Begin PBXProject section */ 2A37F4A9FDCFA73011CA2CEA /* Project object */ = { isa = PBXProject; - attributes = { - LastUpgradeCheck = 0450; - }; buildConfigurationList = C05733CB08A9546B00998B17 /* Build configuration list for PBXProject "Twittia 2" */; - compatibilityVersion = "Xcode 3.2"; + compatibilityVersion = "Xcode 3.1"; developmentRegion = English; hasScannedForEncodings = 1; knownRegions = ( @@ -299,15 +292,13 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 1FC2549F1427DC7F0035D84B /* Constants.js in Resources */, - 1FC254951427BF150035D84B /* TwittiaOauth.js in Resources */, 1F2746FC12D9057600339B4F /* dsa_pub.pem in Resources */, 1F3642EF118C8C35008198EF /* oauth.js in Resources */, 1F3642F0118C8C35008198EF /* sha1.js in Resources */, 1F4673FE1180F7EA006CC37C /* TwittiaCore.js in Resources */, 8D15AC2C0486D014006FF6A4 /* Credits.rtf in Resources */, 8D15AC2F0486D014006FF6A4 /* InfoPlist.strings in Resources */, - 1DDD582C0DA1D0D100B32029 /* NewTweetWindow.xib in Resources */, + 1DDD582C0DA1D0D100B32029 /* MyDocument.xib in Resources */, 1DDD582D0DA1D0D100B32029 /* MainMenu.xib in Resources */, 1FFA36CD1177D861006C8562 /* even-bg.png in Resources */, 1F4674091180F7F3006CC37C /* jQuery-Plugins.js in Resources */, @@ -318,7 +309,6 @@ 1F705EA6117889FA00C85707 /* sprite-icons.png in Resources */, 1F122D49118E1DE100E83B77 /* Icon.icns in Resources */, 1F98DC9E124BFFD7004289ED /* pin.png in Resources */, - 1FC254941427BC050035D84B /* index_oauth.html in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -329,12 +319,13 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 1FC254A01427DFAD0035D84B /* AccessToken.m in Sources */, - 8D15AC310486D014006FF6A4 /* NewTweetWindow.m in Sources */, + 8D15AC310486D014006FF6A4 /* MyDocument.m in Sources */, 8D15AC320486D014006FF6A4 /* main.m in Sources */, 1FFA36D71177D879006C8562 /* Controller.m in Sources */, 1FFA36D81177D879006C8562 /* ViewDelegate.m in Sources */, 1F77DB47118C5F1C007C7F1E /* Constants.m in Sources */, + 1F364398118CBC77008198EF /* OAuth.m in Sources */, + 1F36465E118DA5A7008198EF /* OAToken+WebView.m in Sources */, 1F618ECA12DB5E6100E500D9 /* TweetModel.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -350,12 +341,12 @@ name = InfoPlist.strings; sourceTree = ""; }; - 1DDD58280DA1D0D100B32029 /* NewTweetWindow.xib */ = { + 1DDD58280DA1D0D100B32029 /* MyDocument.xib */ = { isa = PBXVariantGroup; children = ( 1DDD58290DA1D0D100B32029 /* English */, ); - name = NewTweetWindow.xib; + name = MyDocument.xib; sourceTree = ""; }; 1DDD582A0DA1D0D100B32029 /* MainMenu.xib */ = { @@ -381,13 +372,15 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "\"$(SRCROOT)\"", + "\"$(SRCROOT)/../../Desktop/mpoauthconnection-read-only/build/Release\"", + "\"$(SRCROOT)/../oauth-obj-c/OAuthConsumer/build/Release\"", ); GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; GCC_MODEL_TUNING = G5; GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -403,12 +396,13 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "\"$(SRCROOT)\"", + "\"$(SRCROOT)/../../Desktop/mpoauthconnection-read-only/build/Release\"", + "\"$(SRCROOT)/../oauth-obj-c/OAuthConsumer/build/Release\"", ); GCC_MODEL_TUNING = G5; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -430,6 +424,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.5; ONLY_ACTIVE_ARCH = YES; + PREBINDING = NO; SDKROOT = macosx; }; name = Debug; @@ -442,7 +437,7 @@ GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.5; - ONLY_ACTIVE_ARCH = NO; + PREBINDING = NO; SDKROOT = macosx; }; name = Release; diff --git a/TwittiaCore.js b/TwittiaCore.js index 7e8bd40..791c9ac 100644 --- a/TwittiaCore.js +++ b/TwittiaCore.js @@ -6,24 +6,19 @@ // Licence: BSD (see attached LICENCE.txt file). // +//API_PATH = "http://api.twitter.com/1/"; +API_PATH = "http://identi.ca/api/"; + function Twittia(action) { - this.max_length = 100; - this.since_id; - this.timeout = 2 * 60 * 1000; - this.action = action; - this.getNewData(); - this.unread_mentions = 0; - - this.body = document.createElement("ol"); - this.body.className = this.action; - -/* - if (action == "home_timeline") { - this.usernames = []; - this.getUsernames("friends"); - this.getUsernames("followers"); - } -*/ + this.max_length = 100; + this.since_id; + this.timeout = 2 * 60 * 1000; + this.action = action; + this.getNewData(); + this.unread_mentions = 0; + + this.body = document.createElement("ol"); + this.body.className = this.action; } Twittia.prototype.newStatus = function(status, supress_new_with_timeout) { @@ -62,13 +57,22 @@ Twittia.prototype.getItem = function(status) { } var template = this.getTemplate(); - + /* + template.item.id = "id-" + status.id_str; + template.item.onmousedown = function(e) { if(e.button == 2) { + var target = e.target; + while(target.nodeName != "LI" && target != null) { + target = target.parentNode; + } + + alert(target.id); + }}*/ template.reply_to.onclick = function() { replyTo(status.user.screen_name, status.id_str); return false; } template.retweet.onclick = function() { template.retweet.className = "hidden"; _this.retweet(status.id_str, template.item); return false; } template.image.src = status.user.profile_image_url; template.username.innerText = status.user.screen_name; - template.username.href = WEBSITE_PATH + status.user.screen_name + template.username.href = API_PATH + status.user.screen_name if(original_status != null) { var retweeted = document.createElement("span") @@ -78,17 +82,17 @@ Twittia.prototype.getItem = function(status) { retweeted.appendChild(retweeted_icon); var retweeted_by = document.createElement("a"); retweeted_by.innerText = original_status.user.screen_name + " "; - retweeted_by.href = WEBSITE_PATH + original_status.user.screen_name; + retweeted_by.href = API_PATH + original_status.user.screen_name; retweeted.appendChild(document.createTextNode("@")); retweeted.appendChild(retweeted_by); template.in_reply.parentNode.parentNode.insertBefore(retweeted, template.in_reply.parent); } - if(status.in_reply_to_status_id_str != null) template.in_reply.innerText = status.in_reply_to_screen_name; + if(status.in_reply_to_status_id != null) template.in_reply.innerText = status.in_reply_to_screen_name; else template.in_reply.parentNode.className = "hidden"; - template.in_reply.href = WEBSITE_PATH + status.in_reply_to_screen_name + "/status/" + status.in_reply_to_status_id_str; + template.in_reply.href = API_PATH + status.in_reply_to_screen_name + "/status/" + status.in_reply_to_status_id; - template.message.innerHTML = replaceTwitterLinks(replaceURLWithHTMLLinks(status.text, status.entities, template.message)); + template.message.innerHTML = replaceTwitterLinks(replaceURLWithHTMLLinks(status.text)); var time = document.createElement("abbr"); time.innerText = status.created_at; @@ -96,7 +100,7 @@ Twittia.prototype.getItem = function(status) { time.className = "timeago"; $(time).timeago(); template.ago.appendChild(time); - template.ago.href = WEBSITE_PATH + status.user.screen_name + "/status/" + status.id_str; + template.ago.href = API_PATH + status.user.screen_name + "/status/" + status.id_str; // {"type":"Point","coordinates":[57.10803113,12.25854746]} if (status.geo && status.geo.type == "Point") { @@ -105,48 +109,6 @@ Twittia.prototype.getItem = function(status) { } template.source.innerHTML = status.source; - - if(status.entities.media) { - - for(var i=0; i 0) { - _this.getUsernames(type, data.next_cursor); - } - }, - error:function (xhr, ajaxOptions, thrownError) { - alert(xhr.status); - alert(thrownError); - } - }); -} - -Twittia.prototype.getUsernamesFromIds = function(ids) { - - var url = API_PATH + "users/lookup.json"; - var _this = this; - var parameters = { user_id:ids.join(",") }; - var message = { method:"GET" , action:url, parameters:parameters }; - - OAuth.completeRequest(message, - { consumerKey : OAUTH_CONSUMER_KEY - , consumerSecret: OAUTH_CONSUMER_SECRET - , token : controller.accessToken.accessToken() - , tokenSecret : controller.accessToken.secret() - }); - - $.ajax({ - beforeSend: function(xhr) { - xhr.setRequestHeader("Authorization", OAuth.getAuthorizationHeader("", message.parameters)); - }, - url: url + "?user_id=" + ids.join(","), - type: 'GET', - dataType: 'json', - success: function(data) { - for (var i=0; i < data.length; i++) { - _this.usernames.push(data[i].screen_name); - } - }, - error:function (xhr, ajaxOptions, thrownError) { - alert(xhr.status); - alert(thrownError); - } - }); -} - -Twittia.prototype.findUsernamesFor = function(query) { - var ret = []; - for (var i=0; i < this.usernames.length; i++) { - if(this.usernames[i].startsWith(query)) { - ret.push(this.usernames[i]); - } - } - return ret; -} - -/* Helper functions */ - -function replaceURLWithHTMLLinks(text, entities, message_node) { - var urls = entities.urls; + var message = {method: method, action: url, parameters: OAuth.decodeForm(params)}; + message.parameters.push(['oauth_consumer_key',controller.oauth.consumerToken.key]); + message.parameters.push(['oauth_nonce',nonce]); + message.parameters.push(['oauth_signature_method','HMAC-SHA1']); + message.parameters.push(['oauth_timestamp',timestamp]); + message.parameters.push(['oauth_token', controller.oauth.accessToken.key]); + message.parameters.push(['oauth_version','1.0']); + message.parameters.sort() - for(var i = 0; i" + replace + ""); - - var media = null; - - // add thumbnail - if(replace.startsWith("http://youtube.com/") || replace.startsWith("http://www.youtube.com/")) { - var v = getUrlVars(replace)["v"]; - if (v) { - media = { - type: "twittia_youtube", - url: original, - media_url: "http://img.youtube.com/vi/" + v + "/1.jpg" - } - } - - } else if (replace.startsWith("http://twitpic.com/")) { - media = { - type: "twittia_photo", - url: original, - media_url: "http://twitpic.com/show/mini/" + replace.substring("http://twitpic.com/".length) - } - - } else if (replace.startsWith("http://yfrog")) { - media = { - type: "twittia_photo", - url: original, - media_url: replace + ":small" - } - - } else if (replace.startsWith("http://instagr.am/p/") || replace.startsWith("http://instagram.com/p/")) { - media = { - type: "twittia_photo", - url: original, - media_url: replace + "media?size=t" - } - } - - if(media) { - if(entities.media) { - entities.media.push(media); - } else { - entities.media = [media]; - } - } - - } - - return text; +function replaceURLWithHTMLLinks(text) { + var exp = /(\b(https?|ftp|file):\/\/\S+)/ig; + return text.replace(exp,"$1"); } function replaceTwitterLinks(text) { @@ -524,50 +365,5 @@ function loadPlugin(url) { document.getElementsByTagName("head")[0].appendChild(plugin); } -String.prototype.startsWith = function(prefix) { - return this.indexOf(prefix) === 0; -} - -String.prototype.endsWith = function(suffix) { - return this.match(suffix+"$") == suffix; -}; - -function getUrlVars(url) -{ - var vars = [], hash; - if(url.indexOf("#") > -1) url = url.slice(0, url.indexOf("#")); - var hashes = url.slice(url.indexOf('?') + 1).split('&'); - for(var i = 0; i < hashes.length; i++) - { - hash = hashes[i].split('='); - vars.push(hash[0]); - vars[hash[0]] = hash[1]; - } - return vars; -} - -function replaceShortened(url, message_node) { - var api = "http://api.bitly.com"; - if(url.startsWith("http://j.mp/")) { - api = "http://api.j.mp"; - } - - var api_url = api + "/v3/expand?format=json&apiKey=R_4fc2a1aa461d076556016390fa6400f6&login=twittia&shortUrl=" + url; - - $.ajax({ - url: api_url, - success: function(data) { - var new_url = data.data.expand[0].long_url; - if (new_url) { - var regex = new RegExp(url, "g"); - message_node.innerHTML = message_node.innerHTML.replace(regex, new_url); - } - }, - error:function (xhr, ajaxOptions, thrownError) { - alert(xhr.status); - alert(thrownError); - } - }); -} var twittia_instance; diff --git a/TwittiaOauth.js b/TwittiaOauth.js deleted file mode 100644 index b1400b9..0000000 --- a/TwittiaOauth.js +++ /dev/null @@ -1,109 +0,0 @@ -// -// TwittiaOauth.js -// Twittia 2 -// -// Created by Jeena on 19.09.11. -// Licence: BSD (see attached LICENCE.txt file). -// - -function TwittiaOauth() { - this.requestAToken(); -} - -TwittiaOauth.prototype.requestAToken = function() { - var url = OAUTH_REQUEST_TOKEN_URL; - var _this = this; - - var message = { method:"POST" , action:url }; - - OAuth.completeRequest(message, - { consumerKey : OAUTH_CONSUMER_KEY - , consumerSecret: OAUTH_CONSUMER_SECRET - //, token : controller.oauth.accessToken.key - //, tokenSecret : controller.oauth.accessToken.secret - }); - - $.ajax({ - beforeSend: function(xhr) { - xhr.setRequestHeader("Authorization", OAuth.getAuthorizationHeader("", message.parameters)); - }, - url: url, - type: 'POST', - dataType: 'text', - success: function(data) { - _this.requestTokenTicketFinished(data); - }, - error:function (xhr, ajaxOptions, thrownError) { - alert(xhr.statusText); - alert(ajaxOptions); - alert(thrownError); - } - }); - -} - -TwittiaOauth.prototype.requestTokenTicketFinished = function(data) { - controller.openURL_(OAUTH_USER_AUTHORIZATION_URL + "?" + data); -} - -TwittiaOauth.prototype.requestAccessToken = function(responseBody) { - // "twittia://oauth_token?oauth_token=jCcf7ClzJMbE4coZdONi467OAQxRGOBZJsuopG8C8&oauth_verifier=BK2ZkAIz51lqI4qta8MnKc280GyDLy0OQBpdsEmjT40" - - var urlVars = getUrlVars(responseBody); - - var url = OAUTH_ACCESS_TOKEN_URL; - var _this = this; - var accessTokenKey = getUrlVars(responseBody) - - var message = { method:"POST" , action:url }; - - OAuth.completeRequest(message, - { consumerKey : OAUTH_CONSUMER_KEY - , consumerSecret: OAUTH_CONSUMER_SECRET - , token : urlVars["oauth_token"] - , tokenSecret : urlVars["oauth_verifier"] - }); - - $.ajax({ - beforeSend: function(xhr) { - xhr.setRequestHeader("Authorization", OAuth.getAuthorizationHeader("", message.parameters)); - }, - url: url, - type: 'POST', - dataType: 'text', - success: function(data) { - _this.requestAccessTokenTicketFinished(data); - }, - error:function (xhr, ajaxOptions, thrownError) { - alert(xhr.statusText); - alert(ajaxOptions); - alert(thrownError); - } - }); -} - -TwittiaOauth.prototype.requestAccessTokenTicketFinished = function(responseBody) { - var urlVars = getUrlVars(responseBody); - controller.storeAccessToken_secret_userId_andScreenName_( - urlVars["oauth_token"], - urlVars["oauth_token_secret"], - urlVars["user_id"], - urlVars["screen_name"] - ); -} - -function getUrlVars(url) -{ - var vars = [], hash; - if(url.indexOf("#") > -1) url = url.slice(0, url.indexOf("#")); - var hashes = url.slice(url.indexOf('?') + 1).split('&'); - for(var i = 0; i < hashes.length; i++) - { - hash = hashes[i].split('='); - vars.push(hash[0]); - vars[hash[0]] = hash[1]; - } - return vars; -} - -var twittia_oauth; \ No newline at end of file diff --git a/Twittia_2-Info.plist b/Twittia_2-Info.plist index 71adde9..55a5109 100644 --- a/Twittia_2-Info.plist +++ b/Twittia_2-Info.plist @@ -22,7 +22,7 @@ CFBundleTypeRole Editor NSDocumentClass - NewTweetWindow + MyDocument CFBundleExecutable @@ -42,7 +42,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 2.4.0 + 2.3.1 CFBundleSignature ???? CFBundleURLTypes @@ -58,7 +58,7 @@ CFBundleVersion - 2.4.0 + 2.3.2 LSApplicationCategoryType public.app-category.lifestyle LSMinimumSystemVersion diff --git a/ViewDelegate.h b/ViewDelegate.h index 539cc89..0692c6c 100644 --- a/ViewDelegate.h +++ b/ViewDelegate.h @@ -13,11 +13,9 @@ @interface ViewDelegate : NSObject { WebView *timelineView; WebView *mentionsView; - WebView *twittiaOauthView; } @property (nonatomic, assign) WebView *timelineView; @property (nonatomic, assign) WebView *mentionsView; -@property (nonatomic, assign) WebView *twittiaOauthView; @end diff --git a/ViewDelegate.m b/ViewDelegate.m index e9c2996..67aa6ab 100644 --- a/ViewDelegate.m +++ b/ViewDelegate.m @@ -11,18 +11,13 @@ @implementation ViewDelegate -@synthesize timelineView, mentionsView, twittiaOauthView; +@synthesize timelineView, mentionsView; - (void)webView:(WebView *)sender addMessageToConsole:(NSDictionary *)message;{ if (![message isKindOfClass:[NSDictionary class]]) return; - NSString *viewName = @"TimelineView"; - if (sender == mentionsView) viewName = @"MentionsView"; - if (sender == twittiaOauthView) viewName = @"TwittiaOauthView"; - - NSLog(@"js<%@>: %@:%@: %@", - viewName, + NSLog(@"js: %@:%@: %@", [[message objectForKey:@"sourceURL"] lastPathComponent], [message objectForKey:@"lineNumber"], [message objectForKey:@"message"] @@ -30,11 +25,7 @@ } - (void)webView:(WebView *)sender runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame { - NSString *viewName = @"TimelineView"; - if (sender == mentionsView) viewName = @"MentionsView"; - if (sender == twittiaOauthView) viewName = @"TwittiaOauthView"; - - NSLog(@"jsa<%@>: %@", viewName, message); + NSLog(@"jsa: %@", message); } - (void)webView:(WebView *)sender decidePolicyForNavigationAction:(NSDictionary *)actionInformation request:(NSURLRequest *)request frame:(WebFrame *)frame decisionListener:(id )listener { @@ -43,26 +34,18 @@ } - (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame { + NSString *action = @"home_timeline"; + NSString *delay = @"1"; - if (sender == twittiaOauthView) { - - [twittiaOauthView stringByEvaluatingJavaScriptFromString:@"setTimeout( function() { twittia_oauth = new TwittiaOauth(); }, 2);"]; - - } else { - - NSString *action = @"home_timeline"; - NSString *delay = @"1"; - - if (sender == mentionsView) { - action = @"mentions"; - delay = @"1000"; - } - - [sender stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat: - @"setTimeout(function(){ twittia_instance = new Twittia('%@'); \ - document.getElementsByTagName('body')[0].appendChild(twittia_instance.body); \ - setTimeout(function() { loadPlugin(controller.pluginURL()) }, 1); }, %@);", action, delay]]; - } + if (sender == mentionsView) { + action = @"mentions"; + delay = @"1000"; + } + + [sender stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat: + @"setTimeout(function(){ twittia_instance = new Twittia('%@'); \ + document.getElementsByTagName('body')[0].appendChild(twittia_instance.body); \ + setTimeout(function() { loadPlugin(controller.pluginURL()) }, 1); }, %@);", action, delay]]; } @end diff --git a/default.css b/default.css index c404f7e..10cf89e 100644 --- a/default.css +++ b/default.css @@ -112,20 +112,6 @@ p { height: 75px; } -.images:empty { - display: none; -} - -.images { - padding-top: 5px; -} - -.images img { - border-radius: 5px; - max-height: 75px; - margin-right: 5px; -} - .delete { font-weight: normal; color: #555; diff --git a/index.html b/index.html index 050db32..3ae01b4 100644 --- a/index.html +++ b/index.html @@ -8,7 +8,6 @@ - diff --git a/index_oauth.html b/index_oauth.html deleted file mode 100644 index b1f2ccd..0000000 --- a/index_oauth.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - Twittia - - - - - - - - - - - \ No newline at end of file