[Monodevelop-patches-list] r866 - in trunk/MonoDevelop/src/Main/Base: Gui/Components/StatusBar Services/StatusBar
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Tue Feb 10 23:42:06 EST 2004
Author: jluke
Date: 2004-02-10 23:42:06 -0500 (Tue, 10 Feb 2004)
New Revision: 866
Modified:
trunk/MonoDevelop/src/Main/Base/Gui/Components/StatusBar/SdStatusBar.cs
trunk/MonoDevelop/src/Main/Base/Services/StatusBar/DefaultStatusBarService.cs
trunk/MonoDevelop/src/Main/Base/Services/StatusBar/IStatusBarService.cs
Log:
use Gnome.AppBar, and cleanup some old SWF code
Modified: trunk/MonoDevelop/src/Main/Base/Gui/Components/StatusBar/SdStatusBar.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Components/StatusBar/SdStatusBar.cs 2004-02-11 04:40:09 UTC (rev 865)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Components/StatusBar/SdStatusBar.cs 2004-02-11 04:42:06 UTC (rev 866)
@@ -5,22 +5,18 @@
// <version value="$version"/>
// </file>
using System;
-//using System.Drawing;
-//using System.Windows.Forms;
using ICSharpCode.SharpDevelop.Services;
using Gtk;
+using Gnome;
namespace ICSharpCode.SharpDevelop.Gui.Components
{
- public class SdStatusBar : HBox, IProgressMonitor
+ public class SdStatusBar : AppBar, IProgressMonitor
{
- ProgressBar statusProgressBar = new ProgressBar ();
-
Statusbar txtStatusBarPanel = new Statusbar ();
Statusbar cursorStatusBarPanel = new Statusbar ();
Statusbar modeStatusBarPanel = new Statusbar ();
- private static GLib.GType type;
-
+ private static GLib.GType gtype;
public Statusbar CursorStatusBarPanel {
get {
@@ -45,45 +41,26 @@
}
}
- static SdStatusBar ()
- {
- type = RegisterGType (typeof (SdStatusBar));
+ public static new GLib.GType GType {
+ get {
+ if (gtype == GLib.GType.Invalid)
+ gtype = RegisterGType (typeof (SdStatusBar));
+ return gtype;
+ }
}
- public SdStatusBar(IStatusBarService manager) : base (type)
+ // FIXME: actually use a Progressbar
+ public SdStatusBar(IStatusBarService manager) : base (false, true, PreferencesType.Never)
{
- //txtStatusBarPanel.Width = 500;
- //txtStatusBarPanel.AutoSize = StatusBarPanelAutoSize.Spring;
txtStatusBarPanel.HasResizeGrip = false;
- //txtStatusBarPanel.Push (1, "test");
this.PackStart (txtStatusBarPanel);
- // manager.Add (new StatusBarContributionItem("TextPanel", txtStatusBarPanel));
- //statusProgressBar.Width = 200;
- //statusProgressBar.Height = 14;
- //statusProgressBar.Location = new Point(160, 4);
- //statusProgressBar.Minimum = 0;
- statusProgressBar.Visible = false;
- //this.PackStart (statusProgressBar, true, false, 0);
-
- //cursorStatusBarPanel.Width = 200;
- //cursorStatusBarPanel.AutoSize = StatusBarPanelAutoSize.None;
- //cursorStatusBarPanel.Alignment = HorizontalAlignment.Left;
cursorStatusBarPanel.HasResizeGrip = false;
- //cursorStatusBarPanel.Push (1, "test");
this.PackStart (cursorStatusBarPanel, true, true, 0);
- //modeStatusBarPanel.Width = 44;
- //modeStatusBarPanel.AutoSize = StatusBarPanelAutoSize.None;
- //modeStatusBarPanel.Alignment = HorizontalAlignment.Right;
modeStatusBarPanel.HasResizeGrip = false;
- //modeStatusBarPanel.Push (1, "test");
this.PackStart (modeStatusBarPanel, true, true, 0);
-
-
- //manager.Add(new StatusBarContributionItem("ProgressBar", statusProgressBar));
-
- //ShowPanels = true;
+
this.ShowAll ();
}
@@ -114,20 +91,20 @@
//oldMessage = txtStatusBarPanel.Pop (1);
SetMessage(name);
//statusProgressBar.Maximum = totalWork;
- statusProgressBar.Visible = true;
+ this.Progress.Visible = true;
}
public void Worked(int work, string status)
{
- statusProgressBar.Fraction = (double) work;
- statusProgressBar.Text = status;
+ this.Progress.Fraction = (double) work;
+ this.Progress.Text = status;
}
public void Done()
{
SetMessage(oldMessage);
oldMessage = null;
- statusProgressBar.Visible = false;
+ this.Progress.Visible = false;
}
public bool Canceled {
@@ -147,9 +124,5 @@
}
}
-
- //public void Dispose() {
- // FIXME PEDRO
- //}
}
}
Modified: trunk/MonoDevelop/src/Main/Base/Services/StatusBar/DefaultStatusBarService.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Services/StatusBar/DefaultStatusBarService.cs 2004-02-11 04:40:09 UTC (rev 865)
+++ trunk/MonoDevelop/src/Main/Base/Services/StatusBar/DefaultStatusBarService.cs 2004-02-11 04:42:06 UTC (rev 866)
@@ -6,8 +6,6 @@
// </file>
using System;
using System.Diagnostics;
-//using System.Drawing;
-//using System.Windows.Forms;
using Gtk;
using ICSharpCode.Core.Services;
@@ -106,16 +104,16 @@
public void Update()
{
Debug.Assert(statusBar != null);
- /* statusBar.Panels.Clear();
- statusBar.Controls.Clear();
+ /*statusBar.Clear ();
+ statusBar.Clear ();
foreach (StatusBarContributionItem item in Items) {
if (item.Control != null) {
- statusBar.Controls.Add(item.Control);
+ statusBar.Add (item.Control);
} else if (item.Panel != null) {
- statusBar.Panels.Add(item.Panel);
+ statusBar.Add (item.Panel);
} else {
- throw new ApplicationException("StatusBarContributionItem " + item.ItemID + " has no Control or Panel defined.");
+ throw new ApplicationException ("StatusBarContributionItem " + item.ItemID + " has no Control or Panel defined.");
}
}*/
}
Modified: trunk/MonoDevelop/src/Main/Base/Services/StatusBar/IStatusBarService.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Services/StatusBar/IStatusBarService.cs 2004-02-11 04:40:09 UTC (rev 865)
+++ trunk/MonoDevelop/src/Main/Base/Services/StatusBar/IStatusBarService.cs 2004-02-11 04:42:06 UTC (rev 866)
@@ -6,11 +6,7 @@
// </file>
using System.Drawing;
using ICSharpCode.SharpDevelop.Gui;
-#if GTK
using Gtk;
-#else
-using System.Windows.Forms;
-#endif
namespace ICSharpCode.SharpDevelop.Services
{
@@ -31,10 +27,9 @@
void ShowErrorMessage(string message);
- void SetMessage(string message);
-#if !LINUX
- void SetMessage(Image image, string message);
-#endif
+ void SetMessage(string message);
+ //void SetMessage(Image image, string message);
+
void SetCaretPosition(int x, int y, int charOffset);
void SetInsertMode(bool insertMode);
More information about the Monodevelop-patches-list
mailing list