Commit 85815260 authored by Jonathan Wilkes's avatar Jonathan Wilkes Committed by Albert Gräf
Browse files

clean up unused variables and old code

Also fix a type mismatch in dropdown widget (g_text.c) and add
an error check in ALSA audio (s_audio_alsamm.c).
parent 304c64f2
......@@ -428,7 +428,7 @@ void iemgui_shouldvis(t_iemgui *x, int mode)
properties changed we'll adjust our layer position
to ensure that ordering is honored */
t_canvas *canvas = glist_getcanvas(x->x_glist);
t_gobj *y = (t_gobj *)x->x_glist;
//t_gobj *y = (t_gobj *)x->x_glist;
// this crashes when the label goes invisible and then
// needs to be made visible again, so for the time being
// we use the brute force redraw below for both the
......@@ -437,7 +437,6 @@ void iemgui_shouldvis(t_iemgui *x, int mode)
//gobj_vis(y, canvas, 1);
// reorder it visually
glist_redraw(canvas);
}
}
//fprintf(stderr,"draw move x->x_w=%d\n", x->x_w);
......@@ -692,7 +691,8 @@ extern t_class *my_canvas_class;
// in 18 cases only, because canvas does not fit the pattern below.
// canvas has no label handle and has a motion handle
// but in the case of canvas, the "iemgui" tag is added (it wasn't the case originally)
void scalehandle_draw_select(t_scalehandle *h, int px, int py) {
void scalehandle_draw_select(t_scalehandle *h, int px, int py)
{
char tagbuf[MAXPDSTRING];
t_object *x = h->h_master;
t_canvas *canvas=glist_getcanvas(h->h_glist);
......@@ -710,7 +710,8 @@ void scalehandle_draw_select(t_scalehandle *h, int px, int py) {
}
}
void scalehandle_draw_select2(t_iemgui *x) {
void scalehandle_draw_select2(t_iemgui *x)
{
t_canvas *canvas=glist_getcanvas(x->x_glist);
t_class *c = pd_class((t_pd *)x);
int sx,sy;
......@@ -735,29 +736,35 @@ void scalehandle_draw_select2(t_iemgui *x) {
scalehandle_draw_select(x->x_lhandle,x->x_ldx,x->x_ldy);
}
void scalehandle_draw_erase(t_scalehandle *h) {
t_canvas *canvas = glist_getcanvas(h->h_glist);
void scalehandle_draw_erase(t_scalehandle *h)
{
//t_canvas *canvas = glist_getcanvas(h->h_glist);
if (!h->h_vis) return;
gui_vmess("gui_iemgui_label_show_drag_handle", "xxiiii",
h->h_glist, h->h_master, 0, 0, 0, h->h_scale);
h->h_vis = 0;
}
void scalehandle_draw_erase2(t_iemgui *x) {
void scalehandle_draw_erase2(t_iemgui *x)
{
t_scalehandle *sh = (t_scalehandle *)(x->x_handle);
t_scalehandle *lh = (t_scalehandle *)(x->x_lhandle);
if (sh->h_vis) scalehandle_draw_erase(sh);
if (lh->h_vis) scalehandle_draw_erase(lh);
}
void scalehandle_draw(t_iemgui *x) {
if (x->x_glist == glist_getcanvas(x->x_glist)) {
void scalehandle_draw(t_iemgui *x)
{
if (x->x_glist == glist_getcanvas(x->x_glist))
{
if (x->x_selected == x->x_glist) scalehandle_draw_select2(x);
else scalehandle_draw_erase2(x);
}
}
t_scalehandle *scalehandle_new(t_object *x, t_glist *glist, int scale, t_clickhandlefn chf, t_motionhandlefn mhf) {
t_scalehandle *scalehandle_new(t_object *x, t_glist *glist, int scale,
t_clickhandlefn chf, t_motionhandlefn mhf)
{
t_scalehandle *h = (t_scalehandle *)pd_new(scalehandle_class);
char buf[19]; // 3 + max size of %lx
h->h_master = x;
......@@ -784,7 +791,8 @@ t_scalehandle *scalehandle_new(t_object *x, t_glist *glist, int scale, t_clickha
return h;
}
void scalehandle_free(t_scalehandle *h) {
void scalehandle_free(t_scalehandle *h)
{
if (!h->h_scale || pd_class((t_pd *)(h->h_master)) == my_canvas_class)
{ /* only binding label handles and my_canvas resize handle */
pd_unbind((t_pd *)h, h->h_bindsym);
......@@ -792,16 +800,18 @@ void scalehandle_free(t_scalehandle *h) {
pd_free((t_pd *)h);
}
void properties_set_field_int(long props, const char *gui_field, int value) {
void properties_set_field_int(long props, const char *gui_field, int value)
{
char tagbuf[MAXPDSTRING];
sprintf(tagbuf, ".gfxstub%lx", props);
gui_vmess("gui_dialog_set_field", "ssi",
tagbuf,
gui_field,
value);
};
}
void scalehandle_dragon_label(t_scalehandle *h, float mouse_x, float mouse_y) {
void scalehandle_dragon_label(t_scalehandle *h, float mouse_x, float mouse_y)
{
if (h->h_dragon && !h->h_scale)
{
t_iemgui *x = (t_iemgui *)(h->h_master);
......@@ -823,8 +833,8 @@ void scalehandle_dragon_label(t_scalehandle *h, float mouse_x, float mouse_y) {
if (glist_isvisible(x->x_glist))
{
int xpos=text_xpix(&x->x_obj, x->x_glist);
int ypos=text_ypix(&x->x_obj, x->x_glist);
//int xpos=text_xpix(&x->x_obj, x->x_glist);
//int ypos=text_ypix(&x->x_obj, x->x_glist);
//iemgui_getrect_legacy_label(x, &xpos, &ypos);
t_canvas *canvas=glist_getcanvas(x->x_glist);
gui_vmess("gui_iemgui_label_coords", "xxii",
......@@ -836,12 +846,13 @@ void scalehandle_dragon_label(t_scalehandle *h, float mouse_x, float mouse_y) {
}
}
void scalehandle_click_label(t_scalehandle *h) {
void scalehandle_click_label(t_scalehandle *h)
{
t_iemgui *x = (t_iemgui *)h->h_master;
if (glist_isvisible(x->x_glist))
{
//sys_vgui("lower %s\n", h->h_pathname);
t_scalehandle *othersh = x->x_handle;
//t_scalehandle *othersh = x->x_handle;
//sys_vgui("lower .x%lx.h%lx\n",
// (t_int)glist_getcanvas(x->x_glist), (t_int)othersh);
}
......@@ -965,10 +976,11 @@ void iemgui_label_draw_new(t_iemgui *x) {
x->x_fontsize);
}
void iemgui_label_draw_move(t_iemgui *x) {
void iemgui_label_draw_move(t_iemgui *x)
{
t_canvas *canvas=glist_getcanvas(x->x_glist);
int x1=text_xpix(&x->x_obj, x->x_glist)+x->legacy_x;
int y1=text_ypix(&x->x_obj, x->x_glist)+x->legacy_y;
//int x1=text_xpix(&x->x_obj, x->x_glist)+x->legacy_x;
//int y1=text_ypix(&x->x_obj, x->x_glist)+x->legacy_y;
//iemgui_getrect_legacy_label(x, &x1, &y1);
//sys_vgui(".x%lx.c coords %lxLABEL %d %d\n",
// canvas, x, x1+x->x_ldx, y1+x->x_ldy);
......@@ -977,7 +989,7 @@ void iemgui_label_draw_move(t_iemgui *x) {
Ivica's legacy logic isn't affecting us. Quick fix below by
just adding the legacy offsets... */
gui_vmess("gui_iemgui_label_coords", "xxii",
glist_getcanvas(x->x_glist),
canvas,
x,
x->x_ldx + x->legacy_x,
x->x_ldy + x->legacy_y);
......
......@@ -286,7 +286,6 @@ static int garray_get_largest_array(t_garray *x)
t_gobj *g;
t_array *a;
t_garray *tmp;
int an = 0;
// checks if there is a PLOTSTYLE_POLY vs others
// longest array uses has_*, total_* gives total number
......@@ -442,7 +441,6 @@ t_garray *graph_array(t_glist *gl, t_symbol *s, int argc, t_atom *argv)
int n = fsize, zonset, ztype, saveit;
t_symbol *zarraytype;
t_garray *x;
t_pd *x2;
t_template *template, *ztemplate;
t_symbol *templatesym;
int flags = fflags;
......@@ -1081,14 +1079,14 @@ int array_doclick(t_array *array, t_glist *glist, t_scalar *sc, t_array *ap,
/* if it has more than 2000 points, just check 1000 of them. */
int incr = (array->a_n <= 2000 ? 1 : array->a_n / 1000);
t_float pxpix1 = 0.0, pxpix2 = 0.0, pypix = 0.0, pwpix = 0.0,
dx, dy, dy2, dy3;
dy, dy2, dy3;
for (i = 0; i < array->a_n; i += incr)
{
array_getcoordinate(glist, (char *)(array->a_vec) + i * elemsize,
xonset, yonset, wonset, i, xloc, yloc, xinc,
xfield, yfield, wfield, &pxpix1, &pxpix2, &pypix, &pwpix, 1);
//fprintf(stderr," array_getcoordinate %d: pxpix1:%f pxpix2:%f pypix:%f pwpix:%f dx:%f dy:%f elemsize:%d yonset:%d wonset:%d xonset:%d xloc:%f yloc:%f xinc:%f\n", i, pxpix1, pxpix2, pypix, pwpix, dx, dy, elemsize, yonset, wonset, xonset, xloc, yloc, xinc);
// increased following on 20140830 to 8 and updated array_getcoordinate
// increased following on 20140830 to 8 and updated
// array_getcoordinate
// so that the smallest hitbox is always at least 8x8--check with
// all_about_arrays.pd inside custom scalars in an array
if (pwpix < 8)
......@@ -1101,34 +1099,13 @@ int array_doclick(t_array *array, t_glist *glist, t_scalar *sc, t_array *ap,
best = i;
break;
}
/*
if (pwpix < 4)
pwpix = 4;
dx = pxpix1 - xpix;
if (dx < 0) dx = -dx;
if (dx > pxpix2-pxpix1) //this is the arbitrary radius away from the actual object's center, originally 8
continue;
dy = pypix - ypix;
if (dy < 0) dy = -dy;
if (dx + dy < best)
best = dx + dy;
if (wonset >= 0)
{
dy = (pypix + pwpix) - ypix;
if (dy < 0) dy = -dy;
if (dx + dy < best)
best = dx + dy;
dy = (pypix - pwpix) - ypix;
if (dy < 0) dy = -dy;
if (dx + dy < best)
best = dx + dy;
}
//fprintf(stderr," 1st %f %f %f %f %f %d %d %d %d %d\n", pxpix, pypix, pwpix, dx, dy, elemsize, yonset, wonset, xonset, i);*/
}
//fprintf(stderr," best = %f\n", best);
if (best == -1 && (array_joc == 0)) //this is the arbitrary radius away from the actual object's center, originally 8
/* this is the arbitrary radius away from the actual object's
center, originally 8 */
if (best == -1 && (array_joc == 0))
{
//fprintf(stderr," best > 8\n");
//fprintf(stderr,"best > 8\n");
if (scalarvis != 0)
{
//fprintf(stderr," array_doclick_element\n");
......@@ -1143,176 +1120,156 @@ int array_doclick(t_array *array, t_glist *glist, t_scalar *sc, t_array *ap,
return (0);
}
}
//best += 0.001; /* add truncation error margin */
//for (i = 0; i < array->a_n; i += incr)
//{
//array_getcoordinate(glist, (char *)(array->a_vec) + i * elemsize,
// xonset, yonset, wonset, i, xloc, yloc, xinc,
// xfield, yfield, wfield, &pxpix1, &pxpix2, &pypix, &pwpix, 1);
//dx = pxpix1 - xpix;
//if (dx < 0) dx = -dx;
dy = pypix - ypix;
if (dy < 0) dy = -dy;
if (wonset >= 0)
dy = pypix - ypix;
if (dy < 0) dy = -dy;
if (wonset >= 0)
{
dy2 = (pypix + pwpix) - ypix;
if (dy2 < 0) dy2 = -dy2;
dy3 = (pypix - pwpix) - ypix;
if (dy3 < 0) dy3 = -dy3;
if (yonset < 0)
dy = 100;
}
else dy2 = dy3 = 100;
#if 0 // this doesn't seem to be used anywhere -ag
int dx;
int hit = 0;
if(array_joc)
{
hit = (xpix >= pxpix1) && (xpix < pxpix2);
}
else
hit = dx + dy <= best || dx + dy2 <= best || dx + dy3 <= best;
#endif
if (dy < dy2 && dy < dy3)
{
array_motion_fatten = 0;
//fprintf(stderr,"A\n");
}
else if (dy2 < dy3)
{
array_motion_fatten = -1;
//fprintf(stderr,"B\n");
}
else if (!array_joc)
{
array_motion_fatten = 1;
//fprintf(stderr,"C\n");
}
if (doit || (glob_lmclick && array_joc))
{
char *elem = (char *)array->a_vec;
array_motion_elemsize = elemsize;
array_motion_glist = glist;
array_motion_scalar = sc;
array_motion_array = ap;
array_motion_template = elemtemplate;
array_motion_xperpix = glist_dpixtodx(glist, 1);
array_motion_yperpix = glist_dpixtody(glist, 1);
if (alt) /* delete a point */
{
dy2 = (pypix + pwpix) - ypix;
if (dy2 < 0) dy2 = -dy2;
dy3 = (pypix - pwpix) - ypix;
if (dy3 < 0) dy3 = -dy3;
if (yonset < 0)
dy = 100;
if (array->a_n <= 1)
return (0);
memmove((char *)(array->a_vec) + elemsize * i,
(char *)(array->a_vec) + elemsize * (i+1),
(array->a_n - 1 - i) * elemsize);
//array_resize_and_redraw(array, glist, array->a_n - 1);
garray_resize(array_garray, array->a_n - 1);
canvas_setcursor(glist_getcanvas(glist), 0);
return (0);
}
else dy2 = dy3 = 100;
//fprintf(stderr," 2nd %f %f %f %f %f %f %f %d %d %d %d %d\n", pxpix, pypix, pwpix, dx, dy, dy2, dy3, elemsize, yonset, wonset, xonset, i);
//if (dx + dy <= best || dx + dy2 <= best || dx + dy3 <= best)
//{
//fprintf(stderr, "dy=%f dy2=%f dy3=%f\n", dy, dy2, dy3);
/* from array-rev */
#if 0 // this doesn't seem to be used anywhere -ag
int hit = 0;
if(array_joc)
else if (shift)
{
hit = (xpix >= pxpix1) && (xpix < pxpix2);
/* add a point (after the clicked-on one) */
//fprintf(stderr,"add a point\n");
//array_resize_and_redraw(array, glist, array->a_n + 1);
elem = (char *)array->a_vec;
memmove(elem + elemsize * (i+1),
elem + elemsize * i,
(array->a_n - i - 1) * elemsize);
i++;
garray_resize(array_garray, array->a_n + 1);
canvas_setcursor(glist_getcanvas(glist), 0);
}
if (xonset >= 0)
{
//fprintf(stderr, " xonset >=0\n");
array_motion_xfield = xfield;
array_motion_xcumulative =
fielddesc_getcoord(xfield, array_motion_template,
(t_word *)(elem + i * elemsize), 1);
array_motion_wp = (t_word *)(elem + i * elemsize);
if (shift)
array_motion_npoints = array->a_n - i;
else array_motion_npoints = 1;
}
else
hit = dx + dy <= best || dx + dy2 <= best || dx + dy3 <= best;
#endif
/* end array-rev */
if (dy < dy2 && dy < dy3)
{
array_motion_fatten = 0;
//fprintf(stderr,"A\n");
}
else if (dy2 < dy3)
{
array_motion_fatten = -1;
//fprintf(stderr,"B\n");
}
else if (!array_joc)
{
array_motion_fatten = 1;
//fprintf(stderr,"C\n");
}
if (doit || (glob_lmclick && array_joc))
{
char *elem = (char *)array->a_vec;
array_motion_elemsize = elemsize;
array_motion_glist = glist;
array_motion_scalar = sc;
array_motion_array = ap;
array_motion_template = elemtemplate;
array_motion_xperpix = glist_dpixtodx(glist, 1);
array_motion_yperpix = glist_dpixtody(glist, 1);
if (alt) /* delete a point */
{
if (array->a_n <= 1)
return (0);
memmove((char *)(array->a_vec) + elemsize * i,
(char *)(array->a_vec) + elemsize * (i+1),
(array->a_n - 1 - i) * elemsize);
//array_resize_and_redraw(array, glist, array->a_n - 1);
garray_resize(array_garray, array->a_n - 1);
canvas_setcursor(glist_getcanvas(glist), 0);
return (0);
}
else if (shift)
{
/* add a point (after the clicked-on one) */
//fprintf(stderr,"add a point\n");
//array_resize_and_redraw(array, glist, array->a_n + 1);
elem = (char *)array->a_vec;
memmove(elem + elemsize * (i+1),
elem + elemsize * i,
(array->a_n - i - 1) * elemsize);
i++;
garray_resize(array_garray, array->a_n + 1);
canvas_setcursor(glist_getcanvas(glist), 0);
}
if (xonset >= 0)
{
//fprintf(stderr, " xonset >=0\n");
array_motion_xfield = xfield;
array_motion_xcumulative =
fielddesc_getcoord(xfield, array_motion_template,
(t_word *)(elem + i * elemsize), 1);
array_motion_wp = (t_word *)(elem + i * elemsize);
if (shift)
array_motion_npoints = array->a_n - i;
else array_motion_npoints = 1;
}
else
{
//fprintf(stderr, " !(xonset >=0)\n");
array_motion_xfield = 0;
array_motion_xcumulative = 0;
array_motion_wp = (t_word *)elem;
array_motion_npoints = array->a_n;
array_motion_initx = i;
array_motion_lastx = i;
array_motion_xperpix *= (xinc == 0 ? 1 : 1./xinc);
}
if (array_motion_fatten)
{
//fprintf(stderr, " motion_fatten\n");
array_motion_yfield = wfield;
array_motion_ycumulative =
fielddesc_getcoord(wfield, array_motion_template,
(t_word *)(elem + i * elemsize), 1);
array_motion_yperpix *= -array_motion_fatten;
}
else if (yonset >= 0)
{
//fprintf(stderr, " yonset >=0\n");
array_motion_yfield = yfield;
array_motion_ycumulative =
fielddesc_getcoord(yfield, array_motion_template,
(t_word *)(elem + i * elemsize), 1);
/* *(t_float *)((elem + elemsize * i) + yonset); */
//if (array_joc) {
// we do cursor detection based on the kind of a graph.
// (e.g. 3-point PLOYSTYLE_POINTS creates a graph that has 4 delimiting points,
// while a 3-point PLOTSTYLE_POLY creates a graph that has only 3 delimiting points)
// This, therefore takes into account whether we should count the center point
// of a bar or the starting point (poly) as our reference
// TODO: see if we can reimplement Bezier curves
if (array_garray != NULL && (array_garray->x_style == PLOTSTYLE_POLY || array_garray->x_style == PLOTSTYLE_BEZ))
array_motion(0, xpix - pxpix1, ypix - pypix);
else
array_motion(0, (xpix - (pxpix1 + (pxpix2 - pxpix1)/2)), ypix - pypix);
//}
//else {
// array_motion(0, (xpix - (pxpix1 + (pxpix2 - pxpix1)/2)), ypix - pypix);
//}
//fprintf(stderr, "xpix:%d pxpix1:%f half:%f result:%f\n", xpix, pxpix1, (pxpix2-pxpix1)/2, xpix - (pxpix1 + (pxpix2 - pxpix1)/2));
}
else
{
//fprintf(stderr, " else 0\n");
array_motion_yfield = 0;
array_motion_ycumulative = 0;
}
//fprintf(stderr," glist_grab %d %d\n", xpix, ypix);
glist_grab(glist, 0, array_motion, 0, xpix, ypix);
//fprintf(stderr," VALUES: array_motion_initx:%f array_motion_lastx:%d array_motion_xperpix:%f array_motion_xcumulative:%f\n", array_motion_initx, array_motion_lastx, array_motion_xperpix, array_motion_xcumulative);
//fprintf(stderr," array_getcoordinate %d: pxpix1:%f pxpix2:%f pypix:%f pwpix:%f dx:%f dy:%f elemsize:%d yonset:%d wonset:%d xonset:%d xloc:%f yloc:%f xinc:%f\n", i, pxpix1, pxpix2, pypix, pwpix, dx, dy, elemsize, yonset, wonset, xonset, xloc, yloc, xinc);
}
if (alt)
{
return (CURSOR_EDITMODE_DISCONNECT);
}
else if (shift)
{
//fprintf(stderr, " !(xonset >=0)\n");
array_motion_xfield = 0;
array_motion_xcumulative = 0;
array_motion_wp = (t_word *)elem;
array_motion_npoints = array->a_n;
array_motion_initx = i;
array_motion_lastx = i;
array_motion_xperpix *= (xinc == 0 ? 1 : 1./xinc);
}
if (array_motion_fatten)
{
//fprintf(stderr, " motion_fatten\n");
array_motion_yfield = wfield;
array_motion_ycumulative =
fielddesc_getcoord(wfield, array_motion_template,
(t_word *)(elem + i * elemsize), 1);
array_motion_yperpix *= -array_motion_fatten;
}
else if (yonset >= 0)
{
//fprintf(stderr, " yonset >=0\n");
array_motion_yfield = yfield;
array_motion_ycumulative =
fielddesc_getcoord(yfield, array_motion_template,
(t_word *)(elem + i * elemsize), 1);
/* *(t_float *)((elem + elemsize * i) + yonset); */
// we do cursor detection based on the kind of a graph.
// (e.g. 3-point PLOYSTYLE_POINTS creates a graph that has 4
// delimiting points, while a 3-point PLOTSTYLE_POLY creates
// a graph that has only 3 delimiting points)
// This, therefore takes into account whether we should count
// the center point of a bar or the starting point (poly) as
// our reference.
// TODO: see if we can reimplement Bezier curves
if (array_garray != NULL &&
(array_garray->x_style == PLOTSTYLE_POLY ||
array_garray->x_style == PLOTSTYLE_BEZ))
{
return (CURSOR_RUNMODE_ADDPOINT);
array_motion(0, xpix - pxpix1, ypix - pypix);
}
else return (array_motion_fatten ?
CURSOR_RUNMODE_THICKEN : CURSOR_RUNMODE_CLICKME);
//}
//}
else
array_motion(0, (xpix - (pxpix1 + (pxpix2 - pxpix1)/2)),
ypix - pypix);
}
else
{
//fprintf(stderr, " else 0\n");
array_motion_yfield = 0;
array_motion_ycumulative = 0;
}
//fprintf(stderr," glist_grab %d %d\n", xpix, ypix);
glist_grab(glist, 0, array_motion, 0, xpix, ypix);
}
if (alt)
{
return (CURSOR_EDITMODE_DISCONNECT);
}
else if (shift)
{
return (CURSOR_RUNMODE_ADDPOINT);
}
else return (array_motion_fatten ?
CURSOR_RUNMODE_THICKEN : CURSOR_RUNMODE_CLICKME);
}
return (0);
}
......
......@@ -2036,11 +2036,8 @@ static int canvas_open_iter(const char *path, t_canvasopen *co)
int canvas_open(t_canvas *x, const char *name, const char *ext,
char *dirresult, char **nameresult, unsigned int size, int bin)
{
t_namelist *nl, thislist;
int fd = -1;
char listbuf[MAXPDSTRING];
char final_name[FILENAME_MAX];
t_canvas *y;
t_canvasopen co;
sys_expandpathelems(name, final_name);
......
......@@ -488,8 +488,6 @@ EXTERN int canvas_restore_original_position(t_glist *x, t_gobj *y, const char *o
EXTERN void text_setto(t_text *x, t_glist *glist, char *buf, int bufsize, int pos);
EXTERN void text_drawborder(t_text *x, t_glist *glist, char *tag,
int width, int height, int firsttime);
EXTERN void text_drawborder_withtag(t_text *x, t_glist *glist, char *tag,
int width, int height, int firsttime);
EXTERN void text_erase_gobj(t_text *x, t_glist *glist, char *tag);
EXTERN void text_eraseborder(t_text *x, t_glist *glist, char *tag);
EXTERN int text_xcoord(t_text *x, t_glist *glist);
......
......@@ -322,7 +322,7 @@ int canvas_restore_original_position(t_glist *x, t_gobj *y, const char* objtag,
if (pd_class(&y->g_pd) != canvas_class || ((t_glist *)y)->gl_owner == x)
{
t_object *ob = NULL;
t_rtext *yrnxt = NULL, *yr = NULL;
t_rtext *yrnxt = NULL;
if (y->g_next)
{
......@@ -340,10 +340,6 @@ int canvas_restore_original_position(t_glist *x, t_gobj *y, const char* objtag,
{
ret = 1;
}
if (ob)
{
yr = glist_findrtext(x, (t_text *)&ob->ob_g);
}
if (ret != 1)
{
if (dir == -1)
......@@ -455,13 +451,9 @@ void glist_deselectline(t_glist *x)
do {
oc = linetraverser_next(&t);
} while (oc && oc != x->gl_editor->e_selectline_tag);
int issignal;
if(outlet_getsymbol(t.tr_outlet) == &s_signal)
issignal = 1;
else
issignal = 0;
canvas_draw_gop_resize_hooks(x);
sprintf(tagbuf, "l%lx", (long unsigned int)x->gl_editor->e_selectline_tag);
sprintf(tagbuf, "l%lx",
(long unsigned int)x->gl_editor->e_selectline_tag);
gui_vmess("gui_canvas_deselect_line", "xs", x, tagbuf);
}
}
......@@ -2661,7 +2653,8 @@ int garray_properties(t_garray *x, t_symbol **gfxstubp, t_symbol **namep,
void canvas_properties(t_glist *x)
{
t_gobj *y;
char graphbuf[200], *gfx_tag;
//char graphbuf[200];