Imported Upstream version 5.2.0.175

Former-commit-id: bb0468d0f257ff100aa895eb5fe583fb5dfbf900
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-06-07 13:16:24 +00:00
parent 4bdbaf4a88
commit 966bba02bb
8776 changed files with 346420 additions and 149650 deletions

View File

@@ -89,6 +89,7 @@ TEST_DISTFILES = \
Test/System.Resources/compat_1_1.resx \
Test/System.Resources/compat_2_0.resx \
Test/System.Windows.Forms/bitmaps/a.png \
Test/simple/Program.cs \
Test/DummyAssembly/AnotherSerializable.cs \
Test/DummyAssembly/Convertable.cs \
Test/DummyAssembly/Properties/AssemblyInfo.cs \
@@ -127,3 +128,9 @@ $(PREBUILT): %.prebuilt: %
cp $* $@
dist-default: $(PREBUILT)
simple-test.exe: Test/simple/Program.cs $(topdir)/class/lib/$(PROFILE)/System.Windows.Forms.dll
$(CSCOMPILE) -out:$@ Test/simple/Program.cs -r:$(topdir)/class/lib/$(PROFILE)/System.Windows.Forms.dll
test-simple: simple-test.exe
$(TEST_RUNTIME) simple-test.exe

View File

@@ -272,12 +272,7 @@ namespace System.Windows.Forms
{
public int Compare (DataGridViewColumn o1, DataGridViewColumn o2)
{
if (o1.DisplayIndex == o2.DisplayIndex)
// Here we avoid the equal value swapping that both Array.Sort and ArrayList.Sort
// do occasionally and preserve the user column insertation order.
return 1;
else
return o1.DisplayIndex - o2.DisplayIndex;
return o1.DisplayIndex.CompareTo (o2.DisplayIndex);
}
}
}

View File

@@ -203,7 +203,7 @@ namespace System.Windows.Forms
set;
}
[Bindable(BindableSupport.Yes)]
[Bindable(true)]
[Browsable(false)]
[DefaultValue(null)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]

View File

@@ -397,13 +397,13 @@ namespace System.Windows.Forms
internal class GnomeUtil
{
const string libgdk = "libgdk-x11-2.0.so.0";
const string libgdk_pixbuf = "libgdk_pixbuf-2.0.so.0";
const string libgtk = "libgtk-x11-2.0.so.0";
const string libglib = "libglib-2.0.so.0";
const string libgobject = "libgobject-2.0.so.0";
const string libgnomeui = "libgnomeui-2.so.0";
const string librsvg = "librsvg-2.so.2";
const string libgdk = "libgdk-x11-2.0";
const string libgdk_pixbuf = "libgdk_pixbuf-2.0";
const string libgtk = "libgtk-x11-2.0";
const string libglib = "libglib-2.0";
const string libgobject = "libgobject-2.0";
const string libgnomeui = "libgnomeui-2";
const string librsvg = "librsvg-2";
[DllImport(librsvg)]
static extern IntPtr rsvg_pixbuf_from_file_at_size (string file_name, int width, int height, out IntPtr error);

View File

@@ -267,8 +267,8 @@ namespace System.Windows.Forms {
#endregion // Methods
#region DllImports
const string libgdk = "libgdk-x11-2.0.so.0";
const string libgtk = "libgtk-x11-2.0.so.0";
const string libgdk = "libgdk-x11-2.0";
const string libgtk = "libgtk-x11-2.0";
[DllImport(libgtk)]
static extern bool gtk_init_check (IntPtr argc, IntPtr argv);

View File

@@ -1 +1 @@
90fe714b33d6e36c80b597f874c38c872448622d
8f9f1ed0e75a17d71ec08c03c058744f3bc0830c

View File

@@ -105,22 +105,30 @@ namespace MonoTests.System.Windows.Forms
f.Show ();
dgv.Columns.Add ("A1", "A1");
Assert.AreEqual (0, dgv.Columns[0].Index, "A1");
Assert.AreEqual (0, dgv.Columns[0].DisplayIndex, "B1");
Assert.AreEqual (0, dgv.Columns[0].Index, "#1");
Assert.AreEqual (0, dgv.Columns[0].DisplayIndex, "#2");
Assert.AreEqual ("A1", dgv.Columns[0].Name, "#3");
dgv.Columns.Add ("A2", "A2");
Assert.AreEqual (0, dgv.Columns[0].Index, "A2");
Assert.AreEqual (0, dgv.Columns[0].DisplayIndex, "B2");
Assert.AreEqual (1, dgv.Columns[1].Index, "A3");
Assert.AreEqual (1, dgv.Columns[1].DisplayIndex, "B3");
Assert.AreEqual (0, dgv.Columns[0].Index, "#10");
Assert.AreEqual (0, dgv.Columns[0].DisplayIndex, "#11");
Assert.AreEqual ("A1", dgv.Columns[0].Name, "#12");
Assert.AreEqual (1, dgv.Columns[1].Index, "#13");
Assert.AreEqual (1, dgv.Columns[1].DisplayIndex, "#14");
Assert.AreEqual ("A2", dgv.Columns[1].Name, "#15");
dgv.Columns.Insert (0, new DataGridViewTextBoxColumn ());
Assert.AreEqual (0, dgv.Columns[0].Index, "A4");
Assert.AreEqual (0, dgv.Columns[0].DisplayIndex, "B4");
Assert.AreEqual (1, dgv.Columns[1].Index, "A5");
Assert.AreEqual (1, dgv.Columns[1].DisplayIndex, "B5");
Assert.AreEqual (2, dgv.Columns[2].Index, "A6");
Assert.AreEqual (2, dgv.Columns[2].DisplayIndex, "B6");
Assert.AreEqual (0, dgv.Columns[0].Index, "#20");
Assert.AreEqual (0, dgv.Columns[0].DisplayIndex, "#21");
Assert.AreEqual ("", dgv.Columns[0].Name, "#22");
Assert.AreEqual (1, dgv.Columns[1].Index, "#23");
Assert.AreEqual (1, dgv.Columns[1].DisplayIndex, "#24");
Assert.AreEqual ("A1", dgv.Columns[1].Name, "#25");
Assert.AreEqual (2, dgv.Columns[2].Index, "#26");
Assert.AreEqual (2, dgv.Columns[2].DisplayIndex, "#27");
Assert.AreEqual ("A2", dgv.Columns[2].Name, "#28");
dgv.Columns.RemoveAt (1);
Assert.AreEqual (0, dgv.Columns[0].Index, "A7");

View File

@@ -0,0 +1,39 @@
//
// Program.cs
//
// Author:
// Alexander Köplinger (alexander.koeplinger@xamarin.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace SimpleTest {
public static class Program {
public static int Main ()
{
// use the simplest WinForms code that invokes the XplatUI
// and causes the X connection to be established, if this fails
// then something is seriously wrong
System.Windows.Forms.Application.Idle += null;
return 0;
}
}
}