summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles.Forsyth <devnull@localhost>2009-04-03 13:18:03 +0000
committerCharles.Forsyth <devnull@localhost>2009-04-03 13:18:03 +0000
commit6257024afa02f4a61f05ebd05f9b067974b60f4a (patch)
treeae50c126a4be96a8a88e491589f6481ad2b6cfb8
parent96d99b9d5842a29c2374d9cdf300985d2cb1ca20 (diff)
20090403-1415
-rw-r--r--CHANGES1
-rw-r--r--appl/wm/brutus.b36
-rw-r--r--dis/wm/brutus.disbin42584 -> 43081 bytes
-rw-r--r--lib9/getuser-Nt.c5
-rw-r--r--man/9/text2
5 files changed, 31 insertions, 13 deletions
diff --git a/CHANGES b/CHANGES
index 659d1885..44308ec7 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,6 @@
20090403
change ,2 to ,#function in Solaris sparc assembler files (apparently works in gcc and sun's)
+ make appl/wm/brutus.b pass input to its widgets (issue 105)
20090402
add missing emu/Linux/segflush-*.c files and remove ARM segflush from os.c
20090402
diff --git a/appl/wm/brutus.b b/appl/wm/brutus.b
index b18d6a9d..0d177bf8 100644
--- a/appl/wm/brutus.b
+++ b/appl/wm/brutus.b
@@ -1718,7 +1718,7 @@ widget(parent: ref Tk->Toplevel, ctxt: ref Draw->Context, cfg: array of string):
tkcmds(top: ref Tk->Toplevel, a: array of string)
{
for(i := 0; i < len a; i++)
- v := tk->cmd(top, a[i]);
+ v := tkcmd(top, a[i]);
}
confirm(ctxt: ref Draw->Context, parent: ref Tk->Toplevel, message: string, write: int): string
@@ -1735,8 +1735,17 @@ confirm1(ctxt: ref Draw->Context, parent: ref Tk->Toplevel, message: string, wri
if(write == 0)
tkcmd(t, "destroy .f.exitclean");
tkcmd(t, UPDATE);
+ tkclient->onscreen(t, "onscreen");
cmd := chan of string;
tk->namechan(t, cmd, "cmd");
+ tkclient->onscreen(t, "exact");
+ tkclient->startinput(t, "ptr"::nil);
+ for(;;) alt {
+ s := <-t.ctxt.ptr =>
+ tk->pointer(t, *s);
+ c := <-cmd =>
+ return c;
+ }
return <-cmd;
}
@@ -1843,17 +1852,26 @@ tageditor(ctxt: ref Draw->Context, f: ref File)
t := widget(f.tk, ctxt, cfg[0:i]);
cmd := chan of string;
tk->namechan(t, cmd, "cmd");
+ tkclient->onscreen(t, "exact");
+ tkclient->startinput(t, "kbd"::"ptr"::nil);
loop:
for(;;){
- case c := <-cmd {
- "ok" =>
- break loop;
- "cancel" =>
- return;
- * =>
- j = int c;
- set[j] = (tkcmd(t, "variable c"+c) == "1");
+ alt{
+ s := <-t.ctxt.kbd =>
+ tk->keyboard(t, s);
+ s := <-t.ctxt.ptr =>
+ tk->pointer(t, *s);
+ c := <-cmd =>
+ case c {
+ "ok" =>
+ break loop;
+ "cancel" =>
+ return;
+ * =>
+ j = int c;
+ set[j] = (tkcmd(t, "variable c"+c) == "1");
+ }
}
}
for(j=0; j<NEXTRA; j++){
diff --git a/dis/wm/brutus.dis b/dis/wm/brutus.dis
index 8a6e5428..dcfebf7d 100644
--- a/dis/wm/brutus.dis
+++ b/dis/wm/brutus.dis
Binary files differ
diff --git a/lib9/getuser-Nt.c b/lib9/getuser-Nt.c
index 3d478f8a..afe88cf1 100644
--- a/lib9/getuser-Nt.c
+++ b/lib9/getuser-Nt.c
@@ -3,7 +3,6 @@
char*
getuser(void)
{
- static char *user = 0;
- user = "unknown";
- return user;
+ /* could do better, but result isn't really used */
+ return "unknown";
}
diff --git a/man/9/text b/man/9/text
index f530e358..7ba26dd8 100644
--- a/man/9/text
+++ b/man/9/text
@@ -376,7 +376,7 @@ first character on that display line.
If this option is specified as an empty string, it cancels
the option, leaving it unspecified for the tag (the default).
If the option is specified as a non-empty string that is
-an empty list, such as \f5-tags\0{\0}\fR, then it requests
+an empty list, such as \f5-tabs\0{\0}\fR, then it requests
default 8-character tabs as described for the \f5tabs\fR
widget option.
.TP