Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/Extras
diff options
context:
space:
mode:
authorLluis Sanchez <lluis@novell.com>2007-12-01 20:22:56 +0300
committerLluis Sanchez <lluis@novell.com>2007-12-01 20:22:56 +0300
commit90159dafe3d2d0a90b3c877af162aa31cefc3a65 (patch)
treea585c25753a464f57b4787d7550a28b3404a3d71 /Extras
parent54366f7c40e31489f8374544d8e099f3bfb9a7ee (diff)
* MonoDevelop.Gettext/GettextFeature.cs,
MonoDevelop.Gettext/GettextFeatureWidget.cs: Show the gettext feature when creating new Packaging projects. svn path=/trunk/monodevelop/; revision=90515
Diffstat (limited to 'Extras')
-rw-r--r--Extras/MonoDevelop.Gettext/ChangeLog6
-rw-r--r--Extras/MonoDevelop.Gettext/MonoDevelop.Gettext/GettextFeature.cs6
-rw-r--r--Extras/MonoDevelop.Gettext/MonoDevelop.Gettext/GettextFeatureWidget.cs21
3 files changed, 22 insertions, 11 deletions
diff --git a/Extras/MonoDevelop.Gettext/ChangeLog b/Extras/MonoDevelop.Gettext/ChangeLog
index e740c0924c..d3b0f923cf 100644
--- a/Extras/MonoDevelop.Gettext/ChangeLog
+++ b/Extras/MonoDevelop.Gettext/ChangeLog
@@ -1,5 +1,11 @@
2007-12-01 Lluis Sanchez Gual <lluis@novell.com>
+ * MonoDevelop.Gettext/GettextFeature.cs,
+ MonoDevelop.Gettext/GettextFeatureWidget.cs: Show the gettext feature
+ when creating new Packaging projects.
+
+2007-12-01 Lluis Sanchez Gual <lluis@novell.com>
+
* MonoDevelop.Gettext.NodeBuilders/TranslationProjectNodeBuilder.cs: Run the
translation update in a background thread.
* MonoDevelop.Gettext/GettextTool.cs: New command line tool for updating
diff --git a/Extras/MonoDevelop.Gettext/MonoDevelop.Gettext/GettextFeature.cs b/Extras/MonoDevelop.Gettext/MonoDevelop.Gettext/GettextFeature.cs
index e8116a6d33..2f4a1c55a1 100644
--- a/Extras/MonoDevelop.Gettext/MonoDevelop.Gettext/GettextFeature.cs
+++ b/Extras/MonoDevelop.Gettext/MonoDevelop.Gettext/GettextFeature.cs
@@ -48,7 +48,7 @@ namespace MonoDevelop.Gettext
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 @@ namespace MonoDevelop.Gettext
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 @@ namespace MonoDevelop.Gettext
public bool IsEnabled (Combine parentCombine, CombineEntry entry)
{
- return false;
+ return entry is TranslationProject;
}
}
}
diff --git a/Extras/MonoDevelop.Gettext/MonoDevelop.Gettext/GettextFeatureWidget.cs b/Extras/MonoDevelop.Gettext/MonoDevelop.Gettext/GettextFeatureWidget.cs
index 01d8a84a01..6388dfc1e6 100644
--- a/Extras/MonoDevelop.Gettext/MonoDevelop.Gettext/GettextFeatureWidget.cs
+++ b/Extras/MonoDevelop.Gettext/MonoDevelop.Gettext/GettextFeatureWidget.cs
@@ -81,15 +81,20 @@ namespace MonoDevelop.Gettext
};
}
- 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)) {