chiark / gitweb /
Default cursor is LH one
[ypp-sc-tools.web-live.git] / pctb / dictionary-manager
index 7091964c779a6eb6f09989a2ea44e275a5826fff..c1e983b6b35e7c65d2ea9223f4413b5c52936b22 100755 (executable)
@@ -42,7 +42,7 @@
 #  if it wrote a byte to fd 4, it can take another question
 
 
-set aadepth 3
+set aadepth 2
 
 
 #---------- library routines ----------
@@ -517,7 +517,7 @@ proc upload_status {} {
 }
 
 proc maybe_upload_entry {im def} {
-    global reqkind privacy_setting env dbname quiet
+    global reqkind privacy_setting env dbname quiet aadepth
 
     debug "DB-UPDATE PRIVACY $privacy_setting"
     if {!$privacy_setting} return
@@ -526,6 +526,8 @@ proc maybe_upload_entry {im def} {
 
     set pl {}
     lappend pl dict $dbname
+    lappend pl version 3
+    lappend pl depth $aadepth
 
     if {$privacy_setting>=2} {
        set pirate [string totitle $env(YPPSC_PIRATE)]
@@ -693,9 +695,11 @@ proc char_read_pgm {f} {
        append o $ointerl
     }
 
-#    debug "DATA $o"
-    set data [exec pnmscale 1 << $o]
-    image create photo image/main -data $data
+    debug "DATA1 $o"
+    set tmpfile ./#dictimage#.tmp
+    exec pnmscale 1 << $o >$tmpfile
+    image create photo image/main -file $tmpfile
+    file delete $tmpfile
 }
 
 #---------- character set editor display ----------
@@ -727,7 +731,7 @@ proc startup_cursor {} {
     global glyphsdone unk_l unk_r
     
     set cur_already [expr {[llength $glyphsdone]/5-1}]
-    set cur_mode 1 ;# one of:   0 1 already text
+    set cur_mode 0 ;# one of:   0 1 already text
 
     set cur_0 $unk_l
     set cur_1 [expr {$unk_r+1}]
@@ -768,7 +772,7 @@ proc recursor//01 {z1} {
        if {[lsearch -exact $okctxts $ctx] >= 0} {
            bind_key [string tolower $key] "
                [list set new_context $ctx]
-                recursor
+               char_start_define_text
             "
        } else {
            bind_key [string tolower $key] {}
@@ -776,7 +780,7 @@ proc recursor//01 {z1} {
        lappend context_help $key
     }
     set context_help [list [join $context_help " "] \
-                         {Set match context for new glyph.}]
+      {Set match context for new glyph, confirm location, and start entry.}]
 
     bind_key space { othercursor }
     bind_leftright_q cur_$z1 0 [expr {$cols-1}]
@@ -1150,7 +1154,7 @@ proc approve_decompose_data {specdata} {
     uplevel 1 chop_counted key
     uplevel 1 chop_counted val
 
-    return [uplevel 1 {list $dict $def $image}]
+    return [uplevel 1 {list $dict $ctx $def $image}]
 }
 
 proc approve_compare {fd1 fd2} {
@@ -1245,6 +1249,8 @@ proc approve_check_server {} {
 
 proc approve_confirm {} {
     global approve_ixes approve_entryhow
+    .ok configure -state disabled
+    update idletasks
     approve_check_server
     foreach ix $approve_ixes {
        set how $approve_entryhow($ix)
@@ -1279,6 +1285,7 @@ proc approve_fetch_list {} {
 
     set approve_list [lsort -command approve_compare $approve_list]
     approve_show_page 0
+    .ok configure -state normal
 }
 
 proc main/approve {} {