Ignore:
Timestamp:
Nov 24, 2016, 11:58:38 AM (10 years ago)
Author:
Pedro Gea <pgea@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
f738c05
Parents:
6dc91d2
Message:

Refs #1933
Se revisan los binds respecto a wtree y su treectrl.
Se quitan los métodos específicos para la creación de columnas e inserción de nodos que quedaban en tolinspe.
Se añade un update del nodo de paquetes para que se actualice ante un "require".
Se revisan los métodos de botón derecho para que aparezcan sólo sobre los objetos seleccionados.
Se añade un método a wtree para gestionar el color de todas las columnas de un nodo.
Se añaden las columnas al root de wtree.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tolbase/lib/byswidget/blistboxplus/blistboxplus.tcl

    r6dc91d2 rcc64b09  
    159159   
    160160    # bind
     161    #@!bind
    161162    #@T! $_listbox bind all <KeyPress> +[list $self _OnKeyPress %A]
    162163    #@T! to do   
     164    bind $_listbox <KeyPress> +[list $self _OnKeyPress %A]
    163165   
    164166    $self configure -nomenu [from args -nomenu]
    … …  
    429431    bind $_listbox <Shift-End>          "$self addAllNext"
    430432    bind $_listbox <Button-1>           +[list focus -force %W]   
    431   }
    432 
    433   #@//////////////////////////////////////////////////////////////////////////
    434   method bind { args } {
    435   #
    436   # PURPOSE: modifies a particular case of bind
    437   #
    438   #///////////////////////////////////////////////////////////////////////////
    439     if { [lindex $args 1] eq "<Selection>" } {
    440       #@T no se usa
    441       return [eval $_listbox notify bind $args]
    442     } else {
    443       return [bind $_listbox.frameTree.t [lindex $args 1] [lindex $args 2]]
    444     }
    445433  }
    446434   
    … …  
    887875        return $result
    888876      } else {
    889         #@T! return [eval $_listbox curselection]
    890877        return [$self curselection]
    891878      }
    … …  
    916903        foreach dats $args {
    917904          set datos [list [lindex $cols 0] $dats]
    918           #@T! $_listbox insert $pos $currentId -data $datos
     905          #@ Crea y completa los datos de un nodo
    919906          set node [$_listbox item create -parent root -button 0 -open 0]
    920907          eval $_listbox item text $node $datos
    … …  
    934921            incr i
    935922          }
    936           #@T! $_listbox insert $pos $currentId -data $datos
    937           set node [$_listbox item create -parent root -button 0 -open 0] ;# -parent $pos
     923          #@ Crea y completa los datos de un nodo
     924          set node [$_listbox item create -parent root -button 0 -open 0]
    938925          eval $_listbox item text $node $datos
    939926          if { $options(-icon) != "" } {
    … …  
    970957  #///////////////////////////////////////////////////////////////////////////
    971958    if { "-1" eq [lsearch $args 0] } {
    972       #@T! eval $_listbox delete $args
    973959      eval $_listbox item delete $args
    974960    } else {
    … …  
    997983  #///////////////////////////////////////////////////////////////////////////
    998984    if { $ids eq "" } {
    999       #@T! return [lrange [$self find] 1 end]
    1000985      set items [$_listbox item children root]
    1001       Tolcon_Trace "items $items"
    1002       return $items  ;#??
     986      return $items
    1003987    }
    1004988 
    … …  
    1010994
    1011995    foreach id $ids {
    1012    
    1013       set elem {}
    1014    
    1015       #@T! set data [$_listbox entry cget $id -data]   
    1016       #@T! foreach col $cols {
    1017       #@T!   set inx [lsearch $data $col]
    1018       #@T!   if { "-1" ne $inx } {
    1019       #@T!     incr inx
    1020       #@T!     lappend elem [lindex $data $inx]
    1021       #@T!   }
    1022       #@T! }
    1023      
     996      set elem {}   
    1024997      foreach col $cols {
    1025998        lappend elem [$_listbox item text $id $col]
    1026999      }
    1027      
    10281000      lappend result $elem
    10291001    }
    … …  
    10321004      return [lindex $result 0]
    10331005    }
    1034     Tolcon_Trace "get result: $result"   
     1006   
    10351007    return $result
    10361008  }
    … …  
    10571029      incr i
    10581030    }
    1059     #@T! return [$_listbox entry configure $id -data $datos]
    10601031    return [eval $_listbox item text $id $datos]
    10611032  }
Note: See TracChangeset for help on using the changeset viewer.