You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
(9) |
Apr
(2) |
May
(8) |
Jun
|
Jul
(17) |
Aug
(1) |
Sep
(14) |
Oct
(28) |
Nov
(34) |
Dec
(43) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(37) |
Feb
(52) |
Mar
(130) |
Apr
(52) |
May
(23) |
Jun
(48) |
Jul
(78) |
Aug
(97) |
Sep
(73) |
Oct
(53) |
Nov
(148) |
Dec
(322) |
2005 |
Jan
(164) |
Feb
(259) |
Mar
(287) |
Apr
(413) |
May
(272) |
Jun
(231) |
Jul
(353) |
Aug
(363) |
Sep
(245) |
Oct
(361) |
Nov
(802) |
Dec
(493) |
2006 |
Jan
(345) |
Feb
(438) |
Mar
(388) |
Apr
(283) |
May
(416) |
Jun
(216) |
Jul
(180) |
Aug
(442) |
Sep
(150) |
Oct
(454) |
Nov
(416) |
Dec
(338) |
2007 |
Jan
(516) |
Feb
(512) |
Mar
(364) |
Apr
(152) |
May
(165) |
Jun
(93) |
Jul
(106) |
Aug
(160) |
Sep
(160) |
Oct
(256) |
Nov
(421) |
Dec
(418) |
2008 |
Jan
(620) |
Feb
(180) |
Mar
(236) |
Apr
(163) |
May
(196) |
Jun
(281) |
Jul
(175) |
Aug
(72) |
Sep
(56) |
Oct
(95) |
Nov
(73) |
Dec
(82) |
2009 |
Jan
(261) |
Feb
(340) |
Mar
(371) |
Apr
(334) |
May
(131) |
Jun
(104) |
Jul
(125) |
Aug
(106) |
Sep
(106) |
Oct
(133) |
Nov
(268) |
Dec
(201) |
2010 |
Jan
(183) |
Feb
(112) |
Mar
(77) |
Apr
(52) |
May
(79) |
Jun
(49) |
Jul
(46) |
Aug
(44) |
Sep
(95) |
Oct
(225) |
Nov
(203) |
Dec
(60) |
2011 |
Jan
(58) |
Feb
(33) |
Mar
(66) |
Apr
(57) |
May
(49) |
Jun
(72) |
Jul
(44) |
Aug
(66) |
Sep
(53) |
Oct
(49) |
Nov
(62) |
Dec
(83) |
2012 |
Jan
(109) |
Feb
(70) |
Mar
(47) |
Apr
(37) |
May
(43) |
Jun
(44) |
Jul
(40) |
Aug
(34) |
Sep
(18) |
Oct
(65) |
Nov
(114) |
Dec
(47) |
2013 |
Jan
(46) |
Feb
(51) |
Mar
(49) |
Apr
(47) |
May
(37) |
Jun
(64) |
Jul
(45) |
Aug
(36) |
Sep
(42) |
Oct
(36) |
Nov
(54) |
Dec
(58) |
2014 |
Jan
(42) |
Feb
(33) |
Mar
(48) |
Apr
(105) |
May
(58) |
Jun
(39) |
Jul
(53) |
Aug
(32) |
Sep
(34) |
Oct
(56) |
Nov
(34) |
Dec
(27) |
2015 |
Jan
(51) |
Feb
(62) |
Mar
(37) |
Apr
(36) |
May
(41) |
Jun
(31) |
Jul
(25) |
Aug
(32) |
Sep
(49) |
Oct
(80) |
Nov
(33) |
Dec
(32) |
2016 |
Jan
(35) |
Feb
(55) |
Mar
(58) |
Apr
(51) |
May
(33) |
Jun
(52) |
Jul
(35) |
Aug
(66) |
Sep
(37) |
Oct
(42) |
Nov
(32) |
Dec
(33) |
2017 |
Jan
(48) |
Feb
(11) |
Mar
(70) |
Apr
(30) |
May
(43) |
Jun
(27) |
Jul
(33) |
Aug
(34) |
Sep
(27) |
Oct
(50) |
Nov
(22) |
Dec
(33) |
2018 |
Jan
(157) |
Feb
(238) |
Mar
(75) |
Apr
(40) |
May
(72) |
Jun
(105) |
Jul
(93) |
Aug
(73) |
Sep
(146) |
Oct
(213) |
Nov
(101) |
Dec
(136) |
2019 |
Jan
(213) |
Feb
(84) |
Mar
(210) |
Apr
(117) |
May
(77) |
Jun
(61) |
Jul
(189) |
Aug
(79) |
Sep
(87) |
Oct
(95) |
Nov
(55) |
Dec
(79) |
2020 |
Jan
(80) |
Feb
(79) |
Mar
(40) |
Apr
(51) |
May
(41) |
Jun
(79) |
Jul
(37) |
Aug
(37) |
Sep
(34) |
Oct
(65) |
Nov
(62) |
Dec
(169) |
2021 |
Jan
(233) |
Feb
(61) |
Mar
(107) |
Apr
(131) |
May
(305) |
Jun
(210) |
Jul
(199) |
Aug
(248) |
Sep
(201) |
Oct
(120) |
Nov
(54) |
Dec
(45) |
2022 |
Jan
(34) |
Feb
(18) |
Mar
(79) |
Apr
(55) |
May
(118) |
Jun
(150) |
Jul
(112) |
Aug
(74) |
Sep
(124) |
Oct
(77) |
Nov
(36) |
Dec
(66) |
2023 |
Jan
(15) |
Feb
(8) |
Mar
(22) |
Apr
(39) |
May
(31) |
Jun
(33) |
Jul
(28) |
Aug
(1) |
Sep
(47) |
Oct
(30) |
Nov
(56) |
Dec
(26) |
2024 |
Jan
(192) |
Feb
(129) |
Mar
(19) |
Apr
(38) |
May
(42) |
Jun
|
Jul
(3) |
Aug
(17) |
Sep
(5) |
Oct
(19) |
Nov
|
Dec
|
From: <ho...@us...> - 2024-10-24 17:03:30
|
Revision: 28970 http://sourceforge.net/p/bibdesk/svn/28970 Author: hofman Date: 2024-10-24 17:03:27 +0000 (Thu, 24 Oct 2024) Log Message: ----------- Inlude internet suite in sdef to make clear we support 'open location' Modified Paths: -------------- trunk/bibdesk/Scripting/BibDesk.sdef Modified: trunk/bibdesk/Scripting/BibDesk.sdef =================================================================== --- trunk/bibdesk/Scripting/BibDesk.sdef 2024-10-24 16:54:38 UTC (rev 28969) +++ trunk/bibdesk/Scripting/BibDesk.sdef 2024-10-24 17:03:27 UTC (rev 28970) @@ -260,7 +260,7 @@ </suite> - <suite name="BibDesk Text Suite" code="Btxt" + <suite name="BibDesk Text Suite" code="BDtx" description="A set of basic classes for BibDesk text processing."> <cocoa name="BibDeskTextSuite"/> @@ -354,8 +354,21 @@ </class> </suite> - - + + + <suite name="Internet Suite" code="gurl" + description="Standard terms for Internet scripting."> + + <cocoa name="BibDeskInternetSuite"/> + + <command name="open location" code="GURLGURL" description="Opens a URL with BibDesk"> + <direct-parameter type="text" optional="yes" description="the URL to open"/> + <parameter name="error reporting" code="errr" type="boolean" optional="yes" description="Should error conditions be reported in a dialog?"/> + </command> + + </suite> + + <suite name="BibDesk Suite" code="BDSK" description="BibDesk specific commands and classes for dealing with bibliographies and publications."> <cocoa name="BibDeskSuite"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2024-10-24 16:54:40
|
Revision: 28969 http://sourceforge.net/p/bibdesk/svn/28969 Author: hofman Date: 2024-10-24 16:54:38 +0000 (Thu, 24 Oct 2024) Log Message: ----------- Rename BibDesk's text suite as it is changed from the standard NSTextSuite Modified Paths: -------------- trunk/bibdesk/Scripting/BibDesk.sdef Modified: trunk/bibdesk/Scripting/BibDesk.sdef =================================================================== --- trunk/bibdesk/Scripting/BibDesk.sdef 2024-10-18 09:00:55 UTC (rev 28968) +++ trunk/bibdesk/Scripting/BibDesk.sdef 2024-10-24 16:54:38 UTC (rev 28969) @@ -260,10 +260,10 @@ </suite> - <suite name="Text Suite" code="TEXT" - description="A set of basic classes for text processing."> + <suite name="BibDesk Text Suite" code="Btxt" + description="A set of basic classes for BibDesk text processing."> - <cocoa name="NSTextSuite"/> + <cocoa name="BibDeskTextSuite"/> <value-type name="RGBA color" code="RGBA"> <cocoa class="NSColor"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2024-10-18 09:00:57
|
Revision: 28968 http://sourceforge.net/p/bibdesk/svn/28968 Author: hofman Date: 2024-10-18 09:00:55 +0000 (Fri, 18 Oct 2024) Log Message: ----------- Tag for release Added Paths: ----------- tags/REL_1_9_6/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2024-10-18 09:00:44
|
Revision: 28967 http://sourceforge.net/p/bibdesk/svn/28967 Author: hofman Date: 2024-10-18 09:00:41 +0000 (Fri, 18 Oct 2024) Log Message: ----------- Update version numbers for release Modified Paths: -------------- trunk/bibdesk/BibDesk.help/Contents/Resources/en.lproj/version.texi trunk/bibdesk/Bibdesk.xcodeproj/project.pbxproj trunk/bibdesk/Info.plist Modified: trunk/bibdesk/BibDesk.help/Contents/Resources/en.lproj/version.texi =================================================================== --- trunk/bibdesk/BibDesk.help/Contents/Resources/en.lproj/version.texi 2024-10-17 23:25:19 UTC (rev 28966) +++ trunk/bibdesk/BibDesk.help/Contents/Resources/en.lproj/version.texi 2024-10-18 09:00:41 UTC (rev 28967) @@ -1 +1 @@ -@set VERSION 1.9.5 \ No newline at end of file +@set VERSION 1.9.6 \ No newline at end of file Modified: trunk/bibdesk/Bibdesk.xcodeproj/project.pbxproj =================================================================== --- trunk/bibdesk/Bibdesk.xcodeproj/project.pbxproj 2024-10-17 23:25:19 UTC (rev 28966) +++ trunk/bibdesk/Bibdesk.xcodeproj/project.pbxproj 2024-10-18 09:00:41 UTC (rev 28967) @@ -6204,7 +6204,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = CE17EE7E0E24F27400DE06EA /* BibDesk-App.xcconfig */; buildSettings = { - CURRENT_PROJECT_VERSION = 6115; + CURRENT_PROJECT_VERSION = 6116; VERSIONING_SYSTEM = "apple-generic"; }; name = Debug; @@ -6213,7 +6213,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = CE17EE7E0E24F27400DE06EA /* BibDesk-App.xcconfig */; buildSettings = { - CURRENT_PROJECT_VERSION = 6115; + CURRENT_PROJECT_VERSION = 6116; VERSIONING_SYSTEM = "apple-generic"; }; name = Release; Modified: trunk/bibdesk/Info.plist =================================================================== --- trunk/bibdesk/Info.plist 2024-10-17 23:25:19 UTC (rev 28966) +++ trunk/bibdesk/Info.plist 2024-10-18 09:00:41 UTC (rev 28967) @@ -303,7 +303,7 @@ <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> - <string>1.9.5</string> + <string>1.9.6</string> <key>CFBundleSignature</key> <string>BDSK</string> <key>CFBundleURLTypes</key> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2024-10-17 23:25:25
|
Revision: 28966 http://sourceforge.net/p/bibdesk/svn/28966 Author: hofman Date: 2024-10-17 23:25:19 +0000 (Thu, 17 Oct 2024) Log Message: ----------- more efficient way to get the common root of multiple file paths by first getting it for the path components Modified Paths: -------------- trunk/bibdesk/BibDocument.m trunk/bibdesk/NSString_BDSKExtensions.h trunk/bibdesk/NSString_BDSKExtensions.m Modified: trunk/bibdesk/BibDocument.m =================================================================== --- trunk/bibdesk/BibDocument.m 2024-10-17 23:03:14 UTC (rev 28965) +++ trunk/bibdesk/BibDocument.m 2024-10-17 23:25:19 UTC (rev 28966) @@ -1254,8 +1254,7 @@ } } - for (NSString *filePath in parents) - commonParent = commonParent ? [filePath commonRootPathOfFile:commonParent] : filePath; + commonParent = [NSString commonRootPathOfFiles:[parents allObjects]]; if ([localFiles count] > 1 && [commonParent isEqualToString:NSHomeDirectory()] == NO && [commonParent isEqualToString:[self basePath]] == NO && [[commonParent stringByDeletingLastPathComponent] isEqualToString:@"/"] == NO && [parents containsObject:commonParent]) commonParent = [commonParent stringByDeletingLastPathComponent]; Modified: trunk/bibdesk/NSString_BDSKExtensions.h =================================================================== --- trunk/bibdesk/NSString_BDSKExtensions.h 2024-10-17 23:03:14 UTC (rev 28965) +++ trunk/bibdesk/NSString_BDSKExtensions.h 2024-10-17 23:25:19 UTC (rev 28966) @@ -484,7 +484,7 @@ @property (nonatomic, readonly) NSString *stringByRemovingAliens; @property (class, nonatomic, readonly) NSString *pathSeparator; -- (NSString *)commonRootPathOfFile:(NSString *)filename; ++ (NSString *)commonRootPathOfFiles:(NSArray *)filenames; - (NSString *)relativePathFromPath:(NSString *)basePath; @property (nonatomic, readonly) NSString *stringByNormalizingPath; Modified: trunk/bibdesk/NSString_BDSKExtensions.m =================================================================== --- trunk/bibdesk/NSString_BDSKExtensions.m 2024-10-17 23:03:14 UTC (rev 28965) +++ trunk/bibdesk/NSString_BDSKExtensions.m 2024-10-17 23:25:19 UTC (rev 28966) @@ -1522,14 +1522,13 @@ return [NSOpenStepRootDirectory() substringToIndex:1]; } -- (NSArray *)commonRootPathComponentsOfFilename:(NSString *)filename components:(NSArray **)components otherComponents:(NSArray **)otherComponents { +- (NSArray *)commonRootPathComponentsOfComponents:(NSArray *)fileComponents components:(NSArray **)components otherComponents:(NSArray **)otherComponents { NSArray *array = [self pathComponents]; - NSArray *otherArray = [[filename stringByStandardizingPath] pathComponents]; - NSUInteger i, minLength = MIN([array count], [otherArray count]); + NSUInteger i, minLength = MIN([array count], [fileComponents count]); NSMutableArray *resultArray = [NSMutableArray arrayWithCapacity:minLength]; for (i = 0; i < minLength; i++) { - if ([[array objectAtIndex:i] isEqualToString:[otherArray objectAtIndex:i]]) + if ([[array objectAtIndex:i] isEqualToString:[fileComponents objectAtIndex:i]]) [resultArray addObject:[array objectAtIndex:i]]; else break; @@ -1541,21 +1540,31 @@ if (components) *components = [array subarrayWithRange:NSMakeRange(i, [array count] - i)]; if (otherComponents) - *otherComponents = [otherArray subarrayWithRange:NSMakeRange(i, [otherArray count] - i)]; + *otherComponents = [fileComponents subarrayWithRange:NSMakeRange(i, [fileComponents count] - i)]; return resultArray; } -- (NSString *)commonRootPathOfFile:(NSString *)filename { - NSArray *components = [self commonRootPathComponentsOfFilename:filename components:NULL otherComponents:NULL]; - return components ? [NSString pathWithComponents:components] : nil; ++ (NSString *)commonRootPathOfFiles:(NSArray *)filenames { + if ([filenames count] < 2) + return [filenames firstObject]; + + NSArray *components = nil; + for (NSString *filename in filenames) { + if (components) + components = [filename commonRootPathComponentsOfComponents:components components:NULL otherComponents:NULL]; + else + components = [filename pathComponents]; + } + return [NSString pathWithComponents:components]; } - (NSString *)relativePathFromPath:(NSString *)basePath { NSArray *commonRoot, *myUniquePart, *baseUniquePart; NSInteger numberOfStepsUp, i; + NSArray *baseComponents = [[basePath stringByStandardizingPath] pathComponents]; - commonRoot = [[self stringByStandardizingPath] commonRootPathComponentsOfFilename:basePath components:&myUniquePart otherComponents:&baseUniquePart]; + commonRoot = [[self stringByStandardizingPath] commonRootPathComponentsOfComponents:baseComponents components:&myUniquePart otherComponents:&baseUniquePart]; if (commonRoot == nil || [commonRoot count] == 0) return self; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2024-10-17 23:03:16
|
Revision: 28965 http://sourceforge.net/p/bibdesk/svn/28965 Author: hofman Date: 2024-10-17 23:03:14 +0000 (Thu, 17 Oct 2024) Log Message: ----------- no need to standardize path twice Modified Paths: -------------- trunk/bibdesk/NSString_BDSKExtensions.m Modified: trunk/bibdesk/NSString_BDSKExtensions.m =================================================================== --- trunk/bibdesk/NSString_BDSKExtensions.m 2024-10-17 21:27:58 UTC (rev 28964) +++ trunk/bibdesk/NSString_BDSKExtensions.m 2024-10-17 23:03:14 UTC (rev 28965) @@ -1555,7 +1555,6 @@ NSArray *commonRoot, *myUniquePart, *baseUniquePart; NSInteger numberOfStepsUp, i; - basePath = [basePath stringByStandardizingPath]; commonRoot = [[self stringByStandardizingPath] commonRootPathComponentsOfFilename:basePath components:&myUniquePart otherComponents:&baseUniquePart]; if (commonRoot == nil || [commonRoot count] == 0) return self; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2024-10-17 21:28:00
|
Revision: 28964 http://sourceforge.net/p/bibdesk/svn/28964 Author: hofman Date: 2024-10-17 21:27:58 +0000 (Thu, 17 Oct 2024) Log Message: ----------- Don't save window setup to xattr when exporting selected items. Set string encoding in xattr of archived bibtex. Modified Paths: -------------- trunk/bibdesk/BibDocument.m Modified: trunk/bibdesk/BibDocument.m =================================================================== --- trunk/bibdesk/BibDocument.m 2024-10-17 14:40:12 UTC (rev 28963) +++ trunk/bibdesk/BibDocument.m 2024-10-17 21:27:58 UTC (rev 28964) @@ -1211,7 +1211,8 @@ } // save our window setup if we save or export to BibTeX - if ([[self class] isNativeType:typeName] || [typeName isEqualToString:BDSKMinimalBibTeXDocumentType]) + if (([[self class] isNativeType:typeName] || [typeName isEqualToString:BDSKMinimalBibTeXDocumentType]) && + (docFlags.isExporting == NO || [saveAccessoryController exportSelection] == NO)) [self saveWindowSetupInExtendedAttributesAtURL:absoluteURL forEncoding:encoding resetLocal:BDSKIsSaveOrSaveAsOperation(saveOperation)]; } @@ -1264,6 +1265,8 @@ BOOL success = [bibtexData writeToURL:bibtexURL options:0 error:outError]; if (success) { + [fm setAppleStringEncoding:[self encodingForSaving] atURL:bibtexURL error:NULL]; + NSMutableArray *args = [NSMutableArray arrayWithObjects:@"-czf", [fileURL path], bibtexFile, nil]; if ([localFiles count]) { [args addObject:@"-C"]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2024-10-17 14:40:15
|
Revision: 28963 http://sourceforge.net/p/bibdesk/svn/28963 Author: hofman Date: 2024-10-17 14:40:12 +0000 (Thu, 17 Oct 2024) Log Message: ----------- Update release notes Modified Paths: -------------- trunk/bibdesk/RelNotes.rtf Modified: trunk/bibdesk/RelNotes.rtf =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2024-10-17 14:22:27
|
Revision: 28962 http://sourceforge.net/p/bibdesk/svn/28962 Author: hofman Date: 2024-10-17 14:22:24 +0000 (Thu, 17 Oct 2024) Log Message: ----------- Include enclosing folder for linked files in archive unless files are in the same folder as the bibtex database Modified Paths: -------------- trunk/bibdesk/BibDocument.m Modified: trunk/bibdesk/BibDocument.m =================================================================== --- trunk/bibdesk/BibDocument.m 2024-10-17 09:25:39 UTC (rev 28961) +++ trunk/bibdesk/BibDocument.m 2024-10-17 14:22:24 UTC (rev 28962) @@ -1256,6 +1256,9 @@ for (NSString *filePath in parents) commonParent = commonParent ? [filePath commonRootPathOfFile:commonParent] : filePath; + if ([localFiles count] > 1 && [commonParent isEqualToString:NSHomeDirectory()] == NO && [commonParent isEqualToString:[self basePath]] == NO && [[commonParent stringByDeletingLastPathComponent] isEqualToString:@"/"] == NO && [parents containsObject:commonParent]) + commonParent = [commonParent stringByDeletingLastPathComponent]; + NSData *bibtexData = [self bibTeXDataDroppingInternal:NO relativeToPath:commonParent error:outError]; NSURL *bibtexURL = [dirURL URLByAppendingPathComponent:bibtexFile isDirectory:NO]; BOOL success = [bibtexData writeToURL:bibtexURL options:0 error:outError]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2024-10-17 09:25:41
|
Revision: 28961 http://sourceforge.net/p/bibdesk/svn/28961 Author: hofman Date: 2024-10-17 09:25:39 +0000 (Thu, 17 Oct 2024) Log Message: ----------- redirect window for sheet from external group to its document Modified Paths: -------------- trunk/bibdesk/BDSKExternalGroup.m Modified: trunk/bibdesk/BDSKExternalGroup.m =================================================================== --- trunk/bibdesk/BDSKExternalGroup.m 2024-10-16 16:09:46 UTC (rev 28960) +++ trunk/bibdesk/BDSKExternalGroup.m 2024-10-17 09:25:39 UTC (rev 28961) @@ -200,7 +200,7 @@ - (BOOL)isDocument { return NO; } -- (NSWindow *)windowForSheetForObject:(id)object { return [[self document] windowForSheet]; } +- (NSWindow *)windowForSheetForObject:(id)object { return [[self document] windowForSheetForObject:object]; } @end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2024-10-16 16:09:51
|
Revision: 28960 http://sourceforge.net/p/bibdesk/svn/28960 Author: hofman Date: 2024-10-16 16:09:46 +0000 (Wed, 16 Oct 2024) Log Message: ----------- Declare variable in for loop to avoid making it strong Modified Paths: -------------- trunk/bibdesk/BDSKApplication.m trunk/bibdesk/BDSKDOIWebParser.m trunk/bibdesk/BDSKEditor.m trunk/bibdesk/BDSKHCiteParser.m trunk/bibdesk/BDSKISIGroupServer.m trunk/bibdesk/BDSKMARCParser.m trunk/bibdesk/BDSKSearchBookmarkController.m trunk/bibdesk/BDSKSearchGroup.m trunk/bibdesk/BDSKSharingBrowser.m trunk/bibdesk/BDSKTask.m trunk/bibdesk/BDSKTemplate.m trunk/bibdesk/BDSKTemplateDocument.m trunk/bibdesk/BDSKTemplateObjectProxy.m trunk/bibdesk/BibDocument.m trunk/bibdesk/BibDocument_DataSource.m trunk/bibdesk/BibDocument_UI.m trunk/bibdesk/BibItem.m trunk/bibdesk/BibPref_Defaults.m trunk/bibdesk/NSFileManager_BDSKExtensions.m trunk/bibdesk/NSFont_BDSKExtensions.m Modified: trunk/bibdesk/BDSKApplication.m =================================================================== --- trunk/bibdesk/BDSKApplication.m 2024-10-16 09:34:44 UTC (rev 28959) +++ trunk/bibdesk/BDSKApplication.m 2024-10-16 16:09:46 UTC (rev 28960) @@ -138,13 +138,12 @@ if ([toSort count] > 1) [toSort sortUsingDescriptors:@[[[NSSortDescriptor alloc] initWithKey:@"title" ascending:YES selector:@selector(caseInsensitiveCompare:)]]]; - for (item in mainItems) { - [windowsMenu addItem:item]; - NSDocument *doc = [[[item target] windowController] document]; + for (NSMenuItem *anItem in mainItems) { + [windowsMenu addItem:anItem]; + NSDocument *doc = [[[anItem target] windowController] document]; NSArray *subArray = [subItems objectForKey:doc]; if ([subArray count]) { - NSMenuItem *subItem; - for (subItem in subArray) + for (NSMenuItem *subItem in subArray) [windowsMenu addItem:subItem]; } [subItems removeObjectForKey:doc]; @@ -152,13 +151,13 @@ if ([subItems count]) { for (NSDocument *doc in subItems) { - for (item in [subItems objectForKey:doc]) - [windowsMenu addItem:item]; + for (NSMenuItem *anItem in [subItems objectForKey:doc]) + [windowsMenu addItem:anItem]; } } - for (item in auxItems) - [windowsMenu addItem:item]; + for (NSMenuItem *anItem in auxItems) + [windowsMenu addItem:anItem]; } - (void)addWindowsItem:(NSWindow *)aWindow title:(NSString *)aString filename:(BOOL)isFilename { Modified: trunk/bibdesk/BDSKDOIWebParser.m =================================================================== --- trunk/bibdesk/BDSKDOIWebParser.m 2024-10-16 09:34:44 UTC (rev 28959) +++ trunk/bibdesk/BDSKDOIWebParser.m 2024-10-16 16:09:46 UTC (rev 28960) @@ -67,15 +67,13 @@ NSURL *baseURL = [NSURL URLWithString:@"https://doi.org/"]; DOMNode *rootElement = [[self domDocument] documentElement]; NSArray *nodes = nil; - DOMNode *node; - AGRegex *doiRegex = [AGRegex regexWithPattern:@"^(doi:|https?://(dx\\.)?doi\\.org/)?(10\\.[0-9]{4,}(\\.[0-9]+)*/\\S+)$" options:AGRegexCaseInsensitive]; - AGRegexMatch *match; NSString *doi; - node = [rootElement singleNodeForXPath:headMetaDoiXPath]; + DOMNode *node = [rootElement singleNodeForXPath:headMetaDoiXPath]; if (node) { + AGRegexMatch *match; doi = [node stringValueOfAttribute:@"content"]; if (doi && (match = [doiRegex findInString:doi])) { doi = [match groupAtIndex:3]; @@ -88,8 +86,9 @@ if ([dois count] == 0) { nodes = [rootElement nodesForXPath:bodyDoiXPath]; - for (node in nodes) { - doi = [node stringValueOfAttribute:@"href"]; + for (DOMNode *aNode in nodes) { + AGRegexMatch *match; + doi = [aNode stringValueOfAttribute:@"href"]; if (doi && (match = [doiRegex findInString:doi])) { doi = [[match groupAtIndex:3] stringByTrimmingCharactersInSet:[NSCharacterSet punctuationCharacterSet]]; if ([dois containsObject:doi] == NO) @@ -103,7 +102,7 @@ doiRegex = [AGRegex regexWithPattern:@"(doi:[ \\t]*|https?://(dx\\.)?doi\\.org/)(10\\.[0-9]{4,}(\\.[0-9]+)*/\\S+)" options:AGRegexCaseInsensitive]; - for (match in [doiRegex findAllInString:text]) { + for (AGRegexMatch *match in [doiRegex findAllInString:text]) { doi = [[match groupAtIndex:3] stringByTrimmingCharactersInSet:[NSCharacterSet punctuationCharacterSet]]; if ([[match groupAtIndex:1] hasPrefix:@"http"] == NO) doi = [doi stringByAddingPercentEscapesForPath]; Modified: trunk/bibdesk/BDSKEditor.m =================================================================== --- trunk/bibdesk/BDSKEditor.m 2024-10-16 09:34:44 UTC (rev 28959) +++ trunk/bibdesk/BDSKEditor.m 2024-10-16 16:09:46 UTC (rev 28960) @@ -493,10 +493,9 @@ else urls = [publication valueForKeyPath:@"localFiles.URL"]; - for (fileURL in urls) { - if ([fileURL isEqual:[NSNull null]] == NO) { - [[NSWorkspace sharedWorkspace] openURLWithDefaultApp:fileURL]; - } + for (NSURL *url in urls) { + if ([url isEqual:[NSNull null]] == NO) + [[NSWorkspace sharedWorkspace] openURLWithDefaultApp:url]; } } @@ -526,9 +525,9 @@ else urls = [publication valueForKeyPath:@"remoteURLs.URL"]; - for (remoteURL in urls) { - if ([remoteURL isEqual:[NSNull null]] == NO) { - [[NSWorkspace sharedWorkspace] openURLWithDefaultApp:remoteURL]; + for (NSURL *url in urls) { + if ([url isEqual:[NSNull null]] == NO) { + [[NSWorkspace sharedWorkspace] openURLWithDefaultApp:url]; } } } @@ -544,9 +543,9 @@ else urls = [publication valueForKeyPath:@"localFiles.URL"]; - for (fileURL in urls) { - if ([fileURL isEqual:[NSNull null]] == NO) { - BDSKNotesWindowController *notesController = [[BDSKNotesWindowController alloc] initWithURL:fileURL]; + for (NSURL *url in urls) { + if ([url isEqual:[NSNull null]] == NO) { + BDSKNotesWindowController *notesController = [[BDSKNotesWindowController alloc] initWithURL:url]; [[self document] addWindowController:notesController]; [notesController showWindow:self]; @@ -566,9 +565,9 @@ else urls = [publication valueForKeyPath:@"localFiles.URL"]; - for (fileURL in urls) { - if ([fileURL isEqual:[NSNull null]] == NO) { - NSString *notes = [fileURL textSkimNotes]; + for (NSURL *url in urls) { + if ([url isEqual:[NSNull null]] == NO) { + NSString *notes = [url textSkimNotes]; if ([notes length]) { if ([string length]) @@ -1550,11 +1549,9 @@ - (void)fileView:(FVFileView *)aFileView insertURLs:(NSArray *)absoluteURLs atIndexes:(NSIndexSet *)aSet forDrop:(id <NSDraggingInfo>)info dropOperation:(FVDropOperation)operation; { NSMutableArray *files = [NSMutableArray array]; - BDSKLinkedFile *aFile; - NSURL *aURL; - for (aURL in absoluteURLs) { - aFile = [BDSKLinkedFile linkedFileWithURL:aURL delegate:publication]; + for (NSURL *aURL in absoluteURLs) { + BDSKLinkedFile *aFile = [BDSKLinkedFile linkedFileWithURL:aURL delegate:publication]; if (aFile == nil) { NSBeep(); return; @@ -1564,11 +1561,11 @@ [publication insertFiles:files atIndexes:aSet]; - for (aURL in absoluteURLs) + for (NSURL *aURL in absoluteURLs) [[self document] userAddedURL:aURL forPublication:publication]; if (([NSEvent standardModifierFlags] & NSEventModifierFlagCommand) == 0) { - for (aFile in files) { + for (BDSKLinkedFile *aFile in files) { if ([aFile isFile]) [publication autoFileLinkedFile:aFile]; } @@ -3177,7 +3174,6 @@ // build the new set of fields NSMutableArray *currentFields = [NSMutableArray array]; NSMutableArray *allFields = [[NSMutableArray alloc] init]; - NSString *field; BDSKTypeManager *tm = [BDSKTypeManager sharedManager]; NSString *type = [publication pubType]; NSMutableSet *ignoredKeys = [[NSMutableSet alloc] initWithObjects:BDSKDateAddedString, BDSKDateModifiedString, BDSKColorString, nil]; @@ -3187,7 +3183,7 @@ [allFields addObjectsFromArray:[tm standardFieldsForType:type]]; - for (field in allFields) { + for (NSString *field in allFields) { if ([ignoredKeys containsObject:field] == NO) { [ignoredKeys addObject:field]; [currentFields addObject:field]; @@ -3198,7 +3194,7 @@ [allFields addNonDuplicateObjectsFromArray:[addedFields allObjects]]; [allFields sortUsingSelector:@selector(caseInsensitiveNumericCompare:)]; - for (field in allFields) { + for (NSString *field in allFields) { if ([ignoredKeys containsObject:field] == NO) { [ignoredKeys addObject:field]; if ([addedFields containsObject:field] || NO == [[publication valueOfField:field inherit:NO] isEqualAsComplexString:@""]) Modified: trunk/bibdesk/BDSKHCiteParser.m =================================================================== --- trunk/bibdesk/BDSKHCiteParser.m 2024-10-16 09:34:44 UTC (rev 28959) +++ trunk/bibdesk/BDSKHCiteParser.m 2024-10-16 16:09:46 UTC (rev 28960) @@ -107,7 +107,6 @@ BDSKTypeManager *typeMan = [BDSKTypeManager sharedManager]; NSMutableDictionary *rd = [NSMutableDictionary dictionaryWithCapacity:0]; NSArray *nodes; - DOMNode *node; NSMutableArray *array; // find type but not type that's a descendant of 'container'. @@ -114,7 +113,7 @@ nodes = [citationNode nodesForXPathExpression:[xpaths objectForKey:@"type"]]; NSString *typeString = nil; - for (node in nodes) { + for (DOMNode *node in nodes) { if(isContainer || [self nodeHasContainerParent:node] == NO) typeString = [self fullStringValueIfABBRFromNode:node]; } @@ -130,7 +129,7 @@ nodes = [citationNode nodesForXPathExpression:[xpaths objectForKey:@"title"]]; - for(node in nodes){ + for(DOMNode *node in nodes){ // deal with this citation's container later // note: todo - avoid second hasParentWithClassName by finding container // nodes first and caching those then checking against them here. (if necessary) @@ -143,7 +142,7 @@ nodes = [citationNode nodesForXPathExpression:[xpaths objectForKey:@"author"]]; array = [NSMutableArray array]; - for(node in nodes) + for(DOMNode *node in nodes) [array addObject:[self BTAuthorStringFromVCardNode:node xpath:[xpaths objectForKey:@"fn"]]]; [rd setObject:[array componentsJoinedByString:@" and "] forKey:BDSKAuthorString]; @@ -164,7 +163,7 @@ // find date published // Only use the first such node. - node = [citationNode singleNodeForXPathExpression:[xpaths objectForKey:@"date-published"]]; + DOMNode *node = [citationNode singleNodeForXPathExpression:[xpaths objectForKey:@"date-published"]]; if(node) { NSDate *datePublished = [self dateFromNode:node]; Modified: trunk/bibdesk/BDSKISIGroupServer.m =================================================================== --- trunk/bibdesk/BDSKISIGroupServer.m 2024-10-16 09:34:44 UTC (rev 28959) +++ trunk/bibdesk/BDSKISIGroupServer.m 2024-10-16 16:09:46 UTC (rev 28960) @@ -785,7 +785,6 @@ NSXMLNode *staticChild = [[self nodesForXPath:@"./static_data" error:NULL] firstObject]; NSXMLNode *summaryChild = [[staticChild nodesForXPath:@"./summary" error:NULL] firstObject]; NSXMLNode *dynamicChild = [[self nodesForXPath:@"./dynamic_data" error:NULL] firstObject]; - NSXMLNode *child; /* get WOK UID */ addStringForXPathToDictionary(self, @"./UID", nil, WOK_UID_FIELDNAME, pubFields); @@ -795,16 +794,16 @@ addAuthorNamesToDictionary(authorNames, pubFields); /* get title, journal name etc */ - for (child in [summaryChild nodesForXPath:@"./titles/title" error:NULL]) { - NSString *typeString = [[(NSXMLElement *)child attributeForName:@"type"] stringValue]; + for (NSXMLNode *aChild in [summaryChild nodesForXPath:@"./titles/title" error:NULL]) { + NSString *typeString = [[(NSXMLElement *)aChild attributeForName:@"type"] stringValue]; if ([typeString isEqualToString:@"item"]) { - addStringToDictionaryIfNotNil([child stringValue], BDSKTitleString, pubFields); + addStringToDictionaryIfNotNil([aChild stringValue], BDSKTitleString, pubFields); } else if ([typeString isEqualToString:@"abbrev_iso"]) { - addStringToDictionaryIfNotNil([child stringValue], BDSKJournalString, pubFields); + addStringToDictionaryIfNotNil([aChild stringValue], BDSKJournalString, pubFields); } else if ([typeString isEqualToString:@"source"]) { - source = useTitlecase ? [[child stringValue] titlecaseString] : [child stringValue]; + source = useTitlecase ? [[aChild stringValue] titlecaseString] : [aChild stringValue]; } else if ([typeString isEqualToString:@"source_abbrev"]) { - source_abbrev = [child stringValue]; + source_abbrev = [aChild stringValue]; } } if ([pubFields objectForKey:BDSKJournalString] == nil) { @@ -815,7 +814,7 @@ } /* get publication year, volume, issue and month */ - child = [[summaryChild nodesForXPath:@"./pub_info" error:NULL] firstObject]; + NSXMLNode *child = [[summaryChild nodesForXPath:@"./pub_info" error:NULL] firstObject]; if (child != nil) { addStringForXPathToDictionary(child, @"./@pubyear", nil, BDSKYearString, pubFields); addStringForXPathToDictionary(child, @"./@vol", nil, BDSKVolumeString, pubFields); @@ -888,16 +887,16 @@ addStringForXPathToDictionary(staticChild, @"./item/keywords_plus/keyword", keywordSeparator, BDSKKeywordsString, pubFields); /* get identifiers (DOI, ISSN, ISBN) */ - for (child in [dynamicChild nodesForXPath:@"./cluster_related/identifiers/identifier" error:NULL]) { - NSString *typeString = [[(NSXMLElement *)child attributeForName:@"type"] stringValue]; + for (NSXMLNode *aChild in [dynamicChild nodesForXPath:@"./cluster_related/identifiers/identifier" error:NULL]) { + NSString *typeString = [[(NSXMLElement *)aChild attributeForName:@"type"] stringValue]; if ([typeString isEqualToString:@"doi"]) { - addStringForXPathToDictionary(child, @"./@value", nil, BDSKDoiString, pubFields); + addStringForXPathToDictionary(aChild, @"./@value", nil, BDSKDoiString, pubFields); } else if ([typeString isEqualToString:@"issn"]) { - addStringForXPathToDictionary(child, @"./@value", nil, @"Issn", pubFields); + addStringForXPathToDictionary(aChild, @"./@value", nil, @"Issn", pubFields); } else if ([typeString isEqualToString:@"isbn"]) { - addStringForXPathToDictionary(child, @"./@value", nil, @"Isbn", pubFields); + addStringForXPathToDictionary(aChild, @"./@value", nil, @"Isbn", pubFields); } else if ([typeString isEqualToString:@"art_no"] && [pubFields objectForKey:BDSKNumberString] == nil) { - NSString *artnum = [[[(NSXMLElement *)child attributeForName:@"value"] stringValue] stringByRemovingPrefix:@"ARTN "]; + NSString *artnum = [[[(NSXMLElement *)aChild attributeForName:@"value"] stringValue] stringByRemovingPrefix:@"ARTN "]; addStringToDictionaryIfNotNil(artnum, BDSKNumberString, pubFields); } } @@ -947,14 +946,12 @@ addStringToDictionaryIfNotNil([self uid], WOK_UID_FIELDNAME, pubFields); - WokSearchLiteService_labelValuesPair *pair = nil; - - for (pair in [self authors]) { + for (WokSearchLiteService_labelValuesPair *pair in [self authors]) { if ([[pair label] isEqualToString:@"Authors"]) addAuthorNamesToDictionary([pair value], pubFields); } - for (pair in [self title]) { + for (WokSearchLiteService_labelValuesPair *pair in [self title]) { if ([[pair label] isEqualToString:@"Title"]) addStringToDictionaryIfNotNil([[pair value] firstObject], BDSKTitleString, pubFields); else if ([[pair label] isEqualToString:@"Issue"]) @@ -961,7 +958,7 @@ addStringToDictionaryIfNotNil([[pair value] firstObject], BDSKNumberString, pubFields); } - for (pair in [self source]) { + for (WokSearchLiteService_labelValuesPair *pair in [self source]) { if ([[pair label] isEqualToString:@"Pages"]) addStringToDictionaryIfNotNil([[pair value] firstObject], BDSKPagesString, pubFields); else if ([[pair label] isEqualToString:@"Published.BiblioDate"]) @@ -975,12 +972,12 @@ } NSString *keywordSeparator = [[NSUserDefaults standardUserDefaults] stringForKey:BDSKDefaultGroupFieldSeparatorKey]; - for (pair in [self keywords]) { + for (WokSearchLiteService_labelValuesPair *pair in [self keywords]) { if ([[pair label] isEqualToString:@"Keywords"]) addStringToDictionaryIfNotNil([[pair value] componentsJoinedByString:keywordSeparator], BDSKKeywordsString, pubFields); } - for (pair in [self other]) { + for (WokSearchLiteService_labelValuesPair *pair in [self other]) { if ([[pair label] isEqualToString:@"Identifier.Doi"]) addStringToDictionaryIfNotNil([[pair value] firstObject], BDSKDoiString, pubFields); else if ([[pair label] isEqualToString:@"Identifier.Issn"]) Modified: trunk/bibdesk/BDSKMARCParser.m =================================================================== --- trunk/bibdesk/BDSKMARCParser.m 2024-10-16 09:34:44 UTC (rev 28959) +++ trunk/bibdesk/BDSKMARCParser.m 2024-10-16 16:09:46 UTC (rev 28960) @@ -372,7 +372,6 @@ NSMutableDictionary *pubDict = [[NSMutableDictionary alloc] init]; NSMutableString *formattedString = [[NSMutableString alloc] init]; NSArray *nodes, *subnodes; - NSXMLNode *node, *subnode; NSString *value, *tag, *subTag, *ind1, *ind2; nodes = [record nodesForXPath:@"./marc:leader" error:NULL]; @@ -379,7 +378,7 @@ if ([nodes count] == 0) nodes = [record nodesForXPath:@"./leader" error:NULL]; if ([nodes count]) { - node = [nodes lastObject]; + NSXMLNode *node = [nodes lastObject]; value = [node stringValue]; //tag = [node stringValueOfAttribute:@"tag"]; [formattedString appendStrings:@"LDR ", value, @"\n", nil]; @@ -388,7 +387,7 @@ nodes = [record nodesForXPath:@"./marc:controlfield" error:NULL]; if ([nodes count] == 0) nodes = [record nodesForXPath:@"./controlfield" error:NULL]; - for (node in nodes) { + for (NSXMLNode *node in nodes) { value = [node stringValue]; tag = [node stringValueOfAttribute:@"tag"]; [formattedString appendStrings:tag, @" ", value, @"\n", nil]; @@ -397,7 +396,7 @@ nodes = [record nodesForXPath:@"./marc:datafield" error:NULL]; if ([nodes count] == 0) nodes = [record nodesForXPath:@"./datafield" error:NULL]; - for (node in nodes) { + for (NSXMLNode *node in nodes) { tag = [node stringValueOfAttribute:@"tag"]; ind1 = [node stringValueOfAttribute:@"ind1"] ?: @" "; ind2 = [node stringValueOfAttribute:@"ind2"] ?: @" "; @@ -406,7 +405,7 @@ subnodes = [node nodesForXPath:@"./marc:subfield" error:NULL]; if ([subnodes count] == 0) subnodes = [node nodesForXPath:@"./subfield" error:NULL]; - for (subnode in subnodes) { + for (NSXMLNode *subnode in subnodes) { value = [subnode stringValue]; subTag = [subnode stringValueOfAttribute:@"code"]; [formattedString appendStrings:@" ", @"$", subTag, @" " , value, nil]; Modified: trunk/bibdesk/BDSKSearchBookmarkController.m =================================================================== --- trunk/bibdesk/BDSKSearchBookmarkController.m 2024-10-16 09:34:44 UTC (rev 28959) +++ trunk/bibdesk/BDSKSearchBookmarkController.m 2024-10-16 16:09:46 UTC (rev 28960) @@ -525,10 +525,9 @@ return YES; } else { NSArray *fileURLs = [pboard readFileURLsOfTypes:@[@"net.sourceforge.bibdesk.bdsksearch"]]; - NSURL *fileURL; if ([fileURLs count] > 0) { if (idx == NSOutlineViewDropOnItemIndex && [item bookmarkType] == BDSKSearchBookmarkTypeBookmark) { - fileURL = [fileURLs objectAtIndex:0]; + NSURL *fileURL = [fileURLs objectAtIndex:0]; NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithContentsOfURL:fileURL]; if (dict) { NSDictionary *oldInfo = [item info]; @@ -540,7 +539,7 @@ if (idx == NSOutlineViewDropOnItemIndex) idx = [[item children] count]; NSMutableArray *newBookmarks = [NSMutableArray array]; - for (fileURL in fileURLs) { + for (NSURL *fileURL in fileURLs) { NSDictionary *dict = [NSDictionary dictionaryWithContentsOfURL:fileURL]; if (dict) { NSString *label = [[fileURL lastPathComponent] stringByDeletingPathExtension]; Modified: trunk/bibdesk/BDSKSearchGroup.m =================================================================== --- trunk/bibdesk/BDSKSearchGroup.m 2024-10-16 09:34:44 UTC (rev 28959) +++ trunk/bibdesk/BDSKSearchGroup.m 2024-10-16 16:09:46 UTC (rev 28960) @@ -348,7 +348,6 @@ NSString *path = [bdsksearchURL path]; NSString *aDatabase = nil; NSString *aName = [[bdsksearchURL parameterString] stringByRemovingPercentEncoding]; - NSString *query = [bdsksearchURL query]; NSString *aSearchTerm = nil; NSString *aType = BDSKSearchGroupZoom; NSMutableDictionary *options = [NSMutableDictionary dictionary]; @@ -375,7 +374,7 @@ aType = BDSKSearchGroupDBLP; } - for (query in [query componentsSeparatedByString:@"&"]) { + for (NSString *query in [[bdsksearchURL query] componentsSeparatedByString:@"&"]) { NSUInteger idx = [query rangeOfString:@"="].location; if (idx != NSNotFound && idx > 0) { NSString *key = [query substringToIndex:idx]; Modified: trunk/bibdesk/BDSKSharingBrowser.m =================================================================== --- trunk/bibdesk/BDSKSharingBrowser.m 2024-10-16 09:34:44 UTC (rev 28959) +++ trunk/bibdesk/BDSKSharingBrowser.m 2024-10-16 16:09:46 UTC (rev 28960) @@ -165,18 +165,16 @@ [unresolvedNetServices removeObject:aNetService]; }else{ NSString *name = [aNetService name]; - BDSKSharingClient *client = nil; // find the client we should remove - for (client in sharingClients) { - if ([[client name] isEqualToString:name]) - break; + for (BDSKSharingClient *client in sharingClients) { + if ([[client name] isEqualToString:name]) { + [client terminate]; + [sharingClients removeObject:client]; + [[NSNotificationCenter defaultCenter] postNotificationName:BDSKSharingClientsChangedNotification object:self]; + return; + } } - if (client != nil) { - [client terminate]; - [sharingClients removeObject:client]; - [[NSNotificationCenter defaultCenter] postNotificationName:BDSKSharingClientsChangedNotification object:self]; - } } } Modified: trunk/bibdesk/BDSKTask.m =================================================================== --- trunk/bibdesk/BDSKTask.m 2024-10-16 09:34:44 UTC (rev 28959) +++ trunk/bibdesk/BDSKTask.m 2024-10-16 16:09:46 UTC (rev 28960) @@ -257,9 +257,8 @@ if (environment) { // fill with pointers to copied C strings env = calloc([environment count] + 1, sizeof(char *)); - NSString *key; NSUInteger envIndex = 0; - for (key in environment) { + for (NSString *key in environment) { env[envIndex++] = __BDSKCopyFileSystemRepresentation([NSString stringWithFormat:@"%@=%@", key, [environment objectForKey:key]]); } env[envIndex] = NULL; Modified: trunk/bibdesk/BDSKTemplate.m =================================================================== --- trunk/bibdesk/BDSKTemplate.m 2024-10-16 09:34:44 UTC (rev 28959) +++ trunk/bibdesk/BDSKTemplate.m 2024-10-16 16:09:46 UTC (rev 28960) @@ -402,12 +402,11 @@ // accesses the node array in prefs + (BDSKTemplate *)templateForStyle:(NSString *)styleName; { - id aNode = nil; - for (aNode in [self exportTemplates]) { + for (id aNode in [self exportTemplates]) { if (NO == [aNode isLeaf] && [[aNode valueForKey:BDSKTemplateNameString] isEqualToString:styleName]) - break; + return aNode; } - return aNode; + return nil; } + (BDSKTemplate *)templateForCiteService; @@ -687,12 +686,11 @@ NSParameterAssert(nil != role); // assume roles are unique by grabbing the first one; this works for any case except the accessory files - id aNode = nil; - for (aNode in [self children]) { + for (id aNode in [self children]) { if ([[aNode valueForKey:BDSKTemplateRoleString] isEqualToString:role]) - break; + return aNode; } - return aNode; + return nil; } - (void)setRepresentedFileURL:(NSURL *)aURL; Modified: trunk/bibdesk/BDSKTemplateDocument.m =================================================================== --- trunk/bibdesk/BDSKTemplateDocument.m 2024-10-16 09:34:44 UTC (rev 28959) +++ trunk/bibdesk/BDSKTemplateDocument.m 2024-10-16 16:09:46 UTC (rev 28960) @@ -325,7 +325,6 @@ NSArray *defaultItemTemplate = [templateDict objectForKey:@""]; NSArray *itemTemplate; BDSKTypeTemplate *template; - NSString *type; NSArray *currentTypes = [typeTemplates valueForKey:@"pubType"]; NSArray *types = [templateDict allKeys]; NSString *defaultType = nil; @@ -353,7 +352,7 @@ [typeTemplates setValue:nil forKey:@"itemTemplate"]; [typeTemplates setValue:@NO forKey:@"included"]; - for (type in types) { + for (NSString *type in types) { NSUInteger currentIndex = [currentTypes indexOfObject:type]; if (currentIndex == NSNotFound) { currentIndex = [typeTemplates count]; @@ -559,7 +558,6 @@ NSMutableString *mutString = [NSMutableString string]; NSPredicate *predicate = [NSPredicate predicateWithFormat:@"included = 1"]; NSArray *includedTemplates = [typeTemplates filteredArrayUsingPredicate:predicate]; - BDSKTypeTemplate *template; NSString *altPrefix = @""; BOOL isSimple = [includedTemplates count] == 0 || ([includedTemplates count] == 1 && [typeTemplates objectAtIndex:defaultTypeIndex] == [includedTemplates lastObject]); @@ -571,7 +569,7 @@ if (isSimple) { [mutString appendString:[[typeTemplates objectAtIndex:defaultTypeIndex] string]]; } else { - for (template in includedTemplates) { + for (BDSKTypeTemplate *template in includedTemplates) { [mutString appendFormat:@"<%@$pubType=%@?>\n", altPrefix, [template pubType]]; [mutString appendString:[template string]]; altPrefix = @"?"; @@ -600,7 +598,6 @@ if (richText) { NSPredicate *predicate = [NSPredicate predicateWithFormat:@"included = 1"]; NSArray *includedTemplates = [typeTemplates filteredArrayUsingPredicate:predicate]; - BDSKTypeTemplate *template; NSString *altPrefix = @""; BOOL isSimple = [includedTemplates count] == 0 || ([includedTemplates count] == 1 && [typeTemplates objectAtIndex:defaultTypeIndex] == [includedTemplates lastObject]); @@ -625,7 +622,7 @@ if (isSimple) { [attrString appendAttributedString:[[typeTemplates objectAtIndex:defaultTypeIndex] attributedStringWithDefaultAttributes:attrs]]; } else { - for (template in includedTemplates) { + for (BDSKTypeTemplate *template in includedTemplates) { NSString *s = [NSString stringWithFormat:@"<%@$pubType=%@?>\n", altPrefix, [template pubType]]; [attrString appendAttributedString:[[NSAttributedString alloc] initWithString:s attributes:attrs]]; [attrString appendAttributedString:[template attributedStringWithDefaultAttributes:attrs]]; Modified: trunk/bibdesk/BDSKTemplateObjectProxy.m =================================================================== --- trunk/bibdesk/BDSKTemplateObjectProxy.m 2024-10-16 09:34:44 UTC (rev 28959) +++ trunk/bibdesk/BDSKTemplateObjectProxy.m 2024-10-16 16:09:46 UTC (rev 28960) @@ -124,8 +124,6 @@ } - (id)publicationsUsingTemplate{ - BibItem *pub = nil; - BDSKPRECONDITION(nil != template); BDSKTemplateFormat format = [template templateFormat]; id returnString = nil; @@ -135,7 +133,7 @@ if (format & BDSKTemplateFormatPlainText) { returnString = [NSMutableString stringWithString:@""]; - for (pub in [self publications]){ + for (BibItem *pub in [self publications]){ @autoreleasepool { NSArray *parsedTemplate = [parsedTemplates objectForKey:[pub pubType]]; if (parsedTemplate == nil) { @@ -162,7 +160,7 @@ } else if (format & BDSKTemplateFormatRichText) { returnString = [[NSMutableAttributedString alloc] init]; - for (pub in [self publications]){ + for (BibItem *pub in [self publications]){ @autoreleasepool { NSArray *parsedTemplate = [parsedTemplates objectForKey:[pub pubType]]; if (parsedTemplate == nil) { Modified: trunk/bibdesk/BibDocument.m =================================================================== --- trunk/bibdesk/BibDocument.m 2024-10-16 09:34:44 UTC (rev 28959) +++ trunk/bibdesk/BibDocument.m 2024-10-16 16:09:46 UTC (rev 28960) @@ -2047,13 +2047,12 @@ [bibString appendString:[[BDSKMacroResolver defaultMacroResolver] bibTeXString]]; [bibString appendString:[aMacroResolver bibTeXString]]; - BibItem *aPub = nil; BibItem *aParent = nil; NSMutableArray *selItems = [[NSMutableArray alloc] initWithCapacity:numberOfPubs]; NSMutableSet *parentItems = [[NSMutableSet alloc] initWithCapacity:numberOfPubs]; NSMutableArray *selParentItems = [[NSMutableArray alloc] initWithCapacity:numberOfPubs]; - for (aPub in items) { + for (BibItem *aPub in items) { [selItems addObject:aPub]; if(aParent = [aPub crossrefParent]) @@ -2060,7 +2059,7 @@ [parentItems addObject:aParent]; } - for (aPub in selItems) { + for (BibItem *aPub in selItems) { if([parentItems containsObject:aPub]){ [parentItems removeObject:aPub]; [selParentItems addObject:aPub]; @@ -2069,11 +2068,11 @@ } } - for (aPub in selParentItems) { + for (BibItem *aPub in selParentItems) { [bibString appendString:[aPub bibTeXStringWithOptions:options]]; } - for (aPub in parentItems) { + for (BibItem *aPub in parentItems) { [bibString appendString:[aPub bibTeXStringWithOptions:options]]; } @@ -2161,13 +2160,12 @@ } - (void)importPublications:(NSArray *)newPubs publicationsToAutoFile:(NSArray *)pubsToAutoFile options:(BDSKImportOptions)options { - BibItem *pub; NSUserDefaults *sud = [NSUserDefaults standardUserDefaults]; // set Date-Added to the current date, since unarchived items will have their own (incorrect) date NSDate *importDate = [NSDate date]; NSString *importDateDescription = [importDate standardDescription]; - for (pub in newPubs) + for (BibItem *pub in newPubs) [pub markNewWithDate:importDate description:importDateDescription]; if ((options & BDSKImportSelectLibrary)) @@ -2180,7 +2178,7 @@ NSMutableArray *autogeneratePubs = [NSMutableArray arrayWithCapacity:[newPubs count]]; BOOL hasDuplicateCiteKey = NO; - for (pub in newPubs) { + for (BibItem *pub in newPubs) { if ((autoGenerate ? [pub canAutogenerateCiteKey] : [pub hasEmptyOrDefaultCiteKey])) [autogeneratePubs addObject:pub]; else if ([pub isValidCiteKey:[pub citeKey]] == NO) @@ -2191,7 +2189,7 @@ BOOL useLocalUrlAndUrl = [sud boolForKey:BDSKUseLocalUrlAndUrlKey]; - for (pub in pubsToAutoFile) { + for (BibItem *pub in pubsToAutoFile) { if (useLocalUrlAndUrl) { [pub autoFileLocalUrl]; } else { @@ -2205,7 +2203,7 @@ BDSKDownloadOption dlOptions = BDSKDownloadCheckType; if ([sud boolForKey:BDSKReplaceDownloadedURLsKey]) options |= BDSKDownloadReplace; - for (pub in newPubs) { + for (BibItem *pub in newPubs) { if (useLocalUrlAndUrl) { if ([pub canDownloadURLForField:BDSKUrlString] && [NSString isEmptyString:[pub valueOfField:BDSKLocalUrlString inherit:NO]] && [types containsObject:[[[pub remoteURLForField:BDSKUrlString] pathExtension] lowercaseString] ?: @""]) [pub downloadURLForField:BDSKUrlString options:dlOptions]; Modified: trunk/bibdesk/BibDocument_DataSource.m =================================================================== --- trunk/bibdesk/BibDocument_DataSource.m 2024-10-16 09:34:44 UTC (rev 28959) +++ trunk/bibdesk/BibDocument_DataSource.m 2024-10-16 16:09:46 UTC (rev 28960) @@ -1245,9 +1245,8 @@ } else if ([item groupType] == BDSKWebGroupType && [pboard canReadFileURLOfTypes:nil] == NO) { NSArray *urls = [pboard readURLs]; - NSURL *url = nil; - for (url in urls) { + for (NSURL *url in urls) { if ([url isFileURL] == NO) { [(BDSKWebGroup *)item setURL:url]; return YES; @@ -1320,15 +1319,15 @@ BDSKGroupType groupType = [item groupType]; // if dropping on the static group parent, create a new static groups using a common author name or keyword if available if (groupType == BDSKStaticParentGroupType) { - BibItem *pub = [pubs lastObject]; + BibItem *aPub = [pubs lastObject]; NSHashTable *auths = [[NSHashTable alloc] initWithPointerFunctions:[NSPointerFunctions fuzzyAuthorPointerFunctions] capacity:0]; - NSHashTable *keywords = [[pub groupsForField:BDSKKeywordsString] copy]; + NSHashTable *keywords = [[aPub groupsForField:BDSKKeywordsString] copy]; - for (NSArray *array in [[pub people] allValues]) { + for (NSArray *array in [[aPub people] allValues]) { for (BibAuthor *author in array) [auths addObject:author]; } - for (pub in pubs) { + for (BibItem *pub in pubs) { if ([auths count]) { NSHashTable *pubAuths = [[NSHashTable alloc] initWithPointerFunctions:[NSPointerFunctions fuzzyAuthorPointerFunctions] capacity:0]; for (NSArray *array in [[pub people] allValues]) { @@ -1628,11 +1627,9 @@ return; NSMutableArray *files = [NSMutableArray array]; - BDSKLinkedFile *aFile; - NSURL *aURL; - for (aURL in absoluteURLs) { - aFile = [BDSKLinkedFile linkedFileWithURL:aURL delegate:publication]; + for (NSURL *aURL in absoluteURLs) { + BDSKLinkedFile *aFile = [BDSKLinkedFile linkedFileWithURL:aURL delegate:publication]; if (aFile == nil) { NSBeep(); return; @@ -1642,11 +1639,11 @@ [publication insertFiles:files atIndexes:aSet]; - for (aURL in absoluteURLs) + for (NSURL *aURL in absoluteURLs) [self userAddedURL:aURL forPublication:publication]; if (([NSEvent standardModifierFlags] & NSEventModifierFlagCommand) == 0) { - for (aFile in files) { + for (BDSKLinkedFile *aFile in files) { if ([aFile isFile]) [publication autoFileLinkedFile:aFile]; } Modified: trunk/bibdesk/BibDocument_UI.m =================================================================== --- trunk/bibdesk/BibDocument_UI.m 2024-10-16 09:34:44 UTC (rev 28959) +++ trunk/bibdesk/BibDocument_UI.m 2024-10-16 16:09:46 UTC (rev 28960) @@ -869,10 +869,9 @@ } }else if([tcId isCitationField]){ NSMutableArray *linkedPubs = [NSMutableArray array]; - BibItem *pub; - for (pub in [self clickedOrSelectedPublications]) + for (BibItem *pub in [self clickedOrSelectedPublications]) [linkedPubs addObjectsFromArray:[pub citationValueOfField:tcId]]; - for (pub in linkedPubs) { + for (BibItem *pub in linkedPubs) { item = [menu addItemWithTitle:[pub citeKey] action:@selector(editRepresentedPub:) keyEquivalent:@""]; [item setTarget:self]; [item setRepresentedObject:pub]; Modified: trunk/bibdesk/BibItem.m =================================================================== --- trunk/bibdesk/BibItem.m 2024-10-16 09:34:44 UTC (rev 28959) +++ trunk/bibdesk/BibItem.m 2024-10-16 16:09:46 UTC (rev 28960) @@ -1657,14 +1657,12 @@ if ((url = [self remoteURLForField:BDSKUrlString])) [mutableArray addObject:[url absoluteString]]; } else { - BDSKLinkedFile *file; - - for (file in [self localFiles]) { + for (BDSKLinkedFile *file in [self localFiles]) { if ((url = [file URL])) [mutableArray addObject:[url absoluteString]]; } - for (file in [self remoteURLs]) { + for (BDSKLinkedFile *file in [self remoteURLs]) { if ((url = [file URL])) [mutableArray addObject:[url absoluteString]]; } @@ -1772,7 +1770,6 @@ NSMutableSet *knownKeys = nil; NSSet *urlKeys = nil; NSSet *fileKeys = nil; - NSString *field; NSString *value; NSMutableData *data = [NSMutableData dataWithCapacity:200]; NSError *error = nil; @@ -1791,7 +1788,7 @@ // add fields to be written regardless; this is a seldom-used hack for some crossref problems // @@ added here for sorting; the original code required the user to also add this in the default fields list, but I'm not sure if that's a distinction worth preserving since it's only a hidden pref if ([fieldsToWriteIfEmpty count]) { - for (field in fieldsToWriteIfEmpty) { + for (NSString *field in fieldsToWriteIfEmpty) { if ([keys containsObject:field] == NO) [keys addObject:field]; } @@ -1834,7 +1831,7 @@ NSData *fieldValueSeparator = [@" = " dataUsingEncoding:encoding]; NSUInteger numFields = 0; - for (field in keys) { + for (NSString *field in keys) { if (isOK == NO) break; @@ -2215,11 +2212,9 @@ node = [NSXMLNode elementWithName:@"contributors"]; - BibAuthor *author; - node2 = [NSXMLNode elementWithName:@"authors"]; if ([authorField isPersonField]) { - for (author in [self peopleArrayForField:authorField]) { + for (BibAuthor *author in [self peopleArrayForField:authorField]) { value = [author normalizedName]; if ([value length] && [value characterAtIndex:0] == '{' && [value characterAtIndex:[value length] - 1] == '}') value = [[value substringWithRange:NSMakeRange(1, [value length] - 2)] stringByAppendingString:@","]; @@ -2232,7 +2227,7 @@ node2 = [NSXMLNode elementWithName:@"secondary-authors"]; if ([editorField isPersonField]) { - for (author in [self peopleArrayForField:editorField]) { + for (BibAuthor *author in [self peopleArrayForField:editorField]) { value = [author normalizedName]; if ([value length] && [value characterAtIndex:0] == '{' && [value characterAtIndex:[value length] - 1] == '}') value = [[value substringWithRange:NSMakeRange(1, [value length] - 2)] stringByAppendingString:@","]; @@ -2245,7 +2240,7 @@ node2 = [NSXMLNode elementWithName:@"subsidiary-authors"]; if ([organizationField isPersonField]) { - for (author in [self peopleArrayForField:organizationField]) { + for (BibAuthor *author in [self peopleArrayForField:organizationField]) { value = [author normalizedName]; if ([value length] && [value characterAtIndex:0] == '{' && [value characterAtIndex:[value length] - 1] == '}') value = [[value substringWithRange:NSMakeRange(1, [value length] - 2)] stringByAppendingString:@","]; @@ -2300,12 +2295,10 @@ AddXMLNodeForField(node, @"keyword", BDSKKeywordsString); [element addChild:node]; - BDSKLinkedFile *file; - node = [NSXMLNode elementWithName:@"urls"]; node2 = [NSXMLNode elementWithName:@"pdf-urls"]; - for (file in [self localFiles]) { + for (BDSKLinkedFile *file in [self localFiles]) { if ((value = [[file URL] absoluteString])) [node2 addChild:[NSXMLNode elementWithName:@"url" stringValue:value]]; } @@ -2312,7 +2305,7 @@ [node addChild:node2]; node2 = [NSXMLNode elementWithName:@"related-urls"]; - for (file in [self remoteURLs]) { + for (BDSKLinkedFile *file in [self remoteURLs]) { if ((value = [[file URL] absoluteString])) [node2 addChild:[NSXMLNode elementWithName:@"url" stringValue:value]]; } @@ -3829,8 +3822,7 @@ // here is another exampled of a doi regex = 10\.[0-9]+\/[a-z0-9\.\-\+\/\(\)]+; AGRegex *doiRegex = [AGRegex regexWithPattern:@"doi[:\\s/]{1,2}(10\\.[0-9]{4,}(?:\\.[0-9]+)*)[\\s/]{1,3}(\\S+)" options:AGRegexMultiline|AGRegexCaseInsensitive]; - AGRegexMatch *match; - for (match in [doiRegex findEnumeratorInString:string]) { + for (AGRegexMatch *match in [doiRegex findEnumeratorInString:string]) { if ([match groupAtIndex:1] != nil && [match groupAtIndex:2] != nil) [dois addObject:[NSString stringWithFormat:@"%@/%@", [match groupAtIndex:1], [match groupAtIndex:2]]]; } Modified: trunk/bibdesk/BibPref_Defaults.m =================================================================== --- trunk/bibdesk/BibPref_Defaults.m 2024-10-16 09:34:44 UTC (rev 28959) +++ trunk/bibdesk/BibPref_Defaults.m 2024-10-16 16:09:46 UTC (rev 28960) @@ -84,7 +84,6 @@ - (void)resetDefaultFields { // initialize the default fields from the prefs NSArray *defaultFields = [sud stringArrayForKey:BDSKDefaultFieldsKey]; - NSString *field = nil; NSMutableDictionary *dict = nil; NSNumber *type; NSNumber *isDefault; @@ -94,7 +93,7 @@ // Add Local File fields type = [NSNumber numberWithInteger:BDSKLocalFileType]; - for (field in [sud stringArrayForKey:BDSKLocalFileFieldsKey]) { + for (NSString *field in [sud stringArrayForKey:BDSKLocalFileFieldsKey]) { isDefault = [NSNumber numberWithBool:[defaultFields containsObject:field]]; dict = [NSMutableDictionary dictionaryWithObjectsAndKeys:field, FIELD_KEY, type, TYPE_KEY, isDefault, DEFAULT_KEY, nil]; [customFieldsArray addObject:dict]; @@ -103,7 +102,7 @@ // Add Remote URL fields type = [NSNumber numberWithInteger:BDSKRemoteURLType]; - for (field in [sud stringArrayForKey:BDSKRemoteURLFieldsKey]) { + for (NSString *field in [sud stringArrayForKey:BDSKRemoteURLFieldsKey]) { isDefault = [NSNumber numberWithBool:[defaultFields containsObject:field]]; dict = [NSMutableDictionary dictionaryWithObjectsAndKeys:field, FIELD_KEY, type, TYPE_KEY, isDefault, DEFAULT_KEY, nil]; [customFieldsArray addObject:dict]; @@ -112,7 +111,7 @@ // Add Boolean fields type = [NSNumber numberWithInteger:BDSKBooleanType]; - for (field in [sud stringArrayForKey:BDSKBooleanFieldsKey]) { + for (NSString *field in [sud stringArrayForKey:BDSKBooleanFieldsKey]) { isDefault = [NSNumber numberWithBool:[defaultFields containsObject:field]]; dict = [NSMutableDictionary dictionaryWithObjectsAndKeys:field, FIELD_KEY, type, TYPE_KEY, isDefault, DEFAULT_KEY, nil]; [customFieldsArray addObject:dict]; @@ -121,7 +120,7 @@ // Add Tri-State fields type = [NSNumber numberWithInteger:BDSKTriStateType]; - for (field in [sud stringArrayForKey:BDSKTriStateFieldsKey]) { + for (NSString *field in [sud stringArrayForKey:BDSKTriStateFieldsKey]) { isDefault = [NSNumber numberWithBool:[defaultFields containsObject:field]]; dict = [NSMutableDictionary dictionaryWithObjectsAndKeys:field, FIELD_KEY, type, TYPE_KEY, isDefault, DEFAULT_KEY, nil]; [customFieldsArray addObject:dict]; @@ -130,7 +129,7 @@ // Add Rating fields type = [NSNumber numberWithInteger:BDSKRatingType]; - for (field in [sud stringArrayForKey:BDSKRatingFieldsKey]){ + for (NSString *field in [sud stringArrayForKey:BDSKRatingFieldsKey]){ isDefault = [NSNumber numberWithBool:[defaultFields containsObject:field]]; dict = [NSMutableDictionary dictionaryWithObjectsAndKeys:field, FIELD_KEY, type, TYPE_KEY, isDefault, DEFAULT_KEY, nil]; [customFieldsArray addObject:dict]; @@ -139,7 +138,7 @@ // Add Citation fields type = [NSNumber numberWithInteger:BDSKCitationType]; - for (field in [sud stringArrayForKey:BDSKCitationFieldsKey]) { + for (NSString *field in [sud stringArrayForKey:BDSKCitationFieldsKey]) { isDefault = [NSNumber numberWithBool:[defaultFields containsObject:field]]; dict = [NSMutableDictionary dictionaryWithObjectsAndKeys:field, FIELD_KEY, type, TYPE_KEY, isDefault, DEFAULT_KEY, nil]; [customFieldsArray addObject:dict]; @@ -148,7 +147,7 @@ // Add Person fields type = [NSNumber numberWithInteger:BDSKPersonType]; - for (field in [sud stringArrayForKey:BDSKPersonFieldsKey]) { + for (NSString *field in [sud stringArrayForKey:BDSKPersonFieldsKey]) { isDefault = [NSNumber numberWithBool:[defaultFields containsObject:field]]; dict = [NSMutableDictionary dictionaryWithObjectsAndKeys:field, FIELD_KEY, type, TYPE_KEY, isDefault, DEFAULT_KEY, nil]; [customFieldsArray addObject:dict]; @@ -158,7 +157,7 @@ // Add any remaining Textual default fields at the beginning type = [NSNumber numberWithInteger:BDSKStringType]; isDefault = @YES; - for (field in [defaultFields reverseObjectEnumerator]){ + for (NSString *field in [defaultFields reverseObjectEnumerator]){ if([customFieldsSet containsObject:field]) continue; dict = [NSMutableDictionary dictionaryWithObjectsAndKeys:field, FIELD_KEY, type, TYPE_KEY, isDefault, DEFAULT_KEY, nil]; Modified: trunk/bibdesk/NSFileManager_BDSKExtensions.m =================================================================== --- trunk/bibdesk/NSFileManager_BDSKExtensions.m 2024-10-16 09:34:44 UTC (rev 28959) +++ trunk/bibdesk/NSFileManager_BDSKExtensions.m 2024-10-16 16:09:46 UTC (rev 28960) @@ -159,11 +159,10 @@ - (NSURL *)latestLyXPipeURL { NSURL *appSupportURL = [self URLForDirectory:NSApplicationSupportDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:NO error:NULL]; NSDirectoryEnumerator *dirEnum = [self enumeratorAtURL:appSupportURL includingPropertiesForKeys:@[NSURLNameKey, NSURLIsDirectoryKey] options:NSDirectoryEnumerationSkipsSubdirectoryDescendants errorHandler:nil]; - NSURL *fileURL; NSURL *lyxPipeURL = nil; BDSKVersionNumber *version = nil; - for (fileURL in dirEnum) { + for (NSURL *fileURL in dirEnum) { NSNumber *isDir = nil; [fileURL getResourceValue:&isDir forKey:NSURLIsDirectoryKey error:NULL]; if ([isDir boolValue]) { Modified: trunk/bibdesk/NSFont_BDSKExtensions.m =================================================================== --- trunk/bibdesk/NSFont_BDSKExtensions.m 2024-10-16 09:34:44 UTC (rev 28959) +++ trunk/bibdesk/NSFont_BDSKExtensions.m 2024-10-16 16:09:46 UTC (rev 28960) @@ -165,11 +165,11 @@ systemFamilies = [[NSArray alloc] initWithObjects:systemFamily, @".SF NS Text", @".SF NS Display", nil]; else systemFamilies = [[NSArray alloc] initWithObjects:systemFamily, nil]; - for (systemFamily in systemFamilies) { - for (NSArray *fontInfo in [fm availableMembersOfFontFamily:systemFamily]) { + for (NSString *aSystemFamily in systemFamilies) { + for (NSArray *fontInfo in [fm availableMembersOfFontFamily:aSystemFamily]) { NSString *fontName = [fontInfo objectAtIndex:0]; NSMutableArray *names = [NSMutableArray arrayWithObjects:baseFontName, nil]; - NSString *name = [fm localizedNameForFamily:systemFamily face:[fontInfo objectAtIndex:1]]; + NSString *name = [fm localizedNameForFamily:aSystemFamily face:[fontInfo objectAtIndex:1]]; if (name) { [names addObject:name]; } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2024-10-16 09:34:46
|
Revision: 28959 http://sourceforge.net/p/bibdesk/svn/28959 Author: hofman Date: 2024-10-16 09:34:44 +0000 (Wed, 16 Oct 2024) Log Message: ----------- declare variable in for loop to avoid being strong Modified Paths: -------------- trunk/bibdesk/BibDocument.m Modified: trunk/bibdesk/BibDocument.m =================================================================== --- trunk/bibdesk/BibDocument.m 2024-10-16 09:16:05 UTC (rev 28958) +++ trunk/bibdesk/BibDocument.m 2024-10-16 09:34:44 UTC (rev 28959) @@ -1231,7 +1231,6 @@ NSString *bibtexFile = [[[saveTargetURL lastPathComponent] stringByDeletingPathExtension] stringByAppendingPathExtension:@"bib"]; NSFileManager *fm = [NSFileManager defaultManager]; NSWorkspace *ws = [NSWorkspace sharedWorkspace]; - NSString *filePath; NSMutableSet *parents = [NSMutableSet set]; NSString *commonParent = nil; NSMutableSet *localFiles = [NSMutableSet set]; @@ -1239,13 +1238,15 @@ for (BibItem *item in [self publicationsForSaving]) { for (BDSKLinkedFile *file in [item localFiles]) { - if ((filePath = [file path]) && [fm fileExistsAtPath:filePath] && [ws isFolderAtPath:filePath] == NO) { + NSString *filePath = [file path]; + if (filePath && [fm fileExistsAtPath:filePath] && [ws isFolderAtPath:filePath] == NO) { [localFiles addObject:filePath]; [parents addObject:[filePath stringByDeletingLastPathComponent]]; } } for (NSString *field in localFileFields) { - if ((filePath = [[item localFileURLForField:field] path]) && [fm fileExistsAtPath:filePath] && [ws isFolderAtPath:filePath] == NO) { + NSString *filePath = [[item localFileURLForField:field] path]; + if (filePath && [fm fileExistsAtPath:filePath] && [ws isFolderAtPath:filePath] == NO) { [localFiles addObject:filePath]; [parents addObject:[filePath stringByDeletingLastPathComponent]]; } @@ -1252,7 +1253,7 @@ } } - for (filePath in parents) + for (NSString *filePath in parents) commonParent = commonParent ? [filePath commonRootPathOfFile:commonParent] : filePath; NSData *bibtexData = [self bibTeXDataDroppingInternal:NO relativeToPath:commonParent error:outError]; @@ -1264,7 +1265,7 @@ if ([localFiles count]) { [args addObject:@"-C"]; [args addObject:commonParent]; - for (filePath in localFiles) + for (NSString *filePath in localFiles) [args addObject:[filePath relativePathFromPath:commonParent]]; } NSTask *task = [[BDSKTask alloc] init]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2024-10-16 09:16:07
|
Revision: 28958 http://sourceforge.net/p/bibdesk/svn/28958 Author: hofman Date: 2024-10-16 09:16:05 +0000 (Wed, 16 Oct 2024) Log Message: ----------- remove unused variable Modified Paths: -------------- trunk/bibdesk/BibDocument_DataSource.m Modified: trunk/bibdesk/BibDocument_DataSource.m =================================================================== --- trunk/bibdesk/BibDocument_DataSource.m 2024-10-15 15:22:30 UTC (rev 28957) +++ trunk/bibdesk/BibDocument_DataSource.m 2024-10-16 09:16:05 UTC (rev 28958) @@ -674,7 +674,6 @@ - (BOOL)selectItemsInAuxFileURL:(NSURL *)auxURL { NSString *auxString = [NSString stringWithContentsOfURL:auxURL guessedEncoding:[self documentStringEncoding]]; NSString *command = @"\\bibcite{"; // we used to get the command by looking at the line after \bibdata, but that's unreliable as there can be other stuff in between the \bibcite commands - NSString *altCommand = nil; if (auxString == nil) return NO; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2024-10-15 15:22:31
|
Revision: 28957 http://sourceforge.net/p/bibdesk/svn/28957 Author: hofman Date: 2024-10-15 15:22:30 +0000 (Tue, 15 Oct 2024) Log Message: ----------- use mutable dictionary for old categoy group, BibAuthor uses trivial copy Modified Paths: -------------- trunk/bibdesk/BibDocument_Groups.m Modified: trunk/bibdesk/BibDocument_Groups.m =================================================================== --- trunk/bibdesk/BibDocument_Groups.m 2024-10-15 14:25:36 UTC (rev 28956) +++ trunk/bibdesk/BibDocument_Groups.m 2024-10-15 15:22:30 UTC (rev 28957) @@ -468,12 +468,12 @@ NSHashTable *hashTable = [[NSHashTable alloc] initWithPointerFunctions:pointerFunctions capacity:0]; CFMutableBagRef bag = CFBagCreateMutable(kCFAllocatorDefault, 0, &bagCallBacks); - NSMapTable *oldGroups = nil; + NSMutableDictionary *oldGroups = nil; BDSKCategoryGroup *oldEmptyGroup = nil; BDSKCategoryGroup *group = [[parent categoryGroups] firstObject]; if ([groupField isEqualToString:[group key]] && isPersonField == [[group name] isKindOfClass:[BibAuthor class]]) { - oldGroups = [NSMapTable strongToStrongObjectsMapTable]; + oldGroups = [[NSMutableDictionary alloc] init]; for (BDSKCategoryGroup *aGroup in [parent categoryGroups]) { // don't reuse groups with invalidated authors if ([aGroup isEmpty]) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2024-10-15 14:25:39
|
Revision: 28956 http://sourceforge.net/p/bibdesk/svn/28956 Author: hofman Date: 2024-10-15 14:25:36 +0000 (Tue, 15 Oct 2024) Log Message: ----------- complete Location field as single valued field Modified Paths: -------------- trunk/bibdesk/BDSKCompletionManager.m trunk/bibdesk/BDSKDublinCoreXMLParser.m trunk/bibdesk/BDSKPRISMParser.m trunk/bibdesk/BDSKStringConstants.h trunk/bibdesk/BDSKStringConstants.m trunk/bibdesk/BDSKTypeManager.m Modified: trunk/bibdesk/BDSKCompletionManager.m =================================================================== --- trunk/bibdesk/BDSKCompletionManager.m 2024-10-15 09:25:39 UTC (rev 28955) +++ trunk/bibdesk/BDSKCompletionManager.m 2024-10-15 14:25:36 UTC (rev 28956) @@ -55,7 +55,7 @@ + (void)initialize { BDSKINITIALIZE; - completedFields = [[NSSet alloc] initWithObjects:BDSKBooktitleString, BDSKJournalString, BDSKSeriesString, BDSKInstitutionString, BDSKPublisherString, BDSKSchoolString, BDSKOrganizationString, BDSKAddressString, BDSKKeywordsString, BDSKCrossrefString, nil]; + completedFields = [[NSSet alloc] initWithObjects:BDSKBooktitleString, BDSKJournalString, BDSKSeriesString, BDSKInstitutionString, BDSKPublisherString, BDSKSchoolString, BDSKOrganizationString, BDSKAddressString, BDSKKeywordsString, BDSKLocationString, BDSKCrossrefString, nil]; NSArray *extraFields = [[NSUserDefaults standardUserDefaults] stringArrayForKey:BDSKAdditionalFieldsToCompleteKey]; if ([extraFields count]) completedFields = [completedFields setByAddingObjectsFromArray:extraFields]; Modified: trunk/bibdesk/BDSKDublinCoreXMLParser.m =================================================================== --- trunk/bibdesk/BDSKDublinCoreXMLParser.m 2024-10-15 09:25:39 UTC (rev 28955) +++ trunk/bibdesk/BDSKDublinCoreXMLParser.m 2024-10-15 14:25:36 UTC (rev 28956) @@ -132,7 +132,7 @@ [pubDict setObject:joinedArrayComponents(array, separator) forKey:BDSKPublisherString]; if ((array = dcProperties(node, @"location"))) - [pubDict setObject:joinedArrayComponents(array, separator) forKey:@"Location"]; + [pubDict setObject:joinedArrayComponents(array, separator) forKey:BDSKLocationString]; if ((array = dcProperties(node, @"date"))) [pubDict setObject:joinedArrayComponents(array, separator) forKey:BDSKDateString]; Modified: trunk/bibdesk/BDSKPRISMParser.m =================================================================== --- trunk/bibdesk/BDSKPRISMParser.m 2024-10-15 09:25:39 UTC (rev 28955) +++ trunk/bibdesk/BDSKPRISMParser.m 2024-10-15 14:25:36 UTC (rev 28956) @@ -110,7 +110,7 @@ [pubDict setObject:[array firstObject] forKey:BDSKPublisherString]; if ((array = getProperties(node, @"dc:location"))) - [pubDict setObject:[array firstObject] forKey:@"Location"]; + [pubDict setObject:[array firstObject] forKey:BDSKLocationString]; if ((array = getProperties(node, @"prism:coverDate")) || (array = getProperties(node, @"dc:date")) || Modified: trunk/bibdesk/BDSKStringConstants.h =================================================================== --- trunk/bibdesk/BDSKStringConstants.h 2024-10-15 09:25:39 UTC (rev 28955) +++ trunk/bibdesk/BDSKStringConstants.h 2024-10-15 14:25:36 UTC (rev 28956) @@ -256,6 +256,7 @@ extern NSString *BDSKInstitutionString; extern NSString *BDSKSchoolString; extern NSString *BDSKOrganizationString; +extern NSString *BDSKLocationString; extern NSString *BDSKDoiString; extern NSString *BDSKCiteseerUrlString; extern NSString *BDSKColorString; Modified: trunk/bibdesk/BDSKStringConstants.m =================================================================== --- trunk/bibdesk/BDSKStringConstants.m 2024-10-15 09:25:39 UTC (rev 28955) +++ trunk/bibdesk/BDSKStringConstants.m 2024-10-15 14:25:36 UTC (rev 28956) @@ -257,6 +257,7 @@ NSString *BDSKInstitutionString = @"Institution"; NSString *BDSKSchoolString = @"School"; NSString *BDSKOrganizationString = @"Organization"; +NSString *BDSKLocationString = @"Location"; NSString *BDSKDoiString = @"Doi"; NSString *BDSKCiteseerUrlString = @"Citeseerurl"; Modified: trunk/bibdesk/BDSKTypeManager.m =================================================================== --- trunk/bibdesk/BDSKTypeManager.m 2024-10-15 09:25:39 UTC (rev 28955) +++ trunk/bibdesk/BDSKTypeManager.m 2024-10-15 14:25:36 UTC (rev 28956) @@ -254,7 +254,7 @@ BDSKAbstractString, BDSKAnnoteString, BDSKRssDescriptionString, nil]; [invalidFields unionSet:allURLFields]; - NSMutableSet *singleValuedFields = [NSMutableSet setWithObjects:BDSKPubTypeString, BDSKTypeString, BDSKCrossrefString, BDSKJournalString, BDSKBooktitleString, BDSKVolumetitleString, BDSKSeriesString, BDSKYearString, BDSKMonthString, BDSKPublisherString, BDSKAddressString, BDSKInstitutionString, BDSKSchoolString, BDSKOrganizationString, BDSKColorString, nil]; + NSMutableSet *singleValuedFields = [NSMutableSet setWithObjects:BDSKPubTypeString, BDSKTypeString, BDSKCrossrefString, BDSKJournalString, BDSKBooktitleString, BDSKVolumetitleString, BDSKSeriesString, BDSKYearString, BDSKMonthString, BDSKPublisherString, BDSKAddressString, BDSKInstitutionString, BDSKSchoolString, BDSKOrganizationString, BDSKLocationString, BDSKColorString, nil]; [singleValuedFields unionSet:ratingFields]; [singleValuedFields unionSet:booleanFields]; [singleValuedFields unionSet:triStateFields]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2024-10-15 09:25:42
|
Revision: 28955 http://sourceforge.net/p/bibdesk/svn/28955 Author: hofman Date: 2024-10-15 09:25:39 +0000 (Tue, 15 Oct 2024) Log Message: ----------- fix method name Modified Paths: -------------- trunk/bibdesk/BibDocument.m trunk/bibdesk/BibItem.h trunk/bibdesk/BibItem.m Modified: trunk/bibdesk/BibDocument.m =================================================================== --- trunk/bibdesk/BibDocument.m 2024-10-15 09:22:49 UTC (rev 28954) +++ trunk/bibdesk/BibDocument.m 2024-10-15 09:25:39 UTC (rev 28955) @@ -1966,7 +1966,7 @@ NSDate *importDate = [NSDate date]; NSString *importDateDescription = [importDate standardDescription]; for (BibItem *pub in publications) - [pub markNeWithDate:importDate description:importDateDescription]; + [pub markNewWithDate:importDate description:importDateDescription]; } - (void)generateForTemporaryCiteKey:(NSString *)tmpKey { @@ -2167,7 +2167,7 @@ NSDate *importDate = [NSDate date]; NSString *importDateDescription = [importDate standardDescription]; for (pub in newPubs) - [pub markNeWithDate:importDate description:importDateDescription]; + [pub markNewWithDate:importDate description:importDateDescription]; if ((options & BDSKImportSelectLibrary)) [self selectLibraryGroup:nil]; Modified: trunk/bibdesk/BibItem.h =================================================================== --- trunk/bibdesk/BibItem.h 2024-10-15 09:22:49 UTC (rev 28954) +++ trunk/bibdesk/BibItem.h 2024-10-15 09:25:39 UTC (rev 28955) @@ -457,7 +457,7 @@ @property (nonatomic, readonly) NSDate *dateAdded; @property (nonatomic, readonly) NSDate *dateModified; -- (void)markNeWithDate:(NSDate *)date description:(NSString *)dateDescription; +- (void)markNewWithDate:(NSDate *)date description:(NSString *)dateDescription; - (void)markCiteKeyEdited; Modified: trunk/bibdesk/BibItem.m =================================================================== --- trunk/bibdesk/BibItem.m 2024-10-15 09:22:49 UTC (rev 28954) +++ trunk/bibdesk/BibItem.m 2024-10-15 09:25:39 UTC (rev 28955) @@ -213,7 +213,7 @@ if (isNew){ NSDate *date = [NSDate date]; - [self markNeWithDate:date description:[date standardDescription]]; + [self markNewWithDate:date description:[date standardDescription]]; } biFlags.hasEditedCiteKey = NO; @@ -473,7 +473,7 @@ return hash; } -- (void)markNeWithDate:(NSDate *)date description:(NSString *)dateDescription { +- (void)markNewWithDate:(NSDate *)date description:(NSString *)dateDescription { [pubFields setObject:dateDescription forKey:BDSKDateAddedString]; [pubFields setObject:dateDescription forKey:BDSKDateModifiedString]; [self setDateAdded:date]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2024-10-15 09:22:54
|
Revision: 28954 http://sourceforge.net/p/bibdesk/svn/28954 Author: hofman Date: 2024-10-15 09:22:49 +0000 (Tue, 15 Oct 2024) Log Message: ----------- don't reset date added and modified when crossref changes Modified Paths: -------------- trunk/bibdesk/BibItem.m Modified: trunk/bibdesk/BibItem.m =================================================================== --- trunk/bibdesk/BibItem.m 2024-10-15 09:10:14 UTC (rev 28953) +++ trunk/bibdesk/BibItem.m 2024-10-15 09:22:49 UTC (rev 28954) @@ -4131,22 +4131,18 @@ } // initially or when all fields are changed set the added and modified date based on the field values - if ((key == nil && dateAdded == nil) || allFieldsChanged) { - NSString *dateAddedValue = [pubFields objectForKey:BDSKDateAddedString]; - if ([NSString isEmptyString:dateAddedValue]) { - [self setDateAdded:nil]; - } else { - NSDate *theDate = [NSDate dateWithStandardDescription:dateAddedValue]; - [self setDateAdded:theDate]; - } + if ((key == nil && dateAdded == nil) || [BDSKAllFieldsString isEqualToString:key]) { + NSString *dateValue = [pubFields objectForKey:BDSKDateAddedString]; + NSDate *theDate = nil; + if ([NSString isEmptyString:dateValue] == NO) + theDate = [NSDate dateWithStandardDescription:dateValue]; + [self setDateAdded:theDate]; - NSString *dateModValue = [pubFields objectForKey:BDSKDateModifiedString]; - if ([NSString isEmptyString:dateModValue]) { - [self setDateModified:nil]; - } else { - NSDate *theDate = [NSDate dateWithStandardDescription:dateModValue]; - [self setDateModified:theDate]; - } + dateValue = [pubFields objectForKey:BDSKDateModifiedString]; + theDate = nil; + if ([NSString isEmptyString:dateValue] == NO) + theDate = [NSDate dateWithStandardDescription:dateValue]; + [self setDateModified:theDate]; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2024-10-15 09:10:17
|
Revision: 28953 http://sourceforge.net/p/bibdesk/svn/28953 Author: hofman Date: 2024-10-15 09:10:14 +0000 (Tue, 15 Oct 2024) Log Message: ----------- Update release notes Modified Paths: -------------- trunk/bibdesk/RelNotes.rtf Modified: trunk/bibdesk/RelNotes.rtf =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2024-10-04 16:49:58
|
Revision: 28952 http://sourceforge.net/p/bibdesk/svn/28952 Author: hofman Date: 2024-10-04 16:49:55 +0000 (Fri, 04 Oct 2024) Log Message: ----------- biblatex aux cite command has an extra argument, so scan that first to get to the cite key Modified Paths: -------------- trunk/bibdesk/BibDocument_DataSource.m Modified: trunk/bibdesk/BibDocument_DataSource.m =================================================================== --- trunk/bibdesk/BibDocument_DataSource.m 2024-09-27 17:01:12 UTC (rev 28951) +++ trunk/bibdesk/BibDocument_DataSource.m 2024-10-04 16:49:55 UTC (rev 28952) @@ -674,10 +674,13 @@ - (BOOL)selectItemsInAuxFileURL:(NSURL *)auxURL { NSString *auxString = [NSString stringWithContentsOfURL:auxURL guessedEncoding:[self documentStringEncoding]]; NSString *command = @"\\bibcite{"; // we used to get the command by looking at the line after \bibdata, but that's unreliable as there can be other stuff in between the \bibcite commands - + NSString *altCommand = nil; + if (auxString == nil) return NO; + BOOL isBiblatex = NO; + if ([auxString rangeOfString:command].length == 0) { // if there are no \bibcite commands we'll use the cite's, which are usualy added as \citation commands to the .aux file command = @"\\citation{"; @@ -684,8 +687,9 @@ if ([auxString rangeOfString:command].length == 0) { // biblatex uses the following comman command = @"\\abx@aux@cite{"; - if ([auxString rangeOfString:command].length == 0) + if ([auxString rangeOfString:command].length == 0 && [auxString rangeOfString:@"\\abx@aux@cite["].length == 0) return NO; + isBiblatex = YES; } } @@ -698,6 +702,7 @@ do { if ([scanner scanString:command intoString:NULL] && + (isBiblatex == NO || (([scanner scanUpToString:@"}" intoString:NULL] || YES) && [scanner scanString:@"}{" intoString:NULL])) && [scanner scanUpToString:@"}" intoString:&keys]) { for (NSString *key in [keys componentsSeparatedByString:@","]) { if ((items = [publications allItemsForCiteKey:key])) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2024-09-27 17:01:15
|
Revision: 28951 http://sourceforge.net/p/bibdesk/svn/28951 Author: hofman Date: 2024-09-27 17:01:12 +0000 (Fri, 27 Sep 2024) Log Message: ----------- Remember empty field grroup separately and ignore invalidate author groups early Modified Paths: -------------- trunk/bibdesk/BibDocument_Groups.m Modified: trunk/bibdesk/BibDocument_Groups.m =================================================================== --- trunk/bibdesk/BibDocument_Groups.m 2024-09-27 16:38:51 UTC (rev 28950) +++ trunk/bibdesk/BibDocument_Groups.m 2024-09-27 17:01:12 UTC (rev 28951) @@ -469,12 +469,18 @@ CFMutableBagRef bag = CFBagCreateMutable(kCFAllocatorDefault, 0, &bagCallBacks); NSMapTable *oldGroups = nil; + BDSKCategoryGroup *oldEmptyGroup = nil; BDSKCategoryGroup *group = [[parent categoryGroups] firstObject]; - if ([groupField isEqualToString:[group key]] && [groupField isPersonField] == [[group name] isKindOfClass:[BibAuthor class]]) { + if ([groupField isEqualToString:[group key]] && isPersonField == [[group name] isKindOfClass:[BibAuthor class]]) { oldGroups = [NSMapTable strongToStrongObjectsMapTable]; - for (BDSKCategoryGroup *aGroup in [parent categoryGroups]) - [oldGroups setObject:aGroup forKey:[aGroup name]]; + for (BDSKCategoryGroup *aGroup in [parent categoryGroups]) { + // don't reuse groups with invalidated authors + if ([aGroup isEmpty]) + oldEmptyGroup = aGroup; + else if (isPersonField == NO || [(BibAuthor *)[aGroup name] publication] != nil) + [oldGroups setObject:aGroup forKey:[aGroup name]]; + } } NSInteger emptyCount = 0; @@ -497,12 +503,7 @@ // now add the group names that we found from our BibItems, using a generic folder icon for (id groupName in hashTable) { - group = [oldGroups objectForKey:groupName]; - // don't reuse groups with invalidated authors - if (isPersonField && [(BibAuthor *)[group name] publication] == nil) - group = nil; - if (group == nil) - group = [[BDSKCategoryGroup alloc] initWithName:groupName key:groupField]; + group = [oldGroups objectForKey:groupName] ?: [[BDSKCategoryGroup alloc] initWithName:groupName key:groupField]; [group setCount:CFBagGetCountOfValue(bag, (__bridge void *)groupName)]; [mutableGroups addObject:group]; } @@ -510,7 +511,7 @@ // add the "empty" group at index 0; this is a group of pubs whose value is empty for this field, so they // will not be contained in any of the other groups for the currently selected group field (hence multiple selection is desirable) if (emptyCount > 0) { - group = [oldGroups objectForKey:[BibAuthor emptyAuthor]]; + group = oldEmptyGroup; if (group == nil) group = [[BDSKCategoryGroup alloc] initWithName:nil key:groupField]; [group setCount:emptyCount]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2024-09-27 16:38:55
|
Revision: 28950 http://sourceforge.net/p/bibdesk/svn/28950 Author: hofman Date: 2024-09-27 16:38:51 +0000 (Fri, 27 Sep 2024) Log Message: ----------- remove unused variable Modified Paths: -------------- trunk/bibdesk/BibDocument_Groups.m Modified: trunk/bibdesk/BibDocument_Groups.m =================================================================== --- trunk/bibdesk/BibDocument_Groups.m 2024-09-27 16:15:58 UTC (rev 28949) +++ trunk/bibdesk/BibDocument_Groups.m 2024-09-27 16:38:51 UTC (rev 28950) @@ -477,9 +477,6 @@ [oldGroups setObject:aGroup forKey:[aGroup name]]; } - NSMapTable *oldGroupTable = [NSMapTable strongToStrongObjectsMapTable]; - - NSInteger emptyCount = 0; NSHashTable *tmpSet = nil; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2024-09-27 16:16:00
|
Revision: 28949 http://sourceforge.net/p/bibdesk/svn/28949 Author: hofman Date: 2024-09-27 16:15:58 +0000 (Fri, 27 Sep 2024) Log Message: ----------- Look up old category groups for rebuilding in temporary map table to avoid quadratic comparisons Modified Paths: -------------- trunk/bibdesk/BibDocument_Groups.m Modified: trunk/bibdesk/BibDocument_Groups.m =================================================================== --- trunk/bibdesk/BibDocument_Groups.m 2024-09-17 14:38:18 UTC (rev 28948) +++ trunk/bibdesk/BibDocument_Groups.m 2024-09-27 16:15:58 UTC (rev 28949) @@ -446,13 +446,6 @@ docFlags.ignoreGroupUIChange = NO; } -static BDSKCategoryGroup *groupWithName(NSArray *groups, id name) { - for (BDSKCategoryGroup *aGroup in groups) - if ([[aGroup name] isEqual:name]) - return aGroup; - return nil; -} - // this method uses counted sets to compute the number of publications per group; each group object is just a name // and a count, and a group knows how to compare itself with other groups for sorting/equality, but doesn't know // which pubs are associated with it @@ -475,12 +468,18 @@ NSHashTable *hashTable = [[NSHashTable alloc] initWithPointerFunctions:pointerFunctions capacity:0]; CFMutableBagRef bag = CFBagCreateMutable(kCFAllocatorDefault, 0, &bagCallBacks); - NSArray *oldGroups = [parent categoryGroups]; - BDSKCategoryGroup *group = [oldGroups firstObject]; + NSMapTable *oldGroups = nil; + BDSKCategoryGroup *group = [[parent categoryGroups] firstObject]; - if ([groupField isEqualToString:[group key]] == NO || [groupField isPersonField] != [[group name] isKindOfClass:[BibAuthor class]]) - oldGroups = nil; + if ([groupField isEqualToString:[group key]] && [groupField isPersonField] == [[group name] isKindOfClass:[BibAuthor class]]) { + oldGroups = [NSMapTable strongToStrongObjectsMapTable]; + for (BDSKCategoryGroup *aGroup in [parent categoryGroups]) + [oldGroups setObject:aGroup forKey:[aGroup name]]; + } + NSMapTable *oldGroupTable = [NSMapTable strongToStrongObjectsMapTable]; + + NSInteger emptyCount = 0; NSHashTable *tmpSet = nil; @@ -501,7 +500,7 @@ // now add the group names that we found from our BibItems, using a generic folder icon for (id groupName in hashTable) { - group = groupWithName(oldGroups, groupName); + group = [oldGroups objectForKey:groupName]; // don't reuse groups with invalidated authors if (isPersonField && [(BibAuthor *)[group name] publication] == nil) group = nil; @@ -514,9 +513,8 @@ // add the "empty" group at index 0; this is a group of pubs whose value is empty for this field, so they // will not be contained in any of the other groups for the currently selected group field (hence multiple selection is desirable) if (emptyCount > 0) { - if ([oldGroups count] && [[oldGroups objectAtIndex:0] isEmpty]) - group = [oldGroups objectAtIndex:0]; - else + group = [oldGroups objectForKey:[BibAuthor emptyAuthor]]; + if (group == nil) group = [[BDSKCategoryGroup alloc] initWithName:nil key:groupField]; [group setCount:emptyCount]; [mutableGroups insertObject:group atIndex:0]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2024-09-17 14:38:20
|
Revision: 28948 http://sourceforge.net/p/bibdesk/svn/28948 Author: hofman Date: 2024-09-17 14:38:18 +0000 (Tue, 17 Sep 2024) Log Message: ----------- interpret missing date-added or date-modified for smart group conditions as far into the past Modified Paths: -------------- trunk/bibdesk/BDSKCondition.m Modified: trunk/bibdesk/BDSKCondition.m =================================================================== --- trunk/bibdesk/BDSKCondition.m 2024-09-06 12:37:59 UTC (rev 28947) +++ trunk/bibdesk/BDSKCondition.m 2024-09-17 14:38:18 UTC (rev 28948) @@ -220,8 +220,8 @@ date = [item dateAdded]; else if ([key isEqualToString:BDSKDateModifiedString]) date = [item dateModified]; - return ((cachedStartDate == nil || [date compare:cachedStartDate] != NSOrderedAscending) && - (cachedEndDate == nil || [date compare:cachedEndDate] == NSOrderedAscending)); + return (cachedStartDate == nil || (date && [date compare:cachedStartDate] != NSOrderedAscending)) && + (cachedEndDate == nil || (date == nil || [date compare:cachedEndDate] == NSOrderedAscending)); } else if ([self isAttachmentCondition]) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2024-09-06 12:38:01
|
Revision: 28947 http://sourceforge.net/p/bibdesk/svn/28947 Author: hofman Date: 2024-09-06 12:37:59 +0000 (Fri, 06 Sep 2024) Log Message: ----------- NS encoding is 0 when invalid, not CF invalid Modified Paths: -------------- trunk/bibdesk/BDSKAsynchronousWebParser.m trunk/bibdesk/BDSKDBLPGroupServer.m trunk/bibdesk/BDSKDOIParser.m trunk/bibdesk/BDSKMODSParser.m trunk/bibdesk/BDSKTextImportController.m trunk/bibdesk/BDSKWebGroup.m Modified: trunk/bibdesk/BDSKAsynchronousWebParser.m =================================================================== --- trunk/bibdesk/BDSKAsynchronousWebParser.m 2024-08-26 14:38:58 UTC (rev 28946) +++ trunk/bibdesk/BDSKAsynchronousWebParser.m 2024-09-06 12:37:59 UTC (rev 28947) @@ -205,7 +205,7 @@ NSString *encodingName = [[download response] textEncodingName]; NSStringEncoding encoding = [NSString encodingForIANACharSetName:encodingName]; - if (encoding != kCFStringEncodingInvalidId) + if (encoding != 0) string = [[NSString alloc] initWithData:data encoding:encoding]; if (nil == string && encoding != NSUTF8StringEncoding) string = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; Modified: trunk/bibdesk/BDSKDBLPGroupServer.m =================================================================== --- trunk/bibdesk/BDSKDBLPGroupServer.m 2024-08-26 14:38:58 UTC (rev 28946) +++ trunk/bibdesk/BDSKDBLPGroupServer.m 2024-09-06 12:37:59 UTC (rev 28947) @@ -330,9 +330,7 @@ if (i != NSNotFound) { isBibTeX = YES; NSString *encodingName = [response textEncodingName]; - NSStringEncoding nsEncoding = [NSString encodingForIANACharSetName:encodingName]; - if (nsEncoding == kCFStringEncodingInvalidId) - nsEncoding = NSUTF8StringEncoding; + NSStringEncoding nsEncoding = [NSString encodingForIANACharSetName:encodingName] ?: NSUTF8StringEncoding; NSString *btString = [[NSString alloc] initWithData:data encoding:nsEncoding]; pubs = [BDSKBibTeXParser itemsFromString:btString owner:group error:NULL]; [bibtexFetches replaceObjectAtIndex:i withObject:pubs]; Modified: trunk/bibdesk/BDSKDOIParser.m =================================================================== --- trunk/bibdesk/BDSKDOIParser.m 2024-08-26 14:38:58 UTC (rev 28946) +++ trunk/bibdesk/BDSKDOIParser.m 2024-09-06 12:37:59 UTC (rev 28947) @@ -83,9 +83,7 @@ BibItem *item = nil; if (data) { NSString *bibtexString = nil; - NSStringEncoding encoding = [NSString encodingForIANACharSetName:encodingName]; - if (encoding == kCFStringEncodingInvalidId) - encoding = NSUTF8StringEncoding; + NSStringEncoding encoding = [NSString encodingForIANACharSetName:encodingName] ?: NSUTF8StringEncoding; bibtexString = [[[NSString alloc] initWithData:data encoding:encoding] stringByRemovingSurroundingWhitespace]; if (bibtexString && [BDSKBibTeXParser canParseString:bibtexString]) { NSError *error = nil; Modified: trunk/bibdesk/BDSKMODSParser.m =================================================================== --- trunk/bibdesk/BDSKMODSParser.m 2024-08-26 14:38:58 UTC (rev 28946) +++ trunk/bibdesk/BDSKMODSParser.m 2024-09-06 12:37:59 UTC (rev 28947) @@ -73,9 +73,7 @@ NSData *xmlData = [marcDoc XMLData]; NSString *encodingName = [marcDoc characterEncoding]; - NSStringEncoding encoding = [NSString encodingForIANACharSetName:encodingName]; - if (encoding == kCFStringEncodingInvalidId) - encoding = NSUTF8StringEncoding; + NSStringEncoding encoding = [NSString encodingForIANACharSetName:encodingName] ?: NSUTF8StringEncoding; NSString *xmlString = [[NSString alloc] initWithData:xmlData encoding:encoding]; NSArray *parsedItems = [BDSKMARCParser itemsFromMARCXMLString:xmlString error:outError]; Modified: trunk/bibdesk/BDSKTextImportController.m =================================================================== --- trunk/bibdesk/BDSKTextImportController.m 2024-08-26 14:38:58 UTC (rev 28946) +++ trunk/bibdesk/BDSKTextImportController.m 2024-09-06 12:37:59 UTC (rev 28947) @@ -1393,9 +1393,7 @@ if(string == nil) { NSString *encodingName = [dataSource textEncodingName]; - NSStringEncoding nsEncoding = [NSString encodingForIANACharSetName:encodingName]; - if (nsEncoding == kCFStringEncodingInvalidId) - nsEncoding = NSUTF8StringEncoding; + NSStringEncoding nsEncoding = [NSString encodingForIANACharSetName:encodingName] ?: NSUTF8StringEncoding; string = [[NSString alloc] initWithData:[dataSource data] encoding:nsEncoding]; } Modified: trunk/bibdesk/BDSKWebGroup.m =================================================================== --- trunk/bibdesk/BDSKWebGroup.m 2024-08-26 14:38:58 UTC (rev 28946) +++ trunk/bibdesk/BDSKWebGroup.m 2024-09-06 12:37:59 UTC (rev 28947) @@ -271,7 +271,7 @@ if(string == nil) { NSData *data = [dataSource data]; NSString *encodingName = [dataSource textEncodingName]; - NSStringEncoding encoding = encodingName ? [NSString encodingForIANACharSetName:encodingName] : NSUTF8StringEncoding; + NSStringEncoding encoding = [NSString encodingForIANACharSetName:encodingName] ?: NSUTF8StringEncoding; if (encoding != kCFStringEncodingInvalidId) string = [[NSString alloc] initWithData:data encoding:encoding]; if (nil == string && encoding != NSUTF8StringEncoding) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2024-08-26 14:39:01
|
Revision: 28946 http://sourceforge.net/p/bibdesk/svn/28946 Author: hofman Date: 2024-08-26 14:38:58 +0000 (Mon, 26 Aug 2024) Log Message: ----------- BDSKShouldShowWebGroup is not used anymore Modified Paths: -------------- trunk/bibdesk/BDSKStringConstants.m trunk/bibdesk/Preferences.plist Modified: trunk/bibdesk/BDSKStringConstants.m =================================================================== --- trunk/bibdesk/BDSKStringConstants.m 2024-08-25 16:46:34 UTC (rev 28945) +++ trunk/bibdesk/BDSKStringConstants.m 2024-08-26 14:38:58 UTC (rev 28946) @@ -362,7 +362,6 @@ BDSKTableCellImages dict nil BDSKGroupFieldSeparatorCharactersKey string ";:," BDSKDefaultGroupFieldSeparatorKey string "; " // note trailing space! - BDSKShouldShowWebGroup bool true BDSKEditorFormShouldAutoCompleteKey bool true BDSKAdditionalFieldsToComplete array nil BDSKReadExtendedAttributesKey bool false // read/write BibTeX to files Modified: trunk/bibdesk/Preferences.plist =================================================================== --- trunk/bibdesk/Preferences.plist 2024-08-25 16:46:34 UTC (rev 28945) +++ trunk/bibdesk/Preferences.plist 2024-08-26 14:38:58 UTC (rev 28946) @@ -128,8 +128,6 @@ </array> <key>BDSKSearchMenuTagKey</key> <integer>0</integer> - <key>BDSKShouldShowWebGroup</key> - <true/> <key>BDSKShouldUsePDFMetadata</key> <false/> <key>BDSKShouldUsePubMedMetadata</key> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |