Commit Graph
106 Commits
Author SHA1 Message Date
Gert Driesen 233329d74c * FileDialog.cs: Use text of File name combobox to determine what
files the user selected. Added tokenizer to parse the file names.
Fixes bug #81123.

svn path=/trunk/mcs/; revision=74134
2007-03-12 18:34:48 +00:00
Gert Driesen c8aada8525 * FileDialog.cs: Update FSEntry when move is successful. Fixes
bug #80948.

svn path=/trunk/mcs/; revision=73372
2007-02-23 16:00:00 +00:00
Gert Driesen 756a140337 * FileDialog.cs: Fixed support for renaming files and directories.
* ListView.cs: Do not lose focus when edit is canceled. Process
Escape as regular key (to prevent closing of dialogs).

svn path=/trunk/mcs/; revision=73331
2007-02-22 19:43:48 +00:00
Gert Driesen 1dc525cadb * FileDialog.cs: LabelEditEventArgs.Label now returns null when user
did not modify label.
* ListView.cs: Only set LabelEditEventArgs.Label if user actually
modified the text. Reset Label when user presses Escape in edit mode.
Move focus to ListView after having cancelled or finished editing the
label.

svn path=/trunk/mcs/; revision=73329
2007-02-22 17:59:03 +00:00
Gert Driesen f5b1db55fa * ComboBox.cs: Removed unnecessary initializations. Marked items field
private. Clear textbox when Text is set to null and SelectedIndex is
already -1.
* FileDialog.cs: Removed unnecessary initializations. Removed
workarounds for ComboBox bugs that are now fixed. Modified
DefaultExt, InitialDirectory and Title property to change null to
zero-length string in getters. Avoid directly accessing fields.
* ComboBoxTest.cs: Added test for setting Text to null if SelecedIndex
is already -1.

svn path=/trunk/mcs/; revision=73258
2007-02-21 16:28:30 +00:00
Gert Driesen 1fa2cb05bd * FileDialog.cs: Removed need for separate fileName field. On 2.0
profile, do not check filename(s) for illegal character if filename(s)
were set non-interactively but always check on 1.0 profile. Fixed NRE
in DefaultExt and only strip off first leading dot. Improve exception
message when invalid Filter is set. Do not ignore InitialDirectory if
it does no exist. Store specified Title, and if empty use default
title (depending on type of dialog). Added an internal DialogTitle
property for retrieving dialog title. Fixed logic of displayed dir to
more closely match MS. Avoid setting ComboBox.Text to a zero-length
string as its buggy.
* OpenFileDialog.cs: In OpenFile, throw ArgumentNullException if
FileName is a zero-length string (it can never be null). Override
DialogTitle property to set default title of dialog box.
* SaveFileDialog.cs: Override DialogTitle property to set default
title of dialog box.
* SaveFileDialogTest.cs: Added tests for SaveFileDialog.
* System.Windows.Forms_test.dll.sources: add SaveFileDialogTest.cs.

svn path=/trunk/mcs/; revision=73090
2007-02-18 19:09:22 +00:00
Gert Driesen 05b97c6703 * FileDialog.cs: Modify default text of filename and filetype labels
to match that of MS. Reset do_not_call_OnSelectedIndexChanged...
after we've updated the SelectedIndex. Fixes part of bug #80887.
* SaveFileDialog.cs: Set text of filetype label.

svn path=/trunk/mcs/; revision=73068
2007-02-18 10:41:34 +00:00
Jackson Harper 29d2f4b349 * FileDialog.cs: After changing the name of the folder, we have
* to
        make sure that it is created, or that we pop up an error because
        it already exists.


svn path=/trunk/mcs/; revision=73044
2007-02-16 20:33:51 +00:00
Alexander Olk ea9217aba5 2007-01-31 Alexander Olk <[email protected]>
* FileDialog.cs: Rewrite of Jacksons OnClickCancelButton patch to
	make it more obvious what is happening.


