[Monodevelop-patches-list] r2703 - in trunk/MonoDevelop/Core/src/MonoDevelop.Base: . Commands Commands/VBConverter Gui Gui/Components Gui/Dialogs Gui/Dialogs/OptionPanels Gui/Pads Gui/Pads/PropertyPad Gui/Pads/SolutionPad Gui/Search Internal/Codons/Commands Internal/Codons/MenuItems Internal/CollectionUtilities Services/MenuService Services/Toolbar

Lluis Sanchez <lluis@ximian.com> lluis at mono-cvs.ximian.com
Wed Aug 3 05:36:31 EDT 2005


Author: lluis
Date: 2005-08-03 05:36:30 -0400 (Wed, 03 Aug 2005)
New Revision: 2703

Added:
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Components/MenuButtonEntry.cs
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Codons/Commands/LocalCommandItemCodon.cs
Removed:
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Commands/ProjectOptionsCommands.cs
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Components/SdMenu.cs
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Components/SdMenuCheckBox.cs
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Components/SdMenuCommand.cs
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Components/SdMenuSeparator.cs
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Components/SdToolbarCommand.cs
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/PropertyPad/PropertyPadCommands.cs
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/TreeViewMemento.cs
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Codons/MenuItems/AbstractCheckableMenuCommand.cs
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Codons/MenuItems/AbstractMenuCommand.cs
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Codons/MenuItems/ICheckableMenuCommand.cs
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Codons/MenuItems/IMenuCommand.cs
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Codons/MenuItems/ISubmenuBuilder.cs
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Codons/MenuItems/MenuItemCodon.cs
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/MenuService/MenuService.cs
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/Toolbar/ToolbarService.cs
Modified:
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Commands/HelpCommands.cs
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Commands/VBConverter/ConvertBuffer.cs
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Commands/VBConverter/ConvertProject.cs
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/CommandService.cs
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Dialogs/OptionPanels/ExternalToolPanel.cs
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Dialogs/ProjectOptionsDialog.cs
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Dialogs/TreeViewOptions.cs
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/GuiService.cs
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/SolutionPad/TreeViewPad.cs
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Search/SearchOptions.cs
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Codons/Commands/CommandCodon.cs
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/CollectionUtilities/Comparers.cs
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Makefile.am
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/MonoDevelopCore.addin.xml
Log:
2005-08-03  Lluis Sanchez Gual  <lluis at novell.com>

	* Gui/Search/SearchOptions.cs: Store options at the correct property set.
	
	* Gui/Pads/SolutionPad/TreeViewPad.cs:
	* Gui/Dialogs/OptionPanels/ExternalToolPanel.cs:
	* Gui/Dialogs/ProjectOptionsDialog.cs:
	* Commands/HelpCommands.cs:
	* Commands/VBConverter/ConvertBuffer.cs:
	* Commands/VBConverter/ConvertProject.cs: Use the new command system.
	
	* Gui/CommandService.cs: Added method for showing context menus.
	* Gui/GuiService.cs: Removed Old menu and toolbar services.
	
	* Gui/Dialogs/TreeViewOptions.cs: Provide a CommandManager that can
	be used to show a context menu.
	* Internal/Codons/Commands/CommandCodon.cs: Allow commands that use
	a string as ID (prefixed with @).
	
	* Internal/CollectionUtilities/Comparers.cs:
	* Gui/Components/SdMenu.cs:
	* Gui/Components/SdMenuCheckBox.cs:
	* Gui/Components/SdMenuCommand.cs:
	* Gui/Components/SdToolbarCommand.cs:
	* Gui/Components/SdMenuSeparator.cs:
	* Gui/Pads/PropertyPad/PropertyPadCommands.cs:
	* Gui/Pads/TreeViewMemento.cs:
	* Services/Toolbar/ToolbarService.cs:
	* Services/MenuService/MenuService.cs:
	* Commands/ProjectOptionsCommands.cs:
	* Internal/Codons/MenuItems/AbstractCheckableMenuCommand.cs:
	* Internal/Codons/MenuItems/ISubmenuBuilder.cs:
	* Internal/Codons/MenuItems/IMenuCommand.cs:
	* Internal/Codons/MenuItems/AbstractMenuCommand.cs:
	* Internal/Codons/MenuItems/ICheckableMenuCommand.cs:
	* Internal/Codons/MenuItems/MenuItemCodon.cs: Removed old code.
	
	* MonoDevelopCore.addin.xml: Removed old elements.



Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog	2005-08-03 09:34:06 UTC (rev 2702)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog	2005-08-03 09:36:30 UTC (rev 2703)
@@ -1,3 +1,42 @@
+2005-08-03  Lluis Sanchez Gual  <lluis at novell.com>
+
+	* Gui/Search/SearchOptions.cs: Store options at the correct property set.
+	
+	* Gui/Pads/SolutionPad/TreeViewPad.cs:
+	* Gui/Dialogs/OptionPanels/ExternalToolPanel.cs:
+	* Gui/Dialogs/ProjectOptionsDialog.cs:
+	* Commands/HelpCommands.cs:
+	* Commands/VBConverter/ConvertBuffer.cs:
+	* Commands/VBConverter/ConvertProject.cs: Use the new command system.
+	
+	* Gui/CommandService.cs: Added method for showing context menus.
+	* Gui/GuiService.cs: Removed Old menu and toolbar services.
+	
+	* Gui/Dialogs/TreeViewOptions.cs: Provide a CommandManager that can
+	be used to show a context menu.
+	* Internal/Codons/Commands/CommandCodon.cs: Allow commands that use
+	a string as ID (prefixed with @).
+	
+	* Internal/CollectionUtilities/Comparers.cs:
+	* Gui/Components/SdMenu.cs:
+	* Gui/Components/SdMenuCheckBox.cs:
+	* Gui/Components/SdMenuCommand.cs:
+	* Gui/Components/SdToolbarCommand.cs:
+	* Gui/Components/SdMenuSeparator.cs:
+	* Gui/Pads/PropertyPad/PropertyPadCommands.cs:
+	* Gui/Pads/TreeViewMemento.cs:
+	* Services/Toolbar/ToolbarService.cs:
+	* Services/MenuService/MenuService.cs:
+	* Commands/ProjectOptionsCommands.cs:
+	* Internal/Codons/MenuItems/AbstractCheckableMenuCommand.cs:
+	* Internal/Codons/MenuItems/ISubmenuBuilder.cs:
+	* Internal/Codons/MenuItems/IMenuCommand.cs:
+	* Internal/Codons/MenuItems/AbstractMenuCommand.cs:
+	* Internal/Codons/MenuItems/ICheckableMenuCommand.cs:
+	* Internal/Codons/MenuItems/MenuItemCodon.cs: Removed old code.
+	
+	* MonoDevelopCore.addin.xml: Removed old elements.
+
 2005-07-30  John Luke  <john.luke at gmail.com>
 
 	* Services/MessageService.cs: remove two unused variables

Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Commands/HelpCommands.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Commands/HelpCommands.cs	2005-08-03 09:34:06 UTC (rev 2702)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Commands/HelpCommands.cs	2005-08-03 09:36:30 UTC (rev 2703)
@@ -45,40 +45,4 @@
 			}
 		}
 	}
-	
-	internal class GotoWebSite : AbstractMenuCommand
-	{
-		string site;
-		
-		public GotoWebSite(string site)
-		{
-			this.site = site;
-		}
-		
-		public override void Run()
-		{
-			Runtime.FileService.OpenFile (site);
-		}
-	}
-	
-	// FIXME: dont use Process Start for HTML files
-	internal class GotoLink : AbstractMenuCommand
-	{
-		string site;
-		
-		public GotoLink(string site)
-		{
-			this.site = site;
-		}
-		
-		public override void Run()
-		{
-			string file = site.StartsWith("home://") ? Runtime.FileUtilityService.GetDirectoryNameWithSeparator (Runtime.FileUtilityService.SharpDevelopRootPath) + "bin" + Path.DirectorySeparatorChar + site.Substring(7).Replace('/', Path.DirectorySeparatorChar) : site;
-			try {
-				Process.Start(file);
-			} catch (Exception) {
-				Runtime.MessageService.ShowError(String.Format (GettextCatalog.GetString ("Can not execute or view {0}\n Please check that the file exists and that you can open this file."), file));
-			}
-		}
-	}
 }

