Revision: 11530
http://bibdesk.svn.sourceforge.net/bibdesk/?rev=11530&view=rev
Author: hofman
Date: 2007-11-10 09:14:46 -0800 (Sat, 10 Nov 2007)
Log Message:
-----------
Display count of search bookmark folder.
Modified Paths:
--------------
trunk/bibdesk/BDSKSearchBookmarkController.m
Modified: trunk/bibdesk/BDSKSearchBookmarkController.m
===================================================================
--- trunk/bibdesk/BDSKSearchBookmarkController.m 2007-11-10 17:04:07 UTC
(rev 11529)
+++ trunk/bibdesk/BDSKSearchBookmarkController.m 2007-11-10 17:14:46 UTC
(rev 11530)
@@ -291,7 +291,12 @@
if ([tcID isEqualToString:@"label"]) {
return [NSDictionary dictionaryWithObjectsAndKeys:[item label],
OATextWithIconCellStringKey, [item icon], OATextWithIconCellImageKey, nil];
} else if ([tcID isEqualToString:@"server"]) {
- return [[item info] valueForKey:@"name"];
+ if ([item bookmarkType] == BDSKSearchBookmarkTypeFolder) {
+ int count = [[item children] count];
+ return count == 1 ? NSLocalizedString(@"1 item", @"Bookmark folder
description") : [NSString stringWithFormat:NSLocalizedString(@"%i items",
@"Bookmark folder description"), count];
+ } else {
+ return [[item info] valueForKey:@"name"];
+ }
} else if ([tcID isEqualToString:@"search term"]) {
return [[item info] valueForKey:@"search term"];
}
@@ -366,6 +371,15 @@
#pragma mark NSOutlineView delegate methods
+- (void)outlineView:(NSOutlineView *)ov willDisplayCell:(id)cell
forTableColumn:(NSTableColumn *)tableColumn item:(id)item {
+ if ([[tableColumn identifier] isEqualToString:@"server"]) {
+ if ([item bookmarkType] == BDSKSearchBookmarkTypeFolder)
+ [cell setTextColor:[NSColor disabledControlTextColor]];
+ else
+ [cell setTextColor:[NSColor controlTextColor]];
+ }
+}
+
- (BOOL)outlineView:(NSOutlineView *)ov shouldEditTableColumn:(NSTableColumn
*)tableColumn item:(id)item {
return [[tableColumn identifier] isEqualToString:@"label"] && [item
bookmarkType] != BDSKSearchBookmarkTypeSeparator;
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit