[meld: 34/63] filediff: Add hack to work around double setting of filechooser paths



commit d01bd6a4811170c9b7f7fe0a351735e5d4106c62
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Wed Aug 12 08:59:05 2015 +1000

    filediff: Add hack to work around double setting of filechooser paths
    
    This causes a crash on at least some versions of GKT+, but we kind of
    need it (for now at least) to handle --output setting. We should be
    able to work around this better, but for now this hack will do the
    job.
    
    Also, this bug has already been fixed in GTK+, but only in 3.18 so
    it's well above what we're going to require for this release of Meld.

 meld/filediff.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/meld/filediff.py b/meld/filediff.py
index 5b6ed0e..5dbd0d1 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -976,7 +976,11 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
         buf.data.savefile = os.path.abspath(filename)
         buf.data.label = filename
         self.update_buffer_writable(buf)
-        self.fileentry[1].set_filename(buf.data.savefile)
+
+        # FIXME: Hack around bgo#737804; remove after GTK+ 3.18 is required
+        def set_merge_file_entry():
+            self.fileentry[1].set_filename(buf.data.savefile)
+        self.scheduler.add_task(set_merge_file_entry)
         self.recompute_label()
 
     def _set_save_action_sensitivity(self):


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