diff options
author | a_kovalenko <a_kovalenko> | 2002-06-10 00:15:42 (GMT) |
---|---|---|
committer | a_kovalenko <a_kovalenko> | 2002-06-10 00:15:42 (GMT) |
commit | 5ee5e115029126483cf9ce27a213416257467a5f (patch) | |
tree | e2f9f905ff561612501e85c0d8bf86a1f4531c1c /library/xmfbox.tcl | |
parent | 4796fa2ee861eb603a0d07d9f2a3a29ce435e9a3 (diff) | |
download | tk-5ee5e115029126483cf9ce27a213416257467a5f.zip tk-5ee5e115029126483cf9ce27a213416257467a5f.tar.gz tk-5ee5e115029126483cf9ce27a213416257467a5f.tar.bz2 |
Added "magic ampersand" approach for translated strings in standard dialogs.
All translations were modified to work with "magic ampersand".
Russian translations added.
Diffstat (limited to 'library/xmfbox.tcl')
-rw-r--r-- | library/xmfbox.tcl | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/library/xmfbox.tcl b/library/xmfbox.tcl index e2c9194..4fec52c 100644 --- a/library/xmfbox.tcl +++ b/library/xmfbox.tcl @@ -4,7 +4,7 @@ # Unix platform. This implementation is used only if the # "::tk_strictMotif" flag is set. # -# RCS: @(#) $Id: xmfbox.tcl,v 1.19 2002/04/29 13:17:44 bagnonm Exp $ +# RCS: @(#) $Id: xmfbox.tcl,v 1.20 2002/06/10 00:15:42 a_kovalenko Exp $ # # Copyright (c) 1996 Sun Microsystems, Inc. # Copyright (c) 1998-2000 Scriptics Corporation @@ -323,7 +323,8 @@ proc ::tk::MotifFDialog_BuildUI {w} { # The Filter box # - label $f1.lab -text [mc "Filter:"] -under 3 -anchor w + bind [::tk::AmpWidget label $f1.lab -text [mc "Fil&ter:"] -anchor w] \ + <<AltUnderlined>> [list focus $f1.ent] entry $f1.ent pack $f1.lab -side top -fill x -padx 6 -pady 4 pack $f1.ent -side top -fill x -padx 4 -pady 0 @@ -332,13 +333,14 @@ proc ::tk::MotifFDialog_BuildUI {w} { # The file and directory lists # set data(dList) [MotifFDialog_MakeSList $w $f2a \ - [mc "Directory:"] 0 DList] + [mc "&Directory:"] DList] set data(fList) [MotifFDialog_MakeSList $w $f2b \ - [mc "Files:"] 2 FList] + [mc "Fi&les:"] FList] # The Selection box # - label $f3.lab -text [mc "Selection:"] -under 0 -anchor w + bind [::tk::AmpWidget label $f3.lab -text [mc "&Selection:"] -anchor w] \ + <<AltUnderlined>> [list focus $f3.ent] entry $f3.ent pack $f3.lab -side top -fill x -padx 6 -pady 0 pack $f3.ent -side top -fill x -padx 4 -pady 4 @@ -346,16 +348,16 @@ proc ::tk::MotifFDialog_BuildUI {w} { # The buttons # - set maxWidth [mcmax OK Filter Cancel] + set maxWidth [::tk::mcmaxamp &OK &Filter &Cancel] set maxWidth [expr {$maxWidth<6?6:$maxWidth}] - set data(okBtn) [button $bot.ok -text [mc "OK"] \ - -width $maxWidth -under 0 \ + set data(okBtn) [::tk::AmpWidget button $bot.ok -text [mc "&OK"] \ + -width $maxWidth \ -command [list tk::MotifFDialog_OkCmd $w]] - set data(filterBtn) [button $bot.filter -text [mc "Filter"] \ - -width $maxWidth -under 0 \ + set data(filterBtn) [::tk::AmpWidget button $bot.filter -text [mc "&Filter"] \ + -width $maxWidth \ -command [list tk::MotifFDialog_FilterCmd $w]] - set data(cancelBtn) [button $bot.cancel -text [mc "Cancel"] \ - -width $maxWidth -under 0 \ + set data(cancelBtn) [::tk::AmpWidget button $bot.cancel -text [mc "&Cancel"] \ + -width $maxWidth \ -command [list tk::MotifFDialog_CancelCmd $w]] pack $bot.ok $bot.filter $bot.cancel -padx 10 -pady 10 -expand yes \ @@ -363,14 +365,7 @@ proc ::tk::MotifFDialog_BuildUI {w} { # Create the bindings: # - bind $w <Alt-t> [list focus $data(fEnt)] - bind $w <Alt-d> [list focus $data(dList)] - bind $w <Alt-l> [list focus $data(fList)] - bind $w <Alt-s> [list focus $data(sEnt)] - - bind $w <Alt-o> [list tk::ButtonInvoke $bot.ok] - bind $w <Alt-f> [list tk::ButtonInvoke $bot.filter] - bind $w <Alt-c> [list tk::ButtonInvoke $bot.cancel] + bind $w <Alt-Key> [list ::tk::AltKeyInDialog $w %A] bind $data(fEnt) <Return> [list tk::MotifFDialog_ActivateFEnt $w] bind $data(sEnt) <Return> [list tk::MotifFDialog_ActivateSEnt $w] @@ -405,8 +400,9 @@ proc ::tk::MotifFDialog_SetListMode {w} { # cmdPrefix Specifies procedures to call when the listbox is # browsed or activated. -proc ::tk::MotifFDialog_MakeSList {w f label under cmdPrefix} { - label $f.lab -text $label -under $under -anchor w +proc ::tk::MotifFDialog_MakeSList {w f label cmdPrefix} { + bind [::tk::AmpWidget label $f.lab -text $label -anchor w] \ + <<AltUnderlined>> [list focus $f.l] listbox $f.l -width 12 -height 5 -exportselection 0\ -xscrollcommand [list $f.h set] -yscrollcommand [list $f.v set] scrollbar $f.v -orient vertical -takefocus 0 -command [list $f.l yview] |