diff options
author | Lluis Sanchez <lluis@xamarin.com> | 2016-01-12 21:27:25 +0300 |
---|---|---|
committer | Lluis Sanchez <lluis@xamarin.com> | 2016-01-12 21:27:25 +0300 |
commit | 4aea6fd5eea39327fb00ba6db99cd1ee5de8e321 (patch) | |
tree | a756d436d3ef9e0ebc249ed166b6d4b28d51aaa1 /main/src/addins/MonoDevelop.Gettext | |
parent | b44511f4ac1ccdc3de64d4e648cc9634cba007f2 (diff) | |
parent | 0269e49b2df262b86d67ba73d61344f6c9b3ec3c (diff) |
Merge remote-tracking branch 'origin/master' into modifiable-evaluated-properties
Diffstat (limited to 'main/src/addins/MonoDevelop.Gettext')
2 files changed, 10 insertions, 12 deletions
diff --git a/main/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.Editor/CatalogEditorView.cs b/main/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.Editor/CatalogEditorView.cs index cc9aef04b0..d33b7ec7be 100644 --- a/main/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.Editor/CatalogEditorView.cs +++ b/main/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.Editor/CatalogEditorView.cs @@ -32,13 +32,15 @@ using System; using System.Collections.Generic; using Gtk; using Gdk; +using MonoDevelop.Components; using MonoDevelop.Core; using MonoDevelop.Ide.Gui; using MonoDevelop.Ide.Gui.Content; +using System.Threading.Tasks; namespace MonoDevelop.Gettext.Editor { - class CatalogEditorView : AbstractViewContent, IUndoHandler + class CatalogEditorView : ViewContent, IUndoHandler { Catalog catalog; POEditorWidget poEditorWidget; @@ -52,7 +54,7 @@ namespace MonoDevelop.Gettext.Editor }; } - public override void Load (FileOpenInformation fileOpenInformation)
+ public override Task Load (FileOpenInformation fileOpenInformation)
{ var fileName = fileOpenInformation.FileName; // using (IProgressMonitor mon = IdeApp.Workbench.ProgressMonitors.GetLoadProgressMonitor (true)) { @@ -64,21 +66,17 @@ namespace MonoDevelop.Gettext.Editor this.ContentName = fileName; this.IsDirty = false; + return Task.FromResult (true); } - public override void Save (FileSaveInformation fileSaveInformation)
+ public override Task Save (FileSaveInformation fileSaveInformation)
{ - OnBeforeSave (EventArgs.Empty); catalog.Save (fileSaveInformation.FileName); ContentName = fileSaveInformation.FileName; - IsDirty = false;
+ IsDirty = false; + return Task.FromResult (true);
} - public override void Save ()
- { - Save (this.ContentName);
- } - #region IUndoHandler implementation void IUndoHandler.Undo () { @@ -108,7 +106,7 @@ namespace MonoDevelop.Gettext.Editor } #endregion - public override Widget Control + public override Control Control { get { return poEditorWidget; } } diff --git a/main/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.Editor/GettextEditorDisplayBinding.cs b/main/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.Editor/GettextEditorDisplayBinding.cs index a572e7b707..0f9d629cfd 100644 --- a/main/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.Editor/GettextEditorDisplayBinding.cs +++ b/main/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.Editor/GettextEditorDisplayBinding.cs @@ -47,7 +47,7 @@ namespace MonoDevelop.Gettext return filePath.IsNotNull && filePath.HasExtension (".po"); } - public IViewContent CreateContent (FilePath filePath, string mimeType, Project project) + public ViewContent CreateContent (FilePath filePath, string mimeType, Project project) { foreach (TranslationProject tp in IdeApp.Workspace.GetAllItems<TranslationProject> ()) if (tp.BaseDirectory == Path.GetDirectoryName (filePath)) |