Revision: 977 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=977&view=rev Author: frlan Date: 2009-10-04 21:18:09 +0000 (Sun, 04 Oct 2009)
Log Message: ----------- GeanyLaTeX: Remove extension of custom templates during putting entries to wizard's template pull down.
Modified Paths: -------------- trunk/geanylatex/src/templates.c
Modified: trunk/geanylatex/src/templates.c =================================================================== --- trunk/geanylatex/src/templates.c 2009-10-04 21:17:53 UTC (rev 976) +++ trunk/geanylatex/src/templates.c 2009-10-04 21:18:09 UTC (rev 977) @@ -40,15 +40,18 @@ static void glatex_init_cutom_template_item(gchar *file, GPtrArray *array) { TemplateEntry *template = g_new0(TemplateEntry, 1); - + gchar *tmp = NULL; + /* Return if its not a searched file */ if (g_str_has_suffix(file,".gtl") == FALSE) return;
template->filepath = g_strdup(file);
- template->label = g_path_get_basename(file); - + tmp = g_path_get_basename(file); + template->label = utils_remove_ext_from_filename(tmp); + g_free(tmp); + /* Adding struct to array */ template->template = glatex_get_template_from_file(file); g_ptr_array_add(array, template);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.