Revision: 4283 http://geany.svn.sourceforge.net/geany/?rev=4283&view=rev Author: ntrel Date: 2009-10-01 16:39:38 +0000 (Thu, 01 Oct 2009)
Log Message: ----------- Warn if custom template file no longer exists.
Modified Paths: -------------- trunk/ChangeLog trunk/src/templates.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-10-01 16:26:44 UTC (rev 4282) +++ trunk/ChangeLog 2009-10-01 16:39:38 UTC (rev 4283) @@ -14,6 +14,8 @@ Only use one 'New with template' submenu - reparent as needed. * src/templates.c: Don't create templates/filetype.none either. + * src/templates.c: + Warn if custom template file no longer exists.
2009-09-30 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/templates.c =================================================================== --- trunk/src/templates.c 2009-10-01 16:26:44 UTC (rev 4282) +++ trunk/src/templates.c 2009-10-01 16:39:38 UTC (rev 4283) @@ -323,12 +323,17 @@ "files", fname, NULL); template = get_template_from_file(path, new_filename, ft); } + if (template) + document_new_file(new_filename, ft, template); + else + { + setptr(fname, utils_get_utf8_from_locale(fname)); + ui_set_statusbar(TRUE, _("Could not find file '%s'."), fname); + } + g_free(template); g_free(path); + g_free(new_filename); g_free(fname); - - document_new_file(new_filename, ft, template); - g_free(template); - g_free(new_filename); }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.