X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;f=pctb%2Fdictionary-manager;h=5904b4dfb7f57db8995510bb1d10c11fb67bd0ef;hb=664a9a255bb61dc84d6586487ab9ae9be41a84fd;hp=10c87a83c0ac7810f4700190d71a9d8f71e01fc0;hpb=12dab98558133719e1c624dd2d7bf7b5fa93ae07;p=ypp-sc-tools.web-live.git diff --git a/pctb/dictionary-manager b/pctb/dictionary-manager index 10c87a8..5904b4d 100755 --- a/pctb/dictionary-manager +++ b/pctb/dictionary-manager @@ -372,11 +372,13 @@ proc pixmap_maybe_ok {} { } proc pixmap_ok {} { global database ppm pixmap_selcol pixmap_selrow mainkind alloptions + + return_result_start foreach_pixmap_col col { .d.pe.grid.l$col configure -state disabled } .d.pe.ok configure -state disabled - helptext {{{ Processing }}} + manyset [lrange $alloptions [expr {$pixmap_selcol*3}] end] \ colname coldesc rows manyset [lrange $rows [expr {$pixmap_selrow*2}] end] \ @@ -385,7 +387,8 @@ proc pixmap_ok {} { debug "UPDATE PIXMAP AS >$result<" do_database_update $ppm $result - done/$mainkind + + return_result_done } proc required/pixmap {} { @@ -939,17 +942,17 @@ proc update_database/DELETE {l r ctxs} { } write_database } - + proc RETURN_RESULT {how what} { - global mainkind + return_result_start + place forget .d.csr.csr pack forget .d.csr.csr.e - helptext {{{ Processing }}} - unbind_all_keys - update idletasks + debug "$how $what" eval update_database/$how $what - done/$mainkind + + return_result_done } #========== server for approving updates ========== @@ -1274,6 +1277,16 @@ proc approve_show_page {delta} { #========== main program ========== +proc return_result_start {} { + helptext {{{ Processing }}} + unbind_all_keys + update idletasks +} +proc return_result_finish {} { + global mainkind + done/$mainkind +} + proc main/default {} { puts stderr "Do not run this program directly." exit 12