Commit c479f04a authored by Miller Puckette's avatar Miller Puckette
Browse files

trying for 0.42-2

parent 18d5e57d
......@@ -20,6 +20,14 @@
<H3> <A name="s2"> 5.1. release notes </A> </H3>
<P> ------------------ 0.42.1 ---------------------------
<P> Bug fix on Windows(cancelling window close deactivated window).
<P> Bug fix running Pd from command line in MacOS.
<P> "Select all" fixed to select none if everything already slected.
<P> ------------------ 0.42 ---------------------------
<P> The 'struct' object can now be used to catch a small but growing variety of
......
......@@ -1864,8 +1864,7 @@ void glob_verifyquit(void *dummy, t_floatarg f)
return;
}
if (f == 0 && sys_perf)
sys_vgui("pdtk_check .x%lx {really quit?} {pd quit;\n} yes\n",
canvas_getrootfor(g2));
sys_vgui("pdtk_check . {really quit?} {pd quit;\n} yes\n");
else glob_quit(0);
}
......@@ -2363,7 +2362,10 @@ static void canvas_selectall(t_canvas *x)
t_gobj *y;
if (!x->gl_edit)
canvas_editmode(x, 1);
for (y = x->gl_list; y; y = y->g_next)
/* if everyone is already selected deselect everyone */
if (!glist_selectionindex(x, 0, 0))
glist_noselect(x);
else for (y = x->gl_list; y; y = y->g_next)
{
if (!glist_isselected(x, y))
glist_select(x, y);
......
......@@ -136,23 +136,39 @@ static void canvas_objtext(t_glist *gl, int xpix, int ypix, int selected,
static void canvas_howputnew(t_canvas *x, int *connectp, int *xpixp, int *ypixp,
int *indexp, int *totalp)
{
int xpix, ypix, indx = 0, nobj = 0, x1, x2, y1, y2;
int xpix, ypix, indx = 0, nobj = 0, n2, x1, x2, y1, y2;
int connectme = (x->gl_editor->e_selection &&
!x->gl_editor->e_selection->sel_next);
if (connectme)
{
t_gobj *g;
t_gobj *g, *selected = x->gl_editor->e_selection->sel_what;
for (g = x->gl_list, nobj = 0; g; g = g->g_next, nobj++)
if (g == x->gl_editor->e_selection->sel_what)
if (g == selected)
{
gobj_getrect(g, x, &x1, &y1, &x2, &y2);
indx = nobj;
*xpixp = x1;
*ypixp = y2 + 5;
}
glist_noselect(x);
/* search back for 'selected' and if it isn't on the list,
plan just to connect from the last item on the list. */
for (g = x->gl_list, n2 = 0; g; g = g->g_next, n2++)
{
if (g == selected)
{
indx = n2;
break;
}
else if (!g->g_next)
indx = nobj-1;
}
}
else
{
glist_getnextxy(x, xpixp, ypixp);
glist_noselect(x);
}
else glist_getnextxy(x, xpixp, ypixp);
glist_noselect(x);
*connectp = connectme;
*indexp = indx;
*totalp = nobj;
......
......@@ -333,7 +333,7 @@ gotit: ;
#ifdef STARTGUI
#define DEBUGCONNECT
/* #define DEBUGCONNECT */
#ifdef DEBUGCONNECT
static FILE *debugfd;
......@@ -621,12 +621,26 @@ int Pdtcl_Init(Tcl_Interp *interp)
int portno = 0, i;
if (argv)
{
/* search for arg of form "-guiport %d"; if so we're the
child. For some reason, the second version is too stringent
a test on MSW so the first, incorrect one, is conditionally
used. */
#ifdef MSW
for (i = 0; i < (int)strlen(argv) - 1; i++)
if (argv[i] >= '0' && argv[i] <= '9')
{
portno = atoi(argv+i);
break;
}
#else
for (i = 0; i < (int)strlen(argv) - 3; i++)
if (argv[i] == ' ' &&
argv[i+1] >= '0' && argv[i+1] <= '9')
{
portno = atoi(argv+i+1);
break;
}
#endif
}
if (portno)
pdgui_setsock(portno);
......
......@@ -283,8 +283,14 @@ proc pdtk_ping {} {
##### routine to ask user if OK and, if so, send a message on to Pd ######
proc pdtk_check {canvas x message default} {
set answer [tk_messageBox -message $x -type yesno -default $default \
-parent $canvas -icon question]
global pd_nt
if {$pd_nt == 1} {
set answer [tk_messageBox -message $x -type yesno -default $default \
-icon question]
} else {
set answer [tk_messageBox -message $x -type yesno -default $default \
-parent $canvas -icon question]
}
if {! [string compare $answer yes]} {pd $message}
}
......
Markdown is supported
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