[meld: 61/63] filediff: Handle buffer handler reconnection for blank file cases



commit 062c72aa4993c87c6c63085df77f77744f198f0f
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Thu Dec 10 07:07:55 2015 +1000

    filediff: Handle buffer handler reconnection for blank file cases
    
    Normally, the file-loaded callbacks will take care of signal connection
    and sensitivity setting, but in the case where we're creating a blank
    comparison (or any other cases where we're not actually loading files)
    the file load code that triggers the comparison never gets hit.

 meld/filediff.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/meld/filediff.py b/meld/filediff.py
index 658e427..0b5a57e 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -1054,6 +1054,9 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
         files = [(pane, Gio.File.new_for_path(filename))
                  for pane, filename in enumerate(files) if filename]
 
+        if not files:
+            self.scheduler.add_task(self._compare_files_internal())
+
         for pane, gfile in files:
             self.fileentry[pane].set_file(gfile)
             self.msgarea_mgr[pane].clear()


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