After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 416387 - Compare differently-named files across directories
Compare differently-named files across directories
Status: RESOLVED OBSOLETE
Product: meld
Classification: Other
Component: dirdiff
git master
Other Linux
: Normal major
: ---
Assigned To: meld-maint
meld-maint
: 706695 749244 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-03-09 10:20 UTC by Joachim Noreiko
Modified: 2017-12-13 18:48 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Joachim Noreiko 2007-03-09 10:20:30 UTC
I open a directory comparison.
There's a 'compare' button in the toolbar, so I assume I can compare files that I suspect may be similar but have different filenames:

Dir A       Dir B
foo.txt     foo2.txt

But I can't select them both at the same time. Selecting in one pane loses the selection in the other.
Comment 1 Jack Tanner 2007-06-21 18:50:44 UTC
I can confirm this bug in 1.1.4.

The use case that is accommodated today is this:
- Open directory comparison.
- Select a file in either panel, and click Compare in the toolbar,
Meld automatically opens a comparison of that file with a file that has the same name from the other panel.

First bug: there's no visual indicator that the comparison will involve a file that has the same name from the other panel.

The desired use case is this:
- Open a directory comparison.
- Select one file in one panel, and another file in another panel. While selecting a file in the second panel, the first panel's selection should remain indicated. 
- Click Compare.
This desired use case is a second bug (RFE).
Comment 2 Vincent Legoll 2009-02-19 15:18:36 UTC
I wanted to work on "first bug", i.e. selecting the same rows in the two panes, but I couldn't find what to do in dirdiff.py to achieve that simple thing.

Could someone more accustomed with the way this thing works give a hint on what to do ?

Maybe that will hint me enough to do the other RFE part of that bug...
Comment 3 Stephen Kennedy 2009-02-19 21:58:21 UTC
Hi Vincent,

For the first part you need to modify the treeview selection. That is, self.treeview[x].get_selection(). Here's some sample code to select lines of pane 0 when another pane is selected. Note that you'll have to manage the unselect too.

Probably, you'll need to modify the selection colour of the non-focused panes so it's obvious which pane is the active one.

--- dirdiff.py	(revision 1158)
+++ dirdiff.py	(working copy)
@@ -587,6 +587,8 @@
         if pane == None: return
         paths = self._get_selected_paths(pane)
         if len(paths) > 0:
+            for p in paths:
+                self.treeview[0].get_selection().select_path( p)
             def rwx(mode):
                 return "".join( [ ((mode& (1<<i)) and "xwr"[i%3] or "-") for i in range(8,-1,-1) ] )
             def nice(deltat):
Comment 4 Kai Willadsen 2015-05-30 05:49:24 UTC
*** Bug 749244 has been marked as a duplicate of this bug. ***
Comment 5 Kai Willadsen 2015-05-30 05:49:39 UTC
*** Bug 706695 has been marked as a duplicate of this bug. ***
Comment 6 Kai Willadsen 2015-05-30 05:52:09 UTC
I haven't looked at this, but I think it's trickier than I'd like. We go to some effort to maintain a single selection across the trees, and I suspect that there's more than a bit of dirdiff code that assumes that this is the case.

Also, see bug 706695 for a secondary interface (drag and drop) to support at the same time.
Comment 7 GNOME Infrastructure Team 2017-12-13 18:48:24 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/meld/issues/11.