2 // AIBorderlessListController.m
5 // Created by Evan Schoenberg on 1/8/06.
8 #import "AIBorderlessListController.h"
9 #import "AIListOutlineView.h"
11 @implementation AIBorderlessListController
13 - (id)initWithContactListView:(AIListOutlineView *)inContactListView inScrollView:(AIAutoScrollView *)inScrollView_contactList delegate:(id<AIListControllerDelegate>)inDelegate
15 if ((self = [super initWithContactListView:inContactListView
16 inScrollView:inScrollView_contactList
17 delegate:inDelegate])) {
19 [self contactOrderChanged:nil];
26 * @brief When the contact order changes, check to ensure we have 1 or more visible rows
28 * If we have no rows visible, hide the contact list, redisplaying it when rows are visible again.
29 * orderOut: doesn't appear to work for borderless windows, so we just go to an alpha value of 0.
31 - (void)contactOrderChanged:(NSNotification *)notification
33 [super contactOrderChanged:notification];
35 int numberOfRows = [contactListView numberOfRows];
37 if (numberOfRows && emptyListHiding) {
39 [[contactListView window] setAlphaValue:previousAlpha];
40 [[contactListView window] orderFront:nil];
42 } else if (!numberOfRows && !emptyListHiding) {
43 emptyListHiding = YES;
44 previousAlpha = [[contactListView window] alphaValue];
45 [[contactListView window] setAlphaValue:0.0];