diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-10-25 21:06:25 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-10-25 21:06:25 (GMT) |
| commit | 0d5336db012f45753abace489f18f0ca299c6961 (patch) | |
| tree | b1bf3280a9046df99226158978502eeb26f5b0a3 /library/demos/systray.tcl | |
| parent | e97381a6d921de403516d5b761539a450f4af83c (diff) | |
| parent | 1320b8a2a9c1269a345d44d673a7a35707fbbe9c (diff) | |
| download | tk-core-tip-626.zip tk-core-tip-626.tar.gz tk-core-tip-626.tar.bz2 | |
Merge 9.0core-tip-626
Diffstat (limited to 'library/demos/systray.tcl')
| -rw-r--r-- | library/demos/systray.tcl | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/library/demos/systray.tcl b/library/demos/systray.tcl index 6954143..3406f0c 100644 --- a/library/demos/systray.tcl +++ b/library/demos/systray.tcl @@ -26,10 +26,10 @@ $iconmenu add command -label "Status" -command { puts "status icon clicked" } $iconmenu add command -label "Exit" -command exit pack [label $w.l -text "This demonstration showcases - the tk systray and tk sysnotify commands. - Running this demo creates the systray icon. - Clicking the buttons below modifies and destroys the icon - and displays the notification."] + the tk systray and tk sysnotify commands. + Running this demo creates the systray icon. + Clicking the buttons below modifies and destroys the icon + and displays the notification."] image create photo book -data R0lGODlhDwAPAKIAAP//////AP8AAMDAwICAgAAAAAAAAAAAACwAAAAADwAPAAADSQhA2u5ksPeKABKSCaya29d4WKgERFF0l1IMQCAKatvBJ0OTdzzXI1xMB3TBZAvATtB6NSLKleXi3OBoLqrVgc0yv+DVSEUuFxIAOw== @@ -45,20 +45,20 @@ pack $w.f $w.b3 -fill x -padx 3p -pady 3p proc create {} { global trayIconExists if {$trayIconExists} { - tk_messageBox -message "Systray icon already exists" - return + tk_messageBox -message "Systray icon already exists" + return } tk systray create -image book -text "Systray sample" \ - -button1 {puts "foo"} \ - -button3 {tk_popup $iconmenu [winfo pointerx .] [winfo pointery .]} + -button1 {puts "foo"} \ + -button3 {tk_popup $iconmenu [winfo pointerx .] [winfo pointery .]} set trayIconExists true } proc modify {} { global trayIconExists if {!$trayIconExists} { - tk_messageBox -message "Please create systray icon first" - return + tk_messageBox -message "Please create systray icon first" + return } image create photo page -data R0lGODlhCwAPAKIAAP//////AMDAwICAgAAA/wAAAAAAAAAAACwAAAAACwAPAAADMzi6CzAugiAgDGE68aB0RXgRJBFVX0SNpQlUWfahQOvSsgrX7eZJMlQMWBEYj8iQchlKAAA7 tk systray configure -image page @@ -70,8 +70,8 @@ proc modify {} { proc notify {} { global trayIconExists if {!$trayIconExists} { - tk_messageBox -message "Please create systray icon first" - return + tk_messageBox -message "Please create systray icon first" + return } tk sysnotify "Alert" "This is an alert" } @@ -79,8 +79,8 @@ proc notify {} { proc remove {} { global trayIconExists if {!$trayIconExists} { - tk_messageBox -message "Systray icon was already destroyed" - return + tk_messageBox -message "Systray icon was already destroyed" + return } tk systray destroy set trayIconExists false |
