Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | minor improvements in TkMC, classview, and tklib |
---|---|
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
b4efd654bb9a400aa98aa90b69d56b98 |
User & Date: | chw 2017-01-18 19:01:42.947 |
Context
2017-01-18
| ||
19:02 | add tk upstream changes check-in: b14ab4a142 user: chw tags: trunk | |
19:01 | minor improvements in TkMC, classview, and tklib check-in: b4efd654bb user: chw tags: trunk | |
12:21 | add tcl upstream changes check-in: 18dce1d5e2 user: chw tags: trunk | |
Changes
Changes to assets/TkMC1.0/tkmc.tcl.
︙ | ︙ | |||
107 108 109 110 111 112 113 | #Format file size proc fmtfsize {size} { if {$size < 0} { set size [expr {0 - $size}] } if {$size > 1024*1024*1024} { | | | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | #Format file size proc fmtfsize {size} { if {$size < 0} { set size [expr {0 - $size}] } if {$size > 1024*1024*1024} { set size [format "%2.2f GB" [expr {($size/1024.0)/1024.0/1024.0]}] } elseif { $size > 1024*1024} { set size [format "%2.2f MB" [expr {($size/1024.0)/1024.0}]] } elseif {$size > 1024*100} { set size [format "%2.2f kB" [expr {$size/1024.0}]] } return $size } |
︙ | ︙ | |||
138 139 140 141 142 143 144 | focus $w } } #Entry history namespace eval history { proc add? {w} { | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | focus $w } } #Entry history namespace eval history { proc add? {w} { variable $w variable n$w upvar 0 $w hist set s [set ::[$w cget -textvariable]] if {$s eq ""} return if {$s ne [lindex $hist end]} { lappend hist $s set n$w [llength $hist] } } proc move {w where} { variable $w variable n$w upvar 0 $w hist incr n$w $where if {[set n$w]<0} {set n$w 0} if {[set n$w]>=[llength $hist]+1} { set n$w [llength $hist] } set ::[$w cget -textvar] [lindex $hist [set n$w]] $w icursor end } proc for {type name args} { switch -- $type { entry { uplevel \#0 $type $name $args bind $name <Up> {history::move %W -1} bind $name <Down> {history::move %W 1} bind $name <Next> {history::move %W 99999} bind $name <Return> {history::add? %W} variable $name {} variable n$name 0 } default {error "usage: history::for entry <w> <args>"} } } } frame .top frame .top.f pack .top.f -fill x -expand true -side left foreach x [file volume] { |
︙ | ︙ | |||
235 236 237 238 239 240 241 242 243 244 245 246 247 248 | .bot.t delete 1.0 end ; .bot.t insert end [exec_cmd [.bot.comm get]] ; .bot.comm delete 0 end ; focus_if . .bot.comm } bind .bot.comm <Enter> {focus_if . .bot.comm} #Disable focus on these entries bind .bot.2.e_l <1> break bind .bot.2.e_l <<PasteSelection>> break bind .bot.2.e_r <1> break bind .bot.2.e_r <<PasteSelection>> break | > > > > > > | 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 | .bot.t delete 1.0 end ; .bot.t insert end [exec_cmd [.bot.comm get]] ; .bot.comm delete 0 end ; focus_if . .bot.comm } bind .bot.comm <Enter> {focus_if . .bot.comm} #Swap <Control-Tab> and <Tab> bindings in main text widget bind .bot.t <Control-Tab> [bind Text <Tab>] bind .bot.t <Control-Tab> {+ ; break} bind .bot.t <Tab> [bind Text <Control-Tab>] bind .bot.t <Tab> {+ ; break} #Disable focus on these entries bind .bot.2.e_l <1> break bind .bot.2.e_l <<PasteSelection>> break bind .bot.2.e_r <1> break bind .bot.2.e_r <<PasteSelection>> break |
︙ | ︙ | |||
433 434 435 436 437 438 439 | #Left scroolbar and procs to scroll ttk::scrollbar .sy -orient vert -command {lb_set yview} pack .sy -fill y -after .time -side left proc lb_set args { foreach lb {.l .sz .time} { | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 | #Left scroolbar and procs to scroll ttk::scrollbar .sy -orient vert -command {lb_set yview} pack .sy -fill y -after .time -side left proc lb_set args { foreach lb {.l .sz .time} { $lb {*}$args } } proc lb_scroll args { .sy set {*}$args lb_set yview moveto [lindex $args 0] } foreach lb {.l .sz .time} { bind $lb <ButtonPress-1> { lb_set select clear 0 end lb_set select set [%W nearest %y] lb_set activate [%W nearest %y] .bot.2.e_l delete 0 end .bot.2.e_l insert end [.l get [.l curselection]] break } bind $lb <B1-Motion> { lb_set select clear 0 end lb_set select set [%W nearest %y] lb_set activate [%W nearest %y] lb_set see [%W nearest %y] .bot.2.e_l delete 0 end .bot.2.e_l insert end [.l get [.l curselection]] break } bind $lb <ButtonRelease-1> { lb_set select clear 0 end lb_set select set [%W nearest %y] lb_set activate [%W nearest %y] .bot.2.e_l delete 0 end .bot.2.e_l insert end [.l get [.l curselection]] break } } unset lb #Right scroolbar and proc for scroll ttk::scrollbar .sy_r -orient vert -command {lb_set_r yview} pack .sy_r -fill y -after .time_r -side right proc lb_set_r args { foreach lb_r {.l_r .sz_r .time_r} { $lb_r {*}$args } } proc lb_scroll_r args { .sy_r set {*}$args lb_set_r yview moveto [lindex $args 0] } foreach lb_r {.l_r .sz_r .time_r} { bind $lb_r <ButtonPress-1> { lb_set_r select clear 0 end lb_set_r select set [%W nearest %y] lb_set_r activate [%W nearest %y] .bot.2.e_r delete 0 end .bot.2.e_r insert end [.l_r get [.l_r curselection]] break } bind $lb_r <B1-Motion> { lb_set_r select clear 0 end lb_set_r select set [%W nearest %y] lb_set_r activate [%W nearest %y] lb_set_r see [%W nearest %y] .bot.2.e_r delete 0 end .bot.2.e_r insert end [.l_r get [.l_r curselection]] break } bind $lb_r <ButtonRelease-1> { lb_set_r select clear 0 end lb_set_r select set [%W nearest %y] lb_set_r activate [%W nearest %y] .bot.2.e_r delete 0 end .bot.2.e_r insert end [.l_r get [.l_r curselection]] break } } unset lb_r #Show file names on bottom entry right and left #Scroll selected lines in all listboxes in left |
︙ | ︙ | |||
587 588 589 590 591 592 593 | set dir [$fake get] set fileex [file join $dir [$w get active]] if {[file isdirectory $fileex]} { tk_messageBox -parent . -title "Error" -type ok \ -icon error -message "This is a directory" } else { editor | | | | > > | 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 | set dir [$fake get] set fileex [file join $dir [$w get active]] if {[file isdirectory $fileex]} { tk_messageBox -parent . -title "Error" -type ok \ -icon error -message "This is a directory" } else { editor set f [open $fileex] .ed.text.t delete 1.0 end .ed.text.t insert end [read $f] close $f .ed.text.t mark set insert 1.0 .ed.text.t see insert .fake_ed delete 0 end .fake_ed insert end $fileex } } #Change left directory list proc read_left {} { set old_dir [.fake_l get] set dir [file norm [file join $old_dir [.l get active]]] |
︙ | ︙ | |||
673 674 675 676 677 678 679 | proc copy_file_to_r {} { set file_l [.l get active] set left_dir [.fake_l get] set right_dir [.fake_r get] set choice [tk_messageBox -parent . -type yesno -default yes \ -message "Copy\n [file native [file join $left_dir $file_l]] \nto\n \ | | < | < | | 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 | proc copy_file_to_r {} { set file_l [.l get active] set left_dir [.fake_l get] set right_dir [.fake_r get] set choice [tk_messageBox -parent . -type yesno -default yes \ -message "Copy\n [file native [file join $left_dir $file_l]] \nto\n \ [file native $right_dir]" -icon question] if {$choice eq "yes"} { if {[file isdirectory [file join $left_dir $file_l]]} { file copy -force [file join $left_dir $file_l] $right_dir } else { file copy [file join $left_dir $file_l] $right_dir } refresh_right refresh_left } } proc copy_file_to_l {} { set file_r [.l_r get active] set left_dir [.fake_l get] set right_dir [.fake_r get] set choice [tk_messageBox -parent . -type yesno -default yes \ -message "Copy\n [file native [file join $right_dir $file_r]] \nto\n \ [file native $left_dir]" -icon question] if {$choice eq "yes"} { if {[file isdirectory [file join $right_dir $file_r]]} { file copy -force [file join $right_dir $file_r] $left_dir; } else { file copy [file join $right_dir $file_r] $left_dir } refresh_left refresh_right } } |
︙ | ︙ | |||
737 738 739 740 741 742 743 | bind .move.e <Return> $cmd } proc delete_file_l {} { set file_l [.l get active] set left_dir [.fake_l get] if {[file isdirectory [file join $left_dir $file_l]]} { | | | | | | | | | | | | | | | | 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 | bind .move.e <Return> $cmd } proc delete_file_l {} { set file_l [.l get active] set left_dir [.fake_l get] if {[file isdirectory [file join $left_dir $file_l]]} { set question [tk_messageBox -type okcancel -default cancel \ -message " Delete directory and files in \n [file native $left_dir/$file_l]" \ -icon question] switch -- $question { ok { file delete -force [file join $left_dir $file_l] refresh_left refresh_right } } } else { set question [tk_messageBox -type okcancel -default cancel \ -message " Delete files \n [file native $left_dir/$file_l]" \ -icon question] switch -- $question { ok { file delete [file join $left_dir $file_l] refresh_left refresh_right } } } } proc delete_file_r {} { set file_r [.l_r get active] set right_dir [.fake_r get] if {[file isdirectory [file join $right_dir $file_r]]} { set question [tk_messageBox -type okcancel -default cancel \ -message " Delete directory and files in \n [file native $right_dir/$file_r] " \ -icon question] switch -- $question { ok { file delete -force [file join $right_dir $file_r] refresh_right refresh_left } } } else { set question [tk_messageBox -type okcancel -default cancel \ -message " Delete files \n [file native $right_dir/$file_r]" \ -icon question] switch -- $question { ok { file delete [file join $right_dir $file_r] refresh_right refresh_left } } } } proc mk_dir {w} { catch [destroy .mkdir] toplevel .mkdir wm resizable .mkdir 0 0 |
︙ | ︙ | |||
893 894 895 896 897 898 899 | refresh_left proc refresh_right {} { set right_dir [.fake_r get] set cur [.l_r curselection] if {$cur eq ""} { | | | | | 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 | refresh_left proc refresh_right {} { set right_dir [.fake_r get] set cur [.l_r curselection] if {$cur eq ""} { .l_r selection set 0 .sz_r selection set 0 .time_r selection set 0 .l_r see 0 .l_r activate 0 } else { read_dir_r $right_dir .l_r selection set $cur .sz_r selection set $cur .time_r selection set $cur .l_r see $cur .l_r activate $cur |
︙ | ︙ | |||
1079 1080 1081 1082 1083 1084 1085 | "Last modified" [date_time $a(mtime)]\ "Last accessed" [date_time $a(atime)]\ ] foreach {name value} [file attr $pathname] { if {[string match "-*compsize" $name]} { continue } | | | | | | | | | | | | | 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 | "Last modified" [date_time $a(mtime)]\ "Last accessed" [date_time $a(atime)]\ ] foreach {name value} [file attr $pathname] { if {[string match "-*compsize" $name]} { continue } if {[regexp {^[01]$} $value]} { lappend checkbuttons $name $value } else { lappend textual $name [file nativename $value] } } set n 0 foreach {name value} $textual { grid [label $w.${n}n -text $name:] [label $w.${n}v -text $value]\ -sticky w -padx $padx incr n } grid [hr $w.$n] -sticky we -columnspan 2 -padx $padx -pady 6 set n0 [incr n] foreach {name value} $checkbuttons { incr n set ::${w}($name) $value grid [checkbutton $w.$n -text $name -var ${w}($name) -borderwidth 0] \ -sticky w -column 1 -padx $padx } if {[llength $checkbuttons]} { grid [label $w.att -text Attributes:]\ -row $n0 -sticky w -padx $padx grid [hbuttons $w.b [list OK [subst { fileprop_apply $w |
︙ | ︙ | |||
1126 1127 1128 1129 1130 1131 1132 | focus $w } proc fileprop_apply {w} { upvar #0 $w a set cmd [list file attributes [file join $a(dir) $a(file)]] foreach {name value} [array get a] { | | | | | 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 | focus $w } proc fileprop_apply {w} { upvar #0 $w a set cmd [list file attributes [file join $a(dir) $a(file)]] foreach {name value} [array get a] { if {[regexp {^-} $name]} { lappend cmd $name $value } } {*}$cmd } proc hbuttons {w tc} { frame $w set n 1 foreach {t c} $tc { button $w.$n -text $t -command $c -width 8 incr n } pack {*}[winfo children $w] -side left -padx 3 -pady 6 \ -fill x -anchor e return $w } proc hr {w} { |
︙ | ︙ | |||
1198 1199 1200 1201 1202 1203 1204 | set w .img_$img toplevel $w wm title $w $fileex wm minsize $w 100 100 set width [image width $img] set height [image height $img] canvas $w.c -relief sunken -bd 1 -highlightthickness 0 \ | | | | 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 | set w .img_$img toplevel $w wm title $w $fileex wm minsize $w 100 100 set width [image width $img] set height [image height $img] canvas $w.c -relief sunken -bd 1 -highlightthickness 0 \ -yscrollcommand [list $w.scr set] \ -xscrollcommand [list $w.xscr set] ttk::scrollbar $w.scr -orient vert -command [list $w.c yview] ttk::scrollbar $w.xscr -orient horiz -command [list $w.c xview] $w.c create image 0 0 -image $img -anchor nw grid $w.c -column 0 -row 0 -sticky nswe grid $w.scr -column 1 -row 0 -sticky ns grid $w.xscr -column 0 -row 1 -sticky we grid columnconfig $w 0 -weight 1 |
︙ | ︙ | |||
1237 1238 1239 1240 1241 1242 1243 | } set cmd $last[set last {}] } if {$cmd ne {}} { append logical $cmd } if {$logical ne {}} { | | | 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 | } set cmd $last[set last {}] } if {$cmd ne {}} { append logical $cmd } if {$logical ne {}} { lappend words $logical } return $words } #Run command from entry proc exec_cmd {command} { set result " " |
︙ | ︙ | |||
1266 1267 1268 1269 1270 1271 1272 | } } } #Run tcl from text widget proc run_tcl {scriptname w} { if {[interp exists eval_env]} { | | | < > | | | | | | | | | | | < | | | | | | | | | < | < < | < | < | | | | | | | | | | | | 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 | } } } #Run tcl from text widget proc run_tcl {scriptname w} { if {[interp exists eval_env]} { interp delete eval_env tailcall run_tcl $scriptname $w } interp create eval_env load {} Tk eval_env if {([info command sdltk] eq "sdltk") && [sdltk android]} { load {} Borg eval_env } set all [$w get 1.0 end] eval_env eval [list set argv0 $scriptname] eval_env eval [list set argv {}] eval_env eval [list info script $scriptname] eval_env eval {proc exit args {destroy .}} eval_env eval $all } proc editor {} { catch [destroy .ed] toplevel .ed wm resizable .ed 0 0 wm title .ed "TkMC Editor" menu .ed.menubar -relief raised -borderwidth 1 menu .ed.menubar.file -tearoff 0 .ed.menubar add cascade -label "File" -menu .ed.menubar.file -underline 0 .ed.menubar.file add command -label "New" \ -command {clear_all .ed.text.t ; .fake_ed delete 0 end} .ed.menubar.file add command -label "Open" \ -command {clear_all .ed.text.t ; text_open} .ed.menubar.file add command -label "Close" \ -command {clear_all .ed.text.t ; .fake_ed delete 0 end} .ed.menubar.file add command -label "Save as..." \ -command {text_saveas} .ed.menubar.file add command -label "Exit" \ -command {bell ; prompt_close .ed} .ed.menubar add cascade -label "Edit" -menu .ed.menubar.editt -underline 0 menu .ed.menubar.editt -tearoff 0 .ed.menubar.editt add command -label "Select All" \ -command {.ed.text.t tag add sel 1.0 end} .ed.menubar.editt add command -label "Copy" \ -command {tk_textCopy .ed.text.t} .ed.menubar.editt add command -label "Paste" \ -command {tk_textPaste .ed.text.t} .ed.menubar.editt add command -label "Cut" \ -command {tk_textCut .ed.text.t} .ed.menubar.editt add command -label "Clear" \ -command {clear_all .ed.text.t ; .fake_ed delete 0 end} .ed.menubar add cascade -label "Test Tcl" \ -menu .ed.menubar.run -underline 0 menu .ed.menubar.run -tearoff 0 .ed.menubar.run add command -label "Run Tcl" \ -command {run_tcl [.fake_ed get] .ed.text.t} .ed.menubar add cascade -label "Help" -menu .ed.menubar.help -underline 0 menu .ed.menubar.help -tearoff 0 .ed.menubar.help add command -label "Help" -command about .ed.menubar.help add command -label "About" -command about .ed conf -menu .ed.menubar proc clear_all {w} { $w delete 1.0 end } proc text_open {{fn ""}} { set types { {{All Files} *} {{Text Files} {.txt}} } if {$fn eq "" && ([catch {tk_getOpenFile -filetypes $types -parent .ed \ -title "Source File" -parent .ed} fn] || $fn eq "")} { return } set f [open $fn] .ed.text.t insert end [read $f] close $f .ed.text.t mark set insert 1.0 .ed.text.t see insert .fake_ed delete 0 end .fake_ed insert end $fn } # Handles window manager Close choice. proc prompt_close {w} { # If main window, prompt. if {$w eq "."} { set result [tk_messageBox -parent .ed \ -title {Exit?} -type yesno\ -icon warning \ -message "Do you really want to quit?"] if {$result eq "yes"} { destroy .ed } } else { # Not the main window, destroy it. destroy $w } } wm protocol .ed WM_DELETE_WINDOW {prompt_close .ed} #save as command proc text_saveas {} { set types { {{Tcl Files} {.tcl}} {{Text Files} {.txt}} {{All Files} *} } set filename [tk_getSaveFile -parent .ed -title "Save as..." -filetypes $types] if {$filename ne ""} { set file_open [open $filename w] puts -nonewline $file_open [.ed.text.t get 1.0 end] close $file_open refresh_left refresh_right } |
︙ | ︙ | |||
1666 1667 1668 1669 1670 1671 1672 | frame .ed.menubuttons pack .ed.menubuttons -side top -fill x button .ed.menubuttons.new -image imnew -takefocus 0 \ -command {clear_all .ed.text.t} button .ed.menubuttons.open -image imopen -takefocus 0 -command { clear_all .ed.text.t | | | | 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 | frame .ed.menubuttons pack .ed.menubuttons -side top -fill x button .ed.menubuttons.new -image imnew -takefocus 0 \ -command {clear_all .ed.text.t} button .ed.menubuttons.open -image imopen -takefocus 0 -command { clear_all .ed.text.t text_open } button .ed.menubuttons.save -image imsave -takefocus 0 -command text_saveas button .ed.menubuttons.selectall -image imselectall \ -height $ih -width $iw \ -takefocus 0 -command {.ed.text.t tag add sel 1.0 end} button .ed.menubuttons.copy -image imcopy -takefocus 0 \ -command {tk_textCopy .ed.text.t} button .ed.menubuttons.cut -image imcut -takefocus 0 \ -command {tk_textCut .ed.text.t} |
︙ | ︙ | |||
1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 | ttk::scrollbar .ed.text.scrl -command {.ed.text.t yview} ttk::scrollbar .ed.text.scrl2 -command {.ed.text.t xview} -orient horiz grid .ed.text.scrl -column 1 -row 0 -sticky ns grid .ed.text.scrl2 -column 0 -row 1 -sticky we grid .ed.text.t -column 0 -row 0 -sticky nswe -padx 2 -pady 2 pack .ed.text -side left -fill both -expand true focus .ed.text.t } proc about {} { catch [destroy .about] toplevel .about wm resizable .about 0 0 wm transient .about . | > | 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 | ttk::scrollbar .ed.text.scrl -command {.ed.text.t yview} ttk::scrollbar .ed.text.scrl2 -command {.ed.text.t xview} -orient horiz grid .ed.text.scrl -column 1 -row 0 -sticky ns grid .ed.text.scrl2 -column 0 -row 1 -sticky we grid .ed.text.t -column 0 -row 0 -sticky nswe -padx 2 -pady 2 pack .ed.text -side left -fill both -expand true focus .ed.text.t .fake_ed delete 0 end } proc about {} { catch [destroy .about] toplevel .about wm resizable .about 0 0 wm transient .about . |
︙ | ︙ |
Changes to assets/classview0.1/classview.tcl.
︙ | ︙ | |||
387 388 389 390 391 392 393 | append chunk " \\\n [list $name] [list $val]" } } append chunk "\n" } catch { set wman [winfo manager [list $win]] | | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 | append chunk " \\\n [list $name] [list $val]" } } append chunk "\n" } catch { set wman [winfo manager [list $win]] if {($wman eq "place") || ($wman eq "pack") || ($wman eq "grid")} { set opts [[list $wman] info [list $win]] if {[llength $opts]} { append chunk "[list $wman] configure [list $win]" foreach {name val} $opts { append chunk " \\\n [list $name] [list $val]" } append chunk "\n" } } } catch { # panedwindow geometry manager foreach child [$win panes] { if {[catch {$win paneconfigure $child} opts]} { if {[catch {$win pane $child} opts]} { set opts {} } else { set pcmd "pane" } } else { set pcmd "paneconfigure" } if {[llength $opts]} { append chunk "[list $win] $pcmd [list $child]" foreach {name val} $opts { append chunk " \\\n [list $name] [list $val]" } append chunk "\n" } } } catch { # notebook geometry manager foreach child [$win tabs] { set opts [$win tab $child] if {[llength $opts]} { append chunk "[list $win] tab [list $child]" foreach {name val} $opts { append chunk " \\\n [list $name] [list $val]" } append chunk "\n" } } } |
︙ | ︙ |
Changes to assets/tklib0.6/ico/ico.tcl.
︙ | ︙ | |||
550 551 552 553 554 555 556 | set img [image create photo $name -width $w -height $h] } else { set img [image create photo -width $w -height $h] } if {0} { # if image supported "" colors as transparent pixels, # we could use this much faster op | | | | 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 | set img [image create photo $name -width $w -height $h] } else { set img [image create photo -width $w -height $h] } if {0} { # if image supported "" colors as transparent pixels, # we could use this much faster op $img put $colors -to 0 0 } else { for {set x 0} {$x < $w} {incr x} { for {set y 0} {$y < $h} {incr y} { set clr [lindex $colors $y $x] if {$clr ne ""} { $img put $clr -to $x $y } } } } return $img } |
︙ | ︙ |
Changes to assets/tklib0.6/ico/ico0.tcl.
︙ | ︙ | |||
393 394 395 396 397 398 399 | set img [image create photo $name -width $w -height $h] } else { set img [image create photo -width $w -height $h] } if {0} { # if image supported "" colors as transparent pixels, # we could use this much faster op | | | | 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 | set img [image create photo $name -width $w -height $h] } else { set img [image create photo -width $w -height $h] } if {0} { # if image supported "" colors as transparent pixels, # we could use this much faster op $img put $colors -to 0 0 } else { for {set x 0} {$x < $w} {incr x} { for {set y 0} {$y < $h} {incr y} { set clr [lindex $colors $y $x] if {$clr ne ""} { $img put $clr -to $x $y } } } } return $img } |
︙ | ︙ |
Changes to assets/tklib0.6/khim/cs.msg.
︙ | ︙ | |||
64 65 66 67 68 69 70 | ::msgcat::mcset cs {Apply} "PouΕΎΓt" ::msgcat::mcset cs {Cancel} "ZruΕ‘it" ::msgcat::mcset cs {Change} "ZmΔnit" | | | | 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | ::msgcat::mcset cs {Apply} "PouΕΎΓt" ::msgcat::mcset cs {Cancel} "ZruΕ‘it" ::msgcat::mcset cs {Change} "ZmΔnit" ::msgcat::mcset cs {Character:} "Znak:" ::msgcat::mcset cs {Compose Key} "MrtvΓ‘ klΓ‘vesa" ::msgcat::mcset cs {Compose key:} "MrtvΓ‘ klΓ‘vesa:" ::msgcat::mcset cs {Composed sequence must be two characters long} \ "VklΓ‘danΓ½ znak je vΕΎdy Ε‘loΕΎen z posloupnosti zdvou nzakΕ―" ::msgcat::mcset cs {Delete} "Smazat" ::msgcat::mcset cs {Help...} "NΓ‘povΔda..." ::msgcat::mcset cs {Input key sequence:} "Zadajete posloupnost klΓ‘ves:" ::msgcat::mcset cs {Insert Character} "VklΓ‘danΓ½ znak" ::msgcat::mcset cs {Invalid sequence} "ChybnΓ‘ posloupnost" ::msgcat::mcset cs {Key sequences} "Posloupnosti klΓ‘ves" |
︙ | ︙ |
Changes to assets/tklib0.6/khim/da.msg.
︙ | ︙ | |||
17 18 19 20 21 22 23 | ::msgcat::mcset da {Apply} {Anvend} ::msgcat::mcset da {Cancel} {Annuller} ::msgcat::mcset da {Change} {Ζndre} | | | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | ::msgcat::mcset da {Apply} {Anvend} ::msgcat::mcset da {Cancel} {Annuller} ::msgcat::mcset da {Change} {Ζndre} ::msgcat::mcset da {Character:} {Tegn:} ::msgcat::mcset da {Compose Key} {Compose taste} ::msgcat::mcset da {Compose key:} {Compose taste:} ::msgcat::mcset da {Composed sequence must be two characters long} \ {Compose tegnfψlgen skal bestε af to tegn} |
︙ | ︙ | |||
69 70 71 72 73 74 75 | et symbol fra et andet program eller benytte "Unicode..." knappen (eller trykke "Compose" tasten to gange) for at hente et symbol fra tabellen med alle unicode koder. Tryk pε "Slet" knappen for at fjerne en tegnfψlge. } | | | 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | et symbol fra et andet program eller benytte "Unicode..." knappen (eller trykke "Compose" tasten to gange) for at hente et symbol fra tabellen med alle unicode koder. Tryk pε "Slet" knappen for at fjerne en tegnfψlge. } ::msgcat::mcset da {Input key sequence:} {Indtast tegnfψlge:} ::msgcat::mcset da {Insert Character} {Indtast et tegn} ::msgcat::mcset da {Invalid sequence} {Ugyldig tegnfψlge} ::msgcat::mcset da {Key sequences} {Tegnfψlger} |
︙ | ︙ |
Changes to assets/tklib0.6/khim/de.msg.
︙ | ︙ | |||
80 81 82 83 84 85 86 | ::msgcat::mcset de {Apply} {Anwenden} ::msgcat::mcset de {Cancel} {Abbrechen} ::msgcat::mcset de {Change} {Γndern} | | | | 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | ::msgcat::mcset de {Apply} {Anwenden} ::msgcat::mcset de {Cancel} {Abbrechen} ::msgcat::mcset de {Change} {Γndern} ::msgcat::mcset de {Character:} {Zeichen:} ::msgcat::mcset de {Compose Key} {Kombinier-Taste} ::msgcat::mcset de {Compose key:} {Kombinier-Taste:} ::msgcat::mcset de {Composed sequence must be two characters long} \ {Die Eingabezeichenfolge muΓ aus zwei Zeichen bestehen} ::msgcat::mcset de {Delete} {LΓΆschen} ::msgcat::mcset de {Help...} {Hilfe...} ::msgcat::mcset de {Input key sequence:} {Eingabezeichenfolge:} ::msgcat::mcset de {Insert Character} {Zeichen einfΓΌgen} ::msgcat::mcset de {Invalid sequence} {UngΓΌltige Zeichenfolge} ::msgcat::mcset de {Key sequences} {Zeichenfolgen} |
︙ | ︙ |
Changes to assets/tklib0.6/khim/en.msg.
︙ | ︙ | |||
70 71 72 73 74 75 76 | ::msgcat::mcset en {Apply} {Apply} ::msgcat::mcset en {Cancel} {Cancel} ::msgcat::mcset en {Change} {Change} | | | | 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | ::msgcat::mcset en {Apply} {Apply} ::msgcat::mcset en {Cancel} {Cancel} ::msgcat::mcset en {Change} {Change} ::msgcat::mcset en {Character:} {Character:} ::msgcat::mcset en {Compose Key} {Compose Key} ::msgcat::mcset en {Compose key:} {Compose key:} ::msgcat::mcset en {Composed sequence must be two characters long} \ {Composed sequence must be two characters long} ::msgcat::mcset en {Delete} {Delete} ::msgcat::mcset en {KHIM Help} {KHIM Help} ::msgcat::mcset en {Help...} {Help...} ::msgcat::mcset en {Input key sequence:} {Input key sequence:} ::msgcat::mcset en {Insert Character} {Insert Character} ::msgcat::mcset en {Invalid sequence} {Invalid sequence} ::msgcat::mcset en {Key sequences} {Key sequences} |
︙ | ︙ |
Changes to assets/tklib0.6/khim/es.msg.
︙ | ︙ | |||
68 69 70 71 72 73 74 | ::msgcat::mcset es {Apply} {Aplicar} ::msgcat::mcset es {Cancel} {Cancelar} ::msgcat::mcset es {Change} {Cambiar} | | | | 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | ::msgcat::mcset es {Apply} {Aplicar} ::msgcat::mcset es {Cancel} {Cancelar} ::msgcat::mcset es {Change} {Cambiar} ::msgcat::mcset es {Character:} {CarΓ‘cter:} ::msgcat::mcset es {Compose Key} {Tecla Componer} ::msgcat::mcset es {Compose key:} {Tecla Componer:} ::msgcat::mcset es {Composed sequence must be two characters long} \ {La secuencia de composiciΓ³n debe ser de dos teclas} ::msgcat::mcset es {Delete} {Borrar} ::msgcat::mcset es {KHIM Help} {Ayuda de KHIM} ::msgcat::mcset es {Help...} {Ayuda...} ::msgcat::mcset es {Input key sequence:} {Secuencia de teclas de entrada:} ::msgcat::mcset es {Insert Character} {Insertar carΓ‘cter} ::msgcat::mcset es {Invalid sequence} {Secuencia invΓ‘lida} ::msgcat::mcset es {Key sequences} {Secuencias de teclas} |
︙ | ︙ |
Changes to assets/tklib0.6/khim/khim.tcl.
︙ | ︙ | |||
18 19 20 21 22 23 24 | # use and redistribution of this file, and a DISCLAIMER OF ALL WARRANTEES. # # $Id: khim.tcl,v 1.10 2007/06/08 19:24:31 kennykb Exp $ # $Source: /home/rkeene/tmp/cvs2fossil/tcllib/tklib/modules/khim/khim.tcl,v $ # #---------------------------------------------------------------------- | | | > | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | # use and redistribution of this file, and a DISCLAIMER OF ALL WARRANTEES. # # $Id: khim.tcl,v 1.10 2007/06/08 19:24:31 kennykb Exp $ # $Source: /home/rkeene/tmp/cvs2fossil/tcllib/tklib/modules/khim/khim.tcl,v $ # #---------------------------------------------------------------------- package require Tcl 8.5 package require Tk 8.5 package require msgcat 1.2 package require autoscroll 1.0 package require tile package provide khim 1.0.1 namespace eval khim [list variable KHIMDir [file dirname [info script]]] namespace eval khim { |
︙ | ︙ | |||
88 89 90 91 92 93 94 95 96 97 98 99 100 101 | # the character map variable CMapYL; # Array whose keys are the path names # of KHIM character map dialogs and # whose values are the # Y co-ordinates of the rows in the # character map. } # Load up message catalogs for the locale namespace eval khim [list ::msgcat::mcload [file dirname [info script]]] # Compressed table of which Unicode code points in the BMP are printable | > > > > | 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | # the character map variable CMapYL; # Array whose keys are the path names # of KHIM character map dialogs and # whose values are the # Y co-ordinates of the rows in the # character map. variable CMapMaxPage 0; # Maximum number code pages supported # 0x100 for BMP # 0x1100 for full Unicode range } # Load up message catalogs for the locale namespace eval khim [list ::msgcat::mcload [file dirname [info script]]] # Compressed table of which Unicode code points in the BMP are printable |
︙ | ︙ | |||
240 241 242 243 244 245 246 247 248 249 250 251 252 253 | # Returns 1 if the character is a printable Unicode characte # in the BMP, and 0 otherwise. # #---------------------------------------------------------------------- proc ::khim::ValidChar { c } { variable UniOK return [expr {( [BSearch $UniOK $c] & 1 )}] } #---------------------------------------------------------------------- # # khim::getOptions -- # | > > > > > | 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 | # Returns 1 if the character is a printable Unicode characte # in the BMP, and 0 otherwise. # #---------------------------------------------------------------------- proc ::khim::ValidChar { c } { variable UniOK variable CMapMaxPage if { $CMapMaxPage > 0x100 } { return [string is print [format %c $c]] } return [expr {( [BSearch $UniOK $c] & 1 )}] } #---------------------------------------------------------------------- # # khim::getOptions -- # |
︙ | ︙ | |||
291 292 293 294 295 296 297 | } wm transient $w $g catch {wm attributes $w -toolwindow 1} wm title $w [mc "KHIM Controls"] bind $w <Destroy> [list ::khim::HandleDestroy $w %W] # Create GUI and manage geometry | > > > > > > | > > | | | < | | | | | > | | | | > | | | | | | | | | | 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 | } wm transient $w $g catch {wm attributes $w -toolwindow 1} wm title $w [mc "KHIM Controls"] bind $w <Destroy> [list ::khim::HandleDestroy $w %W] # Create GUI and manage geometry set font [list [font configure TkFixedFont -family]] set fontSize [font configure TkFixedFont -size] if {$fontSize < 0} { incr fontSize -2 } else { incr fontSize 2 } lappend font $fontSize ttk::checkbutton $w.v -variable ::khim::inputUse -text [mc "Use KHIM"] label $w.l1 -text [mc "Compose key:"] ttk::button $w.b1 -textvariable khim::inputComposeKey \ -command [list ::khim::GetComposeKey $w.b1] labelframe $w.lf1 -text [mc "Key sequences"] -padx 5 -pady 5 -width 400 listbox $w.lf1.lb -yscroll [list $w.lf1.y set] \ -font $font -width 8 -height 8 -exportselection 0 bind $w.lf1.lb <<ListboxSelect>> [list ::khim::Select %W] ttk::scrollbar $w.lf1.y -orient vertical -command [list $w.lf1.lb yview] frame $w.lf1.f1 label $w.lf1.f1.l1 -text [mc "Input key sequence:"] entry $w.lf1.f1.e1 -textvariable ::khim::inputSequence -width 2 \ -font $font bind $w.lf1.f1.e1 <FocusIn> { %W selection from 0 %W selection to end } grid $w.lf1.f1.l1 -padx 5 grid $w.lf1.f1.e1 -row 0 -column 1 grid columnconfigure $w.lf1.f1 2 -weight 1 frame $w.lf1.f2 label $w.lf1.f2.l1 -text [mc "Character:"] entry $w.lf1.f2.e1 -textvariable ::khim::inputCharacter -width 2 \ -font $font bind $w.lf1.f2.e1 <FocusIn> { %W selection from 0 %W selection to end } ttk::button $w.lf1.f2.b1 -text [mc "Unicode..."] \ -command [list ::khim::FocusAndInsertSymbol $w.lf1.f2.e1] grid $w.lf1.f2.l1 -padx 5 grid $w.lf1.f2.e1 -row 0 -column 1 grid $w.lf1.f2.b1 -row 0 -column 2 -sticky w -padx {20 0} grid columnconfigure $w.lf1.f2 3 -weight 1 grid $w.lf1.lb -row 0 -column 0 -sticky nsew -rowspan 5 grid $w.lf1.y -row 0 -column 1 -sticky ns -rowspan 5 frame $w.lf1.f3 ttk::button $w.lf1.f3.b1 -text [mc Change] \ -command [list ::khim::ChangeSequence $w] ttk::button $w.lf1.f3.b2 -text [mc Delete] \ -command [list ::khim::DeleteSequence $w] grid $w.lf1.f1 -row 0 -column 2 -sticky e -padx {20 0} grid $w.lf1.f2 -row 1 -column 2 -sticky e -padx {20 0} -pady 8 grid $w.lf1.f3.b1 $w.lf1.f3.b2 -padx 5 -sticky ew grid columnconfigure $w.lf1.f3 {0 1} -weight 1 -uniform A grid $w.lf1.f3 -row 3 -column 2 -sticky e -padx 20 grid rowconfigure $w.lf1 2 -weight 1 grid columnconfigure $w.lf1 3 -weight 1 ::autoscroll::autoscroll $w.lf1.y frame $w.bf ttk::button $w.bf.ok -text [mc OK] -command [list ::khim::OK $w] ttk::button $w.bf.apply -text [mc Apply] -command [list ::khim::Apply $w] ttk::button $w.bf.cancel -text [mc Cancel] -command [list destroy $w] ttk::button $w.bf.help -text [mc Help...] \ -command [list ::khim::showHelp $w.help] grid $w.bf.ok -row 0 -column 0 -padx 5 -sticky ew grid $w.bf.apply -row 0 -column 1 -padx 5 -sticky ew grid $w.bf.cancel -row 0 -column 2 -padx 5 -sticky ew grid $w.bf.help -row 0 -column 4 -padx 5 grid columnconfigure $w.bf 3 -weight 1 grid columnconfigure $w.bf {0 1 2 4} -uniform A grid $w.v -columnspan 2 -sticky w -padx 5 -pady 5 grid $w.l1 $w.b1 -sticky w -padx 3 grid $w.lf1 -columnspan 2 -sticky nsew -padx 5 -pady 5 grid $w.bf -pady 5 -sticky ew -columnspan 2 grid columnconfigure $w 1 -weight 1 # Initialize the listbox content ShowSequences $w |
︙ | ︙ | |||
457 458 459 460 461 462 463 | regsub -all -line {[ \t]+$} $text {} text regsub -all {\n\n} $text <p> text regsub -all {\n} $text { } text regsub -all <p> $text \n\n text $w.t insert insert $text $w.t see 1.0 $w.t configure -state disabled | | | | 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 | regsub -all -line {[ \t]+$} $text {} text regsub -all {\n\n} $text <p> text regsub -all {\n} $text { } text regsub -all <p> $text \n\n text $w.t insert insert $text $w.t see 1.0 $w.t configure -state disabled ttk::scrollbar $w.y -command [list $w.t yview] -orient vertical ttk::button $w.ok -text [mc OK] -command [list destroy $w] grid $w.t -row 0 -column 0 -sticky nsew grid $w.y -row 0 -column 1 -sticky ns grid $w.ok -pady 5 -row 1 -column 0 -columnspan 2 grid rowconfigure $w 0 -weight 1 grid columnconfigure $w 0 -weight 1 # Determine whether we have a grab in effect |
︙ | ︙ | |||
1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 | # #---------------------------------------------------------------------- proc khim::CMapUpdateSpinbox {w args} { variable CMapInputCodePage variable CMapCodePage variable CMapSavedColors set spin $w.spin # Test validity of the code page number if { ![string is integer -strict $CMapInputCodePage($w)] || $CMapInputCodePage($w) < 0 | > > > > > > > > > > > > | | 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 | # #---------------------------------------------------------------------- proc khim::CMapUpdateSpinbox {w args} { variable CMapInputCodePage variable CMapCodePage variable CMapSavedColors variable CMapMaxPage set spin $w.spin # Test validity of the code page number if { $CMapMaxPage == 0 } { # Test if the core supports full Unicode range set CMapMaxPage 0x100 if { ![string match "\\U*" "\U11111"] && [scan "\U11111" %c t] && $t == 69905 } { set CMapMaxPage 0x1100 } } if { ![string is integer -strict $CMapInputCodePage($w)] || $CMapInputCodePage($w) < 0 || $CMapInputCodePage($w) >= $CMapMaxPage } { if {![info exists CMapSavedColors($w)]} { set CMapSavedColors($w) \ [list [$spin cget -background] [$spin cget -foreground]] } $spin configure -background \#ff6666 -foreground \#000000 } else { |
︙ | ︙ | |||
1072 1073 1074 1075 1076 1077 1078 | } else { set format %d } for { set i 0 } { $i < $CMapInputCodePage($w) } { incr i } { lappend values [format $format $i] } lappend values $CMapInputCodePage($w) | | | 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 | } else { set format %d } for { set i 0 } { $i < $CMapInputCodePage($w) } { incr i } { lappend values [format $format $i] } lappend values $CMapInputCodePage($w) for { incr i } { $i < $CMapMaxPage } { incr i } { lappend values [format $format $i] } # When we change the values list, the content of the spinbox # appears to be lost; deal with this by saving and restoring it. set cp $CMapInputCodePage($w) |
︙ | ︙ | |||
1259 1260 1261 1262 1263 1264 1265 | proc khim::CMapCellSize {c} { variable CMapFont variable CMapBadCharFont # Compute the minimum linear dimension of one box in the grid. | | | | | > | | 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 | proc khim::CMapCellSize {c} { variable CMapFont variable CMapBadCharFont # Compute the minimum linear dimension of one box in the grid. # It is at least 11 pxl greater than # - the linespace of the display font # - 2-line space in the "bad character" font # - one em in the display font # - two digit widths in the "bad character" font set minsize \ [expr { [font metrics $CMapFont -displayof $c -linespace] + 11 }] set minsize2 [expr { 2 * [font metrics $CMapBadCharFont \ -displayof $c -linespace] + 11 }] if { $minsize2 > $minsize } { set minsize $minsize2 } set minsize2 [expr { [font measure $CMapFont -displayof $c M] + 11 }] if { $minsize2 > $minsize } { set minsize $minsize2 } set minsize2 \ [expr { [font measure $CMapBadCharFont -displayof $c 00] + 11 }] if { $minsize2 > $minsize } { set minsize $minsize2 } return $minsize } #---------------------------------------------------------------------- |
︙ | ︙ | |||
1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 | set row [expr { $rem / 16 }] set col [expr { $rem % 16 }] $c itemconfigure text -fill $CMapForeground($w) $c itemconfigure text&&row$row&&col$col -fill $CMapSelectForeground($w) set xmin [lindex $CMapXL($w) $col] incr col set xmax [lindex $CMapXL($w) $col] set ymin [lindex $CMapYL($w) $row] incr row set ymax [lindex $CMapYL($w) $row] catch { $c delete selectrect } $c create rectangle $xmin $ymin $xmax $ymax \ -width 2 -fill $CMapSelectBackground($w) \ -outline $CMapSelectForeground($w) -tags selectrect $c lower selectrect text return } | > > > | 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 | set row [expr { $rem / 16 }] set col [expr { $rem % 16 }] $c itemconfigure text -fill $CMapForeground($w) $c itemconfigure text&&row$row&&col$col -fill $CMapSelectForeground($w) set xmin [lindex $CMapXL($w) $col] incr xmin 1 incr col set xmax [lindex $CMapXL($w) $col] set ymin [lindex $CMapYL($w) $row] incr ymin 1 incr row set ymax [lindex $CMapYL($w) $row] catch { $c delete selectrect } $c create rectangle $xmin $ymin $xmax $ymax \ -width 2 -fill $CMapSelectBackground($w) \ -outline $CMapSelectForeground($w) -tags selectrect $c lower selectrect text return } |
︙ | ︙ | |||
1656 1657 1658 1659 1660 1661 1662 | # Create the dialog set c $map.c grid [canvas $c -width 400 -height 400 \ -bg $CMapBackground($map) -takefocus 1] \ -columnspan 2 -padx 3 -pady 3 grid [frame $map.f] -row 2 -column 0 -columnspan 2 -sticky ew -pady 3 | | | > | | 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 | # Create the dialog set c $map.c grid [canvas $c -width 400 -height 400 \ -bg $CMapBackground($map) -takefocus 1] \ -columnspan 2 -padx 3 -pady 3 grid [frame $map.f] -row 2 -column 0 -columnspan 2 -sticky ew -pady 3 ttk::button $map.f.b1 -text [mc OK] -command [list khim::CMapOK $map] ttk::button $map.f.b2 -text [mc Cancel] -command [list khim::CMapCancel \ $map] ttk::button $map.f.b3 -text [mc Help...] \ -command [list khim::showHelp $map.help] grid $map.f.b1 -row 0 -column 0 -sticky ew -padx 5 grid $map.f.b2 -row 0 -column 1 -sticky ew -padx 5 grid $map.f.b3 -row 0 -column 3 -sticky ew -padx 5 grid columnconfigure $map.f 2 -weight 1 grid columnconfigure $map.f {0 1 3} -uniform A grid columnconfigure $map 1 -weight 1 |
︙ | ︙ | |||
1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 | catch {unset CMapSavedColors($w)} catch {unset CMapForeground($w)} catch {unset CMapSelectForeground($w)} catch {unset CMapBackground($w)} catch {unset CMapSelectBackground($w)} return } # Bindings for the "khim::cmap" bindtag that is used in the character map # dialog bind khim::cmap <1> {khim::CMapSelect %W %x %y} bind khim::cmap <Double-1> {khim::CMapCopypastedismiss %W %x %y} bind khim::cmap <B1-Motion> {khim::CMapSelect %W %x %y} | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 | catch {unset CMapSavedColors($w)} catch {unset CMapForeground($w)} catch {unset CMapSelectForeground($w)} catch {unset CMapBackground($w)} catch {unset CMapSelectBackground($w)} return } #---------------------------------------------------------------------- # # khim::SetupFonts -- # # Create fonts, initialize font variables # # Parameters: # None. # # Results: # None. # #---------------------------------------------------------------------- proc khim::SetupFonts {} { variable CMapFont variable CMapBadCharFont set family [font configure TkDefaultFont -family] set size [font configure TkDefaultFont -size] if {$size < 0} { incr size -3 } else { incr size 3 } set CMapFont [font create -family $family -size $size] set family [font configure TkFixedFont -family] set size [font configure TkFixedFont -size] if {$size < 0} { incr size 2 } else { incr size -2 } set CMapBadCharFont [font create -family $family -size $size] } # Bindings for the "khim::cmap" bindtag that is used in the character map # dialog bind khim::cmap <1> {khim::CMapSelect %W %x %y} bind khim::cmap <Double-1> {khim::CMapCopypastedismiss %W %x %y} bind khim::cmap <B1-Motion> {khim::CMapSelect %W %x %y} |
︙ | ︙ | |||
1995 1996 1997 1998 1999 2000 2001 | ~o \u00f5 } # Set initial bindings on the KHIM bind tag. khim::RedoBindings | > | | > | | | | | | | 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 | ~o \u00f5 } # Set initial bindings on the KHIM bind tag. khim::RedoBindings # Setup fonts khim::SetupFonts # Test program if {[info exists ::argv0] && ![string compare $::argv0 [info script]]} { grid [entry .e -font [list [font configure TkFixedFont -family] 18]] \ -columnspan 5 -sticky ew .e insert end {Type here} bindtags .e {.e KHIM Entry . all} grid [ttk::button .test -text "Test" -command "khim::getOptions .khim"] \ [ttk::button .bload -text "Load config" -command "testLoadConfig"] \ [ttk::button .bsave -text "Save config" -command "testSaveConfig"] \ [ttk::button .bhelp -text "Help" -command "khim::showHelp .help"] \ [ttk::button .bquit -text "Quit" -command "exit"] \ -padx 5 -pady 5 proc testLoadConfig {} { source ~/.khimrc } proc testSaveConfig {} { set f [open ~/.khimrc w] puts $f [khim::getConfig] close $f } } |
Changes to assets/tklib0.6/khim/pl.msg.
︙ | ︙ | |||
68 69 70 71 72 73 74 | ::msgcat::mcset pl {Apply} {Zastosuj} ::msgcat::mcset pl {Cancel} {Anuluj} ::msgcat::mcset pl {Change} {ZmieΕ} | | | | 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | ::msgcat::mcset pl {Apply} {Zastosuj} ::msgcat::mcset pl {Cancel} {Anuluj} ::msgcat::mcset pl {Change} {ZmieΕ} ::msgcat::mcset pl {Character:} {Wynik:} ::msgcat::mcset pl {Compose Key} {Klawisz sterujΔ cy} ::msgcat::mcset pl {Compose key:} {Klawisz sterujΔ cy:} ::msgcat::mcset pl {Composed sequence must be two characters long} \ {Sekwecja znakΓ³w musi byΔ dwuelementowa} ::msgcat::mcset pl {Delete} {UsuΕ} ::msgcat::mcset pl {KHIM Help} {Pomoc KHIM} ::msgcat::mcset pl {Help...} {Pomoc...} ::msgcat::mcset pl {Input key sequence:} {Sekwencja znakΓ³w:} ::msgcat::mcset pl {Insert Character} {Wstaw znak} ::msgcat::mcset pl {Invalid sequence} {NieprawidΕowa sekwencja} ::msgcat::mcset pl {Key sequences} {Sekwencje znakΓ³w} |
︙ | ︙ |
Changes to assets/tklib0.6/khim/ru.msg.
︙ | ︙ | |||
79 80 81 82 83 84 85 | ::msgcat::mcset ru {Apply} {ΠΡΠΈΠΌΠ΅Π½ΠΈΡΡ} ::msgcat::mcset ru {Cancel} {ΠΡΠΌΠ΅Π½ΠΈΡΡ} ::msgcat::mcset ru {Change} {ΠΠ·ΠΌΠ΅Π½ΠΈΡΡ} | | | | 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | ::msgcat::mcset ru {Apply} {ΠΡΠΈΠΌΠ΅Π½ΠΈΡΡ} ::msgcat::mcset ru {Cancel} {ΠΡΠΌΠ΅Π½ΠΈΡΡ} ::msgcat::mcset ru {Change} {ΠΠ·ΠΌΠ΅Π½ΠΈΡΡ} ::msgcat::mcset ru {Character:} {Π‘ΠΈΠΌΠ²ΠΎΠ»:} ::msgcat::mcset ru {Compose Key} {ΠΠ»Π°Π²ΠΈΡΠ° ΠΊΠΎΠΌΠΏΠΎΠ·ΠΈΡΠΈΠΈ} ::msgcat::mcset ru {Compose key:} {ΠΠ»Π°Π²ΠΈΡΠ° ΠΊΠΎΠΌΠΏΠΎΠ·ΠΈΡΠΈΠΈ:} ::msgcat::mcset ru {Composed sequence must be two characters long} \ {ΠΡ ΠΎΠ΄Π½Π°Ρ ΠΏΠΎΡΠ»Π΅Π΄ΠΎΠ²Π°ΡΠ΅Π»ΡΠ½ΠΎΡΡΡ Π΄ΠΎΠ»ΠΆΠ½Π° ΡΠΎΡΡΠΎΡΡΡ ΠΈΠ· Π΄Π²ΡΡ ΡΠΈΠΌΠ²ΠΎΠ»ΠΎΠ²} ::msgcat::mcset ru {Delete} {Π£Π΄Π°Π»ΠΈΡΡ} ::msgcat::mcset ru {KHIM Help} {Π‘ΠΏΡΠ°Π²ΠΊΠ° ΠΏΠΎ KHIM} ::msgcat::mcset ru {Help...} {Π‘ΠΏΡΠ°Π²ΠΊΠ°...} ::msgcat::mcset ru {Input key sequence:} {ΠΡ ΠΎΠ΄Π½Π°Ρ ΠΏΠΎΡΠ»Π΅Π΄ΠΎΠ²Π°ΡΠ΅Π»ΡΠ½ΠΎΡΡΡ:} ::msgcat::mcset ru {Insert Character} {ΠΡΠ±Π΅ΡΠΈΡΠ΅ ΡΠΈΠΌΠ²ΠΎΠ»} ::msgcat::mcset ru {Invalid sequence} {ΠΠ΅ΠΏΡΠ°Π²ΠΈΠ»ΡΠ½Π°Ρ ΠΊΠΎΠΌΠ±ΠΈΠ½Π°ΡΠΈΡ} ::msgcat::mcset ru {Key sequences} {ΠΠΎΠΌΠ±ΠΈΠ½Π°ΡΠΈΠΈ ΠΊΠ»Π°Π²ΠΈΡ} |
︙ | ︙ |
Changes to assets/tklib0.6/khim/uk.msg.
︙ | ︙ | |||
72 73 74 75 76 77 78 | ::msgcat::mcset uk {Apply} {ΠΡΠΈΠΉΠ½ΡΡΠΈ} ::msgcat::mcset uk {Cancel} {ΠΡΠ΄ΠΌΡΠ½ΠΈΡΠΈ} ::msgcat::mcset uk {Change} {ΠΠΌΡΠ½ΠΈΡΠΈ} | | | | 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | ::msgcat::mcset uk {Apply} {ΠΡΠΈΠΉΠ½ΡΡΠΈ} ::msgcat::mcset uk {Cancel} {ΠΡΠ΄ΠΌΡΠ½ΠΈΡΠΈ} ::msgcat::mcset uk {Change} {ΠΠΌΡΠ½ΠΈΡΠΈ} ::msgcat::mcset uk {Character:} {Π‘ΠΈΠΌΠ²ΠΎΠ»:} ::msgcat::mcset uk {Compose Key} {ΠΠ»Π°Π²ΡΡΠ° ΠΊΠΎΠΌΠΏΠΎΠ·ΠΈΡΡΡ} ::msgcat::mcset uk {Compose key:} {ΠΠ»Π°Π²ΡΡΠ° ΠΊΠΎΠΌΠΏΠΎΠ·ΠΈΡΡΡ:} ::msgcat::mcset uk {Composed sequence must be two characters long} \ {ΠΡ ΡΠ΄Π½Π° ΠΏΠΎΡΠ»ΡΠ΄ΠΎΠ²Π½ΡΡΡΡ ΠΏΠΎΠ²ΠΈΠ½Π½Π° ΡΠΊΠ»Π°Π΄Π°ΡΠΈΡΡ Π· Π΄Π²ΠΎΡ ΡΠΈΠΌΠ²ΠΎΠ»ΡΠ²} ::msgcat::mcset uk {Delete} {ΠΠΈΠ΄Π°Π»ΠΈΡΠΈ} ::msgcat::mcset uk {KHIM Help} {ΠΠΎΠΏΠΎΠΌΠΎΠ³Π° ΠΏΠΎ KHIM} ::msgcat::mcset uk {Help...} {ΠΠΎΠΏΠΎΠΌΠΎΠ³Π°...} ::msgcat::mcset uk {Input key sequence:} {ΠΡ ΡΠ΄Π½Π° ΠΏΠΎΡΠ»ΡΠ΄ΠΎΠ²Π½ΡΡΡΡ:} ::msgcat::mcset uk {Insert Character} {ΠΠ±Π΅ΡΡΡΡ ΡΠΈΠΌΠ²ΠΎΠ»} ::msgcat::mcset uk {Invalid sequence} {ΠΠ΅ΠΏΡΠ°Π²ΠΈΠ»ΡΠ½Π° ΠΊΠΎΠΌΠ±ΡΠ½Π°ΡΡΡ} ::msgcat::mcset uk {Key sequences} {ΠΠΎΠΌΠ±ΡΠ½Π°ΡΡΡ ΠΊΠ»Π°Π²ΡΡ} |
︙ | ︙ |
jni/tcl/compat/zlib/win32/zdll.lib became a regular file.
cannot compute difference between binary files
jni/tcl/compat/zlib/win32/zlib1.dll became a regular file.
cannot compute difference between binary files
jni/tcl/compat/zlib/win64/zlib1.dll became a regular file.
cannot compute difference between binary files
jni/tcl/compat/zlib/zlib2ansi became a regular file.
︙ | ︙ |