[Bibdesk-commit] SF.net SVN: bibdesk:[21857] trunk/bibdesk/BDSKSharedGroup.m
Revision: 21857 http://sourceforge.net/p/bibdesk/svn/21857 Author: hofman Date: 2018-02-09 17:46:00 + (Fri, 09 Feb 2018) Log Message: --- set empty array when download did not fail but nothing was retrieved Modified Paths: -- trunk/bibdesk/BDSKSharedGroup.m Modified: trunk/bibdesk/BDSKSharedGroup.m === --- trunk/bibdesk/BDSKSharedGroup.m 2018-02-09 17:02:53 UTC (rev 21856) +++ trunk/bibdesk/BDSKSharedGroup.m 2018-02-09 17:46:00 UTC (rev 21857) @@ -204,6 +204,9 @@ // we set the macroResolver so we know the fields of this item may refer to it, so we can prevent scripting from adding this to the wrong document [pubs setValue:macroResolver forKey:@"macroResolver"]; +if (pubs == nil && [client failedDownload] == NO) +pubs = [NSArray array]; + [[self macroResolver] setMacroDefinitions:macros]; [self setPublications:pubs]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit
[Bibdesk-commit] SF.net SVN: bibdesk:[21852] trunk/bibdesk/English.lproj/ BibPref_Display.xib
Revision: 21852 http://sourceforge.net/p/bibdesk/svn/21852 Author: hofman Date: 2018-02-09 15:38:32 + (Fri, 09 Feb 2018) Log Message: --- Revert xib file to before weirdly changed version Modified Paths: -- trunk/bibdesk/English.lproj/BibPref_Display.xib Modified: trunk/bibdesk/English.lproj/BibPref_Display.xib === --- trunk/bibdesk/English.lproj/BibPref_Display.xib 2018-02-09 15:01:30 UTC (rev 21851) +++ trunk/bibdesk/English.lproj/BibPref_Display.xib 2018-02-09 15:38:32 UTC (rev 21852) @@ -2,26 +2,15 @@ 1060 - 12B19 - 2549 - 1187 - 624.00 + 17D47 + 851 + 1561.20.106 + 910.40 com.apple.InterfaceBuilder.CocoaPlugin - 2549 + 851 - - NSBox - NSButton - NSButtonCell - NSComboBox - NSComboBoxCell - NSCustomObject - NSCustomView - NSTextField - NSTextFieldCell - NSView - + com.apple.InterfaceBuilder.CocoaPlugin @@ -40,14 +29,17 @@ NSApplication - + + 256 + 268 {{170, 269}, {300, 22}} + YES 67108864 @@ -54,9 +46,9 @@ 134217728 - LucidaGrande + .SFNSText 13 - 1044 + 1040 -2033958912 @@ -70,9 +62,11 @@ + 268 {{170, 299}, {300, 22}} + YES 67108864 @@ -91,9 +85,11 @@ + 268 {{170, 329}, {300, 22}} + YES 67108864 @@ -112,9 +108,11 @@ + 268 {{170, 359}, {300, 22}} + YES 67108864 @@ -133,9 +131,11 @@ +
[Bibdesk-commit] SF.net SVN: bibdesk:[21856] trunk/bibdesk/BDSKSharingServer.m
Revision: 21856 http://sourceforge.net/p/bibdesk/svn/21856 Author: hofman Date: 2018-02-09 17:02:53 + (Fri, 09 Feb 2018) Log Message: --- avoid early return Modified Paths: -- trunk/bibdesk/BDSKSharingServer.m Modified: trunk/bibdesk/BDSKSharingServer.m === --- trunk/bibdesk/BDSKSharingServer.m 2018-02-09 16:02:37 UTC (rev 21855) +++ trunk/bibdesk/BDSKSharingServer.m 2018-02-09 17:02:53 UTC (rev 21856) @@ -719,15 +719,14 @@ @catch (id exception) { NSLog(@"%@: ignoring exception \"%@\" raised while invalidating connection to client %p", [self class], exception, clientObject); } -return; +}else{ +[clientObject setProtocolForProxy:@protocol(BDSKSharingClient)]; +[remoteClients setObject:clientObject forKey:identifier]; +[self setNumberOfConnections:[remoteClients count]]; +dispatch_async(dispatch_get_main_queue(), ^{ +[self notifyClientConnectionsChanged]; +}); } - -[clientObject setProtocolForProxy:@protocol(BDSKSharingClient)]; -[remoteClients setObject:clientObject forKey:identifier]; -[self setNumberOfConnections:[remoteClients count]]; -dispatch_async(dispatch_get_main_queue(), ^{ -[self notifyClientConnectionsChanged]; -}); } #pragma mark | BDSKSharingServer This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit
[Bibdesk-commit] SF.net SVN: bibdesk:[21861] trunk/bibdesk/BibDocument_Groups.m
Revision: 21861 http://sourceforge.net/p/bibdesk/svn/21861 Author: hofman Date: 2018-02-09 23:12:43 + (Fri, 09 Feb 2018) Log Message: --- simplify updating shared groups Modified Paths: -- trunk/bibdesk/BibDocument_Groups.m Modified: trunk/bibdesk/BibDocument_Groups.m === --- trunk/bibdesk/BibDocument_Groups.m 2018-02-09 22:47:30 UTC (rev 21860) +++ trunk/bibdesk/BibDocument_Groups.m 2018-02-09 23:12:43 UTC (rev 21861) @@ -338,28 +338,28 @@ [groupOutlineView setDelegate:nil]; NSArray *selectedGroups = [self selectedGroups]; -NSMutableSet *clientsToAdd = [[[BDSKSharingBrowser sharedBrowser] sharingClients] mutableCopy]; -NSMutableArray *currentGroups = [[groups sharedGroups] mutableCopy]; -NSArray *currentClients = [currentGroups valueForKey:@"client"]; -NSSet *currentClientsSet = [NSSet setWithArray:currentClients]; -NSMutableSet *clientsToRemove = [currentClientsSet mutableCopy]; +NSMutableSet *clients = [[[BDSKSharingBrowser sharedBrowser] sharingClients] mutableCopy]; +NSMutableArray *sharedGroups = [[NSMutableArray alloc] init]; -[clientsToRemove minusSet:clientsToAdd]; -[clientsToAdd minusSet:currentClientsSet]; - -[currentGroups removeObjectsAtIndexes:[currentClients indexesOfObjects:[clientsToRemove allObjects]]]; - -for (BDSKSharingClient *client in clientsToAdd) { +// get the groups to keep +for (BDSKSharedGroup *group in [groups sharedGroups]) { +BDSKSharingClient *client = [group client]; +if ([clients containsObject:client]) { +[sharedGroups addObject:group]; +[clients removeObject:client]; +} +} +// add grouos for remaining clients +for (BDSKSharingClient *client in clients) { BDSKSharedGroup *group = [(BDSKSharedGroup *)[BDSKSharedGroup alloc] initWithClient:client]; -[currentGroups addObject:group]; +[sharedGroups addObject:group]; [group release]; } -[groups setSharedGroups:currentGroups]; +[groups setSharedGroups:sharedGroups]; -[clientsToRemove release]; -[clientsToAdd release]; -[currentGroups release]; +[clients release]; +[sharedGroups release]; [self removeSpinnersFromSuperview]; [groupOutlineView reloadData]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit
[Bibdesk-commit] SF.net SVN: bibdesk:[21858] trunk/bibdesk
Revision: 21858 http://sourceforge.net/p/bibdesk/svn/21858 Author: hofman Date: 2018-02-09 22:05:40 + (Fri, 09 Feb 2018) Log Message: --- update displayed items when selected external group has it publications cleared Modified Paths: -- trunk/bibdesk/BDSKSharedGroup.m trunk/bibdesk/BibDocument_Groups.m Modified: trunk/bibdesk/BDSKSharedGroup.m === --- trunk/bibdesk/BDSKSharedGroup.m 2018-02-09 17:46:00 UTC (rev 21857) +++ trunk/bibdesk/BDSKSharedGroup.m 2018-02-09 22:05:40 UTC (rev 21858) @@ -204,9 +204,6 @@ // we set the macroResolver so we know the fields of this item may refer to it, so we can prevent scripting from adding this to the wrong document [pubs setValue:macroResolver forKey:@"macroResolver"]; -if (pubs == nil && [client failedDownload] == NO) -pubs = [NSArray array]; - [[self macroResolver] setMacroDefinitions:macros]; [self setPublications:pubs]; } Modified: trunk/bibdesk/BibDocument_Groups.m === --- trunk/bibdesk/BibDocument_Groups.m 2018-02-09 17:46:00 UTC (rev 21857) +++ trunk/bibdesk/BibDocument_Groups.m 2018-02-09 22:05:40 UTC (rev 21858) @@ -388,7 +388,7 @@ } else { [groupOutlineView reloadData]; if ([[self selectedGroups] containsObject:group]) { -if (isWeb || succeeded) +if (isWeb || succeeded || ([group publicationsWithoutUpdating] == nil && [groupedPublications count])) [self displaySelectedGroups]; else [self updateStatus]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit
[Bibdesk-commit] SF.net SVN: bibdesk:[21859] trunk/bibdesk/BibDocument_Groups.m
Revision: 21859 http://sourceforge.net/p/bibdesk/svn/21859 Author: hofman Date: 2018-02-09 22:21:59 + (Fri, 09 Feb 2018) Log Message: --- compare count should amount to the same Modified Paths: -- trunk/bibdesk/BibDocument_Groups.m Modified: trunk/bibdesk/BibDocument_Groups.m === --- trunk/bibdesk/BibDocument_Groups.m 2018-02-09 22:05:40 UTC (rev 21858) +++ trunk/bibdesk/BibDocument_Groups.m 2018-02-09 22:21:59 UTC (rev 21859) @@ -388,7 +388,8 @@ } else { [groupOutlineView reloadData]; if ([[self selectedGroups] containsObject:group]) { -if (isWeb || succeeded || ([group publicationsWithoutUpdating] == nil && [groupedPublications count])) +if (isWeb || succeeded || +[[group publicationsWithoutUpdating] count] != [groupedPublications count]) [self displaySelectedGroups]; else [self updateStatus]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit
[Bibdesk-commit] SF.net SVN: bibdesk:[21860] trunk/bibdesk/BDSKSharedGroup.m
Revision: 21860 http://sourceforge.net/p/bibdesk/svn/21860 Author: hofman Date: 2018-02-09 22:47:30 + (Fri, 09 Feb 2018) Log Message: --- remove newline Modified Paths: -- trunk/bibdesk/BDSKSharedGroup.m Modified: trunk/bibdesk/BDSKSharedGroup.m === --- trunk/bibdesk/BDSKSharedGroup.m 2018-02-09 22:21:59 UTC (rev 21859) +++ trunk/bibdesk/BDSKSharedGroup.m 2018-02-09 22:47:30 UTC (rev 21860) @@ -160,7 +160,6 @@ - (BOOL)shouldRetrievePublications { return [self needsUpdate] || [super shouldRetrievePublications]; - } - (void)retrievePublications { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit
[Bibdesk-commit] SF.net SVN: bibdesk:[21862] trunk/bibdesk/Bibdesk.xcodeproj/ project.pbxproj
Revision: 21862 http://sourceforge.net/p/bibdesk/svn/21862 Author: amaxwell Date: 2018-02-10 07:31:10 + (Sat, 10 Feb 2018) Log Message: --- Change version to Modified Paths: -- trunk/bibdesk/Bibdesk.xcodeproj/project.pbxproj Modified: trunk/bibdesk/Bibdesk.xcodeproj/project.pbxproj === --- trunk/bibdesk/Bibdesk.xcodeproj/project.pbxproj 2018-02-09 23:12:43 UTC (rev 21861) +++ trunk/bibdesk/Bibdesk.xcodeproj/project.pbxproj 2018-02-10 07:31:10 UTC (rev 21862) @@ -4372,7 +4372,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = CE17EE7E0E24F27400DE06EA /* BibDesk-App.xcconfig */; buildSettings = { - CURRENT_PROJECT_VERSION = 4443; + CURRENT_PROJECT_VERSION = ; VERSIONING_SYSTEM = "apple-generic"; }; name = Debug; @@ -4381,7 +4381,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = CE17EE7E0E24F27400DE06EA /* BibDesk-App.xcconfig */; buildSettings = { - CURRENT_PROJECT_VERSION = 4443; + CURRENT_PROJECT_VERSION = ; VERSIONING_SYSTEM = "apple-generic"; }; name = Release; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit
[Bibdesk-commit] SF.net SVN: bibdesk:[21850] trunk/bibdesk/RelNotes.rtf
Revision: 21850 http://sourceforge.net/p/bibdesk/svn/21850 Author: hofman Date: 2018-02-09 14:23:59 + (Fri, 09 Feb 2018) 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. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit
[Bibdesk-commit] SF.net SVN: bibdesk:[21849] trunk/bibdesk/BDSKSharingServer.m
Revision: 21849 http://sourceforge.net/p/bibdesk/svn/21849 Author: hofman Date: 2018-02-09 13:44:31 + (Fri, 09 Feb 2018) Log Message: --- use port number for DO sharing for service, if we can find it, so we don't need to create a dummy port Modified Paths: -- trunk/bibdesk/BDSKSharingServer.m Modified: trunk/bibdesk/BDSKSharingServer.m === --- trunk/bibdesk/BDSKSharingServer.m 2018-02-09 07:30:38 UTC (rev 21848) +++ trunk/bibdesk/BDSKSharingServer.m 2018-02-09 13:44:31 UTC (rev 21849) @@ -101,7 +101,7 @@ @end @protocol BDSKSharingServerMainThread -- (oneway void)localThreadServerDidSetup:(BOOL)success; +- (oneway void)localThreadServerDidSetup:(BOOL)success port:(int)port; @end #pragma mark - @@ -253,38 +253,38 @@ [self restartSharingIfNeeded]; } -- (NSNetService *)newNetServiceWithSharingName:(NSString *)aSharingName { -uint16_t chosenPort = 0; - -// Here, create the socket from traditional BSD socket calls -// keep track of this so we can close it when we stop the net service -socketDescriptor = -1; -struct sockaddr_in serverAddress; -socklen_t namelen = sizeof(serverAddress); - -if((socketDescriptor = socket(AF_INET, SOCK_STREAM, 0)) > 0) { -memset(, 0, sizeof(serverAddress)); -serverAddress.sin_family = AF_INET; -serverAddress.sin_addr.s_addr = htonl(INADDR_ANY); -serverAddress.sin_port = 0; // allows the kernel to choose the port for us. +- (NSNetService *)newNetServiceWithSharingName:(NSString *)aSharingName port:(int)port { +if (port == 0) { +// if we could find no port number, create a dummy socket from traditional BSD socket calls +// keep track of this so we can close it when we stop the net service +socketDescriptor = -1; +struct sockaddr_in serverAddress; +socklen_t namelen = sizeof(serverAddress); -if(bind(socketDescriptor, (struct sockaddr *), sizeof(serverAddress)) < 0) { -close(socketDescriptor); -socketDescriptor = -1; -return nil; +if((socketDescriptor = socket(AF_INET, SOCK_STREAM, 0)) > 0) { +memset(, 0, sizeof(serverAddress)); +serverAddress.sin_family = AF_INET; +serverAddress.sin_addr.s_addr = htonl(INADDR_ANY); +serverAddress.sin_port = 0; // allows the kernel to choose the port for us. + +if(bind(socketDescriptor, (struct sockaddr *), sizeof(serverAddress)) < 0) { +close(socketDescriptor); +socketDescriptor = -1; +return nil; +} + +// Find out what port number was chosen for us. +if(getsockname(socketDescriptor, (struct sockaddr *), ) < 0) { +close(socketDescriptor); +socketDescriptor = -1; +return nil; +} + +port = ntohs(serverAddress.sin_port); } - -// Find out what port number was chosen for us. -if(getsockname(socketDescriptor, (struct sockaddr *), ) < 0) { -close(socketDescriptor); -socketDescriptor = -1; -return nil; -} - -chosenPort = ntohs(serverAddress.sin_port); } -NSNetService *aNetService = [[NSNetService alloc] initWithDomain:@"" type:BDSKNetServiceDomain name:aSharingName port:chosenPort]; +NSNetService *aNetService = [[NSNetService alloc] initWithDomain:@"" type:BDSKNetServiceDomain name:aSharingName port:port]; [aNetService setDelegate:self]; NSMutableDictionary *dictionary = [NSMutableDictionary dictionaryWithCapacity:4]; [dictionary setObject:[BDSKSharingServer supportedProtocolVersion] forKey:BDSKTXTVersionKey]; @@ -333,7 +333,8 @@ [netService stop]; BDSKDESTROY(netService); -close(socketDescriptor); +if(socketDescriptor != -1) +close(socketDescriptor); socketDescriptor = -1; [server stopDOServer]; @@ -366,7 +367,7 @@ } } -- (void)server:(BDSKSharingDOServer *)aServer didSetup:(BOOL)success { +- (void)server:(BDSKSharingDOServer *)aServer didSetup:(BOOL)success port:(int)port { BDSKASSERT(aServer == server || server == nil); if (success) { // the service was able to register the port @@ -374,7 +375,7 @@ BDSKPRECONDITION(netService == nil); // lazily instantiate the NSNetService object that will advertise on our behalf -netService = [self newNetServiceWithSharingName:[self sharingName]]; +netService = [self newNetServiceWithSharingName:[self sharingName] port:port]; BDSKPOSTCONDITION(netService != nil); @@ -587,9 +588,9 @@ [[NSNotificationCenter defaultCenter]