[MonoDevelop] Patch for bug 56272 - Rename Combine

Nick Drochak ndrochak@gol.com
Wed, 07 Apr 2004 15:56:31 +0900


--=-G+3VebjoefUT6Aux4JWK
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Here's a patch that fixes bug 56272 - Renaming the combine.

Is this ok?  It's my first time hacking on anything GTK-ish.

Nick D.

--=-G+3VebjoefUT6Aux4JWK
Content-Disposition: attachment; filename=56272.patch
Content-Type: text/x-patch; name=56272.patch; charset=
Content-Transfer-Encoding: 7bit

Index: src/Main/Base/Gui/Pads/ProjectBrowser/ProjectBrowserView.cs
===================================================================
--- src/Main/Base/Gui/Pads/ProjectBrowser/ProjectBrowserView.cs	(revision 1403)
+++ src/Main/Base/Gui/Pads/ProjectBrowser/ProjectBrowserView.cs	(working copy)
@@ -185,6 +185,7 @@
 		
 		protected override void OnEdit (TreeNode node, string new_text)
 		{
+Console.WriteLine ("OnEdit with {0}", new_text);
 			// we set the label ourself
 			((AbstractBrowserNode) node).AfterLabelEdit (new_text);
 			
@@ -260,6 +261,9 @@
 		public void StartLabelEdit()
 		{
 			AbstractBrowserNode selectedNode = (AbstractBrowserNode)SelectedNode;
+			CombineBrowserNode cbn = SelectedNode as CombineBrowserNode;
+			if (null != cbn)
+				cbn.BeforeLabelEdit ();
 			if (selectedNode != null && selectedNode.CanLabelEdited) {
 				//LabelEdit = true;
 				selectedNode.BeginEdit ();
Index: src/Main/Base/Gui/Pads/ProjectBrowser/BrowserNode/CombineBrowserNode.cs
===================================================================
--- src/Main/Base/Gui/Pads/ProjectBrowser/BrowserNode/CombineBrowserNode.cs	(revision 1403)
+++ src/Main/Base/Gui/Pads/ProjectBrowser/BrowserNode/CombineBrowserNode.cs	(working copy)
@@ -55,9 +55,11 @@
 		
 		public override void AfterLabelEdit(string newName)
 		{
+Console.WriteLine ("AfterLabelEdit with {0}", newName);
 			if (newName != null && newName.Trim().Length > 0) {
 				combine.Name = newName;
 			}
+			UpdateCombineName (null, EventArgs.Empty);
 		}
 		
 		public override void UpdateNaming()
@@ -68,6 +70,7 @@
 		
 		public void UpdateCombineName(object sender, EventArgs e)
 		{
+Console.WriteLine ("Text is {0} and Name is {1}", Text, combine.Name);
 			StringParserService stringParserService = (StringParserService)ServiceManager.Services.GetService(typeof(StringParserService));
 			switch (combine.Entries.Count) {
 				case 0:

--=-G+3VebjoefUT6Aux4JWK--