Deleted: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Commands/ProjectOptionsCommands.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Commands/ProjectOptionsCommands.cs	2005-08-03 09:34:06 UTC (rev 2702)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Commands/ProjectOptionsCommands.cs	2005-08-03 09:36:30 UTC (rev 2703)
@@ -1,76 +0,0 @@
-// <file>
-//     <copyright see="prj:///doc/copyright.txt"/>
-//     <license see="prj:///doc/license.txt"/>
-//     <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
-//     <version value="$version"/>
-// </file>
-
-using System;
-using System.Diagnostics;
-using System.IO;
-using System.Collections;
-
-using MonoDevelop.Core.AddIns;
-using MonoDevelop.Core.AddIns.Codons;
-
-using MonoDevelop.Core.Properties;
-using MonoDevelop.Core.Services;
-
-using MonoDevelop.Services;
-using MonoDevelop.Gui;
-using MonoDevelop.Gui.Components;
-using MonoDevelop.Gui.Dialogs;
-using MonoDevelop.Internal.Project;
-
-using MonoDevelop.Internal.ExternalTool;
-
-namespace MonoDevelop.Commands
-{
-	internal class AddProjectConfiguration : AbstractMenuCommand
-	{
-		public override void Run()
-		{
-			ProjectOptionsDialog optionsDialog = Owner as ProjectOptionsDialog;
-			
-			if (optionsDialog != null) {
-				optionsDialog.AddProjectConfiguration();
-			}
-		}
-	}
-	
-	internal class RenameProjectConfiguration : AbstractMenuCommand
-	{
-		public override void Run()
-		{
-			ProjectOptionsDialog optionsDialog = Owner as ProjectOptionsDialog;
-			
-			if (optionsDialog != null) {
-				optionsDialog.RenameProjectConfiguration();
-			}
-		}
-	}
-	
-	internal class RemoveProjectConfiguration : AbstractMenuCommand
-	{
-		public override void Run()
-		{
-			ProjectOptionsDialog optionsDialog = Owner as ProjectOptionsDialog;
-			
-			if (optionsDialog != null) {
-				optionsDialog.RemoveProjectConfiguration();
-			}
-		}
-	}
-	
-	internal class SetActiveProjectConfiguration : AbstractMenuCommand
-	{
-		public override void Run()
-		{
-			ProjectOptionsDialog optionsDialog = Owner as ProjectOptionsDialog;
-			
-			if (optionsDialog != null) {
-				optionsDialog.SetSelectedConfigurationAsStartup();
-			}
-		}
-	}
-}

Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Commands/VBConverter/ConvertBuffer.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Commands/VBConverter/ConvertBuffer.cs	2005-08-03 09:34:06 UTC (rev 2702)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Commands/VBConverter/ConvertBuffer.cs	2005-08-03 09:36:30 UTC (rev 2703)
@@ -31,9 +31,9 @@
 
 namespace MonoDevelop.Commands
 {
-	internal class VBConvertBuffer : AbstractMenuCommand
+	internal class VBConvertBuffer : CommandHandler
 	{
-		public override void Run()
+		protected override void Run()
 		{
 			IWorkbenchWindow window = WorkbenchSingleton.Workbench.ActiveWorkbenchWindow;
 			

Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Commands/VBConverter/ConvertProject.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Commands/VBConverter/ConvertProject.cs	2005-08-03 09:34:06 UTC (rev 2702)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Commands/VBConverter/ConvertProject.cs	2005-08-03 09:36:30 UTC (rev 2703)
@@ -31,7 +31,7 @@
 
 namespace MonoDevelop.Commands
 {
-	internal class VBConvertProject : AbstractMenuCommand
+	internal class VBConvertProject : CommandHandler
 	{
 		void ConvertFile(string fileName, string outFile)
 		{
@@ -50,7 +50,7 @@
 //			sw.Close();
 		}
 		
-		public override void Run()
+		protected override void Run()
 		{
 			if (Runtime.ProjectService.CurrentSelectedProject != null) {
 				foreach (ProjectFile file in Runtime.ProjectService.CurrentSelectedProject.ProjectFiles) {

Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/CommandService.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/CommandService.cs	2005-08-03 09:34:06 UTC (rev 2702)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/CommandService.cs	2005-08-03 09:36:30 UTC (rev 2703)
@@ -107,6 +107,16 @@
 			return manager.CreateMenu (cset);
 		}
 		
+		public void ShowContextMenu (CommandEntrySet cset)
+		{
+			manager.ShowContextMenu (cset);
+		}
+		
+		public void ShowContextMenu (string addinPath)
+		{
+			ShowContextMenu (CreateCommandEntrySet (addinPath));
+		}
+		
 		public CommandEntrySet CreateCommandEntrySet (string addinPath)
 		{
 			CommandEntrySet cset = new CommandEntrySet ();

Added: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Components/MenuButtonEntry.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Components/MenuButtonEntry.cs	2005-08-03 09:34:06 UTC (rev 2702)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Components/MenuButtonEntry.cs	2005-08-03 09:36:30 UTC (rev 2703)
@@ -0,0 +1,115 @@
+//
+// MenuButtonEntry.cs
+//
+// Author:
+//   Lluis Sanchez Gual
+//
+// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections;
+using MonoDevelop.Commands;
+
+namespace MonoDevelop.Gui.Components
+{
+	public class MenuButtonEntry : Gtk.HBox
+	{
+		Gtk.Entry entry;
+		Gtk.Button button;
+		ArrayList options = new ArrayList ();
+		
+		CommandManager manager;
+		CommandEntrySet entrySet;
+		
+		public MenuButtonEntry (): this (null, null)
+		{
+		}
+		
+		public MenuButtonEntry (string [,] options): this (null, null, options)
+		{
+		}
+		
+		public MenuButtonEntry (Gtk.Entry entry, Gtk.Button button, string [,] options): this (entry, button)
+		{
+			for (int n=0; n<options.GetLength (0); n++)
+				AddOption (options [n,0], options [n,1]);
+		}
+		
+		public MenuButtonEntry (Gtk.Entry entry, Gtk.Button button)
+		{
+			if (entry == null) entry = new Gtk.Entry ();
+			if (button == null) button = new Gtk.Button (">");
+			
+			this.entry = entry;
+			this.button = button;
+			
+			manager = new CommandManager ();
+			manager.RegisterGlobalHandler (this);
+			
+			PackStart (entry, true, true, 0);
+			PackStart (button, false, false, 6);
+			
+			ActionCommand cmd = new ActionCommand ("InsertOption", "InsertOption", null);
+			cmd.CommandArray = true;
+			manager.RegisterCommand (cmd);
+			entrySet = new CommandEntrySet ();
+			entrySet.AddItem ("InsertOption");
+			
+			button.Clicked += new EventHandler (ShowQuickInsertMenu);
+		}
+		
+		public void AddOption (string name, string value)
+		{
+			options.Add (new string[] { name, value });
+		}
+		
+		public void AddSeparator ()
+		{
+			options.Add (new string[] {"-", null});
+		}
+		
+		public void ShowQuickInsertMenu (object sender, EventArgs args)
+		{
+			manager.ShowContextMenu (entrySet);
+		}
+		
+		[CommandHandler ("InsertOption")]
+		void OnUpdateInsertOption (object selection)
+		{
+			int tempInt = entry.Position;
+			entry.DeleteSelection();
+			entry.InsertText ((string)selection, ref tempInt);
+		}
+		
+		[CommandUpdateHandler ("InsertOption")]
+		void OnUpdateInsertOption (CommandArrayInfo info)
+		{
+			foreach (string[] op in options) {
+				if (op [0] == "-")
+					info.AddSeparator ();
+				else
+					info.Add (op [0], op [1]);
+			}
+		}
+	}
+}

Deleted: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Components/SdMenu.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Components/SdMenu.cs	2005-08-03 09:34:06 UTC (rev 2702)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Components/SdMenu.cs	2005-08-03 09:36:30 UTC (rev 2703)
@@ -1,119 +0,0 @@
-// <file>
-//     <copyright see="prj:///doc/copyright.txt"/>
-//     <license see="prj:///doc/license.txt"/>
-//     <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
-//     <version value="$version"/>
-// </file>
-
-using System;
-using System.Collections;
-using System.Drawing;
-using System.Diagnostics;
-using System.Drawing.Text;
-using System.Drawing.Imaging;
-
-using MonoDevelop.Core.Services;
-using MonoDevelop.Services;
-using MonoDevelop.Core.AddIns.Conditions;
-using MonoDevelop.Core.AddIns.Codons;
-
-using MonoDevelop.Commands;
-
-namespace MonoDevelop.Gui.Components
-{
-	public interface IStatusUpdate
-	{
-		void UpdateStatus();
-	}
-	
-	public interface ISubmenuItem
-	{
-	}
-	
-	public class SdMenu : Gtk.ImageMenuItem, IStatusUpdate
-	{
-		ConditionCollection conditionCollection;
-		object caller;
-		public string localizedText = String.Empty;
-		public ArrayList SubItems = new ArrayList();
-		private Gtk.Menu subMenu = null;
-		
-		public SdMenu(ConditionCollection conditionCollection, object caller, string text) : base()
-		{
-			this.conditionCollection = conditionCollection;
-			this.caller              = caller;
-			this.subMenu             = new Gtk.Menu ();
-			this.Submenu             = subMenu;
-
-			localizedText = GettextCatalog.GetString (text);
-
-			Gtk.AccelLabel label = new Gtk.AccelLabel (localizedText);
-			label.Xalign = 0;
-			label.UseUnderline = true;
-			this.Add (label);
-			label.AccelWidget = this;
-
-			Activated += new EventHandler (OnDropDown);
-
-			Gtk.AccelGroup accel = new Gtk.AccelGroup ();
-			subMenu.AccelGroup = accel;
-			((Gtk.Window)WorkbenchSingleton.Workbench).AddAccelGroup (accel);
-		}
-		
-		public void OnDropDown(object ob, System.EventArgs e)
-		{
-			//foreach (object o in ((Gtk.Menu)Submenu).Children) {
-			//
-			//	if (o is IStatusUpdate) {
-			//		((IStatusUpdate)o).UpdateStatus();
-			//	}
-			//}
-			UpdateStatus ();
-		}
-		
-		public virtual void UpdateStatus()
-		{
-			if (conditionCollection != null) {
-				ConditionFailedAction failedAction = conditionCollection.GetCurrentConditionFailedAction(caller);
-				this.Sensitive = (failedAction != ConditionFailedAction.Disable);
-				this.Visible = (failedAction != ConditionFailedAction.Exclude);
-			}
-			
-			if (Visible) {
-				foreach (Gtk.Widget widg in ((Gtk.Menu)Submenu).Children) {
-					if (widg is ISubmenuItem) {
-						((Gtk.Menu)Submenu).Remove (widg);
-						widg.Destroy ();
-					}
-				}
-				foreach (object item in SubItems) {
-					if (item is Gtk.MenuItem) {
-						if (item is IStatusUpdate) {
-							((IStatusUpdate)item).UpdateStatus();
-						}
-						Append((Gtk.MenuItem)item);
-					} else {
-						int location = SubItems.IndexOf (item);
-						ISubmenuBuilder submenuBuilder = (ISubmenuBuilder)item;
-						Gtk.MenuItem[] items = submenuBuilder.BuildSubmenu(conditionCollection, caller);
-						foreach (Gtk.MenuItem menuItem in items) {
-							subMenu.Insert (menuItem, location);
-							location++;
-						}
-					}
-				}
-				ShowAll ();
-				if (((Gtk.Menu)Submenu).Children.Length == 0) {
-					Visible = false;
-				}
-			}
-		}
-		
-		public void Append (Gtk.Widget item)
-		{
-			if (item.Parent == null) {
-				subMenu.Append (item);
-			}
-		}
-	}
-}

Deleted: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Components/SdMenuCheckBox.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Components/SdMenuCheckBox.cs	2005-08-03 09:34:06 UTC (rev 2702)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Components/SdMenuCheckBox.cs	2005-08-03 09:36:30 UTC (rev 2703)
@@ -1,92 +0,0 @@
-// <file>
-//     <copyright see="prj:///doc/copyright.txt"/>
-//     <license see="prj:///doc/license.txt"/>
-//     <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
-//     <version value="$version"/>
-// </file>
-
-using System;
-using System.Drawing;
-using System.Diagnostics;
-using System.Drawing.Text;
-using System.Drawing.Imaging;
-using MonoDevelop.Core.AddIns.Conditions;
-using MonoDevelop.Core.AddIns.Codons;
-using MonoDevelop.Core.Services;
-using MonoDevelop.Services;
-
-namespace MonoDevelop.Gui.Components
-{
-	public class SdMenuCheckBox : Gtk.CheckMenuItem, IStatusUpdate
-	{
-		static StringParserService stringParserService = Runtime.StringParserService;
-			
-		object caller;
-		ConditionCollection conditionCollection;
-		string description   = String.Empty;
-		ICheckableMenuCommand menuCommand;
-
-		object _tag;
-
-		public object Tag {
-			get { return _tag; }
-			set { _tag = value; }
-		}
-		
-		public string Description {
-			get {
-				return description;
-			}
-			set {
-				description = value;
-			}
-		}
-	
-		public SdMenuCheckBox (string label) : base ()
-		{
-			Gtk.AccelLabel child = new Gtk.AccelLabel (label);
-			child.Xalign = 0;
-			child.UseUnderline = true;
-			child.Markup = label;
-			child.UseMarkup = true;
-			((Gtk.Container)this).Child = child;
-			child.AccelWidget = this;
-		}
-	
-		public SdMenuCheckBox(ConditionCollection conditionCollection, object caller, string label) : this(stringParserService.Parse(label))
-		{
-			this.caller              = caller;
-			this.conditionCollection = conditionCollection;
-			UpdateStatus();
-		}
-		
-		public SdMenuCheckBox(ConditionCollection conditionCollection, object caller, string label, ICheckableMenuCommand menuCommand) : this(stringParserService.Parse(label))
-		{
-			this.menuCommand         = menuCommand;
-			this.caller              = caller;
-			this.conditionCollection = conditionCollection;
-			UpdateStatus();
-		}
-		
-		protected override void OnToggled ()
-		{
-			base.OnToggled ();
-			if (menuCommand != null) {
-				menuCommand.IsChecked = Active;
-			}
-		}
-		
-		public virtual void UpdateStatus()
-		{
-			if (conditionCollection != null) {
-				ConditionFailedAction failedAction = conditionCollection.GetCurrentConditionFailedAction(caller);
-				this.Sensitive = failedAction != ConditionFailedAction.Disable;
-				this.Visible = failedAction != ConditionFailedAction.Exclude;
-			}
-
-			if (menuCommand != null) {
-				Active = menuCommand.IsChecked;
-			}
-		}
-	}
-}

Deleted: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Components/SdMenuCommand.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Components/SdMenuCommand.cs	2005-08-03 09:34:06 UTC (rev 2702)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Components/SdMenuCommand.cs	2005-08-03 09:36:30 UTC (rev 2703)
@@ -1,146 +0,0 @@
-// <file>
-//     <copyright see="prj:///doc/copyright.txt"/>
-//     <license see="prj:///doc/license.txt"/>
-//     <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
-//     <version value="$version"/>
-// </file>
-
-using System;
-using System.Drawing;
-using System.Diagnostics;
-using System.Drawing.Text;
-using System.Drawing.Imaging;
-using MonoDevelop.Core.AddIns.Conditions;
-using MonoDevelop.Core.AddIns.Codons;
-using MonoDevelop.Core.Services;
-using MonoDevelop.Services;
-
-//using Reflector.UserInterface;
-
-namespace MonoDevelop.Gui.Components
-{
-	public class SdMenuCommand : Gtk.ImageMenuItem, IStatusUpdate
-	{
-		static StringParserService stringParserService = Runtime.StringParserService;
-			
-		object caller;
-		ConditionCollection conditionCollection;
-		string description   = String.Empty;
-		string localizedText = String.Empty;
-		ICommand menuCommand = null;
-		bool internalActivate;
-		
-		string tag;
-		
-		public string Tag {
-			get { return tag; }
-			set { tag = value; }
-		}
-		
-		public ICommand Command {
-			get {
-				return menuCommand;
-			}
-			set {
-				menuCommand = value;
-				UpdateStatus();
-			}
-		}
-		
-		public string Description {
-			get {
-				return description;
-			}
-			set {
-				description = value;
-			}
-		}
-
-		public string Text {
-			get {
-				return localizedText;
-			}
-		}
-		
-		public SdMenuCommand (string text) : base (text)
-		{
-			localizedText = text;
-		}
-		
-		public SdMenuCommand(ConditionCollection conditionCollection, object caller, string label) : this(stringParserService.Parse(label))
-		{
-			this.caller              = caller;
-			this.conditionCollection = conditionCollection;
-			internalActivate = true;
-			UpdateStatus();
-		}
-		
-		public SdMenuCommand(ConditionCollection conditionCollection, object caller, string label, ICommand menuCommand) : this(stringParserService.Parse(label))
-		{
-			this.caller = caller;
-			this.conditionCollection = conditionCollection;
-			this.menuCommand = menuCommand;
-			internalActivate = true;
-			UpdateStatus();
-		}
-		
-		public SdMenuCommand(ConditionCollection conditionCollection, object caller, string label, EventHandler handler) : this(stringParserService.Parse(label))
-		{
-			this.caller = caller;
-			this.conditionCollection = conditionCollection;
-			this.Activated += handler;
-			UpdateStatus();
-		}
-		
-		public SdMenuCommand(object caller, string label, EventHandler handler) : this(stringParserService.Parse(label))
-		{
-			this.caller = caller;
-			this.Activated += handler;
-			UpdateStatus();
-		}
-
-		public void SetAccel (string[] keys, string pathmod)
-		{
-			Gdk.ModifierType mod = 0;
-			string accel_path = "<MonoDevelop>/MainWindow/" + this.Text + keys[keys.Length - 1];
-			uint ckey = 0;
-			foreach (string key in keys) {
-				if (key == "Control") {
-					mod |= Gdk.ModifierType.ControlMask;
-				} else if (key == "Shift") {
-					mod |= Gdk.ModifierType.ShiftMask;
-				} else if (key == "Alt") {
-					mod |= Gdk.ModifierType.Mod1Mask;
-				} else {
-					ckey = Gdk.Keyval.FromName (key);
-				}
-			}
-			if (!Gtk.AccelMap.LookupEntry (accel_path, new Gtk.AccelKey()) ) {
-				Gtk.AccelMap.AddEntry (accel_path, ckey, mod);
-				this.AccelPath = accel_path;
-			}
-		}
-		
-		protected override void OnActivated ()
-		{
-			base.OnActivated ();
-			if (internalActivate && menuCommand != null) {
-				menuCommand.Run();
-			}
-		}
-		
-		public virtual void UpdateStatus()
-		{
-			if (conditionCollection != null) {
-				ConditionFailedAction failedAction = conditionCollection.GetCurrentConditionFailedAction(caller);
-				this.Sensitive = failedAction != ConditionFailedAction.Disable;
-				this.Visible = failedAction != ConditionFailedAction.Exclude;
-				if (!this.Visible) return;
-			}
-			if (menuCommand != null && menuCommand is IMenuCommand) {
-				Sensitive = ((IMenuCommand)menuCommand).IsEnabled;
-				ShowAll ();
-			}
-		}
-	}
-}

Deleted: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Components/SdMenuSeparator.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Components/SdMenuSeparator.cs	2005-08-03 09:34:06 UTC (rev 2702)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Components/SdMenuSeparator.cs	2005-08-03 09:36:30 UTC (rev 2703)
@@ -1,45 +0,0 @@
-// <file>
-//     <copyright see="prj:///doc/copyright.txt"/>
-//     <license see="prj:///doc/license.txt"/>
-//     <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
-//     <version value="$version"/>
-// </file>
-
-using System;
-using System.Drawing;
-using System.Diagnostics;
-using System.Drawing.Text;
-using System.Drawing.Imaging;
-using MonoDevelop.Core.AddIns.Conditions;
-using MonoDevelop.Core.AddIns.Codons;
-//using Reflector.UserInterface;
-
-namespace MonoDevelop.Gui.Components
-{
-	public class SdMenuSeparator : Gtk.SeparatorMenuItem, IStatusUpdate 
-	{
-		object caller;
-		ConditionCollection conditionCollection;
-		
-		public SdMenuSeparator()
-		{
-			ShowAll ();
-		}
-		
-		public SdMenuSeparator(ConditionCollection conditionCollection, object caller)
-		{
-			this.caller              = caller;
-			this.conditionCollection = conditionCollection;
-			ShowAll ();
-		}
-		
-		public virtual void UpdateStatus()
-		{
-			if (conditionCollection != null) {
-				ConditionFailedAction failedAction = conditionCollection.GetCurrentConditionFailedAction(caller);
-				this.Sensitive = failedAction != ConditionFailedAction.Disable;
-				this.Visible = failedAction != ConditionFailedAction.Exclude;
-			}
-		}
-	}
-}

Deleted: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Components/SdToolbarCommand.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Components/SdToolbarCommand.cs	2005-08-03 09:34:06 UTC (rev 2702)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Components/SdToolbarCommand.cs	2005-08-03 09:36:30 UTC (rev 2703)
@@ -1,68 +0,0 @@
-// <file>
-//     <copyright see="prj:///doc/copyright.txt"/>
-//     <license see="prj:///doc/license.txt"/>
-//     <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
-//     <version value="$version"/>
-// </file>
-
-using System;
-using Gtk;
-
-using MonoDevelop.Core.AddIns.Conditions;
-using MonoDevelop.Core.AddIns.Codons;
-using MonoDevelop.Services;
-
-namespace MonoDevelop.Gui.Components
-{
-	public class SdToolbarCommand : Gtk.ToolButton, IStatusUpdate
-	{
-		static Tooltips tips = new Tooltips ();
-		object caller;
-		ConditionCollection conditionCollection;
-		string localizedText = String.Empty;
-		ICommand menuCommand = null;
-		
-		public ICommand Command {
-			get { return menuCommand; }
-			set {
-				menuCommand = value;
-				UpdateStatus();
-			}
-		}
-		
-		public string Text {
-			get { return localizedText; }
-		}
-		
-		public SdToolbarCommand (ToolbarItemCodon codon, object caller) : base (null, "")
-		{
-			this.caller = caller;
-			this.IconWidget = Runtime.Gui.Resources.GetImage (codon.Icon, Gtk.IconSize.LargeToolbar);
-			this.conditionCollection = codon.Conditions;
-			this.localizedText = codon.ToolTip;
-			this.Label = this.Text;
-			if (codon.Class != null)
-				this.Command = (ICommand) codon.AddIn.CreateObject (codon.Class);
-
-			this.SetTooltip (tips, Text, Text);
-			this.Clicked += new EventHandler (ToolbarClicked);
-			this.ShowAll ();
-		}
-		
-		void ToolbarClicked (object o, EventArgs e) {
-			if (menuCommand != null)
-				menuCommand.Run ();
-		}
-
-		public virtual void UpdateStatus ()
-		{
-			if (conditionCollection != null) {
-				ConditionFailedAction failedAction = conditionCollection.GetCurrentConditionFailedAction (caller);
-				this.Sensitive = failedAction != ConditionFailedAction.Disable;
-				this.Visible = failedAction != ConditionFailedAction.Exclude;
-			}
-			if (menuCommand != null && menuCommand is IMenuCommand)
-				this.Sensitive = ((IMenuCommand) menuCommand).IsEnabled;
-		}
-	}
-}

Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Dialogs/OptionPanels/ExternalToolPanel.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Dialogs/OptionPanels/ExternalToolPanel.cs	2005-08-03 09:34:06 UTC (rev 2702)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Dialogs/OptionPanels/ExternalToolPanel.cs	2005-08-03 09:36:30 UTC (rev 2703)
@@ -16,7 +16,7 @@
 using MonoDevelop.Core.Properties;
 using MonoDevelop.Core.Services;
 using MonoDevelop.Services;
-using MonoDevelop.Core.AddIns.Codons;
+using MonoDevelop.Gui.Components;
 
 namespace MonoDevelop.Gui.Dialogs.OptionPanels
 {
@@ -95,6 +95,9 @@
  			[Glade.Widget] Button moveDownButton;
  			[Glade.Widget] Button addButton; 
 			[Glade.Widget] Button removeButton;
+			
+			MenuButtonEntry argumentMbe;
+			MenuButtonEntry workingDirMbe;
 			 
 			// these are the control names which are enabled/disabled depending if tool is selected
 			Widget[] dependendControls;
@@ -118,7 +121,7 @@
 					toolListBoxStore.AppendValues (((ExternalTool) o).MenuCommand, (ExternalTool) o);
 					toolListBoxItemCount ++;
 				}
-					 
+
 				toolListBox.Reorderable = false;
 				toolListBox.HeadersVisible = true;
 				toolListBox.Selection.Mode = SelectionMode.Multiple;
@@ -126,23 +129,18 @@
 					 
 				toolListBox.AppendColumn (GettextCatalog.GetString ("_Tools"), new CellRendererText (), "text", 0);
 
-				Runtime.Gui.Menus.CreateQuickInsertMenu (argumentTextBox,
-						argumentQuickInsertButton,
-						argumentQuickInsertMenu);
+				argumentMbe = new MenuButtonEntry (argumentTextBox, argumentQuickInsertButton, argumentQuickInsertMenu);
+				workingDirMbe = new MenuButtonEntry (workingDirTextBox, workingDirQuickInsertButton, workingDirInsertMenu);
 
-				Runtime.Gui.Menus.CreateQuickInsertMenu (workingDirTextBox,
-						workingDirQuickInsertButton,
-						workingDirInsertMenu);
-					 
 				toolListBox.Selection.Changed += new EventHandler (selectEvent);
 				removeButton.Clicked += new EventHandler (removeEvent);
 				addButton.Clicked += new EventHandler (addEvent);
 				moveUpButton.Clicked += new EventHandler (moveUpEvent);
 				moveDownButton.Clicked += new EventHandler (moveDownEvent);
-
+				
 				selectEvent (this, EventArgs.Empty);
 			}
-	         
+			
 			void moveUpEvent (object sender, EventArgs e)
 			{
 				if(toolListBox.Selection.CountSelectedRows () == 1)

Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Dialogs/ProjectOptionsDialog.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Dialogs/ProjectOptionsDialog.cs	2005-08-03 09:34:06 UTC (rev 2702)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Dialogs/ProjectOptionsDialog.cs	2005-08-03 09:36:30 UTC (rev 2703)
@@ -17,6 +17,8 @@
 using MonoDevelop.Core.AddIns.Codons;
 using MonoDevelop.Internal.Project;
 using MonoDevelop.Services;
+using MonoDevelop.Commands;
+
 namespace MonoDevelop.Gui.Dialogs {
 
 	/// <summary>
@@ -103,6 +105,7 @@
 		
 		#region context menu commands
 		
+		[CommandHandler ("AddConfiguration")]
 		public void AddProjectConfiguration()
 		{
 			int    number  = -1;
@@ -144,6 +147,7 @@
 			RenameProjectConfiguration();
 		}
 		
+		[CommandHandler ("RemoveConfiguration")]
 		public void RemoveProjectConfiguration()
 		{	
 			Gtk.TreeModel mdl;
@@ -181,6 +185,7 @@
 			}
 		}
 		
+		[CommandHandler ("SetActiveConfiguration")]
 		public void SetSelectedConfigurationAsStartup()
 		{
 			Gtk.TreeModel mdl;
@@ -194,6 +199,7 @@
 			}
 		}
 		
+		[CommandHandler ("RenameConfiguration")]
 		public void RenameProjectConfiguration()
 		{
 			Gtk.TreeModel mdl;
@@ -295,13 +301,14 @@
 					Gtk.TreePath path = TreeView.Model.GetPath(iter);
 	
 					// now see if the iter is the configuration root node iter
-					if (iter.Equals(configurationTreeNode)) {							
-						Runtime.Gui.Menus.ShowContextMenu(this, configNodeMenu, TreeView);
+					if (iter.Equals(configurationTreeNode)) {
+						CommandEntrySet cset = Runtime.Gui.CommandService.CreateCommandEntrySet (configNodeMenu);
+						CommandManager.ShowContextMenu (cset);
 					} else if (path.Indices[0] == configPath.Indices[0] && (path.Depth - configPath.Depth) == 1) {
 						// now see if it's a specific configuration node (i.e. the configuration root node is it's parent
-						Runtime.Gui.Menus.ShowContextMenu(this, selectConfigNodeMenu, TreeView);
+						CommandEntrySet cset = Runtime.Gui.CommandService.CreateCommandEntrySet (selectConfigNodeMenu);
+						CommandManager.ShowContextMenu (cset);
 					}
-					
 				}
 			}
 		}

Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Dialogs/TreeViewOptions.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Dialogs/TreeViewOptions.cs	2005-08-03 09:34:06 UTC (rev 2702)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Dialogs/TreeViewOptions.cs	2005-08-03 09:36:30 UTC (rev 2703)
@@ -15,6 +15,7 @@
 using MonoDevelop.Core.AddIns.Codons;
 
 using MonoDevelop.Services;
+using MonoDevelop.Commands;
 
 namespace MonoDevelop.Gui.Dialogs {
 	
@@ -26,6 +27,7 @@
 		
 		protected ArrayList OptionPanels = new ArrayList ();
 		protected IProperties properties = null;
+		CommandManager cmdManager;
 
 		protected Gtk.TreeStore treeStore;
 		
@@ -57,10 +59,16 @@
 			}
 			TreeViewOptionDialog.Hide ();
 		}
+		
+		protected CommandManager CommandManager {
+			get { return cmdManager; }
+		}
 	
 		public int Run ()
 		{
-			return TreeViewOptionDialog.Run ();
+			int r = TreeViewOptionDialog.Run ();
+			cmdManager.Dispose ();
+			return r;
 		}
 	
 		protected bool b = true;
@@ -172,6 +180,9 @@
 		
 			TreeViewOptionDialog.Title = GettextCatalog.GetString ("MonoDevelop options");
 
+			cmdManager = new CommandManager (TreeViewOptionDialog);
+			cmdManager.RegisterGlobalHandler (this); 
+			
 			this.InitializeComponent();
 			
 			if (node != null)

Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/GuiService.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/GuiService.cs	2005-08-03 09:34:06 UTC (rev 2702)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/GuiService.cs	2005-08-03 09:36:30 UTC (rev 2703)
@@ -7,8 +7,6 @@
 	public class GuiService
 	{
 		DisplayBindingService displayBindingService;
-		MenuService menuService;
-		ToolbarService toolbarService;
 		IconService icons;
 		ResourceService resourceService;
 		IStatusBarService statusBarService;
@@ -26,14 +24,6 @@
 			}
 		}
 	
-		public MenuService Menus {
-			get {
-				if (menuService == null)
-					menuService = (MenuService) ServiceManager.GetService (typeof(MenuService));
-				return menuService;
-			}
-		}
-	
 		public IStatusBarService StatusBar {
 			get {
 				if (statusBarService == null)
@@ -42,14 +32,6 @@
 			}
 		}
 	
-		public ToolbarService Toolbars {
-			get {
-				if (toolbarService == null)
-					toolbarService = (ToolbarService) ServiceManager.GetService (typeof(ToolbarService));
-				return toolbarService;
-			}
-		}
-
 		public ResourceService Resources {
 			get {
 				if (resourceService == null)

Deleted: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/PropertyPad/PropertyPadCommands.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/PropertyPad/PropertyPadCommands.cs	2005-08-03 09:34:06 UTC (rev 2702)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/PropertyPad/PropertyPadCommands.cs	2005-08-03 09:36:30 UTC (rev 2703)
@@ -1,48 +0,0 @@
-// <file>
-//     <copyright see="prj:///doc/copyright.txt"/>
-//     <license see="prj:///doc/license.txt"/>
-//     <owner name="Mike Krger" email="mike at icsharpcode.net"/>
-//     <version value="$version"/>
-// </file>
-
-using System;
-using System.Collections;
-using System.ComponentModel;
-using System.ComponentModel.Design;
-using System.Drawing;
-using System.Drawing.Design;
-
-using MonoDevelop.Core.Properties;
-using MonoDevelop.Gui;
-using MonoDevelop.Core.Services;
-using MonoDevelop.Core.AddIns.Codons;
-
-namespace MonoDevelop.Gui.Pads
-{
-	internal class PropertyPadResetCommand : AbstractMenuCommand
-	{
-		public override void Run()
-		{
-			//PropertyPad.Grid.ResetSelectedProperty();
-		}
-	}
-	
-	internal class PropertyPadShowDescriptionCommand : AbstractCheckableMenuCommand
-	{
-		public override bool IsChecked {
-			get {
-				//return PropertyPad.Grid.HelpVisible;
-				return true;
-			}
-			set {
-				//PropertyPad.Grid.HelpVisible = value;
-			}
-		}
-		
-		public override void Run()
-		{
-			//PropertyPad.Grid.HelpVisible = !PropertyPad.Grid.HelpVisible;
-		}
-	}
-	
-}

Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/SolutionPad/TreeViewPad.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/SolutionPad/TreeViewPad.cs	2005-08-03 09:34:06 UTC (rev 2702)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/SolutionPad/TreeViewPad.cs	2005-08-03 09:36:30 UTC (rev 2703)
@@ -949,8 +949,7 @@
 					opset.AddItem (ViewCommands.TreeDisplayOptionList);
 					opset.AddItem (Command.Separator);
 					opset.AddItem (ViewCommands.ResetTreeDisplayOptions);
-					Gtk.Menu menu = Runtime.Gui.CommandService.CreateMenu (opset);
-					Runtime.Gui.Menus.ShowContextMenu (menu);
+					Runtime.Gui.CommandService.ShowContextMenu (opset);
 				}
 			} else {
 				CommandEntrySet eset = Runtime.Gui.CommandService.CreateCommandEntrySet (nb.ContextMenuAddinPath);
@@ -959,8 +958,7 @@
 				opset.AddItem (ViewCommands.TreeDisplayOptionList);
 				opset.AddItem (Command.Separator);
 				opset.AddItem (ViewCommands.ResetTreeDisplayOptions);
-				Gtk.Menu menu = Runtime.Gui.CommandService.CreateMenu (eset);
-				Runtime.Gui.Menus.ShowContextMenu (menu);
+				Runtime.Gui.CommandService.ShowContextMenu (eset);
 			}
 		}
 		

Deleted: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/TreeViewMemento.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/TreeViewMemento.cs	2005-08-03 09:34:06 UTC (rev 2702)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/TreeViewMemento.cs	2005-08-03 09:36:30 UTC (rev 2703)
@@ -1,96 +0,0 @@
-// <file>
-//     <copyright see="prj:///doc/copyright.txt"/>
-//     <license see="prj:///doc/license.txt"/>
-//     <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
-//     <version value="$version"/>
-// </file>
-
-using System;
-using System.IO;
-using System.ComponentModel;
-
-using System.Drawing;
-using System.Diagnostics;
-using System.Collections;
-using System.Xml;
-using System.Resources;
-
-using MonoDevelop.Core.Properties;
-using MonoDevelop.Core.AddIns;
-using MonoDevelop.Core.AddIns.Codons;
-
-using MonoDevelop.Internal.Project;
-using MonoDevelop.Gui.Dialogs;
-
-using MonoDevelop.Services;
-using MonoDevelop.Gui.Widgets;
-
-namespace MonoDevelop.Gui
-{
-	public class TreeViewMemento : IXmlConvertable
-	{
-		TreeView treeView = null;
-		XmlElement parent = null;
-		
-		public TreeViewMemento()
-		{
-		}
-		
-		public TreeViewMemento(TreeView treeView)
-		{
-			this.treeView = treeView;
-		}
-		
-		void SaveTree(TreeNodeCollection nodes, XmlDocument doc, XmlElement el)
-		{
-			foreach (TreeNode node in nodes) {
-				if (node.IsExpanded) {
-					XmlElement child = doc.CreateElement("Node");
-					
-					XmlAttribute attr = doc.CreateAttribute("name");
-					attr.InnerText = node.Text;
-					child.Attributes.Append(attr);
-
-					el.AppendChild(child);
-					SaveTree(node.Nodes, doc, child);
-				}
-			}
-		}
-		
-		void RestoreTree(TreeNodeCollection nodes, XmlElement parent)
-		{
-			XmlNodeList nodelist = parent.ChildNodes;
-			foreach (XmlElement el in nodelist) {
-				foreach (TreeNode node in nodes) {
-					if (node.Text == el.Attributes["name"].InnerText) {
-						node.Expand();
-						RestoreTree(node.Nodes, el);
-						break;
-					}
-				}
-			}
-		}
-		
-		public void Restore(TreeView view)
-		{
-			view.BeginUpdate();
-			RestoreTree(view.Nodes, (XmlElement)parent);
-			view.EndUpdate();
-		}
-		
-		public object FromXmlElement(XmlElement element)
-		{
-			this.parent = element;
-			return this;
-		}
-		
-		public XmlElement ToXmlElement(XmlDocument doc)
-		{
-			Debug.Assert(treeView != null);
-			
-			XmlElement treenode  = doc.CreateElement("TreeView");
-			SaveTree(treeView.Nodes, doc, treenode);
-			return treenode;
-		}
-	}
-}

Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Search/SearchOptions.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Search/SearchOptions.cs	2005-08-03 09:34:06 UTC (rev 2702)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Search/SearchOptions.cs	2005-08-03 09:36:30 UTC (rev 2703)
@@ -59,11 +59,11 @@
 		
 		public DocumentIteratorType DocumentIteratorType {
 			get {
-				return (DocumentIteratorType)propertyService.GetProperty("DocumentIteratorType", DocumentIteratorType.CurrentDocument);
+				return (DocumentIteratorType)properties.GetProperty("DocumentIteratorType", DocumentIteratorType.CurrentDocument);
 			}
 			set {
 				if (DocumentIteratorType != value) {
-					propertyService.SetProperty("DocumentIteratorType", value);
+					properties.SetProperty("DocumentIteratorType", value);
 					OnDocumentIteratorTypeChanged(EventArgs.Empty);
 				}
 			}
@@ -71,11 +71,11 @@
 		
 		public SearchStrategyType SearchStrategyType {
 			get {
-				return (SearchStrategyType)propertyService.GetProperty("SearchStrategyType", SearchStrategyType.Normal);
+				return (SearchStrategyType)properties.GetProperty("SearchStrategyType", SearchStrategyType.Normal);
 			}
 			set {
 				if (SearchStrategyType != value) {
-					propertyService.SetProperty("SearchStrategyType", value);
+					properties.SetProperty("SearchStrategyType", value);
 					OnSearchStrategyTypeChanged(EventArgs.Empty);
 				}
 			}
@@ -83,28 +83,28 @@
 		
 		public string FileMask {
 			get {
-				return propertyService.GetProperty("FileMask", String.Empty);
+				return properties.GetProperty("FileMask", String.Empty);
 			}
 			set {
-				propertyService.SetProperty("FileMask", value);
+				properties.SetProperty("FileMask", value);
 			}
 		}
 
 		public string SearchDirectory {
 			get {
-				return propertyService.GetProperty("SearchDirectory", String.Empty);
+				return properties.GetProperty("SearchDirectory", String.Empty);
 			}
 			set {
-				propertyService.SetProperty("SearchDirectory", value);
+				properties.SetProperty("SearchDirectory", value);
 			}
 		}
 		
 		public bool SearchSubdirectories {
 			get {
-				return propertyService.GetProperty("SearchSubdirectories", true);
+				return properties.GetProperty("SearchSubdirectories", true);
 			}
 			set {
-				propertyService.SetProperty("SearchSubdirectories", value);
+				properties.SetProperty("SearchSubdirectories", value);
 			}
 		}
 		

Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Codons/Commands/CommandCodon.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Codons/Commands/CommandCodon.cs	2005-08-03 09:34:06 UTC (rev 2702)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Codons/Commands/CommandCodon.cs	2005-08-03 09:36:30 UTC (rev 2703)
@@ -157,6 +157,9 @@
 		internal static object ParseCommandId (ICodon codon)
 		{
 			string id = codon.ID;
+			if (id.StartsWith ("@"))
+				return id.Substring (1);
+
 			Type enumType = null;
 			string typeName = id;
 			

Added: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Codons/Commands/LocalCommandItemCodon.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Codons/Commands/LocalCommandItemCodon.cs	2005-08-03 09:34:06 UTC (rev 2702)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Codons/Commands/LocalCommandItemCodon.cs	2005-08-03 09:36:30 UTC (rev 2703)
@@ -0,0 +1,50 @@
+//
+// LocalCommandItemCodon.cs
+//
+// Author:
+//   Lluis Sanchez Gual
+//
+
+//
+// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+
+using System;
+using System.Collections;
+using MonoDevelop.Core.AddIns.Conditions;
+using MonoDevelop.Commands;
+using MonoDevelop.Core.Services;
+using MonoDevelop.Services;
+
+namespace MonoDevelop.Core.AddIns.Codons
+{
+	[CodonNameAttribute ("LocalCommandItem")]
+	public class LocalCommandItemCodon : CommandCodon
+	{
+		public override object BuildItem (object owner, ArrayList subItems, ConditionCollection conditions)
+		{
+			Command cmd = (Command) base.BuildItem (owner, subItems, conditions);
+			return new LocalCommandEntry (cmd);
+		}
+	}
+}

Deleted: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Codons/MenuItems/AbstractCheckableMenuCommand.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Codons/MenuItems/AbstractCheckableMenuCommand.cs	2005-08-03 09:34:06 UTC (rev 2702)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Codons/MenuItems/AbstractCheckableMenuCommand.cs	2005-08-03 09:36:30 UTC (rev 2703)
@@ -1,32 +0,0 @@
-// <file>
-//     <copyright see="prj:///doc/copyright.txt"/>
-//     <license see="prj:///doc/license.txt"/>
-//     <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
-//     <version value="$version"/>
-// </file>
-
-using System;
-using System.Collections;
-using System.CodeDom.Compiler;
-
-using MonoDevelop.Core.AddIns;
-using MonoDevelop.Core.AddIns.Codons;
-using MonoDevelop.Core.Properties;
-
-namespace MonoDevelop.Core.AddIns.Codons
-{
-	public abstract class AbstractCheckableMenuCommand : AbstractMenuCommand, ICheckableMenuCommand
-	{
-		bool isChecked = false;
-		
-		public virtual bool IsChecked {
-			get {
-				return isChecked;
-			}
-			set {
-				isChecked = value;
-			}
-		}
-		
-	}
-}

Deleted: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Codons/MenuItems/AbstractMenuCommand.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Codons/MenuItems/AbstractMenuCommand.cs	2005-08-03 09:34:06 UTC (rev 2702)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Codons/MenuItems/AbstractMenuCommand.cs	2005-08-03 09:36:30 UTC (rev 2703)
@@ -1,31 +0,0 @@
-// <file>
-//     <copyright see="prj:///doc/copyright.txt"/>
-//     <license see="prj:///doc/license.txt"/>
-//     <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
-//     <version value="$version"/>
-// </file>
-
-using System;
-using System.Collections;
-using System.CodeDom.Compiler;
-
-using MonoDevelop.Core.AddIns;
-using MonoDevelop.Core.AddIns.Codons;
-using MonoDevelop.Core.Properties;
-
-namespace MonoDevelop.Core.AddIns.Codons
-{
-	public abstract class AbstractMenuCommand : AbstractCommand, IMenuCommand
-	{
-		bool isEnabled = true;
-		
-		public virtual bool IsEnabled {
-			get {
-				return isEnabled;
-			}
-			set {
-				isEnabled = value;
-			}
-		}
-	}
-}

Deleted: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Codons/MenuItems/ICheckableMenuCommand.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Codons/MenuItems/ICheckableMenuCommand.cs	2005-08-03 09:34:06 UTC (rev 2702)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Codons/MenuItems/ICheckableMenuCommand.cs	2005-08-03 09:36:30 UTC (rev 2703)
@@ -1,28 +0,0 @@
-// <file>
-//     <copyright see="prj:///doc/copyright.txt"/>
-//     <license see="prj:///doc/license.txt"/>
-//     <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
-//     <version value="$version"/>
-// </file>
-
-using System;
-using System.Collections;
-using System.Reflection;
-
-using MonoDevelop.Core.Properties;
-using MonoDevelop.Core.AddIns.Conditions;
-
-
-using MonoDevelop.Gui;
-using MonoDevelop.Gui.Components;
-
-namespace MonoDevelop.Core.AddIns.Codons
-{
-	public interface ICheckableMenuCommand : IMenuCommand
-	{
-		bool IsChecked {
-			get;
-			set;
-		}
-	}
-}

Deleted: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Codons/MenuItems/IMenuCommand.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Codons/MenuItems/IMenuCommand.cs	2005-08-03 09:34:06 UTC (rev 2702)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Codons/MenuItems/IMenuCommand.cs	2005-08-03 09:36:30 UTC (rev 2703)
@@ -1,28 +0,0 @@
-// <file>
-//     <copyright see="prj:///doc/copyright.txt"/>
-//     <license see="prj:///doc/license.txt"/>
-//     <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
-//     <version value="$version"/>
-// </file>
-
-using System;
-using System.Collections;
-using System.Reflection;
-
-using MonoDevelop.Core.Properties;
-using MonoDevelop.Core.AddIns.Conditions;
-
-
-using MonoDevelop.Gui;
-using MonoDevelop.Gui.Components;
-
-namespace MonoDevelop.Core.AddIns.Codons
-{
-	public interface IMenuCommand : ICommand
-	{
-		bool IsEnabled {
-			get;
-			set;
-		}
-	}
-}

Deleted: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Codons/MenuItems/ISubmenuBuilder.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Codons/MenuItems/ISubmenuBuilder.cs	2005-08-03 09:34:06 UTC (rev 2702)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Codons/MenuItems/ISubmenuBuilder.cs	2005-08-03 09:36:30 UTC (rev 2703)
@@ -1,25 +0,0 @@
-// <file>
-//     <copyright see="prj:///doc/copyright.txt"/>
-//     <license see="prj:///doc/license.txt"/>
-//     <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
-//     <version value="$version"/>
-// </file>
-
-using System;
-using System.Collections;
-using System.Reflection;
-
-using MonoDevelop.Core.AddIns.Conditions;
-using MonoDevelop.Core.Properties;
-
-
-using MonoDevelop.Gui;
-using MonoDevelop.Gui.Components;
-
-namespace MonoDevelop.Core.AddIns.Codons
-{
-	public interface ISubmenuBuilder
-	{
-		Gtk.MenuItem[] BuildSubmenu(ConditionCollection conditionCollection, object owner);
-	}
-}

Deleted: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Codons/MenuItems/MenuItemCodon.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Codons/MenuItems/MenuItemCodon.cs	2005-08-03 09:34:06 UTC (rev 2702)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Codons/MenuItems/MenuItemCodon.cs	2005-08-03 09:36:30 UTC (rev 2703)
@@ -1,159 +0,0 @@
-// <file>
-//     <copyright see="prj:///doc/copyright.txt"/>
-//     <license see="prj:///doc/license.txt"/>
-//     <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
-//     <version value="$version"/>
-// </file>
-
-using System;
-using System.Diagnostics;
-using System.Collections;
-using System.Reflection;
-//using System.Windows.Forms;
-
-using MonoDevelop.Core.Properties;
-using MonoDevelop.Core.AddIns.Conditions;
-
-using MonoDevelop.Core.Services;
-
-using MonoDevelop.Services;
-using MonoDevelop.Gui;
-using MonoDevelop.Gui.Components;
-using MonoDevelop.Commands;
-
-namespace MonoDevelop.Core.AddIns.Codons
-{
-	[CodonName("MenuItem")]
-	public class MenuItemCodon : AbstractCodon
-	{
-		[XmlMemberAttribute("_label", IsRequired=true)]
-		string label       = null;
-		
-		[XmlMemberAttribute("description")]
-		string description = null;
-		
-		[XmlMemberArrayAttribute("shortcut",Separator=new char[]{ '|'})]
-		string[] shortcut    = null;
-		
-		[XmlMemberAttribute("icon")]
-		string icon        = null;
-		
-		[XmlMemberAttribute("link")]
-		string link        = null;
-		
-		public string Link {
-			get {
-				return link;
-			}
-			set {
-				link = value;
-			}
-		}
-		
-		public override bool HandleConditions {
-			get {
-				return true;
-			}
-		}
-		
-		public string Label {
-			get {
-				return label;
-			}
-			set {
-				label = value;
-			}
-		}
-		
-		public string Description {
-			get {
-				return description;
-			}
-			set {
-				description = value;
-			}
-		}
-		
-		public string Icon {
-			get {
-				return icon;
-			}
-			set {
-				icon = value;
-			}
-		}
-		
-		public string[] Shortcut {
-			get {
-				return shortcut;
-			}
-			set {
-				shortcut = value;
-			}
-		}
-		
-		/// <summary>
-		/// Creates an item with the specified sub items. And the current
-		/// Condition status for this item.
-		/// </summary>
-		public override object BuildItem(object owner, ArrayList subItems, ConditionCollection conditions)
-		{
-			Gtk.MenuItem newItem = null;
-			if (Label == "-") {
-				newItem = new SdMenuSeparator(conditions, owner);
-			} else  if (Link != null) {
-			  newItem = new SdMenuCommand(conditions, null, GettextCatalog.GetString (Label),  Link.StartsWith("http") ? (IMenuCommand)new GotoWebSite(Link) : (IMenuCommand)new GotoLink(Link));
-			} else {
-				object o = null;
-				if (Class != null) {
-					o = AddIn.CreateObject(Class);
-				}
-				if (o != null) {
-				  Label = GettextCatalog.GetString (Label);
-				  if (o is IMenuCommand) {
-						IMenuCommand menuCommand = (IMenuCommand)o;
-						menuCommand.Owner = owner;
-						if (o is ICheckableMenuCommand) {
-							newItem = new SdMenuCheckBox(conditions, owner, Label, (ICheckableMenuCommand)menuCommand);
-						} else {
-							newItem = new SdMenuCommand(conditions, owner, Label, menuCommand);
-						}
-					} else if (o is ISubmenuBuilder) {
-						return o;
-					}
-				}
-			}
-			if (newItem == null) {
-				Label = GettextCatalog.GetString (Label);
-				SdMenu newMenu = new SdMenu(conditions, owner, Label);
-				if (subItems != null && subItems.Count > 0) {
-					foreach (object item in subItems) {
-						if (item != null) {
-							newMenu.SubItems.Add(item);
-						}
-					}
-				}
-				newMenu.UpdateStatus ();
-				newItem = newMenu;
-			}
-			Debug.Assert(newItem != null);
-			
-			if (Icon != null && newItem is SdMenuCommand) {
-				((SdMenuCommand)newItem).Image = Runtime.Gui.Resources.GetImage(Icon, Gtk.IconSize.Menu);
-			}
-			
-			if (newItem is SdMenuCommand) {
-				((SdMenuCommand)newItem).Description = description;
-			}
-			
-			if (Shortcut != null && newItem is SdMenuCommand) {
-				try {
-					((SdMenuCommand)newItem).SetAccel (shortcut, owner.ToString ());
-				} catch (Exception) {
-				}
-			}
-			newItem.Sensitive = true; //action != ConditionFailedAction.Disable;
-			return newItem;
-		}
-	}
-}

Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/CollectionUtilities/Comparers.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/CollectionUtilities/Comparers.cs	2005-08-03 09:34:06 UTC (rev 2702)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/CollectionUtilities/Comparers.cs	2005-08-03 09:36:30 UTC (rev 2703)
@@ -64,33 +64,4 @@
 	}
 }
 
-namespace System.Collections.Specialized
-{
-	[Serializable]
-	public class TreeNodeComparer : IComparer {
-		
-		public static Gtk.TreeIterCompareFunc GtkDefault = new Gtk.TreeIterCompareFunc (GtkDefaultComparer);
-		public static IComparer Default = new TreeNodeComparer ();
 
-		public int Compare(object x, object y) {
-			int cmp = ((TreeNode)x).Image.CompareTo (((TreeNode)y).Image);
-			if(cmp == 0) {
-//				cmp = x.SelectedImageIndex - y.SelectedImageIndex;
-//				if(cmp == 0) {
-					cmp = ((TreeNode)x).Text.CompareTo(((TreeNode)y).Text);
-//				}
-			}
-
-			return cmp;
-		}
-
-		static int GtkDefaultComparer (Gtk.TreeModel model, Gtk.TreeIter a, Gtk.TreeIter b)
-		{
-			Gtk.TreeStore ts = (Gtk.TreeStore) model;
-			TreeNode x = (TreeNode) ts.GetValue (a, 2);
-			TreeNode y = (TreeNode) ts.GetValue (b, 2);
-			
-			return x.Text.CompareTo (y.Text);
-		}
-	}
-}

Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Makefile.am
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Makefile.am	2005-08-03 09:34:06 UTC (rev 2702)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Makefile.am	2005-08-03 09:36:30 UTC (rev 2703)
@@ -21,11 +21,9 @@
 
 FILES= \
 Gui/Pads/OpenTaskView.cs \
-Gui/Pads/TreeViewMemento.cs \
 Gui/Pads/FileScout/FileList.cs \
 Gui/Pads/FileScout/FileListItem.cs \
 Gui/Pads/FileScout/FileScout.cs \
-Gui/Pads/PropertyPad/PropertyPadCommands.cs \
 Gui/Pads/PropertyPad/PropertyPad.cs \
 Gui/Pads/ClassPad/ClassData.cs \
 Gui/Pads/ClassPad/ClassNodeBuilder.cs \
@@ -77,16 +75,12 @@
 Gui/AbstractViewContent.cs \
 Gui/GuiService.cs \
 Gui/CommandService.cs \
-Gui/Components/SdMenuSeparator.cs \
+Gui/Components/MenuButtonEntry.cs \
 Gui/Components/StatusBar/SdStatusBar.cs \
 Gui/Components/StatusBar/IStatusIcon.cs \
 Gui/Components/LocalizedPropertyGrid/LocalizedPropertyDescriptor.cs \
 Gui/Components/LocalizedPropertyGrid/LocalizedObject.cs \
 Gui/Components/LocalizedPropertyGrid/LocalizedPropertyAttribute.cs \
-Gui/Components/SdMenu.cs \
-Gui/Components/SdMenuCheckBox.cs \
-Gui/Components/SdMenuCommand.cs \
-Gui/Components/SdToolbarCommand.cs \
 Gui/Completion/CodeCompletionData.cs \
 Gui/Completion/CodeCompletionDataProvider.cs \
 Gui/Completion/CommentCompletionDataProvider.cs \
@@ -211,7 +205,6 @@
 Commands/ProjectCommands.cs \
 Commands/VBConverter/ConvertProject.cs \
 Commands/VBConverter/ConvertBuffer.cs \
-Commands/ProjectOptionsCommands.cs \
 Commands/EditCommands.cs \
 Commands/WindowCommands.cs \
 Commands/AutostartCommands.cs \
@@ -226,7 +219,6 @@
 Services/File/FileEventArgs.cs \
 Services/File/RecentFiles.cs \
 Services/File/RecentOpen.cs \
-Services/MenuService/MenuService.cs \
 Services/DisplayBinding/DisplayBindingService.cs \
 Services/LanguageBinding/LanguageBindingService.cs \
 Services/Tasks/TaskService.cs \
@@ -288,7 +280,6 @@
 Services/ParserService/ReferenceEntry.cs \
 Services/ResourceService.cs \
 Services/MessageService.cs \
-Services/Toolbar/ToolbarService.cs \
 Services/MonodocService.cs \
 Services/SystemAssemblyService.cs \
 Services/DispatchService/AsyncDispatchAttribute.cs \
@@ -318,6 +309,7 @@
 Internal/Codons/Commands/CommandItemCodon.cs \
 Internal/Codons/Commands/ItemSetCodon.cs \
 Internal/Codons/Commands/LinkItemCodon.cs \
+Internal/Codons/Commands/LocalCommandItemCodon.cs \
 Internal/Codons/Commands/SeparatorItemCodon.cs \
 Internal/Codons/DisplayBinding/IDisplayBinding.cs \
 Internal/Codons/DisplayBinding/ISubDisplayBinding.cs \
@@ -336,12 +328,6 @@
 Internal/Codons/IDialogPanelDescriptor.cs \
 Internal/Codons/ExecutionHandlerCodon.cs \
 Internal/Codons/FileFormatCodon.cs \
-Internal/Codons/MenuItems/AbstractCheckableMenuCommand.cs \
-Internal/Codons/MenuItems/ISubmenuBuilder.cs \
-Internal/Codons/MenuItems/IMenuCommand.cs \
-Internal/Codons/MenuItems/AbstractMenuCommand.cs \
-Internal/Codons/MenuItems/ICheckableMenuCommand.cs \
-Internal/Codons/MenuItems/MenuItemCodon.cs \
 Internal/Codons/Pads/NodeBuilderCodon.cs \
 Internal/Codons/Pads/PadCodon.cs \
 Internal/Codons/Pads/PadOptionCodon.cs \

Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/MonoDevelopCore.addin.xml
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/MonoDevelopCore.addin.xml	2005-08-03 09:34:06 UTC (rev 2702)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/MonoDevelopCore.addin.xml	2005-08-03 09:36:30 UTC (rev 2703)
@@ -101,13 +101,6 @@
 		       class = "MonoDevelop.Gui.Pads.ProjectBrowser.DefaultDotNetNodeBuilder"/>
 	</Extension>
 
-	<Extension path = "/SharpDevelop/Views/ClassScout/ContextMenu/ClassNode">
-                <MenuItem id = "Export"
-                          _label = "ExportSignature" 
-                          class = "MonoDevelop.Commands.ClassScoutCommands.ExportClassSignature"/>
-	</Extension>
-
-
 	<Extension path = "/SharpDevelop/Commands">
 	
 		<!-- EditCommands -->
@@ -621,23 +614,14 @@
 	
 
 	<Extension path = "/SharpDevelop/Workbench/ProjectOptions/ConfigNodeMenu">
-                <MenuItem id = "Add" 
-                          _label = "Add"
-                          class = "MonoDevelop.Commands.AddProjectConfiguration"/>
+		<LocalCommandItem id = "@AddConfiguration" _label = "Add"/>
 	</Extension>
 	
 	<Extension path = "/SharpDevelop/Workbench/ProjectOptions/SelectedConfigMenu">
-                <MenuItem id = "Rename" 
-                          _label = "Rename"
-                          class = "MonoDevelop.Commands.RenameProjectConfiguration"/>
-                <MenuItem id = "Remove" 
-                          _label = "Remove"
-                          class = "MonoDevelop.Commands.RemoveProjectConfiguration"/>
-                <MenuItem id = "RenameRemoveSeparator" 
-                          _label = "-"/>
-                <MenuItem id = "SetActive" 
-                          _label = "Set as active"
-                          class = "MonoDevelop.Commands.SetActiveProjectConfiguration"/>
+		<LocalCommandItem id = "@RenameConfiguration" _label = "Rename" />
+		<LocalCommandItem id = "@RemoveConfiguration" _label = "Remove" />
+		<SeparatorItem id = "s1" />
+		<LocalCommandItem id = "@SetActiveConfiguration" _label = "Set as active"/>
 	</Extension>
 	
 	<Extension path = "/SharpDevelop/Workbench/ProjectOptions/GeneralOptions">
@@ -682,42 +666,7 @@
 			             class = "MonoDevelop.Gui.Dialogs.OptionPanels.CombineConfigurationPanel"/>
 	</Extension>
 
-<!-- not using these, since the OpenFileTab has been removed (replaced with Tab_Label) jba 5 march 2004
-	<Extension path = "/SharpDevelop/Workbench/OpenFileTab/ContextMenu">
-                <MenuItem id = "Close"
-	                  _label = "${res:OpenFileTabEventHandler.ContextMenu.Close}" 
-	                  class = "MonoDevelop.Commands.TabStrip.CloseFileTab"/>
-		<MenuItem id = "CloseSeparator" _label = "-" />
-                <Conditional action="Disable">
-	                <And>
-	                	<Condition ownerstate="FileDirty"/>
-	                	<Not>
-	                		<Condition ownerstate="FileUntitled"/>
-	                	</Not>
-	                </And>
-	                
-	                <MenuItem id = "Save"
-		                  _label = "${res:OpenFileTabEventHandler.ContextMenu.Save}" 
-		                  icon  = "Icons.16x16.SaveIcon"
-		                  class = "MonoDevelop.Commands.TabStrip.SaveFileTab"/>
-		</Conditional>
-                <MenuItem id = "SaveAs"
-	                  _label = "${res:OpenFileTabEventHandler.ContextMenu.SaveAs}" 
-	                  icon  = "Icons.16x16.SaveAsIcon"
-			  class = "MonoDevelop.Commands.TabStrip.SaveFileAsTab"/>
 
-		<MenuItem id = "SaveSeparator" _label = "-" />
-                <Conditional action="Disable">
-	                <Not>
-	                	<Condition ownerstate="FileUntitled" />
-	                </Not>
-	                <MenuItem id = "CopyPathName"
-		                  _label = "${res:OpenFileTabEventHandler.CopyPathName}" 
-		                  class = "MonoDevelop.Commands.TabStrip.CopyPathName"/>
-		</Conditional>
-	</Extension>
--->
-
 	<Extension path = "/SharpDevelop/Workbench/FileFilter">
 		<FileFilter id = "AllFiles"
 		            name = "${res:SharpDevelop.FileFilter.AllFiles}"
@@ -982,61 +931,15 @@
 			<SeparatorItem id = "Separator3" />
 			<CommandItem id = "MonoDevelop.Commands.HelpCommands.About" />
 		</ItemSet>
-	</Extension>	
+	</Extension>
 
-
-	<Extension path = "/SharpDevelop/Workbench/SharpDevelopSideBar/ContextMenu">
-		<Conditional ownerstate="TabCanBeDeleted" action="Disable">
-			<MenuItem id = "DeleteTab" 
-			          _label = "Delete Tab" 
-			          class = "MonoDevelop.Commands.SideBarDeleteTabHeader"/>
-		</Conditional>
-	
-		<MenuItem id    = "RenameTab" 
-		          _label = "Rename Tab" 
-		          class = "MonoDevelop.Commands.SideBarRenameTabHeader"/>
-                          
-		<MenuItem id = "Separator1" _label = "-" />
-		<MenuItem id    = "AddTab" 
-		          _label = "Add Tab" 
-		          class = "MonoDevelop.Commands.SideBarAddTabHeader"/>
-                          
-		<MenuItem id = "Separator2" _label = "-" />
-		<Conditional ownerstate="CanMoveUp" action="Disable">
-			<MenuItem id    = "MoveTabUp" 
-			          _label = "Move Tab Up" 
-			          class = "MonoDevelop.Commands.SideBarMoveTabUp"/>
-		</Conditional>
-                
-		<Conditional ownerstate="CanMoveDown" action="Disable">
-			<MenuItem id    = "MoveTabDown" 
-			          _label = "Move Tab Down" 
-			          class = "MonoDevelop.Commands.SideBarMoveTabDown"/>
-		</Conditional>
+	<Extension path = "/SharpDevelop/DefaultEditor/SearchAndReplace/WildcardHelpPath">
+		<LocalCommandItem id = "@*Char" _label = "* Zero or more of any character" />
+		<LocalCommandItem id = "@?Char" _label = "? Any single character" />
+		<LocalCommandItem id = "@#Char" _label = "# Any single digit" />
+		<LocalCommandItem id = "@[]Char" _label = "[] Any one character in the set" />
+		<LocalCommandItem id = "@[!]Char" _label = "[!] Any one character not in the set" />
 	</Extension>
-	
-	<Extension path = "/SharpDevelop/Workbench/SharpDevelopSideBar/SideTab/ContextMenu">
-		<MenuItem id = "RenameTabItem" 
-		          _label = "Rename Tab" 
-		          class = "MonoDevelop.Commands.SideBarRenameTabItem" />
-		<MenuItem id = "DeleteTabItem" 
-		          _label = "Delete Tab" 
-		          class = "MonoDevelop.Commands.SideBarDeleteTabItem"/>
-		<Conditional ownerstate="TabCanBeDeleted">
-			<MenuItem id = "Separator1" _label = "-" />
-			<Conditional ownerstate="CanMoveItemUp" action="Disable">
-				<MenuItem id = "MoveItemUp" 
-				          _label = "Move Item up" 
-				          class = "MonoDevelop.Commands.SideBarMoveActiveItemUp"/>
-			</Conditional>
-				                      
-			<Conditional ownerstate="CanMoveItemDown" action="Disable">
-				<MenuItem id = "MoveItemDown" 
-				          _label = "Move Item Down" 
-				          class = "MonoDevelop.Commands.SideBarMoveActiveItemDown"/>
-			</Conditional>
-		</Conditional>
-	</Extension>
 
 	<Extension path = "/SharpDevelop/CompletionDatabaseWizard">
 		<DialogPanel id = "SetupPanel"
@@ -1056,30 +959,4 @@
 		             class = "MonoDevelop.Gui.Dialogs.OptionPanels.CompletionDatabaseWizard.CreationFinishedPanel"/>
 	</Extension>
 	
-	<!-- web references -->
-
-<!-- ORIGINAL #D COMMENT
-	<Extension path = "/SharpDevelop/Views/ProjectBrowser/ContextMenu/ReferenceFolderNode">
-		<MenuItem id = "AddWebReference"
-	                  _label = "Add Web Reference" 
-	                  class = "MonoDevelop.Commands.ProjectBrowser.AddWebReferenceToProject"/>
-	</Extension>
--->
-	<!-- ORIGINAL #D COMMENT
-	<Extension path = "/SharpDevelop/Views/ProjectBrowser/ContextMenu/ReferenceNode">
-		<MenuItem id = "Refresh"
-			  _label = "Refresh" 
-			  class = "MonoDevelop.Commands.ProjectBrowser.RefreshWebReference"/>
-	</Extension> -->
-
-	<Extension path = "/SharpDevelop/Views/PropertyPad/ContextMenu">
-		<MenuItem id    = "ResetProperty"
-		          _label = "Reset Property" 
-		          class = "MonoDevelop.Gui.Pads.PropertyPadResetCommand"/>
-		<MenuItem id = "Separator" _label = "-" />
-		<MenuItem id    = "ShowDescription"
-		          _label = "Show Description" 
-		          class = "MonoDevelop.Gui.Pads.PropertyPadShowDescriptionCommand"/>
-	</Extension>
-	
 </AddIn>

Deleted: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/MenuService/MenuService.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/MenuService/MenuService.cs	2005-08-03 09:34:06 UTC (rev 2702)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/MenuService/MenuService.cs	2005-08-03 09:36:30 UTC (rev 2703)
@@ -1,135 +0,0 @@
-// <file>
-//     <copyright see="prj:///doc/copyright.txt"/>
-//     <license see="prj:///doc/license.txt"/>
-//     <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
-//     <version value="$version"/>
-// </file>
-
-using System;
-using System.IO;
-using System.Collections;
-using System.Threading;
-using System.Resources;
-using System.Drawing;
-using System.Diagnostics;
-using System.Reflection;
-using System.Xml;
-using MonoDevelop.Core.AddIns;
-using MonoDevelop.Core.AddIns.Codons;
-using MonoDevelop.Core.Services;
-using MonoDevelop.Gui.Components;
-
-namespace MonoDevelop.Services
-{
-	public class MenuService : AbstractService
-	{/*
-		void ContextMenuPopupHandler(object sender, EventArgs e)
-		{
-			CommandBarContextMenu contextMenu = (CommandBarContextMenu)sender;
-			foreach (object o in contextMenu.Items) {
-				if (o is IStatusUpdate) {
-					((IStatusUpdate)o).UpdateStatus();
-				}
-			}
-		}
-		*/
-		public Gtk.Menu CreateContextMenu(object owner, string addInTreePath)
-		{
-			ArrayList buildItems = AddInTreeSingleton.AddInTree.GetTreeNode(addInTreePath).BuildChildItems(owner);
-			//CommandBarContextMenu contextMenu = new CommandBarContextMenu();
-			//contextMenu.Popup += new EventHandler(ContextMenuPopupHandler);
-			
-			Gtk.Menu contextMenu = new Gtk.Menu();
-			foreach (object item in buildItems) {
-				if (item is Gtk.MenuItem) {
-					//contextMenu.Items.Add((CommandBarItem)item);
-					contextMenu.Append((Gtk.MenuItem)item);
-				} else {
-					ISubmenuBuilder submenuBuilder = (ISubmenuBuilder)item;
-					foreach(Gtk.MenuItem mi in submenuBuilder.BuildSubmenu(null, owner)) {
-						contextMenu.Append(mi);
-					}
-					//contextMenu.Items.AddRange(submenuBuilder.BuildSubmenu(null, owner));
-				}
-			}
-			contextMenu.Show();
-			return contextMenu;
-		}
-		
-		public void ShowContextMenu(object owner, string addInTreePath, Gtk.Widget parent)
-		{
-			//CreateContextMenu(owner, addInTreePath).Show(parent, new Point(x, y));
-			CreateContextMenu(owner, addInTreePath).Popup(null, null, null, IntPtr.Zero, 0, Gtk.Global.CurrentEventTime);
-		}
-		
-		public void ShowContextMenu (Gtk.Menu menu)
-		{
-			menu.Popup (null, null, null, IntPtr.Zero, 0, Gtk.Global.CurrentEventTime);
-		}
-		
-		class QuickInsertMenuHandler
-		{
-			Gtk.Editable targetControl;
-			string      text;
-			
-			public QuickInsertMenuHandler(Gtk.Editable targetControl, string text)
-			{
-				this.targetControl = targetControl;
-				this.text          = text;
-			}
-			
-			public EventHandler EventHandler {
-				get {
-					return new EventHandler(PopupMenuHandler);
-				}
-			}
-			void PopupMenuHandler(object sender, EventArgs e)
-			{
-				// insert at current cursor position, deleting any selections
-				int tempInt = targetControl.Position;
-				targetControl.DeleteSelection();
-				targetControl.InsertText(text, ref tempInt);
-			}
-		}
-		
-		class QuickInsertHandler
-		{
-			Gtk.Menu quickInsertMenu;
-			
-			//public QuickInsertHandler(Control popupControl, CommandBarContextMenu quickInsertMenu)
-			public QuickInsertHandler(Gtk.Button popupControl, Gtk.Menu quickInsertMenu)
-			{
-				this.quickInsertMenu = quickInsertMenu;
-				
-				popupControl.Clicked += new EventHandler(showQuickInsertMenu);
-			}
-			
-			void showQuickInsertMenu(object sender, EventArgs e)
-			{
-				//Point cords = new Point(popupControl.Width, 0);
-				//quickInsertMenu.Show(popupControl, cords);
-				quickInsertMenu.Popup(null, null, null, IntPtr.Zero, 0, Gtk.Global.CurrentEventTime);
-			}
-		}
-		
-		//public void CreateQuickInsertMenu(TextBoxBase targetControl, Control popupControl, string[,] quickInsertMenuItems)		
-		public void CreateQuickInsertMenu(Gtk.Editable targetControl, Gtk.Button popupControl, string[,] quickInsertMenuItems)
-		{
-			//CommandBarContextMenu contextMenu = new CommandBarContextMenu();
-			Gtk.Menu contextMenu = new Gtk.Menu();
-			for (int i = 0; i < quickInsertMenuItems.GetLength(0); ++i) {
-				if (quickInsertMenuItems[i, 0] == "-") {
-					contextMenu.Append(new SdMenuSeparator());
-				} else {
-					SdMenuCommand cmd = new SdMenuCommand(this,
-					                                      Runtime.StringParserService.Parse (quickInsertMenuItems[i, 0]),
-					                                      new QuickInsertMenuHandler(targetControl, quickInsertMenuItems[i, 1]).EventHandler);
-					contextMenu.Append(cmd);
-				}
-			}
-			new QuickInsertHandler(popupControl, contextMenu);
-			
-			contextMenu.ShowAll();
-		}
-	}
-}

Deleted: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/Toolbar/ToolbarService.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/Toolbar/ToolbarService.cs	2005-08-03 09:34:06 UTC (rev 2702)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/Toolbar/ToolbarService.cs	2005-08-03 09:36:30 UTC (rev 2703)
@@ -1,66 +0,0 @@
-// <file>
-//     <copyright see="prj:///doc/copyright.txt"/>
-//     <license see="prj:///doc/license.txt"/>
-//     <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
-//     <version value="$version"/>
-// </file>
-
-using System;
-using System.Collections;
-using System.Drawing;
-using System.IO;
-using System.CodeDom.Compiler;
-
-using MonoDevelop.Gui;
-using MonoDevelop.Gui.Components;
-using MonoDevelop.Internal.Project;
-using MonoDevelop.Core.AddIns.Codons;
-using MonoDevelop.Core.AddIns;
-using MonoDevelop.Core.Services;
-using MonoDevelop.Services;
-
-using Gtk;
-
-namespace MonoDevelop.Services
-{
-	public class ToolbarService : AbstractService
-	{
-		readonly static string toolBarPath     = "/SharpDevelop/Workbench/ToolBar";
-		IAddInTreeNode node;
-		
-		public ToolbarService()
-		{
-			this.node  = AddInTreeSingleton.AddInTree.GetTreeNode(toolBarPath);
-		}
-		
-		public Gtk.Toolbar[] CreateToolbars()
-		{
-			ToolbarItemCodon[] codons = (ToolbarItemCodon[])(node.BuildChildItems(this)).ToArray(typeof(ToolbarItemCodon));
-			
-			Gtk.Toolbar[] toolBars = new Gtk.Toolbar[codons.Length];
-			
-			for (int i = 0; i < codons.Length; ++i) {
-				toolBars[i] = CreateToolBarFromCodon(WorkbenchSingleton.Workbench, codons[i]);
-			}
-			return toolBars;
-		}
-		
-		public Gtk.Toolbar CreateToolBarFromCodon (object owner, ToolbarItemCodon codon)
-		{
-			Gtk.Toolbar bar = new Gtk.Toolbar ();
-			bar.ToolbarStyle = Gtk.ToolbarStyle.Icons;
-			
-			foreach (ToolbarItemCodon childCodon in codon.SubItems)
-			{
-				if (childCodon.ToolTip != null) {
-					if (childCodon.ToolTip == "-")
-						bar.Insert (new SeparatorToolItem (), -1);
-					else
-						bar.Insert (new SdToolbarCommand (childCodon, owner), -1);
-				}
-			}
-			return bar;
-		}
-	}
-}
-




More information about the Monodevelop-patches-list mailing list