X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=chiark-tcl-applet.git;a=blobdiff_plain;f=example;h=b719c50409dae9a48ce7b4e60c42ab5da791c125;hp=3b45d0bd19e76c23033e9ccb4fa7a89f1258f95d;hb=13fd7884410510c20f77bdd1204d60a419eb7ac4;hpb=7287ebb84338db042f47bc91b7c2f075ab8a94ed diff --git a/example b/example index 3b45d0b..b719c50 100755 --- a/example +++ b/example @@ -2,19 +2,24 @@ # -*- Tcl -*- source applet.tcl +source subproc.tcl -#----- specifics ----- +#----- menu ----- + +foreach b {1 3} { + applet::setup-button-menu $b +} .m1 add command -command { msel; puts hi } -label hi .m3 add command -command { msel; puts boo } -label boo -image create bitmap ims -file gs_s.xbm +#image create bitmap ims -file gs_s.xbm #image create bitmap ims -file /usr/share/ghostscript/8.71/lib/gs_s.xbm #setimage ims #setimage ims -setuptooltip -settooltip "line\nanother" +applet::setup-tooltip { puts VIS } { puts INVIS } +applet::tooltip-set "line\nanother" fconfigure stdout -buffering line @@ -64,7 +69,7 @@ proc run-child {} { } set status none - set status [fork-then child-died { + set status [subproc::fork child-died { execl xacpi-simple [list -into [winfo id .i.i.b.c]] }] puts "FORKED $status"