changeset 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 5855999a5556
children 4e5e382fbd2e
files FrmMainWindow.cs IBBoard.WarFoundry.GUI.GTK.csproj gtk-gui/IBBoard.WarFoundry.GTK.FrmMainWindow.cs gtk-gui/gui.stetic gtk-gui/objects.xml
diffstat 5 files changed, 23 insertions(+), 16 deletions(-) [+]
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);
--- a/IBBoard.WarFoundry.GUI.GTK.csproj	Sat Mar 07 15:54:15 2009 +0000
+++ b/IBBoard.WarFoundry.GUI.GTK.csproj	Thu Apr 09 15:33:33 2009 +0000
@@ -9,8 +9,8 @@
     <OutputType>WinExe</OutputType>
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <RootNamespace>IBBoard.WarFoundry.GUI.GTK</RootNamespace>
-    <StartupObject>
-    </StartupObject>
+    <StartupObject>IBBoard.WarFoundry.GTK.FrmMainWindow</StartupObject>
+    <ApplicationIcon>App.ico</ApplicationIcon>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <DebugSymbols>true</DebugSymbols>
@@ -20,12 +20,7 @@
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
-    <EnvironmentVariables>
-      <EnvironmentVariables />
-    </EnvironmentVariables>
     <AssemblyName>WarFoundryGTK</AssemblyName>
-    <StartupObject>IBBoard.WarFoundry.GTK.FrmMainWindow</StartupObject>
-    <ApplicationIcon>App.ico</ApplicationIcon>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <DebugType>pdbonly</DebugType>
@@ -35,8 +30,6 @@
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <AssemblyName>IBBoard.WarFoundry.GUI.GTK</AssemblyName>
-    <StartupObject>IBBoard.WarFoundry.GTK.FrmMainWindow</StartupObject>
-    <ApplicationIcon>App.ico</ApplicationIcon>
   </PropertyGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
@@ -66,9 +59,15 @@
     <Content Include="libs\log4net.xml" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="COPYING.GPL" />
-    <None Include="COPYING.LGPL" />
-    <None Include="translations\en.translation" />
+    <None Include="COPYING.GPL">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="COPYING.LGPL">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="translations\en.translation">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
     <None Include="WarFoundryGTK.exe.log4net" />
     <None Include="gtk-gui\gui.stetic" />
     <None Include="gtk-gui\objects.xml" />
--- a/gtk-gui/IBBoard.WarFoundry.GTK.FrmMainWindow.cs	Sat Mar 07 15:54:15 2009 +0000
+++ b/gtk-gui/IBBoard.WarFoundry.GTK.FrmMainWindow.cs	Thu Apr 09 15:33:33 2009 +0000
@@ -174,6 +174,7 @@
             this.toolbar.Name = "toolbar";
             this.toolbar.ShowArrow = false;
             this.toolbar.ToolbarStyle = ((Gtk.ToolbarStyle)(0));
+            this.toolbar.IconSize = ((Gtk.IconSize)(3));
             this.vbox1.Add(this.toolbar);
             Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.vbox1[this.toolbar]));
             w3.Position = 1;
--- a/gtk-gui/gui.stetic	Sat Mar 07 15:54:15 2009 +0000
+++ b/gtk-gui/gui.stetic	Thu Apr 09 15:33:33 2009 +0000
@@ -191,6 +191,7 @@
             <property name="HeightRequest">36</property>
             <property name="ShowArrow">False</property>
             <property name="ButtonStyle">Icons</property>
+            <property name="IconSize">LargeToolbar</property>
             <node name="toolbar" type="Toolbar">
               <node type="Toolitem" action="newArmyButton" />
               <node type="Toolitem" action="openArmyButton" />
@@ -277,6 +278,7 @@
         <child>
           <widget class="Gtk.Table" id="table1">
             <property name="MemberName" />
+            <property name="NRows">3</property>
             <property name="NColumns">2</property>
             <property name="RowSpacing">6</property>
             <property name="ColumnSpacing">6</property>
@@ -816,6 +818,7 @@
           <widget class="Gtk.Table" id="table1">
             <property name="MemberName" />
             <property name="NRows">2</property>
+            <property name="NColumns">3</property>
             <property name="RowSpacing">6</property>
             <property name="ColumnSpacing">6</property>
             <child>
--- a/gtk-gui/objects.xml	Sat Mar 07 15:54:15 2009 +0000
+++ b/gtk-gui/objects.xml	Thu Apr 09 15:33:33 2009 +0000
@@ -1,2 +1,6 @@
 <objects attr-sync="on">
+  <object type="IBBoard.WarFoundry.GTK.Widgets.UnitDisplayWidget" palette-category="WarFoundry GTK# GUI" allow-children="false" base-type="Gtk.Bin">
+    <itemgroups />
+    <signals />
+  </object>
 </objects>
\ No newline at end of file