added profile view

This commit is contained in:
Jeena Paradies 2012-11-28 01:56:15 +01:00
parent 0728d2e669
commit fa62ef3629
12 changed files with 539 additions and 68 deletions

View file

@ -15,8 +15,7 @@
@synthesize loginViewWindow;
@synthesize loginEntityTextField;
@synthesize loginActivityIndicator;
@synthesize timelineView, timelineViewWindow, mentionsView, mentionsViewWindow, conversationView, conversationViewWindow;
@synthesize timelineView, timelineViewWindow, mentionsView, mentionsViewWindow, conversationView, conversationViewWindow, profileView, profileViewWindow;
@synthesize globalHotkeyMenuItem, viewDelegate;
@synthesize logoLayer;
@synthesize oauthView, accessToken;
@ -136,12 +135,20 @@
[conversationView setPolicyDelegate:viewDelegate];
[conversationView setUIDelegate:viewDelegate];
[[conversationView windowScriptObject] setValue:self forKey:@"controller"];
viewDelegate.profileView = profileView;
[[profileView mainFrame] loadHTMLString:index_string baseURL:url];
[profileView setFrameLoadDelegate:viewDelegate];
[profileView setPolicyDelegate:viewDelegate];
[profileView setUIDelegate:viewDelegate];
[[profileView windowScriptObject] setValue:self forKey:@"controller"];
}
else
{
[timelineView stringByEvaluatingJavaScriptFromString:@"start('timeline')"];
[mentionsView stringByEvaluatingJavaScriptFromString:@"start('mentions')"];
[conversationView stringByEvaluatingJavaScriptFromString:@"start('conversation')"];
[profileView stringByEvaluatingJavaScriptFromString:@"start('profile')"];
}
}
@ -445,6 +452,13 @@
[conversationViewWindow makeKeyAndOrderFront:self];
}
- (IBAction)showProfileForEntity:(NSString *)entity
{
NSString *js = [NSString stringWithFormat:@"tentia_instance.showProfileForEntity('%@');", entity];
[profileView stringByEvaluatingJavaScriptFromString:js];
[profileViewWindow makeKeyAndOrderFront:self];
}
- (void)growlNotificationWasClicked:(id)clickContext
{
NSDictionary *userInfo = (NSDictionary *)clickContext;