diff FrmMainWindow.cs @ 10:c687bbe901f8

Re #37 - Resolve deprecation warnings * Replace SetTooltip methods with TooltipText property * Remove parameter on command to remove deprecation warning Also: * Make sure we copy the COPYING files to the output
author IBBoard <dev@ibboard.co.uk>
date Thu, 09 Apr 2009 15:33:33 +0000
parents 20c5fd0bb79d
children 685532d43a96
line wrap: on
line diff
--- a/FrmMainWindow.cs	Sat Mar 07 15:54:15 2009 +0000
+++ b/FrmMainWindow.cs	Thu Apr 09 15:33:33 2009 +0000
@@ -80,12 +80,12 @@
 			//Replace the undo/redo buttons with menu versions, which Monodevelop's GUI editor doesn't currently support
 			redoMenuButton = new MenuToolButton("gtk-redo");
 			redoMenuButton.Label = "Redo";
-			redoMenuButton.SetTooltip(new Tooltips(), "Redo", "");
+			redoMenuButton.TooltipText = "Redo";
 			redoMenuButton.Clicked+= redoTBButtonActivated;
 			toolbar.Insert(redoMenuButton, CATEGORY_BUTTON_SEPARATOR_INDEX);
 			undoMenuButton = new MenuToolButton("gtk-undo");
 			undoMenuButton.Label = "Undo";
-			undoMenuButton.SetTooltip(new Tooltips(), "Undo", "");
+			undoMenuButton.TooltipText = "Undo";
 			undoMenuButton.Clicked+= undoTBButtonActivated;
 			toolbar.Insert(undoMenuButton, CATEGORY_BUTTON_SEPARATOR_INDEX);
 			toolbar.Remove(toolbar.Children[CATEGORY_BUTTON_SEPARATOR_INDEX-1]);
@@ -410,7 +410,7 @@
 					
 					if (response==ResponseType.Ok)
 					{
-						CreateAndAddUnitCommand cmd = new CreateAndAddUnitCommand(newUnit.SelectedUnit, cat, WarFoundryCore.CurrentArmy);
+						CreateAndAddUnitCommand cmd = new CreateAndAddUnitCommand(newUnit.SelectedUnit, WarFoundryCore.CurrentArmy);
 						commandStack.Execute(cmd);
 					}
 					
@@ -575,7 +575,7 @@
 				{
 					ToolButton button = new ToolButton("gtk-add");
 					button.Label = cat.Name;
-					button.SetTooltip(new Tooltips(), "Add unit from "+cat.Name, "");
+					button.TooltipText = "Add unit from "+cat.Name;
 					//TODO: See if we can associate data in some way, the same as we can with SWF. For now we just use the map.
 					categoryMap.Add(button, cat);
 					button.Clicked+= new System.EventHandler(OnAddUnitActivated);