implement WmAbout; include "sys.m"; sys: Sys; include "draw.m"; draw: Draw; Display, Image: import draw; include "tk.m"; tk: Tk; include "wmlib.m"; wmlib: Wmlib; include "version.m"; WmAbout: module { init: fn(ctxt: ref Draw->Context, argv: list of string); }; about_cfg := array[] of { "frame .f -bg black -borderwidth 2 -relief ridge", "label .b -bg black -bitmap @/icons/inferno.bit", "label .l1 -bg black -fg #ff5500 -text {Inferno "+ Version->VERSION + "}", "pack .b .l1 -in .f", "pack .f -ipadx 4, -ipady 2", "pack propagate . 0", "update", }; init(ctxt: ref Draw->Context, nil: list of string) { sys = load Sys Sys->PATH; draw = load Draw Draw->PATH; tk = load Tk Tk->PATH; wmlib= load Wmlib Wmlib->PATH; wmlib->init(); (t, menubut) := wmlib->titlebar(ctxt.screen, "", "About Inferno", 0); cmd := chan of string; tk->namechan(t, cmd, "cmd"); wmlib->tkcmds(t, about_cfg); for(;;) alt { menu := <-menubut => if(menu[0] == 'e') return; wmlib->titlectl(t, menu); } }