From 8bf6ddc4155d7b18aac01e949a0f49891ec89fbb Mon Sep 17 00:00:00 2001 From: Alexandre Lision <alexandre.lision@savoirfairelinux.com> Date: Wed, 17 Jun 2015 15:52:48 -0400 Subject: [PATCH] cleanup: remove dead code this is normally used to populate a dropdown list to choose a directory from we do not need it here since the user needs to choose files (cert, pvk...) Refs #75600 Change-Id: I9396b42a00725c578f7c86d587cee4b62111be53 --- src/AccSecurityVC.mm | 46 -------------------------------------------- 1 file changed, 46 deletions(-) diff --git a/src/AccSecurityVC.mm b/src/AccSecurityVC.mm index 1a7f4c94..532bfd0d 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); -- GitLab