[PD-cvs] pd/src desire.tk,1.1.2.293,1.1.2.294

Mathieu Bouchard matju at users.sourceforge.net
Mon Aug 7 20:37:13 CEST 2006


Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7143

Modified Files:
      Tag: devel_0_39
	desire.tk 
Log Message:
fixed -lib: fixed tooltip content; more error prevention; won't add empty library names; <Return> in entrybox does add; ...


Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.293
retrieving revision 1.1.2.294
diff -C2 -d -r1.1.2.293 -r1.1.2.294
*** desire.tk	7 Aug 2006 17:54:14 -0000	1.1.2.293
--- desire.tk	7 Aug 2006 18:37:11 -0000	1.1.2.294
***************
*** 4823,4832 ****
  				-activestyle none -xscrollcommand "$f.a.xscroll set"
  		foreach line $_($self:$name) {$f.a.list insert end $line}
! 		# save the listbox path at _($self:$name) instead
! 		set _($self:$name) $f.a.list 
  		scrollbar $f.a.yscroll -command "$f.a.list yview"
  		scrollbar $f.a.xscroll -command "$f.a.list xview" -orient horizontal
  		
! 		pack $f.a.xscroll -side bottom -fill x 
  		pack $f.a.list -side left -fill both -expand 1
  		pack $f.a.yscroll -side left -fill y
--- 4823,4831 ----
  				-activestyle none -xscrollcommand "$f.a.xscroll set"
  		foreach line $_($self:$name) {$f.a.list insert end $line}
! 		set @$name $f.a.list ;# save the listbox path at @$name instead
  		scrollbar $f.a.yscroll -command "$f.a.list yview"
  		scrollbar $f.a.xscroll -command "$f.a.list xview" -orient horizontal
  		
! 		pack $f.a.xscroll -side bottom -fill x
  		pack $f.a.list -side left -fill both -expand 1
  		pack $f.a.yscroll -side left -fill y
***************
*** 4852,4856 ****
  		pack $f.b -side top
  		}
! 	    lists {
  	    	set no_max_label 1
  	    	frame $f
--- 4851,4855 ----
  		pack $f.b -side top
  		}
