5

My iCal has new behavior (since upgrading to SL). Every time I get an ical attachment in Mail, the iCal app flies up in my face. I don't see any way to turn off this behavior and it's amazingly disruptive when I'm busy with other activities. Help?

EDIT: I want iCal to add the invitations, so when I cmd-tab to the app those items are in the queue awaiting approval. What I am hoping to learn is how to stop the popup action forcing the application to become the top-level window.

quack quixote
  • 43,504

3 Answers3

2

Open up preferences in Mail.app and click on the General tab. Then change Add Invitations to iCal from Automatically to Never.

ridogi
  • 2,987
0

The solution that works for me is doing this command after Calendar starts:

defaults write com.apple.iCal NSDontMakeMainWindowKey YES

Which was kind of a pain since you have to remember to do that after Calendar starts, which I would always forget to do. So I wrote a little launchctl script to do it for me.

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd> <plist version="1.0"> <dict>
    <key>Label</key>
    <string>CalendarSquelch</string>
    <key>ProgramArguments</key>
    <array>
    <string>osascript</string>
    <string>-e</string>
    <string>tell application "System Events"
        set p to name of processes
        if p contains "Calendar" then
            do shell script "defaults write com.apple.iCal NSDontMakeMainWindowKey YES"
        end if
        end tell</string>
    </array>
    <key>StartInterval</key>
    <integer>300</integer> </dict> </plist>

This script checks every 5 minutes to see if Calendar is running. If it is, then it does that little defaults command. Save this file to ~/Library/LaunchAgents/CalendarSquelch.plist

Then run the following command to activate it:

launchctl load ~/Library/LaunchAgents/CalendarSquelch.plist 

This was all done on macOS Sierra.

Jack Cox
  • 101
-1

The solution is in mail preferences. Change the General setting "add invitations to Calendar" to "never". The event will still be added to your calendar, the application just won't pop open anymore.