[PD-cvs] pd/src desire.tk,1.1.2.223,1.1.2.224
Mathieu Bouchard
matju at users.sourceforge.net
Sun Jun 11 17:23:16 CEST 2006
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10512
Modified Files:
Tag: devel_0_39
desire.tk
Log Message:
small fixes to class browser.
popup menu entries now start with "popup_".
Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.223
retrieving revision 1.1.2.224
diff -C2 -d -r1.1.2.223 -r1.1.2.224
*** desire.tk 11 Jun 2006 09:23:14 -0000 1.1.2.223
--- desire.tk 11 Jun 2006 15:23:14 -0000 1.1.2.224
***************
*** 15,18 ****
--- 15,22 ----
source objective.tcl
+ #set argh0 [file normalize [file join [pwd] $argv0]]
+ #set our_tcl_dir [file join [file dirname [file dirname $argh0]] lib/pd/bin]
+ #puts $our_tcl_dir
+ #source $our_tcl_dir/objective.tcl
#-----------------------------------------------------------------------------------#
***************
*** 247,251 ****
#option add *$tkclass*selectBackground #60b0b0
}
!
# there are two palettes of 30 colours used in Pd
--- 251,258 ----
#option add *$tkclass*selectBackground #60b0b0
}
! foreach tkclass {Listbox} {
! option add *$tkclass*background #c4d8b0
! option add *$tkclass*selectBackground #88b060
! }
# there are two palettes of 30 colours used in Pd
***************
*** 306,313 ****
}
proc say_namespace {k code} {uplevel 1 $code}
proc say_category {text} {}
- set argh0 [file normalize [file join [pwd] $argv0]]
set cmdline(server) [list [file join [file dirname $argh0] pd]]
set cmdline(rcfilename) ~/.pdrc
--- 313,324 ----
}
+ proc can_say {k args} {
+ global text
+ return [info exist text($k)]
+ }
+
proc say_namespace {k code} {uplevel 1 $code}
proc say_category {text} {}
set cmdline(server) [list [file join [file dirname $argh0] pd]]
set cmdline(rcfilename) ~/.pdrc
***************
*** 2096,2100 ****
}
! def Canvas help {} {global main; $main class_browser}
def Canvas popup {id x y} {
--- 2107,2111 ----
}
! def Canvas popup_help {} {global main; $main class_browser}
def Canvas popup {id x y} {
***************
*** 2104,2114 ****
if {$id == ""} {
$self populate_menu $p {
! {properties {} ""}
! {help {} ""}}
} {
$id populate_menu $p {
! {properties {} ""}
! {open {} ""}
! {help {} ""}}
}
tk_popup $p $x $y
--- 2115,2125 ----
if {$id == ""} {
$self populate_menu $p {
! {popup_properties {} ""}
! {popup_help {} ""}}
} {
$id populate_menu $p {
! {popup_properties {} ""}
! {popup_open {} ""}
! {popup_help {} ""}}
}
tk_popup $p $x $y
***************
*** 3728,3747 ****
def* ClassBrowser fill_box {s listbox} {
- set f .$self.cl
global class_list
set n 0
- #$f.1 delete 0 end
$listbox delete 0 end
foreach class $class_list {
if {[string length $s]==0 || [string first $s $class]>=0} {
! #$f.1 insert end "$class : [say $class]"
! set string "$class : [say $class]"
! $listbox insert end $string
! if {[string length $string] > [string length $@width]} {set @width [string length $string]}
incr n
}
}
if {$@name == "browser"} {
- .$self.title configure -text [format [say "%d of %d object classes"] $n [llength $class_list]]
}
$listbox selection set 0 0
--- 3739,3761 ----
def* ClassBrowser fill_box {s listbox} {
global class_list
set n 0
$listbox delete 0 end
foreach class $class_list {
if {[string length $s]==0 || [string first $s $class]>=0} {
! if {[can_say $class]} {
! set t "\[$class\] [say $class]"
! } {
! set t "\[$class\]"
! }
! $listbox insert end $t
! set t "$class : [say $class]"
! $listbox insert end $t
! if {[string length $t] > [string length $@width]} {set @width [string length $t]}
incr n
}
}
+ .$self.title configure -text [format [say how_many_object_classes] $n [llength $class_list]]
if {$@name == "browser"} {
}
$listbox selection set 0 0
***************
*** 3768,3772 ****
def* ClassBrowser info {listbox} {
set i [$listbox curselection]
! set class [lindex [$listbox get $i] 0]
pd pd update-class-info $class $self info_callback
}
--- 3782,3786 ----
def* ClassBrowser info {listbox} {
set i [$listbox curselection]
! set class [string range [lindex [$listbox get $i] 0] 1 end-1]
pd pd update-class-info $class $self info_callback
}
***************
*** 3799,3803 ****
set b .$self.butt
frame $b
! pack [label $b.1 -text "[say filter]: "] -side left
pack [entry $b.2 -width 15] -side left
pack [button $b.close -text [say close] -command "destroy .$self"] -side right
--- 3813,3817 ----
set b .$self.butt
frame $b
! pack [label $b.1 -text [say filter]] -side left
pack [entry $b.2 -width 15] -side left
pack [button $b.close -text [say close] -command "destroy .$self"] -side right
***************
*** 3963,3967 ****
set f .browser.cl
set i [$f.1 curselection]
! set class [lindex [$f.1 get $i] 0]
$f.3 delete 0.0 end
$f.3 insert end "class $class\n"
--- 3977,3981 ----
set f .browser.cl
set i [$f.1 curselection]
! set class [string range [lindex [$f.1 get $i] 0] 1 end-1]
$f.3 delete 0.0 end
$f.3 insert end "class $class\n"
More information about the Pd-cvs
mailing list