adium 2937:6018d546f035: Don't let a borderless contact list dis...
commits at adium.im
commits at adium.im
Sun Nov 22 21:36:41 UTC 2009
details: http://hg.adium.im/adium/rev/6018d546f035
revision: 2937:6018d546f035
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.
diffs (102 lines):
diff -r 366008549f0c -r 6018d546f035 Source/AIBorderlessListController.h
--- a/Source/AIBorderlessListController.h Sun Nov 22 15:25:36 2009 -0600
+++ 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 366008549f0c -r 6018d546f035 Source/AIBorderlessListController.m
--- a/Source/AIBorderlessListController.m Sun Nov 22 15:25:36 2009 -0600
+++ 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 366008549f0c -r 6018d546f035 Source/AIBorderlessListWindowController.m
--- a/Source/AIBorderlessListWindowController.m Sun Nov 22 15:25:36 2009 -0600
+++ 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 366008549f0c -r 6018d546f035 Source/AIContactController.m
--- a/Source/AIContactController.m Sun Nov 22 15:25:36 2009 -0600
+++ b/Source/AIContactController.m Sun Nov 22 15:40:12 2009 -0600
@@ -868,7 +868,7 @@
/* If adding a metacontact to another metacontact, its contents will be recursively added.
* The original metacontact must then be destroyed lest it give rise to a zombie metacontact apocalypse.
*/
- [self explodeMetaContact:listContact];
+ [self explodeMetaContact:(AIMetaContact *)listContact];
}
}
diff -r 366008549f0c -r 6018d546f035 Source/AIListWindowController.h
--- a/Source/AIListWindowController.h Sun Nov 22 15:25:36 2009 -0600
+++ b/Source/AIListWindowController.h Sun Nov 22 15:40:12 2009 -0600
@@ -147,6 +147,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