diff options
| author | Charles.Forsyth <devnull@localhost> | 2006-12-23 00:30:12 +0000 |
|---|---|---|
| committer | Charles.Forsyth <devnull@localhost> | 2006-12-23 00:30:12 +0000 |
| commit | 6e425a9de8c003b5a733621a6b6730ec3cc902b8 (patch) | |
| tree | 314123bcab78ff295f38f85f31dc141e5fe22d15 /appl/wm/unibrowse.b | |
| parent | 74a4d8c26dd3c1e9febcb717cfd6cb6512991a7a (diff) | |
20061220
Diffstat (limited to 'appl/wm/unibrowse.b')
| -rw-r--r-- | appl/wm/unibrowse.b | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/appl/wm/unibrowse.b b/appl/wm/unibrowse.b index 50eefb40..e7a55426 100644 --- a/appl/wm/unibrowse.b +++ b/appl/wm/unibrowse.b @@ -205,17 +205,17 @@ init(drawctxt: ref Draw->Context, nil: list of string) keywordsearch(c); } - c := <-elements[BYNUMBER].cmd => + <-elements[BYNUMBER].cmd => txt := cmd(top, ".numfield.f get"); (n, nil) := str->toint(txt, 16); pop(BYNUMBER); push(TABLE); - setchar(n); + setchar(0, n); currpos = filltable(n); update(top); - c := <-elements[BYCATEGORY].cmd => + <-elements[BYCATEGORY].cmd => sel := cmd(top, ".cat.menu curselection"); (currpos, nil) = str->toint(cmd(top, ".cat.menu get "+sel), 16); pop(BYCATEGORY); @@ -231,23 +231,23 @@ init(drawctxt: ref Draw->Context, nil: list of string) "backw" => currpos = filltable(currpos - Tablerows * Tablecols); update(top); - * => # must be set <col> <row> + * => # must be set <col> <row> <raise> (nil, args) := sys->tokenize(c, " "); - setchar(currpos + int hd tl args + setchar(int hd tl tl tl args, currpos + int hd tl args + int hd tl tl args * Tablecols); } - c := <-elements[BYSEARCH].cmd => + <-elements[BYSEARCH].cmd => sel := cmd(top, ".srch.menu curselection"); (n, nil) := str->toint(cmd(top, ".srch.menu get "+sel), 16); pop(BYSEARCH); push(TABLE); - setchar(n); + setchar(0, n); currpos = filltable(n); update(top); - c := <-elements[BYFONT].cmd => + <-elements[BYFONT].cmd => sel := cmd(top, ".font.menu curselection"); (currpos, nil) = str->toint(cmd(top, ".font.menu get "+sel), 16); pop(BYFONT); @@ -264,9 +264,11 @@ sendentry(t: ref Tk->Toplevel, msg: string, where: chan of string) exit; } -setchar(c: int) +setchar(raisei: int, c: int) { s := ""; s[0] = c; + if(raisei) + inspchan <-= "raise"; inspchan <-= s; } @@ -370,6 +372,8 @@ inspector(ctxt: ref Draw->Context, cmdch: chan of string) inspector_setchar(t: ref Tk->Toplevel, c: int) { + if(t == nil) + return; line := look(unidata, ';', sys->sprint("%4.4X", c)); labelset(t, ".chdata.ch", sys->sprint("%c", c)); labelset(t, ".chdata.val", sys->sprint("%4.4X", c)); @@ -560,7 +564,9 @@ inittable() cmd(top, tkexpand("$label unicode "+cname +" -borderwidth 1 -relief raised")); cmd(top, "bind "+cname+" <ButtonRelease-1>" - +" {send tblcmd set "+string j +" "+string i+"}"); + +" {send tblcmd set "+string j+" "+string i+" 0}"); + cmd(top, "bind "+cname+" <Double-Button-1>" + +" {send tblcmd set "+string j+" "+string i+" 1}"); cmd(top, "grid "+cname+" -row "+string i+" -column "+string (j+1) + " -sticky ews"); } |
