From ed63f3857794bdc13b590126181b03e1db44f413 Mon Sep 17 00:00:00 2001 From: fvogel Date: Thu, 12 Nov 2020 22:28:12 +0000 Subject: Fix 'tk sysnotify' for Windows. --- library/systray.tcl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/library/systray.tcl b/library/systray.tcl index 5875757..4608776 100644 --- a/library/systray.tcl +++ b/library/systray.tcl @@ -251,7 +251,7 @@ proc ::tk::systray::destroy {} { variable _ico if {!$_created} { - return -code error "systray not created" + return -code error -errorcode {TK SYSTRAY DESTROY} "systray not created" } switch -- [tk windowingsystem] { "win32" { @@ -300,10 +300,10 @@ proc ::tk::sysnotify {title message} { switch -- [tk windowingsystem] { "win32" { - if {$::winicoprops::ico eq ""} { - error "Must create a system tray icon with the \"tk systray\" command first" + if {!$::tk::systray::_created} { + error "must create a system tray icon with the \"tk systray\" command first" } - _sysnotify notify $::winicoprops::ico $title $message + _sysnotify notify $::tk::systray::_ico $title $message } "x11" { if {[info commands _sysnotify] eq ""} { -- cgit v0.12