startup_cursor
}
+proc approve_showentry_xinfo/char {w def} {
+ set unic [string2unicodenames $def]
+ label $w -text $unic
+}
+
#========== PIXMAPS ==========
#---------- pixmap database read and write ----------
}
}
+proc approve_showentry_xinfo/pixmap {w def} {
+ label $w -image image/empty
+}
+
#========== UPLOADS TO DICTIONARY SERVER ==========
proc upload_init {} {
set query [eval ::http::formatQuery $pl]
regsub -all {%0d} $query {} query
- debug "DB-UPDATE QUERY [string range $query 0 200]..."
+ debug "DB-UPDATE QUERY $query"
if {[regexp {^\.?/} $url]} {
set cmd [list $url $query]
focus .d.csr.csr.e
bind .d.csr.csr.e <Key-Return> {
set strq [.d.csr.csr.e get]
- if {[regexp -line {^(?:[!-[]|[]-~]|\\\\|\\x[0-9a-f]{2})+} $strq]} {
- RETURN_RESULT DEFINE "$cur_0 $cur_1 $strq"
+ if {[string length $strq]} {
+ RETURN_RESULT DEFINE [list $cur_0 $cur_1 $strq]
}
}
bind .d.csr.csr.e <Key-Escape> {
must_gets_exactly stdin confirmed
- if {![string compare pixmap $dict]} {
- set reqkind pixmap
- debug "DICT PIXMAP"
- } elseif {[regexp {^(char)([1-9]\d*)$} $dict dummy reqkind rows]} {
- debug "DICT CHAR rqk=$reqkind r=$rows."
- } else {
- error "$dict ?"
- }
+ manyset [dict2_reqkind_rows reqkind rows]
if {$yesno} {
read_database $dictdir/master-$dict.txt
}
}
+proc dict2_reqkind_rows {dict} {
+ if {![string compare pixmap $dict]} {
+ return {pixmap {}}
+ debug "DICT PIXMAP"
+ } elseif {[regexp {^(char)([1-9]\d*)$} $dict dummy reqkind rows]} {
+ debug "DICT CHAR rqk=$reqkind r=$rows."
+ return [list $reqkind rows]
+ } else {
+ error "$dict ?"
+ }
+}
+
proc chop_counted {var} {
upvar 1 $var val
global data
return [string compare $sv1 $sv2]
}
+proc string2unicodenames {str} {
+ return [exec perl -e {
+ use Unicode::CharName qw(uname);
+ $ARGV[0] =~ s/^ //;
+ foreach $_ (split //,$ARGV[0]) {
+ print uname(ord),"\n" or die $!
+ }
+ } " $str"]
+}
+
proc approve_showentry {ix file specdata} {
- global approve_ixes
+ global approve_ixes reqkind
approve_decompose_data $specdata
image create photo approve/$ix -data $ppm
label $wb-image -image approve/$ix -bd 2 -relief sunken
+ manyset [dict2_reqkind_rows $dict] reqkind
+ approve_showentry_xinfo/$reqkind $wb-xinfo $def
+
+ if {$ix} {
+ label $wb-div -bd 1 -relief sunken -image image/empty
+ grid configure $wb-div -columnspan 5 -sticky ew -padx 5
+ }
+
frame $wb-act
button $wb-act.rej -text Reject -command [list approve_reject $ix]
pack $wb-act.rej
- grid $wb-def $wb-image $wb-act $wb-inf -padx 3
+ grid $wb-def $wb-image $wb-xinfo $wb-act $wb-inf -padx 3
grid configure $wb-image -ipadx 3 -ipady 3 -sticky w
lappend approve_ixes $ix
pack .right -side right
pack .ok -side bottom
+ image create bitmap image/empty
+
set approve_page 0
approve_fetch_list
}