add new mono version
git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/linamh@1476 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
152
dev-lang/mono/files/mono-2.0-fix-headless.patch
Normal file
152
dev-lang/mono/files/mono-2.0-fix-headless.patch
Normal file
@@ -0,0 +1,152 @@
|
||||
diff -NrU5 mono-2.0.1.orig/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TableLayoutPanel.cs mono-2.0.1/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TableLayoutPanel.cs
|
||||
--- mono-2.0.1.orig/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TableLayoutPanel.cs 2008-12-19 07:00:41.000000000 +0100
|
||||
+++ mono-2.0.1/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TableLayoutPanel.cs 2008-12-19 07:00:55.000000000 +0100
|
||||
@@ -131,10 +131,11 @@
|
||||
set {
|
||||
if (value.isSerialized) {
|
||||
// Serialized version doesn't calculate these.
|
||||
value.ColumnCount = value.ColumnStyles.Count;
|
||||
value.RowCount = value.RowStyles.Count;
|
||||
+ value.panel = this;
|
||||
|
||||
this.settings = value;
|
||||
value.isSerialized = false;
|
||||
} else
|
||||
throw new NotSupportedException ("LayoutSettings value cannot be set directly.");
|
||||
diff -NrU5 mono-2.0.1.orig/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TableLayoutSettings.cs mono-2.0.1/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TableLayoutSettings.cs
|
||||
--- mono-2.0.1.orig/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TableLayoutSettings.cs 2008-12-19 07:00:41.000000000 +0100
|
||||
+++ mono-2.0.1/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TableLayoutSettings.cs 2008-12-19 07:00:55.000000000 +0100
|
||||
@@ -46,11 +46,11 @@
|
||||
private int row_count;
|
||||
private Dictionary<Object, int> columns;
|
||||
private Dictionary<Object, int> column_spans;
|
||||
private Dictionary<Object, int> rows;
|
||||
private Dictionary<Object, int> row_spans;
|
||||
- private TableLayoutPanel panel;
|
||||
+ internal TableLayoutPanel panel;
|
||||
internal bool isSerialized;
|
||||
|
||||
#region Internal Constructor
|
||||
internal TableLayoutSettings (TableLayoutPanel panel)
|
||||
{
|
||||
@@ -132,11 +132,13 @@
|
||||
if (value < 0)
|
||||
throw new ArgumentOutOfRangeException ();
|
||||
|
||||
if (row_count != value) {
|
||||
row_count = value;
|
||||
- panel.PerformLayout (panel, "RowCount");
|
||||
+
|
||||
+ if (panel != null)
|
||||
+ panel.PerformLayout ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[DesignerSerializationVisibility (DesignerSerializationVisibility.Content)]
|
||||
@@ -223,55 +225,65 @@
|
||||
if (control == null)
|
||||
throw new ArgumentNullException ();
|
||||
|
||||
columns[control] = cellPosition.Column;
|
||||
rows[control] = cellPosition.Row;
|
||||
- panel.PerformLayout ();
|
||||
+
|
||||
+ if (panel != null)
|
||||
+ panel.PerformLayout ();
|
||||
}
|
||||
|
||||
public void SetColumn (Object control, int column)
|
||||
{
|
||||
if (control == null)
|
||||
throw new ArgumentNullException ();
|
||||
if (column < -1)
|
||||
throw new ArgumentException ();
|
||||
|
||||
columns[control] = column;
|
||||
- panel.PerformLayout ();
|
||||
+
|
||||
+ if (panel != null)
|
||||
+ panel.PerformLayout ();
|
||||
}
|
||||
|
||||
public void SetColumnSpan (Object control, int value)
|
||||
{
|
||||
if (control == null)
|
||||
throw new ArgumentNullException ();
|
||||
if (value < -1)
|
||||
throw new ArgumentException ();
|
||||
|
||||
column_spans[control] = value;
|
||||
- panel.PerformLayout ();
|
||||
+
|
||||
+ if (panel != null)
|
||||
+ panel.PerformLayout ();
|
||||
}
|
||||
|
||||
public void SetRow (Object control, int row)
|
||||
{
|
||||
if (control == null)
|
||||
throw new ArgumentNullException ();
|
||||
if (row < -1)
|
||||
throw new ArgumentException ();
|
||||
|
||||
rows[control] = row;
|
||||
- panel.PerformLayout ();
|
||||
+
|
||||
+ if (panel != null)
|
||||
+ panel.PerformLayout ();
|
||||
}
|
||||
|
||||
public void SetRowSpan (Object control, int value)
|
||||
{
|
||||
if (control == null)
|
||||
throw new ArgumentNullException ();
|
||||
if (value < -1)
|
||||
throw new ArgumentException ();
|
||||
|
||||
row_spans[control] = value;
|
||||
- panel.PerformLayout ();
|
||||
+
|
||||
+ if (panel != null)
|
||||
+ panel.PerformLayout ();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Internal Methods
|
||||
internal List<ControlInfo> GetControls ()
|
||||
diff -NrU5 mono-2.0.1.orig/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TableLayoutStyleCollection.cs mono-2.0.1/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TableLayoutStyleCollection.cs
|
||||
--- mono-2.0.1.orig/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TableLayoutStyleCollection.cs 2008-12-19 07:00:41.000000000 +0100
|
||||
+++ mono-2.0.1/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TableLayoutStyleCollection.cs 2008-12-19 07:00:55.000000000 +0100
|
||||
@@ -76,11 +76,14 @@
|
||||
if (layoutStyle.Owner != null)
|
||||
throw new ArgumentException ("Style is already owned");
|
||||
|
||||
layoutStyle.Owner = table;
|
||||
int result = al.Add (layoutStyle);
|
||||
- table.PerformLayout ();
|
||||
+
|
||||
+ if (table != null)
|
||||
+ table.PerformLayout ();
|
||||
+
|
||||
return result;
|
||||
}
|
||||
|
||||
bool IList.Contains (object style)
|
||||
{
|
||||
diff -NrU5 mono-2.0.1.orig/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Layout/TableLayoutSettingsTypeConverter.cs mono-2.0.1/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Layout/TableLayoutSettingsTypeConverter.cs
|
||||
--- mono-2.0.1.orig/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Layout/TableLayoutSettingsTypeConverter.cs 2008-12-19 07:00:41.000000000 +0100
|
||||
+++ mono-2.0.1/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Layout/TableLayoutSettingsTypeConverter.cs 2008-12-19 07:02:23.000000000 +0100
|
||||
@@ -117,11 +117,11 @@
|
||||
if (!(value is string))
|
||||
return base.ConvertFrom(context, culture, value);
|
||||
|
||||
XmlDocument xmldoc = new XmlDocument();
|
||||
xmldoc.LoadXml (value as string);
|
||||
- TableLayoutSettings settings = new TableLayoutSettings(new TableLayoutPanel ());
|
||||
+ TableLayoutSettings settings = new TableLayoutSettings(null);
|
||||
int count = ParseControl (xmldoc, settings);
|
||||
ParseColumnStyle (xmldoc, settings);
|
||||
ParseRowStyle (xmldoc, settings);
|
||||
settings.RowCount = count;
|
||||
|
||||
Reference in New Issue
Block a user