[meld] Fix behavior when "Save modified files?" window is closed



commit b7d28c37d626a130b3aa45f4bf3e767ac0e91c4b
Author: Peter Tyser <ptyser gmail com>
Date:   Thu Apr 22 01:17:05 2010 -0500

    Fix behavior when "Save modified files?" window is closed
    
    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 <ptyser gmail com>

 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
 
         #



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]