adium 2211:d5fa5236c305: Remove the forced "show group count on ...

commits at adium.im commits at adium.im
Sun May 17 00:54:39 UTC 2009


details:	http://hg.adium.im/adium/rev/d5fa5236c305
revision:	2211:d5fa5236c305
author:		Zachary West <zacw at adium.im>
date:		Sat May 16 20:54:32 2009 -0400

Remove the forced "show group count on collapsed groups" logic. I'd rather remove it than add a preference.

diffstat:

 ChangeLogs/Changes.txt                                       |   1 +
 Frameworks/Adium Framework/Source/AIAbstractListController.m |   6 +-----
 Frameworks/Adium Framework/Source/AIListGroupCell.h          |   2 --
 Frameworks/Adium Framework/Source/AIListGroupCell.m          |  12 ++----------
 4 files changed, 4 insertions(+), 17 deletions(-)

diffs (82 lines):

diff -r 6cd256e6ee6e -r d5fa5236c305 ChangeLogs/Changes.txt
--- a/ChangeLogs/Changes.txt	Sat May 16 20:48:09 2009 -0400
+++ b/ChangeLogs/Changes.txt	Sat May 16 20:54:32 2009 -0400
@@ -92,6 +92,7 @@
   * Status message is no longer searched when searching the contact list.
   * Fixed a lot of drag and drop bugs, such as being able to drag a group into another group.
   * Tooltips now display for collapsed groups. (#11951)
+  * The group count is no longer always displayed for collapsed contacts.
  
  Message Styles
   * You can now specify a different style for group chats, and customize all of the preferences independently of a regular chat. (#87)
diff -r 6cd256e6ee6e -r d5fa5236c305 Frameworks/Adium Framework/Source/AIAbstractListController.m
--- a/Frameworks/Adium Framework/Source/AIAbstractListController.m	Sat May 16 20:48:09 2009 -0400
+++ b/Frameworks/Adium Framework/Source/AIAbstractListController.m	Sat May 16 20:54:32 2009 -0400
@@ -426,11 +426,7 @@
 			[contentCell setServiceIconPosition:iconPosition];
 		}
 	}
-	
-	//Collapsed group counting
-	//The preference is to hide (so that by default it's NO), so invert it
-	[groupCell setShowCollapsedCount:![[[NSUserDefaults standardUserDefaults] objectForKey:@"AIHideCollapsedGroupCount"] boolValue]];
-	
+
 	//Fonts
 	NSFont	*theFont;
 	
diff -r 6cd256e6ee6e -r d5fa5236c305 Frameworks/Adium Framework/Source/AIListGroupCell.h
--- a/Frameworks/Adium Framework/Source/AIListGroupCell.h	Sat May 16 20:48:09 2009 -0400
+++ b/Frameworks/Adium Framework/Source/AIListGroupCell.h	Sat May 16 20:54:32 2009 -0400
@@ -24,7 +24,6 @@
 	NSColor		*gradientColor;
 	BOOL		drawsBackground;
 	BOOL		drawsGradientEdges;
-	BOOL		showCollapsedCount;
 	NSLayoutManager	*layoutManager;
 	
 	NSImage		*_gradient;
@@ -32,7 +31,6 @@
 }
 
 - (int)flippyIndent;
-- (void)setShowCollapsedCount:(BOOL)inValue;
 - (void)setShadowColor:(NSColor *)inColor;
 - (NSColor *)shadowColor;
 - (NSRect)drawGroupCountWithFrame:(NSRect)inRect;
diff -r 6cd256e6ee6e -r d5fa5236c305 Frameworks/Adium Framework/Source/AIListGroupCell.m
--- a/Frameworks/Adium Framework/Source/AIListGroupCell.m	Sat May 16 20:48:09 2009 -0400
+++ b/Frameworks/Adium Framework/Source/AIListGroupCell.m	Sat May 16 20:54:32 2009 -0400
@@ -111,13 +111,6 @@
 	drawsGradientEdges = inValue;
 }
 
-- (void)setShowCollapsedCount:(BOOL)inValue
-{
-	showCollapsedCount = inValue;
-}
-
-
-
 //Sizing & Padding -----------------------------------------------------------------------------------------------------
 #pragma mark Sizing & Padding
 //Padding.  Gives our cell a bit of extra padding for the group name and flippy triangle (disclosure triangle)
@@ -147,7 +140,7 @@
 	//Get the size of our display name
 	width += ceil(self.displayNameSize.width) + 1;
 	
-	if (([listObject boolValueForProperty:@"Show Count"] || (showCollapsedCount && ![controlView isItemExpanded:proxyObject])) && 
+	if ([listObject boolValueForProperty:@"Show Count"] && 
 		[listObject valueForProperty:@"Count Text"]) {
 		NSAttributedString *countText = [[NSAttributedString alloc] initWithString:[listObject valueForProperty:@"Count Text"]
 																		attributes:[self labelAttributes]];
@@ -204,8 +197,7 @@
 		rect.size.width -= rect.size.height*.4 + rect.size.height*.2 + FLIPPY_TEXT_PADDING;
 //	}
 	
-	if ([listObject boolValueForProperty:@"Show Count"] ||
-		(showCollapsedCount && ![controlView isItemExpanded:proxyObject])) {
+	if ([listObject boolValueForProperty:@"Show Count"]) {
 		rect = [self drawGroupCountWithFrame:rect];
 	}
 	rect = [self drawDisplayNameWithFrame:rect];




More information about the commits mailing list