Skip to content
Snippets Groups Projects
Commit 8bf6ddc4 authored by Alexandre Lision's avatar Alexandre Lision
Browse files

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
parent 81c9721c
No related branches found
No related tags found
No related merge requests found
...@@ -142,8 +142,6 @@ ...@@ -142,8 +142,6 @@
[srtpRTPFallback setState:[self currentAccount]->isSrtpRtpFallback()]; [srtpRTPFallback setState:[self currentAccount]->isSrtpRtpFallback()];
[srtpRTPFallback setEnabled:useSRTP.state]; [srtpRTPFallback setEnabled:useSRTP.state];
NSArray * pathComponentArray = [self pathComponentArray];
if([self currentAccount]->tlsCaListCertificate() != nil) { if([self currentAccount]->tlsCaListCertificate() != nil) {
NSLog(@"CA ==> %@", account->tlsCaListCertificate()->path().toNSURL()); NSLog(@"CA ==> %@", account->tlsCaListCertificate()->path().toNSURL());
[caListPathControl setURL:account->tlsCaListCertificate()->path().toNSURL()]; [caListPathControl setURL:account->tlsCaListCertificate()->path().toNSURL()];
...@@ -170,50 +168,6 @@ ...@@ -170,50 +168,6 @@
[requireCertButton setState:[self currentAccount]->isTlsRequireClientCertificate()]; [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 { - (IBAction)chooseTlsMethod:(id)sender {
int index = [sender indexOfSelectedItem]; int index = [sender indexOfSelectedItem];
QModelIndex qIdx = [self currentAccount]->tlsMethodModel()->index(index, 0); QModelIndex qIdx = [self currentAccount]->tlsMethodModel()->index(index, 0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment