Diff for /capa/capa51/GUITools/common.tcl between versions 1.5 and 1.7

version 1.5, 2000/01/05 21:11:15 version 1.7, 2000/01/31 18:34:13
Line 1432  proc pickSections { sectionsToPickFrom { Line 1432  proc pickSections { sectionsToPickFrom {
 ###########################################################  ###########################################################
 ###########################################################  ###########################################################
 ###########################################################  ###########################################################
 proc pickSections { setsToPickFrom mode {title "Select Sets"} {window ""}} {  proc pickSets { setsToPickFrom mode {title "Select Sets"} {window ""}} {
     global gPromptPSets      global gPromptPSets
           
       if { $setsToPickFrom == "" } { 
    displayMessage "No available sets."
    return "Cancel" 
       }
     set dialog [toplevel $window.pickSets -borderwidth 10]      set dialog [toplevel $window.pickSets -borderwidth 10]
     wm title $dialog "Which Sets"      wm title $dialog "Which Sets"
   
Line 1464  proc pickSections { setsToPickFrom mode Line 1468  proc pickSections { setsToPickFrom mode
     pack configure $listboxFrame.scroll -fill y            pack configure $listboxFrame.scroll -fill y      
   
     foreach set $setsToPickFrom {      foreach set $setsToPickFrom {
  $setList insert end [format "%3d" $set   $setList insert end [format "%3d" $set]
     }      }
   
     button $buttonFrame.yes -text Continue -command {set gPromptPSets(yes) 1} \      button $buttonFrame.yes -text Continue -command {set gPromptPSets(yes) 1} \
Line 1475  proc pickSections { setsToPickFrom mode Line 1479  proc pickSections { setsToPickFrom mode
     button $buttonFrame.cancel -text Cancel -command { set gPromptPSets(yes) 0 } \      button $buttonFrame.cancel -text Cancel -command { set gPromptPSets(yes) 0 } \
     -underline 0      -underline 0
     bind $dialog <Destroy> "set gPromptPSets(yes) 0"      bind $dialog <Destroy> "set gPromptPSets(yes) 0"
       bind $dialog <Double-1> "set gPromptPSets(yes) 1"
   
     pack $buttonFrame.yes $buttonFrame.spacer \      if { $mode == "single" } {
  $buttonFrame.selectall $buttonFrame.cancel -side left   pack $buttonFrame.yes $buttonFrame.cancel -side left
       } else {
    pack $buttonFrame.yes $buttonFrame.spacer \
       $buttonFrame.selectall $buttonFrame.cancel -side left
       }
           
     bind $dialog <Alt-Key> break      bind $dialog <Alt-Key> break
           
Line 1494  proc pickSections { setsToPickFrom mode Line 1503  proc pickSections { setsToPickFrom mode
  set selectionList [ $setList curselection ]   set selectionList [ $setList curselection ]
  set setsToDo ""   set setsToDo ""
  foreach selection $selectionList {   foreach selection $selectionList {
     append setsToDo "[lindex [$setList get $selection] 0] "      lappend setsToDo [string trim [lindex [$setList get $selection] 0]]
  }   }
  destroy $dialog   destroy $dialog
  return $setsToDo   return $setsToDo
Line 1631  proc lunique __LIST { Line 1640  proc lunique __LIST {
     }      }
 }  }
   
   ###########################################################
   # lreverse
   ###########################################################
   proc lreverse list { 
       set result ""
       foreach element $list { set result [linsert $result 0 $element] } 
       return [concat $result]
   }
   
 proc splitline { line maxLength } {  proc splitline { line maxLength } {
     set length [string length $line]      set length [string length $line]
     set lines [expr $length/$maxLength + 1]      set lines [expr $length/$maxLength + 1]

Removed from v.1.5  
changed lines
  Added in v.1.7


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>