Request info to get user icons when a Jabber contact signs on. Fixes #4205
[adiumx.git] / Source / AIMessageWindow.m
blob6b77edc2462c131463a1df3221a9a5e0f2afd831
1 //
2 //  AIMessageWindow.m
3 //  Adium
4 //
5 //  Created by Evan Schoenberg on 12/26/05.
6 //
8 #import "AIMessageWindow.h"
9 #import "AIClickThroughThemeDocumentButton.h"
10 #import <AIUtilities/AIApplicationAdditions.h>
12 /*!
13  * @class AIMessageWindow
14  * @brief This AIDockingWindow subclass serves message windows.
15  *
16  * It overrides the standardWindowButton:forStyleMask: class method to provide
17  * AIClickThroughThemeDocumentButton objects for NSWindowDocumentIconButton requests.
18  */
19 @implementation AIMessageWindow
21 /*!
22  * @brief Return the standard window button for a mask
23  *
24  * We return AIClickThroughThemeDocumentButton instead of NSThemeDocumentButton to provide
25  * click-through dragging behavior.
26  */
27 + (NSButton *)standardWindowButton:(NSWindowButton)button forStyleMask:(unsigned int)styleMask
29         NSButton *standardWindowButton = [super standardWindowButton:button forStyleMask:styleMask];
31         if (button == NSWindowDocumentIconButton &&
32                 [NSApp isOnTigerOrBetter]) {
33                 [NSKeyedArchiver setClassName:@"AIClickThroughThemeDocumentButton" forClass:[NSThemeDocumentButton class]];
34                 standardWindowButton = [NSKeyedUnarchiver unarchiveObjectWithData:[NSKeyedArchiver archivedDataWithRootObject:standardWindowButton]];
35                 
36                 [[standardWindowButton retain] autorelease];
37         }
38         
39         return standardWindowButton;
42 @end