# applet::tooltip-set TEXT-MAYBE-MULTILINE
# whenever they like.
#
+# Icon:
+#
+# Caller should call:
+# applet::setimage IMAGE
+# as necessary.
+#
# Inner window subprocess:
#
# Caller that needs access to inner window should define
# Alternatively caller may call applet::setup-button-menu $b
# which will generate a menu .m$b which the user can configure
# and which will automatically be posted and unposted etc.
+# In this case the caller should arrange that all of their
+# menus, when an item is selected, call
+# applet::msel
wm withdraw .
uplevel #0 $tooltip_on_vis
}
+#----- simple images -----
+
+proc setimage {image} {
+ .i configure -image $image
+}
+
}
destroy [frame .i.i.make-exist]
bind .i <<IconConfigure>> { innerwindow-resetup-required IconConfigure }
}
-
-
-
-proc setimage {image} {
- .i configure -image $image
-}
-
-proc fork-then {ondeath inchild} {
- global children errorCode errorInfo
- foreach f {stdout stderr} {
- if {[catch { flush $f } emsg]} {
- catch { bgerror $emsg }
- }
- }
- set pid [fork]
- if {!$pid} {
- if {[catch {
- uplevel 1 $inchild
- } emsg]} {
- puts stderr "CHILD ERROR $emsg\n$errorCode\n$errorInfo\n"
- }
- kill KILL [id process]
- }
- set children($pid) $ondeath
- return $pid
-}
-
-proc chld-handler {} {
- global children
- while 1 {
- if {[catch { set got [wait -nohang] }]} break
- if {![llength $got]} break
- manyset $got pid how how2
- if {[info exists children($pid)]} {
- set l $children($pid)
- unset children($pid)
- if {[catch {
- uplevel #0 [concat [list $l] $how $how2]
- } emsg]} {
- catch { bgerror $emsg }
- }
- }
- }
-}
-
-signal -restart trap CHLD { after idle chld-handler }