diff --git a/pd/src/g_bang.c b/pd/src/g_bang.c index 32c860f6119eaecc9254c198d84515536301fd8e..8e10a625b420f6cbab0d8ac230745a4b30b51656 100644 --- a/pd/src/g_bang.c +++ b/pd/src/g_bang.c @@ -520,7 +520,7 @@ static void bng__motionhook(t_scalehandle *sh, if (properties) { int new_w = x->x_gui.x_w - x->x_gui.scale_offset_x + sh->h_dragx; - int new_h = x->x_gui.x_h - x->x_gui.scale_offset_y + sh->h_dragy; + //int new_h = x->x_gui.x_h - x->x_gui.scale_offset_y + sh->h_dragy; sys_vgui(".gfxstub%lx.dim.w_ent delete 0 end\n", properties); sys_vgui(".gfxstub%lx.dim.w_ent insert 0 %d\n", properties, new_w); //sys_vgui(".gfxstub%lx.dim.h_ent delete 0 end\n", properties); @@ -531,11 +531,6 @@ static void bng__motionhook(t_scalehandle *sh, { t_bng *x = (t_bng *)(sh->h_master); int dx = (int)f1, dy = (int)f2; - int newx, newy; - newx = x->x_gui.x_obj.te_xpix + x->x_gui.x_w - - x->x_gui.scale_offset_x + dx; - newy = x->x_gui.x_obj.te_ypix + x->x_gui.x_h - - x->x_gui.scale_offset_y + dy; sh->h_dragx = dx; sh->h_dragy = dy; diff --git a/pd/src/g_editor.c b/pd/src/g_editor.c index e186a8238360c363a41cc32688a4c887890313fd..adbe5af47dc1f7922f5fc118d9a1939af2389c2e 100644 --- a/pd/src/g_editor.c +++ b/pd/src/g_editor.c @@ -552,9 +552,9 @@ void glist_deselect(t_glist *x, t_gobj *y) { //fprintf(stderr, "deselect\n"); int fixdsp = 0; - static int reenter = 0; + //static int reenter = 0; /* if (reenter) return; */ - reenter = 1; + //reenter = 1; if (x->gl_editor) { t_selection *sel, *sel2; @@ -629,7 +629,7 @@ void glist_deselect(t_glist *x, t_gobj *y) sys_vgui("pdtk_canvas_update_edit_menu .x%lx 0\n", x); canvas_draw_gop_resize_hooks(x); } - reenter = 0; + //reenter = 0; } void glist_noselect(t_glist *x) @@ -2649,7 +2649,7 @@ static void canvas_donecanvasdialog(t_glist *x, { t_float xperpix, yperpix, x1, y1, x2, y2, xpix, ypix, xmargin, ymargin; int rx1=0, ry1=0, rx2=0, ry2=0; //for getrect - int graphme, redraw = 0; + int graphme; xperpix = atom_getfloatarg(0, argc, argv); yperpix = atom_getfloatarg(1, argc, argv); @@ -2718,8 +2718,6 @@ static void canvas_donecanvasdialog(t_glist *x, } else { - if (xperpix != glist_dpixtodx(x, 1) || yperpix != glist_dpixtody(x, 1)) - redraw = 1; if (xperpix > 0) { x->gl_x1 = 0; @@ -4814,7 +4812,7 @@ void canvas_mouseup(t_canvas *x, void canvas_mousedown_middle(t_canvas *x, t_floatarg xpos, t_floatarg ypos, t_floatarg which, t_floatarg mod) { - int shiftmod, runmode, altmod, rightclick, middleclick; + int middleclick; // remove stale tooltips, if any if (objtooltip) @@ -4824,10 +4822,6 @@ void canvas_mousedown_middle(t_canvas *x, t_floatarg xpos, t_floatarg ypos, } // read key and mouse button states - shiftmod = ((int)mod & SHIFTMOD); - runmode = (((int)mod & CTRLMOD) || (!x->gl_edit)); - altmod = ((int)mod & ALTMOD); - rightclick = ((int)mod & RIGHTCLICK); x->gl_editor->e_xwas = (int)xpos; x->gl_editor->e_ywas = (int)ypos; middleclick = (which == 2 ? 1 : 0); @@ -5227,7 +5221,6 @@ void canvas_motion(t_canvas *x, t_floatarg xpos, t_floatarg ypos, &x11, &y11, &x12, &y12)) { int wantwidth = xpos - x11; - t_gotfn sizefn; t_object *ob = pd_checkobject(&y1->g_pd); if (ob && ob->te_pd->c_wb == &text_widgetbehavior || (ob->ob_pd == canvas_class && @@ -6127,7 +6120,7 @@ static void canvas_dopaste(t_canvas *x, t_binbuf *b) do_not_redraw += 1; int was_dnr = do_not_redraw; - t_gobj *newgobj, *g2; + t_gobj *g2; int dspstate = canvas_suspend_dsp(), nbox, count; int canvas_empty = 0; int offset = 1; @@ -6448,8 +6441,8 @@ static void canvas_reselect(t_canvas *x) if ((gwas = x->gl_editor->e_selection->sel_what) && !x->gl_editor->e_selection->sel_next) { - int nobjwas = glist_getindex(x, 0), - indx = canvas_getindex(x, x->gl_editor->e_selection->sel_what); + //int nobjwas = glist_getindex(x, 0); + //int indx = canvas_getindex(x, x->gl_editor->e_selection->sel_what); glist_noselect(x); for (g = x->gl_list; g; g = g->g_next) if (g == gwas) @@ -7105,7 +7098,7 @@ static void canvas_tidy(t_canvas *x) /* LATER might have to speed this up */ static void canvas_tidyold(t_canvas *x) { - t_gobj *y, *y2, *y3; + t_gobj *y, *y2; int ax1, ay1, ax2, ay2, bx1, by1, bx2, by2; int histogram[NHIST], *ip, i, besthist, bestdist; /* if nobody is selected, this means do it to all boxes; diff --git a/pd/src/g_hdial.c b/pd/src/g_hdial.c index 8911e3b24e09a74efb746643fdbcadc8cd3b3a8a..aef8b43bcf7ee091f5361cec8d7988ed63a5f13b 100644 --- a/pd/src/g_hdial.c +++ b/pd/src/g_hdial.c @@ -553,12 +553,6 @@ static void hradio__motionhook(t_scalehandle *sh, { t_bng *x = (t_bng *)(sh->h_master); int dx = (int)f1, dy = (int)f2; - int newx, newy; - newx = x->x_gui.x_obj.te_xpix + x->x_gui.x_w - - x->x_gui.scale_offset_x + dx; - newy = x->x_gui.x_obj.te_ypix + x->x_gui.x_h - - x->x_gui.scale_offset_y + dy; - sh->h_dragx = dx; sh->h_dragy = dy; diff --git a/pd/src/g_hslider.c b/pd/src/g_hslider.c index 8755489b988dc9ee6012c093c03c5ae7c228f9be..ec6656207b13b2e54f00b201151d7eed237485b8 100644 --- a/pd/src/g_hslider.c +++ b/pd/src/g_hslider.c @@ -535,12 +535,6 @@ static void hslider__motionhook(t_scalehandle *sh, { t_bng *x = (t_bng *)(sh->h_master); int dx = (int)f1, dy = (int)f2; - int newx, newy; - newx = x->x_gui.x_obj.te_xpix + x->x_gui.x_w - - x->x_gui.scale_offset_x + dx; - newy = x->x_gui.x_obj.te_ypix + x->x_gui.x_h - - x->x_gui.scale_offset_y + dy; - sh->h_dragx = dx; sh->h_dragy = dy; diff --git a/pd/src/g_mycanvas.c b/pd/src/g_mycanvas.c index 9d41bead54c21801afeb41ef3167aa0f6e09b0c0..b7a5f55d895ed80c1eb1c82c0e596f32667e3e6b 100644 --- a/pd/src/g_mycanvas.c +++ b/pd/src/g_mycanvas.c @@ -427,12 +427,6 @@ static void my_canvas__motionhook(t_scalehandle *sh, { t_my_canvas *x = (t_my_canvas *)(sh->h_master); int dx = (int)f1, dy = (int)f2; - int newx, newy; - newx = x->x_gui.x_obj.te_xpix + x->x_gui.x_ldx - - x->x_gui.label_offset_x + dx; - newy = x->x_gui.x_obj.te_ypix + x->x_gui.x_ldy - - x->x_gui.label_offset_y + dy; - sh->h_dragx = dx; sh->h_dragy = dy; diff --git a/pd/src/g_numbox.c b/pd/src/g_numbox.c index 3e04b7d341938f8efd2e72ea2c3f11cd494bf6e4..b8f86b182bd90c7d9e76b95a8959d6649bfbabef 100644 --- a/pd/src/g_numbox.c +++ b/pd/src/g_numbox.c @@ -783,12 +783,6 @@ static void my_numbox__motionhook(t_scalehandle *sh, { t_bng *x = (t_bng *)(sh->h_master); int dx = (int)f1, dy = (int)f2; - int newx, newy; - newx = x->x_gui.x_obj.te_xpix + x->x_gui.x_w - - x->x_gui.scale_offset_x + dx; - newy = x->x_gui.x_obj.te_ypix + x->x_gui.x_h - - x->x_gui.scale_offset_y + dy; - sh->h_dragx = dx; sh->h_dragy = dy; diff --git a/pd/src/g_scalar.c b/pd/src/g_scalar.c index c49a8d29c884147bcd58d0e67d354599d6e60518..228b2ab107d21461a40d30ea9fae8243c5f49d56 100644 --- a/pd/src/g_scalar.c +++ b/pd/src/g_scalar.c @@ -139,6 +139,7 @@ int template_hasxy(t_template *template) int template_cancreate(t_template *template) { + //return 1; int i, type, nitems = template->t_n; t_dataslot *datatypes = template->t_vec; t_template *elemtemplate; @@ -175,6 +176,7 @@ t_scalar *scalar_new(t_glist *owner, t_symbol *templatesym) } if (!template_cancreate(template)) return (0); + post("ALLÔ"); x = (t_scalar *)getbytes(sizeof(t_scalar) + (template->t_n - 1) * sizeof(*x->sc_vec)); x->sc_gobj.g_pd = scalar_class; diff --git a/pd/src/g_toggle.c b/pd/src/g_toggle.c index 293a7af40160af8a0392238f98300d3497f60990..f98fcaaac86c9c431130a07a03584a407df18456 100644 --- a/pd/src/g_toggle.c +++ b/pd/src/g_toggle.c @@ -538,7 +538,7 @@ static void toggle__motionhook(t_scalehandle *sh, t_floatarg f1, t_floatarg f2) if (properties) { int new_w = x->x_gui.x_w - x->x_gui.scale_offset_x + sh->h_dragx; - int new_h = x->x_gui.x_h - x->x_gui.scale_offset_y + sh->h_dragy; + //int new_h = x->x_gui.x_h - x->x_gui.scale_offset_y + sh->h_dragy; sys_vgui(".gfxstub%lx.dim.w_ent delete 0 end\n", properties); sys_vgui(".gfxstub%lx.dim.w_ent insert 0 %d\n", properties, new_w); //sys_vgui(".gfxstub%lx.dim.h_ent delete 0 end\n", properties); @@ -549,12 +549,6 @@ static void toggle__motionhook(t_scalehandle *sh, t_floatarg f1, t_floatarg f2) { t_bng *x = (t_bng *)(sh->h_master); int dx = (int)f1, dy = (int)f2; - int newx, newy; - newx = x->x_gui.x_obj.te_xpix + x->x_gui.x_w - - x->x_gui.scale_offset_x + dx; - newy = x->x_gui.x_obj.te_ypix + x->x_gui.x_h - - x->x_gui.scale_offset_y + dy; - sh->h_dragx = dx; sh->h_dragy = dy; diff --git a/pd/src/g_vdial.c b/pd/src/g_vdial.c index 4e09d6e95e01b6722b093b6a370cd486055b435a..0fb3f00fc26897b96db70fc981346124d48e0b8b 100644 --- a/pd/src/g_vdial.c +++ b/pd/src/g_vdial.c @@ -155,8 +155,6 @@ void vradio_draw_move(t_vradio *x, t_glist *glist) void vradio_draw_erase(t_vradio* x, t_glist* glist) { t_canvas *canvas=glist_getcanvas(glist); - int n=x->x_number, i; - sys_vgui(".x%lx.c delete %lxVRDO\n", canvas, x); sys_vgui(".x%lx.c dtag all %lxVRDO\n", canvas, x); if (x->x_gui.x_fsf.x_selected) @@ -550,12 +548,6 @@ static void vradio__motionhook(t_scalehandle *sh, { t_bng *x = (t_bng *)(sh->h_master); int dx = (int)f1, dy = (int)f2; - int newx, newy; - newx = x->x_gui.x_obj.te_xpix + x->x_gui.x_w - - x->x_gui.scale_offset_x + dx; - newy = x->x_gui.x_obj.te_ypix + x->x_gui.x_h - - x->x_gui.scale_offset_y + dy; - sh->h_dragx = dx; sh->h_dragy = dy; diff --git a/pd/src/g_vslider.c b/pd/src/g_vslider.c index b80e61fb3ca8afb245bf55bfda682196e1c2162c..6631e521b106f505bcabc1e8dc7732096c075bbb 100644 --- a/pd/src/g_vslider.c +++ b/pd/src/g_vslider.c @@ -544,12 +544,6 @@ static void vslider__motionhook(t_scalehandle *sh, { t_bng *x = (t_bng *)(sh->h_master); int dx = (int)f1, dy = (int)f2; - int newx, newy; - newx = x->x_gui.x_obj.te_xpix + x->x_gui.x_w - - x->x_gui.scale_offset_x + dx; - newy = x->x_gui.x_obj.te_ypix + x->x_gui.x_h - - x->x_gui.scale_offset_y + dy; - sh->h_dragx = dx; sh->h_dragy = dy;