[Monodevelop-patches-list] r517 - in trunk/MonoDevelop/src: AddIns/DisplayBindings/TextEditor/Gui/Editor Main/Base/Gui/Components

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Sat Jan 17 01:28:21 EST 2004


Author: tberman
Date: 2004-01-17 01:28:20 -0500 (Sat, 17 Jan 2004)
New Revision: 517

Modified:
   trunk/MonoDevelop/src/AddIns/DisplayBindings/TextEditor/Gui/Editor/SharpDevelopTextAreaControl.cs
   trunk/MonoDevelop/src/Main/Base/Gui/Components/SdMenu.cs
Log:
fixed ugly perf regression caused by previous bugfix, now ben will shut his damn mouth! :)


Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/TextEditor/Gui/Editor/SharpDevelopTextAreaControl.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/TextEditor/Gui/Editor/SharpDevelopTextAreaControl.cs	2004-01-17 06:10:30 UTC (rev 516)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/TextEditor/Gui/Editor/SharpDevelopTextAreaControl.cs	2004-01-17 06:28:20 UTC (rev 517)
@@ -60,9 +60,13 @@
 			statusBarService.SetCaretPosition(ActiveTextAreaControl.TextArea.TextView.GetVisualColumn(ActiveTextAreaControl.Caret.Line, ActiveTextAreaControl.Caret.Column), ActiveTextAreaControl.Caret.Line, ActiveTextAreaControl.Caret.Column);
 		}
 		
+		bool lastStatus;
 		void SelectionChanged(object sender, EventArgs e)
 		{
-			((DefaultWorkbench)WorkbenchSingleton.Workbench).UpdateMenu(null, null);
+			if (ActiveTextAreaControl.SelectionManager.HasSomethingSelected != lastStatus) {
+				lastStatus = ActiveTextAreaControl.SelectionManager.HasSomethingSelected;
+				((DefaultWorkbench)WorkbenchSingleton.Workbench).UpdateMenu(null, null);
+			}
 		}
 		
 		void GenerateEditActions()

Modified: trunk/MonoDevelop/src/Main/Base/Gui/Components/SdMenu.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Components/SdMenu.cs	2004-01-17 06:10:30 UTC (rev 516)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Components/SdMenu.cs	2004-01-17 06:28:20 UTC (rev 517)
@@ -99,6 +99,7 @@
 						foreach (Gtk.MenuItem menuItem in items) {
 							Append (menuItem);
 						}
+						
 					}
 				}
 				ShowAll ();
@@ -107,7 +108,9 @@
 
 		public void Append (Gtk.Widget item)
 		{
-			subMenu.Append (item);
+			if (item.Parent == null) {
+				subMenu.Append (item);
+			}
 		}
 	}
 }




More information about the Monodevelop-patches-list mailing list