2006-06-21 Peter Dennis Bartok <pbartok@novell.com>
[mono.git] / mcs / class / Managed.Windows.Forms / System.Windows.Forms / ChangeLog
index 3bc7f8d69ed47d53ca41ad2d6de44086e3ad75ee..3e701721771d0aac63ed89c626565d580a542def 100644 (file)
@@ -1,8 +1,493 @@
+2006-06-21  Peter Dennis Bartok  <pbartok@novell.com>
+
+       * FileDialog.cs: Fixed taborder to match MS. Fixes #77873 partially.
+
+2006-06-21  Peter Dennis Bartok  <pbartok@novell.com> 
+
+       * Control.cs (ContainsFocus): Using new driver method to get focused
+         window, instead of trying to use internal tracking var, which can
+         recursion issues (Fixes #78685)
+       * XplatUI.cs, XplatUIDriver.cs, XplatUIX11.cs, XplatUIOSX.cs, 
+         XplatUIWin32.cs: Added GetFocus method to return focused window
+
+2006-06-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * ColorDialog.cs: when the mouse button is pressed inside the color
+       matrix, don't let the cursor move out of it until the button is
+       released, which is the behavior on windows. Changed 'colours' by
+       'colors' to use the same word consistently.
+
+2006-06-21  Chris Toshok  <toshok@ximian.com>
+
+       * DataGrid.cs: add in some basic navigation stuff (navigating to a
+       child relation and back, using a stack).  Also, remove
+       GetDataSource and the code that calls it - it's not needed.  Also,
+       track CurrencyManager.ListName's removal.
+
+2006-06-21  Chris Toshok  <toshok@ximian.com>
+
+       * CurrencyManager.cs: push some of the original type checking from
+       BindingContext.CreateBindingManager to here, and remove some of
+       the finalType stuff.  Need more tests to make sure I've got the
+       ListName part right, and we might need more in SetDataSource.
+
+       * PropertyManager.cs: add a ctor that takes just the datasource,
+       and no property name.  Make SetDataSource work with a null
+       property_name, and make Current return the data_source if the
+       property descriptor is null.  this makes 'string foo = "hi";
+       BindingContext[foo].Current' return "hi" as it should.
+
+       * RelatedCurrencyManager.cs: make this code more generic - there's
+       no reason the parent manager has to be CurrencyManager, and
+       there's no reason to pass the DataRelation.  It suffices to use a
+       BindingManagerBase and PropetyDescriptor.
+
+       * RelatedPropertyManager.cs: make a similar change here.
+       
+       * BindingContext.cs: make CreateBindingManager the beautiful, tiny
+       flower I knew it could be.
+
+2006-06-20  Chris Toshok  <toshok@ximian.com>
+
+       * PropertyManager.cs: the PropertyChangedHandler is invoked when
+       data in the source has changed and we need to update the control,
+       so s/PullData/PushData.
+
+       * CurrencyManager.cs: Refresh is meant to update the control from
+       data in the datasource.  So, s/PullData/PushData.
+
+       * BindingContext.cs: add more ugliness (we weren't handling the
+       case where data_source = DataTable and data_member = column_name).
+
+       * Binding.cs: fix PushData/PullData mixup.  Both are interpreted
+       from the perspective of the datasource.  PullData pulls from the
+       control, PushData pushes to the control.
+
+2006-06-20  Chris Toshok  <toshok@ximian.com>
+
+       * BindingContext.cs: rewrite the CreateBindingManager code to
+       handle navigation paths more or less properly.  This could
+       definitely stand some more work, in particular to push the
+       recursion up to the toplevel.  But that relies on fixes in other
+       places (System.Data comes to mind).
+
+       Also, move to a flat hashtable (and encode the twolevel nature of
+       the dictionary into the hash key).  This lets us implement the
+       IEnumerable.GetEnumerator method.
+
+       * RelatedCurrencyManager.cs: new class.  Update our view based on
+       our relation and our parent CurrencyManager's position.
+
+       * CurrencyManager.cs: split out some logic from the ctor into
+       SetView, so it can be called from the new RelatedCurrencyManager
+       subclass.
+
+       * RelatedPropertyManager.cs: new class.  Update our datasource
+       based on the position of our parent CurrencyManager.
+
+       * PropertyManager.cs: split out some logic from the ctor into
+       SetDataSource, so it can be called from the new RelatedDataSource
+       subclass.  Also, make the Current getter return the value
+       of the PropertyDescriptor, not the data_source.
+
+       * Binding.cs: no need to duplicate the string splitting code here.
+
+2006-06-19  Peter Dennis Bartok  <pbartok@novell.com> 
+
+       * Control.cs:
+         - set_Enabled: OnEnabledChanged is not called if the inherited state 
+           of the control is not altered, even though  we might be changing the
+           internal state of the control (#78458)
+         - set_Enabled: (Re)Moved the enabling/disabling of the window to 
+           OnEnabledChanged, to allow easy altering of any child window state
+         - OnEnabledChanged: Added code to enable/disable driver window state
+         - OnParentEnabledChanged: Instead of firing the event, call 
+           OnEnabledChanged, which will fire the event and also a) set driver
+           window state and pass the enabled state to any grandchildren (#78458)
+
+2006-06-19  Jackson Harper  <jackson@ximian.com>
+
+       * InternalWindowManager.cs: We don't set the cursor explicitly
+       thats done via the response to NCHITTESTs.
+       - Don't need to adjust for titlebar heights anymore, the
+       coordinates are coming in the correct coordinates now (see peters
+       last patch).
+
+
+2006-06-19  Peter Dennis Bartok  <pbartok@novell.com> 
+
+       * XplatUIX11.cs (GetMessage): WM_NCxBUTTONx messages were wrongly
+         being translated relative to whole window, instead of client window.
+         That caused broken offsets on mouseclick (and caused gas for our
+         InternalWindowManager)
+
+2006-06-15  Peter Dennis Bartok  <pbartok@novell.com> 
+
+       * TextControl.cs:
+         - MoveCaret: Implemented PgUp, PgDown, CtrlPgUp and CtrlPgDown
+         - Undo(): Added replay of cursor move on DeleteChars action; added
+           calling Undo() again if a recorded cursor move is invalid (to
+           ensure that some action is performed on Undo)
+       * TextBoxBase.cs (ProcessKey): Added handling of PgUp and PgDown (#78482)
+
+2006-06-16  Jackson Harper  <jackson@ximian.com>
+
+       * MdiClient.cs: Instead of just sizing maximized windows when
+       there is a resize we also have to adjust the Y of minimized
+       windows, so they stay pinned to the bottom of the mdi container.
+       - Eliminate separate tracking of the active control, we can just
+       get this from the controls collection.
+       - Paint the decorations for the newly activated titlebar so we get
+       a pretty blue bar.
+       * InternalWindowManager.cs:
+       * ThemeWin32Classic.cs: Minimized windows get all three buttons
+       even if they are a tool window.
+       
+2006-06-15  Peter Dennis Bartok  <pbartok@novell.com> 
+
+       * TextControl.cs (Undo): Handle non-existent cursor locations in the
+         undo buffer, these can happen when text was deleted and the cursor
+         was recorded first. Since we will also have a recorded cursor
+         after the delete this is not an issue. (Fixes #78651)
+
+2006-06-14  Peter Dennis Bartok  <pbartok@novell.com> 
+
+       * AccessibleObject.cs: Remove dependence on Control.is_selected;
+         instead properly track control states internally (allows us to
+         remove is_selected from Control)
+
+2006-06-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * ImageListStreamer.cs: correctly generate the 1bpp mask for images
+       whose width is not a multiple of 8.
+
+2006-06-13  Jackson Harper  <jackson@ximian.com>
+
+       * MdiClient.cs:  Only maximize the next child if the current one
+       is maximized.
+
+2006-06-13  Chris Toshok  <toshok@ximian.com>
+
+       * DataGridColumnStyle.cs: Invalidate the column when HeaderText is
+       modified.  Also, guard against grid or grid_drawing being null in
+       Invalidate.
+
+       * DataGrid.cs: Reformat tons of getters/setters.  In the
+       DataMember setter, just call SetNewDataSource instead of
+       duplicating some of its functionality.  In SetNewDataSource, don't
+       check ListManager for null, since the property getter creates the
+       object if needed.
+
+       * DataGridTableStyle.cs: don't set TableStyle or call
+       SetDataGridInternal on the column here, it's done in
+       GridColumnStylesCollection.Add.
+
+       * GridColumnStylesCollection.cs: fix all the explicit interface
+       implementations to just call our methods.  Nuke AddInternal() and
+       move the body of it to Add().  Also, add a call to
+       column.SetDataGridInternal to Add().
+
+       * DataGridTextBoxColumn.cs (.ctors): call this() instead of
+       base()+duplicate code.  Also, use the Format property instead of
+       format to generate an Invalidate ala MS.  Lastly, create the
+       textbox here, unconditionally.
+       (set_Format): call Invalidate.
+       (get_TextBox): no need to call EnsureTextBox.
+       (Commit): remove the message box.
+       (Edit) remove the call to EnsureTextBox.
+       (EndEdit): call HideEditBox instead of ReleaseHostedControl.
+       (EnterNullValue): no need to check textbox for null.
+       (HideEditBox): no need to check textbox for null.
+       (SetDataGridInColumn): add the textbox to the grid's controls.
+       (EnsureTextBox): nuke.
+       
+2006-06-13  Jackson Harper  <jackson@ximian.com>
+
+       * MdiWindowManager.cs: Hook up to the maximized menus paint event
+       and redraw the buttons when needed. Unhook when the window is
+       unmaximized.
+       * MainMenu.cs: Add an internal Paint event, the mdi window manager
+       needs this so that it can redraw its buttons when the menu is
+       repainted.
+       * InternalWindowManager.cs:
+       * Form.cs: The method order has changed for DrawMaximizedButtons,
+       so that it can be a PaintEventHandler.
+       
+2006-06-13  Jackson Harper  <jackson@ximian.com>
+
+       * MdiClient.cs: When we close a maximized mdi window, the next mdi
+       window is activated and maximized, even if it wasn't before.
+       - When  a new window is activated repaint the decorations of the
+       old one, so that it no longer has the Active "look" (the blue
+       titlebar).
+       * InternalWindowManager.cs: Open up CreateButtons to base classes
+       so they can recreate the buttons on state changes.
+       - If a window is maximized give it all three buttons
+       * MdiWindowManager.cs: Create the titlebar buttons when the state
+       is changed, this is needed because a toolwindow will not have all
+       three buttons until it is maximized.
+
+2006-06-13  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * ProgressBar.cs : PerformStep() shouldn't exceed Maximum.
+         Fixed bug #78609.
+
+2006-06-12  Jackson Harper  <jackson@ximian.com>
+
+       * KeysConverter.cs: Make sure we handle the Ctrl special case
+       if its the only key.
+       
+2006-06-12  Jackson Harper  <jackson@ximian.com>
+
+       * Theme.cs: Add a method to get the size of a managed window
+       toolbar button.
+       * InternalWindowManager.cs: Remove the ButtonSize property, this
+       should be retrieved from the theme.
+       * MdiWindowManager.cs: Get the button size from the theme
+       * ThemeWin32Classic.cs: Make the method to get the managed window
+       titlebar button size public.
+       - Handle the different button sizes of maximized toolwindows
+       (should match any maximized window).
+       - Get the titlebar height from the theme, not the WM (which gets
+       it from the theme).
+
+2006-06-12  Jackson Harper  <jackson@ximian.com>
+
+       * InternalWindowManager.cs: Handle NC Double Clicks, passing the
+       event down to the mdi window manager.
+       - Expose some extra stuff to base classes
+       - Make sure to end the Capture on an NC Mouse up, so that we can
+       get double clicks properly, and the sizing doens't stick.
+       - When doing PointToClient contain it in the workable desktop
+       area, this prevents windows from changing size when the cursor is
+       pulled outside of the working area while sizing.
+       * MdiWindowManager.cs: When we get a double click maximize the
+       window.
+       - Reset the cursor after handling mode changes.
+
+2006-06-12  Peter Dennis Bartok  <pbartok@novell.com> 
+
+       * XplatUIX11.cs (WorkingArea): Read the actual workarea for the 
+         current desktop, instead of just assuming a 0, 0 origin. This
+         is needed for our internal window manager, to know the top
+         margin of the desktop
+
+2006-06-12  Chris Toshok  <toshok@ximian.com>
+
+       * DataGrid.cs (set_CurrentCell): concede focus as we move around.
+       we need this to get rid of the selected background in the bool
+       column.
+       (CancelEditing): move the ConcedeFocus call to above the Abort
+       call.  Also, set is_changing to false and invalidate the row
+       header if we were changing before.
+       (ProcessKeyPreviewInternal): remove, since noone outside this
+       class calls it anymore.  Roll the code into ProcessKeyPreview.
+       (EndEdit): remove the internal version.
+       (InvalidateCurrentRowHeader): make private.
+
+       * DataGridBoolColumn.cs: simplify this class a bunch.  remove the
+       Keys.Escape handling (and with it the last call to
+       DataGrid.EndEdit from outside the class.)
+
+
+2006-06-12  Chris Toshok  <toshok@ximian.com>
+
+       * DataGridTextBox.cs (.ctor): isedit defaults to false.
+       (OnKeyPress): set isedit to true.
+       (ProcessKeyMessage): remove Keys.Enter handling from here.  it's
+       already handled by the grid.
+
+       * DataGrid.cs (set_CurrentCell): more work here.  it's still not
+       right.  ugh.
+       (set_DataSource): SetDataSource always returns true, so stop
+       putting it in an if statement.
+       (EndEdit): get rid of some {}'s
+       (ProcessGridKey): return true in case Keys.Escape.
+       (ProcessKeyPreviewInternal): only handle KEYDOWN messages.
+       (ConnectListManagerEvents,DisconnectListManagerEvents): connect to
+       PositionChanged, stopped connecting to CurrentChanged.
+       (GetDataSource): simplify this a bunch.
+       (SetDataSource): change return type from bool to void.
+       (OnListManagerPositionChanged): rename OnListManagerCurrentChanged
+       to this, and make sure we don't set ListManager.Position inside
+       set_CurrentCell.
+       (OnListManagerItemChanged): if we're passed an actual index,
+       redraw that row.
+
+       * CurrencyManager.cs (set_Position): don't call PullData here.
+
+2006-06-09  Jackson Harper  <jackson@ximian.com>
+
+       * TreeNode.cs:  Recalculate the visible order before doing the
+       Expand/Collapse Below calls, because those calls generate an
+       expose.
+       - Reduce calls to the TreeView property, which is mildly expensive
+       by using a local var.
+       * Form.cs: Layout the MDI child windows when creating the parent
+       form.
+       - Don't use the internal constructor anymore
+       * MdiClient.cs: use the parent form width/height (if available)
+       when laying out the child windows, we do this because the
+       mdiclient isn't docked yet when the initial layout is done.
+       - Don't need an internal constructor anymore.
+
+2006-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * FileDialog.cs: handle access errors when trying to create a folder
+       or changing to a directory. No need to initialize out parameters.
+
+2006-06-08  Alexander Olk  <alex.olk@googlemail.com>
+
+       * FileDialog.cs: Append a number when creating a new folder if the
+         folder already exists (use parenthesis instead of square brackets)
+
+2006-06-08  Alexander Olk  <alex.olk@googlemail.com>
+
+       * FileDialog.cs:
+         - Disabled registry support for windows and added better registry
+           error checking for other systems (need to investigate why it
+           works perfectly on my system)
+         - If a folder already exist show an error MessageBox instead of
+           trying to create an indexed name.
+         - Fixed a non intentional typo.
+
+2006-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * FileDialog.cs: (SetFileName) don't crash if CurrentRealFolder is null.
+
+2006-06-08  Alexander Olk  <alex.olk@googlemail.com>
+
+       * FileDialog.cs: When creating a new folder don't crash if the
+         folder already exists.
+
+2006-06-08  Alexander Olk  <alex.olk@googlemail.com>
+
+       * FileDialog.cs: Allmost a complete rewrite.
+         - added a "virtual" file system that handles the differences
+           between unix and windows file systems (especially the directory
+           structure). Moved most of the directory and file handling code
+           into the vfs.
+           Added vfs classes: MWFVFS, FileSystem, WinFileSystem,
+           UnixFileSystem and FSEntry.
+         - Recently used folder/directory, size, location and used file names
+           (file name ComboBox) are now stored in the registry and get read
+           before the dialog shows up (fixes part 6 of bug #78446).
+         - Creation of new folders/directories is now possible (context menu
+           or ToolBar). Added TextEntryDialog for this that fills in the gap
+           until ListView.LabelEdit works.
+         - Fixed cursor handling (bug #78527) and focus handling for
+           PopupButtonPanel
+         - Various "Search in" ComboBox enhancements. The content of the
+           dropdown listbox now almost matches ms.
+         - Changed the behaviour when the user switches to SpecialFolder
+           Recent to show the ListView in View.Details.
+         - Beside using the ToolBar to change the View property of the
+           file ListView it is now possible to use the context menu too.
+
+2006-06-08  Alexander Olk  <alex.olk@googlemail.com>
+
+       * ComboBox.cs: Don't create a new ObjectCollection when an item
+         gets inserted. Just insert the item in the existing object_items
+         ArrayList.
+
+2006-06-08  Jackson Harper  <jackson@ximian.com>
+
+       * OpenTreeNodeEnumerator.cs: Fix to use the Parent property, so
+       that the treeview and root node checks are done also, this fixes a
+       regression i caused in the unit tests.
+
+2006-06-07  Wade Berrier <wberrier@novell.com> 
+
+       * RichTextBox.cs: More ISO8859-1 -> unicode
+
+2006-06-07  Mike Kestner  <mkestner@novell.com>
+
+       * ComboBox.cs : use items to hold highlight/selection so that
+       collection insertions don't require synchronization.
+
+2006-06-07  Jackson Harper  <jackson@ximian.com>
+
+       * InternalWindowManager.cs: Simplify (and FIX) the window sizing
+       routine.  We now always keep the sized edge at the cursor instead
+       of computing movement and adjusting rects.  There is one buglet
+       with this method though when the cursor is moved over area that
+       the window can not expand too (such as the toolbars on the desktop).
+
+2006-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * XplatUIX11.cs: (IsEnabled,IsVisible) the window handler can be null
+       here. Fixes crash on startup in AlbumSurfer.
+
+2006-06-07  Peter Dennis Bartok  <pbartok@novell.com> 
+
+       * RichTextBox.cs: Replaced embedded ISO8859-1 chars with proper unicode
+         values
+
+2006-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * XplatUIX11.cs: call XPending and XNextEvent inside the same lock()
+       statement to avoid calling XNextEvent which will block if another thread
+       took the event that we were expecting. Fixes bug #78605.
+
+2006-06-07  Mike Kestner  <mkestner@novell.com>
+
+       * ListView.cs : isolated checkbox clicking from the selection logic.
+       Toggle check state on item doubleclicks.  Really fixes #78454 part2.
+
+2006-06-06  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * Form.cs: Check that the value passed to Form.DialogResult
+       is a valid enum value.
+
+2006-06-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * FileDialog.cs: disable the up button when in 'Recently Used' or 'My
+       Computer'. Clicking it in the network view goes to 'My Computer'.
+       Added CIFS filesystem type. Display the mount point of filesystems.
+       Avoid duplicate mount points (happens for me with CIFS);
+
+2006-06-06  Jackson Harper  <jackson@ximian.com>
+
+       * InternalWindowManager.cs: Draw the maximized windows buttons
+       when resizing.
+
+2006-06-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * Form.cs: when running a modal dialog, ignore WM_CLOSE requests for
+       all other dialogs. Fixes bug #78585.
+
+2006-06-06  Mike Kestner  <mkestner@novell.com>
+
+       * CheckedListBox.cs : apply CheckOnClick behavior to unchecking too.
+       Only invalidate checkbox on checkstate changes to avoid flicker.
+       * ListBox.cs : avoid unselect/select when clicking selected item.
+       avoid reselection flicker for already multiselected items.
+       Fixes #78382.
+
+2006-06-06  Jackson Harper  <jackson@ximian.com>
+
+       * MdiWindowManager.cs: When the window is closed do an NCRecalc on
+       the parent form so that the menu is removed if needed.
+
+2006-06-06  Mike Kestner  <mkestner@novell.com>
+
+       * ListBox.cs : add ScrollWindow call to UpdateTopItem.  fix
+       Prev/Next/PrevPage/NextPage/Home/End index calculation.  Fixes #78559.
+
+2006-06-06  Mike Kestner  <mkestner@novell.com>
+
+       * CheckedListBox.cs : rebuild check collection on Add.  Fixes #78426.
+
+
 2006-06-06  Jackson Harper  <jackson@ximian.com>
 
        * Control.cs: Use the property (instead of the field) to get the
        default cursor so it is instantiated correctly.
-
+       * InternalWindowManager.cs: The OS doesn't give us an NCPAINT with
+       resizes so we need to manually repaint the window decorations here.
+       - Set the titlebar button locations as soon as they are created,
+       otherwise they are not set correctly on win32.
+       
 2006-06-06  Chris Toshok  <toshok@ximian.com>
 
        * CurrencyManager.cs (set_Position): call PullData before