Revision: 29925
http://sourceforge.net/p/bibdesk/svn/29925
Author: hofman
Date: 2025-12-01 15:38:19 +0000 (Mon, 01 Dec 2025)
Log Message:
-----------
rename method and ivar to avoid inconsistent use of term standard
Modified Paths:
--------------
trunk/bibdesk/BDSKCondition.m
trunk/bibdesk/BDSKEditor.m
trunk/bibdesk/BDSKMergeController.m
trunk/bibdesk/BDSKTextImportController.m
trunk/bibdesk/BDSKTypeManager.h
trunk/bibdesk/BDSKTypeManager.m
trunk/bibdesk/BibItem.m
Modified: trunk/bibdesk/BDSKCondition.m
===================================================================
--- trunk/bibdesk/BDSKCondition.m 2025-12-01 15:29:50 UTC (rev 29924)
+++ trunk/bibdesk/BDSKCondition.m 2025-12-01 15:38:19 UTC (rev 29925)
@@ -293,7 +293,7 @@
NSArray *fields = [item allFieldNames];
if ([item crossrefParent] != nil) {
NSMutableArray *tmpFields = [fields mutableCopy];
- [tmpFields
addNonDuplicateObjectsFromArray:[[BDSKTypeManager sharedManager]
standardFieldsForType:[item pubType]]];
+ [tmpFields
addNonDuplicateObjectsFromArray:[[BDSKTypeManager sharedManager]
regularFieldsForType:[item pubType]]];
fields = tmpFields;
}
for (NSString *field in fields) {
Modified: trunk/bibdesk/BDSKEditor.m
===================================================================
--- trunk/bibdesk/BDSKEditor.m 2025-12-01 15:29:50 UTC (rev 29924)
+++ trunk/bibdesk/BDSKEditor.m 2025-12-01 15:38:19 UTC (rev 29925)
@@ -896,7 +896,7 @@
NSString *currentType = [publication pubType];
BDSKTypeManager *typeMan = [BDSKTypeManager sharedManager];
NSMutableArray *removableFields = [fields mutableCopy];
- [removableFields removeObjectsInArray:[typeMan
standardFieldsForType:currentType]];
+ [removableFields removeObjectsInArray:[typeMan
regularFieldsForType:currentType]];
NSString *prompt = NSLocalizedString(@"Name of field to remove:", @"Label
for removing field");
if ([removableFields count]) {
@@ -2446,7 +2446,7 @@
else if([changeKey isPersonField])
[authorTableView reloadData];
- if (([NSString isEmptyAsComplexString:newValue] != [NSString
isEmptyAsComplexString:oldValue]) && [addedFields containsObject:changeKey] ==
NO && [[[BDSKTypeManager sharedManager] standardFieldsForType:[publication
pubType]] containsObject:changeKey] == NO) {
+ if (([NSString isEmptyAsComplexString:newValue] != [NSString
isEmptyAsComplexString:oldValue]) && [addedFields containsObject:changeKey] ==
NO && [[[BDSKTypeManager sharedManager] regularFieldsForType:[publication
pubType]] containsObject:changeKey] == NO) {
// a custom field was added or removed
NSInteger editedRow = [tableView editedTextRow];
if (editedRow != -1 && [[fields objectAtIndex:editedRow]
isEqualToString:changeKey]) {
@@ -3350,7 +3350,7 @@
[ignoredKeys unionSet:[tm noteFieldsSet]];
[ignoredKeys unionSet:[tm integerFieldsSet]];
- [allFields addObjectsFromArray:[tm standardFieldsForType:type]];
+ [allFields addObjectsFromArray:[tm regularFieldsForType:type]];
for (NSString *field in allFields) {
if ([ignoredKeys containsObject:field] == NO) {
Modified: trunk/bibdesk/BDSKMergeController.m
===================================================================
--- trunk/bibdesk/BDSKMergeController.m 2025-12-01 15:29:50 UTC (rev 29924)
+++ trunk/bibdesk/BDSKMergeController.m 2025-12-01 15:38:19 UTC (rev 29925)
@@ -285,7 +285,7 @@
BDSKTypeManager *tm = [BDSKTypeManager sharedManager];
NSString *type = [publication pubType];
- [defaultFields addObjectsFromArray:[tm standardFieldsForType:type]];
+ [defaultFields addObjectsFromArray:[tm regularFieldsForType:type]];
NSMutableArray *overwriteFieldNames = [[overwriteDict allKeys]
mutableCopy];
NSMutableArray *addedFieldNames = [[addedDict allKeys] mutableCopy];
Modified: trunk/bibdesk/BDSKTextImportController.m
===================================================================
--- trunk/bibdesk/BDSKTextImportController.m 2025-12-01 15:29:50 UTC (rev
29924)
+++ trunk/bibdesk/BDSKTextImportController.m 2025-12-01 15:38:19 UTC (rev
29925)
@@ -753,7 +753,7 @@
NSSet *ignoredFields = [NSSet setWithObjects:BDSKDateAddedString,
BDSKDateModifiedString, BDSKColorString, nil];
BDSKTypeManager *typeMan = [BDSKTypeManager sharedManager];
- [newFields addObjectsFromArray:[typeMan standardFieldsForType:type]];
+ [newFields addObjectsFromArray:[typeMan regularFieldsForType:type]];
[newFields addNonDuplicateObjectsFromArray:@[BDSKAbstractString,
BDSKAnnoteString]];
[[[self publication] pubFields]
enumerateKeysAndObjectsUsingBlock:^(NSString *fieldName, NSString *value, BOOL
*stop){
Modified: trunk/bibdesk/BDSKTypeManager.h
===================================================================
--- trunk/bibdesk/BDSKTypeManager.h 2025-12-01 15:29:50 UTC (rev 29924)
+++ trunk/bibdesk/BDSKTypeManager.h 2025-12-01 15:38:19 UTC (rev 29925)
@@ -77,7 +77,7 @@
NSDictionary<NSString *, NSString *> *bibTeXTypeForHCiteTypeDict;
NSDictionary<NSString *, NSDictionary<NSString *, NSArray<NSString *>
*> *> *MODSGenresForBibTeXTypeDict;
NSDictionary<NSString *, NSDictionary<NSString *, NSArray<NSString *> *>
*> *defaultFieldsForTypes;
- NSMutableDictionary<NSString *, NSArray<NSString *> *>
*standardFieldsForTypes;
+ NSMutableDictionary<NSString *, NSArray<NSString *> *>
*regularFieldsForTypes;
NSArray<NSString *> *defaultTypes;
NSSet<NSString *> *standardTypes;
NSSet<NSString *> *allFieldsSet;
@@ -124,7 +124,7 @@
- (NSArray<NSString *> *)requiredFieldsForType:(NSString *)type;
- (NSArray<NSString *> *)optionalFieldsForType:(NSString *)type;
- (NSArray<NSString *> *)userDefaultFieldsForType:(nullable NSString *)type;
-- (NSArray<NSString *> *)standardFieldsForType:(NSString *)type;
+- (NSArray<NSString *> *)regularFieldsForType:(NSString *)type;
@property (nonatomic, readonly) NSArray<NSString *> *types;
@property (nonatomic, readonly) NSDictionary<NSString *, NSDictionary<NSString
*, NSArray<NSString *> *> *> *defaultFieldsForTypes;
Modified: trunk/bibdesk/BDSKTypeManager.m
===================================================================
--- trunk/bibdesk/BDSKTypeManager.m 2025-12-01 15:29:50 UTC (rev 29924)
+++ trunk/bibdesk/BDSKTypeManager.m 2025-12-01 15:38:19 UTC (rev 29925)
@@ -107,7 +107,7 @@
NSDictionary *userTypeInfoDict = [NSDictionary
dictionaryWithContentsOfURL:BDSKUserTypeInfoURL() error:NULL] ?: typeInfoDict;
fieldsForTypesDict = [[userTypeInfoDict
objectForKey:FIELDS_FOR_TYPES_KEY] copy];
- standardFieldsForTypes = [[NSMutableDictionary alloc] init];
+ regularFieldsForTypes = [[NSMutableDictionary alloc] init];
types = [[[userTypeInfoDict objectForKey:TYPES_FOR_FILE_TYPE_KEY]
objectForKey:BDSKBibtexString] copy];
defaultFieldsForTypes = [[typeInfoDict
objectForKey:FIELDS_FOR_TYPES_KEY] copy];
defaultTypes = [[[typeInfoDict objectForKey:TYPES_FOR_FILE_TYPE_KEY]
objectForKey:BDSKBibtexString] copy];
@@ -268,7 +268,7 @@
fieldsForTypesDict = [newFieldsForTypes copy];
types = [newTypes copy];
[self reloadAllFieldNames];
- [standardFieldsForTypes removeAllObjects];
+ [regularFieldsForTypes removeAllObjects];
[[NSNotificationCenter defaultCenter]
postNotificationName:BDSKBibTypeInfoChangedNotification object:self];
}
@@ -277,7 +277,7 @@
- (void)updateCustomFields:(BDSKFieldTypeMask)changedTypes {
[self reloadFieldSets];
if ((changedTypes & BDSKFieldTypeMaskDefault))
- [standardFieldsForTypes removeAllObjects];
+ [regularFieldsForTypes removeAllObjects];
[[NSNotificationCenter defaultCenter]
postNotificationName:BDSKCustomFieldsChangedNotification object:self
userInfo:@{BDSKChangedFieldTypesKey: [NSNumber
numberWithUnsignedInteger:changedTypes]}];
}
@@ -297,8 +297,8 @@
return [[NSUserDefaults standardUserDefaults]
stringArrayForKey:BDSKDefaultFieldsKey];
}
-- (NSArray *)standardFieldsForType:(NSString *)type{
- NSArray *array = [standardFieldsForTypes objectForKey:type];
+- (NSArray *)regularFieldsForType:(NSString *)type{
+ NSArray *array = [regularFieldsForTypes objectForKey:type];
if (array == nil) {
NSMutableArray *tmpArray = [NSMutableArray array];
[tmpArray addObjectsFromArray:[self requiredFieldsForType:type]];
@@ -305,7 +305,7 @@
[tmpArray addObjectsFromArray:[self optionalFieldsForType:type]];
[tmpArray addNonDuplicateObjectsFromArray:[self
userDefaultFieldsForType:type]];
array = [tmpArray copy];
- [standardFieldsForTypes setObject:array forKey:type];
+ [regularFieldsForTypes setObject:array forKey:type];
}
return array;
}
Modified: trunk/bibdesk/BibItem.m
===================================================================
--- trunk/bibdesk/BibItem.m 2025-12-01 15:29:50 UTC (rev 29924)
+++ trunk/bibdesk/BibItem.m 2025-12-01 15:38:19 UTC (rev 29925)
@@ -1406,7 +1406,7 @@
// if it has a parent, find all the available keys, and use
valueOfField: to get either the
// child object or parent object value. Inherit only the fields of the
parent relevant for the item.
if (parent) {
- NSMutableArray *allFields = [[[BDSKTypeManager sharedManager]
standardFieldsForType:[self pubType]] mutableCopy];
+ NSMutableArray *allFields = [[[BDSKTypeManager sharedManager]
regularFieldsForType:[self pubType]] mutableCopy];
[allFields addNonDuplicateObjectsFromArray:[self allFieldNames]];
for (NSString *key in allFields) {
@@ -2497,7 +2497,7 @@
// if it has a parent, find all the available keys, and use valueOfField:
to get either the
// child object or parent object value. Inherit only the fields of the
parent relevant for the item.
if (parent) {
- NSMutableArray *allFields = [[[BDSKTypeManager sharedManager]
standardFieldsForType:[self pubType]] mutableCopy];
+ NSMutableArray *allFields = [[[BDSKTypeManager sharedManager]
regularFieldsForType:[self pubType]] mutableCopy];
[allFields addNonDuplicateObjectsFromArray:[self allFieldNames]];
for (NSString *key in allFields) {
@@ -2555,7 +2555,7 @@
- (id)allFields{
NSMutableArray *allFields = [NSMutableArray array];
NSString *type = [self pubType];
- [allFields addObjectsFromArray:[[BDSKTypeManager sharedManager]
standardFieldsForType:type]];
+ [allFields addObjectsFromArray:[[BDSKTypeManager sharedManager]
regularFieldsForType:type]];
[allFields addNonDuplicateObjectsFromArray:[[self allFieldNames]
sortedArrayUsingSelector:@selector(caseInsensitiveNumericCompare:)]];
return [[self fields] fieldsWithNames:allFields];
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit