[Monodevelop-patches-list] r2326 - in trunk/MonoDevelop/Core/src: MonoDevelop.Base MonoDevelop.Base/Gui/Dialogs MonoDevelop.Startup
Christian Hergert <chris@mosaix.net>
chergert at mono-cvs.ximian.com
Fri Mar 11 01:15:27 EST 2005
Author: chergert
Date: 2005-03-11 01:15:27 -0500 (Fri, 11 Mar 2005)
New Revision: 2326
Modified:
trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog
trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Dialogs/SplashScreen.cs
trunk/MonoDevelop/Core/src/MonoDevelop.Startup/ChangeLog
trunk/MonoDevelop/Core/src/MonoDevelop.Startup/MonoDevelopMain.cs
Log:
Core/src/MonoDevelop.Base/Gui/Dialogs/SplashScreen.cs: Add progress bar
to display information on the startup sequence.
Core/src/MonoDevelop.Startup/MonoDevelopMain.cs: Call the new progress
methods in the splash screen.
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog 2005-03-10 16:57:39 UTC (rev 2325)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog 2005-03-11 06:15:27 UTC (rev 2326)
@@ -1,3 +1,9 @@
+2005-03-10 Christian Hergert <christian.hergert at gmail.com>
+
+ * Gui/Dialogs/SplashScreen.cs: Add progress bar with status
+ message support. Will help users with slow initial startup
+ times.
+
2005-03-09 John Luke <john.luke at gmail.com>
* Gui/Workbench/Layouts/SdiWorkspaceLayout.cs:
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Dialogs/SplashScreen.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Dialogs/SplashScreen.cs 2005-03-10 16:57:39 UTC (rev 2325)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Dialogs/SplashScreen.cs 2005-03-11 06:15:27 UTC (rev 2326)
@@ -11,6 +11,8 @@
static SplashScreenForm splashScreen = new SplashScreenForm();
static ArrayList requestedFileList = new ArrayList();
static ArrayList parameterList = new ArrayList();
+ static ProgressBar progress;
+ static VBox vbox;
public static SplashScreenForm SplashScreen {
get {
@@ -24,11 +26,22 @@
this.WindowPosition = WindowPosition.Center;
this.TypeHint = Gdk.WindowTypeHint.Splashscreen;
Gdk.Pixbuf bitmap = new Gdk.Pixbuf(Assembly.GetEntryAssembly(), "SplashScreen.png");
- DefaultWidth = bitmap.Width;
- DefaultHeight = bitmap.Height;
Gtk.Image image = new Gtk.Image (bitmap);
image.Show ();
- this.Add (image);
+
+ HBox hbox = new HBox();
+ hbox.PackStart(new Label(" "), false, false, 0);
+ progress = new ProgressBar();
+ progress.Fraction = 0.00;
+ hbox.PackStart(progress, true, true, 0);
+ hbox.PackStart(new Label(" "), false, false, 0);
+ hbox.ShowAll();
+
+ vbox = new VBox();
+ vbox.PackStart(image, true, true, 0);
+ vbox.PackStart(hbox, false, true, 5);
+
+ this.Add (vbox);
}
public static string[] GetParameterList()
@@ -45,6 +58,16 @@
{
return (string[])list.ToArray(typeof(string));
}
+
+ public static void SetProgress(double Percentage)
+ {
+ progress.Fraction = Percentage;
+ }
+
+ public static void SetMessage(string Message)
+ {
+ progress.Text = Message;
+ }
public static void SetCommandLineArgs(string[] args)
{
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Startup/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Startup/ChangeLog 2005-03-10 16:57:39 UTC (rev 2325)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Startup/ChangeLog 2005-03-11 06:15:27 UTC (rev 2326)
@@ -1,3 +1,8 @@
+2005-03-10 Christian Hergert <christian.hergert at gmail.com>
+
+ * MonoDevelopMain.cs: Update the splash screen percentages
+ and status messages.
+
2005-01-27 John Luke <john.luke at gmail.com>
* MonoDevelopMain.cs: remove unused code that
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Startup/MonoDevelopMain.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Startup/MonoDevelopMain.cs 2005-03-10 16:57:39 UTC (rev 2325)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Startup/MonoDevelopMain.cs 2005-03-11 06:15:27 UTC (rev 2326)
@@ -105,6 +105,7 @@
RunMainLoop ();
}
+ SetSplashInfo(0.05, "Initializing Addins ...");
bool ignoreDefaultPath = false;
string [] addInDirs = MonoDevelop.AddInSettingsHandler.GetAddInDirectories(out ignoreDefaultPath);
AddInTreeSingleton.SetAddInDirectories(addInDirs, ignoreDefaultPath);
@@ -112,12 +113,18 @@
ArrayList commands = null;
try {
+ SetSplashInfo(0.1, "Initializing Icon Service ...");
ServiceManager.AddService(new IconService());
+ SetSplashInfo(0.2, "Initializing Message Service ...");
ServiceManager.AddService(new MessageService());
+ SetSplashInfo(0.4, "Initializing Resource Service ...");
ServiceManager.AddService(new ResourceService());
+ SetSplashInfo(0.6, "Initializing Addin Services ...");
ServiceManager.InitializeServicesSubsystem("/Workspace/Services");
+ SetSplashInfo(0.8, "Initializing Autostart Addins ...");
commands = AddInTreeSingleton.AddInTree.GetTreeNode("/Workspace/Autostart").BuildChildItems(null);
+ SetSplashInfo(1, "Loading MonoDevelop Workbench ...");
RunMainLoop ();
for (int i = 0; i < commands.Count - 1; ++i) {
((ICommand)commands[i]).Run();
@@ -165,6 +172,13 @@
return 0;
}
+ static void SetSplashInfo(double Percentage, string Message)
+ {
+ SplashScreenForm.SetProgress(Percentage);
+ SplashScreenForm.SetMessage(Message);
+ RunMainLoop();
+ }
+
static string fileToOpen = String.Empty;
static void RunMainLoop ()
More information about the Monodevelop-patches-list
mailing list