[Gridflow-cvs] [svn] commit: r5955 - /trunk/src/classes2.cxx

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Wed Aug 4 20:00:25 EDT 2010


Author: matju
Date: Wed Aug  4 20:00:23 2010
New Revision: 5955

Log:
canvas_reflecttitle is static in pd 41, thus we need a copy of it here (yuck) until we depend on 42

Modified:
    trunk/src/classes2.cxx

Modified: trunk/src/classes2.cxx
==============================================================================
--- trunk/src/classes2.cxx (original)
+++ trunk/src/classes2.cxx Wed Aug  4 20:00:23 2010
@@ -165,7 +165,35 @@
   default: return "unknown type";}}
 #undef Z
 
+#if 1 /* included from Pd 41, sorry */
+static void canvas_reflecttitle(t_canvas *x)
+{
+    char namebuf[MAXPDSTRING];
+    t_canvasenvironment *env = canvas_getenv(x);
+    if (env->ce_argc)
+    {
+        int i;
+        strcpy(namebuf, " (");
+        for (i = 0; i < env->ce_argc; i++)
+        {
+            if (strlen(namebuf) > MAXPDSTRING/2 - 5)
+                break;
+            if (i != 0)
+                strcat(namebuf, " ");
+            atom_string(&env->ce_argv[i], namebuf + strlen(namebuf),
+                MAXPDSTRING/2);
+        }
+        strcat(namebuf, ")");
+    }
+    else namebuf[0] = 0;
+    sys_vgui("wm title .x%lx {%s%c%s - %s}\n",
+        x, x->gl_name->s_name, (x->gl_dirty? '*' : ' '), namebuf,
+            canvas_getdir(x)->s_name);
+}
+#else
 extern "C" void canvas_reflecttitle (t_glist *);
+#endif
+
 #define binbuf_addv(B,S,A...) binbuf_addv(B,const_cast<char *>(S),A)
 #define BOF t_binbuf *b = ((t_object *)canvas)->te_binbuf; if (!b) RAISE("no parent for canvas containing [setargs]");
 \class GFSetArgs : FObject {



More information about the Gridflow-cvs mailing list