Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Alberto Cortez <calberto.cortez@gmail.com>2011-08-05 02:28:48 +0400
committerCarlos Alberto Cortez <calberto.cortez@gmail.com>2011-08-15 10:05:11 +0400
commitd7de2599ffb7f61c522282aa2bceddf903ed9e46 (patch)
tree97639a964db78e6021b970cdf1c65d4a9e77ccfd /main/src/addins/WindowsPlatform
parent9f515c3b321f2d8c22806e2c73a1371622c7d52e (diff)
[Windows] Disable the viewer box when trying to open a directory.
Diffstat (limited to 'main/src/addins/WindowsPlatform')
-rw-r--r--main/src/addins/WindowsPlatform/Dialogs/CustomOpenFileDialog.cs7
1 files changed, 2 insertions, 5 deletions
diff --git a/main/src/addins/WindowsPlatform/Dialogs/CustomOpenFileDialog.cs b/main/src/addins/WindowsPlatform/Dialogs/CustomOpenFileDialog.cs
index 24902bad3d..3c2a8a9541 100644
--- a/main/src/addins/WindowsPlatform/Dialogs/CustomOpenFileDialog.cs
+++ b/main/src/addins/WindowsPlatform/Dialogs/CustomOpenFileDialog.cs
@@ -175,7 +175,7 @@ namespace MonoDevelop.Platform
if (closeSolutionBox != null)
closeSolutionBox.Enabled = slnViewerSelected;
}
-
+
if (encodingBox != null)
encodingBox.Enabled = !slnViewerSelected;
}
@@ -186,14 +186,11 @@ namespace MonoDevelop.Platform
currentViewers.Clear ();
viewerBox.Items.Clear ();
- if (fileName == null || fileName.Length == 0) {
+ if (String.IsNullOrEmpty (fileName) || Directory.Exists (fileName)) {
viewerBox.Enabled = false;
return;
}
- if (Directory.Exists (fileName))
- return;
-
var projectService = IdeApp.Services.ProjectService;
if (projectService.IsWorkspaceItemFile (fileName) || projectService.IsSolutionItemFile (fileName)) {
viewerBox.Items.Add (GettextCatalog.GetString ("Solution Workbench"));