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
diff options
context:
space:
mode:
authorLluis Sanchez <lluis@xamarin.com>2015-11-18 17:14:03 +0300
committerLluis Sanchez <lluis@xamarin.com>2015-11-25 18:44:59 +0300
commit74881948086cfe253d389d074d44d12f9149fc60 (patch)
treeffdb19809fdd73e84c4a3dc502126803e88d3904 /main/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.Editor
parentd804ac2110c412f444528960a66f2e835a8ec88b (diff)
Asynchronize document load and save operations
Diffstat (limited to 'main/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.Editor')
-rw-r--r--main/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.Editor/CatalogEditorView.cs14
1 files changed, 6 insertions, 8 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 a5ddbc228f..d33b7ec7be 100644
--- a/main/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.Editor/CatalogEditorView.cs
+++ b/main/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.Editor/CatalogEditorView.cs
@@ -36,6 +36,7 @@ using MonoDevelop.Components;
using MonoDevelop.Core;
using MonoDevelop.Ide.Gui;
using MonoDevelop.Ide.Gui.Content;
+using System.Threading.Tasks;
namespace MonoDevelop.Gettext.Editor
{
@@ -53,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)) {
@@ -65,20 +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)
{
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 ()
{