svn path=/trunk/mcs/; revision=72024
2007-01-31 13:45:54 +00:00
Jackson Harper 998633dff4 * FileDialog.cs: OnClickCancelButton gets called whenever the
* dialog
        is closed, so we need to make sure that we aren't changing the
        dialog result when the OK (Open or Save) button has been clicked
        and we are closing the window ourselves.  Note we don't need to
        worry about the cache being written in this case, because it was
        already done in the previous FilOk call.


svn path=/trunk/mcs/; revision=71990
2007-01-30 18:18:47 +00:00
Alexander Olk 2e86af5c12 2006-01-25 Alexander Olk <[email protected]>
* FileDialog.cs:
	- Move to using System.ComponentModel.EventHandlerList
	- Replace Refresh with Invalidate
	- Clear the mime filecache on closing
	- Some other memory reducing work. After beeing closed FD now uses
	  only about 300 KB for the fdo mime stuff plus the memory of the
	  cached icons.
	* Mime.cs: Changed coding style and removed unnecessary commented
	code. Some more memory memory reducing work.


svn path=/trunk/mcs/; revision=71665
2007-01-25 13:15:08 +00:00
Alexander Olk 38512abbe1 2006-01-04 Alexander Olk <[email protected]>
* FileDialog.cs: Sebastien fixed the libgdiplus png alpha
	problems. So it is time to bring back the old popupbutton colors.


svn path=/trunk/mcs/; revision=70503
2007-01-04 20:53:21 +00:00
Alexander Olk c3fdd49027 2006-12-29 Alexander Olk <[email protected]>
* ColorDialog.cs, FileDialog.cs, FolderBrowserDialog.cs,
	FontDialog.cs, Mime.cs, MimeIcon.cs, OpenFileDialog.cs,
	SaveFileDialog.cs, ThemeClearlooks.cs, ThemeNics.cs:
	Corrected copyright and email adress.


svn path=/trunk/mcs/; revision=70207
2006-12-29 14:12:29 +00:00
Chris Toshok abd0a75fd9 * DataGridView.cs: fix compiler warnings.
* PrintControllerWithStatusDialog.cs: same.

	* ToolBar.cs: same.

	* FolderBrowserDialog.cs: same.

	* Splitter.cs: same.

	* DataGridViewComboBoxCell.cs: same.

	* XplatUIWin32.cs: same.

	* PictureBox.cs: same.

	* Win32DnD.cs: same.

	* PageSetupDialog.cs: same.

	* FileDialog.cs: same.

	* PrintDialog.cs: same.

	* DataGridTextBoxColumn.cs: same.

	* DrawTreeNodeEventArgs.cs: same (and fix corcompare)

2006-12-05  Chris Toshok  <[email protected]>


svn path=/trunk/mcs/; revision=69060
2006-12-05 18:35:11 +00:00
Alexander Olk 6533ddf917 2006-11-17 Alexander Olk <[email protected]>
* FileDialog.cs: Trim all filters, otherwise DirInfo.GetFiles
	  can't handle those filters. (Fixes bug #79961)


svn path=/trunk/mcs/; revision=68095
2006-11-17 20:35:16 +00:00
Alexander Olk cd17fdc773 2006-11-10 Alexander Olk <[email protected]>
* FileDialog.cs: Don't add an extension if the filename
	  already ends with that extension.


svn path=/trunk/mcs/; revision=67681
2006-11-10 18:11:44 +00:00
Alexander Olk c2113a2894 2006-11-10 Alexander Olk <[email protected]>
* FileDialog.cs: Always return the value for FilterIndex that
	  was set. Internally convert it to values that make sense.


svn path=/trunk/mcs/; revision=67658
2006-11-10 01:15:58 +00:00
Alexander Olk 54860094ac In .:
2006-11-09  Alexander Olk  <[email protected]>

	* System.Windows.Forms_test.dll.sources: Added CommonDialogsTest.cs.

