Revision: 13733
          http://sourceforge.net/p/skim-app/code/13733
Author:   hofman
Date:     2023-11-06 16:00:59 +0000 (Mon, 06 Nov 2023)
Log Message:
-----------
use nsworkspace to get default email app

Modified Paths:
--------------
    trunk/SKAttachmentEmailer.m

Modified: trunk/SKAttachmentEmailer.m
===================================================================
--- trunk/SKAttachmentEmailer.m 2023-11-06 15:56:32 UTC (rev 13732)
+++ trunk/SKAttachmentEmailer.m 2023-11-06 16:00:59 UTC (rev 13733)
@@ -51,7 +51,11 @@
 - (id)init {
     self = [super init];
     if (self) {
-        mailAppID = (NSString 
*)LSCopyDefaultHandlerForURLScheme(CFSTR("mailto"));
+        NSURL *appURL = [[NSWorkspace sharedWorkspace] 
URLForApplicationToOpenURL:[NSURL URLWithString:@"mailto://";]];
+        if (appURL)
+            mailAppID = [[[NSBundle bundleWithURL:appURL] bundleIdentifier] 
retain];
+        else
+            mailAppID = [@"com.apple.Mail" retain];
         if ([@"com.microsoft.entourage" isCaseInsensitiveEqual:mailAppID] == 
NO &&
             [@"com.microsoft.outlook" isCaseInsensitiveEqual:mailAppID] == NO 
&&
             [@"com.barebones.mailsmith" isCaseInsensitiveEqual:mailAppID] == 
NO &&

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to