diff --git a/src/AccSecurityVC.mm b/src/AccSecurityVC.mm index 1a7f4c94fa094cc269955147f2ff2924209e0842..532bfd0def76f803228bb92c1f9a440167263095 100644 --- a/src/AccSecurityVC.mm +++ b/src/AccSecurityVC.mm @@ -142,8 +142,6 @@ [srtpRTPFallback setState:[self currentAccount]->isSrtpRtpFallback()]; [srtpRTPFallback setEnabled:useSRTP.state]; - NSArray * pathComponentArray = [self pathComponentArray]; - if([self currentAccount]->tlsCaListCertificate() != nil) { NSLog(@"CA ==> %@", account->tlsCaListCertificate()->path().toNSURL()); [caListPathControl setURL:account->tlsCaListCertificate()->path().toNSURL()]; @@ -170,50 +168,6 @@ [requireCertButton setState:[self currentAccount]->isTlsRequireClientCertificate()]; } -/* - Assemble a set of custom cells to display into an array to pass to the path control. - */ -- (NSArray *)pathComponentArray -{ - NSMutableArray *pathComponentArray = [[NSMutableArray alloc] init]; - - NSFileManager *fileManager = [[NSFileManager alloc] init]; - - NSURL* desktopURL = [fileManager URLForDirectory:NSDesktopDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:NO error:nil]; - NSURL* documentsURL = [fileManager URLForDirectory:NSDocumentDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:NO error:nil]; - NSURL* userURL = [fileManager URLForDirectory:NSUserDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:NO error:nil]; - - NSPathComponentCell *componentCell; - - // Use utility method to obtain a NSPathComponentCell based on icon, title and URL. - componentCell = [self componentCellForType:kGenericFolderIcon withTitle:@"Desktop" URL:desktopURL]; - [pathComponentArray addObject:componentCell]; - - componentCell = [self componentCellForType:kGenericFolderIcon withTitle:@"Documents" URL:documentsURL]; - [pathComponentArray addObject:componentCell]; - - componentCell = [self componentCellForType:kUserFolderIcon withTitle:NSUserName() URL:userURL]; - [pathComponentArray addObject:componentCell]; - - return pathComponentArray; -} - -/* - This method is used by pathComponentArray to create a NSPathComponent cell based on icon, title and URL information. - Each path component needs an icon, URL and title. - */ -- (NSPathComponentCell *)componentCellForType:(OSType)withIconType withTitle:(NSString *)title URL:(NSURL *)url -{ - NSPathComponentCell *componentCell = [[NSPathComponentCell alloc] init]; - - NSImage *iconImage = [[NSWorkspace sharedWorkspace] iconForFileType:NSFileTypeForHFSTypeCode(withIconType)]; - [componentCell setImage:iconImage]; - [componentCell setURL:url]; - [componentCell setTitle:title]; - - return componentCell; -} - - (IBAction)chooseTlsMethod:(id)sender { int index = [sender indexOfSelectedItem]; QModelIndex qIdx = [self currentAccount]->tlsMethodModel()->index(index, 0);