aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.dirs4
-rw-r--r--shared/toxy/scriptlet.c20
-rw-r--r--test/toxy/default.wid13
-rw-r--r--toxy/build_counter2
4 files changed, 25 insertions, 14 deletions
diff --git a/Makefile.dirs b/Makefile.dirs
index d47abdd..55e7d03 100644
--- a/Makefile.dirs
+++ b/Makefile.dirs
@@ -1,9 +1,7 @@
MIXED_DIRS = \
shared \
cyclone \
- toxy \
- xeq \
- vexing
+ toxy
RELEASE_DIRS = \
cyclone \
diff --git a/shared/toxy/scriptlet.c b/shared/toxy/scriptlet.c
index 9bc312d..4806065 100644
--- a/shared/toxy/scriptlet.c
+++ b/shared/toxy/scriptlet.c
@@ -22,7 +22,7 @@
#define SCRIPTLET_INISIZE 1024
#define SCRIPTLET_MARGIN 64
#define SCRIPTLET_MAXARGS 9 /* do not increase (parser's constraint) */
-#define SCRIPTLET_MAXPUSH 20000 /* Tcl limit? LATER investigate */
+#define SCRIPTLET_MAXPUSH 20000 /* cf SOCKSIZE in t_tkcmd.c, LATER revisit */
enum { SCRIPTLET_CVOK, SCRIPTLET_CVUNKNOWN, SCRIPTLET_CVMISSING };
@@ -144,22 +144,23 @@ static char *scriptlet_dedot(t_scriptlet *sp, char *ibuf, char *obuf,
}
else if (argprops)
{
- char *ptr;
+ char *iptr, *optr, c;
int cnt;
- for (ptr = ibuf + 1, cnt = 1; *ptr; ptr++, cnt++)
+ for (iptr = ibuf + 1, c = *iptr, cnt = 1; c;
+ iptr++, c = *iptr, cnt++)
{
- char c = *ptr;
if ((c < 'A' || c > 'Z') && (c < 'a' || c > 'z'))
{
- cnt = 0;
+ *iptr = 0;
break;
}
}
- if (cnt && (ptr = props_getvalue(argprops, ibuf + 1)))
+ if (optr = props_getvalue(argprops, ibuf + 1))
{
- strcpy(obuf, ptr);
+ strcpy(obuf, optr);
len = cnt;
}
+ if (c) *iptr = c;
}
}
break;
@@ -424,8 +425,9 @@ void scriptlet_qpush(t_scriptlet *sp)
strcpy(tail, "]}}\n");
sys_gui(sp->s_buffer);
*tail = 0;
- sprintf(buf, "after 0 {::toxy::query}\nvwait ::toxy::reply\n\
- pd [concat %s _rp $::toxy::reply \\;]\n", sp->s_rptarget->s_name);
+ /* LATER find out if reply does not fit better inside the query proc */
+ sprintf(buf, "after 0 {::toxy::query\n\
+ pd [concat %s _rp $::toxy::reply \\;]}\n", sp->s_rptarget->s_name);
sys_gui(buf);
}
}
diff --git a/test/toxy/default.wid b/test/toxy/default.wid
index 5553c92..c7898af 100644
--- a/test/toxy/default.wid
+++ b/test/toxy/default.wid
@@ -162,7 +162,9 @@ proc ::toxy::scalecommand {target sel v} {
proc ::toxy::popupcommand {path target remote i text} {
set [$path cget -textvariable] $text
pd [concat $target _cb $i \;]
- pd [concat $remote $i \;]
+ if {$remote != "."} {
+ pd [concat $remote $i \;]
+ }
}
proc ::toxy::popup {path target remote entries args} {
@@ -222,3 +224,12 @@ bind .- <Leave> .<|_inout 0.>
#. @symbol .- delete 0 end .: .- insert 0 .#1
bind .- <Return> {eval .<[.- get].>; focus .^.c}
+
+#> popup menubutton
+#. -menu .-.pop
+#. -bg purple -fg white -activebackground magenta -width 8 -text popup
+#. @float if .(.#1 >= 1.) .(.-.pop invoke .#1.)
+#. #items test
+#. #iprops "-bg" purple "-fg" white "-activebackground" magenta
+
+::toxy::popup .- .| . [concat .#items] .#iprops
diff --git a/toxy/build_counter b/toxy/build_counter
index 769329b..2e12651 100644
--- a/toxy/build_counter
+++ b/toxy/build_counter
@@ -1,3 +1,3 @@
#define TOXY_VERSION "0.1"
#define TOXY_RELEASE "alpha"
-#define TOXY_BUILD 3
+#define TOXY_BUILD 4