! 	    libraries {
  	    	set no_max_label 1
  	    	frame $f
***************
*** 4875,4900 ****
  		
  		entry $f.b.entry.add -width 15 -borderwidth 5 -relief ridge
  		pack $f.b.entry.add -side left
  		button $f.b.entry.3 -command "$self entry_set2listbox $f.a.list $f.b.entry.add" -text "add" -width 6
! 		balloon $f.b.entry.3 "click to select directory"
  		pack $f.b.entry.3 -side left
  		pack $f.b.entry -side top
  		
  		button $f.b.butts.5 -command "$self dir_up $f.a.list" -text "up" -width 4
! 		balloon $f.b.butts.5 "click to select directory"
  		pack $f.b.butts.5 -side left -padx 3
  		
  		button $f.b.butts.6 -command "$self dir_down $f.a.list" -text "down" -width 4
! 		balloon $f.b.butts.6 "click to select directory"
  		pack $f.b.butts.6 -side left -padx 2
  		
  		button $f.b.butts.4 -command "$self dir_remove $f.a.list" -text "remove" -width 6
! 		balloon $f.b.butts.4 "click to select directory"
  		pack $f.b.butts.4 -side left -padx 2
  		
  		pack $f.b.butts -side top
  		pack $f.b -side top
! 		}
! 	    
  	    default {
  		frame $f
--- 4874,4899 ----
  		
  		entry $f.b.entry.add -width 15 -borderwidth 5 -relief ridge
+ 		bind $f.b.entry.add <Return> "$self entry_set2listbox $f.a.list $f.b.entry.add"
  		pack $f.b.entry.add -side left
  		button $f.b.entry.3 -command "$self entry_set2listbox $f.a.list $f.b.entry.add" -text "add" -width 6
! 		balloon $f.b.entry.3 "add the name you typed to the list"
  		pack $f.b.entry.3 -side left
  		pack $f.b.entry -side top
  		
  		button $f.b.butts.5 -command "$self dir_up $f.a.list" -text "up" -width 4
! 		balloon $f.b.butts.5 "swap order with previous library"
  		pack $f.b.butts.5 -side left -padx 3
  		
  		button $f.b.butts.6 -command "$self dir_down $f.a.list" -text "down" -width 4
! 		balloon $f.b.butts.6 "swap order with next library"
  		pack $f.b.butts.6 -side left -padx 2
  		
  		button $f.b.butts.4 -command "$self dir_remove $f.a.list" -text "remove" -width 6
! 		balloon $f.b.butts.4 "remove library selected in the list"
  		pack $f.b.butts.4 -side left -padx 2
  		
  		pack $f.b.butts -side top
  		pack $f.b -side top
! 	    }
  	    default {
  		frame $f
***************
*** 5108,5112 ****
  def PagedDialog entry_set2listbox {listbox entry} {
  	set var [$entry get]
! 	$listbox insert end $var
  	$listbox yview end
  	focus .$self
--- 5107,5111 ----
  def PagedDialog entry_set2listbox {listbox entry} {
  	set var [$entry get]
! 	if {$var != ""} {$listbox insert end $var}
  	$listbox yview end
  	focus .$self
***************
*** 5115,5127 ****
  def PagedDialog dir_remove {listbox} {
  	set sel [$listbox curselection]
! 	if {$sel != ""} {
  	$listbox delete $sel
  	$listbox selection set $sel
- 	}
  }
  
  def PagedDialog dir_up {listbox} {
  	set sel [$listbox curselection]
! 	if {$sel > 0} {
  	set line [$listbox get $sel]
  	$listbox delete $sel
--- 5114,5125 ----
  def PagedDialog dir_remove {listbox} {
  	set sel [$listbox curselection]
! 	if {$sel == ""} {return}
  	$listbox delete $sel
  	$listbox selection set $sel
  }
  
  def PagedDialog dir_up {listbox} {
  	set sel [$listbox curselection]
! 	if {$sel == 0} {return}
  	set line [$listbox get $sel]
  	$listbox delete $sel
***************
*** 5129,5139 ****
  	$listbox selection set [expr $sel - 1]
  	$listbox see [expr $sel - 1]
- 	}
  }
  
  def PagedDialog dir_down {listbox} {
  	set sel [$listbox curselection]
! 	if {$sel != ""} {
! 	if {$sel < [expr [$listbox size] - 1]} {
  	set line [$listbox get $sel]
  	$listbox delete $sel
--- 5127,5135 ----
  	$listbox selection set [expr $sel - 1]
  	$listbox see [expr $sel - 1]
  }
  
  def PagedDialog dir_down {listbox} {
  	set sel [$listbox curselection]
! 	if {$sel == "" || $sel == [expr [$listbox size] - 1]} {return}
  	set line [$listbox get $sel]
  	$listbox delete $sel
***************
*** 5141,5146 ****
  	$listbox selection set [expr $sel + 1]
  	$listbox see [expr $sel + 1]
- 	}
- 	}
  }
  
--- 5137,5140 ----
***************
*** 5200,5204 ****
  
  section section_externals
!   lists -lib
  
  section section_paths
--- 5194,5198 ----
  
  section section_externals
!   libraries -lib
  
  section section_paths
***************
*** 5262,5266 ****
  		switch $type {
  			folders {lappend @$name [lindex $line 1]}
! 			lists {lappend @$name [lindex $line 1]}
  			files   {incr i; lappend @$name [lindex $contents $i]}
  			radio   {set @$name $line}
--- 5256,5260 ----
  		switch $type {
  			folders {lappend @$name [lindex $line 1]}
! 			libraries {lappend @$name [lindex $line 1]}
  			files   {incr i; lappend @$name [lindex $contents $i]}
  			radio   {set @$name $line}
***************
*** 5301,5305 ****
  		switch $type {
  			folders {foreach item [$v get 0 [$v size]] {puts $fd "$name $item"}}
! 			lists {foreach item [$v get 0 [$v size]] {puts $fd "$name $item"}}
  			#files   {foreach x $v {puts $fd "$name $x"}}
  			#void    {if {[string length $v]} {if {$v} {puts $fd $name}}}
--- 5295,5299 ----
  		switch $type {
  			folders {foreach item [$v get 0 [$v size]] {puts $fd "$name $item"}}
! 			libraries {foreach item [$v get 0 [$v size]] {puts $fd "$name $item"}}
  			#files   {foreach x $v {puts $fd "$name $x"}}
  			#void    {if {[string length $v]} {if {$v} {puts $fd $name}}}
***************
*** 5349,5353 ****
  			[list $name [say $name] $type {}]
  			}
! 	    lists {
  	    	properties_dialog $self $f.main.$section ServerPrefsDialog_ok \
  			[list $name [say $name] $type {}]
--- 5343,5347 ----
  			[list $name [say $name] $type {}]
  			}
! 	    libraries {
  	    	properties_dialog $self $f.main.$section ServerPrefsDialog_ok \
  			[list $name [say $name] $type {}]





More information about the Pd-cvs mailing list