Revision: 10610 http://pure-data.svn.sourceforge.net/pure-data/?rev=10610&view=rev Author: eighthave Date: 2009-01-24 05:13:33 +0000 (Sat, 24 Jan 2009)
Log Message: ----------- add support for Max patch file .mxt file extension, which should be the same file format as a text .pat, submitted to the patch tracker as 2532431
Added Paths: ----------- trunk/packages/patches/add_mxt_file_extension_support-0.41.4.patch
Added: trunk/packages/patches/add_mxt_file_extension_support-0.41.4.patch =================================================================== --- trunk/packages/patches/add_mxt_file_extension_support-0.41.4.patch (rev 0) +++ trunk/packages/patches/add_mxt_file_extension_support-0.41.4.patch 2009-01-24 05:13:33 UTC (rev 10610) @@ -0,0 +1,72 @@ +Index: u_main.tk +=================================================================== +--- u_main.tk (revision 10595) ++++ u_main.tk (working copy) +@@ -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} } + } + } + +Index: m_binbuf.c +=================================================================== +--- m_binbuf.c (revision 10506) ++++ m_binbuf.c (working copy) +@@ -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); +Index: g_readwrite.c +=================================================================== +--- g_readwrite.c (revision 10497) ++++ g_readwrite.c (working copy) +@@ -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); + }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.