[Monodevelop-patches-list] r1782 - in trunk/MonoDevelop/src: Libraries/MonoDevelop.Gui.Widgets/DragNotebook Main/StartUp

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Fri Jun 18 23:48:05 EDT 2004


Author: tberman
Date: 2004-06-18 23:48:05 -0400 (Fri, 18 Jun 2004)
New Revision: 1782

Modified:
   trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Widgets/DragNotebook/DragNotebook.cs
   trunk/MonoDevelop/src/Main/StartUp/MonoDevelopMain.cs
Log:
small fixes.


Modified: trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Widgets/DragNotebook/DragNotebook.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Widgets/DragNotebook/DragNotebook.cs	2004-06-19 00:30:46 UTC (rev 1781)
+++ trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Widgets/DragNotebook/DragNotebook.cs	2004-06-19 03:48:05 UTC (rev 1782)
@@ -114,8 +114,12 @@
 				curpage = this.GetNthPage (curpagenum);
 				tab = this.GetTabLabel (curpage);
 				this.ReorderChild (CurrentPageWidget, destpagenum);
-				if (OnTabsReordered != null && destpagenum != -1 && curpagenum != -1)
+				if (OnTabsReordered != null) {
+					if (curpagenum == -1 || destpagenum == -1) {
+						return;
+					}
 					OnTabsReordered (CurrentPageWidget, curpagenum, destpagenum);
+				}
 			}
 		}
 		

Modified: trunk/MonoDevelop/src/Main/StartUp/MonoDevelopMain.cs
===================================================================
--- trunk/MonoDevelop/src/Main/StartUp/MonoDevelopMain.cs	2004-06-19 00:30:46 UTC (rev 1781)
+++ trunk/MonoDevelop/src/Main/StartUp/MonoDevelopMain.cs	2004-06-19 03:48:05 UTC (rev 1782)
@@ -93,14 +93,13 @@
 
 			if (!noLogo) {
 				SplashScreenForm.SplashScreen.ShowAll ();
-				while (Gtk.Application.EventsPending()) {
-					Gtk.Application.RunIteration (false);
-				}
+				RunMainLoop ();
 			}
 
 			bool ignoreDefaultPath = false;
 			string [] addInDirs = MonoDevelop.AddInSettingsHandler.GetAddInDirectories(out ignoreDefaultPath);
 			AddInTreeSingleton.SetAddInDirectories(addInDirs, ignoreDefaultPath);
+			RunMainLoop ();
 
 			ArrayList commands = null;
 			try {
@@ -110,8 +109,10 @@
 				ServiceManager.Services.InitializeServicesSubsystem("/Workspace/Services");
 
 				commands = AddInTreeSingleton.AddInTree.GetTreeNode("/Workspace/Autostart").BuildChildItems(null);
+				RunMainLoop ();
 				for (int i = 0; i < commands.Count - 1; ++i) {
 					((ICommand)commands[i]).Run();
+					RunMainLoop ();
 				}
 
 				// We don't have yet an alternative for Application.ThreadException
@@ -135,6 +136,7 @@
 			listen_socket.Listen (5);
 			listen_socket.BeginAccept (new AsyncCallback (ListenCallback), listen_socket);
 			if (commands.Count > 0) {
+				RunMainLoop ();
 				((ICommand)commands[commands.Count - 1]).Run();
 			}
 
@@ -145,6 +147,13 @@
 
 		static string fileToOpen = String.Empty;
 		
+		static void RunMainLoop ()
+		{
+			while (Gtk.Application.EventsPending()) {
+				Gtk.Application.RunIteration (false);
+			}
+		}
+
 		static void ListenCallback (IAsyncResult state)
 		{
 			Socket client = ((Socket)state.AsyncState).EndAccept (state);




More information about the Monodevelop-patches-list mailing list