Meld Complete Folder/File Path Without Custom Widgets - Capable of Drag/Drop
These are my changes to Meld 3.20.4. It solves the issue reported as BZ#746616 (closed issue #84 (closed)).
As Kai has mentioned in response to that issue, GTK file chooser widget is the problem.
To solve the issue (mainly for my own usage), I had 3 choices: a) subclass file chooser b) write a wrapper for GTK file chooser c) leave it as it is and just anchor off it. I chose option (c), since it did not require any deletion or changes to Meld 3.20.4, only addition of some 200 lines. It only uses plain GTKEntry and GTKToolButton.
How it works: 1- The visible attribute of GtkFileChooser is set to false in dirdiff.ui and filediff.ui 2- Added a GTKEntry and GTKToolButton to dirdiff.ui and filediff.ui for each pane 3- In dirdiff.py and file diff.py code has been added to get/set information from/to the hidden GTKFileChooser and display in the GTKEntry or show the complete path there. 4- The GTKEntries are all accept files and folders, but when comparing folders, if the user drops a file, it will show an error message box. Same for filediff, if the user tries to drop a folder. 5- The text in the GTKEntry is selectable and can be copied, but can not be edited. 6- There is a Browse Button on each pane for the user to navigate using the default system file manager and choose a selection. 7- The functionality is pretty much the same as Meld 1.xx, except for the compare history. 8- misc.py has two additions: a) prevention of editing GTKEntry since it is common task for dirdiff and filediff b) a generic message boxmeld-3.20.4-with-my-changes.tar.bz2