Changeset 21beb26 in tol for tolbase/lib/toltk


Ignore:
Timestamp:
Dec 30, 2011, 8:43:56 PM (15 years ago)
Author:
Jorge Pérez <josp.jorge@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
09b79f5
Parents:
543fdce
Message:

refs #919, implementing options manager as a tree which is read from TolConfigManager::Config

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

File:
1 edited

Legend:

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

    r543fdce r21beb26  
     1package require BWidget
    12package require wtree
     3package require msgcat
    24
    35namespace eval ::TolConfigGUI {
    … …  
    6062proc ::TolConfigGUI::FillTreeConfig { } {
    6163  variable win
     64  variable tree
    6265  variable treeInfo
    6366
    6467  array unset treeInfo
    6568  set treeInfo(node,) root
     69  $tree item delete all
    6670  FillTree TolConfigManager::Config "" [ ::TolConfig::GetConfig ]
    6771
     72}
     73
     74proc ::TolConfigGUI::AcceptConfig { } {
     75  puts AcceptConfig
    6876}
    6977
    … …  
    7381
    7482  set win .tolconfig
    75 
    76   if { [ winfo exists $win ] } {
    77     raise $win
    78   } else {
    79     toplevel $win
    80     wm state $win withdrawn
    81     set tree $win.tree
     83  if { ![ winfo exists $win ] } {
     84    Dialog $win -title [ mc "Tol configuration"] \
     85        -modal local
     86    $win add -text Ok
     87    $win add -text Cancel
     88   
     89    set f [ $win getframe ]
     90    grid rowconfigure $f 0 -weight 1
     91    grid columnconfigure $f 0 -weight 1
     92    set tree $f.tree
    8293    wtree  $tree
    8394    $tree configure -table no -filter yes -columns {
    … …  
    8596      { {text} -tags STATUS -label "Value" -editable yes }
    8697    }
    87     grid $tree -row 1 -column 0 -sticky "snew"
     98    grid $tree -row 0 -column 0 -sticky "snew"
    8899    grid rowconfigure $win 1 -weight 1
    89100    grid columnconfigure $win 0 -weight 1
    90     FillTreeConfig
    91     wm state $win normal
     101  }
     102  FillTreeConfig
     103  set ans [ $win draw ]
     104  if { $ans == 0 } {
     105    AcceptConfig
    92106  }
    93107}
Note: See TracChangeset for help on using the changeset viewer.