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:
authorMike Krüger <mkrueger@xamarin.com>2011-11-16 01:53:14 +0400
committerMike Krüger <mkrueger@xamarin.com>2011-11-16 01:54:25 +0400
commitbf6facfe5afa17ee03e645805c653ee30adca3c9 (patch)
tree3594de84b07370897f629ee6a569289367787208 /main/src/core
parentd4bb86feeffde09138004e400c77dbf9effd1508 (diff)
Fixed 'Bug 1355 - NullReferenceException when minimising MonoDevelop'.
Diffstat (limited to 'main/src/core')
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/BackgroundProgressMonitor.cs23
1 files changed, 11 insertions, 12 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/BackgroundProgressMonitor.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/BackgroundProgressMonitor.cs
index 768c770e22..8515af1ef8 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/BackgroundProgressMonitor.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/BackgroundProgressMonitor.cs
@@ -26,16 +26,14 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-
using System;
-using System.IO;
using MonoDevelop.Core;
using MonoDevelop.Core.ProgressMonitoring;
using Gtk;
namespace MonoDevelop.Ide.Gui
{
- internal class BackgroundProgressMonitor: SimpleProgressMonitor
+ class BackgroundProgressMonitor: SimpleProgressMonitor
{
string title;
StatusBarIcon icon;
@@ -55,17 +53,18 @@ namespace MonoDevelop.Ide.Gui
protected override void OnProgressChanged ()
{
- if (icon != null) {
- string tip;
- if (Tracker.UnknownWork)
- tip = string.Format ("{0}\n{1}", title, Tracker.CurrentTask);
- else
- tip = string.Format ("{0} ({1}%)\n{2}", title, (int)(Tracker.GlobalWork * 100), Tracker.CurrentTask);
+ if (icon == null)
+ return;
+ string tip;
+ if (Tracker.UnknownWork)
+ tip = string.Format ("{0}\n{1}", title, Tracker.CurrentTask);
+ else
+ tip = string.Format ("{0} ({1}%)\n{2}", title, (int)(Tracker.GlobalWork * 100), Tracker.CurrentTask);
- Application.Invoke (delegate {
+ Application.Invoke (delegate {
+ if (icon != null)
icon.ToolTip = tip;
- });
- }
+ });
}
public override void Dispose()