forked from mipstian/catch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CTCBrowser.m
48 lines (38 loc) · 1.75 KB
/
CTCBrowser.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#import "CTCBrowser.h"
#import "CTCDefaults.h"
@implementation CTCBrowser
- (IBAction)browseService:(id)sender {
// Launch the system browser, open the service (ShowRSS)
[NSWorkspace.sharedWorkspace openURL:[NSURL URLWithString:kCTCDefaultsServiceURL]];
}
- (IBAction)browseWebsite:(id)sender {
// Launch the system browser, open the applications's website
[NSWorkspace.sharedWorkspace openURL:[NSURL URLWithString:kCTCDefaultsApplicationWebsiteURL]];
}
- (IBAction)browseHelp:(id)sender {
// Launch the system browser, open the applications's on-line help
[NSWorkspace.sharedWorkspace openURL:[NSURL URLWithString:kCTCDefaultsApplicationHelpURL]];
}
- (IBAction)browseFeatureRequest:(id)sender {
// Launch the system browser, open the applications's feature request page
[NSWorkspace.sharedWorkspace openURL:[NSURL URLWithString:kCTCDefaultsApplicationFeatureRequestURL]];
}
- (IBAction)browseBugReport:(id)sender {
// Launch the system browser, open the applications's bug report page
[NSWorkspace.sharedWorkspace openURL:[NSURL URLWithString:kCTCDefaultsApplicationBugReportURL]];
}
+ (void)openInBackgroundURL:(NSURL *)url {
// Open a link without bringing app that handles it to the foreground
[NSWorkspace.sharedWorkspace openURLs:@[url]
withAppBundleIdentifier:nil
options:NSWorkspaceLaunchWithoutActivation
additionalEventParamDescriptor:nil
launchIdentifiers:nil];
}
+ (void)openInBackgroundFile:(NSString *)file {
// Open a file without bringing app that handles it to the foreground
[NSWorkspace.sharedWorkspace openFile:file
withApplication:nil
andDeactivate:NO];
}
@end