diff options
author | Marius Ungureanu <marius.ungureanu@xamarin.com> | 2015-11-23 16:00:13 +0300 |
---|---|---|
committer | Marius Ungureanu <marius.ungureanu@xamarin.com> | 2015-11-23 16:00:13 +0300 |
commit | 66e120374d0272f5c441be2f0cb09318c4033987 (patch) | |
tree | ed59b80c81484e47d3fd08eeda84af779939535f /main/src/addins/WindowsPlatform | |
parent | c875b97a0fffb9596c3709e61796b812296c8ad6 (diff) |
Revert "[core] Allow SelectFileDialog to select files & directories at the same time"
This reverts commit 70e242e33db5d64d51ce6b15ab460b9dc8107cb3.
Diffstat (limited to 'main/src/addins/WindowsPlatform')
3 files changed, 7 insertions, 7 deletions
diff --git a/main/src/addins/WindowsPlatform/WindowsPlatform/Dialogs/CommonFileDialogExtensions.cs b/main/src/addins/WindowsPlatform/WindowsPlatform/Dialogs/CommonFileDialogExtensions.cs index c12413887f..75f333740b 100644 --- a/main/src/addins/WindowsPlatform/WindowsPlatform/Dialogs/CommonFileDialogExtensions.cs +++ b/main/src/addins/WindowsPlatform/WindowsPlatform/Dialogs/CommonFileDialogExtensions.cs @@ -55,7 +55,7 @@ namespace MonoDevelop.Platform var fileDialog = dialog as CommonOpenFileDialog;
if (fileDialog != null) {
fileDialog.Multiselect = data.SelectMultiple;
- if (data.Action == SelectFileDialogAction.SelectFolder) {
+ if (data.Action == FileChooserAction.SelectFolder) {
fileDialog.IsFolderPicker = true;
return;
}
@@ -86,7 +86,7 @@ namespace MonoDevelop.Platform return;
// FileDialog doesn't show the file extension when saving a file,
// so we try to look for the precise filter if none was specified.
- if (!string.IsNullOrEmpty (data.InitialFileName) && data.Action == SelectFileDialogAction.Save && defExt == "*") {
+ if (!string.IsNullOrEmpty (data.InitialFileName) && data.Action == FileChooserAction.Save && defExt == "*") {
string ext = Path.GetExtension (data.InitialFileName);
if (!string.IsNullOrEmpty (ext)) {
var pattern = "*" + ext;
diff --git a/main/src/addins/WindowsPlatform/WindowsPlatform/Dialogs/OpenFileDialogHandler.cs b/main/src/addins/WindowsPlatform/WindowsPlatform/Dialogs/OpenFileDialogHandler.cs index c0a1619d9f..5e498b6ddd 100644 --- a/main/src/addins/WindowsPlatform/WindowsPlatform/Dialogs/OpenFileDialogHandler.cs +++ b/main/src/addins/WindowsPlatform/WindowsPlatform/Dialogs/OpenFileDialogHandler.cs @@ -52,7 +52,7 @@ namespace MonoDevelop.Platform {
var parent = data.TransientFor ?? MessageService.RootWindow;
CommonFileDialog dialog;
- if (data.Action == SelectFileDialogAction.Open) {
+ if (data.Action == FileChooserAction.Open) {
dialog = new CustomCommonOpenFileDialog {
EnsureFileExists = true
};
@@ -66,7 +66,7 @@ namespace MonoDevelop.Platform var group = new CommonFileDialogGroupBox ("encoding", "Encoding:");
encodingCombo = new CustomCommonFileDialogComboBox ();
- BuildEncodingsCombo (encodingCombo, data.Action != SelectFileDialogAction.Save, data.Encoding);
+ BuildEncodingsCombo (encodingCombo, data.Action != FileChooserAction.Save, data.Encoding);
group.Items.Add (encodingCombo);
dialog.Controls.Add (group);
@@ -78,7 +78,7 @@ namespace MonoDevelop.Platform SizeToContent = SizeToContent.WidthAndHeight
};
if (dlg.ShowDialog ().Value) {
- BuildEncodingsCombo (encodingCombo, data.Action != SelectFileDialogAction.Save, data.Encoding);
+ BuildEncodingsCombo (encodingCombo, data.Action != FileChooserAction.Save, data.Encoding);
dialog.ApplyControlPropertyChange ("Items", encodingCombo);
}
}
@@ -87,7 +87,7 @@ namespace MonoDevelop.Platform CustomCommonFileDialogComboBox viewerCombo = null;
CommonFileDialogCheckBox closeSolution = null;
- if (data.ShowViewerSelector && data.Action == SelectFileDialogAction.Open) {
+ if (data.ShowViewerSelector && data.Action == FileChooserAction.Open) {
var group = new CommonFileDialogGroupBox ("openWith", "Open with:");
viewerCombo = new CustomCommonFileDialogComboBox {
diff --git a/main/src/addins/WindowsPlatform/WindowsPlatform/Dialogs/SelectFileDialogHandler.cs b/main/src/addins/WindowsPlatform/WindowsPlatform/Dialogs/SelectFileDialogHandler.cs index bcd6b36049..ec5123aded 100644 --- a/main/src/addins/WindowsPlatform/WindowsPlatform/Dialogs/SelectFileDialogHandler.cs +++ b/main/src/addins/WindowsPlatform/WindowsPlatform/Dialogs/SelectFileDialogHandler.cs @@ -44,7 +44,7 @@ namespace MonoDevelop.Platform var parent = data.TransientFor ?? MessageService.RootWindow;
CommonFileDialog dialog;
- if ((data.Action & (SelectFileDialogAction.Open | SelectFileDialogAction.SelectFolder)) != 0)
+ if (data.Action == FileChooserAction.Open || data.Action == FileChooserAction.SelectFolder)
dialog = new CustomCommonOpenFileDialog ();
else
dialog = new CommonSaveFileDialog ();
|