Author: gnorton
Date: 2008-01-23 10:36:03 -0500 (Wed, 23 Jan 2008)
New Revision: 93662
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUI.cs
Log:
In .:
2008-01-22 Geoff Norton <[EMAIL PROTECTED]>
* TextBoxBase.cs: Split up the sizing of controls and placing of
controls. Fixes a bug where scrollbars in Reflector could be sized
wrong and have non-working thumbers.
2008-01-23 Geoff Norton <[EMAIL PROTECTED]>
* XplatUI.cs: Refactor environment variables to default support to the
Carbon driver on the Mac.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2008-01-23 15:21:15 UTC (rev 93661)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2008-01-23 15:36:03 UTC (rev 93662)
@@ -1,3 +1,14 @@
+2008-01-22 Geoff Norton <[EMAIL PROTECTED]>
+
+ * TextBoxBase.cs: Split up the sizing of controls and placing of
+ controls. Fixes a bug where scrollbars in Reflector could be sized
+ wrong and have non-working thumbers.
+
+2008-01-23 Geoff Norton <[EMAIL PROTECTED]>
+
+ * XplatUI.cs: Refactor environment variables to default support to the
+ Carbon driver on the Mac.
+
2008-01-23 Everaldo Canuto <[EMAIL PROTECTED]>
* Label.cs: Uses new LabelPainter for drawing operations.
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
2008-01-23 15:21:15 UTC (rev 93661)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
2008-01-23 15:36:03 UTC (rev 93662)
@@ -1865,7 +1865,7 @@
}
}
- private void PositionControls ()
+ private void SizeControls ()
{
if (hscroll.Visible) {
//vscroll.Maximum += hscroll.Height;
@@ -1884,7 +1884,10 @@
document.ViewPortWidth = canvas_width;
document.ViewPortHeight = canvas_height;
+ }
+ private void PositionControls ()
+ {
if (canvas_height < 1 || canvas_width < 1)
return;
@@ -1980,6 +1983,7 @@
internal void CalculateScrollBars ()
{
// FIXME - need separate calculations for center and
right alignment
+ SizeControls ();
if (document.Width >= document.ViewPortWidth) {
hscroll.SetValues (0, Math.Max (1,
document.Width), -1,
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUI.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUI.cs
2008-01-23 15:21:15 UTC (rev 93661)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUI.cs
2008-01-23 15:36:03 UTC (rev 93662)
@@ -84,12 +84,25 @@
default_class_name = "SWFClass" +
System.Threading.Thread.GetDomainID().ToString();
if (RunningOnUnix) {
- if (Environment.GetEnvironmentVariable
("MONO_MWF_USE_CARBON_BACKEND") != null)
- driver=XplatUICarbon.GetInstance ();
- else if (Environment.GetEnvironmentVariable
("not_supported_MONO_MWF_USE_NEW_X11_BACKEND") != null)
+ if (Environment.GetEnvironmentVariable
("not_supported_MONO_MWF_USE_NEW_X11_BACKEND") != null) {
driver=XplatUIX11_new.GetInstance ();
- else
- driver=XplatUIX11.GetInstance ();
+ } else if (Environment.GetEnvironmentVariable
("MONO_MWF_MAC_FORCE_X11") != null) {
+ driver = XplatUIX11.GetInstance ();
+ } else {
+ IntPtr buf = Marshal.AllocHGlobal
(8192);
+ // This is a hacktastic way of getting
sysname from uname ()
+ if (uname (buf) != 0) {
+ // WTF: We cannot run uname
+ driver=XplatUIX11.GetInstance
();
+ } else {
+ string os =
Marshal.PtrToStringAnsi (buf);
+ if (os == "Darwin")
+
driver=XplatUICarbon.GetInstance ();
+ else
+
driver=XplatUIX11.GetInstance ();
+ }
+ Marshal.FreeHGlobal (buf);
+ }
} else {
driver=XplatUIWin32.GetInstance();
}
@@ -1218,5 +1231,7 @@
public delegate bool ObjectToClipboard(ref int type, object
obj, out byte[] data);
#endregion // Delegates
+ [DllImport ("libc")]
+ static extern int uname (IntPtr buf);
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches