[PD-cvs] externals/grill/dynext/src main.cpp,1.1,1.2
Thomas Grill
xovo at users.sourceforge.net
Wed Jan 19 06:00:01 CET 2005
Update of /cvsroot/pure-data/externals/grill/dynext/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9595/src
Modified Files:
main.cpp
Log Message:
- strip .pd from abstraction filenames
- open debug patcher on alt-click
Index: main.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/dynext/src/main.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** main.cpp 27 Oct 2004 19:18:54 -0000 1.1
--- main.cpp 19 Jan 2005 04:59:59 -0000 1.2
***************
*** 3,7 ****
dyn~ - dynamical object management for PD
! Copyright (c)2003-2004 Thomas Grill (xovo at gmx.net)
For information on usage and redistribution, and for a DISCLAIMER OF ALL
WARRANTIES, see the file, "license.txt," in this distribution.
--- 3,7 ----
dyn~ - dynamical object management for PD
! Copyright (c)2003-2005 Thomas Grill (gr at grrrr.org)
For information on usage and redistribution, and for a DISCLAIMER OF ALL
WARRANTIES, see the file, "license.txt," in this distribution.
***************
*** 14,19 ****
#include <flext.h>
! #if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 406)
! #error You need at least flext version 0.4.6
#endif
--- 14,19 ----
#include <flext.h>
! #if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 500)
! #error You need at least flext version 0.5.0
#endif
***************
*** 56,59 ****
--- 56,61 ----
protected:
+ virtual void m_click() { m_vis(true); }
+
static const t_symbol *k_obj,*k_msg,*k_text;
***************
*** 197,201 ****
{
post("");
! post("dyn~ %s - dynamic object management, (C)2003-04 Thomas Grill",DYN_VERSION);
post("");
--- 199,203 ----
{
post("");
! post("dyn~ %s - dynamic object management, (C)2003-2005 Thomas Grill",DYN_VERSION);
post("");
***************
*** 456,459 ****
--- 458,476 ----
err = "Canvas could not be found";
else {
+ // convert abstraction filenames
+ if(kind == k_obj && argc >= 3 && IsSymbol(argv[2])) {
+ const char *c = GetString(argv[2]);
+ int l = strlen(c);
+ // check end of string for .pd file extension
+ if(l >= 4 && !memcmp(c+l-3,".pd",4)) {
+ // found -> get rid of it
+ char tmp[64],*t = tmp;
+ if(l > sizeof tmp-1) t = new char[l+1];
+ memcpy(tmp,c,l-3); tmp[l-3] = 0;
+ SetString(argv[2],tmp);
+ if(tmp != t) delete[] t;
+ }
+ }
+
// set selected canvas as current
canvas_setcurrent(glist);
More information about the Pd-cvs
mailing list