Author: pbartok
Date: 2006-04-25 17:47:24 -0400 (Tue, 25 Apr 2006)
New Revision: 59877
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/AxHost.cs
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ComboBox.cs
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/CommonDialog.cs
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ImageListStreamer.cs
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/RichTextBox.cs
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Theme.cs
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIWin32.cs
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
Log:
2006-04-25 Peter Dennis Bartok <[EMAIL PROTECTED]>
* TextControl.cs, ComboBox.cs, CommonDialog.cs, Theme.cs,
XplatUIWin32.cs, RichTextBox.cs, ImageListStreamer.cs,
TextBoxBase.cs: Unused var fixes
* AxHost.cs: Small 2.0 fix
* XplatUIX11.cs: Switched to IntPtr from int for XA_CARDINAL atoms
as it seems that is what at least Metacity expects. This will make
icons show up on 64bit platforms. We still have some 64bit size
issues, though, since the startup app window size still won't match.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/AxHost.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/AxHost.cs
2006-04-25 21:39:33 UTC (rev 59876)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/AxHost.cs
2006-04-25 21:47:24 UTC (rev 59877)
@@ -747,6 +747,7 @@
[EditorBrowsable(EditorBrowsableState.Never)]
public event EventHandler StyleChanged;
+#if !NET_2_0
[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
public event EventHandler TabIndexChanged;
@@ -754,6 +755,7 @@
[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
public event EventHandler TabStopChanged;
+#endif
[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-04-25 21:39:33 UTC (rev 59876)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-04-25 21:47:24 UTC (rev 59877)
@@ -1,3 +1,14 @@
+2006-04-25 Peter Dennis Bartok <[EMAIL PROTECTED]>
+
+ * TextControl.cs, ComboBox.cs, CommonDialog.cs, Theme.cs,
+ XplatUIWin32.cs, RichTextBox.cs, ImageListStreamer.cs,
+ TextBoxBase.cs: Unused var fixes
+ * AxHost.cs: Small 2.0 fix
+ * XplatUIX11.cs: Switched to IntPtr from int for XA_CARDINAL atoms
+ as it seems that is what at least Metacity expects. This will make
+ icons show up on 64bit platforms. We still have some 64bit size
+ issues, though, since the startup app window size still won't match.
+
2006-04-25 Mike Kestner <[EMAIL PROTECTED]>
* *.cs: cleanup newly reported exception var unused warnings.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ComboBox.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ComboBox.cs
2006-04-25 21:39:33 UTC (rev 59876)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ComboBox.cs
2006-04-25 21:47:24 UTC (rev 59877)
@@ -1939,7 +1939,6 @@
return false;
SetHighLightedItem (owner.SelectedItem);
- int index = GetHighLightedIndex ();
CalcListBoxArea ();
Show ();
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/CommonDialog.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/CommonDialog.cs
2006-04-25 21:39:33 UTC (rev 59876)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/CommonDialog.cs
2006-04-25 21:47:24 UTC (rev 59877)
@@ -105,13 +105,11 @@
}
public DialogResult ShowDialog(IWin32Window ownerWin32) {
- DialogResult result;
-
// Prep the dialog
RunDialog(form.Handle);
// Run
- result = form.ShowDialog(ownerWin32);
+ form.ShowDialog(ownerWin32);
return form.DialogResult;
}
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ImageListStreamer.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ImageListStreamer.cs
2006-04-25 21:39:33 UTC (rev 59876)
+++
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ImageListStreamer.cs
2006-04-25 21:47:24 UTC (rev 59877)
@@ -72,7 +72,7 @@
BinaryReader reader = new BinaryReader (decoded);
ushort nimages = reader.ReadUInt16 ();
- ushort max_image = reader.ReadUInt16 (); //
cMaxImage
+ //ushort max_image = reader.ReadUInt16 (); //
cMaxImage
ushort grow = reader.ReadUInt16 (); // cGrow
ushort cx = reader.ReadUInt16 ();
ushort cy = reader.ReadUInt16 ();
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/RichTextBox.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/RichTextBox.cs
2006-04-25 21:39:33 UTC (rev 59876)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/RichTextBox.cs
2006-04-25 21:47:24 UTC (rev 59877)
@@ -262,8 +262,6 @@
get {
Line start_line;
Line end_line;
- int current;
- int total;
start_line = document.GetLine(1);
end_line = document.GetLine(document.Lines);
@@ -849,8 +847,6 @@
}
public void LoadFile(System.IO.Stream data,
RichTextBoxStreamType fileType) {
- RTF.RTF rtf; // Not 'using SWF.RTF' to avoid
ambiguities with font and color
-
document.Empty();
// FIXME - ignoring unicode
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
2006-04-25 21:39:33 UTC (rev 59876)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
2006-04-25 21:47:24 UTC (rev 59877)
@@ -1405,7 +1405,6 @@
private void TextBoxBase_MouseWheel(object sender,
MouseEventArgs e) {
Line line;
int line_no;
- int target;
if (!vscroll.Enabled) {
return;
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs
2006-04-25 21:39:33 UTC (rev 59876)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs
2006-04-25 21:47:24 UTC (rev 59877)
@@ -3108,12 +3108,7 @@
internal void ReplaceSelection(string s) {
int i;
- int base_line;
- string[] ins;
- int insert_lines;
- base_line = selection_start.line.line_no;
-
// First, delete any selected text
if ((selection_start.pos != selection_end.pos) ||
(selection_start.line != selection_end.line)) {
if (!multiline || (selection_start.line ==
selection_end.line)) {
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Theme.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Theme.cs
2006-04-25 21:39:33 UTC (rev 59876)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Theme.cs
2006-04-25 21:47:24 UTC (rev 59877)
@@ -622,7 +622,6 @@
throw new ArgumentException("Invalid
Icon type requested", "index");
}
}
- return null;
}
public virtual Image Images(string mimetype, string extension,
int size) {
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIWin32.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIWin32.cs
2006-04-25 21:39:33 UTC (rev 59876)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIWin32.cs
2006-04-25 21:47:24 UTC (rev 59877)
@@ -722,7 +722,7 @@
BITMAPINFOHEADER bmi;
int ncolors;
int imagesize;
- int palettesize;
+ //int palettesize;
Bitmap bmp;
BitmapData bits;
ColorPalette pal;
@@ -738,7 +738,7 @@
ncolors = (int)(1 << bmi.biBitCount);
}
}
- palettesize = ncolors * 4;
+ //palettesize = ncolors * 4;
imagesize = (int)bmi.biSizeImage;
if (imagesize == 0) {
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
2006-04-25 21:39:33 UTC (rev 59876)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
2006-04-25 21:47:24 UTC (rev 59877)
@@ -782,22 +782,23 @@
private void SetIcon(Hwnd hwnd, Icon icon) {
Bitmap bitmap;
int size;
- uint[] data;
+ IntPtr[] data;
int index;
bitmap = icon.ToBitmap();
index = 0;
size = bitmap.Width * bitmap.Height + 2;
- data = new uint[size];
+ data = new IntPtr[size];
- data[index++] = (uint)bitmap.Width;
- data[index++] = (uint)bitmap.Height;
+ data[index++] = (IntPtr)bitmap.Width;
+ data[index++] = (IntPtr)bitmap.Height;
for (int y = 0; y < bitmap.Height; y++) {
for (int x = 0; x < bitmap.Width; x++) {
- data[index++] =
(uint)bitmap.GetPixel(x, y).ToArgb();
+ data[index++] =
(IntPtr)bitmap.GetPixel(x, y).ToArgb();
}
}
+
XChangeProperty(DisplayHandle, hwnd.whole_window,
NetAtoms[(int)NA._NET_WM_ICON], (IntPtr)Atom.XA_CARDINAL, 32,
PropertyMode.Replace, data, size);
}
@@ -960,10 +961,10 @@
XGetWindowProperty(DisplayHandle, window,
NetAtoms[(int)NA._NET_FRAME_EXTENTS], IntPtr.Zero, new IntPtr (16), false,
(IntPtr)Atom.XA_CARDINAL, out actual_atom, out actual_format, out nitems, out
bytes_after, ref prop);
if (((long)nitems == 4) && (prop != IntPtr.Zero)) {
- left = Marshal.ReadInt32(prop, 0);
- //right = Marshal.ReadInt32(prop, 4);
- top = Marshal.ReadInt32(prop, 8);
- //bottom = Marshal.ReadInt32(prop, 12);
+ left = Marshal.ReadIntPtr(prop, 0).ToInt32();
+ //right = Marshal.ReadIntPtr(prop,
IntPtr.Size).ToInt32();
+ top = Marshal.ReadIntPtr(prop, IntPtr.Size *
2).ToInt32();
+ //bottom = Marshal.ReadIntPtr(prop, IntPtr.Size
* 3).ToInt32();
} else {
left = 0;
top = 0;
@@ -1488,9 +1489,6 @@
rect = new Rectangle(ncp.rgrc1.left, ncp.rgrc1.top,
ncp.rgrc1.right - ncp.rgrc1.left, ncp.rgrc1.bottom - ncp.rgrc1.top);
- Control c;
- c = Control.FromHandle(hwnd.Handle);
-
if (hwnd.visible) {
XMoveResizeWindow(DisplayHandle,
hwnd.client_window, rect.X, rect.Y, rect.Width, rect.Height);
}
@@ -1797,8 +1795,8 @@
XGetWindowProperty(DisplayHandle, RootWindow,
NetAtoms[(int)NA._NET_DESKTOP_GEOMETRY], IntPtr.Zero, new IntPtr (256), false,
(IntPtr)Atom.XA_CARDINAL, out actual_atom, out actual_format, out nitems, out
bytes_after, ref prop);
if (((long)nitems == 2) && (prop !=
IntPtr.Zero) && IntPtr.Size == 4) {
- width = Marshal.ReadInt32(prop, 0);
- height = Marshal.ReadInt32(prop, 4);
+ width = Marshal.ReadIntPtr(prop,
0).ToInt32();
+ height = Marshal.ReadIntPtr(prop,
IntPtr.Size).ToInt32();
XFree(prop);
return new Rectangle(0, 0, width,
height);
@@ -3146,9 +3144,9 @@
msg.message =
Msg.WM_WINDOWPOSCHANGED;
if (hwnd.opacity !=
0xffffffff) {
- uint opacity;
+ IntPtr opacity;
- opacity =
hwnd.opacity;
+ opacity =
(IntPtr)hwnd.opacity;
XChangeProperty(DisplayHandle, XGetParent(hwnd.whole_window),
NetAtoms[(int)NA._NET_WM_WINDOW_OPACITY], (IntPtr)Atom.XA_CARDINAL, 32,
PropertyMode.Replace, ref opacity, 1);
}
} else {
@@ -4195,7 +4193,7 @@
internal override void SetWindowTransparency(IntPtr handle,
double transparency, Color key) {
Hwnd hwnd;
- uint opacity;
+ IntPtr opacity;
hwnd = Hwnd.ObjectFromHandle(handle);
@@ -4204,7 +4202,7 @@
}
hwnd.opacity = (uint)(0xffffffff * transparency);
- opacity = hwnd.opacity;
+ opacity = (IntPtr)hwnd.opacity;
if (hwnd.reparented) {
XChangeProperty(DisplayHandle,
XGetParent(hwnd.whole_window), NetAtoms[(int)NA._NET_WM_WINDOW_OPACITY],
(IntPtr)Atom.XA_CARDINAL, 32, PropertyMode.Replace, ref opacity, 1);
@@ -4551,12 +4549,18 @@
internal extern static int XChangeProperty(IntPtr display,
IntPtr window, IntPtr property, IntPtr type, int format, PropertyMode mode, ref
uint value, int nelements);
[DllImport ("libX11", EntryPoint="XChangeProperty")]
+ internal extern static int XChangeProperty(IntPtr display,
IntPtr window, IntPtr property, IntPtr type, int format, PropertyMode mode, ref
IntPtr value, int nelements);
+
+ [DllImport ("libX11", EntryPoint="XChangeProperty")]
internal extern static int XChangeProperty(IntPtr display,
IntPtr window, IntPtr property, IntPtr type, int format, PropertyMode mode,
uint[] data, int nelements);
[DllImport ("libX11", EntryPoint="XChangeProperty")]
internal extern static int XChangeProperty(IntPtr display,
IntPtr window, IntPtr property, IntPtr type, int format, PropertyMode mode,
int[] data, int nelements);
[DllImport ("libX11", EntryPoint="XChangeProperty")]
+ internal extern static int XChangeProperty(IntPtr display,
IntPtr window, IntPtr property, IntPtr type, int format, PropertyMode mode,
IntPtr[] data, int nelements);
+
+ [DllImport ("libX11", EntryPoint="XChangeProperty")]
internal extern static int XChangeProperty(IntPtr display,
IntPtr window, IntPtr property, IntPtr type, int format, PropertyMode mode,
IntPtr atoms, int nelements);
[DllImport ("libX11", EntryPoint="XChangeProperty",
CharSet=CharSet.Ansi)]
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches