History

20090403-1415

Charles.Forsyth committed 17 years ago

Commit b7dcf9e1 parent 00a667b5 files · +30 −12Browse files

Unified · Split

5 files
  1. CHANGES +1 −0
  2. appl/wm/brutus.b +27 −9
  3. dis/wm/brutus.dis +0 −0
  4. lib9/getuser-Nt.c +2 −3
  5. man/9/text +1 −1
CHANGES+1−0
@@ -1,5 +1,6 @@
11 20090403
22 change ,2 to ,#function in Solaris sparc assembler files (apparently works in gcc and sun's)
3+ make appl/wm/brutus.b pass input to its widgets (issue 105)
34 20090402
45 add missing emu/Linux/segflush-*.c files and remove ARM segflush from os.c
56 20090402
appl/wm/brutus.b+27−9
@@ -1718,7 +1718,7 @@ widget(parent: ref Tk->Toplevel, ctxt: ref Draw->Context, cfg: array of string): · 1717 unmodified lines
17181718 tkcmds(top: ref Tk->Toplevel, a: array of string)
17191719 {
17201720 for(i := 0; i < len a; i++)
1721− v := tk->cmd(top, a[i]);
1721+ v := tkcmd(top, a[i]);
17221722 }
17231723
17241724 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 · 10 unmodified lines
17351735 if(write == 0)
17361736 tkcmd(t, "destroy .f.exitclean");
17371737 tkcmd(t, UPDATE);
1738+ tkclient->onscreen(t, "onscreen");
17381739 cmd := chan of string;
17391740 tk->namechan(t, cmd, "cmd");
1741+ tkclient->onscreen(t, "exact");
1742+ tkclient->startinput(t, "ptr"::nil);
1743+ for(;;) alt {
1744+ s := <-t.ctxt.ptr =>
1745+ tk->pointer(t, *s);
1746+ c := <-cmd =>
1747+ return c;
1748+ }
17401749 return <-cmd;
17411750 }
17421751
@@ -1843,17 +1852,26 @@ tageditor(ctxt: ref Draw->Context, f: ref File) · 100 unmodified lines
18431852 t := widget(f.tk, ctxt, cfg[0:i]);
18441853 cmd := chan of string;
18451854 tk->namechan(t, cmd, "cmd");
1855+ tkclient->onscreen(t, "exact");
1856+ tkclient->startinput(t, "kbd"::"ptr"::nil);
18461857
18471858 loop:
18481859 for(;;){
1849− case c := <-cmd {
1850− "ok" =>
1851− break loop;
1852− "cancel" =>
1853− return;
1854− * =>
1855− j = int c;
1856− set[j] = (tkcmd(t, "variable c"+c) == "1");
1860+ alt{
1861+ s := <-t.ctxt.kbd =>
1862+ tk->keyboard(t, s);
1863+ s := <-t.ctxt.ptr =>
1864+ tk->pointer(t, *s);
1865+ c := <-cmd =>
1866+ case c {
1867+ "ok" =>
1868+ break loop;
1869+ "cancel" =>
1870+ return;
1871+ * =>
1872+ j = int c;
1873+ set[j] = (tkcmd(t, "variable c"+c) == "1");
1874+ }
18571875 }
18581876 }
18591877 for(j=0; j<NEXTRA; j++){
dis/wm/brutus.dis+0−0

Binary file not shown.

lib9/getuser-Nt.c+2−3
@@ -3,7 +3,6 @@ · 2 unmodified lines
33 char*
44 getuser(void)
55 {
6− static char *user = 0;
7− user = "unknown";
8− return user;
6+ /* could do better, but result isn't really used */
7+ return "unknown";
98 }
man/9/text+1−1
@@ -376,7 +376,7 @@ first character on that display line. · 375 unmodified lines
376376 If this option is specified as an empty string, it cancels
377377 the option, leaving it unspecified for the tag (the default).
378378 If the option is specified as a non-empty string that is
379−an empty list, such as \f5-tags\0{\0}\fR, then it requests
379+an empty list, such as \f5-tabs\0{\0}\fR, then it requests
380380 default 8-character tabs as described for the \f5tabs\fR
381381 widget option.
382382 .TP