Author: lluis
Date: 2007-12-01 12:22:56 -0500 (Sat, 01 Dec 2007)
New Revision: 90515
Modified:
trunk/monodevelop/Extras/MonoDevelop.Gettext/ChangeLog
trunk/monodevelop/Extras/MonoDevelop.Gettext/MonoDevelop.Gettext/GettextFeature.cs
trunk/monodevelop/Extras/MonoDevelop.Gettext/MonoDevelop.Gettext/GettextFeatureWidget.cs
Log:
* MonoDevelop.Gettext/GettextFeature.cs,
MonoDevelop.Gettext/GettextFeatureWidget.cs: Show the gettext
feature when creating new Packaging projects.
Modified: trunk/monodevelop/Extras/MonoDevelop.Gettext/ChangeLog
===================================================================
--- trunk/monodevelop/Extras/MonoDevelop.Gettext/ChangeLog 2007-12-01
17:21:34 UTC (rev 90514)
+++ trunk/monodevelop/Extras/MonoDevelop.Gettext/ChangeLog 2007-12-01
17:22:56 UTC (rev 90515)
@@ -1,5 +1,11 @@
2007-12-01 Lluis Sanchez Gual <[EMAIL PROTECTED]>
+ * MonoDevelop.Gettext/GettextFeature.cs,
+ MonoDevelop.Gettext/GettextFeatureWidget.cs: Show the gettext feature
+ when creating new Packaging projects.
+
+2007-12-01 Lluis Sanchez Gual <[EMAIL PROTECTED]>
+
* MonoDevelop.Gettext.NodeBuilders/TranslationProjectNodeBuilder.cs:
Run the
translation update in a background thread.
* MonoDevelop.Gettext/GettextTool.cs: New command line tool for updating
Modified:
trunk/monodevelop/Extras/MonoDevelop.Gettext/MonoDevelop.Gettext/GettextFeature.cs
===================================================================
---
trunk/monodevelop/Extras/MonoDevelop.Gettext/MonoDevelop.Gettext/GettextFeature.cs
2007-12-01 17:21:34 UTC (rev 90514)
+++
trunk/monodevelop/Extras/MonoDevelop.Gettext/MonoDevelop.Gettext/GettextFeature.cs
2007-12-01 17:22:56 UTC (rev 90515)
@@ -48,7 +48,7 @@
public bool SupportsCombineEntry (Combine parentCombine,
CombineEntry entry)
{
- return (entry is Project) && parentCombine != null;
+ return ((entry is Project) || (entry is
TranslationProject)) && parentCombine != null;
}
public Widget CreateFeatureEditor (Combine parentCombine,
CombineEntry entry)
@@ -58,7 +58,7 @@
public void ApplyFeature (Combine parentCombine, CombineEntry
entry, Widget editor)
{
- ((GettextFeatureWidget)editor).ApplyFeature
(parentCombine, (Project)entry);
+ ((GettextFeatureWidget)editor).ApplyFeature
(parentCombine, entry);
}
public string Validate (Combine parentCombine, CombineEntry
entry, Gtk.Widget editor)
@@ -68,7 +68,7 @@
public bool IsEnabled (Combine parentCombine, CombineEntry
entry)
{
- return false;
+ return entry is TranslationProject;
}
}
}
Modified:
trunk/monodevelop/Extras/MonoDevelop.Gettext/MonoDevelop.Gettext/GettextFeatureWidget.cs
===================================================================
---
trunk/monodevelop/Extras/MonoDevelop.Gettext/MonoDevelop.Gettext/GettextFeatureWidget.cs
2007-12-01 17:21:34 UTC (rev 90514)
+++
trunk/monodevelop/Extras/MonoDevelop.Gettext/MonoDevelop.Gettext/GettextFeatureWidget.cs
2007-12-01 17:22:56 UTC (rev 90515)
@@ -81,15 +81,20 @@
};
}
- public void ApplyFeature (Combine parentCombine, Project
project)
+ public void ApplyFeature (Combine parentCombine, CombineEntry
entry)
{
- TranslationProject newProject = new TranslationProject
();
- newProject.Name = project.Name + "Translation";
- string path = System.IO.Path.Combine
(parentCombine.BaseDirectory, newProject.Name);
- if (!System.IO.Directory.Exists (path))
- System.IO.Directory.CreateDirectory (path);
- newProject.FileName = System.IO.Path.Combine (path,
newProject.Name + ".mdse");
- parentCombine.Entries.Add (newProject);
+ TranslationProject newProject;
+ if (entry is TranslationProject)
+ newProject = (TranslationProject) entry;
+ else {
+ newProject = new TranslationProject ();
+ newProject.Name = entry.Name + "Translation";
+ string path = System.IO.Path.Combine
(parentCombine.BaseDirectory, newProject.Name);
+ if (!System.IO.Directory.Exists (path))
+ System.IO.Directory.CreateDirectory
(path);
+ newProject.FileName = System.IO.Path.Combine
(path, newProject.Name + ".mdse");
+ parentCombine.Entries.Add (newProject);
+ }
TreeIter iter;
if (store.GetIterFirst (out iter)) {
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches