mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 12:52:21 +00:00
Finished implenting custom browser support
With this change, another localized string for OTHER_BROWSER will be needed as well. I've also set the project to use 2 spaces for tabs by default since that is the coding style you use in the project.
This commit is contained in:
@@ -621,9 +621,17 @@ NSString *const _MPTAbleSecurCellView = @"PasswordCell";
|
||||
if(!scheme) {
|
||||
webURL = [NSURL URLWithString:[NSString stringWithFormat:@"http://%@", [selectedEntry.url stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]];
|
||||
}
|
||||
[[NSWorkspace sharedWorkspace] openURL:webURL];
|
||||
/* Add custom browser support */
|
||||
//[[NSWorkspace sharedWorkspace] openURLs:@[webURL] withAppBundleIdentifier:@"org.mozilla.firefox" options:NSWorkspaceLaunchAsync additionalEventParamDescriptor:nil launchIdentifiers:NULL];
|
||||
|
||||
NSString *browserBundleID = [[NSUserDefaults standardUserDefaults] objectForKey:kMPSettingsKeyBrowserBundleId];
|
||||
BOOL launched = NO;
|
||||
|
||||
if (browserBundleID) {
|
||||
launched = [[NSWorkspace sharedWorkspace] openURLs:@[webURL] withAppBundleIdentifier:browserBundleID options:NSWorkspaceLaunchAsync additionalEventParamDescriptor:nil launchIdentifiers:NULL];
|
||||
}
|
||||
|
||||
if (!launched) {
|
||||
[[NSWorkspace sharedWorkspace] openURL:webURL];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user