adium 2347:6ac7f22dd1ce: Patch from Ariel Chinn to not show an o...
commits at adium.im
commits at adium.im
Wed May 27 21:46:12 UTC 2009
details: http://hg.adium.im/adium/rev/6ac7f22dd1ce
revision: 2347:6ac7f22dd1ce
author: David Smith <catfish.man at gmail.com>
date: Wed May 27 14:46:01 2009 -0700
Patch from Ariel Chinn to not show an online count for the offline group. Fixes #12193
diffstat:
Source/CBContactCountingDisplayPlugin.m | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diffs (36 lines):
diff -r 0c3dbf199d15 -r 6ac7f22dd1ce Source/CBContactCountingDisplayPlugin.m
--- a/Source/CBContactCountingDisplayPlugin.m Tue May 26 22:09:05 2009 -0400
+++ b/Source/CBContactCountingDisplayPlugin.m Wed May 27 14:46:01 2009 -0700
@@ -136,20 +136,26 @@
for (AIListGroup *inGroup in groups) {
NSString *countString = nil;
-
+
NSUInteger onlineObjects = [[inGroup.visibleContainedObjects valueForKeyPath:@"@sum.Online"] integerValue];
NSUInteger totalObjects = inGroup.countOfContainedObjects;
-
- // Create our count string for displaying in the list group's cell
- // If the number of online objects is the same as the number of total objects, just display one number.
- if (countOnlineObjects && countAllObjects && (onlineObjects != totalObjects)) {
+
+ /*
+ * Create our count string for displaying in the list group's cell
+ * If the number of online objects is the same as the number of total objects, just display one number.
+ * If the group is the offline group, just display the number of total objects if we should.
+ */
+ if (countOnlineObjects && countAllObjects && (onlineObjects != totalObjects) && (inGroup!=adium.contactController.offlineGroup)) {
countString = [NSString stringWithFormat:AILocalizedString(@"%lu of %lu", "Used in the display for the contact list for the number of online contacts out of the number of total contacts"),
onlineObjects, totalObjects];
} else if (countAllObjects) {
countString = [NSString stringWithFormat:@"%lu", totalObjects];
- } else {
+ } else if (inGroup!=adium.contactController.offlineGroup) {
countString = [NSString stringWithFormat:@"%lu", onlineObjects];
}
+ else {
+ countString = [NSString stringWithString:@""];
+ }
[inGroup setValue:countString
forProperty:@"Count Text"
More information about the commits
mailing list