Revision: 10609 http://pure-data.svn.sourceforge.net/pure-data/?rev=10609&view=rev Author: eighthave Date: 2009-01-24 05:10:36 +0000 (Sat, 24 Jan 2009)
Log Message: ----------- add support for Max patch file .mxt file extension, which should be the same as a text .pat
Modified Paths: -------------- branches/pd-extended/0.41/pd/src/g_readwrite.c branches/pd-extended/0.41/pd/src/m_binbuf.c branches/pd-extended/0.41/pd/src/u_main.tk
Modified: branches/pd-extended/0.41/pd/src/g_readwrite.c =================================================================== --- branches/pd-extended/0.41/pd/src/g_readwrite.c 2009-01-24 03:21:54 UTC (rev 10608) +++ branches/pd-extended/0.41/pd/src/g_readwrite.c 2009-01-24 05:10:36 UTC (rev 10609) @@ -728,7 +728,8 @@ t_canvas *x2 = canvas_getrootfor(x); char *name = x2->gl_name->s_name; if (*name && strncmp(name, "Untitled", 8) - && (strlen(name) < 4 || strcmp(name + strlen(name)-4, ".pat"))) + && (strlen(name) < 4 || strcmp(name + strlen(name)-4, ".pat") + || strcmp(name + strlen(name)-4, ".mxt"))) canvas_savetofile(x2, x2->gl_name, canvas_getdir(x2)); else canvas_menusaveas(x2); }
Modified: branches/pd-extended/0.41/pd/src/m_binbuf.c =================================================================== --- branches/pd-extended/0.41/pd/src/m_binbuf.c 2009-01-24 03:21:54 UTC (rev 10608) +++ branches/pd-extended/0.41/pd/src/m_binbuf.c 2009-01-24 05:10:36 UTC (rev 10609) @@ -870,7 +870,8 @@ if (*dir) strcat(fbuf, dir), strcat(fbuf, "/"); strcat(fbuf, filename); - if (!strcmp(filename + strlen(filename) - 4, ".pat")) + if (!strcmp(filename + strlen(filename) - 4, ".pat") || + !strcmp(filename + strlen(filename) - 4, ".mxt")) { x = binbuf_convert(x, 0); deleteit = 1; @@ -1348,7 +1349,8 @@ void binbuf_evalfile(t_symbol *name, t_symbol *dir) { t_binbuf *b = binbuf_new(); - int import = !strcmp(name->s_name + strlen(name->s_name) - 4, ".pat"); + int import = !strcmp(name->s_name + strlen(name->s_name) - 4, ".pat") || + !strcmp(name->s_name + strlen(name->s_name) - 4, ".mxt"); /* set filename so that new canvases can pick them up */ int dspstate = canvas_suspend_dsp(); glob_setfilename(0, name, dir);
Modified: branches/pd-extended/0.41/pd/src/u_main.tk =================================================================== --- branches/pd-extended/0.41/pd/src/u_main.tk 2009-01-24 03:21:54 UTC (rev 10608) +++ branches/pd-extended/0.41/pd/src/u_main.tk 2009-01-24 05:10:36 UTC (rev 10609) @@ -29,7 +29,8 @@ # set file types that open/save recognize set filetypes { {{Pd Files} {.pd} } - {{Max Text Files} {.pat} } + {{Max Patch Files} {.pat} } + {{Max Text Files} {.mxt} } } } elseif { $tcl_platform(os) == "Darwin" } { set pd_nt 2 @@ -47,7 +48,8 @@ # set file types that open/save recognize set filetypes { {{Pd Files} {.pd} } - {{Max Text Files (.pat)} {.pat} } + {{Max Patch Files (.pat)} {.pat} } + {{Max Text Files (.mxt)} {.mxt} } } } else { set pd_nt 0 @@ -65,7 +67,8 @@ # set file types that open/save recognize set filetypes { {{pd files} {.pd} } - {{max text files} {.pat} } + {{max patch files} {.pat} } + {{max text files} {.mxt} } } }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.