236 wm geometry . 800x600
239 wm protocol . WM_DELETE_WINDOW {
244 set widgets(tbl) [tablelist::tablelist .tf.tl -columns {0 {} 0 String 0 Translation 0 Re-translation 0 {}} \
245 -editselectedonly 1 -selectmode extended -exportselection 0 -stretch all \
246 -editendcommand "lang::edit_end_command" \
247 -yscrollcommand ".tf.vb set"]
248 ttk::scrollbar .tf.vb -orient vertical -command ".tf.tl yview"
250 foreach {key value} [
array get ::tablelistopts] {
251 .tf.tl configure -$key $value
254 .tf.tl columnconfigure 0 -name num -editable 0 -resizable 0 -stretchable 0 -showlinenumbers 1
255 .tf.tl columnconfigure 1 -name str -editable 0 -stretchable 1 -maxwidth -400
256 .tf.tl columnconfigure 2 -name xlate -editable 1 -stretchable 1 -maxwidth -400
257 .tf.tl columnconfigure 3 -name rexlate -editable 0 -stretchable 1 -maxwidth -400
258 .tf.tl columnconfigure 4 -name src -editable 0 -hide 1
260 grid rowconfigure .tf 0 -weight 1
261 grid columnconfigure .tf 0 -weight 1
262 grid .tf.tl -row 0 -column 0 -sticky news
263 grid .tf.vb -row 0 -column 1 -sticky ns
266 set widgets(xlate) [ttk::button .bf.xlate -text "Add Translations"]
267 set widgets(rexlate) [ttk::button .bf.rexlate -text "Reverse translate"]
268 set widgets(unxlate) [ttk::button .bf.unxlate -text "Use English"]
269 set widgets(hide) [ttk::checkbutton .bf.hide -text "Hide translated" -variable lang::hide_xlates \
270 -command "lang::show_hide_xlates"]
271 set widgets(update) [ttk::button .bf.upd -text "Update" -width 6 -command "set ::update_lang 1; set ::update_done 1"]
272 ttk::button .bf.cancel -text "Cancel" -width 6 -command "set ::update_done 1"
274 pack .bf.xlate -side left -padx 2 -pady 2
275 pack .bf.rexlate -side left -padx 2 -pady 2
276 pack .bf.unxlate -side left -padx 2 -pady 2
277 pack .bf.hide -side left -padx 2 -pady 2
278 pack .bf.cancel -side right -padx 2 -pady 2
279 pack .bf.upd -side right -padx 2 -pady 2
281 pack .tf -fill both -expand yes