aboutsummaryrefslogtreecommitdiffstats
path: root/CopyMailto/AppDelegate.m
diff options
context:
space:
mode:
Diffstat (limited to 'CopyMailto/AppDelegate.m')
-rw-r--r--CopyMailto/AppDelegate.m9
1 files changed, 9 insertions, 0 deletions
diff --git a/CopyMailto/AppDelegate.m b/CopyMailto/AppDelegate.m
index 6f3477d..5eb04c5 100644
--- a/CopyMailto/AppDelegate.m
+++ b/CopyMailto/AppDelegate.m
@@ -33,4 +33,13 @@ const NSUInteger MAILTO_INDEX = 7;
[_email_address setStringValue:[url substringFromIndex:MAILTO_INDEX]];
}
+- (IBAction)copyEmailToClipboard:(id)sender
+{
+ NSPasteboard *pasteboard = [NSPasteboard generalPasteboard];
+ [pasteboard clearContents];
+ [pasteboard writeObjects:
+ [NSArray arrayWithObject:
+ [_email_address stringValue]]];
+}
+
@end