In Test/System.Windows.Forms:
2006-11-09  Alexander Olk  <[email protected]>

	* CommonDialogsTest.cs: Added

In System.Windows.Forms:
2006-11-09  Alexander Olk  <[email protected]>

	* FileDialog.cs:
	  - Fix ToString ()
	  - An ArgumentException is now thrown if a wrong filter
	    is applied (matches ms). The previous filter doesn't change
	    anymore if an exception is thrown.
	  - Changing the FileName property also affects FileNames
	* ColorDialog.cs: The length of the CustomColors array is always
	  16. It doesn't matter if we use a smaller array or null to update
	  or change the custom colors property.
	* FolderBrowserDialog.cs: Throw an InvalidEnumArgumentException if
	  for RootFolder if we get a undefined value.



svn path=/trunk/mcs/; revision=67618
2006-11-09 17:35:38 +00:00
Alexander Olk 1272aa1be7 2006-11-05 Alexander Olk <[email protected]>
* FileDialog.cs: *sigh* Because of recent runtime changes (r67043) I
	  had to remove support for links that point to a directory. FileInfo
	  returns no usefull information (means, the directory they point to)
	  for such links. Replaced some empty string ("") with String.Empty.


svn path=/trunk/mcs/; revision=67380
2006-11-05 16:01:29 +00:00
Alexander Olk 9638090b60 2006-10-03 Alexander Olk <[email protected]>
* FileDialog.cs: Don't call on_directory_changed inside
	  OnSelectedIndexChanged (it changes the SelectedIndex too).
	  Instead move it to OnSelectionChangeCommitted.


svn path=/trunk/mcs/; revision=66666
2006-10-13 22:05:10 +00:00
Alexander Olk 4402211c61 2006-10-03 Alexander Olk <[email protected]>
* FileDialog.cs: Don't crash if a path is not accessible
	  (System.UnauthorizedAccessException). Fixes #79569.
	* MimeIcon.cs: Workaround for a Uri bug. Unix paths/files can have
	  a ':' too. Return unknown icon for those paths/files.


svn path=/trunk/mcs/; revision=66200
2006-10-03 15:38:31 +00:00
Mike Kestner 1c12ab6a7c warnings cleanups
svn path=/trunk/mcs/; revision=65637
2006-09-19 13:26:36 +00:00
Miguel de Icaza 045f44e7e3 2006-09-13 Miguel de Icaza <[email protected]>
* FileDialog.cs: Store the configuration file in ~/.mono/mwf_config


