~ubuntu-branches/ubuntu/saucy/monodevelop/saucy-proposed

« back to all changes in this revision

Viewing changes to src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/AutoSave.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2012-06-22 20:35:35 UTC
  • mfrom: (10.3.2)
  • Revision ID: package-import@ubuntu.com-20120622203535-zrozwvcf6kfk6l6i
Tags: 3.0.3.2+dfsg-1
* [3fd89ae] Imported Upstream version 3.0.3.2+dfsg
* [379a680] Remove old patches we haven't used for ages from git.
* [d71161d] Remove correct_paths_in_monodevelop-core-addins.pc.patch.
  Upstream claim to have fixed this by moving assembly install locations.
* [15dbfb9] Fix install location for MonoDevelop.Gettext.dll.config.
* [26eb434] Fix install location for MonoDevelop.SourceEditor2.dll.config.
* [4169974] Upstream commit 53282c9 which finally reconciles the 
  MonoDevelop.Gettext.dll install location with the 
  monodevelop-core-addins.pc location.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
using System.IO;
30
30
using System.Threading;
31
31
using MonoDevelop.Core;
 
32
using Gtk;
32
33
 
33
34
namespace MonoDevelop.SourceEditor
34
35
{
136
137
                                resetEvent.WaitOne ();
137
138
                                while (queue.Count > 0) {
138
139
                                        var content = queue.Dequeue ();
139
 
                                        lock (contentLock) {
 
140
                                        // Don't create an auto save for unsaved files.
 
141
                                        if (string.IsNullOrEmpty (content.FileName))
 
142
                                                continue;
 
143
                                        Application.Invoke (delegate {
140
144
                                                string text;
141
145
                                                try {
142
146
                                                        text = content.Content.Text;
143
147
                                                } catch (Exception e) {
144
148
                                                        LoggingService.LogError ("Exception in auto save thread.", e);
145
 
                                                        continue;
 
149
                                                        return;
146
150
                                                }
147
151
                                                CreateAutoSave (content.FileName, text);
148
152
                                        }
 
153
                                        );
 
154
                                        
149
155
                                }
150
156
                        }
151
157
                }