[meld] Fix use of save-as combined with output file or merge mode (bgo#699066)



commit 9b661f718d49fa073ba18925d41ddfd2f1d98afa
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sun Apr 28 16:01:54 2013 +1000

    Fix use of save-as combined with output file or merge mode (bgo#699066)

 meld/filediff.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/meld/filediff.py b/meld/filediff.py
index 83ea501..de3697e 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -1515,11 +1515,13 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
     def save_file(self, pane, saveas=0):
         buf = self.textbuffer[pane]
         bufdata = buf.data
-        if saveas or not bufdata.filename or not bufdata.writable:
+        if saveas or not (bufdata.filename or bufdata.savefile) \
+                or not bufdata.writable:
             prompt = _("Choose a name for buffer %i.") % (pane + 1)
             filename = self._get_filename_for_saving(prompt)
             if filename:
                 bufdata.filename = bufdata.label = os.path.abspath(filename)
+                bufdata.savefile = None
                 self.fileentry[pane].set_filename(bufdata.filename)
                 self.fileentry[pane].prepend_history(bufdata.filename)
             else:


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