aboutsummaryrefslogtreecommitdiff
path: root/pd
diff options
context:
space:
mode:
authorMiller Puckette <millerpuckette@users.sourceforge.net>2009-01-06 19:36:42 +0000
committerMiller Puckette <millerpuckette@users.sourceforge.net>2009-01-06 19:36:42 +0000
commitf06fe8bef4964656f56975a97b448c1c788e7cf3 (patch)
tree553d06df3e28c41e45e2cdc2c31ff17ad7e0f303 /pd
parente60dbadb4745a209901a7ce30235e75f805ae6a0 (diff)
0.42-2 (bug fixes)
svn path=/trunk/; revision=10477
Diffstat (limited to 'pd')
-rw-r--r--pd/doc/1.manual/x5.htm8
-rw-r--r--pd/src/g_editor.c8
-rw-r--r--pd/src/g_text.c26
-rw-r--r--pd/src/m_pd.h2
-rw-r--r--pd/src/t_tkcmd.c16
-rw-r--r--pd/src/u_main.tk10
6 files changed, 58 insertions, 12 deletions
diff --git a/pd/doc/1.manual/x5.htm b/pd/doc/1.manual/x5.htm
index 45dd43c9..671d967d 100644
--- a/pd/doc/1.manual/x5.htm
+++ b/pd/doc/1.manual/x5.htm
@@ -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
diff --git a/pd/src/g_editor.c b/pd/src/g_editor.c
index a0125928..0fbce41a 100644
--- a/pd/src/g_editor.c
+++ b/pd/src/g_editor.c
@@ -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);
diff --git a/pd/src/g_text.c b/pd/src/g_text.c
index 30184fcf..b8680e87 100644
--- a/pd/src/g_text.c
+++ b/pd/src/g_text.c
@@ -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;
diff --git a/pd/src/m_pd.h b/pd/src/m_pd.h
index a866b0a0..5162131e 100644
--- a/pd/src/m_pd.h
+++ b/pd/src/m_pd.h
@@ -10,7 +10,7 @@ extern "C" {
#define PD_MAJOR_VERSION 0
#define PD_MINOR_VERSION 42
-#define PD_BUGFIX_VERSION 1
+#define PD_BUGFIX_VERSION 2
#define PD_TEST_VERSION ""
/* old name for "MSW" flag -- we have to take it for the sake of many old
diff --git a/pd/src/t_tkcmd.c b/pd/src/t_tkcmd.c
index 6d863c15..b8cac71e 100644
--- a/pd/src/t_tkcmd.c
+++ b/pd/src/t_tkcmd.c
@@ -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);
diff --git a/pd/src/u_main.tk b/pd/src/u_main.tk
index 394ae087..4a49d460 100644
--- a/pd/src/u_main.tk
+++ b/pd/src/u_main.tk
@@ -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}
}