[Monodevelop-patches-list] r2071 - in trunk/MonoDevelop/Core/src/Main/Base: . Services/StatusBar
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Mon Dec 13 15:39:04 EST 2004
Author: lluis
Date: 2004-12-13 15:39:04 -0500 (Mon, 13 Dec 2004)
New Revision: 2071
Modified:
trunk/MonoDevelop/Core/src/Main/Base/ChangeLog
trunk/MonoDevelop/Core/src/Main/Base/Services/StatusBar/DefaultStatusBarService.cs
Log:
2004-12-13 Lluis Sanchez Gual <lluis at novell.com>
* Services/StatusBar/DefaultStatusBarService.cs: Made it gui thread safe.
Modified: trunk/MonoDevelop/Core/src/Main/Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/ChangeLog 2004-12-12 01:15:58 UTC (rev 2070)
+++ trunk/MonoDevelop/Core/src/Main/Base/ChangeLog 2004-12-13 20:39:04 UTC (rev 2071)
@@ -1,3 +1,7 @@
+2004-12-13 Lluis Sanchez Gual <lluis at novell.com>
+
+ * Services/StatusBar/DefaultStatusBarService.cs: Made it gui thread safe.
+
2004-12-11 Alexandre Gomes <alexmipego at hotmail.com>
* Commands/EditCommands.cs,
Modified: trunk/MonoDevelop/Core/src/Main/Base/Services/StatusBar/DefaultStatusBarService.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Services/StatusBar/DefaultStatusBarService.cs 2004-12-12 01:15:58 UTC (rev 2070)
+++ trunk/MonoDevelop/Core/src/Main/Base/Services/StatusBar/DefaultStatusBarService.cs 2004-12-13 20:39:04 UTC (rev 2071)
@@ -15,7 +15,7 @@
namespace MonoDevelop.Services
{
- public class DefaultStatusBarService : AbstractService, IStatusBarService
+ public class DefaultStatusBarService : GuiSyncAbstractService, IStatusBarService, IProgressMonitor
{
SdStatusBar statusBar = null;
StringParserService stringParserService = Runtime.StringParserService;
@@ -43,10 +43,36 @@
public IProgressMonitor ProgressMonitor {
get {
Debug.Assert(statusBar != null);
- return statusBar;
+ return this;
}
}
+
+ void IProgressMonitor.BeginTask (string name, int totalWork)
+ {
+ statusBar.BeginTask (name, totalWork);
+ }
+
+ void IProgressMonitor.Worked (double work, string status)
+ {
+ statusBar.Worked (work, status);
+ }
+
+ void IProgressMonitor.Done()
+ {
+ statusBar.Done ();
+ }
+
+ bool IProgressMonitor.Canceled {
+ get { return statusBar.Canceled; }
+ set { statusBar.Canceled = value; }
+ }
+
+ string IProgressMonitor.TaskName {
+ get { return statusBar.TaskName; }
+ set { statusBar.TaskName = value; }
+ }
+
public bool CancelEnabled {
get {
return statusBar != null && statusBar.CancelEnabled;
@@ -57,22 +83,26 @@
}
}
+ [AsyncDispatch]
public void SetCaretPosition (int ln, int col, int ch)
{
statusBar.SetCursorPosition (ln, col, ch);
}
+ [AsyncDispatch]
public void SetInsertMode (bool insertMode)
{
statusBar.ModeStatusBarPanel.Push (1, insertMode ? GettextCatalog.GetString ("INS") : GettextCatalog.GetString ("OVR"));
}
+ [AsyncDispatch]
public void ShowErrorMessage (string message)
{
Debug.Assert(statusBar != null);
statusBar.ShowErrorMessage(stringParserService.Parse(message));
}
+ [AsyncDispatch]
public void SetMessage (string message)
{
Debug.Assert(statusBar != null);
@@ -80,6 +110,7 @@
statusBar.SetMessage(stringParserService.Parse(message));
}
+ [AsyncDispatch]
public void SetMessage(Gtk.Image image, string message)
{
Debug.Assert(statusBar != null);
@@ -89,6 +120,8 @@
bool wasError = false;
string lastMessage = "";
+
+ [AsyncDispatch]
public void RedrawStatusbar()
{
if (wasError) {
@@ -98,6 +131,7 @@
}
}
+ [AsyncDispatch]
public void Update()
{
Debug.Assert(statusBar != null);
More information about the Monodevelop-patches-list
mailing list