Changeset 09d414b in tol for tolbase


Ignore:
Timestamp:
Feb 14, 2012, 10:56:46 AM (15 years ago)
Author:
Jorge Pérez <josp.jorge@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
3d8e270
Parents:
2f74496
Message:

fixes #1168, ctrl-i control-u se habilitan en la la ventana eval, también se corrige un error en el término ident, debe ser indent.

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@4131 be4846ae-f051-483a-831f-b64e7d08527f

Location:
tolbase/lib/toltk
Files:
5 edited
2 moved

Legend:

Unmodified
Added
Removed
  • tolbase/lib/toltk/bystext.tcl

    r2f74496 r09d414b  
    634634
    635635#/////////////////////////////////////////////////////////////////////////////
    636 proc ::BayesText::Ident {editor chars} {
    637 #
    638 # PURPOSE: Ident text
     636proc ::BayesText::Indent {editor chars} {
     637#
     638# PURPOSE: Indent text
    639639#
    640640#/////////////////////////////////////////////////////////////////////////////   
    … …  
    655655
    656656#/////////////////////////////////////////////////////////////////////////////
    657 proc ::BayesText::UnIdent {editor chars} {
    658 #
    659 # PURPOSE: UnIdent text
     657proc ::BayesText::UnIndent {editor chars} {
     658#
     659# PURPOSE: UnIndent text
    660660#
    661661#/////////////////////////////////////////////////////////////////////////////   
  • tolbase/lib/toltk/editor.tcl

    r2f74496 r09d414b  
    454454     "funsearch"   "CmdSearch"   "[mc {Search function}] (CTRL+G)" \
    455455     "sep4"        "--"          ""\
    456      "unident"     "CmdUnIdent"  "[mc Unident] (CTRL+U)" \
    457      "ident"       "CmdIdent"    "[mc Ident] (CTRL+I)" \
     456     "unindent"     "CmdUnIndent"  "[mc Unindent] (CTRL+U)" \
     457     "indent"       "CmdIndent"    "[mc Indent] (CTRL+I)" \
    458458     "sep5"        "--"          ""\
    459459     "bprint"      "CmdPrint"    "[mc Print]" \
    … …  
    751751    F { ::Editor::CmdFind      $this }
    752752    G { ::Editor::CmdSearch    $this }
    753     I { ::Editor::CmdIdent     $this }
     753    I { ::Editor::CmdIndent     $this }
    754754    N { ::Editor::CmdNew       $this }
    755755    R { ::Editor::CmdReplace   $this }
    756756    S { ::Editor::CmdSave      $this }
    757757    T { ::Editor::CmdFont      $this }
    758     U { ::Editor::CmdUnIdent   $this }
     758    U { ::Editor::CmdUnIndent   $this }
    759759    X { ::Editor::CmdCut       $this }
    760760    Y { ::Editor::CmdRedo      $this }
    … …  
    13541354}
    13551355
    1356 proc ::Editor::CmdIdent {this} {
     1356proc ::Editor::CmdIndent {this} {
    13571357  upvar \#0 ${this}::data data
    13581358  variable options
    1359   ::BayesText::Ident $data(txt,ctext) $options(charsIdent)
    1360 }
    1361 
    1362 proc ::Editor::CmdUnIdent {this} {
     1359  ::BayesText::Indent $data(txt,ctext) $options(charsIndent)
     1360}
     1361
     1362proc ::Editor::CmdUnIndent {this} {
    13631363  upvar \#0 ${this}::data data
    13641364  variable options
    1365   ::BayesText::UnIdent $data(txt,ctext) $options(charsIdent)
     1365  ::BayesText::UnIndent $data(txt,ctext) $options(charsIndent)
    13661366}
    13671367
    … …  
    17491749  label $f1.lChars -text [mc characters]
    17501750 
    1751   label $f1.lCharsIdent -text [mc "Characters to ident"]
    1752   SpinBox $f1.sbCharsIdent -justify right -width 4 \
     1751  label $f1.lCharsIndent -text [mc "Characters to indent"]
     1752  SpinBox $f1.sbCharsIndent -justify right -width 4 \
    17531753          -editable 0 -range {1 8} \
    1754           -textvariable ::Editor::tmpOpt(var,charsIdent)
     1754          -textvariable ::Editor::tmpOpt(var,charsIndent)
    17551755
    17561756  frame $f1.f -width 25
    … …  
    17581758  grid $f1.f $f1.chEdited     $f1.sbEdited     $f1.lFiles -sticky nw -padx 2
    17591759  grid ^     $f1.chLine       $f1.sbLinePos    $f1.lChars -sticky nw -padx 2
    1760   grid ^     $f1.lCharsIdent  $f1.sbCharsIdent         -sticky nw -padx 2
     1760  grid ^     $f1.lCharsIndent  $f1.sbCharsIndent         -sticky nw -padx 2
    17611761  grid rowconfigure    $f1 2 -weight 1
    17621762  grid columnconfigure $f1 3 -weight 1
    … …  
    17821782  set tmpOpt(var,chLine)     $options(chLine)
    17831783  set tmpOpt(var,posLine)    $options(posLine)
    1784   set tmpOpt(var,charsIdent) $options(charsIdent)
     1784  set tmpOpt(var,charsIndent) $options(charsIndent)
    17851785}
    17861786
    … …  
    18811881  set options(chLine)     [$rini Editor chLine    1]
    18821882  set options(posLine)    [$rini Editor posLine  78]
    1883   set options(charsIdent) [$rini Editor charsIdent 2]
     1883  # ticket https://www.tol-project.org/ticket/1168
     1884  set cindent [$rini Editor charsIndent -1]
     1885  if { $cindent == -1 } {
     1886    # no aparecia la clave charsIndent, pregunto por la vieja
     1887    set options(charsIndent) [$rini Editor charsIdent 2]
     1888  } else {
     1889    # aparecia la clave, hay que pasar al nombre Indent
     1890    set options(charsIndent) $cindent
     1891  }
    18841892}
    18851893
    … …  
    19081916  $wini Editor chLine       $options(chLine)
    19091917  $wini Editor posLine      $options(posLine)
    1910   $wini Editor charsIdent   $options(charsIdent)
     1918  $wini Editor charsIndent   $options(charsIndent)
    19111919  ::iniFile::Flush
    19121920}
  • tolbase/lib/toltk/msgs/es.msg

    r2f74496 r09d414b  
    753753mcset es "Undo"        "Deshacer"
    754754mcset es "Redo"        "Rehacer"
    755 mcset es "Ident"       "Aumentar sangría"
    756 mcset es "Unident"     "Disminuir sangría"
     755mcset es "Indent"       "Aumentar sangría"
     756mcset es "Unindent"     "Disminuir sangría"
    757757mcset es "Font"        "Fuente"
    758758mcset es "Save and Compile"  "Guardar y compilar"
    … …  
    812812mcset es "Show line at"               "Mostrar línea en"
    813813mcset es "characters"                 "caracteres"
    814 mcset es "Characters to ident"        "Caracteres a identar"
     814mcset es "Characters to indent"       "Caracteres a indentar"
    815815mcset es "CVS Options"                "Opciones de CVS"
    816816mcset es "Show differences"           "Mostrar diferencias"
  • tolbase/lib/toltk/tolbase.tcl

    r2f74496 r09d414b  
    5757}
    5858
     59source [file join $toltk_script_path "editor.tcl"]
    5960source [file join $toltk_script_path "markuphelper.tcl"]
    6061source [file join $toltk_script_path "tolpkg.tcl"]
    … …  
    293294  set widgets(eval) $sw1.eval
    294295
     296  # aseguramos que se lean las opciones de Editor que vamos a compartir
    295297  #Creamos text con resaltado TOL
    296298  set w_eval [::BayesText::CreateHLText $widgets(eval) tol \
    … …  
    318320  bind $w_eval <F7> "::BayesText::TolSyntaxCheck $w_eval ; break"
    319321  bind $w_eval <F10> "::TolConsole::OpenEval ; break"
     322
     323  bind $w_eval <Control-Key-i> {
     324    ::BayesText::Indent %W $::Editor::options(charsIndent)
     325    break
     326  }
     327
     328  bind $w_eval <Control-Key-u> {
     329    ::BayesText::UnIndent %W $::Editor::options(charsIndent)
     330    break
     331  }
    320332 
    321333  ## 1) Create a horizontal toolbar frame...
  • tolbase/lib/toltk/tolconfig_gui.tcl

    r2f74496 r09d414b  
    9090    grid rowconfigure $f 0 -weight 1
    9191    grid columnconfigure $f 0 -weight 1
     92    set pw [ PanedWindow $f.pw -side bottom -pad 0 -width 4 ]
     93    set paneLeft  [ $pwMain add ]
     94    set paneRight [ $pwMain add ]
     95
    9296    set tree $f.tree
    9397    wtree  $tree
    9498    $tree configure -table no -filter yes -columns {
    9599      { {image text} -tags NAME -label "Name" }
    96       { {text} -tags STATUS -label "Value" -editable yes }
     100      { {text} -tags STATUS -label "Value" }
    97101    }
    98102    grid $tree -row 0 -column 0 -sticky "snew"
Note: See TracChangeset for help on using the changeset viewer.