Revision: 18291
http://bibdesk.svn.sourceforge.net/bibdesk/?rev=18291&view=rev
Author: hofman
Date: 2011-12-05 11:07:09 +0000 (Mon, 05 Dec 2011)
Log Message:
-----------
rename global strings for text+icon
Modified Paths:
--------------
trunk/bibdesk/BDSKBookmarkController.m
trunk/bibdesk/BDSKFileMatchConfigController.m
trunk/bibdesk/BDSKFileMatcher.m
trunk/bibdesk/BDSKFileMigrationController.m
trunk/bibdesk/BDSKSearchBookmarkController.m
trunk/bibdesk/BDSKTextWithIconCell.h
trunk/bibdesk/BDSKTextWithIconCell.m
trunk/bibdesk/BibItem.m
Modified: trunk/bibdesk/BDSKBookmarkController.m
===================================================================
--- trunk/bibdesk/BDSKBookmarkController.m 2011-12-05 10:50:21 UTC (rev
18290)
+++ trunk/bibdesk/BDSKBookmarkController.m 2011-12-05 11:07:09 UTC (rev
18291)
@@ -417,7 +417,7 @@
- (id)outlineView:(NSOutlineView *)ov objectValueForTableColumn:(NSTableColumn
*)tableColumn byItem:(id)item {
NSString *tcID = [tableColumn identifier];
if ([tcID isEqualToString:@"name"]) {
- return [NSDictionary dictionaryWithObjectsAndKeys:[item name],
BDSKTextWithIconCellStringKey, [item icon], BDSKTextWithIconCellImageKey, nil];
+ return [NSDictionary dictionaryWithObjectsAndKeys:[item name],
BDSKTextWithIconStringKey, [item icon], BDSKTextWithIconImageKey, nil];
} else if ([tcID isEqualToString:@"url"]) {
if ([item bookmarkType] == BDSKBookmarkTypeFolder) {
NSInteger count = [[item children] count];
@@ -433,7 +433,7 @@
NSString *tcID = [tableColumn identifier];
if ([tcID isEqualToString:@"name"]) {
// the editied object is always an NSDictionary, see
BDSKTextWithIconFormatter
- NSString *newName = [object valueForKey:BDSKTextWithIconCellStringKey]
?: @"";
+ NSString *newName = [object valueForKey:BDSKTextWithIconStringKey] ?:
@"";
if ([newName isEqualToString:[item name]] == NO)
[(BDSKBookmark *)item setName:newName];
} else if ([tcID isEqualToString:@"url"]) {
Modified: trunk/bibdesk/BDSKFileMatchConfigController.m
===================================================================
--- trunk/bibdesk/BDSKFileMatchConfigController.m 2011-12-05 10:50:21 UTC
(rev 18290)
+++ trunk/bibdesk/BDSKFileMatchConfigController.m 2011-12-05 11:07:09 UTC
(rev 18291)
@@ -139,7 +139,7 @@
NSMutableArray *array = [NSMutableArray array];
for (NSDocument *doc in docs) {
NSString *docType = [[[NSDocumentController sharedDocumentController]
fileExtensionsFromType:[doc fileType]] lastObject] ?: @"";
- NSDictionary *dict = [NSMutableDictionary
dictionaryWithObjectsAndKeys:[doc displayName], BDSKTextWithIconCellStringKey,
[[NSWorkspace sharedWorkspace] iconForFileType:docType],
BDSKTextWithIconCellImageKey, [NSNumber numberWithBool:NO], @"useDocument",
doc, @"document", nil];
+ NSDictionary *dict = [NSMutableDictionary
dictionaryWithObjectsAndKeys:[doc displayName], BDSKTextWithIconStringKey,
[[NSWorkspace sharedWorkspace] iconForFileType:docType],
BDSKTextWithIconImageKey, [NSNumber numberWithBool:NO], @"useDocument", doc,
@"document", nil];
[array addObject:dict];
}
[self setDocuments:array];
Modified: trunk/bibdesk/BDSKFileMatcher.m
===================================================================
--- trunk/bibdesk/BDSKFileMatcher.m 2011-12-05 10:50:21 UTC (rev 18290)
+++ trunk/bibdesk/BDSKFileMatcher.m 2011-12-05 11:07:09 UTC (rev 18291)
@@ -411,10 +411,10 @@
[theNode setValue:pub forKey:@"pub"];
// grab these strings on the main thread, since we need them in the
worker thread
- [theNode setValue:titleStringWithPub(pub)
forKey:BDSKTextWithIconCellStringKey];
+ [theNode setValue:titleStringWithPub(pub)
forKey:BDSKTextWithIconStringKey];
[theNode setValue:searchStringWithPub(pub) forKey:@"searchString"];
- [theNode setValue:[NSImage imageNamed:@"cacheDoc"]
forKey:BDSKTextWithIconCellImageKey];
+ [theNode setValue:[NSImage imageNamed:@"cacheDoc"]
forKey:BDSKTextWithIconImageKey];
[nodes addObject:theNode];
[theNode release];
@@ -493,8 +493,8 @@
for (i = 0; i < iMax; i++) {
BDSKTreeNode *child = [[BDSKTreeNode alloc] init];
[child setValue:(id)urls[i] forKey:@"fileURL"];
- [child setValue:[[(id)urls[i] path]
stringByAbbreviatingWithTildeInPath] forKey:BDSKTextWithIconCellStringKey];
- [child setValue:[[NSWorkspace sharedWorkspace]
iconForFile:[(NSURL *)urls[i] path]] forKey:BDSKTextWithIconCellImageKey];
+ [child setValue:[[(id)urls[i] path]
stringByAbbreviatingWithTildeInPath] forKey:BDSKTextWithIconStringKey];
+ [child setValue:[[NSWorkspace sharedWorkspace]
iconForFile:[(NSURL *)urls[i] path]] forKey:BDSKTextWithIconImageKey];
[child setValue:searchString forKey:@"searchString"];
thisScore = scores[i];
maxScore = MAX(maxScore, thisScore);
Modified: trunk/bibdesk/BDSKFileMigrationController.m
===================================================================
--- trunk/bibdesk/BDSKFileMigrationController.m 2011-12-05 10:50:21 UTC (rev
18290)
+++ trunk/bibdesk/BDSKFileMigrationController.m 2011-12-05 11:07:09 UTC (rev
18291)
@@ -272,7 +272,7 @@
}
- (id)transformedValue:(id)pub {
- return [NSDictionary dictionaryWithObjectsAndKeys:[pub title],
BDSKTextWithIconCellStringKey, [NSImage imageNamed:@"cacheDoc"],
BDSKTextWithIconCellImageKey, nil];
+ return [NSDictionary dictionaryWithObjectsAndKeys:[pub title],
BDSKTextWithIconStringKey, [NSImage imageNamed:@"cacheDoc"],
BDSKTextWithIconImageKey, nil];
}
@end
Modified: trunk/bibdesk/BDSKSearchBookmarkController.m
===================================================================
--- trunk/bibdesk/BDSKSearchBookmarkController.m 2011-12-05 10:50:21 UTC
(rev 18290)
+++ trunk/bibdesk/BDSKSearchBookmarkController.m 2011-12-05 11:07:09 UTC
(rev 18291)
@@ -321,7 +321,7 @@
- (id)outlineView:(NSOutlineView *)ov objectValueForTableColumn:(NSTableColumn
*)tableColumn byItem:(id)item {
NSString *tcID = [tableColumn identifier];
if ([tcID isEqualToString:@"label"]) {
- return [NSDictionary dictionaryWithObjectsAndKeys:[item label],
BDSKTextWithIconCellStringKey, [item icon], BDSKTextWithIconCellImageKey, nil];
+ return [NSDictionary dictionaryWithObjectsAndKeys:[item label],
BDSKTextWithIconStringKey, [item icon], BDSKTextWithIconImageKey, nil];
} else if ([tcID isEqualToString:@"server"]) {
if ([item bookmarkType] == BDSKSearchBookmarkTypeFolder) {
NSInteger count = [[item children] count];
@@ -339,7 +339,7 @@
NSString *tcID = [tableColumn identifier];
if ([tcID isEqualToString:@"label"]) {
// the editied object is always an NSDictionary, see
BDSKTextWithIconFormatter
- NSString *newLabel = [object
valueForKey:BDSKTextWithIconCellStringKey] ?: @"";
+ NSString *newLabel = [object valueForKey:BDSKTextWithIconStringKey] ?:
@"";
if ([newLabel isEqualToString:[item label]] == NO)
[item setLabel:newLabel];
}
Modified: trunk/bibdesk/BDSKTextWithIconCell.h
===================================================================
--- trunk/bibdesk/BDSKTextWithIconCell.h 2011-12-05 10:50:21 UTC (rev
18290)
+++ trunk/bibdesk/BDSKTextWithIconCell.h 2011-12-05 11:07:09 UTC (rev
18291)
@@ -38,8 +38,8 @@
#import <Cocoa/Cocoa.h>
-extern NSString *BDSKTextWithIconCellStringKey;
-extern NSString *BDSKTextWithIconCellImageKey;
+extern NSString *BDSKTextWithIconStringKey;
+extern NSString *BDSKTextWithIconImageKey;
@interface BDSKTextWithIconCell : NSTextFieldCell {
Modified: trunk/bibdesk/BDSKTextWithIconCell.m
===================================================================
--- trunk/bibdesk/BDSKTextWithIconCell.m 2011-12-05 10:50:21 UTC (rev
18290)
+++ trunk/bibdesk/BDSKTextWithIconCell.m 2011-12-05 11:07:09 UTC (rev
18291)
@@ -40,8 +40,8 @@
#import "NSGeometry_BDSKExtensions.h"
#import "NSImage_BDSKExtensions.h"
-NSString *BDSKTextWithIconCellStringKey = @"string";
-NSString *BDSKTextWithIconCellImageKey = @"image";
+NSString *BDSKTextWithIconStringKey = @"string";
+NSString *BDSKTextWithIconImageKey = @"image";
static id nonNullObjectValueForKey(id object, id stringObject, NSString *key) {
if ([object isKindOfClass:[NSString class]])
@@ -222,17 +222,17 @@
@implementation BDSKTextWithIconFormatter
- (NSImage *)imageForObjectValue:(id)obj {
- return nonNullObjectValueForKey(obj, nil, BDSKTextWithIconCellImageKey);
+ return nonNullObjectValueForKey(obj, nil, BDSKTextWithIconImageKey);
}
- (NSString *)stringForObjectValue:(id)obj {
- return nonNullObjectValueForKey(obj, obj, BDSKTextWithIconCellStringKey);
+ return nonNullObjectValueForKey(obj, obj, BDSKTextWithIconStringKey);
}
- (BOOL)getObjectValue:(id *)obj forString:(NSString *)string
errorDescription:(NSString **)error {
// even though 'string' is reported as immutable, it's actually changed
after this method returns and before it's returned by the control!
string = [[string copy] autorelease];
- *obj = [NSDictionary dictionaryWithObjectsAndKeys:string,
BDSKTextWithIconCellStringKey, nil];
+ *obj = [NSDictionary dictionaryWithObjectsAndKeys:string,
BDSKTextWithIconStringKey, nil];
return YES;
}
Modified: trunk/bibdesk/BibItem.m
===================================================================
--- trunk/bibdesk/BibItem.m 2011-12-05 10:50:21 UTC (rev 18290)
+++ trunk/bibdesk/BibItem.m 2011-12-05 11:07:09 UTC (rev 18291)
@@ -1402,7 +1402,7 @@
if (count > 0) {
NSString *label = 1 == count ? NSLocalizedString(@"1 item", @"") :
[NSString stringWithFormat:NSLocalizedString(@"%ld items", @""), (long)count];
NSImage *image = hasMissingFile ? [NSImage redPaperclipImage] :
[NSImage paperclipImage];
- cellDictionary = [NSDictionary dictionaryWithObjectsAndKeys:image,
BDSKTextWithIconCellImageKey, label, BDSKTextWithIconCellStringKey, nil];
+ cellDictionary = [NSDictionary dictionaryWithObjectsAndKeys:image,
BDSKTextWithIconImageKey, label, BDSKTextWithIconStringKey, nil];
}
return cellDictionary;
}else if([field isEqualToString:BDSKRemoteURLString]){
@@ -1410,7 +1410,7 @@
NSDictionary *cellDictionary = nil;
if (count > 0) {
NSString *label = 1 == count ? NSLocalizedString(@"1 item", @"") :
[NSString stringWithFormat:NSLocalizedString(@"%ld items", @""), (long)count];
- cellDictionary = [NSDictionary
dictionaryWithObjectsAndKeys:[[NSWorkspace sharedWorkspace]
iconForFileType:NSFileTypeForHFSTypeCode(kGenericURLIcon)],
BDSKTextWithIconCellImageKey, label, BDSKTextWithIconCellStringKey, nil];
+ cellDictionary = [NSDictionary
dictionaryWithObjectsAndKeys:[[NSWorkspace sharedWorkspace]
iconForFileType:NSFileTypeForHFSTypeCode(kGenericURLIcon)],
BDSKTextWithIconImageKey, label, BDSKTextWithIconStringKey, nil];
}
return cellDictionary;
}else if([field isEqualToString:BDSKColorString] || [field
isEqualToString:BDSKColorLabelString]){
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit