mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 17:10:20 -10:00
Compare commits
32
Commits
fsharp47
...
mono-1-2-3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e68e73c7ef | ||
|
|
6b2181df33 | ||
|
|
191ed8daf4 | ||
|
|
636dcb777c | ||
|
|
c643bc3a55 | ||
|
|
6b75245724 | ||
|
|
2d2f7cb0ba | ||
|
|
d0a1cc2034 | ||
|
|
375d9925c5 | ||
|
|
876e9eebb9 | ||
|
|
da13d760a2 | ||
|
|
77cf5c576d | ||
|
|
1441b19d41 | ||
|
|
203611f08d | ||
|
|
482857356b | ||
|
|
b0fda83a1a | ||
|
|
0ce41fadb2 | ||
|
|
426ae45990 | ||
|
|
6741081c6d | ||
|
|
e2a36cf6bd | ||
|
|
7690886912 | ||
|
|
bfda958d99 | ||
|
|
07a339f2af | ||
|
|
d4f15796b7 | ||
|
|
e8667dc436 | ||
|
|
72ebeaeac8 | ||
|
|
bdcfb67cb2 | ||
|
|
9c7c840255 | ||
|
|
661b6f82ba | ||
|
|
8d017cb332 | ||
|
|
e56ee555c0 | ||
|
|
e79cbac0be |
No files matched your search
@@ -1,3 +1,11 @@
|
||||
2007-02-14 Wade Berrier <[email protected]>
|
||||
|
||||
* configure.in: version bump -> 1.2.3.1
|
||||
|
||||
2007-01-24 Wade Berrier <[email protected]>
|
||||
|
||||
* configure.in: version bump -> 1.2.3
|
||||
|
||||
2007-01-12 Gert Driesen <[email protected]>
|
||||
|
||||
* scripts/Makefile.am: Added 'al2'.
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ AC_CANONICAL_SYSTEM
|
||||
m4_ifdef([_A][M_PROG_TAR],[_A][M_SET_OPTION([tar-ustar])])
|
||||
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_INIT_AUTOMAKE(mono,1.2)
|
||||
AM_INIT_AUTOMAKE(mono,1.2.3.1)
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
API_VER=1.0
|
||||
|
||||
@@ -1,3 +1,56 @@
|
||||
2007-02-12 Chris Toshok <[email protected]>
|
||||
|
||||
[Backport to 1-2-3]
|
||||
* DataGrid.cs: return immediately from Edit() when there are no
|
||||
columns. Fixes #80662.
|
||||
|
||||
2007-02-07 Jonathan Pobst <[email protected]>
|
||||
[Backport to 1-2-3]
|
||||
* ListView.cs: UseCompatibleStateImageBehavior setter changed from NIEX to
|
||||
MonoInternalNote. This is added automagically by VS2005, so let's not crash
|
||||
on it.
|
||||
|
||||
2007-02-05 Jackson Harper <[email protected]>
|
||||
|
||||
* TreeView.cs: We need to check scrollbar visibility when window
|
||||
visibility is updated, because non visible trees don't ever add
|
||||
scrollbars.
|
||||
* Cursor.cs: We want the override cursor to be reset to NULL when
|
||||
we set current cursor to the default cursor.
|
||||
|
||||
2007-01-30 Jackson Harper <[email protected]>
|
||||
|
||||
* XplatUIX11.cs: Don't break when handling button release in drag
|
||||
and drop operations. We need that BUTTONUP message to get through
|
||||
so capture is released.
|
||||
* X11Dnd.cs: We don't need to manually grab the pointer anymore,
|
||||
this is handled automatically when the mouse is down.
|
||||
|
||||
2007-01-29 Chris Toshok <[email protected]>
|
||||
|
||||
* XplatUIX11.cs: don't crash, and remove the icon if the user has
|
||||
set one, if SetIcon is passed a null icon.
|
||||
|
||||
2007-01-29 Andreia Gaita <[email protected]>
|
||||
|
||||
* TextBox.cs: Redraw when the password characters changes
|
||||
* TextControl.cs: Check if textbox has a password char and draw
|
||||
a line of password chars instead of the text in the line. LineTag gets
|
||||
an extra Draw() method which allows document.Draw to override the text
|
||||
that will be drawn. Removes 1024 char limitation on length of passworded
|
||||
lines.
|
||||
|
||||
2007-01-25 Rolf Bjarne Kvinge <[email protected]>
|
||||
[Backport to 1-2-3 -jpobst]
|
||||
* XplatUIWin32.cs: Set SWP_NOACTIVATE in RequestNCRecalc as well,
|
||||
we don't want to activate any windows. Fixes #79433.
|
||||
|
||||
2007-01-28 Jonathan Pobst <[email protected]>
|
||||
[Backport to 1-2-3]
|
||||
* TextRenderer.cs: Fix cutting off the bottom of letters like "j" by
|
||||
one pixel. Fix a StackOverflowException caused by an overload wrongly
|
||||
calling itself.
|
||||
|
||||
2007-01-24 Chris Toshok <[email protected]>
|
||||
|
||||
* XplatUIX11.cs: fix the wake_waiting logic - we always clear the
|
||||
|
||||
@@ -200,7 +200,7 @@ namespace System.Windows.Forms {
|
||||
set {
|
||||
if (current != value) {
|
||||
current = value;
|
||||
if (current == null){
|
||||
if (current == null || current == Cursors.Default){
|
||||
// FIXME - define and set empty cursor
|
||||
XplatUI.OverrideCursor(IntPtr.Zero);
|
||||
} else
|
||||
|
||||
@@ -2486,6 +2486,9 @@ namespace System.Windows.Forms
|
||||
|
||||
private void Edit ()
|
||||
{
|
||||
if (CurrentTableStyle.GridColumnStyles.Count == 0)
|
||||
return;
|
||||
|
||||
if (CurrentTableStyle.GridColumnStyles[CurrentColumn].bound == false)
|
||||
return;
|
||||
|
||||
|
||||
@@ -678,12 +678,12 @@ namespace System.Windows.Forms
|
||||
[EditorBrowsable (EditorBrowsableState.Advanced)]
|
||||
[DefaultValue (true)]
|
||||
[Browsable (false)]
|
||||
[MonoInternalNote ("Stub, not implemented")]
|
||||
public bool UseCompatibleStateImageBehavior {
|
||||
get {
|
||||
return false;
|
||||
}
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -226,6 +226,7 @@ namespace System.Windows.Forms {
|
||||
} else {
|
||||
document.PasswordChar = "";
|
||||
}
|
||||
this.CalculateDocument();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -872,22 +872,23 @@ namespace System.Windows.Forms {
|
||||
|
||||
set {
|
||||
password_char = value;
|
||||
PasswordCache.Length = 0;
|
||||
if ((password_char.Length != 0) && (password_char[0] != '\0')) {
|
||||
char ch;
|
||||
|
||||
calc_pass = true;
|
||||
ch = value[0];
|
||||
password_cache = new StringBuilder(1024);
|
||||
for (int i = 0; i < 1024; i++) {
|
||||
password_cache.Append(ch);
|
||||
}
|
||||
} else {
|
||||
calc_pass = false;
|
||||
password_cache = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private StringBuilder PasswordCache {
|
||||
get {
|
||||
if (password_cache == null)
|
||||
password_cache = new StringBuilder();
|
||||
return password_cache;
|
||||
}
|
||||
}
|
||||
|
||||
internal int ViewPortX {
|
||||
get {
|
||||
return viewport_x;
|
||||
@@ -1849,8 +1850,11 @@ namespace System.Windows.Forms {
|
||||
if (!calc_pass) {
|
||||
text = line.text;
|
||||
} else {
|
||||
// This fails if there's a password > 1024 chars...
|
||||
text = this.password_cache;
|
||||
if (PasswordCache.Length < line.text.Length)
|
||||
PasswordCache.Append(Char.Parse(password_char), line.text.Length - PasswordCache.Length);
|
||||
else if (PasswordCache.Length > line.text.Length)
|
||||
PasswordCache.Remove(line.text.Length, PasswordCache.Length - line.text.Length);
|
||||
text = PasswordCache;
|
||||
}
|
||||
|
||||
int line_selection_start = text.Length + 1;
|
||||
@@ -1934,7 +1938,8 @@ namespace System.Windows.Forms {
|
||||
tag.Draw (g, current_brush,
|
||||
line.widths [old_tag_pos - 1] + line.align_shift - viewport_x,
|
||||
line.Y + tag.shift - viewport_y,
|
||||
old_tag_pos - 1, Math.Min (tag.length, tag_pos - old_tag_pos));
|
||||
old_tag_pos - 1, Math.Min (tag.length, tag_pos - old_tag_pos),
|
||||
text.ToString() );
|
||||
}
|
||||
tag = tag.next;
|
||||
}
|
||||
@@ -4275,6 +4280,10 @@ namespace System.Windows.Forms {
|
||||
dc.DrawString (line.text.ToString (start, end), font, brush, x, y, StringFormat.GenericTypographic);
|
||||
}
|
||||
|
||||
internal virtual void Draw (Graphics dc, Brush brush, float x, float y, int start, int end, string text) {
|
||||
dc.DrawString (text.Substring (start, end), font, brush, x, y, StringFormat.GenericTypographic);
|
||||
}
|
||||
|
||||
///<summary>Break a tag into two with identical attributes; pos is 1-based; returns tag starting at >pos< or null if end-of-line</summary>
|
||||
internal LineTag Break(int pos) {
|
||||
|
||||
|
||||
@@ -268,7 +268,8 @@ namespace System.Windows.Forms
|
||||
|
||||
internal static void DrawTextInternal (IDeviceContext dc, string text, Font font, Point pt, Color foreColor, Color backColor, TextFormatFlags flags, bool useDrawString)
|
||||
{
|
||||
DrawTextInternal (dc, text, font, pt, foreColor, backColor, flags, useDrawString);
|
||||
Size sz = MeasureTextInternal (dc, text, font, useDrawString);
|
||||
DrawTextInternal (dc, text, font, new Rectangle (pt, sz), foreColor, backColor, flags, useDrawString);
|
||||
}
|
||||
|
||||
internal static Size MeasureTextInternal (string text, Font font, bool useMeasureString)
|
||||
@@ -379,7 +380,6 @@ namespace System.Windows.Forms
|
||||
}
|
||||
if ((flags & TextFormatFlags.VerticalCenter) == TextFormatFlags.VerticalCenter) {
|
||||
r.Y += 1;
|
||||
r.Height -= 1;
|
||||
}
|
||||
|
||||
return r;
|
||||
@@ -409,7 +409,6 @@ namespace System.Windows.Forms
|
||||
}
|
||||
if ((flags & TextFormatFlags.VerticalCenter) == TextFormatFlags.VerticalCenter) {
|
||||
r.Y += 1;
|
||||
r.Height -= 1;
|
||||
}
|
||||
|
||||
return r;
|
||||
@@ -432,13 +431,9 @@ namespace System.Windows.Forms
|
||||
[DllImport ("gdi32")]
|
||||
static extern int SetBkMode (IntPtr hdc, int iBkMode);
|
||||
|
||||
[DllImport ("gdi32")]
|
||||
static extern bool GetTextExtentPoint32 (IntPtr hdc, string lpString, int cbString, out UXTheme.SIZE lpSize);
|
||||
|
||||
[DllImport ("gdi32")]
|
||||
static extern bool DeleteObject (IntPtr objectHandle);
|
||||
#endregion
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
@@ -112,6 +112,7 @@ namespace System.Windows.Forms {
|
||||
LostFocus += new EventHandler (LostFocusHandler);
|
||||
GotFocus += new EventHandler (GotFocusHandler);
|
||||
MouseWheel += new MouseEventHandler(MouseWheelHandler);
|
||||
VisibleChanged += new EventHandler (VisibleChangedHandler);
|
||||
|
||||
SetStyle (ControlStyles.UserPaint | ControlStyles.StandardClick
|
||||
#if NET_2_0
|
||||
@@ -1534,6 +1535,13 @@ namespace System.Windows.Forms {
|
||||
}
|
||||
}
|
||||
|
||||
private void VisibleChangedHandler (object sender, EventArgs e)
|
||||
{
|
||||
if (Visible) {
|
||||
UpdateScrollBars ();
|
||||
}
|
||||
}
|
||||
|
||||
private void FontChangedHandler (object sender, EventArgs e)
|
||||
{
|
||||
InvalidateNodeWidthRecursive (root_node);
|
||||
|
||||
@@ -401,7 +401,6 @@ namespace System.Windows.Forms {
|
||||
xevent.ButtonEvent.time);
|
||||
}
|
||||
|
||||
XplatUIX11.XUngrabPointer (display, IntPtr.Zero);
|
||||
drag_data.State = DragState.None;
|
||||
// WE can't reset the drag data yet as it is still
|
||||
// most likely going to be used by the SelectionRequest
|
||||
@@ -429,22 +428,6 @@ namespace System.Windows.Forms {
|
||||
return false;
|
||||
}
|
||||
|
||||
suc = XplatUIX11.XGrabPointer (display, xevent.AnyEvent.window,
|
||||
false,
|
||||
EventMask.ButtonMotionMask |
|
||||
EventMask.PointerMotionMask |
|
||||
EventMask.ButtonPressMask |
|
||||
EventMask.ButtonReleaseMask,
|
||||
GrabMode.GrabModeAsync,
|
||||
GrabMode.GrabModeAsync,
|
||||
IntPtr.Zero, IntPtr.Zero/*CursorCopy.Handle*/, IntPtr.Zero);
|
||||
|
||||
if (suc != 0) {
|
||||
Console.Error.WriteLine ("Could not grab pointer aborting drag.");
|
||||
drag_data.Reset ();
|
||||
return false;
|
||||
}
|
||||
|
||||
drag_data.State = DragState.Dragging;
|
||||
} else if (drag_data.State != DragState.None) {
|
||||
bool dnd_aware = false;
|
||||
|
||||
@@ -1527,7 +1527,7 @@ namespace System.Windows.Forms {
|
||||
}
|
||||
|
||||
internal override void RequestNCRecalc(IntPtr handle) {
|
||||
Win32SetWindowPos(handle, IntPtr.Zero, 0, 0, 0, 0, SetWindowPosFlags.SWP_FRAMECHANGED | SetWindowPosFlags.SWP_NOOWNERZORDER | SetWindowPosFlags.SWP_NOSIZE | SetWindowPosFlags.SWP_NOMOVE | SetWindowPosFlags.SWP_NOZORDER);
|
||||
Win32SetWindowPos(handle, IntPtr.Zero, 0, 0, 0, 0, SetWindowPosFlags.SWP_FRAMECHANGED | SetWindowPosFlags.SWP_NOOWNERZORDER | SetWindowPosFlags.SWP_NOSIZE | SetWindowPosFlags.SWP_NOMOVE | SetWindowPosFlags.SWP_NOZORDER | SetWindowPosFlags.SWP_NOACTIVATE);
|
||||
}
|
||||
|
||||
internal override void ResetMouseHover(IntPtr handle) {
|
||||
|
||||
@@ -1003,27 +1003,43 @@ namespace System.Windows.Forms {
|
||||
}
|
||||
}
|
||||
|
||||
private void SetIcon(Hwnd hwnd, Icon icon) {
|
||||
Bitmap bitmap;
|
||||
int size;
|
||||
IntPtr[] data;
|
||||
int index;
|
||||
private void SetIcon(Hwnd hwnd, Icon icon)
|
||||
{
|
||||
if (icon == null) {
|
||||
// XXX
|
||||
|
||||
bitmap = icon.ToBitmap();
|
||||
index = 0;
|
||||
size = bitmap.Width * bitmap.Height + 2;
|
||||
data = new IntPtr[size];
|
||||
|
||||
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++] = (IntPtr)bitmap.GetPixel(x, y).ToArgb();
|
||||
}
|
||||
// This really needs to do whatever it
|
||||
// takes to remove the window manager
|
||||
// menu, not just delete the ICON
|
||||
// property. This will cause metacity
|
||||
// to use the "no icon set" icon, and
|
||||
// we'll still have an icon.
|
||||
XDeleteProperty (DisplayHandle, hwnd.whole_window, _NET_WM_ICON);
|
||||
}
|
||||
else {
|
||||
Bitmap bitmap;
|
||||
int size;
|
||||
IntPtr[] data;
|
||||
int index;
|
||||
|
||||
XChangeProperty(DisplayHandle, hwnd.whole_window, _NET_WM_ICON, (IntPtr)Atom.XA_CARDINAL, 32, PropertyMode.Replace, data, size);
|
||||
bitmap = icon.ToBitmap();
|
||||
index = 0;
|
||||
size = bitmap.Width * bitmap.Height + 2;
|
||||
data = new IntPtr[size];
|
||||
|
||||
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++] = (IntPtr)bitmap.GetPixel (x, y).ToArgb ();
|
||||
}
|
||||
}
|
||||
|
||||
XChangeProperty (DisplayHandle, hwnd.whole_window,
|
||||
_NET_WM_ICON, (IntPtr)Atom.XA_CARDINAL, 32,
|
||||
PropertyMode.Replace, data, size);
|
||||
}
|
||||
}
|
||||
|
||||
private void WakeupMain () {
|
||||
@@ -3389,7 +3405,7 @@ namespace System.Windows.Forms {
|
||||
case XEventName.ButtonRelease: {
|
||||
if (Dnd.InDrag()) {
|
||||
Dnd.HandleButtonRelease (ref xevent);
|
||||
break;
|
||||
// Don't break here, so that the BUTTONUP message can get through
|
||||
}
|
||||
|
||||
switch(xevent.ButtonEvent.button) {
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
Mon Jan 29 16:51:33 CET 2007 Paolo Molaro <[email protected]>
|
||||
|
||||
* MonoSymbolWriter.cs: unlink the file before writing it, since it may
|
||||
be mmapped by the runtime.
|
||||
|
||||
2007-01-29 Martin Baulig <[email protected]>
|
||||
|
||||
* MonoSymbolFile.cs
|
||||
(MonoSymbolFile.Assembly): Removed this property.
|
||||
(MonoSymbolFile.Guid): New public property.
|
||||
|
||||
2006-09-24 Joshua Tauberer <[email protected]>
|
||||
|
||||
* MonoSymbolFile.cs: Allow MonoSymbolFile to be created
|
||||
|
||||
@@ -262,7 +262,6 @@ namespace Mono.CompilerServices.SymbolWriter
|
||||
Write (new MyBinaryWriter (fs), guid);
|
||||
}
|
||||
|
||||
Assembly assembly;
|
||||
MyBinaryReader reader;
|
||||
Hashtable method_hash;
|
||||
Hashtable source_file_hash;
|
||||
@@ -270,15 +269,13 @@ namespace Mono.CompilerServices.SymbolWriter
|
||||
Hashtable method_token_hash;
|
||||
Hashtable source_name_hash;
|
||||
|
||||
Guid guid;
|
||||
|
||||
protected MonoSymbolFile (string filename, Assembly assembly)
|
||||
{
|
||||
this.assembly = assembly;
|
||||
|
||||
FileStream stream = new FileStream (filename, FileMode.Open, FileAccess.Read);
|
||||
reader = new MyBinaryReader (stream);
|
||||
|
||||
Guid guid;
|
||||
|
||||
try {
|
||||
long magic = reader.ReadInt64 ();
|
||||
long version = reader.ReadInt32 ();
|
||||
@@ -306,7 +303,7 @@ namespace Mono.CompilerServices.SymbolWriter
|
||||
|
||||
Module[] modules = assembly.GetModules ();
|
||||
Guid assembly_guid = MonoDebuggerSupport.GetGuid (modules [0]);
|
||||
|
||||
|
||||
if (guid != assembly_guid)
|
||||
throw new MonoSymbolFileException (
|
||||
"Symbol file `{0}' does not match assembly `{1}'",
|
||||
@@ -330,10 +327,6 @@ namespace Mono.CompilerServices.SymbolWriter
|
||||
return new MonoSymbolFile (mdbFilename, null);
|
||||
}
|
||||
|
||||
public Assembly Assembly {
|
||||
get { return assembly; }
|
||||
}
|
||||
|
||||
public int SourceCount {
|
||||
get { return ot.SourceCount; }
|
||||
}
|
||||
@@ -350,6 +343,10 @@ namespace Mono.CompilerServices.SymbolWriter
|
||||
get { return last_namespace_index; }
|
||||
}
|
||||
|
||||
public Guid Guid {
|
||||
get { return guid; }
|
||||
}
|
||||
|
||||
internal int LineNumberCount = 0;
|
||||
internal int LocalCount = 0;
|
||||
internal int StringSize = 0;
|
||||
|
||||
@@ -181,6 +181,12 @@ namespace Mono.CompilerServices.SymbolWriter
|
||||
method.Method.NamespaceID);
|
||||
}
|
||||
|
||||
try {
|
||||
// We mmap the file, so unlink the previous version since it may be in use
|
||||
File.Delete (filename);
|
||||
} catch {
|
||||
// We can safely ignore
|
||||
}
|
||||
using (FileStream fs = new FileStream (filename, FileMode.Create, FileAccess.Write)) {
|
||||
file.CreateSymbolFile (guid, fs);
|
||||
}
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
2007-01-26 Miguel de Icaza <[email protected]>
|
||||
|
||||
* SqliteParameterCollection.cs: If the parameter is prefixed,
|
||||
ignore the prefix when we do the lookup. Replicates the behavior
|
||||
in GetParameter
|
||||
|
||||
The code paths changed recently with the 2.0-ification of
|
||||
Mono.Data.SqliteClient
|
||||
|
||||
2007-01-16 Marek Habersack <[email protected]>
|
||||
|
||||
* SqliteCommandBuilder.cs: Nothing-to-do implementation of the
|
||||
|
||||
@@ -132,9 +132,12 @@ namespace Mono.Data.SqliteClient
|
||||
|
||||
#if NET_2_0
|
||||
protected override DbConnection DbConnection
|
||||
#else
|
||||
public SqliteConnection Connection
|
||||
{
|
||||
get { return parent_conn; }
|
||||
set { parent_conn = (SqliteConnection)value; }
|
||||
}
|
||||
#endif
|
||||
public SqliteConnection Connection
|
||||
{
|
||||
get { return parent_conn; }
|
||||
set { parent_conn = (SqliteConnection)value; }
|
||||
@@ -550,7 +553,6 @@ namespace Mono.Data.SqliteClient
|
||||
|
||||
public SqliteDataReader ExecuteReader (CommandBehavior behavior, bool want_results, out int rows_affected)
|
||||
{
|
||||
Console.WriteLine ("Executing reader on sql '{0}'", sql);
|
||||
Prepare ();
|
||||
|
||||
// The SQL string may contain multiple sql commands, so the main
|
||||
|
||||
+6
-1
@@ -359,9 +359,14 @@ namespace Mono.Data.SqliteClient
|
||||
#endif
|
||||
public int IndexOf (string parameterName)
|
||||
{
|
||||
if (isPrefixed (parameterName)){
|
||||
string sub = parameterName.Substring (1);
|
||||
if (named_param_hash.Contains(sub))
|
||||
return (int) named_param_hash [sub];
|
||||
}
|
||||
if (named_param_hash.Contains(parameterName))
|
||||
return (int) named_param_hash[parameterName];
|
||||
else
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
2007-02-12 Andreia Gaita <[email protected]>
|
||||
|
||||
* PrintingServicesUnix.cs: Apply fix to #80741
|
||||
|
||||
2007-01-19 Andreia Gaita <[email protected]>
|
||||
|
||||
* PrintingServicesUnix.cs: Add is_default flag check for
|
||||
|
||||
@@ -354,34 +354,39 @@ namespace System.Drawing.Printing
|
||||
|
||||
// Private functions
|
||||
|
||||
/// <summary>
|
||||
/// Due to some weird cups thing, cupsGetDefault does not always return
|
||||
/// the default printer, hence this function, that goes through each
|
||||
/// printer searching for one that has the is_default flag set.
|
||||
/// If there is none with the flag, but there are printers available,
|
||||
/// returns the first one. See #80519, #80198
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Due to some weird cups thing, cupsGetDefault does not always return
|
||||
/// the default printer, hence this function, that goes through each
|
||||
/// printer searching for one that has the is_default flag set.
|
||||
/// If there is none with the flag, but there are printers available,
|
||||
/// returns the first one. See #80519, #80198
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private string GetAlternativeDefaultPrinter() {
|
||||
IntPtr printers = IntPtr.Zero;
|
||||
private string GetAlternativeDefaultPrinter () {
|
||||
IntPtr dests = IntPtr.Zero, printers;
|
||||
CUPS_DESTS printer;
|
||||
string printer_name = String.Empty;
|
||||
|
||||
int cups_dests_size = Marshal.SizeOf(typeof(CUPS_DESTS));
|
||||
try {
|
||||
int cups_dests_size = Marshal.SizeOf (typeof (CUPS_DESTS));
|
||||
|
||||
int printer_count = cupsGetDests (ref printers);
|
||||
int printer_count = cupsGetDests (ref dests);
|
||||
printers = dests;
|
||||
for (int i = 0; i < printer_count; i++) {
|
||||
printer = (CUPS_DESTS) Marshal.PtrToStructure (printers, typeof (CUPS_DESTS));
|
||||
|
||||
for (int i = 0; i < printer_count; i++) {
|
||||
printer = (CUPS_DESTS) Marshal.PtrToStructure (printers, typeof (CUPS_DESTS));
|
||||
|
||||
if (printer.is_default != 0 || printer_name.Equals(String.Empty)) {
|
||||
printer_name = Marshal.PtrToStringAnsi (printer.name);
|
||||
if (printer.is_default != 0)
|
||||
break;
|
||||
if (printer.is_default != 0 || printer_name.Equals (String.Empty)) {
|
||||
printer_name = Marshal.PtrToStringAnsi (printer.name);
|
||||
if (printer.is_default != 0)
|
||||
break;
|
||||
}
|
||||
printers = (IntPtr) ((long)printers + cups_dests_size);
|
||||
}
|
||||
printers = new IntPtr (printers.ToInt64 () + cups_dests_size);
|
||||
}
|
||||
Marshal.FreeHGlobal (printers);
|
||||
finally {
|
||||
if (dests != IntPtr.Zero)
|
||||
Marshal.FreeHGlobal (dests);
|
||||
}
|
||||
|
||||
return printer_name;
|
||||
}
|
||||
|
||||
@@ -1025,7 +1025,7 @@ namespace System.Web {
|
||||
string[] languages = request.UserLanguages;
|
||||
try {
|
||||
if (languages != null && languages.Length > 0)
|
||||
ret = new CultureInfo (languages[0]);
|
||||
ret = CultureInfo.CreateSpecificCulture (languages[0]);
|
||||
} catch {
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
2007-01-30 Atsushi Enomoto <[email protected]>
|
||||
|
||||
* Expression.cs : typo. Close #80669
|
||||
|
||||
2007-01-05 Atsushi Enomoto <[email protected]>
|
||||
|
||||
* Expression.cs : text() should match whitespace and significant
|
||||
|
||||
@@ -1367,9 +1367,9 @@ namespace System.Xml.XPath
|
||||
case Axes.Parent:
|
||||
return "parent";
|
||||
case Axes.Preceding:
|
||||
return "preceeding";
|
||||
return "preceding";
|
||||
case Axes.PrecedingSibling:
|
||||
return "preceeding-sibling";
|
||||
return "preceding-sibling";
|
||||
case Axes.Self:
|
||||
return "self";
|
||||
default:
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
2007-02-12 Lluis Sanchez Gual <[email protected]>
|
||||
|
||||
* ChannelServices.cs: Added conditional calling of StartListener,
|
||||
to keep old software compatible with mono.
|
||||
|
||||
2006-12-18 Lluis Sanchez Gual <[email protected]>
|
||||
|
||||
* ChannelServices.cs: Don't call StartListening for registered
|
||||
|
||||
@@ -280,6 +280,10 @@ namespace System.Runtime.Remoting.Channels
|
||||
|
||||
if (pos != -1) registeredChannels.Insert (pos, chnl);
|
||||
else registeredChannels.Add (chnl);
|
||||
|
||||
IChannelReceiver receiver = chnl as IChannelReceiver;
|
||||
if (receiver != null && oldStartModeTypes.Contains (chnl.GetType().ToString ()))
|
||||
receiver.StartListening (null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -477,6 +481,12 @@ namespace System.Runtime.Remoting.Channels
|
||||
|
||||
return list.ToArray ();
|
||||
}
|
||||
|
||||
// Back compatibility fix. StartListener will be called for the types listed here
|
||||
static IList oldStartModeTypes = new string[] {
|
||||
"Novell.Zenworks.Zmd.Public.UnixServerChannel",
|
||||
"Novell.Zenworks.Zmd.Public.UnixChannel"
|
||||
};
|
||||
}
|
||||
|
||||
internal class ExceptionFilterSink: IMessageSink
|
||||
|
||||
@@ -121,9 +121,9 @@ namespace System
|
||||
#else
|
||||
return DateTime.MaxValue;
|
||||
#endif
|
||||
//} else if (utcOffset.Ticks < 0) {
|
||||
// LAMESPEC: MS.NET fails to check validity here
|
||||
// it may throw ArgumentOutOfRangeException.
|
||||
} else if (utcOffset.Ticks < 0) {
|
||||
if (time.Ticks + utcOffset.Ticks < DateTime.MinValue.Ticks)
|
||||
return DateTime.MinValue;
|
||||
}
|
||||
|
||||
DateTime local = time.Add (utcOffset);
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
2007-02-12 Marek Safar <[email protected]>
|
||||
|
||||
A fix for bug #80749
|
||||
* assign.cs (FieldInitializer): FieldInitializer has to keep track of
|
||||
its parent container.
|
||||
|
||||
* class.cs (DefineFieldInitializers): Each initializer can has different
|
||||
resolve context.
|
||||
|
||||
* const.cs: Updated.
|
||||
|
||||
2007-01-27 Raja R Harinath <[email protected]>
|
||||
|
||||
Fix #80358
|
||||
* decl.cs (DeclSpace.initialize_type_params): Don't access
|
||||
'type_params' of a partial class directly.
|
||||
|
||||
2007-01-25 Marek Safar <[email protected]>
|
||||
|
||||
* expression.cs (CheckUselessComparison): Add additional check for char
|
||||
|
||||
+4
-1
@@ -588,9 +588,12 @@ namespace Mono.CSharp {
|
||||
// This class implements fields and events class initializers
|
||||
public class FieldInitializer : Assign
|
||||
{
|
||||
public FieldInitializer (FieldBuilder field, Expression expression)
|
||||
public readonly DeclSpace TypeContainer;
|
||||
|
||||
public FieldInitializer (FieldBuilder field, Expression expression, DeclSpace container)
|
||||
: base (new FieldExpr (field, expression.Location, true), expression)
|
||||
{
|
||||
this.TypeContainer = container;
|
||||
if (!field.IsStatic)
|
||||
((FieldExpr)target).InstanceExpression = CompilerGeneratedThis.Instance;
|
||||
}
|
||||
|
||||
+12
-8
@@ -2784,11 +2784,13 @@ namespace Mono.CSharp {
|
||||
void DefineFieldInitializers ()
|
||||
{
|
||||
if (initialized_fields != null) {
|
||||
EmitContext ec = new EmitContext (this, this, Location, null, null, ModFlags);
|
||||
ec.IsFieldInitializer = true;
|
||||
|
||||
for (int i = 0; i < initialized_fields.Count; ++i) {
|
||||
FieldInitializer fi = (FieldInitializer)initialized_fields[i];
|
||||
|
||||
EmitContext ec = new EmitContext (fi.TypeContainer, fi.TypeContainer,
|
||||
Location, null, null, ModFlags);
|
||||
ec.IsFieldInitializer = true;
|
||||
|
||||
fi.ResolveStatement (ec);
|
||||
if (fi.IsDefaultInitializer && RootContext.Optimize) {
|
||||
// Field is re-initialized to its default value => removed
|
||||
@@ -2800,11 +2802,13 @@ namespace Mono.CSharp {
|
||||
|
||||
if (initialized_static_fields != null) {
|
||||
bool has_complex_initializer = false;
|
||||
EmitContext ec = new EmitContext (this, this, Location, null, null, ModFlags);
|
||||
ec.IsStatic = true;
|
||||
ec.IsFieldInitializer = true;
|
||||
|
||||
foreach (FieldInitializer fi in initialized_static_fields) {
|
||||
EmitContext ec = new EmitContext (fi.TypeContainer, fi.TypeContainer,
|
||||
Location, null, null, ModFlags);
|
||||
ec.IsStatic = true;
|
||||
ec.IsFieldInitializer = true;
|
||||
|
||||
fi.ResolveStatement (ec);
|
||||
if (!fi.IsComplexInitializer)
|
||||
continue;
|
||||
@@ -6043,7 +6047,7 @@ namespace Mono.CSharp {
|
||||
|
||||
if (initializer != null)
|
||||
Parent.PartialContainer.RegisterFieldForInitialization (this,
|
||||
new FieldInitializer (FieldBuilder, initializer));
|
||||
new FieldInitializer (FieldBuilder, initializer, Parent));
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -7220,7 +7224,7 @@ namespace Mono.CSharp {
|
||||
}
|
||||
|
||||
Parent.PartialContainer.RegisterFieldForInitialization (this,
|
||||
new FieldInitializer (FieldBuilder, Initializer));
|
||||
new FieldInitializer (FieldBuilder, Initializer, Parent));
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
+10
-1
@@ -76,6 +76,11 @@ namespace Mono.CSharp {
|
||||
return false;
|
||||
}
|
||||
|
||||
// If the constant is private then we don't need any field the
|
||||
// value is already inlined and cannot be referenced
|
||||
//if ((ModFlags & Modifiers.PRIVATE) != 0 && RootContext.Optimize)
|
||||
// return true;
|
||||
|
||||
while (ttype.IsArray)
|
||||
ttype = TypeManager.GetElementType (ttype);
|
||||
|
||||
@@ -91,7 +96,8 @@ namespace Mono.CSharp {
|
||||
TypeManager.RegisterConstant (FieldBuilder, this);
|
||||
|
||||
if (ttype == TypeManager.decimal_type)
|
||||
Parent.PartialContainer.RegisterFieldForInitialization (this, new FieldInitializer (FieldBuilder, initializer));
|
||||
Parent.PartialContainer.RegisterFieldForInitialization (this,
|
||||
new FieldInitializer (FieldBuilder, initializer, Parent));
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -118,6 +124,9 @@ namespace Mono.CSharp {
|
||||
if (!ResolveValue ())
|
||||
return;
|
||||
|
||||
if (FieldBuilder == null)
|
||||
return;
|
||||
|
||||
if (value.Type == TypeManager.decimal_type) {
|
||||
Decimal d = ((DecimalConstant)value).Value;
|
||||
int[] bits = Decimal.GetBits (d);
|
||||
|
||||
+6
-8
@@ -1158,16 +1158,14 @@ namespace Mono.CSharp {
|
||||
the_parent = null;
|
||||
|
||||
int start = 0;
|
||||
TypeParameter[] parent_params = null;
|
||||
if ((the_parent != null) && the_parent.IsGeneric) {
|
||||
parent_params = the_parent.initialize_type_params ();
|
||||
start = parent_params != null ? parent_params.Length : 0;
|
||||
}
|
||||
|
||||
ArrayList list = new ArrayList ();
|
||||
if (parent_params != null)
|
||||
if (the_parent != null && the_parent.IsGeneric) {
|
||||
// FIXME: move generics info out of DeclSpace
|
||||
TypeParameter[] parent_params = the_parent.PartialContainer.TypeParameters;
|
||||
start = parent_params.Length;
|
||||
list.AddRange (parent_params);
|
||||
|
||||
}
|
||||
|
||||
int count = type_params != null ? type_params.Length : 0;
|
||||
for (int i = 0; i < count; i++) {
|
||||
TypeParameter param = type_params [i];
|
||||
|
||||
@@ -332,8 +332,9 @@ namespace Mono.CSharp {
|
||||
return new UIntConstant (~((UIntConstant)e).Value, e.Location);
|
||||
if (expr_type == TypeManager.int64_type)
|
||||
return new LongConstant (~((LongConstant)e).Value, e.Location);
|
||||
if (expr_type == TypeManager.uint64_type)
|
||||
return new ULongConstant (~((UIntConstant)e).Value, e.Location);
|
||||
if (expr_type == TypeManager.uint64_type){
|
||||
return new ULongConstant (~((ULongConstant)e).Value, e.Location);
|
||||
}
|
||||
if (e is EnumConstant) {
|
||||
e = TryReduceConstant (ec, ((EnumConstant)e).Child);
|
||||
if (e != null)
|
||||
|
||||
+37
-36
@@ -148,7 +148,43 @@ namespace Mono.CSharp {
|
||||
pending_implementations = new TypeAndMethods [total];
|
||||
|
||||
int i = 0;
|
||||
foreach (MissingInterfacesInfo missing in missing_ifaces){
|
||||
if (abstract_methods != null) {
|
||||
int count = abstract_methods.Count;
|
||||
pending_implementations [i].methods = new MethodInfo [count];
|
||||
pending_implementations [i].need_proxy = new MethodInfo [count];
|
||||
|
||||
abstract_methods.CopyTo (pending_implementations [i].methods, 0);
|
||||
pending_implementations [i].found = new bool [count];
|
||||
pending_implementations [i].args = new Type [count][];
|
||||
pending_implementations [i].mods = new Parameter.Modifier [count][];
|
||||
pending_implementations [i].type = type_builder;
|
||||
|
||||
string indexer_name = TypeManager.IndexerPropertyName (type_builder);
|
||||
pending_implementations [i].set_indexer_name = "set_" + indexer_name;
|
||||
pending_implementations [i].get_indexer_name = "get_" + indexer_name;
|
||||
|
||||
int j = 0;
|
||||
foreach (MemberInfo m in abstract_methods) {
|
||||
MethodInfo mi = (MethodInfo) m;
|
||||
|
||||
ParameterData pd = TypeManager.GetParameterData (mi);
|
||||
Type [] types = pd.Types;
|
||||
|
||||
pending_implementations [i].args [j] = types;
|
||||
pending_implementations [i].mods [j] = null;
|
||||
if (pd.Count > 0) {
|
||||
Parameter.Modifier [] pm = new Parameter.Modifier [pd.Count];
|
||||
for (int k = 0; k < pd.Count; k++)
|
||||
pm [k] = pd.ParameterModifier (k);
|
||||
pending_implementations [i].mods [j] = pm;
|
||||
}
|
||||
|
||||
j++;
|
||||
}
|
||||
++i;
|
||||
}
|
||||
|
||||
foreach (MissingInterfacesInfo missing in missing_ifaces) {
|
||||
MethodInfo [] mi;
|
||||
Type t = missing.Type;
|
||||
|
||||
@@ -200,41 +236,6 @@ namespace Mono.CSharp {
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
if (abstract_methods != null){
|
||||
int count = abstract_methods.Count;
|
||||
pending_implementations [i].methods = new MethodInfo [count];
|
||||
pending_implementations [i].need_proxy = new MethodInfo [count];
|
||||
|
||||
abstract_methods.CopyTo (pending_implementations [i].methods, 0);
|
||||
pending_implementations [i].found = new bool [count];
|
||||
pending_implementations [i].args = new Type [count][];
|
||||
pending_implementations [i].mods = new Parameter.Modifier [count][];
|
||||
pending_implementations [i].type = type_builder;
|
||||
|
||||
string indexer_name = TypeManager.IndexerPropertyName (type_builder);
|
||||
pending_implementations [i].set_indexer_name = "set_" + indexer_name;
|
||||
pending_implementations [i].get_indexer_name = "get_" + indexer_name;
|
||||
|
||||
int j = 0;
|
||||
foreach (MemberInfo m in abstract_methods){
|
||||
MethodInfo mi = (MethodInfo) m;
|
||||
|
||||
ParameterData pd = TypeManager.GetParameterData (mi);
|
||||
Type [] types = pd.Types;
|
||||
|
||||
pending_implementations [i].args [j] = types;
|
||||
pending_implementations [i].mods [j] = null;
|
||||
if (pd.Count > 0){
|
||||
Parameter.Modifier [] pm = new Parameter.Modifier [pd.Count];
|
||||
for (int k = 0; k < pd.Count; k++)
|
||||
pm [k] = pd.ParameterModifier (k);
|
||||
pending_implementations [i].mods [j] = pm;
|
||||
}
|
||||
|
||||
j++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct MissingInterfacesInfo {
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
2007-02-16 Dick Porter <[email protected]>
|
||||
|
||||
* threadpool.c (append_job): Fix fast-path array handling, so it's
|
||||
less likely the array will grow exponentially when the load is
|
||||
heavy.
|
||||
|
||||
Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <[email protected]>
|
||||
|
||||
* loader.c: implemented typedef parent in field memberref.
|
||||
|
||||
Mon Jan 29 11:30:46 CET 2007 Paolo Molaro <[email protected]>
|
||||
|
||||
* marshal.c: fix from Robert Jordan ([email protected])
|
||||
for bug #80618.
|
||||
|
||||
2007-01-24 Zoltan Varga <[email protected]>
|
||||
|
||||
* class.c (mono_class_layout_fields): When force-aligning a field, make sure
|
||||
|
||||
@@ -329,6 +329,19 @@ field_from_memberref (MonoImage *image, guint32 token, MonoClass **retklass,
|
||||
/* we may want to check the signature here... */
|
||||
|
||||
switch (class) {
|
||||
case MONO_MEMBERREF_PARENT_TYPEDEF:
|
||||
klass = mono_class_get (image, MONO_TOKEN_TYPE_DEF | nindex);
|
||||
if (!klass) {
|
||||
char *name = mono_class_name_from_token (image, MONO_TOKEN_TYPE_REF | nindex);
|
||||
g_warning ("Missing field %s in class %s (typeref index %d)", fname, name, nindex);
|
||||
g_free (name);
|
||||
return NULL;
|
||||
}
|
||||
mono_class_init (klass);
|
||||
if (retklass)
|
||||
*retklass = klass;
|
||||
field = mono_class_get_field_from_name (klass, fname);
|
||||
break;
|
||||
case MONO_MEMBERREF_PARENT_TYPEREF:
|
||||
klass = mono_class_from_typeref (image, MONO_TOKEN_TYPE_REF | nindex);
|
||||
if (!klass) {
|
||||
|
||||
@@ -4558,7 +4558,7 @@ mono_marshal_get_runtime_invoke (MonoMethod *method)
|
||||
|
||||
sig = mono_method_signature (method);
|
||||
|
||||
csig = mono_metadata_signature_alloc (method->klass->image, 4);
|
||||
csig = mono_metadata_signature_alloc (target_klass->image, 4);
|
||||
|
||||
csig->ret = &mono_defaults.object_class->byval_arg;
|
||||
if (method->klass->valuetype && mono_method_signature (method)->hasthis)
|
||||
|
||||
@@ -1120,7 +1120,7 @@ static void
|
||||
append_job (CRITICAL_SECTION *cs, TPQueue *list, MonoObject *ar)
|
||||
{
|
||||
EnterCriticalSection (cs);
|
||||
if (list->array && mono_array_length (list->array) < list->next_elem) {
|
||||
if (list->array && (list->next_elem < mono_array_length (list->array))) {
|
||||
mono_array_setref (list->array, list->next_elem, ar);
|
||||
list->next_elem++;
|
||||
LeaveCriticalSection (cs);
|
||||
|
||||
@@ -1691,7 +1691,6 @@ peephole_pass (MonoCompile *cfg, MonoBasicBlock *bb)
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case OP_LOADU1_MEMBASE:
|
||||
case OP_LOADI1_MEMBASE:
|
||||
/*
|
||||
* Note: if reg1 = reg2 the load op is removed
|
||||
@@ -1716,7 +1715,6 @@ peephole_pass (MonoCompile *cfg, MonoBasicBlock *bb)
|
||||
}
|
||||
}
|
||||
break;
|
||||
case OP_LOADU2_MEMBASE:
|
||||
case OP_LOADI2_MEMBASE:
|
||||
/*
|
||||
* Note: if reg1 = reg2 the load op is removed
|
||||
|
||||
Reference in new issue
Block a user