Commit a26200c5 authored by Ivica Bukvic's avatar Ivica Bukvic
Browse files

fixed regression in the iemgui move handle for object labels where text would...

fixed regression in the iemgui move handle for object labels where text would erroneously disappear as a result of a commit earlier today
parent ac2dd064
......@@ -158,7 +158,7 @@ void bng_draw_erase(t_bng* x, t_glist* glist)
sys_vgui(".x%lx.c delete %lxSCALE\n", canvas, x);
t_scalehandle *lh = (t_scalehandle *)(x->x_gui.x_lhandle);
sys_vgui("destroy %s\n", lh->h_pathname);
sys_vgui(".x%lx.c delete %lxLABEL\n", canvas, x);
sys_vgui(".x%lx.c delete %lxLABELH\n", canvas, x);
}
/*
sys_vgui(".x%lx.c delete %lxBASE\n", canvas, x);
......@@ -278,16 +278,16 @@ void bng_draw_select(t_bng* x, t_glist* glist)
{
if (x->x_gui.label_vis) {
sys_vgui("destroy %s\n", lh->h_pathname);
sys_vgui(".x%lx.c delete %lxLABEL\n", canvas, x);
sys_vgui(".x%lx.c delete %lxLABELH\n", canvas, x);
}
sys_vgui("canvas %s -width %d -height %d -bg $select_color -bd 0 -cursor crosshair\n",
lh->h_pathname, LABELHANDLE_WIDTH, LABELHANDLE_HEIGHT);
sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxBNG}\n",
sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxLABELH %lxBNG}\n",
canvas, x->x_gui.x_obj.te_xpix+ x->x_gui.x_ldx - LABELHANDLE_WIDTH,
x->x_gui.x_obj.te_ypix + x->x_gui.x_ldy - LABELHANDLE_HEIGHT,
LABELHANDLE_WIDTH, LABELHANDLE_HEIGHT,
lh->h_pathname, x, x);
lh->h_pathname, x, x, x);
sys_vgui("bind %s <Button> {pd [concat %s _click 1 %%x %%y \\;]}\n",
lh->h_pathname, lh->h_bindsym->s_name);
sys_vgui("bind %s <ButtonRelease> {pd [concat %s _click 0 0 0 \\;]}\n",
......@@ -310,7 +310,7 @@ void bng_draw_select(t_bng* x, t_glist* glist)
sys_vgui(".x%lx.c delete %lxSCALE\n", canvas, x);
x->x_gui.scale_vis = 0;
sys_vgui("destroy %s\n", lh->h_pathname);
sys_vgui(".x%lx.c delete %lxLABEL\n", canvas, x);
sys_vgui(".x%lx.c delete %lxLABELH\n", canvas, x);
x->x_gui.label_vis = 0;
}
//}
......
......@@ -177,7 +177,7 @@ void hradio_draw_erase(t_hradio* x, t_glist* glist)
sys_vgui(".x%lx.c delete %lxSCALE\n", canvas, x);
t_scalehandle *lh = (t_scalehandle *)(x->x_gui.x_lhandle);
sys_vgui("destroy %s\n", lh->h_pathname);
sys_vgui(".x%lx.c delete %lxLABEL\n", canvas, x);
sys_vgui(".x%lx.c delete %lxLABELH\n", canvas, x);
}
/*
for(i=0; i<n; i++)
......@@ -310,16 +310,16 @@ void hradio_draw_select(t_hradio* x, t_glist* glist)
{
if (x->x_gui.label_vis) {
sys_vgui("destroy %s\n", lh->h_pathname);
sys_vgui(".x%lx.c delete %lxLABEL\n", canvas, x);
sys_vgui(".x%lx.c delete %lxLABELH\n", canvas, x);
}
sys_vgui("canvas %s -width %d -height %d -bg $select_color -bd 0 -cursor crosshair\n",
lh->h_pathname, LABELHANDLE_WIDTH, LABELHANDLE_HEIGHT);
sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxHRDO}\n",
sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxLABELH %lxHRDO}\n",
canvas, x->x_gui.x_obj.te_xpix+ x->x_gui.x_ldx - LABELHANDLE_WIDTH,
x->x_gui.x_obj.te_ypix + x->x_gui.x_ldy - LABELHANDLE_HEIGHT,
LABELHANDLE_WIDTH, LABELHANDLE_HEIGHT,
lh->h_pathname, x, x);
lh->h_pathname, x, x, x);
sys_vgui("bind %s <Button> {pd [concat %s _click 1 %%x %%y \\;]}\n",
lh->h_pathname, lh->h_bindsym->s_name);
sys_vgui("bind %s <ButtonRelease> {pd [concat %s _click 0 0 0 \\;]}\n",
......@@ -346,7 +346,7 @@ void hradio_draw_select(t_hradio* x, t_glist* glist)
sys_vgui(".x%lx.c delete %lxSCALE\n", canvas, x);
x->x_gui.scale_vis = 0;
sys_vgui("destroy %s\n", lh->h_pathname);
sys_vgui(".x%lx.c delete %lxLABEL\n", canvas, x);
sys_vgui(".x%lx.c delete %lxLABELH\n", canvas, x);
x->x_gui.label_vis = 0;
}
//}
......
......@@ -181,7 +181,7 @@ static void hslider_draw_erase(t_hslider* x,t_glist* glist)
sys_vgui(".x%lx.c delete %lxSCALE\n", canvas, x);
t_scalehandle *lh = (t_scalehandle *)(x->x_gui.x_lhandle);
sys_vgui("destroy %s\n", lh->h_pathname);
sys_vgui(".x%lx.c delete %lxLABEL\n", canvas, x);
sys_vgui(".x%lx.c delete %lxLABELH\n", canvas, x);
}
/*
sys_vgui(".x%lx.c delete %lxBASE\n", canvas, x);
......@@ -297,16 +297,16 @@ static void hslider_draw_select(t_hslider* x,t_glist* glist)
{
if (x->x_gui.label_vis) {
sys_vgui("destroy %s\n", lh->h_pathname);
sys_vgui(".x%lx.c delete %lxLABEL\n", canvas, x);
sys_vgui(".x%lx.c delete %lxLABELH\n", canvas, x);
}
sys_vgui("canvas %s -width %d -height %d -bg $select_color -bd 0 -cursor crosshair\n",
lh->h_pathname, LABELHANDLE_WIDTH, LABELHANDLE_HEIGHT);
sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxHSLDR}\n",
sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxLABELH %lxHSLDR}\n",
canvas, x->x_gui.x_obj.te_xpix+ x->x_gui.x_ldx - LABELHANDLE_WIDTH,
x->x_gui.x_obj.te_ypix + x->x_gui.x_ldy - LABELHANDLE_HEIGHT,
LABELHANDLE_WIDTH, LABELHANDLE_HEIGHT,
lh->h_pathname, x, x);
lh->h_pathname, x, x, x);
sys_vgui("bind %s <Button> {pd [concat %s _click 1 %%x %%y \\;]}\n",
lh->h_pathname, lh->h_bindsym->s_name);
sys_vgui("bind %s <ButtonRelease> {pd [concat %s _click 0 0 0 \\;]}\n",
......@@ -328,7 +328,7 @@ static void hslider_draw_select(t_hslider* x,t_glist* glist)
sys_vgui(".x%lx.c delete %lxSCALE\n", canvas, x);
x->x_gui.scale_vis = 0;
sys_vgui("destroy %s\n", lh->h_pathname);
sys_vgui(".x%lx.c delete %lxLABEL\n", canvas, x);
sys_vgui(".x%lx.c delete %lxLABELH\n", canvas, x);
x->x_gui.label_vis = 0;
}
//}
......
......@@ -102,7 +102,7 @@ void my_canvas_draw_erase(t_my_canvas* x, t_glist* glist)
sys_vgui(".x%lx.c delete %lxSCALE\n", canvas, x);
t_scalehandle *lh = (t_scalehandle *)(x->x_gui.x_lhandle);
sys_vgui("destroy %s\n", lh->h_pathname);
sys_vgui(".x%lx.c delete %lxLABEL\n", canvas, x);
sys_vgui(".x%lx.c delete %lxLABELH\n", canvas, x);
}
//sys_vgui(".x%lx.c delete %lxBASE\n", canvas, x);
//sys_vgui(".x%lx.c delete %lxRECT\n", canvas, x);
......@@ -174,16 +174,16 @@ void my_canvas_draw_select(t_my_canvas* x, t_glist* glist)
{
if (x->x_gui.label_vis) {
sys_vgui("destroy %s\n", lh->h_pathname);
sys_vgui(".x%lx.c delete %lxLABEL\n", canvas, x);
sys_vgui(".x%lx.c delete %lxLABELH\n", canvas, x);
}
sys_vgui("canvas %s -width %d -height %d -bg $select_color -bd 0 -cursor crosshair\n",
lh->h_pathname, LABELHANDLE_WIDTH, LABELHANDLE_HEIGHT);
sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxMYCNV}\n",
sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxLABELH %lxMYCNV}\n",
canvas, x->x_gui.x_obj.te_xpix+ x->x_gui.x_ldx - LABELHANDLE_WIDTH,
x->x_gui.x_obj.te_ypix + x->x_gui.x_ldy - LABELHANDLE_HEIGHT,
LABELHANDLE_WIDTH, LABELHANDLE_HEIGHT,
lh->h_pathname, x, x);
lh->h_pathname, x, x, x);
sys_vgui("bind %s <Button> {pd [concat %s _click 1 %%x %%y \\;]}\n",
lh->h_pathname, lh->h_bindsym->s_name);
sys_vgui("bind %s <ButtonRelease> {pd [concat %s _click 0 0 0 \\;]}\n",
......@@ -204,7 +204,7 @@ void my_canvas_draw_select(t_my_canvas* x, t_glist* glist)
sys_vgui(".x%lx.c delete %lxSCALE\n", canvas, x);
x->x_gui.scale_vis = 0;
sys_vgui("destroy %s\n", lh->h_pathname);
sys_vgui(".x%lx.c delete %lxLABEL\n", canvas, x);
sys_vgui(".x%lx.c delete %lxLABELH\n", canvas, x);
x->x_gui.label_vis = 0;
}
//}
......
......@@ -335,7 +335,7 @@ static void my_numbox_draw_erase(t_my_numbox* x,t_glist* glist)
sys_vgui(".x%lx.c delete %lxSCALE\n", canvas, x);
t_scalehandle *lh = (t_scalehandle *)(x->x_gui.x_lhandle);
sys_vgui("destroy %s\n", lh->h_pathname);
sys_vgui(".x%lx.c delete %lxLABEL\n", canvas, x);
sys_vgui(".x%lx.c delete %lxLABELH\n", canvas, x);
}
/*
sys_vgui(".x%lx.c delete %lxBASE1\n", canvas, x);
......@@ -490,16 +490,16 @@ static void my_numbox_draw_select(t_my_numbox *x, t_glist *glist)
{
if (x->x_gui.label_vis) {
sys_vgui("destroy %s\n", lh->h_pathname);
sys_vgui(".x%lx.c delete %lxLABEL\n", canvas, x);
sys_vgui(".x%lx.c delete %lxLABELH\n", canvas, x);
}
sys_vgui("canvas %s -width %d -height %d -bg $select_color -bd 0 -cursor crosshair\n",
lh->h_pathname, LABELHANDLE_WIDTH, LABELHANDLE_HEIGHT);
sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxNUM}\n",
sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxLABELH %lxNUM}\n",
canvas, x->x_gui.x_obj.te_xpix+ x->x_gui.x_ldx - LABELHANDLE_WIDTH,
x->x_gui.x_obj.te_ypix + x->x_gui.x_ldy - LABELHANDLE_HEIGHT,
LABELHANDLE_WIDTH, LABELHANDLE_HEIGHT,
lh->h_pathname, x, x);
lh->h_pathname, x, x, x);
sys_vgui("bind %s <Button> {pd [concat %s _click 1 %%x %%y \\;]}\n",
lh->h_pathname, lh->h_bindsym->s_name);
sys_vgui("bind %s <ButtonRelease> {pd [concat %s _click 0 0 0 \\;]}\n",
......@@ -532,7 +532,7 @@ static void my_numbox_draw_select(t_my_numbox *x, t_glist *glist)
sys_vgui(".x%lx.c delete %lxSCALE\n", canvas, x);
x->x_gui.scale_vis = 0;
sys_vgui("destroy %s\n", lh->h_pathname);
sys_vgui(".x%lx.c delete %lxLABEL\n", canvas, x);
sys_vgui(".x%lx.c delete %lxLABELH\n", canvas, x);
x->x_gui.label_vis = 0;
}
//}
......
......@@ -163,7 +163,7 @@ void toggle_draw_erase(t_toggle* x, t_glist* glist)
sys_vgui(".x%lx.c delete %lxSCALE\n", canvas, x);
t_scalehandle *lh = (t_scalehandle *)(x->x_gui.x_lhandle);
sys_vgui("destroy %s\n", lh->h_pathname);
sys_vgui(".x%lx.c delete %lxLABEL\n", canvas, x);
sys_vgui(".x%lx.c delete %lxLABELH\n", canvas, x);
}
/*
sys_vgui(".x%lx.c delete %lxBASE\n", canvas, x);
......@@ -296,16 +296,16 @@ void toggle_draw_select(t_toggle* x, t_glist* glist)
{
if (x->x_gui.label_vis) {
sys_vgui("destroy %s\n", lh->h_pathname);
sys_vgui(".x%lx.c delete %lxLABEL\n", canvas, x);
sys_vgui(".x%lx.c delete %lxLABELH\n", canvas, x);
}
sys_vgui("canvas %s -width %d -height %d -bg $select_color -bd 0 -cursor crosshair\n",
lh->h_pathname, LABELHANDLE_WIDTH, LABELHANDLE_HEIGHT);
sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxTGL}\n",
sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxLABELH %lxTGL}\n",
canvas, x->x_gui.x_obj.te_xpix+ x->x_gui.x_ldx - LABELHANDLE_WIDTH,
x->x_gui.x_obj.te_ypix + x->x_gui.x_ldy - LABELHANDLE_HEIGHT,
LABELHANDLE_WIDTH, LABELHANDLE_HEIGHT,
lh->h_pathname, x, x);
lh->h_pathname, x, x, x);
sys_vgui("bind %s <Button> {pd [concat %s _click 1 %%x %%y \\;]}\n",
lh->h_pathname, lh->h_bindsym->s_name);
sys_vgui("bind %s <ButtonRelease> {pd [concat %s _click 0 0 0 \\;]}\n",
......@@ -327,7 +327,7 @@ void toggle_draw_select(t_toggle* x, t_glist* glist)
sys_vgui(".x%lx.c delete %lxSCALE\n", canvas, x);
x->x_gui.scale_vis = 0;
sys_vgui("destroy %s\n", lh->h_pathname);
sys_vgui(".x%lx.c delete %lxLABEL\n", canvas, x);
sys_vgui(".x%lx.c delete %lxLABELH\n", canvas, x);
x->x_gui.label_vis = 0;
}
//}
......
......@@ -175,7 +175,7 @@ void vradio_draw_erase(t_vradio* x, t_glist* glist)
sys_vgui(".x%lx.c delete %lxSCALE\n", canvas, x);
t_scalehandle *lh = (t_scalehandle *)(x->x_gui.x_lhandle);
sys_vgui("destroy %s\n", lh->h_pathname);
sys_vgui(".x%lx.c delete %lxLABEL\n", canvas, x);
sys_vgui(".x%lx.c delete %lxLABELH\n", canvas, x);
}
/*
......@@ -311,16 +311,16 @@ void vradio_draw_select(t_vradio* x, t_glist* glist)
{
if (x->x_gui.label_vis) {
sys_vgui("destroy %s\n", lh->h_pathname);
sys_vgui(".x%lx.c delete %lxLABEL\n", canvas, x);
sys_vgui(".x%lx.c delete %lxLABELH\n", canvas, x);
}
sys_vgui("canvas %s -width %d -height %d -bg $select_color -bd 0 -cursor crosshair\n",
lh->h_pathname, LABELHANDLE_WIDTH, LABELHANDLE_HEIGHT);
sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxVDRO}\n",
sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxLABELH lxVDRO}\n",
canvas, x->x_gui.x_obj.te_xpix+ x->x_gui.x_ldx - LABELHANDLE_WIDTH,
x->x_gui.x_obj.te_ypix + x->x_gui.x_ldy - LABELHANDLE_HEIGHT,
LABELHANDLE_WIDTH, LABELHANDLE_HEIGHT,
lh->h_pathname, x, x);
lh->h_pathname, x, x, x);
sys_vgui("bind %s <Button> {pd [concat %s _click 1 %%x %%y \\;]}\n",
lh->h_pathname, lh->h_bindsym->s_name);
sys_vgui("bind %s <ButtonRelease> {pd [concat %s _click 0 0 0 \\;]}\n",
......@@ -347,7 +347,7 @@ void vradio_draw_select(t_vradio* x, t_glist* glist)
sys_vgui(".x%lx.c delete %lxSCALE\n", canvas, x);
x->x_gui.scale_vis = 0;
sys_vgui("destroy %s\n", lh->h_pathname);
sys_vgui(".x%lx.c delete %lxLABEL\n", canvas, x);
sys_vgui(".x%lx.c delete %lxLABELH\n", canvas, x);
x->x_gui.scale_vis = 0;
}
//}
......
......@@ -184,7 +184,7 @@ static void vslider_draw_erase(t_vslider* x,t_glist* glist)
sys_vgui(".x%lx.c delete %lxSCALE\n", canvas, x);
t_scalehandle *lh = (t_scalehandle *)(x->x_gui.x_lhandle);
sys_vgui("destroy %s\n", lh->h_pathname);
sys_vgui(".x%lx.c delete %lxLABEL\n", canvas, x);
sys_vgui(".x%lx.c delete %lxLABELH\n", canvas, x);
}
/*
sys_vgui(".x%lx.c delete %lxBASE\n", canvas, x);
......@@ -305,16 +305,16 @@ static void vslider_draw_select(t_vslider *x, t_glist *glist)
{
if (x->x_gui.label_vis) {
sys_vgui("destroy %s\n", lh->h_pathname);
sys_vgui(".x%lx.c delete %lxLABEL\n", canvas, x);
sys_vgui(".x%lx.c delete %lxLABELH\n", canvas, x);
}
sys_vgui("canvas %s -width %d -height %d -bg $select_color -bd 0 -cursor crosshair\n",
lh->h_pathname, LABELHANDLE_WIDTH, LABELHANDLE_HEIGHT);
sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxVSLDR}\n",
sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxLABELH %lxVSLDR}\n",
canvas, x->x_gui.x_obj.te_xpix+ x->x_gui.x_ldx - LABELHANDLE_WIDTH,
x->x_gui.x_obj.te_ypix + x->x_gui.x_ldy - LABELHANDLE_HEIGHT,
LABELHANDLE_WIDTH, LABELHANDLE_HEIGHT,
lh->h_pathname, x, x);
lh->h_pathname, x, x, x);
sys_vgui("bind %s <Button> {pd [concat %s _click 1 %%x %%y \\;]}\n",
lh->h_pathname, lh->h_bindsym->s_name);
sys_vgui("bind %s <ButtonRelease> {pd [concat %s _click 0 0 0 \\;]}\n",
......@@ -336,7 +336,7 @@ static void vslider_draw_select(t_vslider *x, t_glist *glist)
sys_vgui(".x%lx.c delete %lxSCALE\n", canvas, x);
x->x_gui.scale_vis = 0;
sys_vgui("destroy %s\n", lh->h_pathname);
sys_vgui(".x%lx.c delete %lxLABEL\n", canvas, x);
sys_vgui(".x%lx.c delete %lxLABELH\n", canvas, x);
x->x_gui.label_vis = 0;
}
//}
......
......@@ -294,7 +294,7 @@ static void vu_draw_erase(t_vu* x,t_glist* glist)
sys_vgui(".x%lx.c delete %lxSCALE\n", canvas, x);
t_scalehandle *lh = (t_scalehandle *)(x->x_gui.x_lhandle);
sys_vgui("destroy %s\n", lh->h_pathname);
sys_vgui(".x%lx.c delete %lxLABEL\n", canvas, x);
sys_vgui(".x%lx.c delete %lxLABELH\n", canvas, x);
}
/*
......@@ -500,16 +500,16 @@ static void vu_draw_select(t_vu* x,t_glist* glist)
{
if (x->x_gui.label_vis) {
sys_vgui("destroy %s\n", lh->h_pathname);
sys_vgui(".x%lx.c delete %lxLABEL\n", canvas, x);
sys_vgui(".x%lx.c delete %lxLABELH\n", canvas, x);
}
sys_vgui("canvas %s -width %d -height %d -bg $select_color -bd 0 -cursor crosshair\n",
lh->h_pathname, LABELHANDLE_WIDTH, LABELHANDLE_HEIGHT);
sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxVU}\n",
sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxLABELH %lxVU}\n",
canvas, x->x_gui.x_obj.te_xpix+ x->x_gui.x_ldx - LABELHANDLE_WIDTH,
x->x_gui.x_obj.te_ypix + x->x_gui.x_ldy - LABELHANDLE_HEIGHT,
LABELHANDLE_WIDTH, LABELHANDLE_HEIGHT,
lh->h_pathname, x, x);
lh->h_pathname, x, x, x);
sys_vgui("bind %s <Button> {pd [concat %s _click 1 %%x %%y \\;]}\n",
lh->h_pathname, lh->h_bindsym->s_name);
sys_vgui("bind %s <ButtonRelease> {pd [concat %s _click 0 0 0 \\;]}\n",
......@@ -543,7 +543,7 @@ static void vu_draw_select(t_vu* x,t_glist* glist)
sys_vgui(".x%lx.c delete %lxSCALE\n", canvas, x);
x->x_gui.scale_vis = 0;
sys_vgui("destroy %s\n", lh->h_pathname);
sys_vgui(".x%lx.c delete %lxLABEL\n", canvas, x);
sys_vgui(".x%lx.c delete %lxLABELH\n", canvas, x);
x->x_gui.label_vis = 0;
}
//}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment