diff options
author | Michael Hutchinson <mhutchinson@novell.com> | 2009-08-17 20:39:17 +0400 |
---|---|---|
committer | Michael Hutchinson <mhutchinson@novell.com> | 2009-08-17 20:39:17 +0400 |
commit | 1e34ae85778cfe15746fe2bee77bc37b8364cb71 (patch) | |
tree | 7822c759a2edc8c1422f146553955c5a1eae7d50 /main/src | |
parent | 30205de0d8f9f04d6ee32a9e4dcc874e7f456f24 (diff) |
* MonoDevelop.Ide.Templates/ProjectTemplate.cs: Categorise all
templates by language. Fixes regression from de-gpl-ification.
svn path=/trunk/monodevelop/; revision=140084
Diffstat (limited to 'main/src')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/ChangeLog | 6 | ||||
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectTemplate.cs | 15 |
2 files changed, 14 insertions, 7 deletions
diff --git a/main/src/core/MonoDevelop.Ide/ChangeLog b/main/src/core/MonoDevelop.Ide/ChangeLog index 3dccbca329..3abaf21997 100644 --- a/main/src/core/MonoDevelop.Ide/ChangeLog +++ b/main/src/core/MonoDevelop.Ide/ChangeLog @@ -1,3 +1,9 @@ +2009-08-17 Michael Hutchinson <mhutchinson@novell.com> + + * MonoDevelop.Ide.Templates/ProjectTemplate.cs: Categorise all + templates by language. Fixes regression from + de-gpl-ification. + 2009-08-17 Lluis Sanchez Gual <lluis@novell.com> * Makefile.am: diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectTemplate.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectTemplate.cs index c5fd610707..40f905d865 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectTemplate.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectTemplate.cs @@ -159,15 +159,16 @@ namespace MonoDevelop.Ide.Templates ExpandLanguageWildcards (listLanguages); this.languagename = listLanguages [0]; + + if (!String.IsNullOrEmpty (languagename) && !category.StartsWith (languagename + "/")) + category = languagename + "/" + category; - int i = 0; - foreach (string language in listLanguages) { + for (int i = 1; i < listLanguages.Count; i++) { + string language = listLanguages[i]; try { - if (i++ != 0) - ProjectTemplates.Add (new ProjectTemplate (addin, id, codon, language)); - } - catch (Exception e) { - LoggingService.LogFatalError (GettextCatalog.GetString ("Error loading template {0}", codon.Id), e); + ProjectTemplates.Add (new ProjectTemplate (addin, id, codon, language)); + } catch (Exception e) { + LoggingService.LogError (GettextCatalog.GetString ("Error loading template {0} for language {1}", codon.Id, language), e); } } } |