After modifying a file, not saving the changes, and attempting to close
the file or quit meld, a user is presented with a "Save modified
files?" dialog window.  Previously, pressing the escape key at this window
or closing the window would result in the modified file being closed and
the modifications lost.  This is at odds with most other applications
which assume when a user presses the escape key or closes the dialog
window they only want to close the dialog window, not discard their
modifications.  This change makes meld behave similar to other
applications.

Signed-off-by: Peter Tyser <[email protected]>
---
 meld/filediff.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/meld/filediff.py b/meld/filediff.py
index e033776..246e054 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -513,6 +513,8 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
                     if try_save[i]:
                         if self.save_file(i) != melddoc.RESULT_OK:
                             return gtk.RESPONSE_CANCEL
+            elif response == gtk.RESPONSE_DELETE_EVENT:
+                response = gtk.RESPONSE_CANCEL
         return response
 
         #
-- 
1.6.2-rc2.GIT

_______________________________________________
meld-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/meld-list

Reply via email to