changeset 42:f04e973e5ea0 tip

* Drop back to old Tooltips to support GTK# before 2.12 * Make sure we're not 2.12 specific to allow building on the server (running 2.10)
author IBBoard <dev@ibboard.co.uk>
date Sun, 07 Oct 2012 19:58:40 +0100
parents 122a93b48f3d
children
files IBBoard.GtkSharp.csproj Translatable/ControlTranslator.cs
diffstat 2 files changed, 23 insertions(+), 10 deletions(-) [+]
line diff
     1.1 --- a/IBBoard.GtkSharp.csproj	Sun Nov 27 13:51:27 2011 +0000
     1.2 +++ b/IBBoard.GtkSharp.csproj	Sun Oct 07 19:58:40 2012 +0100
     1.3 @@ -12,22 +12,22 @@
     1.4      <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
     1.5    </PropertyGroup>
     1.6    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     1.7 -    <DebugSymbols>true</DebugSymbols>
     1.8 +    <DebugSymbols>True</DebugSymbols>
     1.9      <DebugType>full</DebugType>
    1.10 -    <Optimize>false</Optimize>
    1.11 +    <Optimize>False</Optimize>
    1.12      <OutputPath>bin\Debug</OutputPath>
    1.13      <DefineConstants>DEBUG</DefineConstants>
    1.14      <ErrorReport>prompt</ErrorReport>
    1.15      <WarningLevel>4</WarningLevel>
    1.16 -    <ConsolePause>false</ConsolePause>
    1.17 +    <ConsolePause>False</ConsolePause>
    1.18    </PropertyGroup>
    1.19    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    1.20      <DebugType>none</DebugType>
    1.21 -    <Optimize>false</Optimize>
    1.22 +    <Optimize>False</Optimize>
    1.23      <OutputPath>bin\Release</OutputPath>
    1.24      <ErrorReport>prompt</ErrorReport>
    1.25      <WarningLevel>4</WarningLevel>
    1.26 -    <ConsolePause>false</ConsolePause>
    1.27 +    <ConsolePause>False</ConsolePause>
    1.28    </PropertyGroup>
    1.29    <ItemGroup>
    1.30      <Compile Include="AssemblyInfo.cs" />
    1.31 @@ -53,12 +53,22 @@
    1.32    </ItemGroup>
    1.33    <ItemGroup>
    1.34      <Reference Include="System" />
    1.35 -    <Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
    1.36 -    <Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
    1.37 -    <Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
    1.38 +    <Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
    1.39 +      <SpecificVersion>False</SpecificVersion>
    1.40 +      <Private>False</Private>
    1.41 +    </Reference>
    1.42 +    <Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
    1.43 +      <SpecificVersion>False</SpecificVersion>
    1.44 +      <Private>False</Private>
    1.45 +    </Reference>
    1.46 +    <Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
    1.47 +      <SpecificVersion>False</SpecificVersion>
    1.48 +      <Private>False</Private>
    1.49 +    </Reference>
    1.50      <Reference Include="Mono.Posix" />
    1.51      <Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
    1.52        <Private>False</Private>
    1.53 +      <SpecificVersion>False</SpecificVersion>
    1.54      </Reference>
    1.55    </ItemGroup>
    1.56    <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
     2.1 --- a/Translatable/ControlTranslator.cs	Sun Nov 27 13:51:27 2011 +0000
     2.2 +++ b/Translatable/ControlTranslator.cs	Sun Oct 07 19:58:40 2012 +0100
     2.3 @@ -13,6 +13,9 @@
     2.4  	/// </summary>
     2.5  	public class ControlTranslator
     2.6  	{
     2.7 +		//Tooltips is now obselete, but we need it to support GTK# pre-2.12
     2.8 +		private static Tooltips tooltips = new Tooltips();
     2.9 +		
    2.10  		public static void TranslateWidget(Widget toTranslate)
    2.11  		{
    2.12  			TranslateWidget(toTranslate, true);
    2.13 @@ -42,11 +45,11 @@
    2.14  
    2.15  			if (translation == "")
    2.16  			{
    2.17 -				widget.TooltipText = translation;
    2.18 +				tooltips.SetTip(widget, translation, null);
    2.19  			}
    2.20  			else if (action != null)
    2.21  			{
    2.22 -				widget.TooltipText = action.Label;
    2.23 +				tooltips.SetTip(widget, action.Label, null);
    2.24  			}
    2.25  		}
    2.26