[meld] filediff: Apply custom labels to new pathlabel widgets (#662)



commit a0e7a6a72cbf3c0835250e2f44d8b130c9dbd680
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sun Apr 10 11:00:09 2022 +1000

    filediff: Apply custom labels to new pathlabel widgets (#662)
    
    This is a behaviour change from where we used to apply labels, in so far
    as we used to have labels in the title bar and the tab label, and now
    have them in the (sometimes hidden) tab label and the per-pane file
    label. Arguably the per-pane location is much closer to the original
    intention of the --label argument, but either way we need to have some
    use of the provided labels in the relatively normal situation where a
    single pane comparison has been opened from e.g., a VC difftool launch.

 meld/filediff.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/meld/filediff.py b/meld/filediff.py
index b167449c..92101429 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -1474,9 +1474,10 @@ class FileDiff(Gtk.VBox, MeldDoc):
 
     def set_labels(self, labels):
         labels = labels[:self.num_panes]
-        for label, buf in zip(labels, self.textbuffer):
+        for label, buf, flabel in zip(labels, self.textbuffer, self.filelabel):
             if label:
                 buf.data.label = label
+                flabel.props.custom_label = label
 
     def set_merge_output_file(self, gfile):
         if self.num_panes < 2:


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