Revision: 5196 http://geany.svn.sourceforge.net/geany/?rev=5196&view=rev Author: ntrel Date: 2010-08-24 16:01:14 +0000 (Tue, 24 Aug 2010)
Log Message: ----------- Rename Matlab -> Matlab/Octave. Datafile name remains the same.
Modified Paths: -------------- trunk/ChangeLog trunk/src/filetypes.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-08-24 12:17:33 UTC (rev 5195) +++ trunk/ChangeLog 2010-08-24 16:01:14 UTC (rev 5196) @@ -10,6 +10,8 @@ * src/search.c: Include all files if the Find in Files pattern field is enabled and empty. + * src/filetypes.c: + Rename Matlab -> Matlab/Octave. Datafile name remains the same.
2010-08-23 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/src/filetypes.c =================================================================== --- trunk/src/filetypes.c 2010-08-24 12:17:33 UTC (rev 5195) +++ trunk/src/filetypes.c 2010-08-24 16:01:14 UTC (rev 5196) @@ -598,7 +598,7 @@ #define MATLAB ft = filetypes[GEANY_FILETYPES_MATLAB]; ft->lang = 32; - ft->name = g_strdup("Matlab"); + ft->name = g_strdup("Matlab/Octave"); filetype_make_title(ft, TITLE_SOURCE_FILE); ft->extension = g_strdup("m"); ft->pattern = utils_strv_new("*.m", NULL); @@ -1345,7 +1345,7 @@
gchar *filetypes_get_conf_extension(gint filetype_idx) { - gchar *result; + gchar *result, *ptr; GeanyFiletype *ft = filetypes[filetype_idx];
if (ft->priv->custom) @@ -1357,7 +1357,13 @@ case GEANY_FILETYPES_CPP: result = g_strdup("cpp"); break; case GEANY_FILETYPES_CS: result = g_strdup("cs"); break; case GEANY_FILETYPES_MAKE: result = g_strdup("makefile"); break; - default: result = g_ascii_strdown(ft->name, -1); break; + default: + result = g_ascii_strdown(ft->name, -1); + /* truncate at slash (e.g. for Matlab/Octave) */ + ptr = strstr(result, "/"); + if (ptr) + *ptr = 0x0; + break; } return result; }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.