adium-1.4 2788:a3334b626a13: Don't let a borderless contact list...
commits at adium.im
commits at adium.im
Sun Nov 22 21:40:27 UTC 2009
details: http://hg.adium.im/adium-1.4/rev/a3334b626a13
revision: 2788:a3334b626a13
author: Evan Schoenberg
date: Sun Nov 22 15:40:12 2009 -0600
Don't let a borderless contact list disappear if we filter all of its contacts away.
(transplanted from 6018d546f035bdff09b21cab1a82c7d1695b4db0)
diffs (90 lines):
diff -r e8c92c1a2dbe -r a3334b626a13 Source/AIBorderlessListController.h
--- a/Source/AIBorderlessListController.h Sun Nov 22 15:29:05 2009 -0500
+++ b/Source/AIBorderlessListController.h Sun Nov 22 15:40:12 2009 -0600
@@ -8,7 +8,10 @@
@interface AIBorderlessListController : AIListController {
BOOL emptyListHiding;
+ BOOL enableEmptyListHiding;
CGFloat previousAlpha;
}
+ at property (nonatomic) BOOL enableEmptyListHiding;
+
@end
diff -r e8c92c1a2dbe -r a3334b626a13 Source/AIBorderlessListController.m
--- a/Source/AIBorderlessListController.m Sun Nov 22 15:29:05 2009 -0500
+++ b/Source/AIBorderlessListController.m Sun Nov 22 15:40:12 2009 -0600
@@ -10,6 +10,8 @@
@implementation AIBorderlessListController
+ at synthesize enableEmptyListHiding;
+
- (id)initWithContactList:(AIListObject<AIContainingObject> *)aContactList
inOutlineView:(AIListOutlineView *)inContactListView
inScrollView:(AIAutoScrollView *)inScrollView_contactList
@@ -20,6 +22,8 @@
inScrollView:inScrollView_contactList
delegate:inDelegate])) {
emptyListHiding = NO;
+ enableEmptyListHiding = YES;
+
[self reloadListObject:nil];
}
@@ -49,7 +53,7 @@
[[contactListView window] setAlphaValue:previousAlpha];
[[contactListView window] orderFront:nil];
- } else if (!numberOfRows && !emptyListHiding) {
+ } else if (!numberOfRows && !emptyListHiding && enableEmptyListHiding) {
emptyListHiding = YES;
previousAlpha = [[contactListView window] alphaValue];
[[contactListView window] setAlphaValue:0.0];
diff -r e8c92c1a2dbe -r a3334b626a13 Source/AIBorderlessListWindowController.m
--- a/Source/AIBorderlessListWindowController.m Sun Nov 22 15:29:05 2009 -0500
+++ b/Source/AIBorderlessListWindowController.m Sun Nov 22 15:40:12 2009 -0600
@@ -61,4 +61,29 @@
}
+
+/*!
+ * @brief Show the filter bar
+ *
+ * @param useAnimation If YES, the filter bar will scroll into view, otherwise it appears immediately
+ */
+- (void)showFilterBarWithAnimation:(BOOL)useAnimation
+{
+ ((AIBorderlessListController *)contactListController).enableEmptyListHiding = NO;
+
+ [super showFilterBarWithAnimation:useAnimation];
+}
+
+/*!
+ * @brief Hide the filter bar
+ *
+ * @param useAnimation If YES, the filter bar will scroll out of view, otherwise it disappears immediately
+ */
+- (void)hideFilterBarWithAnimation:(BOOL)useAnimation
+{
+ ((AIBorderlessListController *)contactListController).enableEmptyListHiding = YES;
+
+ [super hideFilterBarWithAnimation:useAnimation];
+}
+
@end
diff -r e8c92c1a2dbe -r a3334b626a13 Source/AIListWindowController.h
--- a/Source/AIListWindowController.h Sun Nov 22 15:29:05 2009 -0500
+++ b/Source/AIListWindowController.h Sun Nov 22 15:40:12 2009 -0600
@@ -146,6 +146,9 @@
- (IBAction)hideFilterBar:(id)sender;
- (IBAction)filterContacts:(id)sender;
+- (void)showFilterBarWithAnimation:(BOOL)useAnimation;
+- (void)hideFilterBarWithAnimation:(BOOL)useAnimation;
+
@property (nonatomic, retain ) NSViewAnimation *filterBarAnimation;
@end
More information about the commits
mailing list