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:
authoriain holmes <iain@xamarin.com>2015-07-30 17:19:29 +0300
committeriain holmes <iain@xamarin.com>2015-07-30 17:19:29 +0300
commit92f6bf3b1e71af095409484ee69dea64e461c4ee (patch)
tree8500717b08f305756bf1a7c19cc42bcc68b1a595 /main/src/core/MonoDevelop.Ide
parentb130f4b519fe8f27a1c68a783c79c68d1cc57a2e (diff)
[IDE] Handle DeleteEvent in AddExternalFileDialog
GtkDialog emits a DeleteEvent response rather than a Cancel response when Escape is pressed
Diffstat (limited to 'main/src/core/MonoDevelop.Ide')
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ProjectOperations.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ProjectOperations.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ProjectOperations.cs
index 7956e16a54..dff2ba3017 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ProjectOperations.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ProjectOperations.cs
@@ -1798,7 +1798,9 @@ namespace MonoDevelop.Ide
try {
if (!dialogShown || !applyToAll) {
- if (MessageService.RunCustomDialog (addExternalDialog) == (int) Gtk.ResponseType.Cancel) {
+ int response = MessageService.RunCustomDialog (addExternalDialog);
+ // A dialog emits DeleteEvent rather than Cancel in response to Escape being pressed
+ if (response == (int) Gtk.ResponseType.Cancel || response == (int) Gtk.ResponseType.DeleteEvent) {
project.Files.AddRange (newFileList.Where (f => f != null));
return newFileList;
}