aboutsummaryrefslogtreecommitdiffstats
path: root/Copy Mailto/main.m
diff options
context:
space:
mode:
Diffstat (limited to 'Copy Mailto/main.m')
-rw-r--r--Copy Mailto/main.m19
1 files changed, 19 insertions, 0 deletions
diff --git a/Copy Mailto/main.m b/Copy Mailto/main.m
new file mode 100644
index 0000000..e61f04e
--- /dev/null
+++ b/Copy Mailto/main.m
@@ -0,0 +1,19 @@
+//
+// main.m
+// CopyMailto
+//
+// Created by tw on 9/5/18.
+// Copyright © 2018 tw. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+
+#import "DefaultURLHandler.h"
+
+int main(int argc, const char * argv[]) {
+ if (argc == 2 && strcmp(argv[1], "--set-url-handler") == 0) {
+ return [DefaultURLHandler setDefaultURLHandler];
+ }
+
+ return NSApplicationMain(argc, argv);
+}