[meld] dirdiff: Set the current folder for all file choosers (#475)



commit a0cd955f3c0b2ba8e76f1cb58dfc26efe3ff297a
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sat Jan 8 11:54:13 2022 +1000

    dirdiff: Set the current folder for all file choosers (#475)
    
    This change sets the current folder for each chooser to the currently
    displayed folder for the corresponding pane. This should mean that if
    the user wants to change folders in the comparison, the chooser should
    start at where ever is currently being compared.

 meld/dirdiff.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/meld/dirdiff.py b/meld/dirdiff.py
index 9837658d..971501d1 100644
--- a/meld/dirdiff.py
+++ b/meld/dirdiff.py
@@ -369,6 +369,9 @@ class DirDiff(Gtk.VBox, tree.TreeviewCommon, MeldDoc):
     folder_label0 = Gtk.Template.Child()
     folder_label1 = Gtk.Template.Child()
     folder_label2 = Gtk.Template.Child()
+    folder_open_button0 = Gtk.Template.Child()
+    folder_open_button1 = Gtk.Template.Child()
+    folder_open_button2 = Gtk.Template.Child()
     treeview0 = Gtk.Template.Child()
     treeview1 = Gtk.Template.Child()
     treeview2 = Gtk.Template.Child()
@@ -502,7 +505,7 @@ class DirDiff(Gtk.VBox, tree.TreeviewCommon, MeldDoc):
             [
                 "treeview", "folder_label", "scrolledwindow", "chunkmap",
                 "linkmap", "msgarea_mgr", "vbox", "dummy_toolbar_linkmap",
-                "pane_actionbar",
+                "pane_actionbar", "folder_open_button",
             ],
         )
 
@@ -752,6 +755,7 @@ class DirDiff(Gtk.VBox, tree.TreeviewCommon, MeldDoc):
         for pane, folder in enumerate(self.folders):
             self.folder_label[pane].set_file(folder)
             self.folder_label[pane].set_parent_file(parent_path)
+            self.folder_open_button[pane].props.file = folder
 
         # This is difficult to trigger, and to test. Most of the time here we
         # will actually have had UTF-8 from GTK, which has been unicode-ed by


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