| 1 | // |
| 2 | // FullScreenPlugin.m |
| 3 | // AdiumFullScreen |
| 4 | // |
| 5 | // Created by marc hoffman on 10/21/11. |
| 6 | // Copyright (c) 2011 marc hoffman. All rights reserved. |
| 7 | // |
| 8 | |
| 9 | #import <Adium/AIChat.h> |
| 10 | #import <Adium/AIInterfaceControllerProtocol.h> |
| 11 | #import <Adium/AIChatControllerProtocol.h> |
| 12 | #import <Adium/AIStatusControllerProtocol.h> |
| 13 | #import <Adium/AIContactAlertsControllerProtocol.h> |
| 14 | |
| 15 | #import "FullScreenPlugin.h" |
| 16 | |
| 17 | |
| 18 | @implementation FullScreenPlugin |
| 19 | |
| 20 | - (void) installPlugin |
| 21 | { |
| 22 | NSLog(@"[FullScreenPlugin installPlugin]"); |
| 23 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(chatDidOpen:) name:Chat_DidOpen object:nil]; |
| 24 | } |
| 25 | |
| 26 | - (void) uninstallPlugin |
| 27 | { |
| 28 | NSLog(@"[FullScreenPlugin uninstallPlugin]"); |
| 29 | } |
| 30 | |
| 31 | - (void)chatDidOpen:(NSNotification *)notification |
| 32 | { |
| 33 | NSLog(@"[FullScreenPlugin chatDidOpen:%@]", [notification userInfo]); |
| 34 | for (AIChat *c in [[adium chatController] openChats]) |
| 35 | { |
| 36 | NSWindow *w = [[adium interfaceController] windowForChat:c]; |
| 37 | [w setCollectionBehavior:[w collectionBehavior]+NSWindowCollectionBehaviorFullScreenPrimary]; |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | - (NSString *)pluginAuthor |
| 42 | { |
| 43 | return @"marc hoffman"; |
| 44 | } |
| 45 | |
| 46 | - (NSString *)pluginVersion |
| 47 | { |
| 48 | return @"0.1"; |
| 49 | } |
| 50 | |
| 51 | - (NSString *)pluginDescription |
| 52 | { |
| 53 | return @"Adium Fullscreen support on 10.7"; |
| 54 | } |
| 55 | |
| 56 | - (NSString *)pluginURL |
| 57 | { |
| 58 | return @"http://www.marc-hoffman.com"; |
| 59 | } |
| 60 | |
| 61 | @end |
| 62 | |