aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorN.N. <krzyszcz@users.sourceforge.net>2005-06-13 20:41:52 +0000
committerN.N. <krzyszcz@users.sourceforge.net>2005-06-13 20:41:52 +0000
commit4155426928eab2265d78f4860c35e09057dde840 (patch)
treed261c307f9d6d3f1d34a4ed3fafde7420d0d227a /bin
parentaebe147ae46e27127faa5c9d777de6b9ab822cc9 (diff)
toxy alpha19 and pddp alpha3 (see notes.txt for toxy and pddp)
svn path=/trunk/externals/miXed/; revision=3170
Diffstat (limited to 'bin')
-rw-r--r--bin/pddp/pddpserver.tcl27
-rw-r--r--bin/pddp/pkgIndex.tcl2
2 files changed, 23 insertions, 6 deletions
diff --git a/bin/pddp/pddpserver.tcl b/bin/pddp/pddpserver.tcl
index 4b96be2..eb01207 100644
--- a/bin/pddp/pddpserver.tcl
+++ b/bin/pddp/pddpserver.tcl
@@ -303,15 +303,32 @@ proc ::pddp::srvTimeout {sock} {
srvError $sock 408
}
-# FIXME test if "path" has its patch window already open...
-proc ::pddp::srvPdHandler {sock path} {
+proc ::pddp::srvPdOpen {path} {
+ global menu_windowlist
+ set name [file tail $path]
set dir [file dirname $path]
- set tail [file tail $path]
- if {[catch {pd [concat pd open $tail $dir \;]}]} {
+ # FIXME white space in $name and $dir
+ # FIXME this is a fragile hack, there should be an "openx" message to pd...
+ foreach en $menu_windowlist {
+ set wd [lindex $en 1]
+ set nm [lindex $en 0]
+ set dr [lindex [wm title $wd] end]
+ if {[string equal $name $nm] && [string equal $dir $dr]} {
+ # FIXME test on windows
+ raise $wd
+ focus -force $wd
+ return
+ }
+ }
+ pd [concat pd open $name $dir \;]
+ # FIXME raise and focus on windows?
+}
+
+proc ::pddp::srvPdHandler {sock path} {
+ if {[catch {::pddp::srvPdOpen $path}]} {
srvError $sock 504
} else {
srvError $sock 204
- # FIXME raise; focus (test on windows)
}
}
diff --git a/bin/pddp/pkgIndex.tcl b/bin/pddp/pkgIndex.tcl
index a3abe3d..10b89a6 100644
--- a/bin/pddp/pkgIndex.tcl
+++ b/bin/pddp/pkgIndex.tcl
@@ -5,6 +5,6 @@ proc LoadPddp { version dir } {
source [file join $dir pddpboot.tcl]
}
-set version "0.1.0.2"
+set version "0.1.0.3"
package ifneeded pddp $version [list LoadPddp $version $dir]