summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXSysTray.c
diff options
context:
space:
mode:
authorKevin Walzer <kw@codebykevin.com>2021-06-01 12:28:49 (GMT)
committerKevin Walzer <kw@codebykevin.com>2021-06-01 12:28:49 (GMT)
commit7fb58e98d29359350aea04dbbd5f083a08ebdbfb (patch)
tree157919fbd39b6c4c68b5d5fa983171570bb8ad57 /macosx/tkMacOSXSysTray.c
parent0eb891fc9c85b4bf6feb7741d4d6987e654d3bfd (diff)
downloadtk-7fb58e98d29359350aea04dbbd5f083a08ebdbfb.zip
tk-7fb58e98d29359350aea04dbbd5f083a08ebdbfb.tar.gz
tk-7fb58e98d29359350aea04dbbd5f083a08ebdbfb.tar.bz2
Add comment
Diffstat (limited to 'macosx/tkMacOSXSysTray.c')
-rw-r--r--macosx/tkMacOSXSysTray.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/macosx/tkMacOSXSysTray.c b/macosx/tkMacOSXSysTray.c
index d2ecfaf..e433207 100644
--- a/macosx/tkMacOSXSysTray.c
+++ b/macosx/tkMacOSXSysTray.c
@@ -416,6 +416,15 @@ static int SysNotifyObjCmd(
return TCL_OK;
}
+ /*
+ * Using NSAppleScript API here allows us to use a single API rather
+ * than multiple, some deprecated, API's, and also allows notifications
+ * to work correctly without requiring Wish to be code-signed - an
+ * undocumented but apparently consistent requirement. And by calling
+ * NSAppleScript inline rather than shelling to out osascript,
+ * Wish shows correctly as the calling app rather than Script Editor.
+ */
+
NSString *title = [NSString stringWithUTF8String: Tcl_GetString(objv[1])];
NSString *message = [NSString stringWithUTF8String: Tcl_GetString(objv[2])];
NSMutableString *notify = [NSMutableString new];