| @@ -1718,7 +1718,7 @@ widget(parent: ref Tk->Toplevel, ctxt: ref Draw->Context, cfg: array of string): · 1717 unmodified lines |
| 1718 | tkcmds(top: ref Tk->Toplevel, a: array of string) | 1718 | tkcmds(top: ref Tk->Toplevel, a: array of string) |
| 1719 | { | 1719 | { |
| 1720 | for(i := 0; i < len a; i++) | 1720 | for(i := 0; i < len a; i++) |
| 1721 | v := tk->cmd(top, a[i]); | 1721 | v := tkcmd(top, a[i]); |
| 1722 | } | 1722 | } |
| 1723 | | 1723 | |
| 1724 | confirm(ctxt: ref Draw->Context, parent: ref Tk->Toplevel, message: string, write: int): string | 1724 | 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 |
| 1735 | if(write == 0) | 1735 | if(write == 0) |
| 1736 | tkcmd(t, "destroy .f.exitclean"); | 1736 | tkcmd(t, "destroy .f.exitclean"); |
| 1737 | tkcmd(t, UPDATE); | 1737 | tkcmd(t, UPDATE); |
| | 1738 | tkclient->onscreen(t, "onscreen"); |
| 1738 | cmd := chan of string; | 1739 | cmd := chan of string; |
| 1739 | tk->namechan(t, cmd, "cmd"); | 1740 | 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 | } |
| 1740 | return <-cmd; | 1749 | return <-cmd; |
| 1741 | } | 1750 | } |
| 1742 | | 1751 | |
| @@ -1843,17 +1852,26 @@ tageditor(ctxt: ref Draw->Context, f: ref File) · 100 unmodified lines |
| 1843 | t := widget(f.tk, ctxt, cfg[0:i]); | 1852 | t := widget(f.tk, ctxt, cfg[0:i]); |
| 1844 | cmd := chan of string; | 1853 | cmd := chan of string; |
| 1845 | tk->namechan(t, cmd, "cmd"); | 1854 | tk->namechan(t, cmd, "cmd"); |
| | 1855 | tkclient->onscreen(t, "exact"); |
| | 1856 | tkclient->startinput(t, "kbd"::"ptr"::nil); |
| 1846 | | 1857 | |
| 1847 | loop: | 1858 | loop: |
| 1848 | for(;;){ | 1859 | for(;;){ |
| 1849 | case c := <-cmd { | 1860 | alt{ |
| 1850 | "ok" => | 1861 | s := <-t.ctxt.kbd => |
| 1851 | break loop; | 1862 | tk->keyboard(t, s); |
| 1852 | "cancel" => | 1863 | s := <-t.ctxt.ptr => |
| 1853 | return; | 1864 | tk->pointer(t, *s); |
| 1854 | * => | 1865 | c := <-cmd => |
| 1855 | j = int c; | 1866 | case c { |
| 1856 | set[j] = (tkcmd(t, "variable c"+c) == "1"); | 1867 | "ok" => |
| | 1868 | break loop; |
| | 1869 | "cancel" => |
| | 1870 | return; |
| | 1871 | * => |
| | 1872 | j = int c; |
| | 1873 | set[j] = (tkcmd(t, "variable c"+c) == "1"); |
| | 1874 | } |
| 1857 | } | 1875 | } |
| 1858 | } | 1876 | } |
| 1859 | for(j=0; j<NEXTRA; j++){ | 1877 | for(j=0; j<NEXTRA; j++){ |