Compare commits

...
Author SHA1 Message Date
Everaldo Canuto e117097e1f In System.Windows.Forms:
2008-09-30  Everaldo Canuto  <[email protected]>

	* MenuAPI.cs: Prevent NRE when deactivate menu. Fixes #413636.


svn path=/branches/mono-2-0/mcs/; revision=114557
2008-10-01 13:20:38 +00:00
Michael Hutchinson 95d855ebdd 2008-09-30 Michael Hutchinson <[email protected]>
* HttpServerChannel.cs: make sure the channel data object is set 
	  when the port is auto-assigned.
	* HttpClientTransportSink.cs: Use the __RequestUri header for the 
	  request's URI. Includes workaround for bad __RequestUri values.
	
	Fixes Bug 378713 - [regression] Remoting - HttpChannel.


svn path=/branches/mono-2-0/mcs/; revision=114529
2008-09-30 23:43:33 +00:00
Jb Evain 362fb88f27 2008-09-30 Jb Evain <[email protected]>
* QueryableEnumerable.cs: fix ElementType.


svn path=/branches/mono-2-0/mcs/; revision=114516
2008-09-30 21:36:30 +00:00
Rodrigo Kumpera 9c53f50c43 2008-09-29 Rodrigo Kumpera <[email protected]>
* TypeBuilderTest.cs: Add a test for MakeGenericType with EnumBuilder.
	Tests #430508.

	Backported from trunk.


svn path=/branches/mono-2-0/mcs/; revision=114413
2008-09-29 15:38:28 +00:00
Rodrigo Kumpera 075d5711fa 2008-09-29 Rodrigo Kumpera <[email protected]>
* Type.cs (MakeGenericType): Only use UnderlyingSystemType for user types.
       This must exclude TypeBuilder and EnumBuilder. Fixes #430508.

		Backported from trunk.


svn path=/branches/mono-2-0/mcs/; revision=114412
2008-09-29 15:34:09 +00:00
Geoff Norton c5d359670a 2008-09-29 Geoff Norton <[email protected]>
* include/private/gcconfig.h: Make Darwin/ARM use mmap() instead of
        sbrk() for its allocator implementation.

svn path=/branches/mono-2-0/mono/; revision=114395
2008-09-29 14:03:19 +00:00
Zoltan Varga ee457822fa Merge r114163 from HEAD.
svn path=/branches/mono-2-0/mono/; revision=114200
2008-09-26 16:21:26 +00:00
Zoltan Varga 0589d7ddf5 Merge r113458 from HEAD.
svn path=/branches/mono-2-0/mono/; revision=114102
2008-09-25 17:27:30 +00:00
Marek Safar 2d8310224e 2008-09-25 Marek Safar <marek.safar at gmail.com>
* driver.cs, namespace.cs: Read types and namespaces after all
	requested assemblies are loaded, fixes issues with System.Core
	auto-reference, and #419888.


svn path=/branches/mono-2-0/mcs/; revision=114098
2008-09-25 17:04:27 +00:00
Dick Porter 6bf7d13701 2008-09-25 Dick Porter <[email protected]>
* events.c (event_create): Revert previous kludge as it's no
	longer needed.

	* wait.c: Make sure we keep references to handles we're waiting
	for.  Fixes bug 424851.


svn path=/branches/mono-2-0/mono/; revision=114096
2008-09-25 17:00:21 +00:00
Miguel de Icaza f2eca844d4 Version
svn path=/branches/mono-2-0/mono/; revision=114045
2008-09-25 00:08:10 +00:00
Zoltan Varga 42b162613a 2008-09-24 Zoltan Varga <[email protected]>
* Makefile.am (PLATFORM_DISABLED_TESTS): Disable winx64structs.exe
	on ia64 for the release.

svn path=/branches/mono-2-0/mono/; revision=114015
2008-09-24 20:36:25 +00:00
Michael Hutchinson c02fd518fa 2008-09-24 Michael Hutchinson <[email protected]>
* HttpServerTransportSink.cs: Disable chunking on the server, as 
	  for some reason it was breaking the tests. This reduces efficiency 
	  but right now is unavoidable.
	  
	* HttpServerChannel.cs: Implement AddHookChannelUri. Thanks to 
	  Lluis for the patch.


svn path=/branches/mono-2-0/mcs/; revision=113997
2008-09-24 19:23:00 +00:00
Michael Hutchinson 46ba96ab4c 2008-09-24 Michael Hutchinson <[email protected]>
* HttpServerChannelTests.cs: Don't check for a chunked response from 
	  the Mono HTTP server; it no longer chunks since that was breaking 
	  other tests.


svn path=/branches/mono-2-0/mcs/; revision=113996
2008-09-24 19:22:24 +00:00
Michael Hutchinson 245f79b651 2008-09-23 Michael Hutchinson <[email protected]>
* HttpClientChannel.cs: Fix logic error from ==/!= typo. Stops 
	  channel from trying to handle IPC URLs, which was breaking the 
	  IPC tests.


svn path=/branches/mono-2-0/mcs/; revision=113908
2008-09-23 22:36:04 +00:00
Jb Evain 325b17c5e6 backport fix for bug 428309
svn path=/branches/mono-2-0/mcs/; revision=113782
2008-09-23 06:57:59 +00:00
Miguel de Icaza b77b0e57c7 Backport: do not crash on Goto/cloning
svn path=/branches/mono-2-0/mcs/; revision=113769
2008-09-22 23:26:05 +00:00
Miguel de Icaza 5817f62c06 Backport fix for 427974
svn path=/branches/mono-2-0/mcs/; revision=113636
2008-09-20 16:36:36 +00:00
Kornél Pál 4d846f3217 Backport of r113614. coree.c (_CorValidateImage): Some 64-bit IL only images have entry point calling _CorDllMain imported from mscoree.dll. Set entry point RVA to 0 for 64-bit IL only images because imports are not resolved for IL only images. Special thanks to Bill Holmes for finding this bug and testing the patch. Also fail for 64-bit images marked as CLI_FLAGS_32BITREQUIRED.
svn path=/branches/mono-2-0/mono/; revision=113615
2008-09-20 07:09:14 +00:00
Michael Hutchinson 53ae02f613 2008-09-19 Michael Hutchinson <[email protected]>
* System.Runtime.Remoting_test.dll.sources: add HttpBugtests.cs.


svn path=/branches/mono-2-0/mcs/; revision=113613
2008-09-20 02:13:42 +00:00
Michael Hutchinson 18b14d2b33 2008-09-19 Michael Hutchinson <[email protected]>
* ActivationTests.cs:
	* HttpCalls.cs: Add a timeout on the client.
	* HttpBugTests.cs: Add tests for some bugzilla bugs. One's not fixed, 
	  so is marked as not working.


svn path=/branches/mono-2-0/mcs/; revision=113612
2008-09-20 02:12:30 +00:00
Michael Hutchinson f56c7b32e9 2008-09-19 Michael Hutchinson <[email protected]>
* HttpServerChannel.cs:
	* HttpClientChannel.cs:
	* HttpChannel.cs: Fixes from corcompare, and some cleanup.


svn path=/branches/mono-2-0/mcs/; revision=113611
2008-09-20 02:07:24 +00:00
Jeffrey Stedfast 65a6ec3240 2008-09-19 Jeffrey Stedfast <[email protected]>
* HttpServerChannelTests.cs: More unit tests for
	HttpServerChannel.


svn path=/branches/mono-2-0/mcs/; revision=113600
2008-09-19 23:29:03 +00:00
Jeffrey Stedfast 373c459bb6 2008-09-19 Jeffrey Stedfast <[email protected]>
* HttpChannel.cs: Throw ArgumentNullException if url is null.


svn path=/branches/mono-2-0/mcs/; revision=113552
2008-09-19 17:20:17 +00:00
Michael Hutchinson 384f8eb073 2008-09-18 Michael Hutchinson <[email protected]>
* HttpServerTransportSink.cs:
	* HttpServerChannel.cs: Cleanup.
	* HttpClientTransportSink.cs: Use username/password/domain parameters, 
	  fix some spelling, add FIXME comment regarding stream copying.
	* HttpClientChannel.cs: 
	* HttpChannel.cs: Fix 1.1 API slip.

svn path=/branches/mono-2-0/mcs/; revision=113489
2008-09-19 02:16:53 +00:00
Michael Hutchinson ecb560796d 2008-09-18 Michael Hutchinson <[email protected]>
* HttpServerChannel.cs: Don't try to resolve IPAddress.Any, so that 
	by default we bind to localhost/lo as well as the host address.
	Also remove dead code for binding to multiple IP addresses; I don't 
	think we need to handle that.


svn path=/branches/mono-2-0/mcs/; revision=113457
2008-09-18 19:49:48 +00:00
Michael Hutchinson b94fed666b 2008-09-18 Michael Hutchinson <[email protected]>
* HttpChannel.cs: Fix default channel name.

svn path=/branches/mono-2-0/mcs/; revision=113453
2008-09-18 18:46:34 +00:00
Michael Hutchinson b54f5a8c31 2008-09-18 Michael Hutchinson <[email protected]>
* HttpClientTransportSink: Fix logic error that broke async client 
	functionality. Fixes HttpAsyncCallTest tests.


svn path=/branches/mono-2-0/mcs/; revision=113434
2008-09-18 16:02:59 +00:00
Dick Porter cde9923d53 2008-09-18 Dick Porter <[email protected]>
* events.c (event_create): Start event handles with a reference
	count of 2, to work around a bug causing banshee to hang at exit.
	Temporary kludge for bug 424851.


svn path=/branches/mono-2-0/mono/; revision=113394
2008-09-18 08:11:08 +00:00
Michael Hutchinson a4dd2eb9ab Enable failing test, to avoid missing it later
svn path=/branches/mono-2-0/mcs/; revision=113369
2008-09-17 23:54:32 +00:00
Michael Hutchinson de053ca593 Updated implementation, uses a copy of our HttpListener core
svn path=/branches/mono-2-0/mcs/; revision=113368
2008-09-17 23:53:23 +00:00
Michael Hutchinson 56afb5aa4f Disable failing tests (to fix later; And add binary tests
svn path=/branches/mono-2-0/mcs/; revision=113367
2008-09-17 23:52:55 +00:00
Michael Hutchinson 448d7c2cd7 Add MonoHttp: a scripted copy of the HttpListener core that works in 1.0 for the channel
svn path=/branches/mono-2-0/mcs/; revision=113366
2008-09-17 23:52:10 +00:00
Michael Hutchinson 96c4a7d4b9 2008-09-17 Michael Hutchinson <michael@>
* SoapServerFormatterSink.cs: Do not try to parse text/xml code
	unless there is a SOAPAction.   

	Set position on outgoing streams to zero, so they can be properly
	parsed in the general infrastructure.

	Do not try to seek on incoming streams.

svn path=/branches/mono-2-0/mcs/; revision=113365
2008-09-17 23:51:17 +00:00
Michael Hutchinson e83ed4dbed 2008-09-17 Michael Hutchinson <[email protected]>
* HttpListenerPrefixCollection.cs:
	* EndPointListener.cs:
	* WebHeaderCollection.cs:
	* HttpConnection.cs: Fixes for EMBEDDED_IN_1_0.


svn path=/branches/mono-2-0/mcs/; revision=113363
2008-09-17 23:36:49 +00:00
Miguel de Icaza e4a117cd9a 2008-09-12 Miguel de Icaza <[email protected]>
* HttpListenerPrefixCollection.cs, EndPointListener.cs,
	HttpListener.cs, EndPointManager.cs, HttpConnection.cs: Remove
	generics support where necessary to allow this code to be reused
	in the 1.0 profile.

svn path=/branches/mono-2-0/mcs/; revision=113360
2008-09-17 22:55:36 +00:00
Andreia Gaita c791106c25 * Mono.Mozilla/AsciiString.cs: Change marshalling to ansi - auto is no
good on windows. Fixes #414146.
  [backport of r113117]

svn path=/branches/mono-2-0/mcs/; revision=113308
2008-09-17 13:43:11 +00:00
Ivan Zlatev 2a97314f8d Revert accidental commit to branch.
svn path=/branches/mono-2-0/mcs/; revision=113063
2008-09-15 17:20:56 +00:00
Ivan Zlatev ed54a1b761 2008-09-15 Ivan N. Zlatev <[email protected]>
* MimeIcon.cs: Add null checks in the GnomeHandler, because it might
	happen that the icons from the theme is missing or the particular size
	unavailable.
	[Fixes bug #424981]

svn path=/branches/mono-2-0/mcs/; revision=113059
2008-09-15 17:06:29 +00:00
Michael Hutchinson 7e1ac93383 Add
svn path=/branches/mono-2-0/mcs/; revision=112918
2008-09-12 22:52:36 +00:00
Michael Hutchinson 2fb9b64e73 Removed
svn path=/branches/mono-2-0/mcs/; revision=112917
2008-09-12 22:51:28 +00:00
Dick Porter 1a28da3faf 2008-07-28 Dick Porter <[email protected]>
* handles.c (_wapi_handle_count_signalled_handles): Remove an
	unmatched _wapi_handle_ref().  Fixes bug 410743.
	(Reinstated.)


svn path=/branches/mono-2-0/mono/; revision=112755
2008-09-11 13:13:39 +00:00
Bill Holmes 167914a79b 2008-09-10 Bill Holmes <[email protected]>
Backport of r112715.

	* process.c (complete_path) : Removing quotes from the 
	  input path.  The glib file routines do not handle file paths
	  that have quotes around them.

	Code is contributed under MIT/X11 license.

svn path=/branches/mono-2-0/mono/; revision=112716
2008-09-10 22:00:26 +00:00
Bill Holmes d33e20924b 2008-09-10 Bill Holmes <[email protected]>
Backport of 112681.

	* Socket.cs : Adding a comment to provide locations where
	  changes to MonoSocketAsyncResult need to be synced.

	* Process.cs : Update the fields of ProcessAsyncReader to
	  match MonoSocketAsyncResult metadata/socket-io.h

	Code is contributed under MIT/X11 license.


svn path=/branches/mono-2-0/mcs/; revision=112683
2008-09-10 15:25:30 +00:00
Bill Holmes beb890595c 2008-09-10 Bill Holmes <[email protected]>
Backport of 112680.

	* socket-io.h : Adding a comment to provide locations where
	  changes to MonoSocketAsyncResult need to be synced.

	Code is contributed under MIT/X11 license.


svn path=/branches/mono-2-0/mono/; revision=112682
2008-09-10 15:23:37 +00:00
Andreia Gaita 13f9cb3434 * Mono.Mozilla/WebBrowser.cs: Update the loaded flag so users can now
if the engine is actually running properly.
* Mono.Mozilla/Base.cs: Create cache directory with a version specific
  name so there's no conflict when the user has both xulrunner
  runtime 1.8 and 1.9 installed. Get rid of gluezillaInstalled flag,
  redundant. Bind now returns bool so I can check if the engine is
  actually running properly after initialization. Check the return
  value of createBrowserWindow and bail out if no valid pointer is
  returned. Protect the string functions with a check so they don't
  get called if the engine is not initialized.

Fixes: segfaults when two xulrunner engines are installed. 
segfaults when engine gets initialized but doesn't load properly afterwards

2008-09-10  Andreia Gaita <[email protected]>

svn path=/branches/mono-2-0/mcs/; revision=112640
2008-09-10 03:52:01 +00:00
Dick Porter 85432ce24a Revert this change on 2.0 for now (see bug 424851)
svn path=/branches/mono-2-0/mono/; revision=112613
2008-09-09 19:45:14 +00:00
Jonathan Pryor b9a946161c * TraceImpl.cs:
- Remove the "lock-free" code, which (come to think of it) would be 
	    faulty in a multithreaded environment anyway because the "other"
	    threads won't wait (block) until initialization is complete...
	  - Add InitOnce() calls to all public properties, so that
	    `Debug.AutoFlush=true' will cause InitOnce() to be loaded, lest
	    a `Debug.AutoFlush=true; Debug.Listeners.Add(...)` sequence cause
	    .AutoFlush=true to be ignored as the InitOnce implied by .Add() 
	    will "overwrite" the .AutoFlush.
	  - Split up TraceListenerCollection creation from DefaultTraceListener 
	    addition, as TraceListenerCollection.Add() calls back into 
	    TraceImpl, so if these aren't separate we get an infinite loop
	    and never actually initialize anything.
	  - Fixes #424370.
	* TraceListenerCollection.cs: Add a TraceListenerCollection(bool)
	  constructor, which provides a way to NOT add the
	  DefaultTraceListener (needed by TraceImpl; see above).

svn path=/branches/mono-2-0/mcs/; revision=112607
2008-09-09 17:17:01 +00:00
Zoltan Varga 3674150432 Merge r112539 from HEAD.
svn path=/branches/mono-2-0/mono/; revision=112540
2008-09-08 19:25:38 +00:00
Ivan Zlatev b7db72d0e5 2008-09-08 Ivan N. Zlatev <[email protected]>
* ErrorProvider.cs: Unbreak my previous commit.

svn path=/branches/mono-2-0/mcs/; revision=112522
2008-09-08 16:59:14 +00:00
Ivan Zlatev 7cd4a28f4a 2008-09-08 Ivan N. Zlatev <[email protected]>
* ErrorProvider.cs: Icon should always be 16x16.
	[Fixes bug #424380]

svn path=/branches/mono-2-0/mcs/; revision=112519
2008-09-08 16:16:42 +00:00
Rodrigo Kumpera 5e858b9c01 In .:
2008-09-08  Rodrigo Kumpera  <[email protected]>

	* InotifyWatcher.cs: Really fix #359181.
	(Ported from trunk)
	

svn path=/branches/mono-2-0/mcs/; revision=112516
2008-09-08 16:02:19 +00:00
Miguel de Icaza 653096d4d3 Revert patch, the tests are not working on non UK timezones
svn path=/branches/mono-2-0/mcs/; revision=112507
2008-09-08 15:10:51 +00:00
Miguel de Icaza 596a9f9abf Backport 112483, fixes #409181
svn path=/branches/mono-2-0/mcs/; revision=112485
2008-09-08 02:05:08 +00:00
Ivan Zlatev 86b66e974e 2008-09-07 Ivan N. Zlatev <[email protected]>
* GridEntry.cs: Invalidate the child items cache when the property
	value changes.

svn path=/branches/mono-2-0/mcs/; revision=112467
2008-09-07 17:04:41 +00:00
Ivan Zlatev a30e7b6859 2008-09-07 Ivan N. Zlatev <[email protected]>
* GridEntry.cs, PropertyGridView.cs:
	   - Update the ReadOnly detection and rendering to finally hopefully
	   match the one of MSFT.
	   - Niceify and move the debug CWLS.
	[Fixes bug #409028]

svn path=/branches/mono-2-0/mcs/; revision=112464
2008-09-07 16:53:39 +00:00
Zoltan Varga b9dd5065b4 2008-09-06 Zoltan Varga <[email protected]>
* mini.h (MONO_AOT_FILE_VERSION): Bump this because of the arm AOT
	changes.

svn path=/branches/mono-2-0/mono/; revision=112439
2008-09-06 17:59:39 +00:00
Zoltan Varga 53ea73491e 2008-09-06 Zoltan Varga <[email protected]>
* pinvoke2.cs: Remove a stray Console.WriteLine.

svn path=/branches/mono-2-0/mono/; revision=112425
2008-09-06 14:13:37 +00:00
Zoltan Varga 676e17ac4b 2008-09-06 Zoltan Varga <[email protected]>
* libtest.c pinvoke2.cs: Add float tests.

svn path=/branches/mono-2-0/mono/; revision=112423
2008-09-06 14:10:17 +00:00
Zoltan Varga 742bd55cc3 2008-09-06 Zoltan Varga <[email protected]>
* mini.c (mono_spill_call): Handle pinvoke+soft float on arm.

svn path=/branches/mono-2-0/mono/; revision=112422
2008-09-06 14:06:47 +00:00
Zoltan Varga 8125642105 2008-09-06 Zoltan Varga <[email protected]>
* aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
	methods to their code to avoid computing the full name of wrappers and
	doing a lookup in a string hash table.

svn path=/branches/mono-2-0/mono/; revision=112412
2008-09-06 03:01:59 +00:00
Atsushi Eno cac4a6fa87 backport r112408.
svn path=/branches/mono-2-0/mcs/; revision=112409
2008-09-05 23:57:44 +00:00
Zoltan Varga 808a676350 2008-09-06 Zoltan Varga <[email protected]>
* reflection.c (_mono_reflection_get_type_from_info): Revert the last change
	(r111766) as it is not needed after the no-exec changes.

svn path=/branches/mono-2-0/mono/; revision=112404
2008-09-05 22:05:45 +00:00
Ivan Zlatev 73e67e1db3 2008-09-04 Ivan N. Zlatev <[email protected]>
* GridEntry.cs, CategoryGridEntry.cs, RootGridEntry.cs, PropertyGrid.cs,
	PropertyGridView.sc: Implement lazy/delayed propertygrid population
	on item expansion. Improves performance and fixes bug #417955.
	[Fixes bug #417955]

svn path=/branches/mono-2-0/mcs/; revision=112370
2008-09-05 12:01:31 +00:00
Zoltan Varga 0bef4ef894 2008-09-05 Zoltan Varga <[email protected]>
* tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
	(mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
	(mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
	'buf'.

	* aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
	jumped to the same entry in plt_jump_table.

svn path=/branches/mono-2-0/mono/; revision=112337
2008-09-04 23:47:03 +00:00
Marek Safar 493446ce04 2008-09-04 Marek Safar <[email protected]>
A fix for bug #422853
	* delegate.cs (DelegateCreation): Add special handling for
	EmptyExpression.Null instance expression which is just another
	hack for undecided member instance exression.


svn path=/branches/mono-2-0/mcs/; revision=112272
2008-09-04 12:34:42 +00:00
Rodrigo Kumpera 9efbf70813 In .:
2008-09-03 Rodrigo Kumpera  <[email protected]>+ 
 	* verify.c (verify_type_compatibility_full): Revert change
 	to allow converting a native int to unmanaged pointer be verifiable
 	under non-strict mode.
 	It turns out that "(IntPtr)null" is indeed unverifiable, go figure.
 
 	* verify.c: Added some TODOs.
	(Ported from trunk)


svn path=/branches/mono-2-0/mono/; revision=112216
2008-09-03 22:05:48 +00:00
Marek Safar 4994a0b289 2008-09-03 Marek Safar <[email protected]>
A fix for bug #422507
	* expression.cs (UnboxCast): Add missing child expression mutator.


svn path=/branches/mono-2-0/mcs/; revision=112185
2008-09-03 15:25:39 +00:00
Ivan Zlatev cb9600b9b9 2008-09-03 Ivan N. Zlatev <[email protected]>
* ButtonBase.cs CheckBox.cs, Control.cs, FlowLayoutPanel.cs,
	  FlowLayoutSettings.cs, GroupBox.cs, Label.cs, ListBox.cs,
	  PropertyGrid.cs, RadioButton.cs, TableLayoutPanel.cs,
	  TableLayoutSettings.cs, ToolStrip.cs, ToolStripDropDownButton.cs,
	  ToolStripDropDownMenu.cs, ToolStripItem.cs, ToolStripSplitButton.cs,
	  ToolStripStatusLabel.cs: Add missing PerformLayout calls to various
	  properties.
	  [Fixes bug #418684]

svn path=/branches/mono-2-0/mcs/; revision=112175
2008-09-03 12:35:10 +00:00
Marek Safar 34c7e44150 2008-09-03 Marek Safar <[email protected]>
A fix for bug #422507
	* expression.cs (StringConcat): Add missing type mutator.


svn path=/branches/mono-2-0/mcs/; revision=112171
2008-09-03 11:59:33 +00:00
Bill Holmes 4cd4569ec6 2008-09-02 Bill Holmes <[email protected]>
Backport of r112125

	* marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi,
	  ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni) :
	  Changed to use GlobalAlloc for the memory returned on Windows platforms.

	Code is contributed under MIT/X11 license.

svn path=/branches/mono-2-0/mono/; revision=112128
2008-09-02 21:43:21 +00:00
Jonathan Pobst 93b9e20e3c 2008-09-02 Jonathan Pobst <[email protected]>
* XplatUIWin32.cs: Ensure we never send the WS_EX_MDICHILD flag
	to Windows when creating a window, as we fake MDI stuffs.
	[Fixes bug #421858]

svn path=/branches/mono-2-0/mcs/; revision=112096
2008-09-02 16:00:34 +00:00
Rodrigo Kumpera 28021d9e5c In .:
2008-09-02  Rodrigo Kumpera  <[email protected]>

	* method-to-ir.c (initialize_array_data): Handle field with RVA from
	dynamic images.
	(Ported from trunk)


svn path=/branches/mono-2-0/mono/; revision=112078
2008-09-02 11:50:22 +00:00
Rodrigo Kumpera d04c85fc8e In .:
2008-09-02 Rodrigo Kumpera  <[email protected]>

	* reflection.c (typebuilder_setup_fields): Handle classes with
	explicit size.
	(Ported from trunk)


svn path=/branches/mono-2-0/mono/; revision=112077
2008-09-02 11:49:03 +00:00
Rodrigo Kumpera beebac4e2e In Test/System.ComponentModel:
2008-09-02  Rodrigo Kumpera  <[email protected]>
	[Backport to 2.0]
	* PropertyDescriptorTest.cs: Tests for Get/Set Value of partial
	overrides of virtual properties.

In System.ComponentModel:
2008-09-02  Rodrigo Kumpera  <[email protected]>
	[Backport to 2.0]
	* ReflectionPropertyDescriptor.cs (SetValue, GetValue) : Lookup
	the MethodInfo for accessors in parent types in case of partial
	overrides of virtual properties.


svn path=/branches/mono-2-0/mcs/; revision=112074
2008-09-02 11:39:01 +00:00
Marek Safar 018c430733 Updated
svn path=/branches/mono-2-0/mcs/; revision=112046
2008-09-01 16:45:30 +00:00
Ivan Zlatev 723a933e9c 2008-09-01 Ivan N. Zlatev <[email protected]>
* TextBox.cs: Invalidate after UseSystemPasswordChar, so that the
	change takes effect.
	[Fixes bug #417957]

svn path=/branches/mono-2-0/mcs/; revision=112042
2008-09-01 16:06:39 +00:00
Jb Evain 8cec72a31f backport r112039
svn path=/branches/mono-2-0/mcs/; revision=112040
2008-09-01 15:22:28 +00:00
Jb Evain ed3a8e8e12 backport 112034
svn path=/branches/mono-2-0/mcs/; revision=112035
2008-09-01 14:23:35 +00:00
Jb Evain 0eee593d3a backport r112032
svn path=/branches/mono-2-0/mcs/; revision=112033
2008-09-01 14:21:02 +00:00
Ivan Zlatev a0b8967951 2008-09-01 Ivan N. Zlatev <[email protected]>
* SettingsPropertyValue.cs: Explicitly use the Invariant culture
	instead of the current.
	[Fixes bug #374516]

svn path=/branches/mono-2-0/mcs/; revision=112028
2008-09-01 13:55:35 +00:00
Ivan Zlatev 4b5cb5b7ec 2008-09-01 Ivan N. Zlatev <[email protected]>
* ParentControlDesigner.cs: Be nice with Components that are no
	Controls in CreateToolCore.

svn path=/branches/mono-2-0/mcs/; revision=112024
2008-09-01 13:32:16 +00:00
Dick Porter 7c9abd6ea4 2008-09-01 Dick Porter <[email protected]>
* InotifyWatcher.cs: Revert fix for bug 322330, as it is somehow
	breaking other stuff.
	(Ported from trunk)



svn path=/branches/mono-2-0/mcs/; revision=112021
2008-09-01 13:28:24 +00:00
Ivan Zlatev 4b791f4ebf 2008-08-24 Ivan N. Zlatev <[email protected]>
* XplatUIX11.cs: Provide MouseButtons/State information to the XPlatUI.
        [Fixes bug #419001]

svn path=/branches/mono-2-0/mcs/; revision=112016
2008-09-01 12:16:42 +00:00
Marek Safar e61f5a6c0b 2008-09-01 Marek Safar <[email protected]>
A fix for bug #421736
	* iterators.cs: Don't crash on unreachable iterators.


svn path=/branches/mono-2-0/mcs/; revision=112014
2008-09-01 11:42:10 +00:00
Marek Safar 4576f262ca 2008-09-01 Marek Safar <[email protected]>
A fix for bug #421628
	* parameter.cs, attribute.cs: Clone also parameter attributes.


svn path=/branches/mono-2-0/mcs/; revision=112009
2008-09-01 10:23:54 +00:00
Marek Habersack 44f49f7e6d Backport of r112005
svn path=/branches/mono-2-0/mcs/; revision=112006
2008-09-01 02:30:50 +00:00
Marek Habersack 06de999787 Backport of r112003 + some forgotten ChangeLog entries
svn path=/branches/mono-2-0/mcs/; revision=112004
2008-09-01 01:33:52 +00:00
Marek Habersack e95d116ee3 Backport of r112000
svn path=/branches/mono-2-0/mcs/; revision=112001
2008-09-01 00:18:10 +00:00
Marek Habersack 24ff4f1c36 Backport of r111998
svn path=/branches/mono-2-0/mcs/; revision=111999
2008-08-31 23:31:09 +00:00
Zoltan Varga 8ecd99c009 Merge r111994 from HEAD.
svn path=/branches/mono-2-0/mcs/; revision=111996
2008-08-31 20:12:44 +00:00
Marek Habersack 667266be44 Backport of r111990
svn path=/branches/mono-2-0/mcs/; revision=111991
2008-08-31 17:05:47 +00:00
Zoltan Varga 71b2fac370 Revert last change as it breaks the build.
svn path=/branches/mono-2-0/mono/; revision=111986
2008-08-31 09:19:24 +00:00
Marek Habersack 94782a9675 Backport of r111983
svn path=/branches/mono-2-0/mcs/; revision=111984
2008-08-31 02:06:33 +00:00
Zoltan Varga 58f0695e8b 2008-08-31 Zoltan Varga <[email protected]>
* class.c (mono_class_is_assignable_from): Call mono_class_setup_vtable ()
	before accessing klass->interface_bitmap. Fixes #421744.

svn path=/branches/mono-2-0/mono/; revision=111981
2008-08-30 23:24:16 +00:00
Marek Habersack a0cd75d310 Backport of r111956
svn path=/branches/mono-2-0/mcs/; revision=111957
2008-08-29 22:38:14 +00:00
Marek Habersack 5a6bb10f5c Backport of r111939
svn path=/branches/mono-2-0/mcs/; revision=111940
2008-08-29 19:43:16 +00:00
Geoff Norton cc104efec3 2008-08-29 Geoff Norton <[email protected]>
* aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
        segment, and doesn't properly handle .space as .text.  Fixes
        AOT Mach/ARM

svn path=/branches/mono-2-0/mono/; revision=111931
2008-08-29 17:56:59 +00:00
Geoff Norton f40f665d9b 2008-08-29 Geoff Norton <[email protected]>
* mini.c: Disable the mach exception handler when running on
        ARM

svn path=/branches/mono-2-0/mono/; revision=111928
2008-08-29 15:32:34 +00:00
Geoff Norton 8e2e6c1909 2008-08-29 Geoff Norton <[email protected]>
* aot-compiler.c: Patch from Renaldas Zioma to properly register
        globals on Darwin/ARM

svn path=/branches/mono-2-0/mono/; revision=111923
2008-08-29 14:27:23 +00:00
Marek Habersack 8980b35c17 Backport of r111916
svn path=/branches/mono-2-0/mcs/; revision=111917
2008-08-29 13:08:12 +00:00
Dick Porter 8325c4c78e 2008-07-28 Dick Porter <[email protected]>
* Process.cs: When passing handle references around, it needs to
	be duplicated and freed so the OS doesn't close it.  Makes the
	testcase in 410743 work again now the underlying bug has been
	fixed.
	(Ported from trunk.)



svn path=/branches/mono-2-0/mcs/; revision=111900
2008-08-29 09:26:58 +00:00
Dick Porter e186bdfb4b 2008-08-29 Dick Porter <[email protected]>
* icall-def.h
	* process.c
	(ves_icall_System_Diagnostics_Process_ProcessHandle_duplicate):
	New internal calls to duplicate and close a process handle.
	(Ported from trunk)



svn path=/branches/mono-2-0/mono/; revision=111899
2008-08-29 09:25:17 +00:00
Bill Holmes 208de0f8ac 2008-08-28 Bill Holmes <[email protected]>
Backport of r111875

	* src/glib.h : Adding a c++ definition for G_BEGIN_DECLS.

	Contributed under MIT/X11 license.

svn path=/branches/mono-2-0/mono/; revision=111876
2008-08-28 20:55:01 +00:00
Geoff Norton 1eaf76f83a 2008-08-28 Geoff Norton <[email protected]>
* build-iphone.sh: iPhone lies about HAVE_MMAP as well.

svn path=/branches/mono-2-0/mono/; revision=111871
2008-08-28 20:40:57 +00:00
Geoff Norton 84ad52dda7 2008-08-28 Geoff Norton <[email protected]>
* darwin_stop_world.c:
        * include/private/gcconfig.h: Add support for Darwin/ARM

svn path=/branches/mono-2-0/mono/; revision=111870
2008-08-28 20:40:52 +00:00
Zoltan Varga 3afcd622ea Merge r111867 from HEAD.
svn path=/branches/mono-2-0/mono/; revision=111868
2008-08-28 20:24:00 +00:00
Zoltan Varga ecf4d5fec4 Merge r111865 from HEAD.
svn path=/branches/mono-2-0/mono/; revision=111866
2008-08-28 20:19:11 +00:00
Zoltan Varga 191a0b7c13 Merge r111861 from HEAD.
svn path=/branches/mono-2-0/mono/; revision=111862
2008-08-28 19:40:46 +00:00
Zoltan Varga b428cee93f Merge r111859 from HEAD.
svn path=/branches/mono-2-0/mono/; revision=111860
2008-08-28 19:37:29 +00:00
Miguel de Icaza 75d83b4784 Add here as well
svn path=/branches/mono-2-0/mcs/; revision=111852
2008-08-28 17:54:30 +00:00
Miguel de Icaza 33a4ce27ab Backport console fixes to 2.0
svn path=/branches/mono-2-0/mcs/; revision=111850
2008-08-28 17:46:03 +00:00
Miguel de Icaza b7fbf894c5 Backport console fixes to 2.0
svn path=/branches/mono-2-0/mono/; revision=111849
2008-08-28 17:45:52 +00:00
Zoltan Varga 733791ff24 Merge the wapi handle leak fix from HEAD.
svn path=/branches/mono-2-0/mono/; revision=111810
2008-08-28 13:54:41 +00:00
Zoltan Varga 462f7da2b9 Merge r111807 from HEAD.
svn path=/branches/mono-2-0/mono/; revision=111808
2008-08-28 13:53:01 +00:00
Marek Safar 9b58fb9ab7 2008-08-28 Marek Safar <[email protected]>
A fix for bug #420832
	* anonymous.cs, iterators.cs: Also clone hoisted this iterator variable.


svn path=/branches/mono-2-0/mcs/; revision=111804
2008-08-28 13:33:01 +00:00
Marek Habersack 1c8879f557 Backport of r111801
svn path=/branches/mono-2-0/mcs/; revision=111802
2008-08-28 13:13:53 +00:00
Marek Safar 17da99ccab 2008-08-28 Marek Safar <[email protected]>
A fix for bug #420386
	* nullables.cs: Fixed logic of nullable user comparison operators involving
	null values.


svn path=/branches/mono-2-0/mcs/; revision=111798
2008-08-28 11:07:12 +00:00
Marek Safar c64179faa5 2008-08-28 Marek Safar <[email protected]>
* attribute (IsClsCompliant): Use FALSE value for pointer types.


svn path=/branches/mono-2-0/mcs/; revision=111795
2008-08-28 10:10:25 +00:00
Zoltan Varga 6d32218cb8 Merge r111774 from HEAD.
svn path=/branches/mono-2-0/mono/; revision=111775
2008-08-28 01:40:18 +00:00
Marek Habersack 6262c11cfc Backport of r111772
svn path=/branches/mono-2-0/mcs/; revision=111773
2008-08-28 01:36:08 +00:00
Zoltan Varga 412d92d596 Merge r111770 from HEAD.
svn path=/branches/mono-2-0/mono/; revision=111771
2008-08-28 01:35:46 +00:00
Zoltan Varga bfcdea1305 Merge r111765 from HEAD.
svn path=/branches/mono-2-0/mono/; revision=111768
2008-08-28 01:23:01 +00:00
Zoltan Varga ab453faffe Merge r111766 from HEAD.
svn path=/branches/mono-2-0/mono/; revision=111767
2008-08-28 01:19:21 +00:00
Zoltan Varga 62bf373fea Merge r111759 from HEAD.
svn path=/branches/mono-2-0/mono/; revision=111760
2008-08-28 00:04:52 +00:00
Zoltan Varga 4136d5da76 Merge r111748-r111752 from HEAD.
svn path=/branches/mono-2-0/mono/; revision=111758
2008-08-27 23:42:34 +00:00
Zoltan Varga 9c81677a33 Merge r111755 from HEAD.
svn path=/branches/mono-2-0/mcs/; revision=111757
2008-08-27 23:38:56 +00:00
Zoltan Varga fc363fc7a6 Merge r111754 from HEAD.
svn path=/branches/mono-2-0/mcs/; revision=111756
2008-08-27 23:36:22 +00:00
Bill Holmes c221d6c0e8 2008-08-27 Bill Holmes <[email protected]>
Backport of r111724.

	* mini-amd64.h : Fix a compiler warning.

	* exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
	  Changed to use a callback function to retrieve the unwind info.
	  This avoids problems observed when code blocks were removed by
	  unloading an app domain.

	* mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
	  and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
	  to work properly.

	Contributed under MIT/X11 license.

svn path=/branches/mono-2-0/mono/; revision=111729
2008-08-27 18:18:35 +00:00
Bill Holmes 47932d265a 2008-08-27 Bill Holmes <[email protected]>
Backport of r111722.

	* mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
	  case to keep the stack aligned to 8.

	Contributed under MIT/X11 license.

svn path=/branches/mono-2-0/mono/; revision=111728
2008-08-27 18:15:59 +00:00
Zoltan Varga e2c37e98bf Merge r111681 from HEAD.
svn path=/branches/mono-2-0/mono/; revision=111682
2008-08-27 03:30:26 +00:00
Veerapuram Varadhan 6eedd08ed8 Do not call GetSchemaTable() from the constructor, instead fetch column
information.


svn path=/branches/mono-2-0/mcs/; revision=111651
2008-08-26 19:42:05 +00:00
Veerapuram Varadhan 060406f25e Handle binary type along with VarBinary and Image
svn path=/branches/mono-2-0/mcs/; revision=111645
2008-08-26 19:23:11 +00:00
Veerapuram Varadhan dc60cf7ea6 Test case for testing binary type
svn path=/branches/mono-2-0/mcs/; revision=111644
2008-08-26 19:21:49 +00:00
Zoltan Varga 24575d5e57 Merge r111641 from HEAD.
svn path=/branches/mono-2-0/mono/; revision=111642
2008-08-26 19:12:21 +00:00
Zoltan Varga 6f6a2135b5 Merge r111637 from HEAD.
svn path=/branches/mono-2-0/mcs/; revision=111639
2008-08-26 18:47:41 +00:00
Geoff Norton 06c53dfc80 Whoops
svn path=/branches/mono-2-0/mono/; revision=111638
2008-08-26 18:44:28 +00:00
Geoff Norton fdcba04ccc 2008-08-26 Geoff Norton <[email protected]>
* build-iphone.sh: Update build-iphone to not wget old inssel's, and build
        out of the box with teh current SDK.

svn path=/branches/mono-2-0/mono/; revision=111636
2008-08-26 18:19:35 +00:00
Jonathan Pobst 2ce934fbac 2008-08-26 Jonathan Pobst <[email protected]>
* ErrorProvider.cs: Fix a regression NRE when setting properties
	for a control before it has a parent.
	[Fixes bug #420305]

svn path=/branches/mono-2-0/mcs/; revision=111627
2008-08-26 16:35:35 +00:00
Jonathan Pobst 4b6092b945 2008-08-19 Jonathan Pobst <[email protected]>
* LinkLabel.cs: Always clear any previous links when LinkArea
	is set.  [Fixes bug #410709]

svn path=/branches/mono-2-0/mcs/; revision=111617
2008-08-26 14:25:38 +00:00
Veerapuram Varadhan c35c98a888 Backported from trunk - test case for bug#377146
svn path=/branches/mono-2-0/mcs/; revision=111613
2008-08-26 13:28:24 +00:00
Veerapuram Varadhan 1d05f4019d Backported from trunk - on demand generation of schemaTable and related
memory fixes


svn path=/branches/mono-2-0/mcs/; revision=111610
2008-08-26 13:17:08 +00:00
Veerapuram Varadhan 2c90f8215b Fix for 377146 - let the reference type's ReadXml do the reading, if it
implements IXmlSerializable


svn path=/branches/mono-2-0/mcs/; revision=111597
2008-08-26 10:18:25 +00:00
Scott Thomas 741b3708a6 Fixed bug 417833 which allowed for the creation of illegal
BitVector32.Sections. Also added a unit test for the bug.


svn path=/branches/mono-2-0/mcs/; revision=111592
2008-08-26 02:26:24 +00:00
Marek Habersack 88d78a139c Backport of r111589
svn path=/branches/mono-2-0/mcs/; revision=111590
2008-08-26 00:58:43 +00:00
Marek Habersack 9ecf430d4a Backport of r111587
svn path=/branches/mono-2-0/mcs/; revision=111588
2008-08-26 00:14:32 +00:00
Zoltan Varga 66fa2508f9 Merge r111576 from HEAD.
svn path=/branches/mono-2-0/mono/; revision=111578
2008-08-25 21:33:52 +00:00
Marek Habersack a7d6f5e17f Backport of r111572
svn path=/branches/mono-2-0/mcs/; revision=111573
2008-08-25 20:39:49 +00:00
Zoltan Varga 6b8412c1d3 2008-08-25 Zoltan Varga <[email protected]>
* aot-compiler.c (add_method): Avoid adding a method twice.
	(add_wrappers): Add runtime invoke wrappers for all methods.

svn path=/branches/mono-2-0/mono/; revision=111541
2008-08-25 17:46:47 +00:00
Zoltan Varga 2641cfa52a 2008-08-25 Zoltan Varga <[email protected]>
* mini.c (mono_method_to_ir): Handle the !aot case in CEE_MONO_ICALL_ADDR.

svn path=/branches/mono-2-0/mono/; revision=111537
2008-08-25 15:06:35 +00:00
Atsushi Eno 4a05d3d046 backport r111535.
svn path=/branches/mono-2-0/mcs/; revision=111536
2008-08-25 14:58:12 +00:00
Marek Habersack dda14a7141 Backport of r111526
svn path=/branches/mono-2-0/mcs/; revision=111527
2008-08-25 10:48:41 +00:00
Zoltan Varga 9dbe7163c6 Merge r111497 from HEAD.
svn path=/branches/mono-2-0/mono/; revision=111498
2008-08-24 12:34:50 +00:00
Zoltan Varga 4da72ac87d Merge rr111495 from HEAD.
svn path=/branches/mono-2-0/mono/; revision=111496
2008-08-24 12:08:12 +00:00
Marek Habersack 965210d362 Backport of r111421
svn path=/branches/mono-2-0/mcs/; revision=111422
2008-08-22 20:52:01 +00:00
Zoltan Varga a2831a6759 Merge r111361 from HEAD.
svn path=/branches/mono-2-0/mono/; revision=111362
2008-08-22 11:56:05 +00:00
Atsushi Eno ce7703f9ef backport r111349 and r111350.
svn path=/branches/mono-2-0/mcs/; revision=111351
2008-08-22 08:56:07 +00:00
Massimiliano Mantione e611b35bc9 * mono.1: Updated description of the logging profiler from trunk.
svn path=/branches/mono-2-0/mono/; revision=111345
2008-08-22 07:28:00 +00:00
Massimiliano Mantione 6ae3bec0b6 * mono-profiler-logging.c: Backported fixes from trunk (making it
identical to r111250):
        - r111250 (correct accounting of allocations happening at JIT time).
        - r111096 (emit directives blocks).
        - r111095 (stack tracking).
        - r109120 (fix bug 412473).
        - r109069 (fix allocation summaries).
        - r108633 (emit full type names for loaded classes, by Rodrigo Kumpera).
        - r108632 (use the "runtime initialized" hook to register the thread).


svn path=/branches/mono-2-0/mono/; revision=111344
2008-08-22 07:26:58 +00:00
Bill Holmes e7a8f19764 2008-08-20 Bill Holmes <[email protected]>
Backport of r111197

	* exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
	  of nonvolatile registers back from MonoContext to CONTEXT.

	Contributed under MIT/X11 license.

svn path=/branches/mono-2-0/mono/; revision=111209
2008-08-20 22:26:00 +00:00
Bill Holmes e7c42af958 2008-08-20 Bill Holmes <[email protected]>
Backport of r111194

	* mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
	  arguments on Winx64 there are only 4 argument registers.  For this
	  logic to work the last argument must be pulled from the stack.  

	Contributed under MIT/X11 license.

svn path=/branches/mono-2-0/mono/; revision=111206
2008-08-20 22:23:59 +00:00
Marek Habersack a0d26a1ecc Backport of r111122
svn path=/branches/mono-2-0/mcs/; revision=111123
2008-08-20 14:07:20 +00:00
Marek Habersack 23848fcfc6 Optimization of the bug #418620 fix, by Juraj Skripsky <[email protected]>, thanks!
svn path=/branches/mono-2-0/mcs/; revision=111108
2008-08-20 12:46:53 +00:00
Marek Habersack 8744beb65c Backport of r111103
svn path=/branches/mono-2-0/mcs/; revision=111104
2008-08-20 11:51:29 +00:00
Zoltan Varga 9b07470957 Merge r111051 from HEAD.
svn path=/branches/mono-2-0/mono/; revision=111053
2008-08-20 01:42:54 +00:00
Marek Habersack 7ee3c559e3 Backport of r111024
svn path=/branches/mono-2-0/mcs/; revision=111025
2008-08-19 22:26:05 +00:00
Marek Habersack dc5b0de65a Backport of r110984
svn path=/branches/mono-2-0/mcs/; revision=110985
2008-08-19 19:47:56 +00:00
Zoltan Varga d5a9aafee6 2008-08-19 Zoltan Varga <[email protected]>
* mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
	Fixes #418381.

svn path=/branches/mono-2-0/mono/; revision=110976
2008-08-19 18:55:43 +00:00
Marek Habersack e4ab1fe02c Backport of r110941
svn path=/branches/mono-2-0/mcs/; revision=110942
2008-08-19 12:54:35 +00:00
Marek Habersack ad05561854 Backport of r110932
svn path=/branches/mono-2-0/mcs/; revision=110933
2008-08-19 10:34:56 +00:00
Atsushi Eno be268ce1fa backport r110924.
svn path=/branches/mono-2-0/mcs/; revision=110925
2008-08-19 07:51:38 +00:00
Andreia Gaita 3c4a0853ca Revert r110884, these changes are not for the branch :P
svn path=/branches/mono-2-0/mcs/; revision=110893
2008-08-19 00:23:55 +00:00
Andreia Gaita 0c1e02a5fd * Assembly/AssemblyInfo.cs, ChangeLog,
Mono.WebBrowser/DOM/IAttribute.cs,
  Mono.WebBrowser/DOM/IElementCollection.cs,
  Mono.WebBrowser/DOM/IWindow.cs, Mono.WebBrowser/DOM/IDocument.cs,
  Mono.WebBrowser/DOM/IAttributeCollection.cs,
  Mono.WebBrowser/DOM/INodeList.cs,
  Mono.WebBrowser/DOM/IWindowCollection.cs,
  Mono.WebBrowser/DOM/INode.cs, Mono.WebBrowser/DOM/IElement.cs,
  Mono.WebBrowser/DOM/INavigation.cs,
  Mono.WebBrowser/DOM/IHistory.cs, Mono.WebBrowser/Exception.cs,
  Mono.WebBrowser/IWebBrowser.cs, Mono.Mozilla/DOM/Document.cs,
  Mono.Mozilla/DOM/HTMLElement.cs,
  Mono.Mozilla/DOM/AttributeCollection.cs,
  Mono.Mozilla/DOM/DocumentType.cs, Mono.Mozilla/DOM/NodeList.cs,
  Mono.Mozilla/DOM/WindowCollection.cs, Mono.Mozilla/DOM/Node.cs,
  Mono.Mozilla/DOM/NamedNodeMap.cs, Mono.Mozilla/DOM/Element.cs,
  Mono.Mozilla/DOM/HTMLElementCollection.cs,
  Mono.Mozilla/DOM/Navigation.cs, Mono.Mozilla/DOM/History.cs,
  Mono.Mozilla/DOM/Attribute.cs, Mono.Mozilla/DOM/DOMObject.cs,
  Mono.Mozilla/DOM/Window.cs, Mono.Mozilla/Callback.cs,
  Mono.Mozilla/AsciiString.cs, Mono.Mozilla/WebBrowser.cs,
  Mono.Mozilla/UniString.cs, Mono.Mozilla/Base.cs: Fix inconsistent
  newlines. Add eol-style property

svn path=/branches/mono-2-0/mcs/; revision=110884
2008-08-18 23:58:04 +00:00
Marek Habersack 0436f3c228 Backport of r110844
svn path=/branches/mono-2-0/mcs/; revision=110845
2008-08-18 19:49:29 +00:00
Marek Habersack 8eecfbc54b Backport of r110734
svn path=/branches/mono-2-0/mcs/; revision=110735
2008-08-18 14:28:01 +00:00
Marek Habersack a2470d9b12 Backport of r110722
svn path=/branches/mono-2-0/mcs/; revision=110723
2008-08-18 10:21:59 +00:00
Zoltan Varga 9abbb9bfa3 Merge r110653 from HEAD.
svn path=/branches/mono-2-0/mono/; revision=110654
2008-08-16 15:04:13 +00:00
Ivan Zlatev 50c4040639 2008-08-16 Ivan N. Zlatev <[email protected]>
* GridEntry.cs: Leave the ICustomTypeDescriptor handling up to the
	ComponentModel layer, which will properly prioritize the attributes.
	Avoids wrong prioritization of duplicate attributes when retrieving
	the converter and editor.
	[Fixes bug #417729]

svn path=/branches/mono-2-0/mcs/; revision=110644
2008-08-16 11:19:21 +00:00
Ivan Zlatev 438bc0e3aa 2008-08-15 Ivan N. Zlatev <[email protected]>
* GridEntry.cs: Perform stricter check for the ParentEntry's
	PropertyDescriptor/PropertyOwner for the ICustomTypeDescriptor
	implementation.
	[Fixes bug #417567]

svn path=/branches/mono-2-0/mcs/; revision=110565
2008-08-15 12:38:51 +00:00
Zoltan Varga ed6dfed6f5 2008-08-14 Zoltan Varga <[email protected]>
* mini.c (mini_method_compile): Abort aot compilation for generic
	methods if generic sharing is disabled.
	
	* mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
	an mrgctx.

svn path=/branches/mono-2-0/mono/; revision=110524
2008-08-14 19:44:17 +00:00
Marek Habersack 9ddad195c6 Backport of r110516
svn path=/branches/mono-2-0/mcs/; revision=110517
2008-08-14 18:42:29 +00:00
Geoff Norton 29444d0002 2008-08-14 Geoff Norton <[email protected]>
* XplatUICarbon.cs: Track the ActiveWindow internally for GetActive().
        Don't prematurely display POPUP windows.  Fully fixed #393317.

svn path=/branches/mono-2-0/mcs/; revision=110513
2008-08-14 18:29:37 +00:00
Geoff Norton 079933816f 2008-08-14 Geoff Norton <[email protected]>
* WindowHandler.cs: Revert the change which didn't set ActiveWindow
        here and fix the problem in the driver.  Fully fixes #393317.

svn path=/branches/mono-2-0/mcs/; revision=110512
2008-08-14 18:29:33 +00:00
Marek Safar 950d95d519 2008-08-14 Marek Safar <[email protected]>
A fix for bug #417078
	* expression.cs: Emit correctly left side pointer operators.


svn path=/branches/mono-2-0/mcs/; revision=110469
2008-08-14 11:03:14 +00:00
Marek Habersack 2e21360c50 Backport of r110441
svn path=/branches/mono-2-0/mcs/; revision=110442
2008-08-14 00:36:14 +00:00
Marek Habersack 8943e7e0d6 Backport of r110403
svn path=/branches/mono-2-0/mcs/; revision=110404
2008-08-13 20:39:34 +00:00
Marek Habersack cc3db58df7 Backport of r110389
svn path=/branches/mono-2-0/mcs/; revision=110390
2008-08-13 18:17:30 +00:00
Marek Habersack 7e1e70827a Backport of r110385
svn path=/branches/mono-2-0/mcs/; revision=110386
2008-08-13 17:51:09 +00:00
Bill Holmes 466e31790f 2008-08-13 Bill Holmes <[email protected]>
* winconfig.h:  Updating the config file for MSVC builds to match
 	  the config file used when compiling with gcc in Cygwin.

	* eglib.vcproj, genmdesc.vcproj, libgc.vcproj, libmono.vcproj, libtest.vcproj,
	  mono.vcproj, monoburg.vcproj, monodiet.vcproj, monodis.vcproj, monograph.vcproj,
	  pedump.vcproj, test_eglib.vcproj, teste.vcproj, test-invoke.vcproj,
	  test-metadata.vcproj:  Updating the preprocessor definitions for MSVC builds to
	  match the gcc build in Cygwin.

	* mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
	  from default optimizaton list on Winx64.

	* mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.

	* mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
	  the LMF from the MonoJitTlsData structure.

	* mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.

	Contributed under MIT/X11 license.

svn path=/branches/mono-2-0/mono/; revision=110378
2008-08-13 16:41:20 +00:00
Zoltan Varga 5405ae9046 2008-08-12 Zoltan Varga <[email protected]>
* driver.c (main_thread_handler): Allow AOT compilation of multiple 
	assemblies in one run.

	* aot-compiler.c (mono_compile_assembly): Only print out a count of
	skipped methods if it is not 0.

svn path=/branches/mono-2-0/mono/; revision=110308
2008-08-12 21:48:51 +00:00
Zoltan Varga d7b1a66b94 Merge r110288 from HEAD.
svn path=/branches/mono-2-0/mcs/; revision=110291
2008-08-12 19:46:06 +00:00
Geoff Norton 7b06e01c8f 2008-08-12 Geoff Norton <[email protected]>
* pthread_support.c: GCC shipped with SLES9 ppc gets confused with our current
        GC_setspecific define.  Unfold the define into a static inline on all platforms
        except ppc where it is a static leaf function.

svn path=/branches/mono-2-0/mono/; revision=110287
2008-08-12 19:33:24 +00:00
Zoltan Varga efb68a566b Really fix the build.
svn path=/branches/mono-2-0/mono/; revision=110286
2008-08-12 19:30:16 +00:00
Miguel de Icaza 1ea3cc4cf0 Fix the build
svn path=/branches/mono-2-0/mono/; revision=110267
2008-08-12 17:22:20 +00:00
Carlos Alberto Cortez 2387e7270d * XplatUIX11.cs: Handle the obscured regions while scrolling using
GraphicsExpose event, processing it just after we copy the scrolled
	area. This ensures that the next calls to ScrollWindow will copy
	regions already updated, and the scrolling will be smooth. Also remove
	the code that was trying to detect the obscured regions, since we are
	not using it anymore (too slow).

2008-08-12  Carlos Alberto Cortez <[email protected]>


svn path=/branches/mono-2-0/mcs/; revision=110252
2008-08-12 15:53:00 +00:00
Carlos Alberto Cortez dd49afdaf1 * ListBox.cs: Fix the -temporary- broken selection in ListBox for
MultiExtended mode, by separating some logic between the ctrl/shift
	handling. Also ignore any MouseMove events generated together with
	MouseDown events - we are only interested in the real motion event.
	Fixes part of #414963.

2008-08-12  Carlos Alberto Cortez <[email protected]>


svn path=/branches/mono-2-0/mcs/; revision=110250
2008-08-12 15:33:42 +00:00
Carlos Alberto Cortez 59b3a649d5 2008-08-12 Carlos Alberto Cortez <[email protected]>
* XplatUIX11.cs: When getting EnterNotify with mode other than
	NotifyNormal (pseudo motion events), ignore them as we used to do
	before, since it's breaking our selection code and some drag and drop
	operations, because of the confusion of generating extra events (not
	fired by .net, btw).


svn path=/branches/mono-2-0/mcs/; revision=110246
2008-08-12 15:19:07 +00:00
Zoltan Varga c5fd486b84 2008-08-12 Zoltan Varga <[email protected]>
* mini-amd64.c (emit_call_body): Use image->aot_module instead of 
	assembly->aot_module.

	* aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
	hash table. This simplifies and speeds up a lot of code, and fixes support
	for .netmodules.

svn path=/branches/mono-2-0/mono/; revision=110237
2008-08-12 14:15:45 +00:00
Zoltan Varga 637aa4c949 Merge r110233 from HEAD.
svn path=/branches/mono-2-0/mono/; revision=110234
2008-08-12 14:12:13 +00:00
Zoltan Varga 5db35126ad Merge r110229 from HEAD.
svn path=/branches/mono-2-0/mono/; revision=110230
2008-08-12 13:03:09 +00:00
Zoltan Varga 7b270fecd9 Merge r110156-r110157 from HEAD.
svn path=/branches/mono-2-0/mono/; revision=110158
2008-08-11 20:07:32 +00:00
Marek Habersack 4e6fe443a2 Backport of r110125
svn path=/branches/mono-2-0/mcs/; revision=110126
2008-08-11 17:05:13 +00:00
Marek Habersack b2882b35e8 Backport of r110121
svn path=/branches/mono-2-0/mcs/; revision=110122
2008-08-11 16:14:04 +00:00
Zoltan Varga 1c482a505c Merge r110066 from HEAD.
svn path=/branches/mono-2-0/mono/; revision=110067
2008-08-10 11:30:40 +00:00
Jonathan Pobst d14e5c26e2 2008-08-08 Jonathan Pobst <[email protected]>
* DataGridViewCell.cs: Guard against an AOORE when checking if a cell
	is selected.  [Fixes bug #414143]

svn path=/branches/mono-2-0/mcs/; revision=110025
2008-08-08 20:45:37 +00:00
Zoltan Varga de071f89a0 2008-08-08 Zoltan Varga <[email protected]>
* aot-compiler.c (mono_aot_parse_options): Disable no-dlsym option for now.

svn path=/branches/mono-2-0/mono/; revision=109973
2008-08-08 15:23:07 +00:00
Zoltan Varga 2ddeac257f Merge r109971 from HEAD.
svn path=/branches/mono-2-0/mono/; revision=109972
2008-08-08 15:18:27 +00:00
Zoltan Varga 00c96e5ee1 2008-08-08 Zoltan Varga <[email protected]>
* marshal.c (mono_remoting_wrapper): Handle nullable types correctly.
	Fixes #415621.

	Backported from trunk.

svn path=/branches/mono-2-0/mono/; revision=109969
2008-08-08 14:59:54 +00:00
Zoltan Varga 939f5b706d 2008-08-08 Zoltan Varga <[email protected]>
* mini.c (mono_resolve_patch_target): Don't error out on missing icalls
	while aot compiling.

svn path=/branches/mono-2-0/mono/; revision=109966
2008-08-08 14:34:35 +00:00
Zoltan Varga a549de0c98 Fix a typo.
svn path=/branches/mono-2-0/mono/; revision=109965
2008-08-08 14:11:51 +00:00
Zoltan Varga e4767b2ed7 2008-08-08 Zoltan Varga <[email protected]>
* mini.c driver.c aot-compiler.c: Update after changes to 
	mono_marshal_get_native_wrapper () signature changes.

	* mini.c (mono_resolve_patch_target): Error out if an icall is not found.
	(mono_method_to_ir): Handle new CEE_MONO_ICALL_ADDR opcode.

svn path=/branches/mono-2-0/mono/; revision=109963
2008-08-08 13:50:44 +00:00
Zoltan Varga e336bccc7a 2008-08-08 Zoltan Varga <[email protected]>
* marshal.c (mono_marshal_get_native_wrapper): Add an 'aot' argument, when
	it is set, looking up the icall address is deferred to the JIT, since 
	in embedded scenarios, the icall might not be registered in the runtime
	doing the AOT compilation.

svn path=/branches/mono-2-0/mono/; revision=109962
2008-08-08 13:48:24 +00:00
Zoltan Varga 5b5f567690 2008-08-08 Zoltan Varga <[email protected]>
* cil-opcodes.xml: Add an 'icall_addr' opcode.

svn path=/branches/mono-2-0/mono/; revision=109960
2008-08-08 13:45:45 +00:00
Marek Habersack 46184895e1 Backport of r109952
svn path=/branches/mono-2-0/mcs/; revision=109953
2008-08-08 09:52:47 +00:00
Jb Evain 8b4bde4713 backport r109948
svn path=/branches/mono-2-0/mcs/; revision=109949
2008-08-08 08:43:10 +00:00
Marek Habersack 8e21b187db Backport of r109922
svn path=/branches/mono-2-0/mcs/; revision=109923
2008-08-08 00:37:19 +00:00
Zoltan Varga 2557c91607 2008-08-07 Zoltan Varga <[email protected]>
* aot-runtime.c (load_named_code): Pass the sofile to find_symbol, not the
	MonoAotModule.

svn path=/branches/mono-2-0/mono/; revision=109915
2008-08-07 21:45:49 +00:00
Zoltan Varga 480b7f5d7b 2008-08-07 Zoltan Varga <[email protected]>
* exceptions-arm.c (mono_arch_get_throw_exception_generic): Add aot
	support.

	* aot-runtime.c (load_named_code): Handle 'mono_arm_throw_exception'.

	* mini-arm.c (mono_arch_register_lowlevel_calls): Register 
	mono_arm_throw_exception as a jit icall.

svn path=/branches/mono-2-0/mono/; revision=109912
2008-08-07 21:19:37 +00:00
Zoltan Varga 6629632a6a 2008-08-07 Zoltan Varga <[email protected]>
* exceptions-arm.c (mono_arch_get_throw_exception_generic): Add aot
	support.

	* aot-runtime.c (load_named_code): Handle 'mono_arm_throw_exception'.

	* mini-arm.c (mono_arch_register_lowlevel_calls): Register 
	mono_arm_throw_exception as a jit icall.

svn path=/branches/mono-2-0/mono/; revision=109911
2008-08-07 21:19:13 +00:00
Gert Driesen 9f99215160 * TestIcon.cs: Add test case for bug #410608.
* Makefile: Add 323511.ico.
* Icon.cs (InitFromStreamWithSize): Move init of iconDir.idCount
and imageData until after the number of entries was determined to
cope with skipping of 256x256 icons. Fixes bug #410608.
* TestIcon.cs: Ignore test for bug #410608 on Unix, since it depends
on bug #323511.

svn path=/branches/mono-2-0/mcs/; revision=109881
2008-08-07 17:27:23 +00:00
Ivan Zlatev 278f836939 2008-08-07 Ivan N. Zlatev <[email protected]>
* GridEntry.cs: Check if current property is a ICustomTypeDescriptor
	and not the parent one (the propertyowner). Fixes the behavior of
	GetConverter/GetEditor.
	[Fixes bug #415452]

svn path=/branches/mono-2-0/mcs/; revision=109865
2008-08-07 14:44:32 +00:00
Ivan Zlatev e2bac9878f 2008-08-07 Ivan N. Zlatev <[email protected]>
* PropertyGrid.cs: Refresh should also repopulate the PropertyGrid.
	[Fixes part of bug #415452]

svn path=/branches/mono-2-0/mcs/; revision=109863
2008-08-07 14:41:02 +00:00
Jb Evain f275b6e485 backport 109858
svn path=/branches/mono-2-0/mcs/; revision=109859
2008-08-07 13:50:14 +00:00
Andreia Gaita bf926e9d96 * System.Windows.Forms/WebBrowser.cs: Remove extraneous CWL. Fixes
#411372 (partially)

svn path=/branches/mono-2-0/mcs/; revision=109838
2008-08-07 09:34:51 +00:00
Marek Habersack 6371e5446d Backport of r109776
svn path=/branches/mono-2-0/mcs/; revision=109777
2008-08-06 18:26:10 +00:00
Marek Habersack e6553234a6 Backport of r109773
svn path=/branches/mono-2-0/mcs/; revision=109774
2008-08-06 18:18:21 +00:00
Zoltan Varga f85a872195 2008-08-06 Zoltan Varga <[email protected]>
* aot-compiler.c (mono_compile_assembly): Correct the computation of 
	acfg->nmethods.
	(add_wrappers): Don't emit jit icall wrappers etc. into every image.

svn path=/branches/mono-2-0/mono/; revision=109760
2008-08-06 15:38:21 +00:00
Zoltan Varga bcd23c2ce3 Merge r109756 from HEAD.
svn path=/branches/mono-2-0/mono/; revision=109757
2008-08-06 13:32:13 +00:00
Carlos Alberto Cortez f243f57580 2008-08-06 Carlos Alberto Cortez <[email protected]>
* ListBox.cs: Selection changes made in the MouseDown handler should
	use the *Core versions of selection in SelectedIndices collection,
	since the SelectedIndexChanged/SelectedValueChanged events are fired
	until we get a MouseUp event, and thus we need to separate the logic
	from the events, as done in the keyboard navigation. Also, fire those
	selection events from keyboard navigation in SelectionMode.None, even
	if we don't have a selection, as .Net does.


svn path=/branches/mono-2-0/mcs/; revision=109749
2008-08-06 12:03:42 +00:00
Zoltan Varga 2eab3e93ec Merge r109506 from HEAD.
svn path=/branches/mono-2-0/mcs/; revision=109746
2008-08-06 10:55:39 +00:00
Ivan Zlatev 2f5dd747db 2008-08-05 Ivan N. Zlatev <[email protected]>
* ApplicationSettingsBase.cs: If there is no explicit
	SettingsSerializeAs attribute to specify the format, distinguish
	between plain string and XML by checking if the TypeConverter for the
	property type supports string conversions. If it doesn't then we are
	present with XML.
	[Fixes bug #414445]

svn path=/branches/mono-2-0/mcs/; revision=109707
2008-08-05 20:39:48 +00:00
Ivan Zlatev 9b21552888 2008-08-05 Ivan N. Zlatev <[email protected]>
* GridEntry.cs: ITypeDescriptorContext should be relative to the parent
	GridEntry, not the current.
	[Fixes bug #413896]

svn path=/branches/mono-2-0/mcs/; revision=109684
2008-08-05 14:38:40 +00:00
Ivan Zlatev 130cc0265e 2008-08-04 Ivan N. Zlatev <[email protected]>
* TextBoxBase.cs: De-internalize max_length field.
	* RichTextBox.cs: Use base.MaxLength - both TextBoxBase and RichTextBox
	share the same logic.
	[Fixes bug #414454]

svn path=/branches/mono-2-0/mcs/; revision=109615
2008-08-04 20:32:51 +00:00
Zoltan Varga 1aa65b49b5 2008-08-04 Zoltan Varga <[email protected]>
* socket-io.c (get_socket_assembly): Make 'moonlight' variable static.

svn path=/branches/mono-2-0/mono/; revision=109605
2008-08-04 18:58:40 +00:00
Geoff Norton 3d4af0a3ca 2008-08-01 Geoff Norton <[email protected]>
* CarbonCursor.cs: If the window doesn't have a cursor set, revert
        to the default.  Fixes #411114.

svn path=/branches/mono-2-0/mcs/; revision=109603
2008-08-04 18:56:14 +00:00
Geoff Norton 34a36c6021 2008-07-31 Geoff Norton <[email protected]>
* XplatUICarbon.cs: Properly implement PeekMessage and DoEvents
	Fixes #396983

svn path=/branches/mono-2-0/mcs/; revision=109602
2008-08-04 18:56:06 +00:00
Geoff Norton f544ec6a5a 2008-07-31 Geoff Norton <[email protected]>
* WindowHandler.cs: Dont set ActiveWindow when emitting the event,
	its set when the event is handled.  Fixes #393317.

svn path=/branches/mono-2-0/mcs/; revision=109601
2008-08-04 18:56:02 +00:00
Bill Holmes dadc02c527 2008-08-04 Bill Holmes <[email protected]>
* src/glib.h : Changing the allocation routines to return null if 0 size is
	  passed in.

	Contributed under MIT/X11 license.

svn path=/branches/mono-2-0/mono/; revision=109561
2008-08-04 13:25:28 +00:00
Zoltan Varga b1d2757f8e Merge r109521 from HEAD.
svn path=/branches/mono-2-0/mcs/; revision=109531
2008-08-03 17:49:59 +00:00
Zoltan Varga 87f3f3d032 Merge r109511 from HEAD.
svn path=/branches/mono-2-0/mono/; revision=109512
2008-08-03 15:35:26 +00:00
Zoltan Varga a93743339f Merge r109502 from HEAD.
svn path=/branches/mono-2-0/mono/; revision=109503
2008-08-03 00:20:07 +00:00
Carlos Alberto Cortez 7faba06720 2008-08-01 Carlos Alberto Cortez <[email protected]>
* ListBindingHelperTest.cs: New test for GetList receiving an IEnumerable
	object which return instances of ICustomTypeDescriptor instances,
	instead of actual items.


svn path=/branches/mono-2-0/mcs/; revision=109443
2008-08-01 15:32:18 +00:00
Carlos Alberto Cortez 652318a44d 2008-08-01 Carlos Alberto Cortez <[email protected]>
* DateTimePicker.cs: 
	* ThemeWin32Classic.cs: Add a editing capability to DateTimePicker, in
	order to set the value as required (which means: when selection
	changes for a part being edited, and not before that if not needed).
	Also use an enum to describe which part are we using, and use the
	selection as a property in PartData, in order to notify the
	DateTimePicker owner that we need to end the current edit.
	Fixes #383462.


svn path=/branches/mono-2-0/mcs/; revision=109442
2008-08-01 15:29:16 +00:00
Carlos Alberto Cortez 724f0a6d4e * ThemeWin32Classic.cs: Don't draw ListViewSubItem instances from
DrawListViewItem - we need to reuse the main item's drawing for the
	first sub item in case owner draw is true, but wants the system to
	do the default draw for the first sub item, without incurring in a
	recursion problem.
	Fixes #410880.

2008-08-01  Carlos Alberto Cortez <[email protected]>


svn path=/branches/mono-2-0/mcs/; revision=109441
2008-08-01 15:19:55 +00:00
Carlos Alberto Cortez 5ebc3a5956 2008-08-01 Carlos Alberto Cortez <[email protected]>
* ListBindingHelper.cs: When looking for an object's properties, check
	if it implements ICustomTypeDescriptor, in which case we should
	resolve the propertu based on its GetProperties method, not in its
	actual properties. This is what .Net seems to do.
	Fixes a UsingWebBrowser problem during initialization.



svn path=/branches/mono-2-0/mcs/; revision=109440
2008-08-01 15:10:38 +00:00
Jonathan Pobst 76cb00959c 2008-08-01 Jonathan Pobst <[email protected]>
* ToolStripButton.cs, ToolStripMenuItem.cs: Guard against a NRE my
	last change introduced when an item is clicked but isn't on a toolstrip.

svn path=/branches/mono-2-0/mcs/; revision=109430
2008-08-01 14:42:06 +00:00
Zoltan Varga 3397f96efb 2008-07-31 Zoltan Varga <[email protected]>
* mini.h: Add a declaration for mono_aot_register_module ().

svn path=/branches/mono-2-0/mono/; revision=109375
2008-07-31 18:52:43 +00:00
Zoltan Varga 8c24850ae5 2008-07-31 Zoltan Varga <[email protected]>
* aot-compiler.c aot-runtime.c: Merge some mach changes from Renaldas Zioma.

svn path=/branches/mono-2-0/mono/; revision=109368
2008-07-31 18:12:05 +00:00
Zoltan Varga 95974cdb7a Merge r109366 from HEAD.
svn path=/branches/mono-2-0/mono/; revision=109367
2008-07-31 17:51:01 +00:00
Zoltan Varga 8722a70b7a 2008-07-31 Zoltan Varga <[email protected]>
* debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.

	* aot-compiler.c aot-runtime.c: Add a 'static' option to generate aot files
	which can be statically linked into an executable.

svn path=/branches/mono-2-0/mono/; revision=109365
2008-07-31 17:40:04 +00:00
Jonathan Pobst e6e4288c5b 2008-07-31 Jonathan Pobst <[email protected]>
* ToolStrip.cs: Fix an NRE caused by clicking on a ToolStripButton
	sitting on a MenuStrip.

svn path=/branches/mono-2-0/mcs/; revision=109357
2008-07-31 16:10:15 +00:00
Dean Brettle 5bbfe2090e ++ System.Web.UI.HtmlControls/ChangeLog (working copy)
* HtmlControl.cs (PreProcessRelativeReference), 
	HtmlForm.cs (RenderAttributes), HtmlInputButton (RenderAttributes),
	HtmlInputRadioButton (RenderAttributes), HtmlSelect (RenderChildren):
	Encode attributes that could contain HTML special chars.
	
	* HtmlSelect (RenderChildren): HTML-encode option text.

++ Test/System.Web.UI.HtmlControls/ChangeLog	(working copy)

	* HtmlInputButtonTest.cs, HtmlImageTest.cs, HtmlFormTest.cs, 
	HtmlInputRadioButtonTest.cs, HtmlSelectTest.cs:	Added tests 
	for HTML-encoded of attributes. 


svn path=/branches/mono-2-0/mcs/; revision=109348
2008-07-31 14:31:31 +00:00
Bill Holmes f9427d49b1 2008-07-31 Bill Holmes <[email protected]>
* marshal.c (cominterop_get_native_wrapper) : Backport of r109343.
	  Adding a call to mono_class_setup_methods if the methods are not
	  initialized.

	Code is contributed under MIT/X11 license.

svn path=/branches/mono-2-0/mono/; revision=109347
2008-07-31 14:07:25 +00:00
Bill Holmes 8561c8042c 2008-07-31 Bill Holmes <[email protected]>
* aot-compiler.c : Backport of r108759.  Fix win32 build.

	Contributed under MIT/X11 license.

svn path=/branches/mono-2-0/mono/; revision=109346
2008-07-31 13:58:01 +00:00
Everaldo Canuto d9334ab132 2008-07-30 Everaldo Canuto <[email protected]>
* MenuAPI.cs: Check for null GrabControl on ProcessMnemonic to prevent 
	runtime errors.


svn path=/branches/mono-2-0/mcs/; revision=109320
2008-07-30 22:58:47 +00:00
Rodrigo Kumpera 27810cca75 2008-07-30 Rodrigo Kumpera <[email protected]>
* verify.c: Remove some debug code I commited by accident.

	* verify.c (mono_method_is_valid_in_context): Change the return value
	to make possible to distinguish between invalid and unverifiable.

	* verify.c (verifier_load_method): Don't return NULL for unverifiable
	methods.

	Backported from trunk.



svn path=/branches/mono-2-0/mono/; revision=109302
2008-07-30 20:18:14 +00:00
Rodrigo Kumpera 38342a2028 2008-07-30 Rodrigo Kumpera <[email protected]>
* verify.c (mono_generic_param_is_constraint_compatible): Inflate type
	constraints. Fixes regression in gtest-253.

	Backported from trunk.



svn path=/branches/mono-2-0/mono/; revision=109292
2008-07-30 18:40:51 +00:00
Ivan Zlatev ab969071df 2008-07-30 Ivan N. Zlatev <[email protected]>
* Form.cs: Ensure that we reset the shown_raised flag after
	the form is closed, so that we raise the show events the next
	time the form is shown.
	[Fixes bug #413141]

svn path=/branches/mono-2-0/mcs/; revision=109289
2008-07-30 18:30:09 +00:00
Ivan Zlatev 121aafc036 2008-07-30 Ivan N. Zlatev <[email protected]>
* Form.cs: Ensure closing events are raised only once.
	[Fixes bug #413143]

svn path=/branches/mono-2-0/mcs/; revision=109287
2008-07-30 18:19:45 +00:00
Jonathan Pobst 01443d56f9 2008-07-29 Jonathan Pobst <[email protected]>
* ListBox.cs: Don't let the user set TopIndex so high that it
	scrolls up far enough to show empty items.
	[Fixes bug #412728]

2008-07-29  Jonathan Pobst  <[email protected]>

	* ListBox.cs: Add test for bug #412728.

svn path=/branches/mono-2-0/mcs/; revision=109279
2008-07-30 16:20:27 +00:00
Rodrigo Kumpera d349d3cf66 2008-07-30 Rodrigo Kumpera <[email protected]>
* verify.c (mono_verifier_verify_class): Don't allow generic types
	with explicit layout.

	* verify.c (mono_method_verify): Check locals and argument types.

	Backported from trunk.


svn path=/branches/mono-2-0/mono/; revision=109271
2008-07-30 15:40:49 +00:00
Ivan Zlatev 508eeb5266 2008-07-30 Ivan N. Zlatev <[email protected]>
* X11Keyboard.cs: Refactor SendKeyboardInput to accept the keycode,
	so that we can successfully generate the LParam in-place instead of
	in KeyEvent, which isn't called for e.g. MainMenu. Fixes keyboard
	navigation for menus.

svn path=/branches/mono-2-0/mcs/; revision=109251
2008-07-30 12:52:03 +00:00
Everaldo Canuto 9698eebc3a 2008-07-30 Everaldo Canuto <[email protected]>
* MenuAPI.cs: When montion don't set the keyboard navigation state to 
	'navigating'. Fixes bug #411356.

svn path=/branches/mono-2-0/mcs/; revision=109238
2008-07-30 06:55:26 +00:00
Everaldo Canuto bf0c63bdaf 2008-07-30 Everaldo Canuto <[email protected]>
[Fixed remaining issues of #406773 (#1)]
	* MenuItem.cs: UpdateMenuItem added to track the shotcut changes.

	* MenuAPI.cs: Don't create tracker on TrackPopupMenu, it will be created in
	MainMenu (already done) and ContextMenu creation.

	* ContextMenu.cs: Create tracker on construction.

svn path=/branches/mono-2-0/mcs/; revision=109232
2008-07-30 05:13:09 +00:00
Everaldo Canuto 1f4d704c06 2008-07-30 Everaldo Canuto <[email protected]>
* MenuAPI.cs: For ContextMenu set GrabControl on TrackPopupMenu, it make
	possible to instantiate MenuTracker without GrabControl.

svn path=/branches/mono-2-0/mcs/; revision=109229
2008-07-30 03:54:19 +00:00
Everaldo Canuto 0c2a768d04 2008-07-30 Everaldo Canuto <[email protected]>
* MenuAPI.cs: On constructor dont set the GrabControl for non ContextMenu.

	* MainMenu.cs: Set GrabControl on SetForm using current form.

svn path=/branches/mono-2-0/mcs/; revision=109227
2008-07-30 03:36:59 +00:00
Everaldo Canuto d4b59a0987 2008-07-30 Everaldo Canuto <[email protected]>
* MenuAPI.cs: Chage grab_control to GrabControl and make it public.

svn path=/branches/mono-2-0/mcs/; revision=109225
2008-07-30 03:18:33 +00:00
Everaldo Canuto d66bd40a5e 2008-07-30 Everaldo Canuto <[email protected]>
* MenuAPI.cs: Check if menu is activated before deactivate it in 
	ProcessShortcut.


svn path=/branches/mono-2-0/mcs/; revision=109223
2008-07-30 03:13:16 +00:00
Zoltan Varga 8ecd5784fc 2008-07-30 Zoltan Varga <[email protected]>
* SqliteParameterUnitTests.cs: Disable the random value insertion
	test as it fails randomly.

svn path=/branches/mono-2-0/mcs/; revision=109220
2008-07-30 01:46:45 +00:00
Ivan Zlatev 864017ae96 2008-07-30 Ivan N. Zlatev <[email protected]>
* TableLayoutStyleCollection, TableLayoutStyle.cs, RowStyle.cs,
	ColumnStyle.cs:
	Make the TableLayoutStyle owned by the the TableLayoutPanel, so that:
	 - One style instance can only participate in a single style collection.
	 - Styles can request their owner to layout whenever their properties
	 change.
	* TableLayoutTest.cs: Add tests for bug #412582
	 [Fixes bugs #412583 and #412582]

svn path=/branches/mono-2-0/mcs/; revision=109210
2008-07-29 22:05:48 +00:00
Ivan Zlatev 9fa61327c6 2008-07-29 Ivan N. Zlatev <[email protected]>
* X11Keyboard.cs: Implement the generation of the LParam for
	all keyboard messages.
	[Fixes bug #378728]

svn path=/branches/mono-2-0/mcs/; revision=109202
2008-07-29 20:31:24 +00:00
Massimiliano Mantione ac33be5c4f Call the new "runtime initialized" profiler hook (backported from r108631).
svn path=/branches/mono-2-0/mono/; revision=109177
2008-07-29 17:10:27 +00:00
Massimiliano Mantione 022cc2489d Added a new "runtime initialized" profiler hook (backport of r108630 from trunk).
svn path=/branches/mono-2-0/mono/; revision=109176
2008-07-29 17:04:58 +00:00
Dick Porter c9cd06e98c 2008-07-29 Dick Porter <[email protected]>
* processes.c (get_module_name): Make a last-ditch effort to
	figure out the process name.  Fixes bug 413723, patch by Casey
	Marshall <[email protected]>



svn path=/branches/mono-2-0/mono/; revision=109161
2008-07-29 14:18:35 +00:00
Marek Habersack d3c3b9817a Forgotten file
svn path=/branches/mono-2-0/mcs/; revision=109158
2008-07-29 13:02:55 +00:00
Marek Habersack 6574c4842c Backport of r109156
svn path=/branches/mono-2-0/mcs/; revision=109157
2008-07-29 13:02:45 +00:00
Marek Safar 35af91a654 2008-07-29 Marek Safar <[email protected]>
A fix for bug #412880 by Atsushi Enomoto <[email protected]>
	* modifiers.cs (GetDescription): Fixed FamANDAssem case.


svn path=/branches/mono-2-0/mcs/; revision=109151
2008-07-29 12:09:06 +00:00
Marek Safar 924eaae1b1 2008-07-29 Marek Safar <[email protected]>
A fix for bug #412595
	* cfold.cs: Don't cast undefined bool constant.


svn path=/branches/mono-2-0/mcs/; revision=109135
2008-07-29 10:16:37 +00:00
Martin Baulig 5c0653cc3b 2008-07-29 Martin Baulig <[email protected]>
* symbolwriter.cs
	(SymbolWriter.Reset): New public static method.

	* driver.cs
	(CompilerCallableEntryPoint.Reset): Call SymbolWriter.Reset().


svn path=/branches/mono-2-0/mcs/; revision=109113
2008-07-29 07:20:29 +00:00
Martin Baulig 9b10d5247d 2008-07-29 Martin Baulig <[email protected]>
* compiler-tester.cs: Added `-compiler-options' command line
	argument to specify global compiler options in addition to the
	ones which are read from the test cases.


svn path=/branches/mono-2-0/mcs/; revision=109111
2008-07-29 07:15:44 +00:00
Zoltan Varga eed9f45d27 2008-07-29 Zoltan Varga <[email protected]>
* monitor.c (mono_monitor_try_enter_internal): Allow nterruption of the
	wait if the thread is in StopRequested state.

	Backported from trunk.

svn path=/branches/mono-2-0/mono/; revision=109083
2008-07-28 23:00:37 +00:00
Rodrigo Kumpera e938f4fad3 2008-07-28 Rodrigo Kumpera <[email protected]>
* verify.c (mono_type_is_valid_in_context): Improve the error message.
	Check both the type and it's generic type definition for loader errors.
	
	* verify.c (mono_method_is_valid_in_context): Don't generate another
	error when a type errors occur, this leads to the wrong exception been
	thrown.

	Backported from trunk.



svn path=/branches/mono-2-0/mono/; revision=109072
2008-07-28 19:53:45 +00:00
Atsushi Eno 47eb68cddb backport r109049.
svn path=/branches/mono-2-0/mcs/; revision=109050
2008-07-28 16:46:14 +00:00
Marek Habersack db68333eb7 Backport of r109040
svn path=/branches/mono-2-0/mcs/; revision=109041
2008-07-28 16:08:18 +00:00
Ivan Zlatev 3fd99b981e 2008-07-28 Ivan N. Zlatev <[email protected]>
* TableLayout.cs: MS adds rows instead of columns even when
	GrowStyle is AddColumns, but RowCount is 0.

svn path=/branches/mono-2-0/mcs/; revision=109037
2008-07-28 15:50:37 +00:00
Rodrigo Kumpera d59ab90071 2008-07-28 Rodrigo Kumpera <[email protected]>
* verify.c: Implement constraint equivalence checking.
	This is required when a generic parameter is used as
	argument to a constrained one.

	Fixes #410637.

	Backported from trunk.


svn path=/branches/mono-2-0/mono/; revision=109029
2008-07-28 15:37:08 +00:00
Jonathan Pobst 8a7077c3fd 2008-07-28 Jonathan Pobst <[email protected]>
* ToolStripButton.cs: Update Checked for CheckOnClick before
	raising the Click event.  [Fixes bug #412505]

svn path=/branches/mono-2-0/mcs/; revision=109019
2008-07-28 15:11:53 +00:00
Marek Habersack fdb3f32aff Backport of r108992
svn path=/branches/mono-2-0/mcs/; revision=108993
2008-07-28 12:38:20 +00:00
Marek Habersack bf91fdc886 Backport of r108985
svn path=/branches/mono-2-0/mcs/; revision=108986
2008-07-28 11:43:37 +00:00
Marek Habersack afabc945e6 Backport of r108975
svn path=/branches/mono-2-0/mcs/; revision=108976
2008-07-28 08:21:14 +00:00
Atsushi Eno 2d6f641629 backport r108971.
svn path=/branches/mono-2-0/mcs/; revision=108972
2008-07-28 06:51:01 +00:00
Ivan Zlatev cbbb130a5f 2008-07-28 Ivan N. Zlatev <[email protected]>
* Form.cs: Remove some seems leftover code for non-TopLevel's
	CreateParams, which is breaking ClientSize sizing, because it
	removes the border window styles.

svn path=/branches/mono-2-0/mcs/; revision=108965
2008-07-27 21:21:57 +00:00
Zoltan Varga 47b637d576 2008-07-27 Zoltan Varga <[email protected]>
* debug-mini.c (mono_debug_close_method): Avoid a crash if jit->this_var
	is not set.

svn path=/branches/mono-2-0/mono/; revision=108963
2008-07-27 20:17:00 +00:00
Ivan Zlatev 82d4d8a64c 2008-07-27 Ivan N. Zlatev <[email protected]>
* RootCodeDomSerializer.cs: Clear the fields as well.

svn path=/branches/mono-2-0/mcs/; revision=108962
2008-07-27 19:18:57 +00:00
Ivan Zlatev e29ff8407d 2008-07-27 Ivan N. Zlatev <[email protected]>
* PropertyGrid.cs: Invalidate the View when the PropertyTab
	changes.

svn path=/branches/mono-2-0/mcs/; revision=108960
2008-07-27 19:15:13 +00:00
Andreas Färber b2225d42ea Merge r108956 from HEAD.
svn path=/branches/mono-2-0/mono/; revision=108957
2008-07-27 18:44:14 +00:00
Zoltan Varga 5e95510e6e Merge r108937 from HEAD.
svn path=/branches/mono-2-0/mono/; revision=108939
2008-07-27 15:00:05 +00:00
Zoltan Varga a583e2b947 Merge r108887 from HEAD.
svn path=/branches/mono-2-0/mcs/; revision=108888
2008-07-27 00:08:55 +00:00
Dean Brettle a84f9e8fa3 ++ Test/mainsoft/ChangeLog (working copy)
* NunitWebResources/adapters.browser: added capabilities with 
	multiple substitutions and $ and % characters not associated
	with substitutions. 

++ Test/System.Web/ChangeLog	(working copy)

	* AppBrowsersTest.cs: Added tests for bug where capabilities 
	containing literal $ or % were dropped.  Added test for bug 
	where capabilities with multiple $ substitutions only
	had one applied.

++ System.Web.Configuration_2.0/ChangeLog	(working copy)

	* nBrowser/Node.cs nBrowser/Build.cs nBrowser/Identification.cs:
	Fixed race condition in Node.Process() by removing mutating 
	functions from Identification and changing Node.Process() and
	Node.BrowserIdentification() to maintain state in a List<Match>
	instead of a List<Identification>.
	
	* nBrowser/Node.cs: Fixed race condition associated with lookup of
	adapter types.
	
	* nBrowser/Node.cs: Removed duplicate call to 
	Node.BrowserIdentification() from Node.Process().

	* nBrowser/Node.cs: Removed duplicate call to Result.AddAdaper()
	from Node.Process().
	
	* nBrowser/Node.cs: Fixed bug where capabilities containing literal
	$ or % were dropped.

	* nBrowser/Node.cs: Fixed bug where capabilities with multiple $ 
	substitutions only had one applied.


svn path=/branches/mono-2-0/mcs/; revision=108858
2008-07-26 16:01:24 +00:00
Ivan Zlatev c10bca60c9 2008-07-26 Ivan N. Zlatev <[email protected]>
* TableLayout.cs: Perform layout even if they are no child controls, so
	that cell sizes are updated properly for the cell border painting.

svn path=/branches/mono-2-0/mcs/; revision=108825
2008-07-25 21:17:31 +00:00
Ivan Zlatev 6ddc460530 2008-07-25 Ivan N. Zlatev <[email protected]>
* TableLayout.cs: For newly created cells for controls without a
	specifically assinged such enforce AddRows if ColumnCount == 0 else
	AddColumns if RowCount == 0.
	[Fixes bug #412163]

svn path=/branches/mono-2-0/mcs/; revision=108823
2008-07-25 21:13:06 +00:00
Ivan Zlatev 00f6a73eb1 2008-07-25 Ivan N. Zlatev <[email protected]>
* TableLayoutPanel.cs: Perform layout on GrowStyle change, so
	that the change has an immediate effect.

svn path=/branches/mono-2-0/mcs/; revision=108817
2008-07-25 19:59:39 +00:00
Ivan Zlatev 37b08459d4 2008-07-25 Ivan N. Zlatev <[email protected]>
* TableLayout.cs: Automagically add the required number of columns/rows
	if the control is added at non-existent such. Note that ColumnCount and
	RowCount do not change in LayoutSettings.
	* TableLayoutTest.cs: Add test for bug #412161
	[Fixes bug #412161]

svn path=/branches/mono-2-0/mcs/; revision=108815
2008-07-25 19:55:45 +00:00
Marek Safar 83ceed4489 2008-07-25 Marek Safar <[email protected]>
A fix for bug #412217
	* assign.cs: Mutate also assignment type.


svn path=/branches/mono-2-0/mcs/; revision=108786
2008-07-25 14:59:30 +00:00
Ivan Zlatev bcd3aec7e5 2008-07-25 Ivan N. Zlatev <[email protected]>
* ScrollableControl.cs: Update PerformLayout calls to include
	provide the name of the property that changed.

svn path=/branches/mono-2-0/mcs/; revision=108776
2008-07-25 13:21:15 +00:00
Ivan Zlatev e4ce9895a7 2008-07-25 Ivan N. Zlatev <[email protected]>
* TableLayoutPanel.cs: Draw relative to the DisplayRectangle
	location. Fixes drawing of border and cell borders if scrollable.

svn path=/branches/mono-2-0/mcs/; revision=108771
2008-07-25 12:58:26 +00:00
Ivan Zlatev 542d8e5b0e 2008-07-25 Ivan N. Zlatev <[email protected]>
* ScrollableControl.cs: Perform layouting after the AutoScroll
	properties have changed, so that the changes have immediate
	effect.
	[Fixes bug #409090]

svn path=/branches/mono-2-0/mcs/; revision=108769
2008-07-25 12:53:29 +00:00
Martin Baulig 8a6f210585 2008-07-25 Martin Baulig <[email protected]>
* debug-debugger.c
	(debugger_get_boxed_object): GC-protect the last 16 objects.
	(debugger_runtime_invoke): Likewise.


svn path=/branches/mono-2-0/mono/; revision=108765
2008-07-25 12:13:14 +00:00
Marek Safar 989abab5fb 2008-07-25 Marek Safar <[email protected]>
A fix for bug #412134
	* expression.cs (ResolveOperatorEnum): Do implicit conversion of
	non-enumerable operands when overloading equality or bitwise operators.


svn path=/branches/mono-2-0/mcs/; revision=108762
2008-07-25 11:20:01 +00:00
Ivan Zlatev e01b93cd98 2008-07-25 Ivan N. Zlatev <[email protected]>
* XplatUIX11.cs: Non Client area is actually Client such in the
	case of NotifyIcon, so double check WholeWindow == ClientWindow
	when adding an expose.
	[Fixes bugs #324237 and #357022]

svn path=/branches/mono-2-0/mcs/; revision=108756
2008-07-25 10:31:14 +00:00
Ivan Zlatev 1b19fbcc37 2008-07-25 Ivan N. Zlatev <[email protected]>
* TableLayout.cs: Initialize columns and rows as empty array, so that we
	can drop the null check when drawing and always draw the control border,
	but void for the cell borders if there aren't any.
	[Fixes bug #411858]

svn path=/branches/mono-2-0/mcs/; revision=108754
2008-07-25 10:21:11 +00:00
Ivan Zlatev e46bc42fa8 2008-07-25 Ivan N. Zlatev <[email protected]>
* TableLayout.cs: Initialize columns and rows as empty array, so that we
	can drop the null check when drawing and always draw the control border,
	but void for the cell borders if there aren't any.
	[Fixes bug #411858]

svn path=/branches/mono-2-0/mcs/; revision=108752
2008-07-25 10:19:28 +00:00
Martin Baulig eb6253ba03 Ooops, actually pass the newly created LocalBuilder to the LocalTemporary.
svn path=/branches/mono-2-0/mcs/; revision=108750
2008-07-25 10:18:26 +00:00
Ivan Zlatev 3ed4f50114 2008-07-25 Ivan N. Zlatev <[email protected]>
* TableLayoutPanel.cs: Invalidate after layouting, so that we
	repaint the cell borders.
	[Fix bug #411860]

svn path=/branches/mono-2-0/mcs/; revision=108749
2008-07-25 10:02:58 +00:00
Ivan Zlatev 427d699aa3 2008-07-25 Ivan N. Zlatev <[email protected]>
* PropertyGridTextBox.cs: Stop filtering messages prior to our
	disposal to avoid unexpected ObjectDisposedExceptions.

svn path=/branches/mono-2-0/mcs/; revision=108726
2008-07-24 21:14:27 +00:00
Zoltan Varga 4e0d8f27ba Revert mistaken change.
svn path=/branches/mono-2-0/mono/; revision=108725
2008-07-24 21:21:42 +00:00
Zoltan Varga 1ee3e71937 2008-07-24 Zoltan Varga <[email protected]>
* configure.in: Patch libtool to avoid the 
	'copying selected object files ...' messages.
	
	* configure.in: Invoke patch-quiet.sh using AC_CONFIG_COMMANDS so it
	runs during a reconfigure too.

	Backported from trunk.

svn path=/branches/mono-2-0/mono/; revision=108724
2008-07-24 21:20:23 +00:00
Ivan Zlatev 988168e2c3 2008-07-24 Ivan N. Zlatev <[email protected]>
* TableLayoutPanel.cs: Layout on Row/Column count change.
	[Fixes bug #411891]

svn path=/branches/mono-2-0/mcs/; revision=108721
2008-07-24 20:44:56 +00:00
Zoltan Varga dbacc958c8 2008-07-24 Zoltan Varga <[email protected]>
* aot-runtime.c aot-compiler.c: Merge with the version in HEAD.

svn path=/branches/mono-2-0/mono/; revision=108678
2008-07-24 17:13:41 +00:00
Mark Probst cc46bbf965 2008-07-24 Mark Probst <[email protected]>
* mini-exceptions.c: Free a MonoType with
	mono_metadata_free_type() instead of g_free().

	* aot-runtime.c: Free a MonoType.

	Backported from trunk.

svn path=/branches/mono-2-0/mono/; revision=108675
2008-07-24 16:54:22 +00:00
Rodrigo Kumpera 089e8de54b 2008-07-24 Rodrigo Kumpera <[email protected]>
* verify.c (do_branch_op): Handle valuetypes and generic
	arguments properly.

	* verify.c (do_cmp_op): Same.

	Fixes #410383.

	Backported from trunk.


svn path=/branches/mono-2-0/mono/; revision=108674
2008-07-24 16:46:25 +00:00
Rodrigo Kumpera 57a84b0eeb 2008-07-24 Rodrigo Kumpera <[email protected]>
* configure.in: Change USED_GC_NAME to show if parallel mark is used.
	This is shown in mono --version.

	Backported from trunk.


svn path=/branches/mono-2-0/mono/; revision=108661
2008-07-24 15:56:19 +00:00
Bill Holmes 78a2769fe2 2008-07-24 Bill Holmes <[email protected]>
* mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
	  variable computed above as the copy length for arguments of storage
	  type ArgValuetypeAddrInIReg.

	Contributed under MIT/X11 license.

svn path=/branches/mono-2-0/mono/; revision=108651
2008-07-24 13:19:31 +00:00
Bill Holmes 986ce54e81 2008-07-24 Bill Holmes <[email protected]>
* mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
	  frame pointer the stack adjustment value must be saved to the unwind 
	  info structure.

	Contributed under MIT/X11 license.

svn path=/branches/mono-2-0/mono/; revision=108650
2008-07-24 13:12:16 +00:00
Zoltan Varga 4a7de092d4 Merge r108643 from HEAD.
svn path=/branches/mono-2-0/mcs/; revision=108644
2008-07-24 10:45:55 +00:00
Marek Habersack bf76a83964 Backport of r108638
svn path=/branches/mono-2-0/mcs/; revision=108639
2008-07-24 09:56:01 +00:00
Marek Habersack 510576a508 Backport of r108636
svn path=/branches/mono-2-0/mcs/; revision=108637
2008-07-24 09:21:12 +00:00
Rodrigo Kumpera 75639f296f 2008-07-23 Rodrigo Kumpera <[email protected]>
* verify.c (do_cast): Do boxing for generic arguments as well.

	* class.c (is_nesting_type): Drop generic instantiations before
	checking for nesting.

	* class.c (can_access_instantiation): Allow access to generic
	arguments.

	Backported from trunk.


svn path=/branches/mono-2-0/mono/; revision=108625
2008-07-24 03:10:20 +00:00
Rodrigo Kumpera e7d5ef2c30 2008-07-23 Rodrigo Kumpera <[email protected]>
* verify.c (verify_class_for_overlapping_reference_fields):
	On some cases, the field size might be zero, guard against that.
	Fix the explicit layout check to work as expected.

	Backported from trunk.


svn path=/branches/mono-2-0/mono/; revision=108608
2008-07-23 23:10:56 +00:00
Zoltan Varga 4d30c11e0c Merge r108601 from HEAD.
svn path=/branches/mono-2-0/mono/; revision=108602
2008-07-23 21:52:57 +00:00
Martin Baulig d3a81ce711 2008-07-23 Martin Baulig <[email protected]>
* debug-mini.c (mono_debug_close_method): Check
	`MONO_INST_IS_DEAD' for `this'.


svn path=/branches/mono-2-0/mono/; revision=108598
2008-07-23 20:43:24 +00:00
Marek Habersack 4170fd8523 Backport of r108538
svn path=/branches/mono-2-0/mcs/; revision=108539
2008-07-23 10:29:13 +00:00
Marek Habersack 73545d7a30 Backport of r108535
svn path=/branches/mono-2-0/mcs/; revision=108536
2008-07-23 10:19:03 +00:00
Martin Baulig 47ecadbebb 2008-07-23 Martin Baulig <[email protected]>
* anonymous.cs
	(AnonymousMethodStorey.EmitHoistedVariables): Added the required
	symbolwriter calls to tell the debugger about the scope variable.
	(AnonymousMethodStorey.EmitType): Added the required symbol writer
	calls to tell the debugger about captured variables.

	* statement.cs
	(ExplicitBlock.EmitSymbolInfo): Moved to `ToplevelBlock'.
	(ToplevelBlock.EmitSymbolInfo): Tell the symbol writer about the
	scope variable.

	* class.cs
	(MethodOrOperator.Define): Set `Modifiers.DEBUGGER_HIDDEN' if
	we're an iterator.
	(MethodOrOperator.Emit): Add the `[DebuggerHidden]' custom
	attribute if requested.
	(Constructor.Emit): Likewise.


svn path=/branches/mono-2-0/mcs/; revision=108527
2008-07-23 03:46:43 +00:00
Gert Driesen b0b8b6fbd8 * LosFormatter.cs: Avoid using Position when stream is unseekable.
Do not invoke Length property twice for seekable MemoryStream.  
* LosFormatterTest.cs: Improved test for bug #411115.

svn path=/branches/mono-2-0/mcs/; revision=108505
2008-07-22 19:54:34 +00:00
Dean Brettle a5c3f5c622 ++ Test/System.Web.UI/ChangeLog (working copy)
* LosFormatterTest.cs: added test for bug 411115 where passing an
	unseekable stream to LosFormatter.Deserialize() causes an exception.

++ System.Web.UI/ChangeLog	(working copy)

	* LosFormatter.cs: fixed bug 411115 where passing an unseekable 
	stream to LosFormatter.Deserialize() causes an exception.


svn path=/branches/mono-2-0/mcs/; revision=108492
2008-07-22 18:20:47 +00:00
Bill Holmes b7f7a9261e 2008-07-22 Bill Holmes <[email protected]>
* libtest.c, winx64structs.cs :
	  Adding tests to exercise calling managed code from native with struct
	  arguments on Winx64.

	Contributed under MIT/X11 license.

svn path=/branches/mono-2-0/mono/; revision=108481
2008-07-22 17:04:51 +00:00
Bill Holmes ebe3ff9854 2008-07-22 Bill Holmes <[email protected]>
* inssel-amd64.brg :  Adding rules for OP_VTARG_ADDR that are used for
	  Winx64 struct arguments.

	* mini-amd64.c (mono_arch_allocate_vars) : Implementing the ArgValuetypeAddrInIReg
	  argument case.  Setting the argument op to OP_VTARG_ADDR (OP_REGOFFSET)).

	* mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
 	  Implementing the ArgValuetypeAddrInIReg argument case.  When the address
 	  of a struct is passed in a register it must be saved with the other
 	  volatile argument on the stack.

	Contributed under MIT/X11 license.

svn path=/branches/mono-2-0/mono/; revision=108480
2008-07-22 17:04:11 +00:00
Jb Evain b4b1af268b backport 108467
svn path=/branches/mono-2-0/mono/; revision=108477
2008-07-22 16:30:42 +00:00
Jonathan Pobst 37b6e49f7f Add MonoTODO to VirtualMode.
svn path=/branches/mono-2-0/mcs/; revision=108472
2008-07-22 15:01:36 +00:00
Marek Safar 766c997480 2008-07-22 Marek Safar <[email protected]>
A fix for bug #387040
	* ecore.cs: Skip constrains check for an explicit implementation.


svn path=/branches/mono-2-0/mcs/; revision=108452
2008-07-22 10:34:54 +00:00
Jb Evain b79c922ef9 backport r108446
svn path=/branches/mono-2-0/mcs/; revision=108447
2008-07-22 06:05:15 +00:00
Bill Holmes 524ecb2f30 2008-07-21 Bill Holmes <[email protected]>
Back port from trunk.  r108417

	* mini-amd64.c (get_call_info): Winx64 fix for passing floats.
	  The float param registers and other param registers must be the 
	  same index on Windows x64.

	Contributed under MIT/X11 license.

svn path=/branches/mono-2-0/mono/; revision=108418
2008-07-21 21:33:49 +00:00
Rodrigo Kumpera 70ff2308c0 2008-07-21 Rodrigo Kumpera <[email protected]>
* mini.c: Make the previous fix GC safe.
	Backported from trunk.


svn path=/branches/mono-2-0/mono/; revision=108383
2008-07-21 16:36:07 +00:00
Marek Safar e19a0cdd3f 2008-07-21 Marek Safar <[email protected]>
A fix for bug #410369
	* parameter.cs: Clone correctly ParamsParameter.


svn path=/branches/mono-2-0/mcs/; revision=108358
2008-07-21 15:11:09 +00:00
Mark Probst ae1b7774cd 2008-07-21 Mark Probst <[email protected]>
* reflection.c (mono_method_get_object): Don't let static RGCTX
	invoke wrappers get into MonoReflectionMethods.

	Backported from trunk.

2008-07-21  Mark Probst  <[email protected]>

	* generic-getgenericarguments.2.cs: Test case catching static
	RGCTX wrappers in MonoReflectionMethods.

	* Makefile.am: Test added.

	Backported from trunk.

svn path=/branches/mono-2-0/mono/; revision=108353
2008-07-21 14:51:37 +00:00
Bill Holmes 579a15b47a 2008-07-21 Bill Holmes <[email protected]>
Back port from trunk.  r108343

	* mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
	  on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
	  ArgValuetypeAddrInIReg instead.

	Contributed under MIT/X11 license.

svn path=/branches/mono-2-0/mono/; revision=108352
2008-07-21 14:48:02 +00:00
Ivan Zlatev d25226e6f7 2008-07-21 Ivan N. Zlatev <[email protected]>
* CodeDomComponentSerializationService.cs: Remove redundant assignment.

svn path=/branches/mono-2-0/mcs/; revision=108351
2008-07-21 14:36:20 +00:00
Raja R Harinath 9fb03707ab * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
svn path=/branches/mono-2-0/mono/; revision=108347
2008-07-21 14:24:11 +00:00
Marek Safar f82536d160 2008-07-19 Marek Safar <[email protected]>
A fix for bug #410666
	* anonymous.cs: Correctly initialize generic storey reference.


svn path=/branches/mono-2-0/mcs/; revision=108313
2008-07-19 12:55:30 +00:00
Gert Driesen 908a4b9c8d * OracleDataAdapter_FillSchema_DsSt.cs: Moved initialization of
connectionString to a setup method, as workaround for NUNit 2.2.0
bug with Assert.Ignore in ctor.
* OracleDataReader_GetDateTime.cs: Moved initialization of
connectionString to a setup method, as workaround for NUnit 2.2.0
bug with Assert.Ignore in ctor.
* OracleDataReader_NextResult.cs: Moved initialization of connection
to setup method, as workaround for NUnit 2.2.0 bug with Assert.Ignore
in ctor.

svn path=/branches/mono-2-0/mcs/; revision=108309
2008-07-19 10:52:46 +00:00
Jb Evain e2bf3c46d7 backport 108305:108307
svn path=/branches/mono-2-0/mcs/; revision=108308
2008-07-19 08:02:57 +00:00
Rodrigo Kumpera eb6fd2eb23 2008-07-18 Rodrigo Kumpera <[email protected]>
* mini.c: Use mono_runtime_class_init_full to avoid leaking memory
	for types which the initialization fails. Raises the provided exception
	at the right stop after cleanup. Backported from trunk.


svn path=/branches/mono-2-0/mono/; revision=108290
2008-07-18 23:58:06 +00:00
Rodrigo Kumpera 464026f902 2008-07-18 Rodrigo Kumpera <[email protected]>
* object-internals.h:
	* object.c: New mono_runtime_class_init_full function
	that makes throwing the exception optinal.

	* class-internals.h: New exception type MONO_EXCEPTION_OBJECT_SUPPLIED
	for the case where the exception object is supplied.

	Backported from trunk.


svn path=/branches/mono-2-0/mono/; revision=108289
2008-07-18 23:57:38 +00:00
Rodrigo Kumpera 3e9be851d4 2008-07-18 Rodrigo Kumpera <[email protected]>
* versioninfo.c (map_pe_file): Fix memory leak. Backported from trunk.


svn path=/branches/mono-2-0/mono/; revision=108285
2008-07-18 23:21:18 +00:00
Marek Safar 35439fa111 Reverted GetHashCode changes.
svn path=/branches/mono-2-0/mcs/; revision=108277
2008-07-18 21:50:44 +00:00
Marek Safar 822dba4a3e Reverted GetHashCode changes.
svn path=/branches/mono-2-0/mono/; revision=108277
2008-07-18 21:50:44 +00:00
Marek Safar 8d9bebe7fd 2008-07-18 Marek Safar <[email protected]>
* ecore.cs, linq.cs, delegate.cs, constant.cs, nullable.cs, expression.cs:
	Finished missing generic type mutators.


svn path=/branches/mono-2-0/mcs/; revision=108274
2008-07-18 21:38:46 +00:00
Jonathan Pobst 452b871488 2008-07-16 Jonathan Pobst <[email protected]>
[Backport to 2.0]
	Apply patch from Achille Fouilleul (achille.fouilleul at gadz dot org)

	* BackgroundWorker.cs: Ensure the async object is set to null before
	calling RunWorkerCompleted, as IsBusy is based off the async object.
	[Fixes bug #394365]

2008-07-16  Jonathan Pobst  <[email protected]>
	[Backport to 2.0]
	Apply patches from Jordan Callicoat (MonkeeSage at gmail dot com)

	* AsyncCompleteEventArgs.cs: RaiseExceptionIfNecessary should throw
	TargetInvocationException if there was an exception, and IOE if
	the operation was cancelled.
	* BackgroundWorker.cs: Do not call RunWorkerCompleted from CancelAsync,
	setting cancel_pending to true is enough.
	* RunWorkerCompletedEventArgs.cs: Raise exceptions when user tries
	to access the Result if there are any exceptions.
	[Fixes bugs #328830 and 373153]

2008-07-16  Jonathan Pobst  <[email protected]>
	[Backport to 2.0]
	* BackgroundWorkerTest.cs: Add some asserts for bug #364365.

2008-07-16  Jonathan Pobst  <[email protected]>
	[Backport to 2.0]
	* BackgroundWorkerTest.cs: Add tests for bugs 328830 and 373153.

svn path=/branches/mono-2-0/mcs/; revision=108238
2008-07-18 15:03:17 +00:00
Jonathan Pobst c3b5d44422 2008-07-15 Jonathan Pobst <[email protected]>
[Backport to 2.0]
	* ImageList.cs: Fix ICollection.CopyTo implementation for
	ImageListCollection.  [Fixes bug #409169]

2008-07-15  Jonathan Pobst  <[email protected]>
	[Backport to 2.0]
	* ImageListTest.cs: Add test for bug #409169.

svn path=/branches/mono-2-0/mcs/; revision=108237
2008-07-18 14:57:19 +00:00
Jb Evain fcb0a02c88 merge fixes from 108210:108218
svn path=/branches/mono-2-0/mcs/; revision=108220
2008-07-18 12:14:43 +00:00
Marek Habersack b43ae3c971 Backport of r108179
svn path=/branches/mono-2-0/mcs/; revision=108195
2008-07-17 23:33:49 +00:00
Ivan Zlatev f708641b8d 2008-07-17 Ivan N. Zlatev <[email protected]>
* TypeDescriptor.cs: Attributes precendence (higher to lower)
	should be type -> base types -> interfaces and not
	type -> interfaces -> base types.

svn path=/branches/mono-2-0/mcs/; revision=108191
2008-07-17 22:23:12 +00:00
Ivan Zlatev 4e10c1ab81 2008-07-17 Ivan N. Zlatev <[email protected]>
* TypeDescriptor.cs:
	 - Refactor the default converters table not to be a Hashtable,
	 because the order of the keys is not preserved.
	 - Fix FindDefaultConverterType to properly make use of the default
	 converters.

svn path=/branches/mono-2-0/mcs/; revision=108122
2008-07-17 10:49:00 +00:00
Ivan Zlatev da3f57c214 2008-07-17 Ivan N. Zlatev <[email protected]>
* PropertyGridTextBox.cs: Validation should be performed only if we
	are focused. We can lose focus for example if the Return key is used
	to set the entry and there is an error. When the message box is
	displayed we would have validate on click in the message box.

svn path=/branches/mono-2-0/mcs/; revision=108115
2008-07-17 06:56:31 +00:00
Kornél Pál 48dccee80f Backport r108091.
svn path=/branches/mono-2-0/mono/; revision=108092
2008-07-16 22:25:07 +00:00
Ivan Zlatev 1faa706804 2008-07-16 Ivan N. Zlatev <[email protected]>
* GridEntry.cs: Checking for DesignerSerializaitonVisibility.Content
	in order to determine that we are expandable is wrong. There was a bug,
	now fixed, in TypeDescriptor that was causing the wrong converter to be
	returned which caused GetPropertiesSupported == false in most cases.
	[Fixes bug #409027]

svn path=/branches/mono-2-0/mcs/; revision=108090
2008-07-16 21:29:09 +00:00
Ivan Zlatev 38e2ec8469 2008-07-16 Ivan N. Zlatev <[email protected]>
* TypeDescriptor.cs:
	 - Fix GetConverter (Type) overload to have same logic as the
	 object one.
	 - Object-ReferenceConverter should be the last entry in the predefined
	 converters table, so that when we look up we don't end up with the wrong
	 converter for derived types.
	* TypeDescriptorTests.cs: Add a test that both GetConverter
	overloads return the same converter.

svn path=/branches/mono-2-0/mcs/; revision=108089
2008-07-16 21:22:51 +00:00
Jonathan Chambers 57dbdb3e42 2008-07-15 Jonathan Chambers <[email protected]>
* assembly.c (mono_set_rootdir): Revert part of mixed
       mode assembly patch to fix build. Use mono_module_handle
       instead of linker specific __ImageBase.

       * coree.h: Add back mono_module_handle.

       * coree.c: Add back mono_module_handle.

       Code is contributed under MIT/X11 license.

2008-07-15  Jonathan Chambers  <[email protected]>

       * driver.c: Add back mono_module_handle and
       initialize in DllMain DLL_PROCESS_ATTACH case.

       Code is contributed under MIT/X11 license.


svn path=/branches/mono-2-0/mono/; revision=108051
2008-07-16 16:09:49 +00:00
Marek Habersack e83157f0bf Backport of r108024
svn path=/branches/mono-2-0/mcs/; revision=108030
2008-07-16 13:59:06 +00:00
Zoltan Varga 6bc712404f Merge r107985 from HEAD.
svn path=/branches/mono-2-0/mono/; revision=107988
2008-07-15 18:22:47 +00:00
Andrew Jorgensen 31349722b8 Update versions to 2.0
svn path=/branches/mono-2-0/mono/; revision=107979
2008-07-15 17:11:32 +00:00
3356 changed files with 34460 additions and 296514 deletions

No files matched your search

+12 -68
View File
@@ -1,95 +1,39 @@
2008-08-28 Zoltan Varga <vargaz@gmail.com>
2008-08-28 Geoff Norton <gnorton@novell.com>
* scripts/Makefile.am (scripts_2_0): Add gacutil2.
* build-iphone.sh: iPhone lies about HAVE_MMAP as well.
* scripts/gacutil2: New file.
2008-08-26 Geoff Norton <[email protected]>
2008-08-22 Jb Evain <[email protected]>
* build-iphone.sh: Update build-iphone to not wget old inssel's, and build
out of the box with teh current SDK.
* data/wcf.pc.in
* data/Makefile.am
* configure.in: add a new wcf.pc for assemblies recently moved
from olive to mcs.
2008-08-12 Bill Holmes <[email protected]>
2008-08-13 Bill Holmes <[email protected]>
* winconfig.h: Updating the config file for MSVC builds to match
the config file used when compiling with gcc in Cygwin.
Contributed under MIT/X11 license.
2008-08-09 Rodrigo Kumpera <[email protected]>
* docs/generic-sharing: Some updates from an irc talk with Mark.
2008-08-06 Zoltan Varga <[email protected]>
* Makefile.am (EXTRA_DIST): Add dtrace-prelink.sh and build-mingw32.sh.
* scripts/Makefile.am (EXTRA_DIST): Add patch-quiet.sh.
2008-08-05 Marek Habersack <[email protected]>
* configure.in: use the PKG_CONFIG_PATH only when cross-compiling.
2008-08-05 Marek Habersack <[email protected]>
* configure.in: added support for cross-compilation
2008-08-05 Marek Habersack <[email protected]>
* build-mingw32.sh: added a script to build Mono for Windows on a
Linux host using mingw.
2008-08-05 Marek Habersack <[email protected]>
* scripts/Makefile.am: added support for cross-compilation,
including .bat generation for windows targets.
2008-08-05 Marek Habersack <[email protected]>
* scripts/smcs.bat.in, scripts/script.bat.in,
scripts/script_umask.bat.in: added .bat templates.
2008-08-05 Marek Habersack <[email protected]>
* runtime/Makefile.am: mingw cross-compilation support.
2008-08-05 Andreas Färber <[email protected]>
* autogen.sh: Suppress arguments warning for NOCONFIGURE.
Contributed under MIT/X11 license.
2008-08-02 Zoltan Varga <[email protected]>
* configure.in: Enable dtrace by default on platforms which support it.
2008-07-27 Zoltan Varga <[email protected]>
* scripts/patch-quiet.sh: Make the libtool --quiet flag configurable by
V=1 as well.
2008-07-24 Zoltan Varga <[email protected]>
* configure.in: Patch libtool to avoid the
'copying selected object files ...' messages.
* configure.in: Invoke patch-quiet.sh using AC_CONFIG_COMMANDS so it
runs during a reconfigure too.
Backported from trunk.
2008-07-24 Rodrigo Kumpera <[email protected]>
* configure.in: Change USED_GC_NAME to show if parallel mark is used.
This is shown in mono --version.
2008-07-22 Mark Probst <[email protected]>
* configure.in: New configure option (--with-malloc-mempools) to
make mempools use malloc for every single allocation, which makes
it easier to use debugging/profiling tools like Valgrind.
2008-07-21 Zoltan Varga <[email protected]>
* configure.in: Invoke patch-quiet.sh using AC_CONFIG_COMMANDS so it
runs during a reconfigure too.
Backported from trunk.
2008-07-13 Zoltan Varga <[email protected]>
+1 -1
View File
@@ -22,7 +22,7 @@ For comments, corrections and updates, please contact [email protected]
Contributions for other modules should be under the same license
terms as the rest of the module, or under MIT X11 terms.
If you need further information, please contact [email protected]
If you ned further information, please contact [email protected]
* The Modules
+1 -1
View File
@@ -7,7 +7,7 @@ SUBDIRS = $(libgc_dir) $(eglib_dir) mono $(ikvm_native_dir) support docs data ru
## 'tools' is not normally built
DIST_SUBDIRS = libgc $(eglib_dir) mono ikvm-native support docs data runtime scripts man samples web tools msvc
EXTRA_DIST= mono-uninstalled.pc.in dtrace-prelink.sh build-mingw32.sh LICENSE
EXTRA_DIST= mono-uninstalled.pc.in LICENSE
DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_MCS=false EXTERNAL_RUNTIME=false
+1 -1
View File
@@ -82,7 +82,7 @@ if test "$DIE" -eq 1; then
exit 1
fi
if test x$NOCONFIGURE = x && test -z "$*"; then
if test -z "$*"; then
echo "**Warning**: I am going to run \`configure' with no arguments."
echo "If you wish to pass any to it, please specify them on the"
echo \`$0\'" command line."
+47 -10
View File
@@ -2,26 +2,63 @@
ASPEN_ROOT=/Developer/Platforms/iPhoneOS.platform/Developer
ASPEN_SDK=$ASPEN_ROOT/SDKs/iPhoneOS2.0.sdk/
export PATH=$ASPEN_ROOT/usr/bin:$PATH
ORIG_PATH=$PATH
GLIB_FLAGS=`pkg-config --cflags --libs glib-2.0`
export C_INCLUDE_PATH="$ASPEN_SDK/usr/lib/gcc/arm-apple-darwin9/4.0.1/include:$ASPEN_SDK/usr/include"
export CPLUS_INCLUDE_PATH="$ASPEN_SDK/usr/lib/gcc/arm-apple-darwin9/4.0.1/include:$ASPEN_SDK/usr/include"
export CC=arm-apple-darwin9-gcc-4.0.1
export CXX=arm-apple-darwin9-g++-4.0.1
export CPP="cpp-4.0 -nostdinc -U__powerpc__ -U__i386__ -D__arm__"
export CXXPP="cpp-4.0 -nostdinc -U__powerpc__ -U__i386__ -D__arm__"
export LD=$CC
export LDFLAGS=-Wl,-syslibroot,$ASPEN_SDK
if [ -z "$GLIB_FLAGS" ]; then
echo "pkg-config could not locate glib-2.0 needed for the monoburg step"
exit;
fi
setenv () {
export PATH=$ASPEN_ROOT/usr/bin:$PATH
export C_INCLUDE_PATH="$ASPEN_SDK/usr/lib/gcc/arm-apple-darwin9/4.0.1/include:$ASPEN_SDK/usr/include"
export CPLUS_INCLUDE_PATH="$ASPEN_SDK/usr/lib/gcc/arm-apple-darwin9/4.0.1/include:$ASPEN_SDK/usr/include"
export CC=arm-apple-darwin9-gcc-4.0.1
export CXX=arm-apple-darwin9-g++-4.0.1
export CPP="cpp-4.0 -nostdinc -U__powerpc__ -U__i386__ -D__arm__"
export CXXPP="cpp-4.0 -nostdinc -U__powerpc__ -U__i386__ -D__arm__"
export LD=$CC
export LDFLAGS="-liconv -Wl,-syslibroot,$ASPEN_SDK"
}
unsetenv () {
export PATH=$ORIG_PATH
unset C_INCLUDE_PATH
unset CPLUS_INCLUDE_PATH
unset CC
unset CXX
unset CPP
unset CXXPP
unset LD
unset LDFLAGS
}
export mono_cv_uscore=yes
export cv_mono_sizeof_sunpath=104
export ac_cv_func_posix_getpwuid_r=yes
export ac_cv_func_backtrace_symbols=no
setenv
pushd eglib
./autogen.sh --host=arm-apple-darwin9
popd
./autogen.sh --disable-mcs-build --host=arm-apple-darwin9 --disable-shared-handles --with-tls=pthread --with-sigaltstack=no --with-glib=embedded --with-gc=none $@
./autogen.sh --disable-mcs-build --host=arm-apple-darwin9 --disable-shared-handles --with-tls=pthread --with-sigaltstack=no --with-glib=embedded $@
perl -pi -e 's/MONO_SIZEOF_SUNPATH 0/MONO_SIZEOF_SUNPATH 104/' config.h
perl -pi -e 's/#define HAVE_FINITE 1//' config.h
perl -pi -e 's/#define HAVE_MMAP 1//' config.h
make
unsetenv
pushd mono/monoburg
/usr/bin/gcc -o monoburg ./monoburg.c parser.c -I../.. -pthread -lm $GLIB_FLAGS
make
popd
setenv
make
-110
View File
@@ -1,110 +0,0 @@
#!/bin/bash -e
CURDIR="`pwd`"
CROSS_DIR=${1:-/opt/cross/}
MINGW=${1:-i386-mingw32msvc}
CROSS_BIN_DIR="$CROSS_DIR/bin"
CROSS_DLL_DIR="$CROSS_DIR/$MINGW/bin"
CROSS_PKG_CONFIG_DIR=$CROSS_DIR/$MINGW/lib/pkgconfig
COPY_DLLS="libgio*.dll libglib*.dll libgmodule*.dll libgthread*.dll libgobject*.dll"
PATH=$CROSS_BIN_DIR:$PATH
INSTALL_DESTDIR="$CURDIR/mono-win32"
PROFILES="default net_2_0 net_2_1 net_3_5"
export PATH
function setup ()
{
if [ -d ./.git/svn ]; then
SVN_INFO='git svn info'
elif [ -d ./.svn ]; then
SVN_INFO='svn info'
else
SVN_INFO=""
fi
if [ -n "$SVN_INFO" ]; then
MONO_SVN_REVISION=`$SVN_INFO | grep Revision | sed 's/.*: //'`
MONO_BRANCH=`$SVN_INFO | grep URL | sed -e 's;.*source/;;g' -e 's;/mono;;g'`
else
MONO_SVN_REVISION="rUNKNOWN"
MONO_BRANCH="tarball"
fi
MONO_VERSION=`grep AM_INIT_AUTOMAKE configure.in | cut -d ',' -f 2|tr -d '\)'`
MONO_RELEASE="$MONO_VERSION-$MONO_BRANCH-r$MONO_SVN_REVISION"
MONO_PREFIX="/mono-$MONO_RELEASE"
NOCONFIGURE=yes
export NOCONFIGURE
echo Mono Win32 installation prefix: $MONO_PREFIX
}
function build ()
{
./autogen.sh
if [ -f ./Makefile ]; then
make distclean
fi
if [ ! -d "$CURDIR/build-cross-windows" ]; then
mkdir "$CURDIR/build-cross-windows"
fi
cd "$CURDIR/build-cross-windows"
rm -rf *
../configure --prefix=$MONO_PREFIX --with-crosspkgdir=$CROSS_PKG_CONFIG_DIR --target=$MINGW --host=$MINGW --enable-parallel-mark --program-transform-name=""
make
cd "$CURDIR"
if [ ! -d "$CURDIR/build-cross-windows-mcs" ]; then
mkdir "$CURDIR/build-cross-windows-mcs"
fi
cd "$CURDIR/build-cross-windows-mcs"
rm -rf *
../configure --prefix=$MONO_PREFIX --enable-parallel-mark
make
}
function doinstall ()
{
if [ -d "$INSTALL_DIR" ]; then
rm -rf "$INSTALL_DIR"
fi
cd "$CURDIR/build-cross-windows"
make DESTDIR="$INSTALL_DESTDIR" USE_BATCH_FILES=yes install
cd "$CURDIR/../mcs/mcs"
for p in $PROFILES; do
make DESTDIR="$INSTALL_DESTDIR" PROFILE=$p install || echo "mcs profile $p installation failed"
done
cd "$CURDIR/../mcs/class"
for p in $PROFILES; do
make DESTDIR="$INSTALL_DESTDIR" PROFILE=$p install || echo "class library profile $p installation failed"
done
cd "$CURDIR/../mcs/tools"
for p in $PROFILES; do
make DESTDIR="$INSTALL_DESTDIR" PROFILE=$p install || echo "tools profile $p installation failed"
done
cd "$CURDIR/mono-win32"
for dll in $COPY_DLLS; do
cp -ap "$CROSS_DLL_DIR"/$dll "$INSTALL_DESTDIR/$MONO_PREFIX/bin"
done
rm -f "$CURDIR/mono-win32-$MONO_RELEASE".zip
zip -9r "$CURDIR/mono-win32-$MONO_RELEASE".zip .
}
pushd . > /dev/null
setup
build
doinstall
popd > /dev/null
+12 -48
View File
@@ -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,2.1)
AM_INIT_AUTOMAKE(mono,2.0)
AM_MAINTAINER_MODE
API_VER=1.0
@@ -65,7 +65,6 @@ need_link_unlink=no
# Thread configuration inspired by sleepycat's db
AC_MSG_CHECKING([host platform characteristics])
libgc_threads=no
has_dtrace=no
case "$host" in
*-*-mingw*|*-*-cygwin*)
platform_win32=yes
@@ -78,8 +77,8 @@ case "$host" in
HOST_CC="gcc"
# Windows 2000 is required that includes Internet Explorer 5.01
CPPFLAGS="$CPPFLAGS -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -D_WIN32_IE=0x0501 -D_UNICODE -DUNICODE -DWIN32_THREADS -DFD_SETSIZE=1024"
libmono_cflags="-mno-cygwin -mms-bitfields -mwindows"
libmono_ldflags="-mno-cygwin -mms-bitfields -mwindows"
libmono_cflags="-mno-cygwin"
libmono_ldflags="-mno-cygwin"
libdl=
libgc_threads=win32
gc_default=included
@@ -225,7 +224,6 @@ case "$host" in
libgc_threads=pthreads
# This doesn't seem to work on solaris/x86, but the configure test runs
with_tls=pthread
has_dtrace=yes
;;
*-*-darwin*)
platform_win32=no
@@ -240,7 +238,6 @@ case "$host" in
no_version_script=yes
libdl=
libgc_threads=pthreads
has_dtrace=yes
if test "x$cross_compiling" = "xyes"; then
has_broken_apple_cpp=yes
fi
@@ -296,7 +293,6 @@ AC_SUBST(HOST_CC)
AC_SUBST(BUILD_EXEEXT)
AM_CONDITIONAL(CROSS_COMPILING, [test x$cross_compiling = xyes])
AM_CONDITIONAL(USE_BATCH_FILES, [test x$platform_win32 = xyes -a x$cross_compiling = xyes])
# Set STDC_HEADERS
AC_HEADER_STDC
@@ -495,17 +491,9 @@ embedded)
AC_CONFIG_SUBDIRS(eglib)
;;
system)
if test "x$cross_compiling" = "xyes"; then
pkg_config_path="$PKG_CONFIG_PATH"
unset PKG_CONFIG_PATH
fi
BUILD_GLIB_CFLAGS=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0`
BUILD_GLIB_LIBS=`$PKG_CONFIG --libs glib-2.0 gthread-2.0`
if test "x$cross_compiling" = "xyes"; then
PKG_CONFIG_PATH=$pkg_config_path
export PKG_CONFIG_PATH
fi
## Versions of dependencies
GLIB_REQUIRED_VERSION=1.3.11
@@ -1698,26 +1686,16 @@ if test "x$enable_big_arrays" = "xyes" ; then
AC_DEFINE(MONO_BIG_ARRAYS,1,[Enable the allocation and indexing of arrays greater than Int32.MaxValue])
fi
dnl **************
dnl *** DTRACE ***
dnl **************
AC_ARG_ENABLE(dtrace,[ --enable-dtrace Enable DTrace probes], enable_dtrace=$enableval, enable_dtrace=$has_dtrace)
if test "x$enable_dtrace" = "xyes"; then
if test "x$has_dtrace" = "xno"; then
AC_MSG_ERROR([DTrace probes are not supported on this platform.])
fi
AC_PATH_PROG(DTRACE, [dtrace], [no], [$PATH:/usr/sbin])
if test "x$DTRACE" = "xno"; then
AC_MSG_RESULT([dtrace utility not found, dtrace support disabled.])
enable_dtrace=no
fi
fi
AC_MSG_CHECKING([if DTrace support is requested])
AC_ARG_ENABLE(dtrace,[ --enable-dtrace Enable DTrace probes], enable_dtrace=$enableval, enable_dtrace=no)
AC_MSG_RESULT($enable_dtrace)
dtrace_g=no
if test "x$enable_dtrace" = "xyes"; then
AC_DEFINE(ENABLE_DTRACE, 1, [Enable DTrace probes])
AC_PATH_PROG(DTRACE, [dtrace], [no], [$PATH:/usr/sbin])
if test "x$DTRACE" = "xno"; then
AC_MSG_FAILURE([DTrace requested but not found])
fi
DTRACEFLAGS=
if test "x$ac_cv_sizeof_void_p" = "x8"; then
case "$host" in
@@ -2136,14 +2114,6 @@ AC_ARG_WITH(oprofile,[ --with-oprofile=no,<path> Enable oprofile support (defa
fi
])
MALLOC_MEMPOOLS=no
AC_ARG_WITH(malloc_mempools,[ --with-malloc-mempools=yes,no Use malloc for each single mempool allocation (only for runtime debugging, defaults to NO)],[
if test x$with_malloc_mempools = xyes; then
MALLOC_MEMPOOLS=yes
AC_DEFINE(USE_MALLOC_FOR_MEMPOOLS,1,[Use malloc for each single mempool allocation])
fi
])
AM_CONDITIONAL(HAVE_OPROFILE, test x$OPROFILE = xyes)
AC_SUBST(OPROFILE_CFLAGS)
AC_SUBST(OPROFILE_LIBS)
@@ -2197,11 +2167,7 @@ AC_SUBST(mono_runtime)
mono_cfg_root=$mono_build_root/runtime
if test x$platform_win32 = xyes; then
if test "x$cross_compiling" = "xno"; then
mono_cfg_dir=`cygpath -w -a $mono_cfg_root`\\etc
else
mono_cfg_dir=`echo $mono_cfg_root | tr '/' '\\\'`\\etc
fi
mono_cfg_dir=`cygpath -w -a $mono_cfg_root`\\etc
else
mono_cfg_dir=$mono_cfg_root/etc
fi
@@ -2339,7 +2305,6 @@ data/mono.pc
data/mono-cairo.pc
data/dotnet.pc
data/dotnet35.pc
data/wcf.pc
data/cecil.pc
data/smcs.pc
samples/Makefile
@@ -2439,7 +2404,6 @@ echo "
zlib: $zlib_msg
oprofile: $OPROFILE
BigArrays: $enable_big_arrays
DTrace: $enable_dtrace
$disabled
"
+4 -4
View File
@@ -5,22 +5,22 @@ monodir = $(sysconfdir)/mono
EXTRA_DIST = \
config.in \
browscap.ini mono.supp mono.d README \
mono.pc.in mint.pc.in dotnet.pc.in dotnet35.pc.in wcf.pc.in \
mono.pc.in mint.pc.in dotnet.pc.in dotnet35.pc.in \
mono-cairo.pc.in cecil.pc.in smcs.pc.in
pkgconfigdir = $(libdir)/pkgconfig
if JIT_SUPPORTED
if INTERP_SUPPORTED
pkgconfig_DATA= mono.pc mint.pc dotnet.pc dotnet35.pc wcf.pc mono-cairo.pc cecil.pc smcs.pc
pkgconfig_DATA= mono.pc mint.pc dotnet.pc dotnet35.pc mono-cairo.pc cecil.pc smcs.pc
else
pkgconfig_DATA= mono.pc dotnet.pc dotnet35.pc wcf.pc mono-cairo.pc cecil.pc smcs.pc
pkgconfig_DATA= mono.pc dotnet.pc dotnet35.pc mono-cairo.pc cecil.pc smcs.pc
endif
else
pkgconfig_DATA= mint.pc mono-cairo.pc cecil.pc smcs.pc
endif
DISTCLEANFILES= mono.pc mint.pc dotnet.pc dotnet35.pc wcf.pc mono-cairo.pc cecil.pc smcs.pc
DISTCLEANFILES= mono.pc mint.pc dotnet.pc dotnet35.pc mono-cairo.pc cecil.pc smcs.pc
mono_DATA = config \
browscap.ini
+4
View File
@@ -1,3 +1,7 @@
2008-08-28 Zoltan Varga <[email protected]>
* machine.config: Fix syntax error.
2008-03-23 Dean Brettle <[email protected]>
* Makefile.am: added Browsers/Compat.browser
+1 -1
View File
@@ -22,7 +22,7 @@
<section name="anonymousIdentification" type="System.Web.Configuration.AnonymousIdentificationSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
<section name="authentication" type="System.Web.Configuration.AuthenticationSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
<section name="authorization" type="System.Web.Configuration.AuthorizationSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="browserCaps" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />/>
<section name="browserCaps" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="clientTarget" type="System.Web.Configuration.ClientTargetSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="compilation" type="System.Web.Configuration.CompilationSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="customErrors" type="System.Web.Configuration.CustomErrorsSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
-5
View File
@@ -1,5 +0,0 @@
Name: WCF
Description: References WCF for compilation
Version: @VERSION@
Libs: -r:System.Runtime.Serialization.dll -r:System.IdentityModel.dll -r:System.IdentityModel.Selectors.dll -r:System.ServiceModel.dll -r:System.ServiceModel.Web.dll
-13
View File
@@ -42,19 +42,6 @@ MONO_ARCH_RGCTX_REG can be the same as the IMT register for now, but
this might change in the future when we implement virtual generic
method calls (more) efficiently.
This register lifetime starts at the call site that loads it and
ends in the callee prologue when it is either discarded or stored
into a local variable.
It's better to avoid registers used for argument passing for the RGCTX
as it would make the code dealing with calling conventions code a lot harder.
** Method prologue
Generic shared code that have a RGCTX receive it in RGCTX_REG. There must be
a check in mono_arch_emit_prolog for MonoCompile::rgctx_var and if set
store it. See mini-x86.c for reference.
** Dealing with types
Types passed to arch functions might be type parameters
-24
View File
@@ -103,30 +103,6 @@ In the cases above, the number of generated trampolines goes from
5400 for the IronPython case and from 800 to 150 for the hello world
case.
Kinds of Trampolines and Thunks
===============================
This is a list of the trampolines and thunks used in Mono:
- create_fnptr
- load_aot_method
- imt thunk
Interface Method Table, this is used to dispatch calls to
interface methods.
- jump table
- debugger code
- exception call filter
- trampoline (various types)
- throw corlib exception
- restore context
- throw exception by name
- handle stack overflow
- throw exception
- delegate invoke implementation
- cpuid code
Implementation for x86/x86-64
=============================
+3 -40
View File
@@ -1,44 +1,8 @@
2008-08-27 Bill Holmes <[email protected]>
2008-08-28 Bill Holmes <[email protected]>
* glib.h, gunicode.c : Fixing some compiler errors.
Backport of r111875
Contributed under MIT/X11 license.
2008-08-20 Mike Voorhees <[email protected]>
* Patch from Mike Voorhees to fix various problems with
g_utf8_validate compared to the glib implementation and unit tests
to ensure that there are no regressions.
From a mailing list post to mono-devel-list on August 19th, 2008
[Mono-dev] utf8 related patches. Please review.
2008-08-20 Mike Voorhees <[email protected]>
* src/glib.h : Adding declarations for g_utf8_strlen, g_utf8_get_char,
and g_utf8_next_char.
* src/gunicode.c : Adding implementation for g_utf8_strlen, g_utf8_get_char,
and g_utf8_next_char.
* src/gunicode.c : Rewrote g_utf8_validate.
* test/utf8.c Adding tests for g_utf8_strlen, g_utf8_get_char,
g_utf8_next_char, and g_utf8_validate.
Contributed under MIT/X11 license.
2008-08-05 Andreas Faerber <[email protected]>
* autogen.sh: Suppress arguments warning for NOCONFIGURE.
Contributed under MIT/X11 license.
2008-08-04 Bill Holmes <[email protected]>
* test/tests.h, test/Makefile.am, test/memory.c : Adding memory tests to test
allocation routines return NULL when 0 size is passed in.
* src/glib.h : Adding a c++ definition for G_BEGIN_DECLS.
Contributed under MIT/X11 license.
@@ -1184,4 +1148,3 @@ Mon Oct 9 12:59:16 CEST 2006 Paolo Molaro <[email protected]>
untested at this point.
+1 -1
View File
@@ -82,7 +82,7 @@ if test "$DIE" -eq 1; then
exit 1
fi
if test x$NOCONFIGURE = x && test -z "$*"; then
if test -z "$*"; then
echo "**Warning**: I am going to run \`configure' with no arguments."
echo "If you wish to pass any to it, please specify them on the"
echo \`$0\'" command line."
+5 -13
View File
@@ -93,8 +93,13 @@ typedef uint16_t gunichar2;
#define EGLIB_TOSTRING(x) EGLIB_STRINGIFY(x)
#define G_STRLOC __FILE__ ":" EGLIB_TOSTRING(__LINE__) ":"
#ifdef __cplusplus
#define G_BEGIN_DECLS extern "C" {
#define G_END_DECLS }
#else
#define G_BEGIN_DECLS
#define G_END_DECLS
#endif
#define G_CONST_RETURN const
@@ -760,15 +765,6 @@ gboolean g_markup_parse_context_end_parse (GMarkupParseContext *context,
/*
* Character set conversion
*/
/*
* Index into the table below with the first byte of a UTF-8 sequence to
* get the number of trailing bytes that are supposed to follow it.
* Note that *legal* UTF-8 values can't have 4 or 5-bytes. The table is
* left as-is for anyone who may want to do such conversion, which was
* allowed in earlier algorithms.
*/
extern const gchar g_trailingBytesForUTF8[256];
gboolean g_get_charset (G_CONST_RETURN char **charset);
gchar *g_locale_to_utf8 (const gchar *opsysstring, gssize len,
gsize *bytes_read, gsize *bytes_written,
@@ -781,9 +777,6 @@ gchar *g_convert (const gchar *str, gssize len,
const gchar *to_codeset, const gchar *from_codeset,
gsize *bytes_read, gsize *bytes_written, GError **error);
gboolean g_utf8_validate (const gchar *str, gssize max_len, const gchar **end);
gunichar g_utf8_get_char (const gchar *src);
glong g_utf8_strlen (const gchar *str, gssize max);
#define g_utf8_next_char(p) p + (g_trailingBytesForUTF8[(guchar)(*p)] + 1)
/*
* Empty thread functions, not used by eglib
@@ -836,4 +829,3 @@ glong g_utf8_strlen (const gchar *str, gssize max);
#endif
+52 -125
View File
@@ -50,35 +50,6 @@ typedef int iconv_t;
static char *my_charset;
static gboolean is_utf8;
/*
* Character set conversion
*/
/*
* Index into the table below with the first byte of a UTF-8 sequence to
* get the number of trailing bytes that are supposed to follow it.
* Note that *legal* UTF-8 values can't have 4 or 5-bytes. The table is
* left as-is for anyone who may want to do such conversion, which was
* allowed in earlier algorithms.
*/
const gchar g_trailingBytesForUTF8 [256] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 3,3,3,3,3,3,3,3,4,4,4,4,5,5,0,0
};
/*
* Magic values subtracted from a buffer value during UTF8 conversion.
* This table contains as many values as there might be trailing bytes
* in a UTF-8 sequence.
*/
static const gulong offsetsFromUTF8[6] = { 0x00000000UL, 0x00003080UL, 0x000E2080UL,
0x03C82080UL, 0xFA082080UL, 0x82082080UL };
GUnicodeType
g_unichar_type (gunichar c)
{
@@ -254,105 +225,61 @@ g_locale_from_utf8 (const gchar *utf8string, gssize len, gsize *bytes_read, gsiz
* Return value: true if @utf is valid.
**/
gboolean
g_utf8_validate (const gchar *str, gssize max_len, const gchar **end)
g_utf8_validate (const gchar *utf, gssize max_len, const gchar **end)
{
gssize byteCount = 0;
gboolean retVal = TRUE;
gboolean lastRet = TRUE;
guchar* ptr = (guchar*) str;
guint length;
guchar a;
guchar* srcPtr;
if (max_len == 0)
return 0;
else if (max_len < 0)
byteCount = max_len;
while (*ptr != 0 && byteCount <= max_len) {
length = g_trailingBytesForUTF8 [*ptr] + 1;
srcPtr = (guchar*) ptr + length;
switch (length) {
default: retVal = FALSE;
/* Everything else falls through when "TRUE"... */
case 4: if ((a = (*--srcPtr)) < (guchar) 0x80 || a > (guchar) 0xBF) retVal = FALSE;
if ((a == (guchar) 0xBF || a == (guchar) 0xBE) && *(srcPtr-1) == (guchar) 0xBF) {
if (*(srcPtr-2) == (guchar) 0x8F || *(srcPtr-2) == (guchar) 0x9F ||
*(srcPtr-2) == (guchar) 0xAF || *(srcPtr-2) == (guchar) 0xBF)
retVal = FALSE;
}
case 3: if ((a = (*--srcPtr)) < (guchar) 0x80 || a > (guchar) 0xBF) retVal = FALSE;
case 2: if ((a = (*--srcPtr)) < (guchar) 0x80 || a > (guchar) 0xBF) retVal = FALSE;
int ix;
g_return_val_if_fail (utf != NULL, FALSE);
switch (*ptr) {
/* no fall-through in this inner switch */
case 0xE0: if (a < (guchar) 0xA0) retVal = FALSE; break;
case 0xED: if (a > (guchar) 0x9F) retVal = FALSE; break;
case 0xEF: if (a == (guchar)0xB7 && (*(srcPtr+1) > (guchar) 0x8F && *(srcPtr+1) < 0xB0)) retVal = FALSE;
if (a == (guchar)0xBF && (*(srcPtr+1) == (guchar) 0xBE || *(srcPtr+1) == 0xBF)) retVal = FALSE; break;
case 0xF0: if (a < (guchar) 0x90) retVal = FALSE; break;
case 0xF4: if (a > (guchar) 0x8F) retVal = FALSE; break;
default: if (a < (guchar) 0x80) retVal = FALSE;
}
case 1: if (*ptr >= (guchar ) 0x80 && *ptr < (guchar) 0xC2) retVal = FALSE;
}
if (*ptr > (guchar) 0xF4)
retVal = FALSE;
//If the string is invalid, set the end to the invalid byte.
if (!retVal && lastRet) {
if (max_len == -1)
max_len = strlen (utf);
/*
* utf is a string of 1, 2, 3 or 4 bytes. The valid strings
* are as follows (in "bit format"):
* 0xxxxxxx valid 1-byte
* 110xxxxx 10xxxxxx valid 2-byte
* 1110xxxx 10xxxxxx 10xxxxxx valid 3-byte
* 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx valid 4-byte
*/
for (ix = 0; ix < max_len;) { /* string is 0-terminated */
unsigned char c;
c = utf[ix];
if ((c & 0x80) == 0x00) { /* 1-byte code, starts with 10 */
ix++;
} else if ((c & 0xe0) == 0xc0) {/* 2-byte code, starts with 110 */
if (((ix+1) >= max_len) || (utf[ix+1] & 0xc0 ) != 0x80){
if (end != NULL)
*end = &utf [ix];
return FALSE;
}
ix += 2;
} else if ((c & 0xf0) == 0xe0) {/* 3-byte code, starts with 1110 */
if (((ix + 2) >= max_len) ||
((utf[ix+1] & 0xc0) != 0x80) ||
((utf[ix+2] & 0xc0) != 0x80)){
if (end != NULL)
*end = &utf [ix];
return FALSE;
}
ix += 3;
} else if ((c & 0xf8) == 0xf0) {/* 4-byte code, starts with 11110 */
if (((ix + 3) >= max_len) ||
((utf[ix+1] & 0xc0) != 0x80) ||
((utf[ix+2] & 0xc0) != 0x80) ||
((utf[ix+3] & 0xc0) != 0x80)){
if (end != NULL)
*end = &utf [ix];
return FALSE;
}
ix += 4;
} else {/* unknown encoding */
if (end != NULL)
*end = (gchar*) ptr;
lastRet = FALSE;
*end = &utf [ix];
return FALSE;
}
ptr += length;
if(max_len > 0)
byteCount += length;
}
if (retVal && end != NULL)
*end = (gchar*) ptr;
return retVal;
}
/**
* g_utf8_get_char
* @src: Pointer to UTF-8 encoded character.
*
* Return value: UTF-16 value of @src
**/
gunichar
g_utf8_get_char (const gchar *src)
{
gunichar ch = 0;
guchar* ptr = (guchar*) src;
gushort extraBytesToRead = g_trailingBytesForUTF8 [*ptr];
switch (extraBytesToRead) {
case 5: ch += *ptr++; ch <<= 6; // remember, illegal UTF-8
case 4: ch += *ptr++; ch <<= 6; // remember, illegal UTF-8
case 3: ch += *ptr++; ch <<= 6;
case 2: ch += *ptr++; ch <<= 6;
case 1: ch += *ptr++; ch <<= 6;
case 0: ch += *ptr;
}
ch -= offsetsFromUTF8 [extraBytesToRead];
return ch;
}
glong
g_utf8_strlen (const gchar *str, gssize max)
{
gssize byteCount = 0;
guchar* ptr = (guchar*) str;
glong length = 0;
if (max == 0)
return 0;
else if (max < 0)
byteCount = max;
while (*ptr != 0 && byteCount <= max) {
guint cLen = g_trailingBytesForUTF8 [*ptr] + 1;
if (max > 0 && (byteCount + cLen) > max)
return length;
ptr += cLen;
length++;
if (max > 0)
byteCount += cLen;
}
return length;
return TRUE;
}
+1 -2
View File
@@ -23,8 +23,7 @@ SOURCES = \
markup.c \
utf8.c \
endian.c \
module.c \
memory.c
module.c
test_eglib_SOURCES = $(SOURCES)
-40
View File
@@ -1,40 +0,0 @@
#include <glib.h>
#include "test.h"
RESULT
test_memory_zero_size_allocations ()
{
gpointer p;
p = g_malloc (0);
if (p)
return FAILED ("Calling g_malloc with size zero should return NULL.");
p = g_malloc0 (0);
if (p)
return FAILED ("Calling g_malloc0 with size zero should return NULL.");
p = g_realloc (NULL, 0);
if (p)
return FAILED ("Calling g_realloc with size zero should return NULL.");
p = g_new (int, 0);
if (p)
return FAILED ("Calling g_new with size zero should return NULL.");
p = g_new0 (int, 0);
if (p)
return FAILED ("Calling g_new0 with size zero should return NULL.");
return OK;
}
static Test memory_tests [] = {
{ "zero_size_allocations", test_memory_zero_size_allocations},
{NULL, NULL}
};
DEFINE_TEST_GROUP_INIT(memory_tests_init, memory_tests)
-2
View File
@@ -21,7 +21,6 @@ DEFINE_TEST_GROUP_INIT_H(markup_tests_init);
DEFINE_TEST_GROUP_INIT_H(utf8_tests_init);
DEFINE_TEST_GROUP_INIT_H(endian_tests_init);
DEFINE_TEST_GROUP_INIT_H(module_tests_init);
DEFINE_TEST_GROUP_INIT_H(memory_tests_init);
static Group test_groups [] = {
{"string", string_tests_init},
@@ -45,7 +44,6 @@ static Group test_groups [] = {
{"utf8", utf8_tests_init},
{"endian", endian_tests_init},
{"module", module_tests_init},
{"memory", memory_tests_init},
{NULL, NULL}
};
-156
View File
@@ -483,158 +483,6 @@ test_utf16_to_ucs4 ()
return OK;
}
RESULT
test_utf8_strlen ()
{
gchar word1 [] = {0xC2, 0x82,0x45,0xE1, 0x81, 0x83,0x58,0xF1, 0x82, 0x82, 0x82,'\0'};//Valid, len = 5
gchar word2 [] = {0xF1, 0x82, 0x82, 0x82,0xC2, 0x82,0x45,0xE1, 0x81, 0x83,0x58,'\0'};//Valid, len = 5
gchar word3 [] = {'h','e',0xC2, 0x82,0x45,'\0'}; //Valid, len = 4
gchar word4 [] = {0x62,0xC2, 0x82,0x45,0xE1, 0x81, 0x83,0x58,'\0'}; //Valid, len = 5
glong len = 0;
//Test word1
len = g_utf8_strlen (word1,-1);
if (len != 5)
return FAILED ("Word1 expected length of 5, but was %i", len);
//Do tests with different values for max parameter.
len = g_utf8_strlen (word1,1);
if (len != 0)
return FAILED ("Word1, max = 1, expected length of 0, but was %i", len);
len = g_utf8_strlen (word1,2);
if (len != 1)
return FAILED ("Word1, max = 1, expected length of 1, but was %i", len);
len = g_utf8_strlen (word1,3);
if (len != 2)
return FAILED ("Word1, max = 2, expected length of 2, but was %i", len);
//Test word2
len = g_utf8_strlen (word2,-1);
if (len != 5)
return FAILED ("Word2 expected length of 5, but was %i", len);
//Test word3
len = g_utf8_strlen (word3,-1);
if (len != 4)
return FAILED ("Word3 expected length of 4, but was %i", len);
//Test word4
len = g_utf8_strlen (word4,-1);
if (len != 5)
return FAILED ("Word4 expected length of 5, but was %i", len);
//Test null case
len = g_utf8_strlen(NULL,0);
if (len != 0)
return FAILED ("Expected passing null to result in a length of 0");
return OK;
}
RESULT
test_utf8_get_char()
{
gchar word1 [] = {0xC2, 0x82,0x45,0xE1, 0x81, 0x83,0x58,0xF1, 0x82, 0x82, 0x82,'\0'}; //Valid, len = 5
gunichar value = g_utf8_get_char (&word1 [0]);
if (value != 0x82UL)
return FAILED ("Expected value of 0x82, but was %x", value);
value = g_utf8_get_char (&word1 [2]);
if (value != 0x45UL)
return FAILED ("Expected value of 0x45, but was %x", value);
value = g_utf8_get_char (&word1 [3]);
if (value != 0x1043UL)
return FAILED ("Expected value of 0x1043, but was %x", value);
value = g_utf8_get_char (&word1 [6]);
if (value != 0x58UL)
return FAILED ("Expected value of 0x58, but was %x", value);
value = g_utf8_get_char (&word1 [7]);
if (value != 0x42082UL)
return FAILED ("Expected value of 0x42082, but was %x", value);
return OK;
}
RESULT
test_utf8_next_char()
{
gchar word1 [] = {0xC2, 0x82,0x45,0xE1, 0x81, 0x83,0x58,0xF1, 0x82, 0x82, 0x82,'\0'}; //Valid, len = 5
gchar word2 [] = {0xF1, 0x82, 0x82, 0x82,0xC2, 0x82,0x45,0xE1, 0x81, 0x83,0x58,'\0'}; //Valid, len = 5
gchar word1ExpectedValues [] = {0xC2, 0x45,0xE1, 0x58, 0xF1};
gchar word2ExpectedValues [] = {0xF1, 0xC2, 0x45, 0xE1, 0x58};
gchar* ptr = word1;
gint count = 0;
//Test word1
while (*ptr != 0) {
if (count > 4)
return FAILED ("Word1 has gone past its expected length");
if (*ptr != word1ExpectedValues[count])
return FAILED ("Word1 has an incorrect next_char at index %i", count);
ptr = g_utf8_next_char (ptr);
count++;
}
//Test word2
count = 0;
ptr = word2;
while (*ptr != 0) {
if (count > 4)
return FAILED ("Word2 has gone past its expected length");
if (*ptr != word2ExpectedValues[count])
return FAILED ("Word2 has an incorrect next_char at index %i", count);
ptr = g_utf8_next_char (ptr);
count++;
}
return OK;
}
RESULT
test_utf8_validate()
{
gchar invalidWord1 [] = {0xC3, 0x82, 0xC1,0x90,'\0'}; //Invalid, 1nd oct Can't be 0xC0 or 0xC1
gchar invalidWord2 [] = {0xC1, 0x89, 0x60, '\0'}; //Invalid, 1st oct can not be 0xC1
gchar invalidWord3 [] = {0xC2, 0x45,0xE1, 0x81, 0x83,0x58,'\0'}; //Invalid, oct after 0xC2 must be > 0x80
gchar validWord1 [] = {0xC2, 0x82, 0xC3,0xA0,'\0'}; //Valid
gchar validWord2 [] = {0xC2, 0x82,0x45,0xE1, 0x81, 0x83,0x58,0xF1, 0x82, 0x82, 0x82,'\0'}; //Valid
const gchar* end;
gboolean retVal = g_utf8_validate (invalidWord1, -1, &end);
if (retVal != FALSE)
return FAILED ("Expected invalidWord1 to be invalid");
if (end != &invalidWord1 [2])
return FAILED ("Expected end parameter to be pointing to invalidWord1[2]");
end = NULL;
retVal = g_utf8_validate (invalidWord2, -1, &end);
if (retVal != FALSE)
return FAILED ("Expected invalidWord2 to be invalid");
if (end != &invalidWord2 [0])
return FAILED ("Expected end parameter to be pointing to invalidWord2[0]");
end = NULL;
retVal = g_utf8_validate (invalidWord3, -1, &end);
if (retVal != FALSE)
return FAILED ("Expected invalidWord3 to be invalid");
if (end != &invalidWord3 [0])
return FAILED ("Expected end parameter to be pointing to invalidWord3[1]");
end = NULL;
retVal = g_utf8_validate (validWord1, -1, &end);
if (retVal != TRUE)
return FAILED ("Expected validWord1 to be valid");
if (end != &validWord1 [4])
return FAILED ("Expected end parameter to be pointing to validWord1[4]");
end = NULL;
retVal = g_utf8_validate (validWord2, -1, &end);
if (retVal != TRUE)
return FAILED ("Expected validWord2 to be valid");
if (end != &validWord2 [11])
return FAILED ("Expected end parameter to be pointing to validWord2[11]");
return OK;
}
/*
* test initialization
@@ -648,10 +496,6 @@ static Test utf8_tests [] = {
{"g_unichar_xdigit_value", test_xdigit },
{"g_ucs4_to_utf16", test_ucs4_to_utf16 },
{"g_utf16_to_ucs4", test_utf16_to_ucs4 },
{"g_utf8_strlen", test_utf8_strlen },
{"g_utf8_get_char", test_utf8_get_char },
{"g_utf8_next_char", test_utf8_next_char },
{"g_utf8_validate", test_utf8_validate },
{NULL, NULL}
};
+12 -13
View File
@@ -1,20 +1,19 @@
2008-09-29 Geoff Norton <[email protected]>
* include/private/gcconfig.h: Make Darwin/ARM use mmap() instead of
sbrk() for its allocator implementation.
2008-08-28 Geoff Norton <[email protected]>
* darwin_stop_world.c:
* include/private/gcconfig.h: Add support for Darwin/ARM
2008-08-12 Geoff Norton <[email protected]>
* pthread_support.c: GCC shipped with SLES9 ppc gets confused with our current
GC_setspecific define. Unfold the define into a static inline on all platforms
except ppc where it is a static leaf function.
2008-08-10 Zoltan Varga <[email protected]>
* include/private/gc_locks.h: Add amd64 support so parallel mark works on
amd64 too.
2008-08-05 Andreas Färber <[email protected]>
* autogen.sh: Suppress arguments warning for NOCONFIGURE.
Contributed under MIT/X11 license.
2008-08-03 Zoltan Varga <[email protected]>
* pthread_support.c (GC_thread_exit_proc): Null out the tls key to prevent the
@@ -33,8 +32,8 @@
* include/gc.h: Add GC_DllMain.
* win32_threads.c: Rename DllMain to GC_DllMain.
Contributed under MIT/X11 license.
Contributed under MIT/X11 license.
2008-04-15 Jonathan Chambers <[email protected]>
* include/private/gcconfig.h: Backport GC7 code to support Win64.
+1 -1
View File
@@ -67,7 +67,7 @@ if test "$DIE" -eq 1; then
exit 1
fi
if test x$NOCONFIGURE = x && test -z "$*"; then
if test -z "$*"; then
echo "**Warning**: I am going to run \`configure' with no arguments."
echo "If you wish to pass any to it, please specify them on the"
echo \`$0\'" command line."
+52 -2
View File
@@ -79,6 +79,9 @@ void GC_push_all_stacks() {
#elif defined(I386)
i386_thread_state_t state;
mach_msg_type_number_t thread_state_count = i386_THREAD_STATE_COUNT;
#elif defined(ARM)
arm_thread_state_t state;
mach_msg_type_number_t thread_state_count = ARM_THREAD_STATE_COUNT;
#else
# error FIXME for non-x86 || ppc architectures
mach_msg_type_number_t thread_state_count = MACHINE_THREAD_STATE_COUNT;
@@ -193,6 +196,26 @@ void GC_push_all_stacks() {
GC_push_one(state.r30);
GC_push_one(state.r31);
#endif
#elif defined(ARM)
lo = (void*)state.__sp;
GC_push_one(state.__r[0]);
GC_push_one(state.__r[1]);
GC_push_one(state.__r[2]);
GC_push_one(state.__r[3]);
GC_push_one(state.__r[4]);
GC_push_one(state.__r[5]);
GC_push_one(state.__r[6]);
GC_push_one(state.__r[7]);
GC_push_one(state.__r[8]);
GC_push_one(state.__r[9]);
GC_push_one(state.__r[10]);
GC_push_one(state.__r[11]);
GC_push_one(state.__r[12]);
/* GC_push_one(state.__sp); */
GC_push_one(state.__lr);
GC_push_one(state.__pc);
GC_push_one(state.__cpsr);
#else
# error FIXME for non-x86 || ppc architectures
#endif
@@ -318,7 +341,7 @@ void GC_push_all_stacks() {
GC_push_one(info.r30);
GC_push_one(info.r31);
#endif
# else
# elif defined(I386) /* !POWERPC */
/* FIXME: Remove after testing: */
WARN("This is completely untested and likely will not work\n", 0);
i386_thread_state_t info;
@@ -366,7 +389,34 @@ void GC_push_all_stacks() {
GC_push_one(info.fs);
GC_push_one(info.gs);
#endif
# endif /* !POWERPC */
# elif defined(ARM) /* !I386 */
arm_thread_state_t info;
mach_msg_type_number_t outCount = THREAD_STATE_MAX;
r = thread_get_state(thread, GC_MACH_THREAD_STATE_FLAVOR,
(natural_t *)&info, &outCount);
if(r != KERN_SUCCESS) continue;
lo = (void*)info.__sp;
hi = (ptr_t)FindTopOfStack(info.__sp);
GC_push_one(info.__r[0]);
GC_push_one(info.__r[1]);
GC_push_one(info.__r[2]);
GC_push_one(info.__r[3]);
GC_push_one(info.__r[4]);
GC_push_one(info.__r[5]);
GC_push_one(info.__r[6]);
GC_push_one(info.__r[7]);
GC_push_one(info.__r[8]);
GC_push_one(info.__r[9]);
GC_push_one(info.__r[10]);
GC_push_one(info.__r[11]);
GC_push_one(info.__r[12]);
/* GC_push_one(info.__sp); */
GC_push_one(info.__lr);
GC_push_one(info.__pc);
GC_push_one(info.__cpsr);
# endif /* !ARM */
}
# if DEBUG_THREADS
GC_printf3("Darwin: Stack for thread 0x%lx = [%lx,%lx)\n",
-23
View File
@@ -437,29 +437,6 @@
}
# endif /* I386 */
# if defined(X86_64)
# if !defined(GENERIC_COMPARE_AND_SWAP)
/* Returns TRUE if the comparison succeeded. */
inline static GC_bool GC_compare_and_exchange(volatile GC_word *addr,
GC_word old,
GC_word new_val)
{
char result;
__asm__ __volatile__("lock; cmpxchgq %2, %0; setz %1"
: "+m"(*(addr)), "=r"(result)
: "r" (new_val), "a"(old) : "memory");
return (GC_bool) result;
}
# endif /* !GENERIC_COMPARE_AND_SWAP */
inline static void GC_memory_barrier()
{
/* We believe the processor ensures at least processor */
/* consistent ordering. Thus a compiler barrier */
/* should suffice. */
__asm__ __volatile__("" : : : "memory");
}
# endif /* X86_64 */
# if defined(POWERPC)
# if !defined(GENERIC_COMPARE_AND_SWAP)
# if CPP_WORDSZ == 64
+20 -3
View File
@@ -59,10 +59,15 @@
# define FREEBSD
# endif
/* And one for Darwin: */
# if defined(macosx) || (defined(__APPLE__) && defined(__MACH__))
# define DARWIN
# endif
/* Determine the machine type: */
# if defined(__arm__) || defined(__thumb__)
# define ARM32
# if !defined(LINUX) && !defined(NETBSD)
# if !defined(LINUX) && !defined(NETBSD) && !defined(DARWIN)
# define NOSYS
# define mach_type_known
# endif
@@ -297,8 +302,7 @@
# define MACOS
# define mach_type_known
# endif
# if defined(macosx) || (defined(__APPLE__) && defined(__MACH__))
# define DARWIN
# ifdef DARWIN
# if defined(__ppc__) || defined(__ppc64__)
# define POWERPC
# define mach_type_known
@@ -326,6 +330,10 @@
/* There seems to be some issues with trylock hanging on darwin. This
should be looked into some more */
# define NO_PTHREAD_TRYLOCK
# elif defined(__arm__)
# define ARM
# define mach_type_known
# define DARWIN_DONT_PARSE_STACK
# endif
# endif
# if defined(NeXT) && defined(mc68000)
@@ -1883,6 +1891,15 @@
# define OS_TYPE "MSWINCE"
# define DATAEND /* not needed */
# endif
# ifdef DARWIN
# define OS_TYPE "DARWIN"
# define DATASTART ((ptr_t) get_etext())
# define DATAEND ((ptr_t) get_end())
# define STACKBOTTOM ((ptr_t) 0x30000000)
# define USE_MMAP
# define USE_MMAP_ANON
# define USE_MUNMAP
# endif
# ifdef NOSYS
/* __data_start is usually defined in the target linker script. */
extern int __data_start[];
+1 -12
View File
@@ -4,23 +4,12 @@
2008-08-22 Massimiliano Mantione <[email protected]>
* mono.1: Restore original nonvisible formatting (' ', '\-', and '"'
were added everywhere by mistake in r109428).
2008-08-21 Massimiliano Mantione <[email protected]>
* mono.1: Updated description of the logging profiler.
* mono.1: Updated description of the logging profiler from trunk.
2008-08-08 Zoltan Varga <[email protected]>
* mono.1: Remove no-dlsym aot option for now.
* mono.1: Document the 'static' aot option.
2008-08-01 Massimiliano Mantione <[email protected]>
* mono.1: Updated description of the logging profiler.
2008-04-22 Robert Jordan <[email protected]>
* mono.1: Document MONO_DEBUG=no-gdb-backtrace.
+5 -13
View File
@@ -5,7 +5,11 @@
.\" Author:
.\" Miguel de Icaza ([email protected])
.\"
.TH Mono "Mono 1.0"
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.TH Mono "Mono 2.0"
.SH NAME
mono \- Mono's ECMA-CLI native code generator (Just-in-Time and Ahead-of-Time)
.SH SYNOPSIS
@@ -244,9 +248,6 @@ Unsafe code is not allowed but P/Invoke is. This mode should
not allow managed code to crash mono. The verification is not as
strict as ECMA 335 standard in order to stay compatible with the MS
runtime.
.TP
The security system acts on user code: code contained in mscorlib or
the global assembly cache is always trusted.
.ne
.RE
.TP
@@ -254,15 +255,6 @@ the global assembly cache is always trusted.
Configures the virtual machine to be better suited for server
operations (currently, a no-op).
.TP
\fB--verify-all\fR
Verifies mscorlib and assemblies in the global
assembly cache for valid IL, and all user code for IL
verifiability.
This is different from \fB--security\fR's verifiable
or validil in that these options only check user code and skip
mscorlib and assemblies located on the global assembly cache.
.TP
\fB-V\fR, \fB--version\fR
Prints JIT version information (system configuration, release number
and branch names if available).
-5
View File
@@ -1,8 +1,3 @@
2008-08-04 Zoltan Varga <[email protected]>
* rules.make (PROFILE): If no profile is passed on the command line, make
net_2_0 the default.
2008-06-30 Marek Safar <[email protected]>
* platforms/linux.make: Enable mcs optimizations.
-8
View File
@@ -1,11 +1,3 @@
2008-08-20 Jb Evain <[email protected]>
* Consts.cs.in: add NET_3_0 case for wcf.
2008-07-24 Gert Driesen <[email protected]>
* Consts.cs.in; Update FxFileVersion and VsFileVersion for 2.0 SP1.
2008-04-13 Jb Evain <[email protected]>
* Consts.cs.in: update the 2.1 profile versions.
+2 -7
View File
@@ -57,11 +57,6 @@ internal
public const string FxFileVersion = "3.5.21022.8";
public const string VsVersion = "0.0.0.0"; // Useless ?
#elif NET_3_0
public const string FxVersion = "3.0.0.0";
public const string VsVersion = "8.0.0.0";
public const string FxFileVersion = "3.0.4506.648";
public const string VsFileVersion = "6.0.6001.17014";
#elif NET_2_1
// Versions of .NET Framework for SilverLight
public const string FxVersion = "2.0.5.0";
@@ -72,8 +67,8 @@ internal
// Versions of .NET Framework 2.0 RTM
public const string FxVersion = "2.0.0.0";
public const string VsVersion = "8.0.0.0";
public const string FxFileVersion = "2.0.50727.1433";
public const string VsFileVersion = "8.0.50727.1433";
public const string FxFileVersion = "2.0.50727.42";
public const string VsFileVersion = "8.0.50727.42";
#elif NET_1_1
// Versions of .NET Framework 1.1 SP1
public const string FxVersion = "1.0.5000.0";
+1 -1
View File
@@ -89,7 +89,7 @@ endif
# Rest of the configuration
ifndef PROFILE
PROFILE = net_2_0
PROFILE = default
endif
include $(topdir)/build/profiles/$(PROFILE).make
-8
View File
@@ -1,11 +1,3 @@
2008-08-21 Jb Evain <[email protected]>
* Makefile: add wcf and cardspace to the build.
2008-07-31 Jb Evain <[email protected]>
* Makefile: update net_2_1_bootstrap_SUBDIRS to only build
corlib and System.
2008-05-22 Andreia Gaita <[email protected]>
* Makefile, Mono.Mozilla, Mono.WebBrowser: Long overdue rename of
+3
View File
@@ -34,6 +34,9 @@ namespace I18N.CJK
{
DbcsConvert gb2312 = GetConvert ();
int index = 0;
#if NET_2_0
EncoderFallbackBuffer buffer = null;
#endif
int length = 0;
while (count-- > 0) {
char c = chars[index++];
+3
View File
@@ -123,6 +123,9 @@ namespace I18N.CJK
int index = 0;
int length = 0;
DbcsConvert convert = GetConvert ();
#if NET_2_0
EncoderFallbackBuffer buffer = null;
#endif
// 00 00 - FF FF
while (count-- > 0) {
+3
View File
@@ -33,6 +33,9 @@ namespace I18N.CJK
DbcsConvert convert = GetConvert ();
int index = 0;
int length = 0;
#if NET_2_0
EncoderFallbackBuffer buffer = null;
#endif
while (count-- > 0) {
char c = chars[index++];
+2 -4
View File
@@ -33,6 +33,7 @@ namespace I18N.Common
}
#if NET_2_0
[CLSCompliant (false)]
public unsafe void HandleFallback (ref EncoderFallbackBuffer buffer,
char* chars, ref int charIndex, ref int charCount,
byte* bytes, ref int byteIndex, ref int byteCount)
@@ -183,15 +184,11 @@ namespace I18N.Common
public abstract class MonoEncoder : Encoder
{
#if NET_2_0
MonoEncoding encoding;
#endif
public MonoEncoder (MonoEncoding encoding)
{
#if NET_2_0
this.encoding = encoding;
#endif
}
public override int GetByteCount (
@@ -260,6 +257,7 @@ namespace I18N.Common
return GetBytesImpl (chars, charCount, bytes, byteCount, flush);
}
//[CLSCompliant (false)]
public unsafe void HandleFallback (
char* chars, ref int charIndex, ref int charCount,
byte* bytes, ref int byteIndex, ref int byteCount)
+1 -1
View File
@@ -35,7 +35,7 @@ using System.Resources;
public sealed class Strings
{
// Cached copy of the resources for this assembly.
// private static ResourceManager resources = null;
private static ResourceManager resources = null;
// Helper for obtaining string resources for this assembly.
public static String GetString(String tag)
+5 -1
View File
@@ -87,10 +87,14 @@ public abstract class ISCIIEncoding : MonoEncoding
return s.Length;
}
public unsafe override int GetByteCountImpl (char* chars, int count)
public unsafe override int GetByteCountImpl (char* chars, int count)
{
#if NET_2_0
EncoderFallbackBuffer buffer = null;
int index = 0;
int charIndex = 0;
int byteIndex = 0;
int length = 0;
char ch;
char first = (char)shift;
+2 -7
View File
@@ -103,12 +103,7 @@ net_2_0_dirs := \
System.Web.Extensions.Design \
System.Xml.Linq \
System.Data.DataSetExtensions \
System.Data.Linq \
System.Runtime.Serialization \
System.IdentityModel \
System.IdentityModel.Selectors \
System.ServiceModel \
System.ServiceModel.Web
System.Data.Linq
net_2_1_dirs := \
corlib \
@@ -123,7 +118,7 @@ net_3_5_dirs := \
default_SUBDIRS := $(common_dirs) $(default_dirs)
net_2_0_SUBDIRS := $(common_dirs) $(net_2_0_dirs)
net_2_1_bootstrap_SUBDIRS := corlib System
net_2_1_bootstrap_SUBDIRS := $(net_2_1_dirs)
net_2_1_raw_SUBDIRS := $(net_2_1_dirs)
net_3_5_SUBDIRS := $(net_3_5_dirs)
@@ -1,7 +1,3 @@
2008-08-02 Gert Driesen <[email protected]>
* System.Windows.Forms_test.dll.sources: Added FormEventTest.cs.
2008-07-11 Jonathan Pobst <[email protected]>
* System.Windows.Forms.dll.sources: Remove the clearlooks, nice,
@@ -1,7 +1,3 @@
2008-07-31 George Giolfan <[email protected]>
* TabControlPainter.cs: Added DrawScrollButton, GetButtonState.
2008-06-09 Carlos Alberto Cortez <[email protected]>
* TabControlPainter.cs: When calculating the display rectangle for
@@ -26,7 +26,6 @@ using System;
using System.Drawing;
using System.Drawing.Text;
using System.Windows.Forms;
using System.Windows.Forms.VisualStyles;
namespace System.Windows.Forms.Theming.Default
{
@@ -295,23 +294,8 @@ namespace System.Windows.Forms.Theming.Default
if (tab.ShowSlider) {
Rectangle right = GetRightScrollRect (tab);
Rectangle left = GetLeftScrollRect (tab);
DrawScrollButton (dc, right, area, ScrollButton.Right, tab.RightSliderState);
DrawScrollButton (dc, left, area, ScrollButton.Left, tab.LeftSliderState);
}
}
protected virtual void DrawScrollButton (Graphics dc, Rectangle bounds, Rectangle clippingArea, ScrollButton button, PushButtonState state)
{
ControlPaint.DrawScrollButton (dc, bounds, button, GetButtonState (state));
}
static ButtonState GetButtonState (PushButtonState state)
{
switch (state) {
case PushButtonState.Pressed:
return ButtonState.Pushed;
default:
return ButtonState.Normal;
ControlPaint.DrawScrollButton (dc, right, ScrollButton.Right, tab.RightSliderState);
ControlPaint.DrawScrollButton (dc, left, ScrollButton.Left, tab.LeftSliderState);
}
}
@@ -1,7 +1,3 @@
2008-07-31 George Giolfan <[email protected]>
* TabControlPainter.cs: Added DrawScrollButton.
2008-07-09 George Giolfan <[email protected]>
* TabControlPainter.cs, ToolStripPainter.cs: Now falls back to the default
@@ -198,68 +198,5 @@ namespace System.Windows.Forms.Theming.VisualStyles
return base.HasHotElementStyles (tabControl);
return true;
}
protected override void DrawScrollButton (Graphics dc, Rectangle bounds, Rectangle clippingArea, ScrollButton button, PushButtonState state)
{
if (!ThemeVisualStyles.RenderClientAreas) {
base.DrawScrollButton (dc, bounds, clippingArea, button, state);
return;
}
VisualStyleElement element;
if (button == ScrollButton.Left)
switch (state) {
case PushButtonState.Hot:
element = VisualStyleElement.Spin.DownHorizontal.Hot;
break;
case PushButtonState.Pressed:
element = VisualStyleElement.Spin.DownHorizontal.Pressed;
break;
default:
element = VisualStyleElement.Spin.DownHorizontal.Normal;
break;
}
else
switch (state) {
case PushButtonState.Hot:
element = VisualStyleElement.Spin.UpHorizontal.Hot;
break;
case PushButtonState.Pressed:
element = VisualStyleElement.Spin.UpHorizontal.Pressed;
break;
default:
element = VisualStyleElement.Spin.UpHorizontal.Normal;
break;
}
if (!VisualStyleRenderer.IsElementDefined (element)) {
if (button == ScrollButton.Left)
switch (state) {
case PushButtonState.Hot:
element = VisualStyleElement.ScrollBar.ArrowButton.LeftHot;
break;
case PushButtonState.Pressed:
element = VisualStyleElement.ScrollBar.ArrowButton.LeftPressed;
break;
default:
element = VisualStyleElement.ScrollBar.ArrowButton.LeftNormal;
break;
}
else
switch (state) {
case PushButtonState.Hot:
element = VisualStyleElement.ScrollBar.ArrowButton.RightHot;
break;
case PushButtonState.Pressed:
element = VisualStyleElement.ScrollBar.ArrowButton.RightPressed;
break;
default:
element = VisualStyleElement.ScrollBar.ArrowButton.RightNormal;
break;
}
if (!VisualStyleRenderer.IsElementDefined (element)) {
base.DrawScrollButton (dc, bounds, clippingArea, button, state);
return;
}
}
new VisualStyleRenderer (element).DrawBackground (dc, bounds, clippingArea);
}
}
}
@@ -1,9 +1,3 @@
2008-07-31 George Giolfan <[email protected]>
* GtkPlus.cs, VisualStylesGtkPlus.cs: Added support for some elements,
clipping and excluding a rectangle from the painted area.
* VisualStyleElement.cs: Added constants for parts and states.
2008-07-14 George Giolfan <[email protected]>
* VisualStyleElement.cs: Fixed
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -47,21 +47,7 @@ namespace System.Windows.Forms.VisualStyles
S_FALSE
}
enum ThemeHandle {
BUTTON = 1,
#if NET_2_0
COMBOBOX,
#endif
EDIT,
HEADER,
PROGRESS,
REBAR,
SCROLLBAR,
SPIN,
STATUS,
TAB,
TOOLBAR,
TRACKBAR,
TREEVIEW
BUTTON = 1
}
#region UxTheme
@@ -79,682 +65,78 @@ namespace System.Windows.Forms.VisualStyles
}
public int UxThemeDrawThemeBackground (IntPtr hTheme, IDeviceContext dc, int iPartId, int iStateId, Rectangle bounds, Rectangle clipRectangle)
{
return (int)(DrawBackground ((ThemeHandle)(int)hTheme, dc, iPartId, iStateId, bounds, clipRectangle, Rectangle.Empty) ? S.S_OK : S.S_FALSE);
return (int)(DrawBackground ((ThemeHandle)(int)hTheme, dc, iPartId, iStateId, bounds, clipRectangle) ? S.S_OK : S.S_FALSE);
}
public int UxThemeDrawThemeBackground (IntPtr hTheme, IDeviceContext dc, int iPartId, int iStateId, Rectangle bounds)
{
return UxThemeDrawThemeBackground (hTheme, dc, iPartId, iStateId, bounds, bounds);
}
bool DrawBackground (ThemeHandle themeHandle, IDeviceContext dc, int part, int state, Rectangle bounds, Rectangle clipRectangle, Rectangle excludedArea) {
GtkPlusState gtk_plus_state;
GtkPlusToggleButtonValue gtk_plus_toggle_button_value;
static bool DrawBackground (ThemeHandle themeHandle, IDeviceContext dc, int part, int state, Rectangle bounds, Rectangle clipRectangle) {
switch (themeHandle) {
#region BUTTON
case ThemeHandle.BUTTON:
switch ((BUTTONPARTS)part) {
#region BP_PUSHBUTTON
case BUTTONPARTS.BP_PUSHBUTTON:
switch ((PUSHBUTTONSTATES)state) {
case PUSHBUTTONSTATES.PBS_NORMAL:
gtk_plus_state = GtkPlusState.Normal;
break;
case PUSHBUTTONSTATES.PBS_HOT:
gtk_plus_state = GtkPlusState.Hot;
break;
case PUSHBUTTONSTATES.PBS_PRESSED:
gtk_plus_state = GtkPlusState.Pressed;
break;
case PUSHBUTTONSTATES.PBS_DISABLED:
gtk_plus_state = GtkPlusState.Disabled;
break;
case PUSHBUTTONSTATES.PBS_DEFAULTED:
gtk_plus_state = GtkPlusState.Normal;
break;
default:
return false;
}
GtkPlus.ButtonPaint (dc, bounds, clipRectangle, (PUSHBUTTONSTATES)state == PUSHBUTTONSTATES.PBS_DEFAULTED, gtk_plus_state);
return true;
#endregion
#region BP_RADIOBUTTON
case BUTTONPARTS.BP_RADIOBUTTON:
switch ((RADIOBUTTONSTATES)state) {
case RADIOBUTTONSTATES.RBS_UNCHECKEDNORMAL:
gtk_plus_state = GtkPlusState.Normal;
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Unchecked;
break;
case RADIOBUTTONSTATES.RBS_UNCHECKEDPRESSED:
gtk_plus_state = GtkPlusState.Pressed;
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Unchecked;
break;
case RADIOBUTTONSTATES.RBS_UNCHECKEDHOT:
gtk_plus_state = GtkPlusState.Hot;
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Unchecked;
break;
case RADIOBUTTONSTATES.RBS_UNCHECKEDDISABLED:
gtk_plus_state = GtkPlusState.Disabled;
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Unchecked;
break;
case RADIOBUTTONSTATES.RBS_CHECKEDNORMAL:
gtk_plus_state = GtkPlusState.Normal;
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Checked;
break;
case RADIOBUTTONSTATES.RBS_CHECKEDPRESSED:
gtk_plus_state = GtkPlusState.Pressed;
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Checked;
break;
case RADIOBUTTONSTATES.RBS_CHECKEDHOT:
gtk_plus_state = GtkPlusState.Hot;
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Checked;
break;
case RADIOBUTTONSTATES.RBS_CHECKEDDISABLED:
gtk_plus_state = GtkPlusState.Disabled;
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Checked;
break;
default:
return false;
}
GtkPlus.RadioButtonPaint (dc, bounds, clipRectangle, gtk_plus_state, gtk_plus_toggle_button_value);
return true;
#endregion
#region BP_CHECKBOX
case BUTTONPARTS.BP_CHECKBOX:
GtkPlusState gtk_plus_state;
GtkPlusCheckBoxValue gtk_plus_check_box_value;
switch ((CHECKBOXSTATES)state) {
case CHECKBOXSTATES.CBS_UNCHECKEDNORMAL:
gtk_plus_state = GtkPlusState.Normal;
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Unchecked;
gtk_plus_check_box_value = GtkPlusCheckBoxValue.Unchecked;
break;
case CHECKBOXSTATES.CBS_UNCHECKEDPRESSED:
gtk_plus_state = GtkPlusState.Pressed;
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Unchecked;
gtk_plus_check_box_value = GtkPlusCheckBoxValue.Unchecked;
break;
case CHECKBOXSTATES.CBS_UNCHECKEDHOT:
gtk_plus_state = GtkPlusState.Hot;
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Unchecked;
gtk_plus_check_box_value = GtkPlusCheckBoxValue.Unchecked;
break;
case CHECKBOXSTATES.CBS_UNCHECKEDDISABLED:
gtk_plus_state = GtkPlusState.Disabled;
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Unchecked;
gtk_plus_check_box_value = GtkPlusCheckBoxValue.Unchecked;
break;
case CHECKBOXSTATES.CBS_CHECKEDNORMAL:
gtk_plus_state = GtkPlusState.Normal;
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Checked;
gtk_plus_check_box_value = GtkPlusCheckBoxValue.Checked;
break;
case CHECKBOXSTATES.CBS_CHECKEDPRESSED:
gtk_plus_state = GtkPlusState.Pressed;
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Checked;
gtk_plus_check_box_value = GtkPlusCheckBoxValue.Checked;
break;
case CHECKBOXSTATES.CBS_CHECKEDHOT:
gtk_plus_state = GtkPlusState.Hot;
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Checked;
gtk_plus_check_box_value = GtkPlusCheckBoxValue.Checked;
break;
case CHECKBOXSTATES.CBS_CHECKEDDISABLED:
gtk_plus_state = GtkPlusState.Disabled;
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Checked;
gtk_plus_check_box_value = GtkPlusCheckBoxValue.Checked;
break;
case CHECKBOXSTATES.CBS_MIXEDNORMAL:
gtk_plus_state = GtkPlusState.Normal;
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Mixed;
gtk_plus_check_box_value = GtkPlusCheckBoxValue.Mixed;
break;
case CHECKBOXSTATES.CBS_MIXEDPRESSED:
gtk_plus_state = GtkPlusState.Pressed;
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Mixed;
gtk_plus_check_box_value = GtkPlusCheckBoxValue.Mixed;
break;
case CHECKBOXSTATES.CBS_MIXEDHOT:
gtk_plus_state = GtkPlusState.Hot;
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Mixed;
gtk_plus_check_box_value = GtkPlusCheckBoxValue.Mixed;
break;
case CHECKBOXSTATES.CBS_MIXEDDISABLED:
gtk_plus_state = GtkPlusState.Disabled;
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Mixed;
gtk_plus_check_box_value = GtkPlusCheckBoxValue.Mixed;
break;
default:
return false;
}
GtkPlus.CheckBoxPaint (dc, bounds, clipRectangle, gtk_plus_state, gtk_plus_toggle_button_value);
return true;
#endregion
#region BP_GROUPBOX
case BUTTONPARTS.BP_GROUPBOX:
switch ((GROUPBOXSTATES)state) {
case GROUPBOXSTATES.GBS_NORMAL:
gtk_plus_state = GtkPlusState.Normal;
break;
case GROUPBOXSTATES.GBS_DISABLED:
gtk_plus_state = GtkPlusState.Disabled;
break;
default:
return false;
}
GtkPlus.GroupBoxPaint (dc, bounds, excludedArea, gtk_plus_state);
return true;
#endregion
default: return false;
}
#endregion
#region COMBOBOX
#if NET_2_0
case ThemeHandle.COMBOBOX:
switch ((COMBOBOXPARTS)part) {
#region CP_DROPDOWNBUTTON
case COMBOBOXPARTS.CP_DROPDOWNBUTTON:
switch ((COMBOBOXSTYLESTATES)state) {
case COMBOBOXSTYLESTATES.CBXS_NORMAL: gtk_plus_state = GtkPlusState.Normal; break;
case COMBOBOXSTYLESTATES.CBXS_HOT: gtk_plus_state = GtkPlusState.Hot; break;
case COMBOBOXSTYLESTATES.CBXS_PRESSED: gtk_plus_state = GtkPlusState.Pressed; break;
case COMBOBOXSTYLESTATES.CBXS_DISABLED: gtk_plus_state = GtkPlusState.Disabled; break;
default: return false;
}
GtkPlus.ComboBoxPaintDropDownButton (dc, bounds, clipRectangle, gtk_plus_state);
return true;
#endregion
#region CP_BORDER
case COMBOBOXPARTS.CP_BORDER:
switch ((BORDERSTATES)state) {
case BORDERSTATES.CBB_NORMAL:
case BORDERSTATES.CBB_HOT:
case BORDERSTATES.CBB_FOCUSED:
case BORDERSTATES.CBB_DISABLED:
GtkPlus.ComboBoxPaintBorder (dc, bounds, clipRectangle);
return true;
default: return false;
}
#endregion
default: return false;
}
#endif
#endregion
#region EDIT
case ThemeHandle.EDIT:
switch ((EDITPARTS)part) {
#region EP_EDITTEXT
case EDITPARTS.EP_EDITTEXT:
switch ((EDITTEXTSTATES)state) {
case EDITTEXTSTATES.ETS_NORMAL:
case EDITTEXTSTATES.ETS_ASSIST:
case EDITTEXTSTATES.ETS_READONLY:
case EDITTEXTSTATES.ETS_HOT:
case EDITTEXTSTATES.ETS_SELECTED:
case EDITTEXTSTATES.ETS_FOCUSED:
gtk_plus_state = GtkPlusState.Normal;
break;
case EDITTEXTSTATES.ETS_DISABLED:
gtk_plus_state = GtkPlusState.Disabled;
break;
default: return false;
}
GtkPlus.TextBoxPaint (dc, bounds, excludedArea, gtk_plus_state);
return true;
#endregion
default: return false;
}
#endregion
#region HEADER
case ThemeHandle.HEADER:
switch ((HEADERPARTS)part) {
#region HP_HEADERITEM
case HEADERPARTS.HP_HEADERITEM:
switch ((HEADERITEMSTATES)state) {
case HEADERITEMSTATES.HIS_NORMAL:
gtk_plus_state = GtkPlusState.Normal;
break;
case HEADERITEMSTATES.HIS_HOT:
gtk_plus_state = GtkPlusState.Hot;
break;
case HEADERITEMSTATES.HIS_PRESSED:
gtk_plus_state = GtkPlusState.Pressed;
break;
default: return false;
}
GtkPlus.HeaderPaint (dc, bounds, clipRectangle, gtk_plus_state);
return true;
#endregion
default: return false;
}
#endregion
#region PROGRESS
case ThemeHandle.PROGRESS:
switch ((PROGRESSPARTS)part) {
case PROGRESSPARTS.PP_BAR:
case PROGRESSPARTS.PP_BARVERT:
GtkPlus.ProgressBarPaintBar (dc, bounds, clipRectangle);
return true;
case PROGRESSPARTS.PP_CHUNK:
case PROGRESSPARTS.PP_CHUNKVERT:
GtkPlus.ProgressBarPaintChunk (dc, bounds, clipRectangle);
GtkPlus.CheckBoxPaint (dc, bounds, clipRectangle, gtk_plus_state, gtk_plus_check_box_value);
return true;
default: return false;
}
#endregion
#region REBAR
case ThemeHandle.REBAR:
switch ((REBARPARTS)part) {
case REBARPARTS.RP_BAND:
GtkPlus.ToolBarPaint (dc, bounds, clipRectangle);
return true;
default: return false;
}
#endregion
#region SCROLLBAR
case ThemeHandle.SCROLLBAR:
switch ((SCROLLBARPARTS)part) {
#region SBP_ARROWBTN
case SCROLLBARPARTS.SBP_ARROWBTN:
bool horizontal;
bool up_or_left;
switch ((ARROWBTNSTATES)state) {
case ARROWBTNSTATES.ABS_UPNORMAL:
gtk_plus_state = GtkPlusState.Normal;
horizontal = false;
up_or_left = true;
break;
case ARROWBTNSTATES.ABS_UPHOT:
gtk_plus_state = GtkPlusState.Hot;
horizontal = false;
up_or_left = true;
break;
case ARROWBTNSTATES.ABS_UPPRESSED:
gtk_plus_state = GtkPlusState.Pressed;
horizontal = false;
up_or_left = true;
break;
case ARROWBTNSTATES.ABS_UPDISABLED:
gtk_plus_state = GtkPlusState.Disabled;
horizontal = false;
up_or_left = true;
break;
case ARROWBTNSTATES.ABS_DOWNNORMAL:
gtk_plus_state = GtkPlusState.Normal;
horizontal = false;
up_or_left = false;
break;
case ARROWBTNSTATES.ABS_DOWNHOT:
gtk_plus_state = GtkPlusState.Hot;
horizontal = false;
up_or_left = false;
break;
case ARROWBTNSTATES.ABS_DOWNPRESSED:
gtk_plus_state = GtkPlusState.Pressed;
horizontal = false;
up_or_left = false;
break;
case ARROWBTNSTATES.ABS_DOWNDISABLED:
gtk_plus_state = GtkPlusState.Disabled;
horizontal = false;
up_or_left = false;
break;
case ARROWBTNSTATES.ABS_LEFTNORMAL:
gtk_plus_state = GtkPlusState.Normal;
horizontal = true;
up_or_left = true;
break;
case ARROWBTNSTATES.ABS_LEFTHOT:
gtk_plus_state = GtkPlusState.Hot;
horizontal = true;
up_or_left = true;
break;
case ARROWBTNSTATES.ABS_LEFTPRESSED:
gtk_plus_state = GtkPlusState.Pressed;
horizontal = true;
up_or_left = true;
break;
case ARROWBTNSTATES.ABS_LEFTDISABLED:
gtk_plus_state = GtkPlusState.Disabled;
horizontal = true;
up_or_left = true;
break;
case ARROWBTNSTATES.ABS_RIGHTNORMAL:
gtk_plus_state = GtkPlusState.Normal;
horizontal = true;
up_or_left = false;
break;
case ARROWBTNSTATES.ABS_RIGHTHOT:
gtk_plus_state = GtkPlusState.Hot;
horizontal = true;
up_or_left = false;
break;
case ARROWBTNSTATES.ABS_RIGHTPRESSED:
gtk_plus_state = GtkPlusState.Pressed;
horizontal = true;
up_or_left = false;
break;
case ARROWBTNSTATES.ABS_RIGHTDISABLED:
gtk_plus_state = GtkPlusState.Disabled;
horizontal = true;
up_or_left = false;
break;
default: return false;
}
GtkPlus.ScrollBarPaintArrowButton (dc, bounds, clipRectangle, gtk_plus_state, horizontal, up_or_left);
return true;
#endregion
#region SBP_THUMBBTNHORZ, SBP_THUMBBTNVERT
case SCROLLBARPARTS.SBP_THUMBBTNHORZ:
case SCROLLBARPARTS.SBP_THUMBBTNVERT:
if (!GetGtkPlusState ((SCROLLBARSTYLESTATES)state, out gtk_plus_state))
return false;
GtkPlus.ScrollBarPaintThumbButton (
dc,
bounds,
clipRectangle,
gtk_plus_state,
(SCROLLBARPARTS)part == SCROLLBARPARTS.SBP_THUMBBTNHORZ);
return true;
#endregion
#region SBP_LOWERTRACKHORZ, SBP_UPPERTRACKHORZ, SBP_LOWERTRACKVERT, SBP_UPPERTRACKVERT
case SCROLLBARPARTS.SBP_LOWERTRACKHORZ:
case SCROLLBARPARTS.SBP_UPPERTRACKHORZ:
case SCROLLBARPARTS.SBP_LOWERTRACKVERT:
case SCROLLBARPARTS.SBP_UPPERTRACKVERT:
if (!GetGtkPlusState ((SCROLLBARSTYLESTATES)state, out gtk_plus_state))
return false;
GtkPlus.ScrollBarPaintTrack (
dc,
bounds,
clipRectangle,
gtk_plus_state,
(SCROLLBARPARTS)part == SCROLLBARPARTS.SBP_LOWERTRACKHORZ ||
(SCROLLBARPARTS)part == SCROLLBARPARTS.SBP_UPPERTRACKHORZ,
(SCROLLBARPARTS)part == SCROLLBARPARTS.SBP_UPPERTRACKHORZ ||
(SCROLLBARPARTS)part == SCROLLBARPARTS.SBP_UPPERTRACKVERT);
return true;
#endregion
default: return false;
}
#endregion
#region SPIN
case ThemeHandle.SPIN:
bool up;
switch ((SPINPARTS)part) {
#region SPNP_UP
case SPINPARTS.SPNP_UP:
up = true;
switch ((UPSTATES)state) {
case UPSTATES.UPS_NORMAL: gtk_plus_state = GtkPlusState.Normal; break;
case UPSTATES.UPS_HOT: gtk_plus_state = GtkPlusState.Hot; break;
case UPSTATES.UPS_PRESSED: gtk_plus_state = GtkPlusState.Pressed; break;
case UPSTATES.UPS_DISABLED: gtk_plus_state = GtkPlusState.Disabled; break;
default: return false;
}
break;
#endregion
#region SPNP_DOWN
case SPINPARTS.SPNP_DOWN:
up = false;
switch ((DOWNSTATES)state) {
case DOWNSTATES.DNS_NORMAL: gtk_plus_state = GtkPlusState.Normal; break;
case DOWNSTATES.DNS_HOT: gtk_plus_state = GtkPlusState.Hot; break;
case DOWNSTATES.DNS_PRESSED: gtk_plus_state = GtkPlusState.Pressed; break;
case DOWNSTATES.DNS_DISABLED: gtk_plus_state = GtkPlusState.Disabled; break;
default: return false;
}
break;
#endregion
default: return false;
}
GtkPlus.UpDownPaint (dc, bounds, clipRectangle, up, gtk_plus_state);
return true;
#endregion
#region STATUS
case ThemeHandle.STATUS:
switch ((STATUSPARTS)part) {
case STATUSPARTS.SP_GRIPPER:
GtkPlus.StatusBarPaintGripper (dc, bounds, clipRectangle);
return true;
default: return false;
}
#endregion
#region TABCONTROL
case ThemeHandle.TAB:
bool selected;
switch ((TABPARTS)part) {
#region TABP_TABITEM
case TABPARTS.TABP_TABITEM:
switch ((TABITEMSTATES)state) {
case TABITEMSTATES.TIS_SELECTED:
selected = true;
break;
case TABITEMSTATES.TIS_NORMAL:
case TABITEMSTATES.TIS_HOT:
case TABITEMSTATES.TIS_DISABLED:
selected = false;
break;
default: return false;
}
break;
#endregion
#region TABP_TABITEMLEFTEDGE
case TABPARTS.TABP_TABITEMLEFTEDGE:
switch ((TABITEMLEFTEDGESTATES)state) {
case TABITEMLEFTEDGESTATES.TILES_SELECTED:
selected = true;
break;
case TABITEMLEFTEDGESTATES.TILES_NORMAL:
case TABITEMLEFTEDGESTATES.TILES_HOT:
case TABITEMLEFTEDGESTATES.TILES_DISABLED:
selected = false;
break;
default: return false;
}
break;
#endregion
#region TABP_TABITEMRIGHTEDGE
case TABPARTS.TABP_TABITEMRIGHTEDGE:
switch ((TABITEMRIGHTEDGESTATES)state) {
case TABITEMRIGHTEDGESTATES.TIRES_SELECTED:
selected = true;
break;
case TABITEMRIGHTEDGESTATES.TIRES_NORMAL:
case TABITEMRIGHTEDGESTATES.TIRES_HOT:
case TABITEMRIGHTEDGESTATES.TIRES_DISABLED:
selected = false;
break;
default: return false;
}
break;
#endregion
#region TABP_TABITEMBOTHEDGE
case TABPARTS.TABP_TABITEMBOTHEDGE:
selected = false;
break;
#endregion
#region TABP_TOPTABITEM
case TABPARTS.TABP_TOPTABITEM:
switch ((TOPTABITEMSTATES)state) {
case TOPTABITEMSTATES.TTIS_SELECTED:
selected = true;
break;
case TOPTABITEMSTATES.TTIS_NORMAL:
case TOPTABITEMSTATES.TTIS_HOT:
case TOPTABITEMSTATES.TTIS_DISABLED:
selected = false;
break;
default: return false;
}
break;
#endregion
#region TABP_TOPTABITEMLEFTEDGE
case TABPARTS.TABP_TOPTABITEMLEFTEDGE:
switch ((TOPTABITEMLEFTEDGESTATES)state) {
case TOPTABITEMLEFTEDGESTATES.TTILES_SELECTED:
selected = true;
break;
case TOPTABITEMLEFTEDGESTATES.TTILES_NORMAL:
case TOPTABITEMLEFTEDGESTATES.TTILES_HOT:
case TOPTABITEMLEFTEDGESTATES.TTILES_DISABLED:
selected = false;
break;
default: return false;
}
break;
#endregion
#region TABP_TOPTABITEMRIGHTEDGE
case TABPARTS.TABP_TOPTABITEMRIGHTEDGE:
switch ((TOPTABITEMRIGHTEDGESTATES)state) {
case TOPTABITEMRIGHTEDGESTATES.TTIRES_SELECTED:
selected = true;
break;
case TOPTABITEMRIGHTEDGESTATES.TTIRES_NORMAL:
case TOPTABITEMRIGHTEDGESTATES.TTIRES_HOT:
case TOPTABITEMRIGHTEDGESTATES.TTIRES_DISABLED:
selected = false;
break;
default: return false;
}
break;
#endregion
#region TABP_TOPTABITEMBOTHEDGE
case TABPARTS.TABP_TOPTABITEMBOTHEDGE:
selected = false;
break;
#endregion
#region TABP_PANE
case TABPARTS.TABP_PANE:
GtkPlus.TabControlPaintPane (dc, bounds, clipRectangle);
return true;
#endregion
default: return false;
}
GtkPlus.TabControlPaintTabItem (dc, bounds, clipRectangle, selected ? GtkPlusState.Pressed : GtkPlusState.Normal);
return true;
#endregion
#region TOOLBAR
case ThemeHandle.TOOLBAR:
switch ((TOOLBARPARTS)part) {
case TOOLBARPARTS.TP_BUTTON:
switch ((TOOLBARSTYLESTATES)state) {
case TOOLBARSTYLESTATES.TS_NORMAL:
gtk_plus_state = GtkPlusState.Normal;
break;
case TOOLBARSTYLESTATES.TS_HOT:
gtk_plus_state = GtkPlusState.Hot;
break;
case TOOLBARSTYLESTATES.TS_PRESSED:
gtk_plus_state = GtkPlusState.Pressed;
break;
case TOOLBARSTYLESTATES.TS_DISABLED:
gtk_plus_state = GtkPlusState.Disabled;
break;
case TOOLBARSTYLESTATES.TS_CHECKED:
case TOOLBARSTYLESTATES.TS_HOTCHECKED:
GtkPlus.ToolBarPaintCheckedButton (dc, bounds, clipRectangle);
return true;
default: return false;
}
GtkPlus.ToolBarPaintButton (dc, bounds, clipRectangle, gtk_plus_state);
return true;
default: return false;
}
#endregion
#region TRACKBAR
case ThemeHandle.TRACKBAR:
switch ((TRACKBARPARTS)part) {
#region TKP_TRACK
case TRACKBARPARTS.TKP_TRACK:
switch ((TRACKSTATES)state) {
case TRACKSTATES.TRS_NORMAL:
GtkPlus.TrackBarPaintTrack (dc, bounds, clipRectangle, true);
return true;
default: return false;
}
#endregion
#region TKP_TRACKVERT
case TRACKBARPARTS.TKP_TRACKVERT:
switch ((TRACKVERTSTATES)state) {
case TRACKVERTSTATES.TRVS_NORMAL:
GtkPlus.TrackBarPaintTrack (dc, bounds, clipRectangle, false);
return true;
default: return false;
}
#endregion
#region TKP_THUMB
case TRACKBARPARTS.TKP_THUMB:
switch ((THUMBSTATES)state) {
case THUMBSTATES.TUS_NORMAL:
gtk_plus_state = GtkPlusState.Normal;
break;
case THUMBSTATES.TUS_HOT:
gtk_plus_state = GtkPlusState.Hot;
break;
case THUMBSTATES.TUS_PRESSED:
gtk_plus_state = GtkPlusState.Pressed;
break;
case THUMBSTATES.TUS_FOCUSED:
gtk_plus_state = GtkPlusState.Selected;
break;
case THUMBSTATES.TUS_DISABLED:
gtk_plus_state = GtkPlusState.Disabled;
break;
default: return false;
}
GtkPlus.TrackBarPaintThumb (dc, bounds, clipRectangle, gtk_plus_state, true);
return true;
#endregion
#region TKP_THUMBVERT
case TRACKBARPARTS.TKP_THUMBVERT:
switch ((THUMBVERTSTATES)state) {
case THUMBVERTSTATES.TUVS_NORMAL:
gtk_plus_state = GtkPlusState.Normal;
break;
case THUMBVERTSTATES.TUVS_HOT:
gtk_plus_state = GtkPlusState.Hot;
break;
case THUMBVERTSTATES.TUVS_PRESSED:
gtk_plus_state = GtkPlusState.Pressed;
break;
case THUMBVERTSTATES.TUVS_FOCUSED:
gtk_plus_state = GtkPlusState.Selected;
break;
case THUMBVERTSTATES.TUVS_DISABLED:
gtk_plus_state = GtkPlusState.Disabled;
break;
default: return false;
}
GtkPlus.TrackBarPaintThumb (dc, bounds, clipRectangle, gtk_plus_state, false);
return true;
#endregion
default: return false;
}
#endregion
#region TREEVIEW
case ThemeHandle.TREEVIEW:
switch ((TREEVIEWPARTS)part) {
case TREEVIEWPARTS.TVP_GLYPH:
bool closed;
switch ((GLYPHSTATES)state) {
case GLYPHSTATES.GLPS_CLOSED : closed = true; break;
case GLYPHSTATES.GLPS_OPENED: closed = false; break;
default: return false;
}
GtkPlus.TreeViewPaintGlyph (dc, bounds, clipRectangle, closed);
return true;
default: return false;
}
#endregion
default: return false;
}
}
static bool GetGtkPlusState (SCROLLBARSTYLESTATES state, out GtkPlusState result)
{
switch (state) {
case SCROLLBARSTYLESTATES.SCRBS_NORMAL:
result = GtkPlusState.Normal;
break;
case SCROLLBARSTYLESTATES.SCRBS_HOT:
result = GtkPlusState.Hot;
break;
case SCROLLBARSTYLESTATES.SCRBS_PRESSED:
result = GtkPlusState.Pressed;
break;
case SCROLLBARSTYLESTATES.SCRBS_DISABLED:
result = GtkPlusState.Disabled;
break;
default:
result = (GtkPlusState)0;
return false;
}
return true;
}
public int UxThemeDrawThemeEdge (IntPtr hTheme, IDeviceContext dc, int iPartId, int iStateId, Rectangle bounds, Edges edges, EdgeStyle style, EdgeEffects effects, out Rectangle result)
{
result = Rectangle.Empty;
@@ -766,22 +148,8 @@ namespace System.Windows.Forms.VisualStyles
}
public int UxThemeGetThemeBackgroundContentRect (IntPtr hTheme, IDeviceContext dc, int iPartId, int iStateId, Rectangle bounds, out Rectangle result)
{
return (int)(GetBackgroundContentRectangle ((ThemeHandle)(int)hTheme, iPartId, iStateId, bounds, out result) ? S.S_OK : S.S_FALSE);
}
bool GetBackgroundContentRectangle (ThemeHandle handle, int part, int state, Rectangle bounds, out Rectangle result)
{
switch (handle) {
case ThemeHandle.PROGRESS:
switch ((PROGRESSPARTS)part) {
case PROGRESSPARTS.PP_BAR:
case PROGRESSPARTS.PP_BARVERT:
result = GtkPlus.ProgressBarGetBackgroundContentRectagle (bounds);
return true;
}
break;
}
result = Rectangle.Empty;
return false;
return (int)S.S_FALSE;
}
public int UxThemeGetThemeBackgroundExtent (IntPtr hTheme, IDeviceContext dc, int iPartId, int iStateId, Rectangle contentBounds, out Rectangle result)
{
@@ -815,29 +183,8 @@ namespace System.Windows.Forms.VisualStyles
}
public int UxThemeGetThemeInt (IntPtr hTheme, int iPartId, int iStateId, IntegerProperty prop, out int result)
{
return (int)(GetInteger ((ThemeHandle)(int)hTheme, iPartId, iStateId, prop, out result) ? S.S_OK : S.S_FALSE);
}
bool GetInteger (ThemeHandle handle, int part, int state, IntegerProperty property, out int result)
{
switch (handle) {
case ThemeHandle.PROGRESS:
switch ((PROGRESSPARTS)part) {
case PROGRESSPARTS.PP_CHUNK:
case PROGRESSPARTS.PP_CHUNKVERT:
switch (property) {
case IntegerProperty.ProgressChunkSize:
result = ThemeWin32Classic.ProgressBarGetChunkSize ();
return true;
case IntegerProperty.ProgressSpaceSize:
result = ThemeWin32Classic.ProgressBarChunkSpacing;
return true;
}
break;
}
break;
}
result = 0;
return false;
return (int)S.S_FALSE;
}
public int UxThemeGetThemeMargins (IntPtr hTheme, IDeviceContext dc, int iPartId, int iStateId, MarginProperty prop, out Padding result)
{
@@ -855,48 +202,13 @@ namespace System.Windows.Forms.VisualStyles
bool GetPartSize (ThemeHandle themeHandle, IDeviceContext dc, int part, int state, Rectangle bounds, bool rectangleSpecified, ThemeSizeType type, out Size result)
{
switch (themeHandle) {
#region BUTTON
case ThemeHandle.BUTTON:
switch ((BUTTONPARTS)part) {
case BUTTONPARTS.BP_RADIOBUTTON:
result = GtkPlus.RadioButtonGetSize ();
return true;
case BUTTONPARTS.BP_CHECKBOX:
result = GtkPlus.CheckBoxGetSize ();
return true;
}
break;
#endregion
#region HEADER
case ThemeHandle.HEADER:
switch ((HEADERPARTS)part) {
case HEADERPARTS.HP_HEADERITEM:
result = new Size (0, ThemeWin32Classic.ListViewGetHeaderHeight ());
return true;
}
break;
#endregion
#region TRACKBAR
case ThemeHandle.TRACKBAR:
switch ((TRACKBARPARTS)part) {
case TRACKBARPARTS.TKP_TRACK:
result = new Size (0, ThemeWin32Classic.TrackBarHorizontalTrackHeight);
return true;
case TRACKBARPARTS.TKP_TRACKVERT:
result = new Size (ThemeWin32Classic.TrackBarVerticalTrackWidth, 0);
return true;
case TRACKBARPARTS.TKP_THUMB:
case TRACKBARPARTS.TKP_THUMBVERT:
result = ThemeWin32Classic.TrackBarGetThumbSize ();
if ((TRACKBARPARTS)part == TRACKBARPARTS.TKP_THUMBVERT) {
int temporary = result.Width;
result.Width = result.Height;
result.Height = temporary;
}
return true;
}
break;
#endregion
}
result = Size.Empty;
return false;
@@ -946,138 +258,11 @@ namespace System.Windows.Forms.VisualStyles
public bool UxThemeIsThemePartDefined (IntPtr hTheme, int iPartId)
{
switch ((ThemeHandle)(int)hTheme) {
#region BUTTON
case ThemeHandle.BUTTON:
switch ((BUTTONPARTS)iPartId) {
case BUTTONPARTS.BP_PUSHBUTTON:
case BUTTONPARTS.BP_CHECKBOX:
case BUTTONPARTS.BP_RADIOBUTTON:
case BUTTONPARTS.BP_GROUPBOX:
return true;
case BUTTONPARTS.BP_CHECKBOX: return true;
default: return false;
}
#endregion
#region COMBOBOX
#if NET_2_0
case ThemeHandle.COMBOBOX:
switch ((COMBOBOXPARTS)iPartId) {
case COMBOBOXPARTS.CP_DROPDOWNBUTTON:
case COMBOBOXPARTS.CP_BORDER:
return true;
default: return false;
}
#endif
#endregion
#region EDIT
case ThemeHandle.EDIT:
switch ((EDITPARTS)iPartId) {
case EDITPARTS.EP_EDITTEXT:
return true;
default: return false;
}
#endregion
#region HEADER
case ThemeHandle.HEADER:
switch ((HEADERPARTS)iPartId) {
case HEADERPARTS.HP_HEADERITEM:
return true;
default: return false;
}
#endregion
#region PROGRESS
case ThemeHandle.PROGRESS:
switch ((PROGRESSPARTS)iPartId) {
case PROGRESSPARTS.PP_BAR:
case PROGRESSPARTS.PP_BARVERT:
case PROGRESSPARTS.PP_CHUNK:
case PROGRESSPARTS.PP_CHUNKVERT:
return true;
default: return false;
}
#endregion
#region REBAR
case ThemeHandle.REBAR:
switch ((REBARPARTS)iPartId) {
case REBARPARTS.RP_BAND:
return true;
default: return false;
}
#endregion
#region SCROLLBAR
case ThemeHandle.SCROLLBAR:
switch ((SCROLLBARPARTS)iPartId) {
case SCROLLBARPARTS.SBP_ARROWBTN:
case SCROLLBARPARTS.SBP_THUMBBTNHORZ:
case SCROLLBARPARTS.SBP_THUMBBTNVERT:
case SCROLLBARPARTS.SBP_LOWERTRACKHORZ:
case SCROLLBARPARTS.SBP_UPPERTRACKHORZ:
case SCROLLBARPARTS.SBP_LOWERTRACKVERT:
case SCROLLBARPARTS.SBP_UPPERTRACKVERT:
return true;
default: return false;
}
#endregion
#region SPIN
case ThemeHandle.SPIN:
switch ((SPINPARTS)iPartId) {
case SPINPARTS.SPNP_UP:
case SPINPARTS.SPNP_DOWN:
return true;
default: return false;
}
#endregion
#region STATUS
case ThemeHandle.STATUS:
switch ((STATUSPARTS)iPartId) {
case STATUSPARTS.SP_GRIPPER:
return true;
default: return false;
}
#endregion
#region TABCONTROL
case ThemeHandle.TAB:
switch ((TABPARTS)iPartId) {
case TABPARTS.TABP_TABITEM:
case TABPARTS.TABP_TABITEMLEFTEDGE:
case TABPARTS.TABP_TABITEMRIGHTEDGE:
case TABPARTS.TABP_TABITEMBOTHEDGE:
case TABPARTS.TABP_TOPTABITEM:
case TABPARTS.TABP_TOPTABITEMLEFTEDGE:
case TABPARTS.TABP_TOPTABITEMRIGHTEDGE:
case TABPARTS.TABP_TOPTABITEMBOTHEDGE:
case TABPARTS.TABP_PANE:
return true;
default: return false;
}
#endregion
#region TOOLBAR
case ThemeHandle.TOOLBAR:
switch ((TOOLBARPARTS)iPartId) {
case TOOLBARPARTS.TP_BUTTON:
return true;
default: return false;
}
#endregion
#region TRACKBAR
case ThemeHandle.TRACKBAR:
switch ((TRACKBARPARTS)iPartId) {
case TRACKBARPARTS.TKP_TRACK:
case TRACKBARPARTS.TKP_TRACKVERT:
case TRACKBARPARTS.TKP_THUMB:
case TRACKBARPARTS.TKP_THUMBVERT:
return true;
default: return false;
}
#endregion
#region TREEVIEW
case ThemeHandle.TREEVIEW:
switch ((TREEVIEWPARTS)iPartId) {
case TREEVIEWPARTS.TVP_GLYPH:
return true;
default: return false;
}
#endregion
default: return false;
}
}
@@ -1167,7 +352,7 @@ namespace System.Windows.Forms.VisualStyles
#region VisualStyleRenderer
public void VisualStyleRendererDrawBackgroundExcludingArea (IntPtr theme, IDeviceContext dc, int part, int state, Rectangle bounds, Rectangle excludedArea)
{
DrawBackground ((ThemeHandle)(int)theme, dc, part, state, bounds, bounds, excludedArea);
throw new NotImplementedException ();
}
#endregion
}
@@ -99,6 +99,10 @@ namespace System.Windows.Forms {
null_value = nullValue;
format_string = formatString;
format_info = formatInfo;
EventDescriptor prop_changed_event = GetPropertyChangedEvent (data_source, binding_member_info.BindingField);
if (prop_changed_event != null)
prop_changed_event.AddEventHandler (data_source, new EventHandler (SourcePropertyChangedHandler));
}
#else
public Binding (string propertyName, object dataSource, string dataMember)
@@ -107,6 +111,10 @@ namespace System.Windows.Forms {
data_source = dataSource;
data_member = dataMember;
binding_member_info = new BindingMemberInfo (dataMember);
EventDescriptor prop_changed_event = GetPropertyChangedEvent (data_source, binding_member_info.BindingField);
if (prop_changed_event != null)
prop_changed_event.AddEventHandler (data_source, new EventHandler (SourcePropertyChangedHandler));
}
#endif
#endregion // Public Constructors
@@ -338,13 +346,9 @@ namespace System.Windows.Forms {
return;
if (manager == null) {
manager = control.BindingContext [data_source, binding_member_info.BindingPath];
manager = control.BindingContext [data_source];
manager.AddBinding (this);
manager.PositionChanged += new EventHandler (PositionChangedHandler);
EventDescriptor prop_changed_event = GetPropertyChangedEvent (manager.Current, binding_member_info.BindingField);
if (prop_changed_event != null)
prop_changed_event.AddEventHandler (manager.Current, new EventHandler (SourcePropertyChangedHandler));
}
if (manager.Position == -1)
@@ -131,6 +131,8 @@ namespace System.Windows.Forms {
text_format_flags |= TextFormatFlags.WordBreak;
}
if (Parent != null)
Parent.PerformLayout (this, "AutoEllipsis");
this.Invalidate ();
}
}
@@ -172,6 +174,9 @@ namespace System.Windows.Forms {
set {
if (flat_style != value) {
flat_style = value;
if (Parent != null)
Parent.PerformLayout (this, "FlatStyle");
Invalidate();
}
}
@@ -430,6 +435,8 @@ namespace System.Windows.Forms {
set {
if (use_compatible_text_rendering != value) {
use_compatible_text_rendering = value;
if (Parent != null)
Parent.PerformLayout (this, "UseCompatibleTextRendering");
Invalidate ();
}
}
@@ -44,6 +44,10 @@ namespace System.Windows.Forms.PropertyGridInternal
get { return GridItemType.Category; }
}
public override bool Expandable {
get { return GridItems.Count > 0; }
}
public override string Label {
get { return label; }
}
@@ -1,30 +1,62 @@
2008-08-27 Jonathan Pobst <monkey@jpobst.com>
2008-09-30 Everaldo Canuto <ecanuto@novell.com>
* DataGridView.cs: Raise CellContentClick event.
[Fixes part of bug #420351]
* MenuAPI.cs: Prevent NRE when deactivate menu. Fixes #413636.
2008-08-27 Mario Carrion <[email protected]>
2008-09-08 Ivan N. Zlatev <[email protected]>
* ScrollBar.cs: Control enabled to support accessibility.
[Fixes bug #416759]
* ErrorProvider.cs: Unbreak my previous commit.
2008-08-27 Mario Carrion <[email protected]>
2008-09-08 Ivan N. Zlatev <[email protected]>
* ComboBox.cs: Control enabled to support accessibility.
[Fixes bug #416663]
* ErrorProvider.cs: Icon should always be 16x16.
[Fixes bug #424380]
2008-08-27 Mario Carrion <[email protected]>
2008-09-07 Ivan N. Zlatev <[email protected]>
* ListBox.cs: Control enabled to support accessibility.
[Fixes bug #416640]
* GridEntry.cs: Invalidate the child items cache when the property
value changes.
2008-08-27 Jonathan Pobst <mon[email protected]>
2008-09-07 Ivan N. Zlatev <con[email protected]>
* ComboBox.cs: Don't suppress the TextChanged event when changing
the SelectedIndex.
* ToolStripComboBox.cs: Listen to the ComboBox's TextChanged event
and re-raise it.
[Fixes bug #420673]
* GridEntry.cs, PropertyGridView.cs:
- Update the ReadOnly detection and rendering to finally hopefully
match the one of MSFT.
- Niceify and move the debug CWLS.
[Fixes bug #409028]
2008-09-04 Ivan N. Zlatev <[email protected]>
* GridEntry.cs, CategoryGridEntry.cs, RootGridEntry.cs, PropertyGrid.cs,
PropertyGridView.sc: Implement lazy/delayed propertygrid population
on item expansion. Improves performance and fixes bug #417955.
[Fixes bug #417955]
2008-09-03 Ivan N. Zlatev <[email protected]>
* ButtonBase.cs CheckBox.cs, Control.cs, FlowLayoutPanel.cs,
FlowLayoutSettings.cs, GroupBox.cs, Label.cs, ListBox.cs,
PropertyGrid.cs, RadioButton.cs, TableLayoutPanel.cs,
TableLayoutSettings.cs, ToolStrip.cs, ToolStripDropDownButton.cs,
ToolStripDropDownMenu.cs, ToolStripItem.cs, ToolStripSplitButton.cs,
ToolStripStatusLabel.cs: Add missing PerformLayout calls to various
properties.
[Fixes bug #418684]
2008-09-02 Jonathan Pobst <[email protected]>
* XplatUIWin32.cs: Ensure we never send the WS_EX_MDICHILD flag
to Windows when creating a window, as we fake MDI stuffs.
[Fixes bug #421858]
2008-09-01 Ivan N. Zlatev <[email protected]>
* TextBox.cs: Invalidate after UseSystemPasswordChar, so that the
change takes effect.
2008-08-24 Ivan N. Zlatev <[email protected]>
* XplatUIX11.cs: Provide MouseButtons/State information to the XPlatUI.
[Fixes bug #419001]
2008-08-26 Jonathan Pobst <[email protected]>
@@ -32,38 +64,10 @@
for a control before it has a parent.
[Fixes bug #420305]
2008-08-25 Carlos Alberto Cortez <calberto.cortez@gmail.com>
2008-08-19 Jonathan Pobst <monkey@jpobst.com>
* Binding.cs: Use the BindingManagerBase.Current value to obtain
connect the property "Changed" event, instead of using the data
sources - this is useful when the property specifies actually a
multiple objects path.
Fixes part of #417973.
2008-08-24 Carlos Alberto Cortez <[email protected]>
* RelatedPropertyManager.cs: PropertyManager instances associated to a
nested properties should return not the properties of the data source
itself, but the properties of the type of a specific property in the
data source - match .net.
2008-08-24 Gert Driesen <[email protected]>
* ListBox.cs (IntegerCollection): To avoid duplication, moved code for
AddRange overloads into AddItems method, and added missing NULL check.
Added extra argument check to RemoveAt for compatibility with MS.
Modified IList implementation of Add, Contains, IndexOf and Remove to
throw an ArgumentException if item is not an int. Modified IList.Insert
to throw a NotSupportException instead of an Exception. Implemented
ICollection.
(ObjectCollection): To avoid duplication, use AddItems method from
AddRange overloads. On 1.0 profile, first perform NULL check on items
in AddItems.
2008-08-23 Gert Driesen <[email protected]>
* Control.cs: Do not modify bounds directly in .ctor's. Fixes bug
#419087.
* LinkLabel.cs: Always clear any previous links when LinkArea
is set. [Fixes bug #410709]
2008-08-22 Atsushi Enomoto <[email protected]>
@@ -76,98 +80,11 @@
receiving correct input, which blocked precise input handling
on non-XIM mode.
2008-08-20 Carlos Alberto Cortez <[email protected]>
* ListView.cs: When calling OnCacheVirtualItems, cast to the right
type of delegate, instead of EventHandler - this was causing a type
cast exception in all apps handling this event.
Fixes #417876.
2008-08-20 Jonathan Pobst <[email protected]>
* ToolStripDropDownItem.cs: Always raise DropDownOpening in
ShowDropDown to give the user a chance to dynamically add
drop down items. [Step 1 of fixing bug #417877]
2008-08-20 Carlos Alberto Cortez <[email protected]>
* X11Dnd.cs: Don't fire pseudo motion DragOver events if we haven't
had any mouse motion since the call to StartDrag, to match the dnd
behaviour of .net.
Fixes part of #381876.
2008-08-20 Carlos Alberto Cortez <[email protected]>
* XplatUIX11.cs: Only do the children control bounds check for EnterNotify
if mode is NotifyUngrab, and let it flow if mode is NotifyNormal.
Also, if we are actually moving into a different window after
grabbing, generate a LeaveNotify event for the previous window, since
we need to fire the leave events until the grab ends, not when
actually moving outside of the control.
2008-08-19 Carlos Alberto Cortez <[email protected]>
* XplatUIX11.cs: The check inside EnterNotify case to fire MouseEnter
events only for client windows was wrong - we need to compare the
client window against the window receiving the EnterNotify event, not
against zero (since client window is never Zero, btw).
This prevents having unnecessary handling of EnterNotify events for
non-client windows when a gran begins.
2008-08-19 Carlos Alberto Cortez <[email protected]>
* XplatUIX11.cs: Handling X ButtonPress events, we must *not* generate
MouseMove/MotionNotify events at all (which should only happen after
MouseUp/ButtonRelease, as .Net does).
This avoids firing an extra and unnecessary MouseMove event just after
every MouseDown event.
2008-08-19 Jonathan Pobst <[email protected]>
* LinkLabel.cs: Always clear any previous links when LinkArea
is set. [Fixes bug #410709]
2008-08-19 Jonathan Pobst <[email protected]>
* ToolStripProfessionalRenderer.cs: Revert last change.
* ProfessionalColorTable.cs: For Classic, use SystemColors.Window
for ToolStripDropDownBackground.
2008-08-19 Jonathan Pobst <[email protected]>
* ToolStripProfessionalRenderer.cs: Use Window color for the
background of dropdowns to match .Net when the user is not
using the default white. [Fixes bug #418108]
2008-08-19 Atsushi Enomoto <[email protected]>
* XplatUIWin32.cs : SetTimer() used to set wrong window handle and
it caused timer registration twice. Fixed bug #418107.
2008-08-18 Carlos Alberto Cortez <[email protected]>
[Correction: This is the actual change to X11Dnd issue, not the
previous one, which was actually a different issue.]
* X11Dnd.cs: Increase the interval for the Timer, to not fire our
pseudo motion HandleMouseOver method so aggresive. Also, don't call it
when the pointer is actually in motion, but only when the pointer
seems to stop (as .net does).
Fixes part of #381876.
2008-08-18 Jonathan Pobst <[email protected]>
* ListBox.cs: Fix CopyTo implementation.
[Fixes bug #409169]
2008-08-18 Jonathan Pobst <[email protected]>
* ThemeWin32Classic.cs: Use ClientRectangle instead of Bounds when
drawing a ComboBox's background. Fixes bad disabled rendering when
the control is not at 0,0.
[Fixes bug #416063]
2008-08-16 Ivan N. Zlatev <[email protected]>
* GridEntry.cs: Leave the ICustomTypeDescriptor handling up to the
@@ -176,14 +93,6 @@
the converter and editor.
[Fixes bug #417729]
2008-08-15 Carlos Alberto Cortez <[email protected]>
* XplatUIX11.cs: Increase the interval for the Timer, to not fire our
pseudo motion HandleMouseOver method so aggresive. Also, don't call it
when the pointer is actually in motion, but only when the pointer
seems to stop (as .net does).
Fixes part of #381876.
2008-08-15 Ivan N. Zlatev <[email protected]>
* GridEntry.cs: Perform stricter check for the ParentEntry's
@@ -193,11 +102,10 @@
2008-08-14 Geoff Norton <[email protected]>
* XplatUICarbon.cs: Properly implement PeekMessage and DoEvents.
Fixes #396983. Properly fix ActiveWindow trackin and do not
prematurely show POPUP windows.
* XplatUICarbon.cs: Track the ActiveWindow internally for GetActive().
Don't prematurely display POPUP windows. Fully fixed #393317.
2008-08-12 Carlos Alberto Cortez <[email protected]>
2008-08-12 Carlos Alberto Cortez <[email protected]>
* XplatUIX11.cs: Handle the obscured regions while scrolling using
GraphicsExpose event, processing it just after we copy the scrolled
@@ -214,6 +122,14 @@
MouseDown events - we are only interested in the real motion event.
Fixes part of #414963.
2008-08-12 Carlos Alberto Cortez <[email protected]>
* XplatUIX11.cs: When getting EnterNotify with mode other than
NotifyNormal (pseudo motion events), ignore them as we used to do
before, since it's breaking our selection code and some drag and drop
operations, because of the confusion of generating extra events (not
fired by .net, btw).
2008-08-08 Jonathan Pobst <[email protected]>
* DataGridViewCell.cs: Guard against an AOORE when checking if a cell
@@ -231,6 +147,20 @@
* PropertyGrid.cs: Refresh should also repopulate the PropertyGrid.
[Fixes part of bug #415452]
2008-08-07 Andreia Gaita <[email protected]>
* WebBrowser.cs: Remove extraneous CWL. Fixes #411372 (partially)
2008-08-06 Carlos Alberto Cortez <[email protected]>
* ListBox.cs: Selection changes made in the MouseDown handler should
use the *Core versions of selection in SelectedIndices collection,
since the SelectedIndexChanged/SelectedValueChanged events are fired
until we get a MouseUp event, and thus we need to separate the logic
from the events, as done in the keyboard navigation. Also, fire those
selection events from keyboard navigation in SelectionMode.None, even
if we don't have a selection, as .Net does.
2008-08-05 Ivan N. Zlatev <[email protected]>
* GridEntry.cs: ITypeDescriptorContext should be relative to the parent
@@ -244,22 +174,27 @@
share the same logic.
[Fixes bug #414454]
2008-08-03 Carlos Alberto Cortez <[email protected]>
2008-08-01 Carlos Alberto Cortez <[email protected]>
* ListBox.cs: Selection changes made in the MouseDown handler should
use the *Core versions of selection in SelectedIndices collection,
since the SelectedIndexChanged/SelectedValueChanged events are fired
until we get a MouseUp event, and thus we need to separate the logic
from the events, as done in the keyboard navigation. Also, fire those
selection events from keyboard navigation in SelectionMode.None, even
if we don't have a selection, as .Net does.
* DateTimePicker.cs:
* ThemeWin32Classic.cs: Add a editing capability to DateTimePicker, in
order to set the value as required (which means: when selection
changes for a part being edited, and not before that if not needed).
Also use an enum to describe which part are we using, and use the
selection as a property in PartData, in order to notify the
DateTimePicker owner that we need to end the current edit.
Fixes #383462.
2008-08-01 Jonathan Pobst <monkey@jpobst.com>
2008-08-01 Carlos Alberto Cortez <calberto.cortez@gmail.com>
* ToolStripButton.cs, ToolStripMenuItem.cs: Guard against a NRE my
last change introduced when an item is clicked but isn't on a toolstrip.
* ThemeWin32Classic.cs: Don't draw ListViewSubItem instances from
DrawListViewItem - we need to reuse the main item's drawing for the
first sub item in case owner draw is true, but wants the system to
do the default draw for the first sub item, without incurring in a
recursion problem.
Fixes #410880.
2008-07-31 Carlos Alberto Cortez <[email protected]>
2008-08-01 Carlos Alberto Cortez <[email protected]>
* ListBindingHelper.cs: When looking for an object's properties, check
if it implements ICustomTypeDescriptor, in which case we should
@@ -267,44 +202,22 @@
actual properties. This is what .Net seems to do.
Fixes a UsingWebBrowser problem during initialization.
2008-08-01 Jonathan Pobst <[email protected]>
* ToolStripButton.cs, ToolStripMenuItem.cs: Guard against a NRE my
last change introduced when an item is clicked but isn't on a toolstrip.
2008-07-31 Geoff Norton <[email protected]>
* XplatUICarbon.cs: Properly implement PeekMessage and DoEvents.
Fixes #396983
2008-07-31 Jonathan Pobst <[email protected]>
* ToolStrip.cs: Fix an NRE caused by clicking on a ToolStripButton
sitting on a MenuStrip.
2008-07-31 Jonathan Pobst <[email protected]>
* ToolStripButton.cs: If we "click" a top button on a menustrip that has
no children with the keyboard, we need to release the keyboard capture.
[Fixes bug #413567]
2008-07-31 Jonathan Pobst <[email protected]>
* ToolStripMenuItem.cs: If we "click" a top level menu item that has
no children with the keyboard, we need to release the keyboard capture.
[Fixes bug #413567]
2008-07-31 George Giolfan <[email protected]>
* ThemeVisualStyles.cs: Made ScrollBar rendering less strict so it supports
the GTK+-based implementation of VisualStyles.
* ThemeWin32Classic.cs: Exposed various layout values for use in the
GTK+-based implementation of VisualStyles: ListViewGetHeaderHeight(Font),
ListViewGetHeaderHeight(), ProgressBarChunkSpacing, ProgressBarGetChunkSize(),
ProgressBarGetChunkSize(int), ProgressBarDefaultHeight,
TrackBarGetThumbSize(), TrackBarVerticalTrackWidth,
TrackBarHorizontalTrackHeight.
2008-07-31 George Giolfan <[email protected]>
* TabControl.cs: Added hot style handling for the scroll buttons.
right_slider_state, left_slider_state are now of type PushButtonState to
allow for a hot state. Added tracking of the mouse button being held down
on a tab page. Extracted HasHotElementStyles, RightScrollButtonArea,
LeftScrollButtonArea.
* Theme.cs, ThemeWin32Classic.cs: Removed TabControlGetLeftScrollRect,
TabControlGetRightScrollRect.
2008-07-30 Everaldo Canuto <[email protected]>
* MenuAPI.cs: Check for null GrabControl on ProcessMnemonic to prevent
@@ -322,6 +235,12 @@
* Form.cs: Ensure closing events are raised only once.
[Fixes bug #413143]
2008-07-29 Jonathan Pobst <[email protected]>
* ListBox.cs: Don't let the user set TopIndex so high that it
scrolls up far enough to show empty items.
[Fixes bug #412728]
2008-07-30 Ivan N. Zlatev <[email protected]>
* X11Keyboard.cs: Refactor SendKeyboardInput to accept the keycode,
@@ -342,7 +261,7 @@
* MenuAPI.cs: Don't create tracker on TrackPopupMenu, it will be created in
MainMenu (already done) and ContextMenu creation.
* ContextMenu.cs: Create tracker on construction.
* ContextMenu.cs: Create tracker on construction.
2008-07-30 Everaldo Canuto <[email protected]>
@@ -380,27 +299,6 @@
all keyboard messages.
[Fixes bug #378728]
2008-07-29 Jonathan Pobst <[email protected]>
* ListBox.cs: Don't let the user set TopIndex so high that it
scrolls up far enough to show empty items.
[Fixes bug #412728]
2008-07-29 Carlos Alberto Cortez <[email protected]>
* ThemeWin32Classic.cs: Actually commit the changes to fix #410880
(I'm an idiot and forgot to commit the actual changes, as well as
specify the right file, which is this one, not ListView.cs).
2008-07-28 Carlos Alberto Cortez <[email protected]>
* ListView.cs: Don't draw ListViewSubItem instances from
DrawListViewItem - we need to reuse the main item's drawing for the
first sub item in case owner draw is true, but wants the system to
do the default draw for the first sub item, without incurring in a
recursion problem.
Fixes #410880.
2008-07-28 Jonathan Pobst <[email protected]>
* ToolStripButton.cs: Update Checked for CheckOnClick before
@@ -417,15 +315,6 @@
* PropertyGrid.cs: Invalidate the View when the PropertyTab
changes.
2008-07-25 Gert Driesen <[email protected]>
* WebBrowser.cs: Removed debug output.
2008-07-25 Jonathan Pobst <[email protected]>
* FileDialog.cs: Apply patch from Ernesto to clean up some
dialog messages.
2008-07-25 Ivan N. Zlatev <[email protected]>
* TableLayoutPanel.cs: Perform layout on GrowStyle change, so
@@ -469,26 +358,10 @@
* TableLayoutPanel.cs: Layout on Row/Column count change.
2008-07-22 Gert Driesen <[email protected]>
* ListViewItem.cs: Changed binary serialization to match MS. Fixes
bug #409351.
* PictureBox.cs: When ImageLocation is set to null or an empty string,
only set image to null if it was previously initialized from an url
(or using ImageLocation). In ImageLocation, load specified image
asynchronously if WaitOnLoad is false. Added support for local file
paths to LoadAsync, and added missing argument check.
2008-07-22 Carlos Alberto Cortez <[email protected]>
* DateTimePicker.cs:
* ThemeWin32Classic.cs: Add a editing capability to DateTimePicker, in
order to set the value as required (which means: when selection
changes for a part being edited, and not before that if not needed).
Also use an enum to describe which part are we using, and use the
selection as a property in PartData, in order to notify the
DateTimePicker owner that we need to end the current edit.
Fixes #383462.
2008-07-15 Jonathan Pobst <[email protected]>
[Backport to 2.0]
* ImageList.cs: Fix ICollection.CopyTo implementation for
ImageListCollection. [Fixes bug #409169]
2008-07-17 Ivan N. Zlatev <[email protected]>
@@ -505,11 +378,6 @@
returned which caused GetPropertiesSupported == false in most cases.
[Fixes bug #409027]
2008-07-15 Jonathan Pobst <[email protected]>
* ImageList.cs: Fix ICollection.CopyTo implementation for
ImageListCollection. [Fixes bug #409169]
2008-07-14 Jonathan Pobst <[email protected]>
* MenuAPI.cs, ToolStripDropDown.cs: Use VirtualScreen instead of
@@ -170,6 +170,9 @@ namespace System.Windows.Forms {
if (value != appearance) {
appearance = value;
OnAppearanceChanged (EventArgs.Empty);
if (Parent != null)
Parent.PerformLayout (this, "Appearance");
Invalidate();
}
}
@@ -197,7 +200,8 @@ namespace System.Windows.Forms {
set {
if (value != check_alignment) {
check_alignment = value;
if (Parent != null)
Parent.PerformLayout (this, "CheckAlign");
Invalidate();
}
}
@@ -675,9 +675,9 @@ namespace System.Windows.Forms
if (dropdown_style != ComboBoxStyle.DropDownList) {
if (value == -1)
SetControlText (string.Empty, false);
SetControlText("");
else
SetControlText (GetItemText (Items [value]), false);
SetControlText (GetItemText (Items [value]));
}
if (DropDownStyle == ComboBoxStyle.DropDownList)
@@ -799,7 +799,7 @@ namespace System.Windows.Forms
if (value == null) {
if (SelectedIndex == -1) {
if (dropdown_style != ComboBoxStyle.DropDownList)
SetControlText (string.Empty, false);
SetControlText ("");
} else {
SelectedIndex = -1;
}
@@ -838,14 +838,6 @@ namespace System.Windows.Forms
}
#endregion
#region UIA Framework Properties
internal TextBox UIATextBox {
get { return textbox_ctrl; }
}
#endregion UIA Framework Properties
#region Public Methods
#if NET_2_0
[Obsolete ("This method has been deprecated")]
@@ -1036,7 +1028,7 @@ namespace System.Windows.Forms
return;
if (selected_index != -1 && DropDownStyle != ComboBoxStyle.DropDownList)
SetControlText (GetItemText (Items [selected_index]), true);
SetControlText (GetItemText (Items [selected_index]));
if (!IsHandleCreated)
return;
@@ -1842,15 +1834,13 @@ namespace System.Windows.Forms
if (process_textchanged_event == false)
return;
OnTextChanged (EventArgs.Empty);
int item = FindStringCaseInsensitive (textbox_ctrl.Text);
if (item == -1) {
// Setting base.Text below will raise this event
// if we found something
OnTextChanged (EventArgs.Empty);
if (item == -1)
return;
}
// TODO: THIS IS BROKEN-ISH
// I don't think we should hilight, and setting the top item does weirdness
// when there is no scrollbar
@@ -1868,11 +1858,9 @@ namespace System.Windows.Forms
selected_index = -1;
}
internal void SetControlText (string s, bool suppressTextChanged)
internal void SetControlText (string s)
{
if (suppressTextChanged)
process_textchanged_event = false;
process_textchanged_event = false;
textbox_ctrl.Text = s;
textbox_ctrl.SelectAll ();
process_textchanged_event = true;
@@ -1925,32 +1913,6 @@ namespace System.Windows.Forms
private ComboBox owner;
internal ArrayList object_items = new ArrayList ();
#region UIA Framework Events
#if NET_2_0
//NOTE:
// We are using Reflection to add/remove internal events.
// Class ListProvider uses the events.
//
//Event used to generate UIA StructureChangedEvent
static object UIACollectionChangedEvent = new object ();
internal event CollectionChangeEventHandler UIACollectionChanged {
add { owner.Events.AddHandler (UIACollectionChangedEvent, value); }
remove { owner.Events.RemoveHandler (UIACollectionChangedEvent, value); }
}
internal void OnUIACollectionChangedEvent (CollectionChangeEventArgs args)
{
CollectionChangeEventHandler eh
= (CollectionChangeEventHandler) owner.Events [UIACollectionChangedEvent];
if (eh != null)
eh (owner, args);
}
#endif
#endregion UIA Framework Events
public ObjectCollection (ComboBox owner)
{
@@ -1981,18 +1943,7 @@ namespace System.Windows.Forms
if (value == null)
throw new ArgumentNullException ("value");
#if NET_2_0
//UIA Framework event: Item Removed
OnUIACollectionChangedEvent (new CollectionChangeEventArgs (CollectionChangeAction.Remove, index));
#endif
object_items[index] = value;
#if NET_2_0
//UIA Framework event: Item Added
OnUIACollectionChangedEvent (new CollectionChangeEventArgs (CollectionChangeAction.Add, index));
#endif
if (owner.listbox_ctrl != null)
owner.listbox_ctrl.InvalidateItem (index);
if (index == owner.SelectedIndex) {
@@ -2045,11 +1996,6 @@ namespace System.Windows.Forms
object_items.Clear ();
owner.UpdatedItems ();
owner.Refresh ();
#if NET_2_0
//UIA Framework event: Items list cleared
OnUIACollectionChangedEvent (new CollectionChangeEventArgs (CollectionChangeAction.Refresh, -1));
#endif
}
public bool Contains (object value)
@@ -2111,13 +2057,8 @@ namespace System.Windows.Forms
if (owner.Sorted)
AddItem (item);
else {
else
object_items.Insert (index, item);
#if NET_2_0
//UIA Framework event: Item added
OnUIACollectionChangedEvent (new CollectionChangeEventArgs (CollectionChangeAction.Add, index));
#endif
}
owner.EndUpdate (); // Calls UpdatedItems
}
@@ -2143,11 +2084,6 @@ namespace System.Windows.Forms
object_items.RemoveAt (index);
owner.UpdatedItems ();
#if NET_2_0
//UIA Framework event: Item removed
OnUIACollectionChangedEvent (new CollectionChangeEventArgs (CollectionChangeAction.Remove, index));
#endif
}
#endregion Public Methods
@@ -2169,23 +2105,12 @@ namespace System.Windows.Forms
if (index <= owner.selected_index && owner.IsHandleCreated)
owner.selected_index++;
#if NET_2_0
//UIA Framework event: Item added
OnUIACollectionChangedEvent (new CollectionChangeEventArgs (CollectionChangeAction.Add, index));
#endif
return index;
}
index++;
}
}
object_items.Add (item);
#if NET_2_0
//UIA Framework event: Item added
OnUIACollectionChangedEvent (new CollectionChangeEventArgs (CollectionChangeAction.Add, object_items.Count - 1));
#endif
return object_items.Count - 1;
}
@@ -1097,6 +1097,10 @@ namespace System.Windows.Forms
public Control (Control parent, string text, int left, int top, int width, int height) : this()
{
Parent=parent;
bounds.X=left;
bounds.Y=top;
bounds.Width=width;
bounds.Height=height;
SetBounds(left, top, width, height, BoundsSpecified.All);
Text=text;
}
@@ -1108,6 +1112,10 @@ namespace System.Windows.Forms
public Control (string text, int left, int top, int width, int height) : this()
{
bounds.X=left;
bounds.Y=top;
bounds.Width=width;
bounds.Height=height;
SetBounds(left, top, width, height, BoundsSpecified.All);
Text=text;
}
@@ -2226,9 +2234,13 @@ namespace System.Windows.Forms
auto_size = value;
// If we're turning this off, reset our size
if (!value)
if (!value) {
Size = explicit_bounds.Size;
} else {
if (Parent != null)
Parent.PerformLayout (this, "AutoSize");
}
OnAutoSizeChanged (EventArgs.Empty);
}
}
@@ -3029,6 +3041,8 @@ namespace System.Windows.Forms
set {
if (this.margin != value) {
this.margin = value;
if (Parent != null)
Parent.PerformLayout (this, "Margin");
OnMarginChanged (EventArgs.Empty);
}
}
@@ -3866,11 +3866,8 @@ namespace System.Windows.Forms {
DataGridViewCell cell = GetCellInternal (hit.ColumnIndex, hit.RowIndex);
if (cell.GetContentBounds (hit.RowIndex).Contains (cellpoint)) {
DataGridViewCellEventArgs dgvcea = new DataGridViewCellEventArgs (hit.ColumnIndex, hit.RowIndex);
OnCellContentClick (dgvcea);
cell.OnContentClickInternal (dgvcea);
}
if (cell.GetContentBounds (hit.RowIndex).Contains (cellpoint))
cell.OnContentClickInternal (new DataGridViewCellEventArgs (hit.ColumnIndex, hit.RowIndex));
break;
case DataGridViewHitTestType.ColumnHeader:
@@ -412,7 +412,10 @@ namespace System.Windows.Forms {
}
set {
icon = value;
if (value != null && (value.Height != 16 || value.Width != 16))
icon = new Icon (value, 16, 16);
else
icon = value;
}
}
@@ -940,7 +940,7 @@ namespace System.Windows.Forms
if (checkFileExists) {
if (!File.Exists (internalfullfilename)) {
string message = "\"" + internalfullfilename + "\" does not exist. Please verify that you have entered the correct file name.";
string message = "\"" + internalfullfilename + "\" doesn't exist. Please verify that you have entered the correct file name.";
MessageBox.Show (message, openSaveButton.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
@@ -949,7 +949,7 @@ namespace System.Windows.Forms
if (fileDialogType == FileDialogType.SaveFileDialog) {
if (overwritePrompt) {
if (File.Exists (internalfullfilename)) {
string message = "\"" + internalfullfilename + "\" already exists. Do you want to overwrite it?";
string message = "\"" + internalfullfilename + "\" exists. Overwrite ?";
DialogResult dr = MessageBox.Show (message, openSaveButton.Text, MessageBoxButtons.OKCancel, MessageBoxIcon.Warning);
if (dr == DialogResult.Cancel)
return;
@@ -958,7 +958,7 @@ namespace System.Windows.Forms
if (createPrompt) {
if (!File.Exists (internalfullfilename)) {
string message = "\"" + internalfullfilename + "\" does not exist. Do you want to create it?";
string message = "\"" + internalfullfilename + "\" doesn't exist. Create ?";
DialogResult dr = MessageBox.Show (message, openSaveButton.Text, MessageBoxButtons.OKCancel, MessageBoxIcon.Warning);
if (dr == DialogResult.Cancel)
return;
@@ -994,7 +994,7 @@ namespace System.Windows.Forms
if (checkPathExists && mwfFileView.CurrentRealFolder != null) {
if (!Directory.Exists (mwfFileView.CurrentRealFolder)) {
string message = "\"" + mwfFileView.CurrentRealFolder + "\" does not exist. Please verify that you have entered the correct directory name.";
string message = "\"" + mwfFileView.CurrentRealFolder + "\" doesn't exist. Please verify that you have entered the correct directory name.";
MessageBox.Show (message, openSaveButton.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
if (InitialDirectory.Length == 0 || !Directory.Exists (InitialDirectory))
@@ -3339,7 +3339,7 @@ namespace System.Windows.Forms
} else
File.Move (sourceFileName, destFileName);
} catch (Exception e) {
MessageBox.Show (e.Message, "Error Renaming File",
MessageBox.Show (e.Message, "Error Renaming Folder",
MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
@@ -70,7 +70,7 @@ namespace System.Windows.Forms
internal FlowLayoutSettings LayoutSettings {
get {
if (this.settings == null)
this.settings = new FlowLayoutSettings ();
this.settings = new FlowLayoutSettings (this);
return this.settings;
}
@@ -89,7 +89,6 @@ namespace System.Windows.Forms
public void SetFlowBreak (Control control, bool value)
{
LayoutSettings.SetFlowBreak (control, value);
this.PerformLayout (control, "FlowBreak");
}
#endregion
@@ -40,19 +40,31 @@ namespace System.Windows.Forms
private bool wrap_contents;
private LayoutEngine layout_engine;
private Dictionary<object, bool> flow_breaks;
private Control owner;
internal FlowLayoutSettings ()
internal FlowLayoutSettings () : this (null)
{
}
internal FlowLayoutSettings (Control owner)
{
flow_breaks = new Dictionary<object, bool> ();
wrap_contents = true;
flow_direction = FlowDirection.LeftToRight;
this.owner = owner;
}
#region Public Properties
[DefaultValue (FlowDirection.LeftToRight)]
public FlowDirection FlowDirection {
get { return this.flow_direction; }
set { this.flow_direction = value; }
set {
if (this.flow_direction != value) {
this.flow_direction = value;
if (owner != null)
owner.PerformLayout (owner, "FlowDirection");
}
}
}
public override LayoutEngine LayoutEngine {
@@ -67,7 +79,13 @@ namespace System.Windows.Forms
[DefaultValue (true)]
public bool WrapContents {
get { return this.wrap_contents; }
set { this.wrap_contents = value; }
set {
if (this.wrap_contents != value) {
this.wrap_contents = value;
if (owner != null)
owner.PerformLayout (owner, "WrapContents");
}
}
}
#endregion
@@ -85,6 +103,8 @@ namespace System.Windows.Forms
public void SetFlowBreak (Object child, bool value)
{
flow_breaks[child] = value;
if (owner != null)
owner.PerformLayout ((Control)child, "FlowBreak");
}
#endregion
}
@@ -48,6 +48,7 @@ namespace System.Windows.Forms.PropertyGridInternal
private PropertyDescriptor[] property_descriptors;
private int top;
private Rectangle plus_minus_bounds;
private GridItemCollection child_griditems_cache;
#endregion // Local Variables
#region Contructors
@@ -61,6 +62,7 @@ namespace System.Windows.Forms.PropertyGridInternal
grid_items = new GridItemCollection ();
expanded = false;
this.parent = parent;
child_griditems_cache = null;
}
// Cannot use one PropertyDescriptor for all owners, because the
@@ -78,7 +80,16 @@ namespace System.Windows.Forms.PropertyGridInternal
public override bool Expandable {
get { return grid_items.Count > 0; }
get {
TypeConverter converter = GetConverter ();
if (converter == null || !converter.GetPropertiesSupported ((ITypeDescriptorContext)this))
return false;
if (GetChildGridItemsCached ().Count > 0)
return true;
return false;
}
}
public override bool Expanded {
@@ -86,6 +97,7 @@ namespace System.Windows.Forms.PropertyGridInternal
set {
if (expanded != value) {
expanded = value;
PopulateChildGridItems ();
if (value)
property_grid.OnExpandItem (this);
else
@@ -95,7 +107,10 @@ namespace System.Windows.Forms.PropertyGridInternal
}
public override GridItemCollection GridItems {
get { return grid_items; }
get {
PopulateChildGridItems ();
return grid_items;
}
}
public override GridItemType GridItemType {
@@ -463,6 +478,7 @@ namespace System.Windows.Forms.PropertyGridInternal
return false;
if (SetValueCore (value, out error)) {
InvalidateChildGridItemsCache ();
property_grid.OnPropertyValueChangedInternal (this, this.Value);
return true;
}
@@ -625,26 +641,18 @@ namespace System.Windows.Forms.PropertyGridInternal
//
public virtual bool IsReadOnly {
get {
TypeConverter converter = GetConverter ();
// if (PropertyDescriptor != null) {
// Console.WriteLine ("=== [" + PropertyDescriptor.Name + "]");
// Console.WriteLine ("PropertyDescriptor.IsReadOnly: " + PropertyDescriptor.IsReadOnly);
// UITypeEditor editor = GetEditor ();
// Console.WriteLine ("Editor: " + (editor == null ? "none" : GetEditor ().GetType ().Name));
// if (editor != null)
// Console.WriteLine ("Editor.EditorStyle: " + editor.GetEditStyle ((ITypeDescriptorContext)this));
// Console.WriteLine ("Converter: " + (converter == null ? "none" : converter.GetType ().Name));
// if (converter != null) {
// Console.WriteLine ("Converter.GetStandardValuesSupported: " + converter.GetStandardValuesSupported ((ITypeDescriptorContext)this).ToString ());
// Console.WriteLine ("Converter.GetStandardValuesExclusive: " + converter.GetStandardValuesExclusive ((ITypeDescriptorContext)this).ToString ());
// Console.WriteLine ("ShouldCreateParentInstance: " + this.ShouldCreateParentInstance);
// Console.WriteLine ("CanConvertFrom (string): " + converter.CanConvertFrom ((ITypeDescriptorContext)this, typeof (string)));
// }
// Console.WriteLine ("IsArray: " + PropertyDescriptor.PropertyType.IsArray.ToString ());
// }
if (PropertyDescriptor == null || PropertyOwner == null ||
(PropertyDescriptor.IsReadOnly && !this.ShouldCreateParentInstance &&
EditorStyle != UITypeEditorEditStyle.Modal))
TypeConverter converter = GetConverter ();
if (PropertyDescriptor == null || PropertyOwner == null)
return true;
else if (PropertyDescriptor.IsReadOnly &&
(EditorStyle != UITypeEditorEditStyle.Modal || PropertyDescriptor.PropertyType.IsValueType) &&
!this.ShouldCreateParentInstance)
return true;
else if (PropertyDescriptor.IsReadOnly &&
TypeDescriptor.GetAttributes (PropertyDescriptor.PropertyType)
[typeof(ImmutableObjectAttribute)].Equals (ImmutableObjectAttribute.Yes))
return true;
else if (ShouldCreateParentInstance && ParentEntry.IsReadOnly)
return true;
else if (!HasCustomEditor && converter == null)
return true;
@@ -661,15 +669,6 @@ namespace System.Windows.Forms.PropertyGridInternal
}
}
public bool IsExpandable {
get {
TypeConverter converter = GetConverter ();
if (converter != null && converter.GetPropertiesSupported ((ITypeDescriptorContext)this))
return true;
return false;
}
}
public bool IsPassword {
get {
#if NET_2_0
@@ -723,5 +722,139 @@ namespace System.Windows.Forms.PropertyGridInternal
}
}
#region Population
protected void PopulateChildGridItems ()
{
grid_items = GetChildGridItemsCached ();
}
private void InvalidateChildGridItemsCache ()
{
if (child_griditems_cache != null) {
child_griditems_cache = null;
PopulateChildGridItems ();
}
}
private GridItemCollection GetChildGridItemsCached ()
{
if (child_griditems_cache == null) {
child_griditems_cache = GetChildGridItems ();
// foreach (GridEntry item in child_griditems_cache)
// PrintDebugInfo (item);
}
return child_griditems_cache;
}
// private static void PrintDebugInfo (GridEntry item)
// {
// if (item.PropertyDescriptor != null) {
// Console.WriteLine ("=== [" + item.PropertyDescriptor.Name + "] ===");
// try {
// TypeConverter converter = item.GetConverter ();
// Console.WriteLine ("IsReadOnly: " + item.IsReadOnly);
// Console.WriteLine ("IsEditable: " + item.IsEditable);
// Console.WriteLine ("PropertyDescriptor.IsReadOnly: " + item.PropertyDescriptor.IsReadOnly);
// if (item.ParentEntry != null)
// Console.WriteLine ("ParentEntry.IsReadOnly: " + item.ParentEntry.IsReadOnly);
// Console.WriteLine ("ImmutableObjectAttribute.Yes: " + TypeDescriptor.GetAttributes (item.PropertyDescriptor.PropertyType)
// [typeof(ImmutableObjectAttribute)].Equals (ImmutableObjectAttribute.Yes));
// UITypeEditor editor = item.GetEditor ();
// Console.WriteLine ("Editor: " + (editor == null ? "none" : editor.GetType ().Name));
// if (editor != null)
// Console.WriteLine ("Editor.EditorStyle: " + editor.GetEditStyle ((ITypeDescriptorContext)item));
// Console.WriteLine ("Converter: " + (converter == null ? "none" : converter.GetType ().Name));
// if (converter != null) {
// Console.WriteLine ("Converter.GetStandardValuesSupported: " + converter.GetStandardValuesSupported ((ITypeDescriptorContext)item).ToString ());
// Console.WriteLine ("Converter.GetStandardValuesExclusive: " + converter.GetStandardValuesExclusive ((ITypeDescriptorContext)item).ToString ());
// Console.WriteLine ("ShouldCreateParentInstance: " + item.ShouldCreateParentInstance);
// Console.WriteLine ("CanConvertFrom (string): " + converter.CanConvertFrom ((ITypeDescriptorContext)item, typeof (string)));
// }
// Console.WriteLine ("IsArray: " + item.PropertyDescriptor.PropertyType.IsArray.ToString ());
// } catch { /* Some converters and editor throw NotImplementedExceptions */ }
// }
// }
private GridItemCollection GetChildGridItems ()
{
object[] propertyOwners = this.Values;
string[] propertyNames = GetMergedPropertyNames (propertyOwners);
GridItemCollection items = new GridItemCollection ();
foreach (string propertyName in propertyNames) {
PropertyDescriptor[] properties = new PropertyDescriptor[propertyOwners.Length];
for (int i=0; i < propertyOwners.Length; i++)
properties[i] = GetPropertyDescriptor (propertyOwners[i], propertyName);
items.Add (new GridEntry (property_grid, properties, this));
}
return items;
}
private bool IsPropertyMergeable (PropertyDescriptor property)
{
if (property == null)
return false;
MergablePropertyAttribute attrib = property.Attributes [typeof (MergablePropertyAttribute)] as MergablePropertyAttribute;
if (attrib != null && !attrib.AllowMerge)
return false;
return true;
}
private string[] GetMergedPropertyNames (object [] objects)
{
if (objects == null || objects.Length == 0)
return new string[0];
ArrayList intersection = new ArrayList ();
for (int i = 0; i < objects.Length; i ++) {
if (objects [i] == null)
continue;
PropertyDescriptorCollection properties = GetProperties (objects[i], property_grid.BrowsableAttributes);
ArrayList new_intersection = new ArrayList ();
foreach (PropertyDescriptor currentProperty in (i == 0 ? (ICollection)properties : (ICollection)intersection)) {
PropertyDescriptor matchingProperty = (i == 0 ? currentProperty : properties [currentProperty.Name]);
if (objects.Length > 1 && !IsPropertyMergeable (matchingProperty))
continue;
if (matchingProperty.PropertyType == currentProperty.PropertyType)
new_intersection.Add (matchingProperty);
}
intersection = new_intersection;
}
string[] propertyNames = new string [intersection.Count];
for (int i=0; i < intersection.Count; i++)
propertyNames[i] = ((PropertyDescriptor)intersection[i]).Name;
return propertyNames;
}
private PropertyDescriptor GetPropertyDescriptor (object propertyOwner, string propertyName)
{
if (propertyOwner == null || propertyName == null)
return null;
PropertyDescriptorCollection properties = GetProperties (propertyOwner, property_grid.BrowsableAttributes);
if (properties != null)
return properties[propertyName];
return null;
}
private PropertyDescriptorCollection GetProperties (object propertyOwner, AttributeCollection attributes)
{
if (propertyOwner == null || property_grid.SelectedTab == null)
return new PropertyDescriptorCollection (null);
Attribute[] atts = new Attribute[attributes.Count];
attributes.CopyTo (atts, 0);
return property_grid.SelectedTab.GetProperties ((ITypeDescriptorContext)this, propertyOwner, atts);
}
#endregion
}
}
@@ -307,7 +307,12 @@ namespace System.Windows.Forms
}
set {
use_compatible_text_rendering = value;
if (use_compatible_text_rendering != value) {
use_compatible_text_rendering = value;
if (Parent != null)
Parent.PerformLayout (this, "UseCompatibleTextRendering");
Invalidate ();
}
}
}
#endif
@@ -186,6 +186,8 @@ namespace System.Windows.Forms
else
string_format.Trimming = StringTrimming.Character;
if (Parent != null)
Parent.PerformLayout (this, "AutoEllipsis");
this.Invalidate ();
}
}
@@ -289,6 +291,8 @@ namespace System.Windows.Forms
return;
flat_style = value;
if (Parent != null)
Parent.PerformLayout (this, "FlatStyle");
Invalidate ();
}
}
@@ -323,6 +323,8 @@ namespace System.Windows.Forms
else
item_heights = null;
if (Parent != null)
Parent.PerformLayout (this, "DrawMode");
base.Refresh ();
}
}
@@ -695,18 +697,6 @@ namespace System.Windows.Forms
#endregion Private Properties
#region UIA Framework Properties
internal ScrollBar UIAHScrollBar {
get { return hscrollbar; }
}
internal ScrollBar UIAVScrollBar {
get { return vscrollbar; }
}
#endregion UIA Framework Properties
#region Public Methods
#if NET_2_0
[Obsolete ("this method has been deprecated")]
@@ -1103,7 +1093,7 @@ namespace System.Windows.Forms
BeginUpdate ();
try {
Items.Clear ();
Items.AddItems (value);
Items.AddRange (value);
} finally {
EndUpdate ();
}
@@ -2254,26 +2244,22 @@ namespace System.Windows.Forms
public void AddRange (int[] items)
{
AddItems (items);
foreach (int i in items)
if (!list.Contains (i))
list.Add (i);
list.Sort ();
}
public void AddRange (IntegerCollection value)
{
AddItems (value);
}
void AddItems (IList items)
{
if (items == null)
throw new ArgumentNullException ("items");
foreach (int i in items)
foreach (int i in value)
if (!list.Contains (i))
list.Add (i);
list.Sort ();
}
public void Clear ()
{
list.Clear ();
@@ -2287,8 +2273,8 @@ namespace System.Windows.Forms
public void CopyTo (Array destination, int index)
{
for (int i = 0; i < list.Count; i++)
destination.SetValue (list[i], index++);
for (int i = index; i < list.Count; i++)
destination.SetValue (list[i], i);
}
public int IndexOf (int item)
@@ -2305,9 +2291,6 @@ namespace System.Windows.Forms
public void RemoveAt (int index)
{
if (index < 0)
throw new IndexOutOfRangeException ();
list.RemoveAt (index);
list.Sort ();
owner.CalculateTabStops ();
@@ -2324,10 +2307,7 @@ namespace System.Windows.Forms
#region IList Members
int IList.Add (object item)
{
int? intValue = item as int?;
if (!intValue.HasValue)
throw new ArgumentException ("item");
return Add (intValue.Value);
return Add ((int) item);
}
void IList.Clear ()
@@ -2337,26 +2317,17 @@ namespace System.Windows.Forms
bool IList.Contains (object item)
{
int? intValue = item as int?;
if (!intValue.HasValue)
return false;
return Contains (intValue.Value);
return Contains ((int) item);
}
int IList.IndexOf (object item)
{
int? intValue = item as int?;
if (!intValue.HasValue)
return -1;
return IndexOf (intValue.Value);
return IndexOf ((int) item);
}
void IList.Insert (int index, object value)
{
throw new NotSupportedException (string.Format (
CultureInfo.InvariantCulture, "No items "
+ "can be inserted into {0}, since it is"
+ " a sorted collection.", this.GetType ()));
throw new Exception ("The method or operation is not implemented.");
}
bool IList.IsFixedSize
@@ -2371,11 +2342,7 @@ namespace System.Windows.Forms
void IList.Remove (object value)
{
int? intValue = value as int?;
if (!intValue.HasValue)
throw new ArgumentException ("value");
Remove (intValue.Value);
Remove ((int)value);
}
void IList.RemoveAt (int index)
@@ -2390,12 +2357,14 @@ namespace System.Windows.Forms
#endregion
#region ICollection Members
bool ICollection.IsSynchronized {
get { return true; }
bool ICollection.IsSynchronized
{
get { throw new Exception ("The method or operation is not implemented."); }
}
object ICollection.SyncRoot {
get { return this; }
object ICollection.SyncRoot
{
get { throw new Exception ("The method or operation is not implemented."); }
}
#endregion
}
@@ -2416,31 +2385,6 @@ namespace System.Windows.Forms
private ListBox owner;
internal ArrayList object_items = new ArrayList ();
#region UIA Framework Events
#if NET_2_0
//NOTE:
// We are using Reflection to add/remove internal events.
// Class ListProvider uses the events.
//
//Event used to generate UIA StructureChangedEvent
static object UIACollectionChangedEvent = new object ();
internal event CollectionChangeEventHandler UIACollectionChanged {
add { owner.Events.AddHandler (UIACollectionChangedEvent, value); }
remove { owner.Events.RemoveHandler (UIACollectionChangedEvent, value); }
}
internal void OnUIACollectionChangedEvent (CollectionChangeEventArgs args)
{
CollectionChangeEventHandler eh
= (CollectionChangeEventHandler) owner.Events [UIACollectionChangedEvent];
if (eh != null)
eh (owner, args);
}
#endif
#endregion UIA Framework Events
public ObjectCollection (ListBox owner)
{
@@ -2482,19 +2426,8 @@ namespace System.Windows.Forms
throw new ArgumentOutOfRangeException ("Index of out range");
if (value == null)
throw new ArgumentNullException ("value");
#if NET_2_0
//UIA Framework event: Item Removed
OnUIACollectionChangedEvent (new CollectionChangeEventArgs (CollectionChangeAction.Remove, index));
#endif
object_items[index] = value;
#if NET_2_0
//UIA Framework event: Item Added
OnUIACollectionChangedEvent (new CollectionChangeEventArgs (CollectionChangeAction.Add, index));
#endif
owner.CollectionChanged ();
}
}
@@ -2525,26 +2458,29 @@ namespace System.Windows.Forms
public void AddRange (object[] items)
{
AddItems (items);
if (items == null)
throw new ArgumentNullException ("items");
foreach (object mi in items)
AddItem (mi);
owner.CollectionChanged ();
}
public void AddRange (ObjectCollection value)
{
AddItems (value);
if (value == null)
throw new ArgumentNullException ("value");
foreach (object mi in value)
AddItem (mi);
owner.CollectionChanged ();
}
internal void AddItems (IList items)
internal void AddRange (IList list)
{
if (items == null)
throw new ArgumentNullException ("items");
#if ONLY_1_1
foreach (object mi in items)
if (mi == null)
throw new ArgumentNullException ("item");
#endif
foreach (object mi in items)
foreach (object mi in list)
AddItem (mi);
owner.CollectionChanged ();
@@ -2555,13 +2491,7 @@ namespace System.Windows.Forms
owner.selected_indices.Clear ();
object_items.Clear ();
owner.CollectionChanged ();
#if NET_2_0
//UIA Framework event: Items list cleared
OnUIACollectionChangedEvent (new CollectionChangeEventArgs (CollectionChangeAction.Refresh, -1));
#endif
}
public bool Contains (object value)
{
if (value == null)
@@ -2621,11 +2551,6 @@ namespace System.Windows.Forms
object_items.Insert (index, item);
owner.CollectionChanged ();
owner.EndUpdate ();
#if NET_2_0
//UIA Framework event: Item Added
OnUIACollectionChangedEvent (new CollectionChangeEventArgs (CollectionChangeAction.Add, index));
#endif
}
public void Remove (object value)
@@ -2633,9 +2558,7 @@ namespace System.Windows.Forms
if (value == null)
return;
int index = IndexOf (value);
if (index != -1)
RemoveAt (index);
RemoveAt (IndexOf (value));
}
public void RemoveAt (int index)
@@ -2646,11 +2569,6 @@ namespace System.Windows.Forms
owner.selected_indices.Remove (index);
object_items.RemoveAt (index);
owner.CollectionChanged ();
#if NET_2_0
//UIA Framework event: Item Removed
OnUIACollectionChangedEvent (new CollectionChangeEventArgs (CollectionChangeAction.Remove, index));
#endif
}
#endregion Public Methods
@@ -2662,12 +2580,6 @@ namespace System.Windows.Forms
int cnt = object_items.Count;
object_items.Add (item);
#if NET_2_0
//UIA Framework event: Item Added
OnUIACollectionChangedEvent (new CollectionChangeEventArgs (CollectionChangeAction.Add, cnt));
#endif
return cnt;
}
@@ -3521,7 +3521,7 @@ namespace System.Windows.Forms
#if NET_2_0
protected internal virtual void OnCacheVirtualItems (CacheVirtualItemsEventArgs e)
{
CacheVirtualItemsEventHandler eh = (CacheVirtualItemsEventHandler)Events [CacheVirtualItemsEvent];
EventHandler eh = (EventHandler)Events [CacheVirtualItemsEvent];
if (eh != null)
eh (this, e);
}
@@ -1129,15 +1129,15 @@ namespace System.Windows.Forms
[TypeConverter (typeof(ListViewSubItemConverter))]
public class ListViewSubItem
{
[NonSerialized]
private Color back_color;
private Font font;
private Color fore_color;
internal ListViewItem owner;
private string text = string.Empty;
#if NET_2_0
private string name;
private object userData;
private string name = String.Empty;
private object tag;
#endif
private SubItemStyle style;
[NonSerialized]
internal Rectangle bounds;
#region Public Constructors
@@ -1156,22 +1156,23 @@ namespace System.Windows.Forms
{
this.owner = owner;
Text = text;
this.style = new SubItemStyle (foreColor,
backColor, font);
this.fore_color = foreColor;
this.back_color = backColor;
this.font = font;
}
#endregion // Public Constructors
#region Public Instance Properties
public Color BackColor {
get {
if (style.backColor != Color.Empty)
return style.backColor;
if (this.back_color != Color.Empty)
return this.back_color;
if (this.owner != null && this.owner.ListView != null)
return this.owner.ListView.BackColor;
return ThemeEngine.Current.ColorWindow;
}
set {
style.backColor = value;
back_color = value;
Invalidate ();
}
}
@@ -1198,30 +1199,30 @@ namespace System.Windows.Forms
[Localizable (true)]
public Font Font {
get {
if (style.font != null)
return style.font;
if (font != null)
return font;
else if (owner != null)
return owner.Font;
return ThemeEngine.Current.DefaultFont;
}
set {
if (style.font == value)
set {
if (font == value)
return;
style.font = value;
font = value;
Invalidate ();
}
}
}
public Color ForeColor {
get {
if (style.foreColor != Color.Empty)
return style.foreColor;
if (this.fore_color != Color.Empty)
return this.fore_color;
if (this.owner != null && this.owner.ListView != null)
return this.owner.ListView.ForeColor;
return ThemeEngine.Current.ColorWindowText;
}
set {
style.foreColor = value;
set {
fore_color = value;
Invalidate ();
}
}
@@ -1230,12 +1231,10 @@ namespace System.Windows.Forms
[Localizable (true)]
public string Name {
get {
if (name == null)
return string.Empty;
return name;
}
set {
name = value;
name = value == null ? String.Empty : value;
}
}
@@ -1245,10 +1244,10 @@ namespace System.Windows.Forms
[Localizable (false)]
public object Tag {
get {
return userData;
return tag;
}
set {
userData = value;
tag = value;
}
}
#endif
@@ -1273,7 +1272,9 @@ namespace System.Windows.Forms
#region Public Methods
public void ResetStyle ()
{
style.Reset ();
font = ThemeEngine.Current.DefaultFont;
back_color = ThemeEngine.Current.DefaultControlBackColor;
fore_color = ThemeEngine.Current.DefaultControlForeColor;
Invalidate ();
}
@@ -1283,6 +1284,7 @@ namespace System.Windows.Forms
}
#endregion // Public Methods
#region Private Methods
private void Invalidate ()
{
@@ -1292,15 +1294,6 @@ namespace System.Windows.Forms
owner.Invalidate ();
}
#if NET_2_0
[OnDeserialized]
void OnDeserialized (StreamingContext context)
{
name = null;
userData = null;
}
#endif
internal int Height {
get {
return bounds.Height;
@@ -1313,32 +1306,6 @@ namespace System.Windows.Forms
}
#endregion // Private Methods
[Serializable]
class SubItemStyle
{
public SubItemStyle ()
{
}
public SubItemStyle (Color foreColor, Color backColor, Font font)
{
this.foreColor = foreColor;
this.backColor = backColor;
this.font = font;
}
public void Reset ()
{
foreColor = Color.Empty;
backColor = Color.Empty;
font = null;
}
public Color backColor;
public Color foreColor;
public Font font;
}
}
public class ListViewSubItemCollection : IList, ICollection, IEnumerable
@@ -93,7 +93,8 @@ namespace System.Windows.Forms {
active = false;
popup_active = false;
hotkey_active = false;
GrabControl.ActiveTracker = null;
if (GrabControl != null)
GrabControl.ActiveTracker = null;
keynav_state = KeyNavState.Idle;
if (TopMenu is ContextMenu) {
PopUpWindow puw = TopMenu.Wnd as PopUpWindow;
@@ -57,7 +57,6 @@ namespace System.Windows.Forms {
private Image initial_image;
private bool wait_on_load;
private WebClient image_download;
private bool image_from_url;
#endif
private int no_update;
#endregion // Fields
@@ -121,7 +120,22 @@ namespace System.Windows.Forms {
[Localizable(true)]
public Image Image {
get { return image; }
set { ChangeImage (value, false); }
set {
StopAnimation ();
image = value;
if (IsHandleCreated) {
UpdateSize ();
if (image != null && ImageAnimator.CanAnimate (image)) {
frame_handler = new EventHandler (OnAnimateImage);
ImageAnimator.Animate (image, frame_handler);
}
if (no_update == 0) {
Invalidate ();
}
}
}
}
[DefaultValue(BorderStyle.None)]
@@ -161,13 +175,8 @@ namespace System.Windows.Forms {
set {
image_location = value;
if (!string.IsNullOrEmpty (value)) {
if (WaitOnLoad)
Load (value);
else
LoadAsync (value);
} else if (image_from_url)
ChangeImage (null, true);
if (!string.IsNullOrEmpty (value))
Load (value);
}
}
@@ -267,7 +276,7 @@ namespace System.Windows.Forms {
protected override void OnPaint (PaintEventArgs pe)
{
ThemeEngine.Current.DrawPictureBox (pe.Graphics, pe.ClipRectangle, this);
ThemeEngine.Current.DrawPictureBox (pe.Graphics, pe.ClipRectangle, this);
base.OnPaint (pe);
}
@@ -378,29 +387,7 @@ namespace System.Windows.Forms {
#endif
#endregion
#region Private Methods
private void ChangeImage (Image value, bool from_url)
{
StopAnimation ();
#if NET_2_0
image_from_url = from_url;
#endif
image = value;
if (IsHandleCreated) {
UpdateSize ();
if (image != null && ImageAnimator.CanAnimate (image)) {
frame_handler = new EventHandler (OnAnimateImage);
ImageAnimator.Animate (image, frame_handler);
}
if (no_update == 0) {
Invalidate ();
}
}
}
#region Private Methods
private void StopAnimation ()
{
if (frame_handler == null)
@@ -456,7 +443,7 @@ namespace System.Windows.Forms {
Invalidate ();
}
}
#if NET_2_0
void ImageDownload_DownloadDataCompleted (object sender, DownloadDataCompletedEventArgs e)
{
@@ -502,9 +489,9 @@ namespace System.Windows.Forms {
if (url.Contains ("://"))
using (Stream s = ImageDownload.OpenRead (url))
ChangeImage (Image.FromStream (s), true);
Image = Image.FromStream (s);
else
ChangeImage (Image.FromFile (url), true);
Image = Image.FromFile (url);
}
public void LoadAsync ()
@@ -519,29 +506,17 @@ namespace System.Windows.Forms {
Load (url);
return;
}
if (string.IsNullOrEmpty (url))
throw new InvalidOperationException ("ImageLocation not specified.");
image_location = url;
ChangeImage (InitialImage, true);
Image = InitialImage;
if (ImageDownload.IsBusy)
ImageDownload.CancelAsync ();
Uri uri = null;
try {
uri = new Uri (url);
} catch (UriFormatException) {
uri = new Uri (Path.GetFullPath (url));
}
ImageDownload.DownloadProgressChanged += new DownloadProgressChangedEventHandler (ImageDownload_DownloadProgressChanged);
ImageDownload.DownloadDataCompleted += new DownloadDataCompletedEventHandler (ImageDownload_DownloadDataCompleted);
ImageDownload.DownloadDataAsync (uri);
ImageDownload.DownloadDataAsync (new Uri (url));
}
#endif
public override string ToString() {
return String.Format("{0}, SizeMode: {1}", base.ToString (), SizeMode);
}
@@ -237,7 +237,7 @@ namespace System.Windows.Forms
tool_strip_border = Color.FromArgb (219, 216, 209);
tool_strip_content_panel_gradient_begin = SystemColors.ButtonFace;
tool_strip_content_panel_gradient_end = Color.FromArgb (246, 245, 244);
tool_strip_drop_down_background = SystemColors.Window;
tool_strip_drop_down_background = Color.FromArgb (249, 248, 247);
tool_strip_gradient_begin = Color.FromArgb (245, 244, 242);
tool_strip_gradient_end = SystemColors.ButtonFace;
@@ -603,7 +603,6 @@ namespace System.Windows.Forms
internal void OnPropertyValueChangedInternal (GridItem item, object property_value)
{
PopulateSubGridItems (selected_grid_item);
property_grid_view.UpdateView ();
OnPropertyValueChanged (new PropertyValueChangedEventArgs (item, property_value));
}
@@ -762,7 +761,14 @@ namespace System.Windows.Forms
[DefaultValue (false)]
public bool UseCompatibleTextRendering {
get { return use_compatible_text_rendering; }
set { use_compatible_text_rendering = value; }
set {
if (use_compatible_text_rendering != value) {
use_compatible_text_rendering = value;
if (Parent != null)
Parent.PerformLayout (this, "UseCompatibleTextRendering");
Invalidate ();
}
}
}
#endif
@@ -1583,144 +1589,13 @@ namespace System.Windows.Forms
{
if (objects.Length > 0) {
root_grid_item = new RootGridEntry (this, objects);
PopulateRootGridItems (root_grid_item, objects, GetMergedPropertyNames (objects));
root_grid_item.Expanded = true;
UpdateSortLayout (root_grid_item);
} else {
root_grid_item = null;
}
}
private bool IsPropertyVisible (PropertyDescriptor property, bool merging)
{
if (property == null)
return false;
if (merging) {
MergablePropertyAttribute attrib = property.Attributes [typeof (MergablePropertyAttribute)] as MergablePropertyAttribute;
if (attrib != null && !attrib.AllowMerge)
return false;
}
return true;
}
private string[] GetMergedPropertyNames (object [] objects)
{
ArrayList intersection = null;
for (int i = 0; i < objects.Length; i ++) {
if (objects [i] == null)
continue;
PropertyDescriptorCollection properties = GetProperties (objects[i], BrowsableAttributes);
ArrayList new_intersection = new ArrayList ();
foreach (PropertyDescriptor currentProperty in (i == 0 ? (ICollection)properties : (ICollection)intersection)) {
PropertyDescriptor matchingProperty = (i == 0 ? currentProperty : properties [currentProperty.Name]);
if (!IsPropertyVisible (matchingProperty, objects.Length > 1))
continue;
if (matchingProperty.PropertyType == currentProperty.PropertyType)
new_intersection.Add (matchingProperty);
}
intersection = new_intersection;
}
string[] propertyNames = new string [intersection.Count];
for (int i=0; i < intersection.Count; i++)
propertyNames[i] = ((PropertyDescriptor)intersection[i]).Name;
return propertyNames;
}
private PropertyDescriptor GetPropertyDescriptor (object propertyOwner, string propertyName)
{
if (propertyOwner == null || propertyName == null)
return null;
PropertyDescriptorCollection properties = GetProperties (propertyOwner, BrowsableAttributes);
if (properties != null)
return properties[propertyName];
return null;
}
private PropertyDescriptorCollection GetProperties (object propertyOwner, AttributeCollection attributes)
{
if (propertyOwner == null || selected_tab == null)
return new PropertyDescriptorCollection (null);
Attribute[] atts = new Attribute[attributes.Count];
attributes.CopyTo (atts, 0);
return selected_tab.GetProperties (propertyOwner, atts);
}
private void PopulateRootGridItems (GridEntry rootItem, object[] propertyOwners, string[] propertyNames)
{
if (propertyOwners == null || propertyNames == null)
return;
bool categorized = property_sort == PropertySort.Categorized ||
property_sort == PropertySort.CategorizedAlphabetical;
rootItem.GridItems.Clear ();
foreach (string propertyName in propertyNames) {
GridEntry item = null;
PropertyDescriptor[] properties = new PropertyDescriptor[propertyOwners.Length];
for (int i=0; i < propertyOwners.Length; i++)
properties[i] = GetPropertyDescriptor (propertyOwners[i], propertyName);
if (categorized) {
string categoryName = null;
foreach (PropertyDescriptor property in properties) {
categoryName = property.Category;
if (categoryName != null)
break;
}
if (categoryName == null)
categoryName = UNCATEGORIZED_CATEGORY_LABEL;
GridEntry category = (GridEntry)root_grid_item.GridItems[categoryName];
if (category == null) {
category = new CategoryGridEntry (this, categoryName, rootItem);
category.Expanded = true;
rootItem.GridItems.Add (category);
}
item = new GridEntry (this, properties, category);
category.GridItems.Add (item);
} else {
item = new GridEntry (this, properties, rootItem);
rootItem.GridItems.Add (item);
}
PopulateSubGridItems (item);
}
}
private void PopulateSubGridItems (GridEntry parentItem)
{
parentItem.GridItems.Clear ();
if (!parentItem.IsExpandable)
return;
object[] propertyOwners = parentItem.Values;
if (propertyOwners == null)
return;
PropertyDescriptorCollection propertiesCollection = GetProperties (propertyOwners[0], BrowsableAttributes);
if (propertiesCollection == null)
return;
foreach (PropertyDescriptor property in propertiesCollection) {
string propertyName = property.Name;
PropertyDescriptor[] properties = new PropertyDescriptor[propertyOwners.Length];
for (int i=0; i < propertyOwners.Length; i++)
properties[i] = GetPropertyDescriptor (propertyOwners[i], propertyName);
GridEntry item = new GridEntry (this, properties, parentItem);
parentItem.GridItems.Add (item);
PopulateSubGridItems (item);
}
}
private void UpdateSortLayout (GridEntry rootItem)
{
if (rootItem == null)
@@ -620,7 +620,7 @@ namespace System.Windows.Forms.PropertyGridInternal {
brush = SystemBrushes.HighlightText;
}
else {
brush = grid_item.IsReadOnly && !grid_item.IsExpandable ? inactive_text_brush : SystemBrushes.ControlText;
brush = grid_item.IsReadOnly ? inactive_text_brush : SystemBrushes.ControlText;
}
}
pevent.Graphics.DrawString (grid_item.Label, font, brush,
@@ -647,7 +647,7 @@ namespace System.Windows.Forms.PropertyGridInternal {
Font font = this.Font;
if (grid_item.IsResetable || !grid_item.HasDefaultValue)
font = bold_font;
Brush brush = grid_item.IsReadOnly && !grid_item.IsExpandable ? inactive_text_brush : SystemBrushes.ControlText;
Brush brush = grid_item.IsReadOnly ? inactive_text_brush : SystemBrushes.ControlText;
string valueText = String.Empty;
if (!grid_item.IsMerged || grid_item.IsMerged && grid_item.HasMergedValue) {
if (grid_item.IsPassword)
@@ -854,7 +854,7 @@ namespace System.Windows.Forms.PropertyGridInternal {
else
grid_textbox.Font = this.Font;
if (entry.IsReadOnly && !entry.IsExpandable) {
if (entry.IsReadOnly) {
grid_textbox.DropDownButtonVisible = false;
grid_textbox.DialogButtonVisible = false;
grid_textbox.ReadOnly = true;
@@ -188,6 +188,8 @@ namespace System.Windows.Forms {
EventHandler eh = (EventHandler)(Events [AppearanceChangedEvent]);
if (eh != null)
eh (this, EventArgs.Empty);
if (Parent != null)
Parent.PerformLayout (this, "Appearance");
Invalidate();
}
}
@@ -53,12 +53,6 @@ namespace System.Windows.Forms {
OnCurrentChanged (EventArgs.Empty);
}
public override PropertyDescriptorCollection GetItemProperties ()
{
PropertyDescriptor property = parent.GetItemProperties ().Find (property_name, true);
return TypeDescriptor.GetProperties (property.PropertyType);
}
}
}
@@ -44,6 +44,10 @@ namespace System.Windows.Forms.PropertyGridInternal
val = obj;
}
public override bool Expandable {
get { return true; }
}
public override GridItemType GridItemType {
get { return GridItemType.Root; }
}
@@ -783,13 +783,6 @@ namespace System.Windows.Forms
event_args = new ScrollEventArgs (ScrollEventType.EndScroll, Value);
OnScroll (event_args);
Value = event_args.NewValue;
#if NET_2_0
// UIA Framework event invoked when the "LargeIncrement
// Button" is "clicked" either by using the Invoke Pattern
// or the space between the thumb and the bottom/right button
OnUIAScroll (new ScrollEventArgs (ScrollEventType.LargeIncrement, Value));
#endif
}
private void LargeDecrement ()
@@ -804,13 +797,6 @@ namespace System.Windows.Forms
event_args = new ScrollEventArgs (ScrollEventType.EndScroll, Value);
OnScroll (event_args);
Value = event_args.NewValue;
#if NET_2_0
// UIA Framework event invoked when the "LargeDecrement
// Button" is "clicked" either by using the Invoke Pattern
// or the space between the thumb and the top/left button
OnUIAScroll (new ScrollEventArgs (ScrollEventType.LargeDecrement, Value));
#endif
}
private void OnResizeSB (Object o, EventArgs e)
@@ -1305,13 +1291,6 @@ namespace System.Windows.Forms
event_args = new ScrollEventArgs (ScrollEventType.EndScroll, Value);
OnScroll (event_args);
Value = event_args.NewValue;
#if NET_2_0
// UIA Framework event invoked when the "SmallIncrement
// Button" (a.k.a bottom/right button) is "clicked" either
// by using the Invoke Pattern or the button itself
OnUIAScroll (new ScrollEventArgs (ScrollEventType.SmallIncrement, Value));
#endif
}
private void SmallDecrement ()
@@ -1326,13 +1305,6 @@ namespace System.Windows.Forms
event_args = new ScrollEventArgs (ScrollEventType.EndScroll, Value);
OnScroll (event_args);
Value = event_args.NewValue;
#if NET_2_0
// UIA Framework event invoked when the "SmallDecrement
// Button" (a.k.a top/left button) is "clicked" either
// by using the Invoke Pattern or the button itself
OnUIAScroll (new ScrollEventArgs (ScrollEventType.SmallDecrement, Value));
#endif
}
private void SetHoldButtonClickTimer ()
@@ -1556,64 +1528,6 @@ namespace System.Windows.Forms
base.OnMouseWheel (e);
}
#endif
#region UIA Framework Section: Events, Methods and Properties.
#if NET_2_0
//NOTE:
// We are using Reflection to add/remove internal events.
// Class ScrollBarButtonInvokePatternInvokeEvent uses the events.
//
// Events used to generate UIA InvokedEvent
// * args.Type = ScrollEventType.LargeIncrement. Space between Thumb and bottom/right Button
// * args.Type = ScrollEventType.LargeDecrement. Space between Thumb and top/left Button
// * args.Type = ScrollEventType.SmallIncrement. Small increment UIA Button (bottom/right Button)
// * args.Type = ScrollEventType.SmallDecrement. Small decrement UIA Button (top/left Button)
static object UIAScrollEvent = new object ();
internal event ScrollEventHandler UIAScroll {
add { Events.AddHandler (UIAScrollEvent, value); }
remove { Events.RemoveHandler (UIAScrollEvent, value); }
}
internal void OnUIAScroll (ScrollEventArgs args)
{
ScrollEventHandler eh = (ScrollEventHandler) Events [UIAScrollEvent];
if (eh != null)
eh (this, args);
}
//NOTE:
// Wrapper methods used by the Reflection.
// Class ScrollBarButtonInvokeProviderBehavior uses the events.
//
internal void UIALargeIncrement ()
{
LargeIncrement ();
}
internal void UIALargeDecrement ()
{
LargeDecrement ();
}
internal void UIASmallIncrement ()
{
SmallIncrement ();
}
internal void UIASmallDecrement ()
{
SmallDecrement ();
}
internal Rectangle UIAThumbArea {
get { return thumb_area; }
}
#endif
#endregion UIA Framework Section: Events, Methods and Properties.
}
}
@@ -30,7 +30,6 @@ using System.ComponentModel.Design;
using System.Drawing;
using System.Runtime.InteropServices;
using System.Windows.Forms.Theming;
using System.Windows.Forms.VisualStyles;
namespace System.Windows.Forms {
#if NET_2_0
@@ -56,11 +55,10 @@ namespace System.Windows.Forms {
private bool show_tool_tips;
private TabSizeMode size_mode;
private bool show_slider = false;
private PushButtonState right_slider_state = PushButtonState.Normal;
private PushButtonState left_slider_state = PushButtonState.Normal;
private ButtonState right_slider_state;
private ButtonState left_slider_state;
private int slider_pos = 0;
TabPage entered_tab_page;
bool mouse_down_on_a_tab_page;
#if NET_2_0
private bool rightToLeftLayout;
#endif
@@ -317,7 +315,7 @@ namespace System.Windows.Forms {
if (new_index != -1) {
int le = TabPages[new_index].TabBounds.Right;
int re = LeftScrollButtonArea.Left;
int re = ThemeEngine.Current.TabControlGetLeftScrollRect (this).Left;
if (show_slider && le > re) {
int i = 0;
for (i = 0; i < new_index - 1; i++) {
@@ -453,36 +451,12 @@ namespace System.Windows.Forms {
get { return slider_pos; }
}
internal PushButtonState RightSliderState {
internal ButtonState RightSliderState {
get { return right_slider_state; }
private set {
if (right_slider_state == value)
return;
PushButtonState old_value = right_slider_state;
right_slider_state = value;
if (NeedsToInvalidateScrollButton (old_value, value))
Invalidate (RightScrollButtonArea);
}
}
internal PushButtonState LeftSliderState {
internal ButtonState LeftSliderState {
get { return left_slider_state; }
set {
if (left_slider_state == value)
return;
PushButtonState old_value = left_slider_state;
left_slider_state = value;
if (NeedsToInvalidateScrollButton (old_value, value))
Invalidate (LeftScrollButtonArea);
}
}
bool NeedsToInvalidateScrollButton (PushButtonState oldState, PushButtonState newState)
{
if ((oldState == PushButtonState.Hot && newState == PushButtonState.Normal) ||
(oldState == PushButtonState.Normal && newState == PushButtonState.Hot))
return HasHotElementStyles;
return true;
}
internal TabPage EnteredTabPage {
@@ -490,7 +464,7 @@ namespace System.Windows.Forms {
private set {
if (entered_tab_page == value)
return;
if (HasHotElementStyles) {
if (ThemeElements.CurrentTheme.TabControlPainter.HasHotElementStyles (this)) {
Region area_to_invalidate = new Region ();
area_to_invalidate.MakeEmpty ();
if (entered_tab_page != null)
@@ -908,10 +882,10 @@ namespace System.Windows.Forms {
return;
if (ShowSlider) {
Rectangle right = RightScrollButtonArea;
Rectangle left = LeftScrollButtonArea;
Rectangle right = ThemeEngine.Current.TabControlGetRightScrollRect (this);
Rectangle left = ThemeEngine.Current.TabControlGetLeftScrollRect (this);
if (right.Contains (e.X, e.Y)) {
right_slider_state = PushButtonState.Pressed;
right_slider_state = ButtonState.Pushed;
if (CanScrollRight) {
slider_pos++;
SizeTabs ();
@@ -936,7 +910,7 @@ namespace System.Windows.Forms {
}
return;
} else if (left.Contains (e.X, e.Y)) {
left_slider_state = PushButtonState.Pressed;
left_slider_state = ButtonState.Pushed;
if (CanScrollLeft) {
slider_pos--;
SizeTabs ();
@@ -967,50 +941,25 @@ namespace System.Windows.Forms {
if (!GetTabRect (i).Contains (e.X, e.Y))
continue;
SelectedIndex = i;
mouse_down_on_a_tab_page = true;
break;
}
}
private void MouseUpHandler (object sender, MouseEventArgs e)
{
mouse_down_on_a_tab_page = false;
if (ShowSlider && (left_slider_state == PushButtonState.Pressed || right_slider_state == PushButtonState.Pressed)) {
if (ShowSlider && (left_slider_state == ButtonState.Pushed || right_slider_state == ButtonState.Pushed)) {
Rectangle invalid;
if (left_slider_state == PushButtonState.Pressed) {
invalid = LeftScrollButtonArea;
left_slider_state = GetScrollButtonState (invalid, e.Location);
} else {
invalid = RightScrollButtonArea;
right_slider_state = GetScrollButtonState (invalid, e.Location);
}
if (left_slider_state == ButtonState.Pushed)
invalid = ThemeEngine.Current.TabControlGetLeftScrollRect (this);
else
invalid = ThemeEngine.Current.TabControlGetRightScrollRect (this);
left_slider_state = ButtonState.Normal;
right_slider_state = ButtonState.Normal;
Invalidate (invalid);
}
}
bool HasHotElementStyles {
get {
return ThemeElements.CurrentTheme.TabControlPainter.HasHotElementStyles (this);
}
}
Rectangle LeftScrollButtonArea {
get {
return ThemeElements.CurrentTheme.TabControlPainter.GetLeftScrollRect (this);
}
}
Rectangle RightScrollButtonArea {
get {
return ThemeElements.CurrentTheme.TabControlPainter.GetRightScrollRect (this);
}
}
static PushButtonState GetScrollButtonState (Rectangle scrollButtonArea, Point cursorLocation)
{
return scrollButtonArea.Contains (cursorLocation) ? PushButtonState.Hot : PushButtonState.Normal;
}
private void SizeChangedHandler (object sender, EventArgs e)
{
Redraw ();
@@ -1435,25 +1384,6 @@ namespace System.Windows.Forms {
void OnMouseMove (object sender, MouseEventArgs e)
{
if (!mouse_down_on_a_tab_page && ShowSlider) {
if (LeftSliderState == PushButtonState.Pressed ||
RightSliderState == PushButtonState.Pressed)
return;
if (LeftScrollButtonArea.Contains (e.Location)) {
LeftSliderState = PushButtonState.Hot;
RightSliderState = PushButtonState.Normal;
EnteredTabPage = null;
return;
}
if (RightScrollButtonArea.Contains (e.Location)) {
RightSliderState = PushButtonState.Hot;
LeftSliderState = PushButtonState.Normal;
EnteredTabPage = null;
return;
}
LeftSliderState = PushButtonState.Normal;
RightSliderState = PushButtonState.Normal;
}
if (EnteredTabPage != null && EnteredTabPage.TabBounds.Contains (e.Location))
return;
for (int index = 0; index < TabCount; index++) {
@@ -1468,10 +1398,6 @@ namespace System.Windows.Forms {
void OnMouseLeave (object sender, EventArgs e)
{
if (ShowSlider) {
LeftSliderState = PushButtonState.Normal;
RightSliderState = PushButtonState.Normal;
}
EnteredTabPage = null;
}
#endregion // Internal & Private Methods
@@ -96,12 +96,7 @@ namespace System.Windows.Forms
[DefaultValue (0)]
public int ColumnCount {
get { return settings.ColumnCount; }
set {
if (settings.ColumnCount != value) {
settings.ColumnCount = value;
this.PerformLayout (this, "ColumnCount");
}
}
set { settings.ColumnCount = value; }
}
[Browsable (false)]
@@ -121,12 +116,7 @@ namespace System.Windows.Forms
[DefaultValue (TableLayoutPanelGrowStyle.AddRows)]
public TableLayoutPanelGrowStyle GrowStyle {
get { return settings.GrowStyle; }
set {
if (settings.GrowStyle != value) {
settings.GrowStyle = value;
PerformLayout (this, "GrowStyle");
}
}
set { settings.GrowStyle = value; }
}
public override System.Windows.Forms.Layout.LayoutEngine LayoutEngine {
@@ -155,12 +145,7 @@ namespace System.Windows.Forms
[DefaultValue (0)]
public int RowCount {
get { return settings.RowCount; }
set {
if (settings.RowCount != value) {
settings.RowCount = value;
this.PerformLayout (this, "RowCount");
}
}
set { settings.RowCount = value; }
}
[Browsable (false)]
@@ -252,31 +237,26 @@ namespace System.Windows.Forms
public void SetCellPosition (Control control, TableLayoutPanelCellPosition position)
{
settings.SetCellPosition (control, position);
this.PerformLayout ();
}
public void SetColumn (Control control, int column)
{
settings.SetColumn (control, column);
this.PerformLayout ();
}
public void SetColumnSpan (Control control, int value)
{
settings.SetColumnSpan (control, value);
this.PerformLayout ();
}
public void SetRow (Control control, int row)
{
settings.SetRow (control, row);
this.PerformLayout ();
}
public void SetRowSpan (Control control, int value)
{
settings.SetRowSpan (control, value);
this.PerformLayout ();
}
#endregion
@@ -526,7 +506,7 @@ namespace System.Windows.Forms
internal override Size GetPreferredSizeCore (Size proposedSize)
{
// If the tablelayoutpanel is autosize, we have to make sure it is big enough
// If the tablelayoutowner is autosize, we have to make sure it is big enough
// to hold every non-autosize control
actual_positions = (LayoutEngine as TableLayout).CalculateControlPositions (this, Math.Max (ColumnCount, 1), Math.Max (RowCount, 1));
@@ -534,7 +514,7 @@ namespace System.Windows.Forms
int actual_cols = actual_positions.GetLength (0);
int actual_rows = actual_positions.GetLength (1);
// Figure out how wide the panel needs to be
// Figure out how wide the owner needs to be
int[] column_widths = new int[actual_cols];
float total_column_percentage = 0f;
@@ -560,7 +540,7 @@ namespace System.Windows.Forms
}
// Because percentage based rows divy up the remaining space,
// we have to make the panel big enough so that all the rows
// we have to make the owner big enough so that all the rows
// get bigger, even if we only need one to be bigger.
int non_percent_total_width = 0;
int percent_total_width = 0;
@@ -573,7 +553,7 @@ namespace System.Windows.Forms
}
// Figure out how tall the panel needs to be
// Figure out how tall the owner needs to be
int[] row_heights = new int[actual_rows];
float total_row_percentage = 0f;
@@ -599,7 +579,7 @@ namespace System.Windows.Forms
}
// Because percentage based rows divy up the remaining space,
// we have to make the panel big enough so that all the rows
// we have to make the owner big enough so that all the rows
// get bigger, even if we only need one to be bigger.
int non_percent_total_height = 0;
int percent_total_height = 0;
@@ -95,7 +95,10 @@ namespace System.Windows.Forms
if (value < 0)
throw new ArgumentOutOfRangeException();
column_count = value;
if (column_count != value) {
column_count = value;
panel.PerformLayout (panel, "ColumnCount");
}
}
}
@@ -111,7 +114,10 @@ namespace System.Windows.Forms
if (!Enum.IsDefined (typeof(TableLayoutPanelGrowStyle), value))
throw new ArgumentException();
grow_style = value;
if (grow_style != value) {
grow_style = value;
panel.PerformLayout (panel, "GrowStyle");
}
}
}
@@ -125,7 +131,11 @@ namespace System.Windows.Forms
set {
if (value < 0)
throw new ArgumentOutOfRangeException ();
row_count = value;
if (row_count != value) {
row_count = value;
panel.PerformLayout (panel, "RowCount");
}
}
}
@@ -215,6 +225,7 @@ namespace System.Windows.Forms
columns[control] = cellPosition.Column;
rows[control] = cellPosition.Row;
panel.PerformLayout ();
}
public void SetColumn (Object control, int column)
@@ -225,6 +236,7 @@ namespace System.Windows.Forms
throw new ArgumentException ();
columns[control] = column;
panel.PerformLayout ();
}
public void SetColumnSpan (Object control, int value)
@@ -235,6 +247,7 @@ namespace System.Windows.Forms
throw new ArgumentException ();
column_spans[control] = value;
panel.PerformLayout ();
}
public void SetRow (Object control, int row)
@@ -245,6 +258,7 @@ namespace System.Windows.Forms
throw new ArgumentException ();
rows[control] = row;
panel.PerformLayout ();
}
public void SetRowSpan (Object control, int value)
@@ -255,6 +269,7 @@ namespace System.Windows.Forms
throw new ArgumentException ();
row_spans[control] = value;
panel.PerformLayout ();
}
#endregion
@@ -379,6 +379,7 @@ namespace System.Windows.Forms {
document.PasswordChar = PasswordChar.ToString ();
else
document.PasswordChar = string.Empty;
Invalidate ();
}
}
}
@@ -945,6 +945,8 @@ namespace System.Windows.Forms
public abstract Point TabControlImagePadding { get; }
public abstract int TabControlScrollerWidth { get; }
public abstract Rectangle TabControlGetLeftScrollRect (TabControl tab);
public abstract Rectangle TabControlGetRightScrollRect (TabControl tab);
public abstract Rectangle TabControlGetDisplayRectangle (TabControl tab);
public abstract Rectangle TabControlGetPanelRect (TabControl tab);
public abstract Size TabControlGetSpacing (TabControl tab);
@@ -1319,10 +1319,8 @@ namespace System.Windows.Forms
if (bar.Enabled && bar.ThumbPos.Height >= 20) {
element = VisualStyleElement.ScrollBar.GripperVertical.Normal;
if (VisualStyleRenderer.IsElementDefined (element)) {
renderer = new VisualStyleRenderer (element);
renderer.DrawBackground (dc, bar.ThumbPos, clip);
}
renderer = new VisualStyleRenderer (element);
renderer.DrawBackground (dc, bar.ThumbPos, clip);
}
#endregion
} else {
@@ -1411,10 +1409,8 @@ namespace System.Windows.Forms
if (bar.Enabled && bar.ThumbPos.Height >= 20) {
element = VisualStyleElement.ScrollBar.GripperHorizontal.Normal;
if (VisualStyleRenderer.IsElementDefined (element)) {
renderer = new VisualStyleRenderer (element);
renderer.DrawBackground (dc, bar.ThumbPos, clip);
}
renderer = new VisualStyleRenderer (element);
renderer.DrawBackground (dc, bar.ThumbPos, clip);
}
#endregion
}
@@ -1448,9 +1444,12 @@ namespace System.Windows.Forms
get {
return
VisualStyleRenderer.IsElementDefined (VisualStyleElement.ScrollBar.ArrowButton.DownDisabled) &&
VisualStyleRenderer.IsElementDefined (VisualStyleElement.ScrollBar.GripperHorizontal.Normal) &&
VisualStyleRenderer.IsElementDefined (VisualStyleElement.ScrollBar.GripperVertical.Normal) &&
VisualStyleRenderer.IsElementDefined (VisualStyleElement.ScrollBar.LeftTrackHorizontal.Disabled) &&
VisualStyleRenderer.IsElementDefined (VisualStyleElement.ScrollBar.LowerTrackVertical.Disabled) &&
VisualStyleRenderer.IsElementDefined (VisualStyleElement.ScrollBar.RightTrackHorizontal.Disabled) &&
VisualStyleRenderer.IsElementDefined (VisualStyleElement.ScrollBar.SizeBox.LeftAlign) &&
VisualStyleRenderer.IsElementDefined (VisualStyleElement.ScrollBar.ThumbButtonHorizontal.Disabled) &&
VisualStyleRenderer.IsElementDefined (VisualStyleElement.ScrollBar.ThumbButtonVertical.Disabled) &&
VisualStyleRenderer.IsElementDefined (VisualStyleElement.ScrollBar.UpperTrackVertical.Disabled);
@@ -2164,4 +2163,4 @@ namespace System.Windows.Forms
}
#endregion
}
}
}
@@ -1599,7 +1599,7 @@ namespace System.Windows.Forms
public override void ComboBoxDrawBackground (ComboBox comboBox, Graphics g, Rectangle clippingArea, FlatStyle style)
{
if (!comboBox.Enabled)
g.FillRectangle (ResPool.GetSolidBrush (ColorControl), comboBox.ClientRectangle);
g.FillRectangle (ResPool.GetSolidBrush (ColorControl), comboBox.Bounds);
if (comboBox.DropDownStyle == ComboBoxStyle.Simple)
g.FillRectangle (ResPool.GetSolidBrush (comboBox.Parent.BackColor), comboBox.ClientRectangle);
@@ -3138,20 +3138,10 @@ namespace System.Windows.Forms
// Sizing
public override int ListViewGetHeaderHeight (ListView listView, Font font)
{
return ListViewGetHeaderHeight (font);
}
static int ListViewGetHeaderHeight (Font font)
{
return font.Height + 5;
}
public static int ListViewGetHeaderHeight ()
{
return ListViewGetHeaderHeight (ThemeEngine.Current.DefaultFont);
}
public override Size ListViewCheckBoxSize {
get { return new Size (16, 16); }
}
@@ -4202,13 +4192,13 @@ namespace System.Windows.Forms
case 0:
default: // Blocks
Rectangle block_rect;
int space_betweenblocks = ProgressBarChunkSpacing;
int space_betweenblocks = 2;
int block_width;
int increment;
int barpos_pixels;
int block_count = 0;
block_width = ProgressBarGetChunkSize (client_area.Height);
block_width = (client_area.Height * 2) / 3;
barpos_pixels = (int)(((double)(ctrl.Value - ctrl.Minimum) * client_area.Width) / (Math.Max (ctrl.Maximum - ctrl.Minimum, 1)));
increment = block_width + space_betweenblocks;
@@ -4236,23 +4226,9 @@ namespace System.Windows.Forms
}
}
public const int ProgressBarChunkSpacing = 2;
public static int ProgressBarGetChunkSize ()
{
return ProgressBarGetChunkSize (ProgressBarDefaultHeight);
}
static int ProgressBarGetChunkSize (int progressBarClientAreaHeight)
{
return (progressBarClientAreaHeight * 2) / 3;
}
const int ProgressBarDefaultHeight = 23;
public override Size ProgressBarDefaultSize {
get {
return new Size (100, ProgressBarDefaultHeight);
return new Size (100, 23);
}
}
@@ -5012,6 +4988,16 @@ namespace System.Windows.Forms
ThemeElements.CurrentTheme.TabControlPainter.Draw (dc, area, tab);
}
public override Rectangle TabControlGetLeftScrollRect (TabControl tab)
{
return ThemeElements.CurrentTheme.TabControlPainter.GetLeftScrollRect (tab);
}
public override Rectangle TabControlGetRightScrollRect (TabControl tab)
{
return ThemeElements.CurrentTheme.TabControlPainter.GetRightScrollRect (tab);
}
public override Rectangle TabControlGetDisplayRectangle (TabControl tab)
{
return ThemeElements.CurrentTheme.TabControlPainter.GetDisplayRectangle (tab);
@@ -5538,7 +5524,7 @@ namespace System.Windows.Forms
thumb_area.X = area.X + channel_startpoint.X;
thumb_area.Y = area.Y + channel_startpoint.Y;
thumb_area.Height = area.Height - space_from_right - space_from_left;
thumb_area.Width = TrackBarVerticalTrackWidth;
thumb_area.Width = 4;
pixel_len = thumb_area.Height - 11;
if (tb.Maximum == tb.Minimum) {
@@ -5586,7 +5572,7 @@ namespace System.Windows.Forms
thumb_area.X = area.X + channel_startpoint.X;
thumb_area.Y = area.Y + channel_startpoint.Y;
thumb_area.Width = area.Width - space_from_right - space_from_left;
thumb_area.Height = TrackBarHorizontalTrackHeight;
thumb_area.Height = 4;
pixel_len = thumb_area.Width - 11;
if (tb.Maximum == tb.Minimum) {
@@ -5602,20 +5588,11 @@ namespace System.Windows.Forms
}
protected virtual Size TrackBarGetThumbSize (TrackBar trackBar)
{
return TrackBarGetThumbSize ();
}
public static Size TrackBarGetThumbSize ()
{
/* Draw thumb fixed 10x22 size */
return new Size (10, 22);
}
public const int TrackBarVerticalTrackWidth = 4;
public const int TrackBarHorizontalTrackHeight = 4;
#region Ticks
protected interface ITrackBarTickPainter
{
@@ -335,7 +335,7 @@ namespace System.Windows.Forms
if (!Enum.IsDefined (typeof (ToolStripGripStyle), value))
throw new InvalidEnumArgumentException (string.Format ("Enum argument value '{0}' is not valid for ToolStripGripStyle", value));
this.grip_style = value;
this.PerformLayout ();
this.PerformLayout (this, "GripStyle");
}
}
}
@@ -403,7 +403,12 @@ namespace System.Windows.Forms
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
public LayoutSettings LayoutSettings {
get { return this.layout_settings; }
set { this.layout_settings = value; }
set {
if (this.layout_settings != value) {
this.layout_settings = value;
PerformLayout (this, "LayoutSettings");
}
}
}
[AmbientValue (ToolStripLayoutStyle.StackWithOverflow)]
@@ -435,7 +440,7 @@ namespace System.Windows.Forms
this.layout_settings = this.CreateLayoutSettings (value);
this.PerformLayout ();
this.PerformLayout (this, "LayoutStyle");
this.OnLayoutStyleChanged (EventArgs.Empty);
}
}
@@ -465,7 +470,7 @@ namespace System.Windows.Forms
if (this.renderer != value) {
this.renderer = value;
this.render_mode = ToolStripRenderMode.Custom;
this.PerformLayout ();
this.PerformLayout (this, "Renderer");
this.OnRendererChanged (EventArgs.Empty);
}
}
@@ -704,7 +709,7 @@ namespace System.Windows.Forms
{
switch (layoutStyle) {
case ToolStripLayoutStyle.Flow:
return new FlowLayoutSettings ();
return new FlowLayoutSettings (this);
case ToolStripLayoutStyle.Table:
//return new TableLayoutSettings ();
case ToolStripLayoutStyle.StackWithOverflow:
@@ -319,8 +319,7 @@ namespace System.Windows.Forms
this.ComboBox.DropDownClosed += new EventHandler(HandleDropDownClosed);
this.ComboBox.DropDownStyleChanged += new EventHandler (HandleDropDownStyleChanged);
this.ComboBox.SelectedIndexChanged += new EventHandler (HandleSelectedIndexChanged);
this.ComboBox.TextChanged += new EventHandler (HandleTextChanged);
this.ComboBox.TextUpdate += new EventHandler (HandleTextUpdate);
this.ComboBox.TextUpdate += new EventHandler(HandleTextUpdate);
}
protected virtual void OnTextUpdate (EventArgs e)
@@ -396,11 +395,6 @@ namespace System.Windows.Forms
{
OnSelectedIndexChanged (e);
}
private void HandleTextChanged (object sender, EventArgs e)
{
OnTextChanged (e);
}
private void HandleTextUpdate (object sender, EventArgs e)
{
@@ -86,7 +86,12 @@ namespace System.Windows.Forms
[DefaultValue (true)]
public bool ShowDropDownArrow {
get { return this.show_drop_down_arrow; }
set { this.show_drop_down_arrow = value; }
set {
if (this.show_drop_down_arrow != value) {
this.show_drop_down_arrow = value;
CalculateAutoSize ();
}
}
}
#endregion
@@ -138,15 +138,13 @@ namespace System.Windows.Forms
public void ShowDropDown ()
{
// Call this before the HasDropDownItems check to give
// users a chance to handle it and add drop down items
this.OnDropDownShow (EventArgs.Empty);
if (!this.HasDropDownItems)
return;
this.Invalidate ();
this.OnDropDownOpening (this, EventArgs.Empty);
this.DropDown.Show (this.DropDownLocation);
this.OnDropDownShow (EventArgs.Empty);
this.OnDropDownOpened (EventArgs.Empty);
}
#endregion
@@ -211,9 +209,6 @@ namespace System.Windows.Forms
protected virtual void OnDropDownShow (EventArgs e)
{
EventHandler eh = (EventHandler)(Events[DropDownOpeningEvent]);
if (eh != null)
eh (this, e);
}
protected override void OnFontChanged (EventArgs e)
@@ -331,6 +326,13 @@ namespace System.Windows.Forms
{
e.Item.owner_item = this;
}
private void OnDropDownOpening (object sender, EventArgs e)
{
EventHandler eh = (EventHandler)(Events[DropDownOpeningEvent]);
if (eh != null)
eh (this, e);
}
#endregion
}
}
@@ -68,13 +68,23 @@ namespace System.Windows.Forms
[DefaultValue (false)]
public bool ShowCheckMargin {
get { return this.show_check_margin; }
set { this.show_check_margin = value; }
set {
if (this.show_check_margin != value) {
this.show_check_margin = value;
PerformLayout (this, "ShowCheckMargin");
}
}
}
[DefaultValue (true)]
public bool ShowImageMargin {
get { return this.show_image_margin; }
set { this.show_image_margin = value; }
set {
if (this.show_image_margin != value) {
this.show_image_margin = value;
PerformLayout (this, "ShowImageMargin");
}
}
}
#endregion
@@ -217,7 +217,10 @@ namespace System.Windows.Forms
if (!Enum.IsDefined (typeof (ToolStripItemAlignment), value))
throw new InvalidEnumArgumentException (string.Format ("Enum argument value '{0}' is not valid for ToolStripItemAlignment", value));
this.alignment = value;
if (this.alignment != value) {
this.alignment = value;
this.CalculateAutoSize ();
}
}
}
@@ -340,8 +343,6 @@ namespace System.Windows.Forms
this.display_style = value;
this.CalculateAutoSize ();
OnDisplayStyleChanged (EventArgs.Empty);
if (this.Parent != null)
this.Parent.PerformLayout ();
}
}
}
@@ -477,8 +478,10 @@ namespace System.Windows.Forms
if (!Enum.IsDefined (typeof (ContentAlignment), value))
throw new InvalidEnumArgumentException (string.Format ("Enum argument value '{0}' is not valid for ContentAlignment", value));
this.image_align = value;
this.Invalidate ();
if (image_align != value) {
this.image_align = value;
this.CalculateAutoSize ();
}
}
}
@@ -529,9 +532,10 @@ namespace System.Windows.Forms
public ToolStripItemImageScaling ImageScaling {
get { return this.image_scaling; }
set {
this.image_scaling = value;
this.CalculateAutoSize ();
this.Invalidate ();
if (image_scaling != value) {
this.image_scaling = value;
this.CalculateAutoSize ();
}
}
}
@@ -720,8 +724,11 @@ namespace System.Windows.Forms
set {
if (!Enum.IsDefined (typeof (ContentAlignment), value))
throw new InvalidEnumArgumentException (string.Format ("Enum argument value '{0}' is not valid for ContentAlignment", value));
this.text_align = value;
this.Invalidate ();
if (this.text_align != value) {
this.text_align = value;
this.CalculateAutoSize ();
}
}
}
@@ -136,8 +136,10 @@ namespace System.Windows.Forms
set {
if (value < 0)
throw new ArgumentOutOfRangeException ();
this.drop_down_button_width = value;
if (this.drop_down_button_width != value) {
this.drop_down_button_width = value;
CalculateAutoSize ();
}
}
}
@@ -98,7 +98,12 @@ namespace System.Windows.Forms
[DefaultValue (false)]
public bool Spring {
get { return this.spring; }
set { this.spring = value; }
set {
if (this.spring != value) {
this.spring = value;
CalculateAutoSize ();
}
}
}
#endregion
@@ -345,7 +345,6 @@ namespace System.Windows.Forms {
private bool tracking = false;
private bool dropped = false;
private int motion_poll;
//private X11Keyboard keyboard;
public X11Dnd (IntPtr display, X11Keyboard keyboard)
@@ -409,7 +408,8 @@ namespace System.Windows.Forms {
Timer timer = new Timer ();
timer.Tick += new EventHandler (DndTickHandler);
timer.Interval = 100;
timer.Interval = 50;
timer.Start ();
int suc;
drag_data.State = DragState.Dragging;
@@ -427,8 +427,6 @@ namespace System.Windows.Forms {
drag_data.CurMousePos = new Point ();
dropped = false;
tracking = true;
motion_poll = -1;
timer.Start ();
while (tracking && XplatUI.GetMessage (queue_id, ref msg, IntPtr.Zero, 0, 0)) {
@@ -453,8 +451,6 @@ namespace System.Windows.Forms {
RemoveCapture (msg.hwnd);
continue;
case Msg.WM_MOUSEMOVE:
motion_poll = 0;
drag_data.CurMousePos.X = Control.LowOrder ((int) msg.lParam.ToInt32 ());
drag_data.CurMousePos.Y = Control.HighOrder ((int) msg.lParam.ToInt32 ());
@@ -490,14 +486,7 @@ namespace System.Windows.Forms {
t.Interval = 500;
}
// If motion_poll is -1, there hasn't been motion at all, so don't simulate motion yet.
// Otherwise if more than 100 milliseconds have lapsed, we assume the pointer is not
// in motion anymore, and we simulate the mouse over operation, like .Net does.
if (motion_poll > 1)
HandleMouseOver ();
else if (motion_poll > -1)
motion_poll++;
HandleMouseOver ();
}
public void HandleButtonUpMsg ()
@@ -2203,6 +2203,12 @@ namespace System.Windows.Forms {
internal override bool MouseButtonsSwapped { get{ throw new NotImplementedException(); } }
internal override bool MouseWheelPresent { get{ throw new NotImplementedException(); } }
internal override MouseButtons MouseButtons {
get {
return MouseState;
}
}
internal override Rectangle VirtualScreen {
get {
return WorkingArea;
@@ -1612,6 +1612,11 @@ namespace System.Windows.Forms {
string class_name = RegisterWindowClass (cp.ClassStyle);
HwndCreating = hwnd;
// We cannot actually send the WS_EX_MDICHILD flag to Windows because we
// are faking MDI, not uses Windows' version.
if ((cp.WindowExStyle & WindowExStyles.WS_EX_MDICHILD) == WindowExStyles.WS_EX_MDICHILD)
cp.WindowExStyle ^= WindowExStyles.WS_EX_MDICHILD;
WindowHandle = Win32CreateWindow (cp.WindowExStyle, class_name, cp.Caption, cp.WindowStyle, location.X, location.Y, cp.Width, cp.Height, ParentHandle, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
HwndCreating = null;
@@ -133,9 +133,6 @@ namespace System.Windows.Forms {
// Caret
private static CaretStruct Caret; //
// Last window containing the pointer
private static IntPtr LastPointerWindow; // The last window containing the pointer
// Our atoms
private static IntPtr WM_PROTOCOLS;
private static IntPtr WM_DELETE_WINDOW;
@@ -2258,6 +2255,12 @@ namespace System.Windows.Forms {
}
}
internal override MouseButtons MouseButtons {
get {
return MouseState;
}
}
internal override Rectangle VirtualScreen {
get {
IntPtr actual_atom;
@@ -3831,6 +3834,17 @@ namespace System.Windows.Forms {
if (msg.message == Msg.WM_LBUTTONDOWN || msg.message == Msg.WM_MBUTTONDOWN || msg.message == Msg.WM_RBUTTONDOWN) {
SendParentNotify(msg.hwnd, msg.message, mouse_position.X, mouse_position.Y);
// Win32 splurts MouseMove events all over the place, regardless of whether the mouse is actually moving or
// not, especially after mousedown and mouseup. To support apps relying on mousemove events between and after
// mouse clicks to repaint or whatever, we generate a mousemove event here. *sigh*
XEvent motionEvent = new XEvent ();
motionEvent.type = XEventName.MotionNotify;
motionEvent.MotionEvent.display = DisplayHandle;
motionEvent.MotionEvent.window = xevent.ButtonEvent.window;
motionEvent.MotionEvent.x = xevent.ButtonEvent.x;
motionEvent.MotionEvent.y = xevent.ButtonEvent.y;
hwnd.Queue.EnqueueLocked (motionEvent);
}
break;
@@ -4001,44 +4015,9 @@ namespace System.Windows.Forms {
if (!hwnd.Enabled) {
goto ProcessNextMessage;
}
if (xevent.CrossingEvent.mode == NotifyMode.NotifyGrab || xevent.AnyEvent.window != hwnd.client_window) {
if (xevent.CrossingEvent.mode != NotifyMode.NotifyNormal) {
goto ProcessNextMessage;
}
if (xevent.CrossingEvent.mode == NotifyMode.NotifyUngrab) { // Pseudo motion caused by grabbing
if (LastPointerWindow == xevent.AnyEvent.window)
goto ProcessNextMessage;
if (LastPointerWindow != IntPtr.Zero) {
Point enter_loc = new Point (xevent.ButtonEvent.x, xevent.ButtonEvent.y);
// We need this due to EnterNotify being fired on all the parent controls
// of the Control being grabbed, and obviously in that scenario we are not
// actuallty entering them
Control ctrl = Control.FromHandle (hwnd.client_window);
foreach (Control child_control in ctrl.Controls)
if (child_control.Bounds.Contains (enter_loc))
goto ProcessNextMessage;
// A MouseLeave/LeaveNotify event is sent to the previous window
// until the mouse is ungrabbed, not when actually leaving its bounds
int x = xevent.CrossingEvent.x_root;
int y = xevent.CrossingEvent.y_root;
ScreenToClient (LastPointerWindow, ref x, ref y);
XEvent leaveEvent = new XEvent ();
leaveEvent.type = XEventName.LeaveNotify;
leaveEvent.CrossingEvent.display = DisplayHandle;
leaveEvent.CrossingEvent.window = LastPointerWindow;
leaveEvent.CrossingEvent.x = x;
leaveEvent.CrossingEvent.y = y;
leaveEvent.CrossingEvent.mode = NotifyMode.NotifyNormal;
Hwnd last_pointer_hwnd = Hwnd.ObjectFromHandle (LastPointerWindow);
last_pointer_hwnd.Queue.EnqueueLocked (leaveEvent);
}
}
LastPointerWindow = xevent.AnyEvent.window;
msg.message = Msg.WM_MOUSE_ENTER;
HoverState.X = xevent.CrossingEvent.x;
HoverState.Y = xevent.CrossingEvent.y;
@@ -4067,9 +4046,6 @@ namespace System.Windows.Forms {
if ((xevent.CrossingEvent.mode != NotifyMode.NotifyNormal) || (xevent.CrossingEvent.window != hwnd.client_window)) {
goto ProcessNextMessage;
}
// If a grab is taking place, ignore it - we handle it in EnterNotify
if (Grab.Hwnd != IntPtr.Zero)
goto ProcessNextMessage;
// Reset the cursor explicitly on X11.
// X11 remembers the last set cursor for the window and in cases where
@@ -74,7 +74,6 @@ System.Windows.Forms/ErrorProviderTest.cs
System.Windows.Forms/FlowPanelTests.cs
System.Windows.Forms/FocusTest.cs
System.Windows.Forms/FolderBrowserDialogTest.cs
System.Windows.Forms/FormEventTest.cs
System.Windows.Forms/FormHandleTest.cs
System.Windows.Forms/FormTest.cs
System.Windows.Forms/EventArgsTest.cs
@@ -1,8 +1,3 @@
2008-08-24 Gert Driesen <[email protected]>
* ResXFileRefTest.cs: Fixed/added attributes on SetUp and TearDown
methods.
2008-07-07 Jonathan Pobst <[email protected]>
* ResXResourceReaderTest.cs: Ignore test that is dependent on
@@ -137,7 +137,7 @@ namespace MonoTests.System.Resources
[TestFixture]
public class ResXFileRefConverterTest
{
[SetUp]
[Test]
public void SetUp ()
{
_converter = new ResXFileRef.Converter ();
@@ -151,11 +151,11 @@ namespace MonoTests.System.Resources
}
}
[TearDown]
public void TearDown ()
{
if (Directory.Exists (_tempDirectory))
if (Directory.Exists (_tempDirectory)) {
Directory.Delete (_tempDirectory, true);
}
}
[Test]
@@ -147,7 +147,7 @@ namespace MonoTests.System.Windows.Forms.DataBinding {
{
BindingContext bc = new BindingContext ();
ArrayList data_source = new ArrayList ();
BindingManagerBase a, b, c, d;
BindingManagerBase a, b, c;
data_source.AddRange (new string [] { "1", "2", "3", "4", "5" });
@@ -164,21 +164,6 @@ namespace MonoTests.System.Windows.Forms.DataBinding {
b = bc [data_source, "Length"];
Assert.AreSame (a, b, "INWM4");
// Non List type
MockItem item = new MockItem ("Mono", -1);
MockContainer container = new MockContainer ();
container.Item = item;
d = bc [container, "Item.Text"];
Assert.AreEqual ("Mono", d.Current, "INWM5");
Assert.AreEqual (1, d.Count, "INWM6");
Assert.AreEqual (0, d.Position, "INWM7");
d = bc [container, "Item.Text.Length"];
Assert.AreEqual (4, d.Current, "INWM8");
Assert.AreEqual (1, d.Count, "INWM9");
Assert.AreEqual (0, d.Position, "INWM10");
}
#if NET_2_0
@@ -1,77 +1,23 @@
2008-08-26 Jonathan Pobst <monkey@jpobst.com>
* ErrorProviderTest.cs: Add test for bug #420305.
2008-08-24 Carlos Alberto Cortez <[email protected]>
* ListControlTest.cs: Add a container for a mock item, to test
multiple nested properties.
* BindingContextTest.cs: New test for the overload of the indexer
taking a data source with a data member (including nested properties,
or multiple objects, as msdnstates).
2008-08-24 Gert Driesen <[email protected]>
* ListBoxTest.cs: Added tests for SetItemsCore. Added and improved tests
for ObjectCollection. Added tests for IntegerCollection.
2008-08-23 Gert Driesen <[email protected]>
* ControlTest.cs: Added .ctor tests.
2008-08-19 Jonathan Pobst <[email protected]>
* LinkLabelTest.cs: Add test for bug #410709.
2008-08-02 Gert Driesen <[email protected]>
* FormEventTest.cs: Modified several tests to no longer require manual
intervention. Added/improved tests for Form events.
2008-07-31 Carlos Alberto Cortez <[email protected]>
2008-08-01 Carlos Alberto Cortez <calberto.cortez@gmail.com>
* ListBindingHelperTest.cs: New test for GetList receiving an IEnumerable
object which return instances of ICustomTypeDescriptor instances,
instead of actual items.
2008-07-30 Ivan N. Zlatev <[email protected]>
* TableLayoutTest.cs: Add tests for bug #412582
2008-07-29 Jonathan Pobst <[email protected]>
* ListBox.cs: Make test not font dependent.
2008-07-29 Jonathan Pobst <[email protected]>
* ListBox.cs: Add test for bug #412728.
2008-07-30 Ivan N. Zlatev <[email protected]>
* TableLayoutTest.cs: Add tests for bug #412582
2008-07-25 Ivan N. Zlatev <[email protected]>
* TableLayoutTest.cs: Add test for bug #412161
2008-07-23 Gert Driesen <[email protected]>
* ListViewItemTest.cs: Marked SerializeExact_Mono as NotWorking to fix
buildbot.
2008-07-22 Gert Driesen <[email protected]>
* ListViewItemTest.cs: Enabled (de)serialization tests.
* PictureBoxTest.cs: Enabled tests for bug #378308.
2008-07-20 Gert Driesen <[email protected]>
* ListViewItemTest.cs: Fixed tests.
2008-07-20 Gert Driesen <[email protected]>
* ListViewItemTest.cs: Added ListViewSubItem (de)serialization tests,
added/improved ctor tests and add property tests.
* PictureBoxTest.cs: Added tests for Load(Async) argument checks.
2008-07-15 Jonathan Pobst <[email protected]>
[Backport to 2.0]
* ImageListTest.cs: Add test for bug #409169.
2008-07-14 Jonathan Pobst <[email protected]>
@@ -85,7 +31,7 @@
2008-07-12 Gert Driesen <[email protected]>
* PictureBoxTest.cs: Split up ImageLocation test in sync and async
tests.
tests. Added tests for Load argument checks.
2008-07-11 Gert Driesen <[email protected]>
Loaded 100 of 3356 files, more files were not shown because too many files have changed in this diff. Show more