Revision: 2128 http://geany.svn.sourceforge.net/geany/?rev=2128&view=rev Author: eht16 Date: 2007-12-23 07:22:55 -0800 (Sun, 23 Dec 2007)
Log Message: ----------- Add Python filetype template (patch by Elena of Valhalla, thanks).
Modified Paths: -------------- trunk/ChangeLog trunk/src/templates.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2007-12-23 15:20:17 UTC (rev 2127) +++ trunk/ChangeLog 2007-12-23 15:22:55 UTC (rev 2128) @@ -1,6 +1,8 @@ 2007-12-23 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* src/keybindings.c: Fix inverted move tab first/last commands. + * src/templates.c: + Add Python filetype template (patch by Elena of Valhalla, thanks).
2007-12-21 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/src/templates.c =================================================================== --- trunk/src/templates.c 2007-12-23 15:20:17 UTC (rev 2127) +++ trunk/src/templates.c 2007-12-23 15:22:55 UTC (rev 2128) @@ -215,6 +215,16 @@ x = StdClass.new\n\ ";
+static const gchar templates_filetype_python[] = "#!/usr/bin/env python\n#\n\ +{fileheader}\n\n\ +\n\ +def main():\n\ + \n\ + return 0\n\ +\n\ +if __name__ == '__main__': main()\n\ +"; + static gchar *templates[GEANY_MAX_TEMPLATES]; static gchar *ft_templates[GEANY_MAX_FILE_TYPES] = {NULL};
@@ -297,6 +307,7 @@ case GEANY_FILETYPES_PHP: TEMPLATES_CREATE_FILE(fname, templates_filetype_php); break; case GEANY_FILETYPES_HTML: TEMPLATES_CREATE_FILE(fname, templates_filetype_html); break; case GEANY_FILETYPES_RUBY: TEMPLATES_CREATE_FILE(fname, templates_filetype_ruby); break; + case GEANY_FILETYPES_PYTHON: TEMPLATES_CREATE_FILE(fname, templates_filetype_python); break; default: break; } TEMPLATES_READ_FILE(fname, &ft_templates[ft_id]);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.