Author: lluis Date: 2008-02-20 06:32:22 -0500 (Wed, 20 Feb 2008) New Revision: 96236
Modified: trunk/monodevelop/extras/MonoDevelop.AddinAuthoring/ChangeLog trunk/monodevelop/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring.NodeBuilders/AddinReferenceNodeBuilder.cs trunk/monodevelop/extras/MonoDevelop.Profiling/MonoDevelop.Profiling.HeapBuddy/ChangeLog trunk/monodevelop/extras/MonoDevelop.Profiling/MonoDevelop.Profiling.HeapBuddy/Gui/HeapBuddyProfilingSnapshotNodeBuilder.cs trunk/monodevelop/extras/MonoDevelop.Profiling/MonoDevelop.Profiling.HeapShot/ChangeLog trunk/monodevelop/extras/MonoDevelop.Profiling/MonoDevelop.Profiling.HeapShot/Gui/HeapShotProfilingSnapshotNodeBuilder.cs trunk/monodevelop/main/src/addins/CBinding/ChangeLog trunk/monodevelop/main/src/addins/CBinding/ProjectPad/ProjectPackageNodeBuilder.cs trunk/monodevelop/main/src/addins/Deployment/MonoDevelop.Deployment/ChangeLog trunk/monodevelop/main/src/addins/Deployment/MonoDevelop.Deployment/MonoDevelop.Deployment.NodeBuilders/PackageNodeBuilder.cs trunk/monodevelop/main/src/addins/Deployment/MonoDevelop.Deployment/MonoDevelop.Deployment.NodeBuilders/PackagingProjectNodeBuilder.cs trunk/monodevelop/main/src/addins/MonoDevelop.Gettext/ChangeLog trunk/monodevelop/main/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.NodeBuilders/TranslationNodeBuilder.cs trunk/monodevelop/main/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.NodeBuilders/TranslationProjectNodeBuilder.cs trunk/monodevelop/main/src/addins/MonoDevelop.GtkCore/ChangeLog trunk/monodevelop/main/src/addins/MonoDevelop.GtkCore/MonoDevelop.GtkCore.NodeBuilders/ActionGroupNodeBuilder.cs trunk/monodevelop/main/src/addins/MonoDevelop.GtkCore/MonoDevelop.GtkCore.NodeBuilders/WidgetNodeBuilder.cs trunk/monodevelop/main/src/addins/NUnit/ChangeLog trunk/monodevelop/main/src/addins/NUnit/Gui/NUnitAssemblyGroupNodeBuilder.cs trunk/monodevelop/main/src/addins/NUnit/Gui/TestAssemblyNodeBuilder.cs trunk/monodevelop/main/src/core/MonoDevelop.Ide/ChangeLog trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/CombineNodeBuilder.cs trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectFileNodeBuilder.cs trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectFolderNodeBuilder.cs trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectNodeBuilder.cs trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectReferenceNodeBuilder.cs trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/SystemFileNodeBuilder.cs trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/UnknownEntryNodeBuilder.cs trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads/NodeCommandHandler.cs trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/MonoDevelopTreeView.cs Log: Handle the delete key in TreeViewPad, so it will work event if the shortcut is not defined. Modified: trunk/monodevelop/extras/MonoDevelop.AddinAuthoring/ChangeLog =================================================================== --- trunk/monodevelop/extras/MonoDevelop.AddinAuthoring/ChangeLog 2008-02-20 11:16:59 UTC (rev 96235) +++ trunk/monodevelop/extras/MonoDevelop.AddinAuthoring/ChangeLog 2008-02-20 11:32:22 UTC (rev 96236) @@ -1,3 +1,9 @@ +2008-02-20 Lluis Sanchez Gual <[EMAIL PROTECTED]> + + * MonoDevelop.AddinAuthoring.NodeBuilders/AddinReferenceNodeBuilder.cs: + Handle the delete key in TreeViewPad, so it will work event if the + shortcut is not defined. + 2008-02-18 Lluis Sanchez Gual <[EMAIL PROTECTED]> * MonoDevelop.AddinAuthoring/RegistryExtensionNode.cs, Modified: trunk/monodevelop/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring.NodeBuilders/AddinReferenceNodeBuilder.cs =================================================================== --- trunk/monodevelop/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring.NodeBuilders/AddinReferenceNodeBuilder.cs 2008-02-20 11:16:59 UTC (rev 96235) +++ trunk/monodevelop/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring.NodeBuilders/AddinReferenceNodeBuilder.cs 2008-02-20 11:32:22 UTC (rev 96236) @@ -70,8 +70,7 @@ class AddinReferenceCommandHandler: NodeCommandHandler { - [CommandHandler (MonoDevelop.Ide.Commands.EditCommands.Delete)] - public void DeleteDependency () + public override void DeleteItem () { DotNetProject p = CurrentNode.GetParentDataItem (typeof(Project), true) as DotNetProject; AddinData data = AddinData.GetAddinData (p); Modified: trunk/monodevelop/extras/MonoDevelop.Profiling/MonoDevelop.Profiling.HeapBuddy/ChangeLog =================================================================== --- trunk/monodevelop/extras/MonoDevelop.Profiling/MonoDevelop.Profiling.HeapBuddy/ChangeLog 2008-02-20 11:16:59 UTC (rev 96235) +++ trunk/monodevelop/extras/MonoDevelop.Profiling/MonoDevelop.Profiling.HeapBuddy/ChangeLog 2008-02-20 11:32:22 UTC (rev 96236) @@ -1,3 +1,8 @@ +2008-02-20 Lluis Sanchez Gual <[EMAIL PROTECTED]> + + * Gui/HeapBuddyProfilingSnapshotNodeBuilder.cs: Handle the delete key in + TreeViewPad, so it will work event if the shortcut is not defined. + 2008-01-25 Lluis Sanchez Gual <[EMAIL PROTECTED]> * MonoDevelop.Profiling.HeapBuddy.addin.xml: Update MD version. Modified: trunk/monodevelop/extras/MonoDevelop.Profiling/MonoDevelop.Profiling.HeapBuddy/Gui/HeapBuddyProfilingSnapshotNodeBuilder.cs =================================================================== --- trunk/monodevelop/extras/MonoDevelop.Profiling/MonoDevelop.Profiling.HeapBuddy/Gui/HeapBuddyProfilingSnapshotNodeBuilder.cs 2008-02-20 11:16:59 UTC (rev 96235) +++ trunk/monodevelop/extras/MonoDevelop.Profiling/MonoDevelop.Profiling.HeapBuddy/Gui/HeapBuddyProfilingSnapshotNodeBuilder.cs 2008-02-20 11:32:22 UTC (rev 96236) @@ -111,8 +111,7 @@ Services.MessageService.ShowError (GettextCatalog.GetString ("Invalid filename")); } - [CommandHandler (MonoDevelop.Ide.Commands.EditCommands.Delete)] - public void Remove () + public override void DeleteItem () { IProfilingSnapshot snapshot = (IProfilingSnapshot)CurrentNode.DataItem; ProfilingService.RemoveSnapshot (snapshot); Modified: trunk/monodevelop/extras/MonoDevelop.Profiling/MonoDevelop.Profiling.HeapShot/ChangeLog =================================================================== --- trunk/monodevelop/extras/MonoDevelop.Profiling/MonoDevelop.Profiling.HeapShot/ChangeLog 2008-02-20 11:16:59 UTC (rev 96235) +++ trunk/monodevelop/extras/MonoDevelop.Profiling/MonoDevelop.Profiling.HeapShot/ChangeLog 2008-02-20 11:32:22 UTC (rev 96236) @@ -1,3 +1,8 @@ +2008-02-20 Lluis Sanchez Gual <[EMAIL PROTECTED]> + + * Gui/HeapShotProfilingSnapshotNodeBuilder.cs: Handle the delete key in + TreeViewPad, so it will work event if the shortcut is not defined. + 2008-01-25 Lluis Sanchez Gual <[EMAIL PROTECTED]> * MonoDevelop.Profiling.HeapShot.addin.xml: Update MD version. Modified: trunk/monodevelop/extras/MonoDevelop.Profiling/MonoDevelop.Profiling.HeapShot/Gui/HeapShotProfilingSnapshotNodeBuilder.cs =================================================================== --- trunk/monodevelop/extras/MonoDevelop.Profiling/MonoDevelop.Profiling.HeapShot/Gui/HeapShotProfilingSnapshotNodeBuilder.cs 2008-02-20 11:16:59 UTC (rev 96235) +++ trunk/monodevelop/extras/MonoDevelop.Profiling/MonoDevelop.Profiling.HeapShot/Gui/HeapShotProfilingSnapshotNodeBuilder.cs 2008-02-20 11:32:22 UTC (rev 96236) @@ -110,8 +110,7 @@ Services.MessageService.ShowError (GettextCatalog.GetString ("Invalid filename")); } - [CommandHandler (MonoDevelop.Ide.Commands.EditCommands.Delete)] - public void Remove () + public override void DeleteItem () { IProfilingSnapshot snapshot = (IProfilingSnapshot)CurrentNode.DataItem; ProfilingService.RemoveSnapshot (snapshot); Modified: trunk/monodevelop/main/src/addins/CBinding/ChangeLog =================================================================== --- trunk/monodevelop/main/src/addins/CBinding/ChangeLog 2008-02-20 11:16:59 UTC (rev 96235) +++ trunk/monodevelop/main/src/addins/CBinding/ChangeLog 2008-02-20 11:32:22 UTC (rev 96236) @@ -1,3 +1,8 @@ +2008-02-20 Lluis Sanchez Gual <[EMAIL PROTECTED]> + + * ProjectPad/ProjectPackageNodeBuilder.cs: Handle the delete key in + TreeViewPad, so it will work event if the shortcut is not defined. + 2008-02-19 Marcos David Marín Amador <[EMAIL PROTECTED]> * Compiler/GNUCompiler.cs: Handle better CleanPrecompiledHeaders, fixes bug Modified: trunk/monodevelop/main/src/addins/CBinding/ProjectPad/ProjectPackageNodeBuilder.cs =================================================================== --- trunk/monodevelop/main/src/addins/CBinding/ProjectPad/ProjectPackageNodeBuilder.cs 2008-02-20 11:16:59 UTC (rev 96235) +++ trunk/monodevelop/main/src/addins/CBinding/ProjectPad/ProjectPackageNodeBuilder.cs 2008-02-20 11:32:22 UTC (rev 96236) @@ -78,8 +78,7 @@ public class PackageNodeCommandHandler : NodeCommandHandler { - [CommandHandler (EditCommands.Delete)] - public void RomoveItem () + public override void DeleteItem () { ProjectPackage package = (ProjectPackage)CurrentNode.DataItem; CProject project = (CProject)CurrentNode.GetParentDataItem ( Modified: trunk/monodevelop/main/src/addins/Deployment/MonoDevelop.Deployment/ChangeLog =================================================================== --- trunk/monodevelop/main/src/addins/Deployment/MonoDevelop.Deployment/ChangeLog 2008-02-20 11:16:59 UTC (rev 96235) +++ trunk/monodevelop/main/src/addins/Deployment/MonoDevelop.Deployment/ChangeLog 2008-02-20 11:32:22 UTC (rev 96236) @@ -1,3 +1,10 @@ +2008-02-20 Lluis Sanchez Gual <[EMAIL PROTECTED]> + + * MonoDevelop.Deployment.NodeBuilders/PackageNodeBuilder.cs, + MonoDevelop.Deployment.NodeBuilders/PackagingProjectNodeBuilder.cs: + Handle the delete key in TreeViewPad, so it will work event if the + shortcut is not defined. + 2008-02-05 Mike Krüger <[EMAIL PROTECTED]> * MonoDevelop.Deployment.addin.xml: Structured main menu. Modified: trunk/monodevelop/main/src/addins/Deployment/MonoDevelop.Deployment/MonoDevelop.Deployment.NodeBuilders/PackageNodeBuilder.cs =================================================================== --- trunk/monodevelop/main/src/addins/Deployment/MonoDevelop.Deployment/MonoDevelop.Deployment.NodeBuilders/PackageNodeBuilder.cs 2008-02-20 11:16:59 UTC (rev 96235) +++ trunk/monodevelop/main/src/addins/Deployment/MonoDevelop.Deployment/MonoDevelop.Deployment.NodeBuilders/PackageNodeBuilder.cs 2008-02-20 11:32:22 UTC (rev 96236) @@ -122,8 +122,7 @@ info.Enabled = !(package.PackageBuilder is UnknownPackageBuilder); } - [CommandHandler (EditCommands.Delete)] - protected void OnDelete () + public override void DeleteItem () { Package package = CurrentNode.DataItem as Package; if (IdeApp.Services.MessageService.AskQuestion (GettextCatalog.GetString ("Are you sure you want to delete the package '{0}'?", package.Name))) { Modified: trunk/monodevelop/main/src/addins/Deployment/MonoDevelop.Deployment/MonoDevelop.Deployment.NodeBuilders/PackagingProjectNodeBuilder.cs =================================================================== --- trunk/monodevelop/main/src/addins/Deployment/MonoDevelop.Deployment/MonoDevelop.Deployment.NodeBuilders/PackagingProjectNodeBuilder.cs 2008-02-20 11:16:59 UTC (rev 96235) +++ trunk/monodevelop/main/src/addins/Deployment/MonoDevelop.Deployment/MonoDevelop.Deployment.NodeBuilders/PackagingProjectNodeBuilder.cs 2008-02-20 11:32:22 UTC (rev 96236) @@ -109,8 +109,7 @@ class PackagingProjectNodeCommandHandler: NodeCommandHandler { - [CommandHandler (EditCommands.Delete)] - protected void OnDelete () + public override void DeleteItem () { PackagingProject project = CurrentNode.DataItem as PackagingProject; if (IdeApp.Services.MessageService.AskQuestion (GettextCatalog.GetString ("Are you sure you want to delete the project '{0}'?", project.Name))) { Modified: trunk/monodevelop/main/src/addins/MonoDevelop.Gettext/ChangeLog =================================================================== --- trunk/monodevelop/main/src/addins/MonoDevelop.Gettext/ChangeLog 2008-02-20 11:16:59 UTC (rev 96235) +++ trunk/monodevelop/main/src/addins/MonoDevelop.Gettext/ChangeLog 2008-02-20 11:32:22 UTC (rev 96236) @@ -1,3 +1,10 @@ +2008-02-20 Lluis Sanchez Gual <[EMAIL PROTECTED]> + + * MonoDevelop.Gettext.NodeBuilders/TranslationNodeBuilder.cs, + MonoDevelop.Gettext.NodeBuilders/TranslationProjectNodeBuilder.cs: + Handle the delete key in TreeViewPad, so it will work event if the + shortcut is not defined. + 2008-02-18 Lluis Sanchez Gual <[EMAIL PROTECTED]> * MonoDevelop.Gettext/TranslationProject.cs: Include .po files in the list Modified: trunk/monodevelop/main/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.NodeBuilders/TranslationNodeBuilder.cs =================================================================== --- trunk/monodevelop/main/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.NodeBuilders/TranslationNodeBuilder.cs 2008-02-20 11:16:59 UTC (rev 96235) +++ trunk/monodevelop/main/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.NodeBuilders/TranslationNodeBuilder.cs 2008-02-20 11:32:22 UTC (rev 96236) @@ -103,8 +103,7 @@ IdeApp.Workbench.OpenDocument (Path.Combine (project.BaseDirectory, translation.FileName)); } - [CommandHandler (MonoDevelop.Ide.Commands.EditCommands.Delete)] - public void OnDelete () + public override void DeleteItem () { TranslationProject project = CurrentNode.GetParentDataItem (typeof(TranslationProject), false) as TranslationProject; Translation translation = CurrentNode.DataItem as Translation; Modified: trunk/monodevelop/main/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.NodeBuilders/TranslationProjectNodeBuilder.cs =================================================================== --- trunk/monodevelop/main/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.NodeBuilders/TranslationProjectNodeBuilder.cs 2008-02-20 11:16:59 UTC (rev 96235) +++ trunk/monodevelop/main/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.NodeBuilders/TranslationProjectNodeBuilder.cs 2008-02-20 11:32:22 UTC (rev 96236) @@ -116,8 +116,7 @@ class TranslationProjectNodeCommandHandler : NodeCommandHandler { - [CommandHandler (MonoDevelop.Ide.Commands.EditCommands.Delete)] - public void OnDelete () + public override void DeleteItem () { TranslationProject project = CurrentNode.DataItem as TranslationProject; if (project == null) Modified: trunk/monodevelop/main/src/addins/MonoDevelop.GtkCore/ChangeLog =================================================================== --- trunk/monodevelop/main/src/addins/MonoDevelop.GtkCore/ChangeLog 2008-02-20 11:16:59 UTC (rev 96235) +++ trunk/monodevelop/main/src/addins/MonoDevelop.GtkCore/ChangeLog 2008-02-20 11:32:22 UTC (rev 96236) @@ -1,3 +1,10 @@ +2008-02-20 Lluis Sanchez Gual <[EMAIL PROTECTED]> + + * MonoDevelop.GtkCore.NodeBuilders/ActionGroupNodeBuilder.cs, + MonoDevelop.GtkCore.NodeBuilders/WidgetNodeBuilder.cs: Handle the delete + key in TreeViewPad, so it will work event if the shortcut is not + defined. + 2008-01-29 Lluis Sanchez Gual <[EMAIL PROTECTED]> * MonoDevelop.GtkCore.addin.xml, MonoDevelop.GtkCore.mdp, Makefile.am, Modified: trunk/monodevelop/main/src/addins/MonoDevelop.GtkCore/MonoDevelop.GtkCore.NodeBuilders/ActionGroupNodeBuilder.cs =================================================================== --- trunk/monodevelop/main/src/addins/MonoDevelop.GtkCore/MonoDevelop.GtkCore.NodeBuilders/ActionGroupNodeBuilder.cs 2008-02-20 11:16:59 UTC (rev 96235) +++ trunk/monodevelop/main/src/addins/MonoDevelop.GtkCore/MonoDevelop.GtkCore.NodeBuilders/ActionGroupNodeBuilder.cs 2008-02-20 11:32:22 UTC (rev 96236) @@ -107,17 +107,14 @@ } } - [CommandUpdateHandler (EditCommands.Delete)] - public void OnUpdateDelete (CommandInfo cinfo) + public override bool CanDeleteItem () { // Don't allow deleting action groups local to a window GuiBuilderWindow w = (GuiBuilderWindow) CurrentNode.GetParentDataItem (typeof(GuiBuilderWindow), false); - if (w != null) - cinfo.Enabled = false; + return (w == null); } - [CommandHandler (EditCommands.Delete)] - public void OnDelete () + public override void DeleteItem () { // Don't allow deleting action groups local to a window GuiBuilderWindow w = (GuiBuilderWindow) CurrentNode.GetParentDataItem (typeof(GuiBuilderWindow), false); Modified: trunk/monodevelop/main/src/addins/MonoDevelop.GtkCore/MonoDevelop.GtkCore.NodeBuilders/WidgetNodeBuilder.cs =================================================================== --- trunk/monodevelop/main/src/addins/MonoDevelop.GtkCore/MonoDevelop.GtkCore.NodeBuilders/WidgetNodeBuilder.cs 2008-02-20 11:16:59 UTC (rev 96235) +++ trunk/monodevelop/main/src/addins/MonoDevelop.GtkCore/MonoDevelop.GtkCore.NodeBuilders/WidgetNodeBuilder.cs 2008-02-20 11:32:22 UTC (rev 96236) @@ -132,8 +132,7 @@ } } - [CommandHandler (EditCommands.Delete)] - public void OnDelete () + public override void DeleteItem () { GuiBuilderWindow w = (GuiBuilderWindow) CurrentNode.DataItem; string fn = FileService.AbsoluteToRelativePath (w.Project.Project.BaseDirectory, w.SourceCodeFile); Modified: trunk/monodevelop/main/src/addins/NUnit/ChangeLog =================================================================== --- trunk/monodevelop/main/src/addins/NUnit/ChangeLog 2008-02-20 11:16:59 UTC (rev 96235) +++ trunk/monodevelop/main/src/addins/NUnit/ChangeLog 2008-02-20 11:32:22 UTC (rev 96236) @@ -1,3 +1,9 @@ +2008-02-20 Lluis Sanchez Gual <[EMAIL PROTECTED]> + + * Gui/NUnitAssemblyGroupNodeBuilder.cs, Gui/TestAssemblyNodeBuilder.cs: + Handle the delete key in TreeViewPad, so it will work event if the + shortcut is not defined. + 2008-02-06 Mike Krüger <[EMAIL PROTECTED]> * Gui/TestPad.cs: Some changes for the new TreeViePiye Modified: trunk/monodevelop/main/src/addins/NUnit/Gui/NUnitAssemblyGroupNodeBuilder.cs =================================================================== --- trunk/monodevelop/main/src/addins/NUnit/Gui/NUnitAssemblyGroupNodeBuilder.cs 2008-02-20 11:16:59 UTC (rev 96235) +++ trunk/monodevelop/main/src/addins/NUnit/Gui/NUnitAssemblyGroupNodeBuilder.cs 2008-02-20 11:32:22 UTC (rev 96236) @@ -116,8 +116,7 @@ { } - [CommandHandler (EditCommands.Delete)] - protected void OnDeleteNUnitAssemblyGroup () + public override void DeleteItem () { NUnitAssemblyGroupProject project = CurrentNode.DataItem as NUnitAssemblyGroupProject; project.ParentCombine.RemoveEntry (project); Modified: trunk/monodevelop/main/src/addins/NUnit/Gui/TestAssemblyNodeBuilder.cs =================================================================== --- trunk/monodevelop/main/src/addins/NUnit/Gui/TestAssemblyNodeBuilder.cs 2008-02-20 11:16:59 UTC (rev 96235) +++ trunk/monodevelop/main/src/addins/NUnit/Gui/TestAssemblyNodeBuilder.cs 2008-02-20 11:32:22 UTC (rev 96236) @@ -69,8 +69,7 @@ class TestAssemblyNodeCommandHandler: NodeCommandHandler { - [CommandHandler (EditCommands.Delete)] - protected void OnDeleteAssembly () + public override void DeleteItem () { TestAssembly asm = CurrentNode.DataItem as TestAssembly; NUnitAssemblyGroupProjectConfiguration config = (NUnitAssemblyGroupProjectConfiguration) CurrentNode.GetParentDataItem (typeof(NUnitAssemblyGroupProjectConfiguration), false); Modified: trunk/monodevelop/main/src/core/MonoDevelop.Ide/ChangeLog =================================================================== --- trunk/monodevelop/main/src/core/MonoDevelop.Ide/ChangeLog 2008-02-20 11:16:59 UTC (rev 96235) +++ trunk/monodevelop/main/src/core/MonoDevelop.Ide/ChangeLog 2008-02-20 11:32:22 UTC (rev 96236) @@ -1,3 +1,16 @@ +2008-02-20 Lluis Sanchez Gual <[EMAIL PROTECTED]> + + * MonoDevelop.Ide.Gui.Pads.ProjectPad/CombineNodeBuilder.cs, + MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectFileNodeBuilder.cs, + MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectFolderNodeBuilder.cs, + MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectNodeBuilder.cs, + MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectReferenceNodeBuilder.cs, + MonoDevelop.Ide.Gui.Pads.ProjectPad/SystemFileNodeBuilder.cs, + MonoDevelop.Ide.Gui.Pads.ProjectPad/UnknownEntryNodeBuilder.cs, + MonoDevelop.Ide.Gui.Pads/NodeCommandHandler.cs, + MonoDevelop.Ide.Gui/MonoDevelopTreeView.cs: Handle the delete key in + TreeViewPad, so it will work event if the shortcut is not defined. + 2008-02-19 Mike Krüger <[EMAIL PROTECTED]> * MonoDevelop.Ide.Commands/ProjectCommands.cs, MonoDevelop.Ide.addin.xml: Modified: trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/MonoDevelopTreeView.cs =================================================================== --- trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/MonoDevelopTreeView.cs 2008-02-20 11:16:59 UTC (rev 96235) +++ trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/MonoDevelopTreeView.cs 2008-02-20 11:32:22 UTC (rev 96236) @@ -203,6 +203,8 @@ tree.DragMotion += new Gtk.DragMotionHandler (OnDragMotion); tree.CursorChanged += new EventHandler (OnSelectionChanged); + tree.KeyPressEvent += OnKeyPress; + this.Add (tree); this.ShowAll (); } @@ -552,7 +554,50 @@ } OnCurrentItemActivated (EventArgs.Empty); } + + [CommandHandler (EditCommands.Delete)] + public virtual void DeleteCurrentItem () + { + TreeNodeNavigator node = (TreeNodeNavigator) GetSelectedNode (); + if (node != null) { + NodeBuilder[] chain = node.NodeBuilderChain; + NodePosition pos = node.CurrentPosition; + foreach (NodeBuilder b in chain) { + NodeCommandHandler handler = b.CommandHandler; + handler.SetCurrentNode (node); + if (handler.CanDeleteItem ()) { + Console.WriteLine ("pp deleting: "); + node.MoveToPosition (pos); + handler.DeleteItem (); + } + node.MoveToPosition (pos); + } + } + } + + [CommandUpdateHandler (EditCommands.Delete)] + internal void CanDeleteCurrentItem (CommandInfo info) + { + info.Bypass = !CanDeleteCurrentItem (); + } + protected virtual bool CanDeleteCurrentItem () + { + TreeNodeNavigator node = (TreeNodeNavigator) GetSelectedNode (); + if (node != null) { + NodeBuilder[] chain = node.NodeBuilderChain; + NodePosition pos = node.CurrentPosition; + foreach (NodeBuilder b in chain) { + NodeCommandHandler handler = b.CommandHandler; + handler.SetCurrentNode (node); + if (handler.CanDeleteItem ()) + return true; + node.MoveToPosition (pos); + } + } + return false; + } + protected virtual void OnCurrentItemActivated (EventArgs args) { if (CurrentItemActivated != null) @@ -1221,6 +1266,13 @@ { tree.CollapseAll(); } + + void OnKeyPress (object o, Gtk.KeyPressEventArgs args) + { + Console.WriteLine ("pp key: "); + if (args.Event.Key == Gdk.Key.Delete || args.Event.Key == Gdk.Key.KP_Delete) + DeleteCurrentItem (); + } void OnPopupMenu (object o, Gtk.PopupMenuArgs args) { Modified: trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads/NodeCommandHandler.cs =================================================================== --- trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads/NodeCommandHandler.cs 2008-02-20 11:16:59 UTC (rev 96235) +++ trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads/NodeCommandHandler.cs 2008-02-20 11:32:22 UTC (rev 96236) @@ -78,6 +78,15 @@ { } + public virtual bool CanDeleteItem () + { + return GetType().GetMethod ("DeleteItem").DeclaringType != typeof(NodeCommandHandler); + } + + public virtual void DeleteItem () + { + } + public virtual DragOperation CanDragNode () { return DragOperation.None; Modified: trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/CombineNodeBuilder.cs =================================================================== --- trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/CombineNodeBuilder.cs 2008-02-20 11:16:59 UTC (rev 96235) +++ trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/CombineNodeBuilder.cs 2008-02-20 11:32:22 UTC (rev 96236) @@ -206,8 +206,7 @@ } - [CommandHandler (EditCommands.Delete)] - public void RemoveItem () + public override void DeleteItem () { Combine combine = CurrentNode.DataItem as Combine; Combine parent = CurrentNode.GetParentDataItem (typeof(Combine), false) as Combine; @@ -221,11 +220,10 @@ } } - [CommandUpdateHandler (EditCommands.Delete)] - public void OnUpdateRemoveItem (CommandInfo info) + public override bool CanDeleteItem () { Combine parent = CurrentNode.GetParentDataItem (typeof(Combine), false) as Combine; - info.Enabled = parent != null; + return parent != null; } [CommandHandler (ProjectCommands.AddNewProject)] Modified: trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectFileNodeBuilder.cs =================================================================== --- trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectFileNodeBuilder.cs 2008-02-20 11:16:59 UTC (rev 96235) +++ trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectFileNodeBuilder.cs 2008-02-20 11:32:22 UTC (rev 96236) @@ -155,7 +155,7 @@ } [CommandHandler (EditCommands.Delete)] - public void RemoveItem () + public override void DeleteItem () { ProjectFile file = CurrentNode.DataItem as ProjectFile; Project project = CurrentNode.GetParentDataItem (typeof(Project), false) as Project; Modified: trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectFolderNodeBuilder.cs =================================================================== --- trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectFolderNodeBuilder.cs 2008-02-20 11:16:59 UTC (rev 96235) +++ trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectFolderNodeBuilder.cs 2008-02-20 11:32:22 UTC (rev 96236) @@ -167,8 +167,7 @@ } } - [CommandHandler (EditCommands.Delete)] - public void RemoveItem () + public override void DeleteItem () { ProjectFolder folder = (ProjectFolder) CurrentNode.DataItem as ProjectFolder; Project project = folder.Project; Modified: trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectNodeBuilder.cs =================================================================== --- trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectNodeBuilder.cs 2008-02-20 11:16:59 UTC (rev 96235) +++ trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectNodeBuilder.cs 2008-02-20 11:32:22 UTC (rev 96236) @@ -325,8 +325,7 @@ IdeApp.ProjectOperations.SaveCombine (); } - [CommandHandler (EditCommands.Delete)] - public void RemoveItem () + public override void DeleteItem () { Combine cmb = CurrentNode.GetParentDataItem (typeof(Combine), false) as Combine;; Project prj = CurrentNode.DataItem as Project; Modified: trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectReferenceNodeBuilder.cs =================================================================== --- trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectReferenceNodeBuilder.cs 2008-02-20 11:16:59 UTC (rev 96235) +++ trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectReferenceNodeBuilder.cs 2008-02-20 11:32:22 UTC (rev 96236) @@ -94,8 +94,7 @@ } } - [CommandHandler (EditCommands.Delete)] - public void RemoveItem () + public override void DeleteItem () { ProjectReference pref = (ProjectReference) CurrentNode.DataItem; Project project = CurrentNode.GetParentDataItem (typeof(Project), false) as Project; Modified: trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/SystemFileNodeBuilder.cs =================================================================== --- trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/SystemFileNodeBuilder.cs 2008-02-20 11:16:59 UTC (rev 96235) +++ trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/SystemFileNodeBuilder.cs 2008-02-20 11:32:22 UTC (rev 96236) @@ -121,8 +121,7 @@ IdeApp.Workbench.OpenDocument (file.Path); } - [CommandHandler (EditCommands.Delete)] - public void RemoveItem () + public override void DeleteItem () { SystemFile file = CurrentNode.DataItem as SystemFile; Modified: trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/UnknownEntryNodeBuilder.cs =================================================================== --- trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/UnknownEntryNodeBuilder.cs 2008-02-20 11:16:59 UTC (rev 96235) +++ trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/UnknownEntryNodeBuilder.cs 2008-02-20 11:32:22 UTC (rev 96236) @@ -106,8 +106,7 @@ info.Enabled = entry.ParentCombine != null; } - [CommandHandler (EditCommands.Delete)] - public void RemoveItem () + public override void DeleteItem () { UnknownCombineEntry entry = (UnknownCombineEntry) CurrentNode.DataItem; Combine cmb = entry.ParentCombine; _______________________________________________ Mono-patches maillist - Mono-patches@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-patches