svn path=/trunk/mcs/; revision=65367
2006-09-13 20:35:54 +00:00
Alexander Olk 6baa08ea93 * FileDialog.cs: Fix typo
svn path=/trunk/mcs/; revision=65077
2006-09-07 18:12:52 +00:00
Peter Dennis Bartok 649fee1578 2006-09-01 Peter Dennis Bartok <[email protected]>
* FileDialog.cs: Set ClientSize instead of window size, to allow space
	  for decorations (Fixes #79219)


svn path=/trunk/mcs/; revision=64745
2006-09-01 21:05:18 +00:00
Alexander Olk c953130748 2006-08-26 Alexander Olk <[email protected]>
* FileDialog.cs: After reading FileDialog settings from mwf_config
	  use Desktop prefix only if a real folder doesn't exist anymore. 


svn path=/trunk/mcs/; revision=64411
2006-08-26 14:37:11 +00:00
Peter Dennis Bartok 99654b8d38 2006-08-23 Peter Dennis Bartok <[email protected]>
* FileDialog.cs: Making sure the control is created before we get a 
	  chance to use it with BeginInvoke (Fixes #79096)


svn path=/trunk/mcs/; revision=64254
2006-08-23 17:22:25 +00:00
Jackson Harper 7dc686e858 * FileDialog.cs: Paint the selection on the directory combobox
* the
        same way as on MS. 


svn path=/trunk/mcs/; revision=63966
2006-08-18 04:48:25 +00:00
Alexander Olk 307d535651 2006-08-11 Alexander Olk <[email protected]>
* FileDialog.cs: If a saved/remembered path doesn't exist
	  anymore, fall back to "Desktop".


svn path=/trunk/mcs/; revision=63651
2006-08-11 18:38:46 +00:00
Alexander Olk ca4a5647b6 2006-07-22 Alexander Olk <[email protected]>
* FileDialog.cs: Enable the BackButton when dirstack has one element.
	  Added some small optimizations.


svn path=/trunk/mcs/; revision=62894
2006-07-22 07:13:40 +00:00
Alexander Olk 0f79f28aa7 2006-07-14 Alexander Olk <[email protected]>
* FileDialog.cs: Don't create a new folder in "MyComputer" folder.
	* FolderBrowserDialog.cs:
	  - Use MWFConfig to store and read size and position settings
	  - Added code to create a new folder (button or context menu).
	    Use TreeView labeledit to change the name of the new folder.


svn path=/trunk/mcs/; revision=62614
2006-07-14 18:29:47 +00:00
Alexander Olk ef9f7ee533 2006-07-12 Alexander Olk <[email protected]>
* FileDialog.cs: Added GetFoldersOnly to MWFVFS
	* FolderBrowserDialog.cs: Almost a complete rewrite.
	  - Better support for Environment.Specialfolders
	  - Added support for MWFVFS
	  - Made setting SelectedPath work


svn path=/trunk/mcs/; revision=62508
2006-07-12 16:53:08 +00:00
Alexander Olk fded69b285 * FileDialog.cs: Don't use brackets for new folders if they exist
under *nix. Instead use -(number of existing folders +1).

2006-07-07  Alexander Olk  <[email protected]>


svn path=/trunk/mcs/; revision=62358
2006-07-07 20:13:46 +00:00
Alexander Olk c04a4424d8 2006-07-07 Alexander Olk <[email protected]>
* FileDialog.cs:
	  - Fixed really nasty bug #78771
	  - Don't block the whole GUI when reading directories with a lot of
	    entries. Use an other thread instead and call BeginInvoke to
	    update the ListView in MWFFileView


svn path=/trunk/mcs/; revision=62350
2006-07-07 17:16:52 +00:00
Alexander Olk f7327a0a88 2006-07-02 Alexander Olk <[email protected]>
* FileDialog.cs: Added internal class MWFConfig.
	  Removed Registry support and replaced it with support for the new
	  MWFConfig class. See MWFConfig comments for more information.


svn path=/trunk/mcs/; revision=62182
2006-07-02 11:05:42 +00:00
Peter Dennis Bartok 5380b71976 2006-06-21 Peter Dennis Bartok <[email protected]>
* FileDialog.cs: Fixed taborder to match MS. Fixes #77873 partially.


svn path=/trunk/mcs/; revision=61923
2006-06-21 23:31:49 +00:00
Gonzalo Paniagua Javier 609f139cd8 2006-06-08 Gonzalo Paniagua Javier <[email protected]>
* FileDialog.cs: handle access errors when trying to create a folder
	or changing to a directory. No need to initialize out parameters.


svn path=/trunk/mcs/; revision=61590
2006-06-08 21:30:49 +00:00
Alexander Olk d0c10ab5da * 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  <[email protected]>


svn path=/trunk/mcs/; revision=61587
2006-06-08 20:58:17 +00:00
Alexander Olk 2c6a3aa861 2006-06-08 Alexander Olk <[email protected]>
* 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.


svn path=/trunk/mcs/; revision=61585
2006-06-08 20:38:11 +00:00
Gonzalo Paniagua Javier 44dcdb225e 2006-06-08 Gonzalo Paniagua Javier <[email protected]>
* FileDialog.cs: (SetFileName) don't crash if CurrentRealFolder is null.


svn path=/trunk/mcs/; revision=61584
2006-06-08 20:14:42 +00:00
Alexander Olk cd080f7cbb * FileDialog.cs: When creating a new folder don't crash if the
folder already exists.

2006-06-08  Alexander Olk  <[email protected]>


svn path=/trunk/mcs/; revision=61583
2006-06-08 19:54:24 +00:00
Alexander Olk 8ba103380d * 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  <[email protected]>


svn path=/trunk/mcs/; revision=61580
2006-06-08 19:09:29 +00:00
Gonzalo Paniagua Javier 8e02b1e7ba 2006-06-06 Gonzalo Paniagua Javier <[email protected]>
* 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);


svn path=/trunk/mcs/; revision=61513
2006-06-06 22:40:39 +00:00
Gonzalo Paniagua Javier 97b4e619cb 2006-06-01 Gonzalo Paniagua Javier <[email protected]>
* FileDialog.cs: fix crash when running SharpChess, which sets the
	FilterIndex to 2 with only one Filter.


svn path=/trunk/mcs/; revision=61393
2006-06-01 23:21:10 +00:00
Alexander Olk 3d19862d9d 2006-05-27 Alexander Olk <[email protected]>
* FileDialog.cs: If AddExtension property is true autocomplete the
	  extensions in SaveFileDialog correctly. Fixes bug #78453.
	  Set MyNetwork and MyComputer to "C:\" for windows. This should
	  fix part 8 of bug #78446 for now.


svn path=/trunk/mcs/; revision=61170
2006-05-26 17:29:14 +00:00
Miguel de Icaza bbddd223b7 2006-05-24 Miguel de Icaza <[email protected]>
* Changes so that we can use the filename as the resource name,
	should help compiling from within VisualStudio.


svn path=/trunk/mcs/; revision=61097
2006-05-25 00:03:32 +00:00
Miguel de Icaza c5d40bc603 2006-05-23 Miguel de Icaza <[email protected]>
* Theme.cs (GetSizedResourceImage): Scale images if the proper
	size is not found.  
	
	* FileDialog.cs: Do not change the background for the side bar as
	it wont work nicely with the theme, and also reduces the artifacts
	in rendering the icons (which I want to fix too).

	* MimeIcon.cs (ResourceImageLoader): Load images from assembly
	resources, not resgen resources. 

	(PlatformDefaultHandler): Pull images using the new API.


2006-05-23  Miguel de Icaza  <[email protected]>

	* resources/: Add Tango icons in various sizes.



svn path=/trunk/mcs/; revision=61010
2006-05-23 17:30:13 +00:00
Alexander Olk bdccc0fef2 2006-05-22 Alexander Olk <[email protected]>
* FileDialog.cs: Update the filename combobox when navigating through
	  the ListView with the cursor keys. Fixes part 7 of bug #78446.


svn path=/trunk/mcs/; revision=60963
2006-05-22 19:44:32 +00:00
Alexander Olk 8e22b89ae1 2006-05-19 Alexander Olk <[email protected]>
* FileDialog.cs: Added focus handling for PopupButtonPanel.
	  Fixes part 1 and 2 of bug #78446

	* XplatUIX11.cs (SetWindowPos): Recalculate claient area size on resizes

svn path=/trunk/mcs/; revision=60872
2006-05-19 17:23:04 +00:00
Miguel de Icaza a31fef4f09 2006-05-18 Miguel de Icaza <[email protected]>
* ListView.cs: ArgumentOutOfRangeException, single versions of the
	exception should throw the name of the invalid argument.

	* FileDialog.cs (OnClickOpenSaveButton): Avoid crash in open if
	there are no files listed. 


svn path=/trunk/mcs/; revision=60854
2006-05-19 01:24:28 +00:00