Changeset 09d414b in tol for tolbase/lib/toltk/editor.tcl


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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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}
Note: See TracChangeset for help on using the changeset viewer.