aboutsummaryrefslogtreecommitdiff
path: root/entry/entry.c
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2007-10-29 17:44:23 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2007-10-29 17:44:23 +0000
commit5e1c58741ea9d5c3b58ba0fb44b954cd6ed0fd1c (patch)
tree1f3d118f732bf7395d04e28e030cb60b541cd019 /entry/entry.c
parent3f3fa5678e83201589543c419178c23cf3e39463 (diff)
added Pd's key bindings to each text box; fixed bug #1818219 so the namespace prefix now gets saved as part of the object's classname
svn path=/trunk/externals/bbogart/; revision=8901
Diffstat (limited to 'entry/entry.c')
-rw-r--r--entry/entry.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/entry/entry.c b/entry/entry.c
index 7b75f05..d5cf4c8 100644
--- a/entry/entry.c
+++ b/entry/entry.c
@@ -265,10 +265,12 @@ static void create_widget(t_entry *x, t_glist *glist)
canvas, x, x->x_receive_name->s_name););
sys_vgui("bind .x%x.c.s%x.text <KeyRelease> {+pd %s keyup %%N \\;} \n",
canvas, x, x->x_receive_name->s_name);
- DEBUG(post("bind .x%x.c.s%x.text <Leave> {focus [winfo parent .x%x.c.s%x]} \n",
- canvas, x, canvas, x););
- sys_vgui("bind .x%x.c.s%x.text <Leave> {focus [winfo parent .x%x.c.s%x]} \n",
- canvas, x, canvas, x);
+ DEBUG(post("bind .x%x.c.s%x.text <Leave> {focus [winfo parent .x%x.c.s%x]} \n",
+ canvas, x, canvas, x););
+ sys_vgui("bind .x%x.c.s%x.text <Leave> {focus [winfo parent .x%x.c.s%x]} \n",
+ canvas, x, canvas, x);
+ DEBUG(post("pdtk_standardkeybindings .x%x.c.s%x.text \n", canvas, x););
+ sys_vgui("pdtk_standardkeybindings .x%x.c.s%x.text \n", canvas, x);
}
static void entry_drawme(t_entry *x, t_glist *glist, int firsttime)
@@ -540,11 +542,11 @@ static void entry_keyup(t_entry *x, t_float f)
static void entry_save(t_gobj *z, t_binbuf *b)
{
t_entry *x = (t_entry *)z;
-
+
binbuf_addv(b, "ssiisiiss", gensym("#X"),gensym("obj"),
x->x_obj.te_xpix, x->x_obj.te_ypix,
- gensym("entry"), x->x_width, x->x_height,
- x->x_bgcolour, x->x_fgcolour);
+ atom_getsymbol(binbuf_getvec(x->x_obj.te_binbuf)),
+ x->x_width, x->x_height, x->x_bgcolour, x->x_fgcolour);
binbuf_addv(b, ";");
}
@@ -753,7 +755,7 @@ void entry_setup(void) {
up_symbol = gensym("up");
down_symbol = gensym("down");
- post("Text v0.1 Ben Bogart.\nCVS: $Revision: 1.20 $ $Date: 2007-10-29 03:23:07 $");
+ post("Text v0.1 Ben Bogart.\nCVS: $Revision: 1.21 $ $Date: 2007-10-29 17:44:23 $");
}