GNOME Bugzilla – Bug 342701
New dialogue could combine file and folder comparisons
Last modified: 2013-03-29 04:12:04 UTC
Please describe the problem: file, new, file comparison or history comparison: the spaces for file or directory name have arrows for drop-down lists that are presumably for a history of recent uses. I have Meld 1.1.3 under Fedora Core 5, completely updated, and it doesn't seem to remember anything. Steps to reproduce: 1. Happens every time. I use Meld to diff a directory structure - it's a wonderful tool - close it, and reopen it, and there's no memory of what I just did. Actual results: Dropdown list is empty Expected results: Dropdown list should include some number of recently used entries in the field Does this happen every time? yes Other information: I'm glad I found Meld, and this is a minor inconvenience. But being so visible each time I use it, it has a high awareness factor. A possible simplification - you could consolidate "file comparison" and "directory comparison" into one tab, just figure out if both filenames refer to directories or to comparable files and complain if they're incompatible references. I know that you have such a check already, because in the "file comparison" context you won't allow selecting a directory as the final result, and in the "directory" context you won't allow selecting a non- directory.
The history code uses the gnome libs to do the work, so I'm not sure what is actually wrong. It doesn't work all the time for me either. Re file/dir comparison - we really need to know which kind of item we are browsing for. This is built into the file chooser, not the application.
Am looking at this code at the moment. Its not saving here either (Ubuntu). The directories or files need to be saved when "Ok is pressed" - like Winmerge. Can these be saved to a local file ? in User's path maybe ? Also being to save preferences would be good to... al in ONe XML file I can take with me ;-)
BTW you can copy your prefs with: gconftool-2 --dump /apps/meld gconftool-2 --load
More Cmment Harrian said: >>A possible simplification - you could consolidate "file comparison" and "directory comparison" into one tab, just figure out if both filenames refer to directories or to comparable files and complain if they're incompatible references. << Sorry to compare it to Winmerge, but thats the way it works in Winmerge. Also the two drop down tabs only "save" the options you selected when OK is clicked In the case of Meld, this "history" of original/mine needs to appear in the main window.file selector dropdowns and the file/dir dialogs? Can figure out exactly where these widgets are created! is there an irc.gnome.org#meld channel ?
The gui is mostly created in glade. See meldap.py:NewDocDialog and filediff.py:FileDiff, dirdiff.py:DirDiff. They all use gnomeglade.py:Component to do the actual widget construction. I'm using the gnome libs entry for the dropdown boxes. It could be something as simple as missing a call to some save_history method. Though it did work when originally coded. There's no irc channel as I don't use irc, but there is a mailing list which is good for discussions like these as more people get to see them.
Created attachment 72589 [details] PNG of the interface Its a bit rough and ready but I hope conveys the intention of a new combmined dialog.
Created attachment 72590 [details] diffchooser.py - class for a new Open dialog Here's the python class that makes the patch work. This can be run standalone as a script to. Am learning pygtk/python etc (near end first month) so this script it well dodgy but I hopes it gives an idea of the intentions. The "history" (as a workaround) is saved to a histoty.ini file in script dir. The flag self.history_enabled = True int he constructor enables. This also requires the configobj script from voidspace - http://www.voidspace.org.uk/python/configobj.html To use this in Meld just change the call to NewDocDialog() eg def on_menu_file_new_activate(self, menuitem): #NewDocDialog(self, NewDocDialog.TYPE.DIFF2) import diffchooser foo = diffchooser.DiffChooser(self)
Created attachment 72591 [details] diff_chooser.glade file Glade file for above class
Created attachment 72592 [details] [review] README.CVS.patch Added checkout details to README.cvs
Created attachment 72593 [details] configobj.py - uploaded from voidspace This class is required to make the .ini history work.. There are other techniques, probably in Gnome irslef. But am a beginner atmo :-(
(In reply to comment #6) > Created an attachment (id=72589) [edit] > PNG of the interface > That dialog's a bit of a monster! Including the file selector makes it look extremely cluttered, and thinking about it logically, it only saves you *one* mouse click compared to having three "Browse..." buttons that open the selector (because you have to click on two tabs, instead of three "Browse..." buttons). Also, having a radio button to choose between File and Directory comparison doesn't address the problem of the current tabbed New dialog -- you still have to choose a menu item, then choose again to actually get to what you want (and a radio button is a smaller target to click than the current tabs). What I suggest in Bug 349926, two separate menu items, would be more streamlined. (Combining the two dialogs is a good idea in principle, but I think there are problems with using the regular file selector to select folders.) (BTW, one thing I found that makes it much easier to use is that you can drag a file or folder from Nautilus into the field in the dialog.) I also think the "3-way" checkbox is redundant -- if you specify a third file, then it's a 3-way. And if you don't, it's not.
The main goal of in interface was to combine the file and dir selection. The number of times I've selected files then realised it was a directory I required is what motivated me to either fix it or abandon Meld altogether. Am using it locally as we speak and it makes the user experience much nicer (even though am biased). Have you tried it ? The only problem I have and that's my newbie status as a pygtk progranner is the ability to combine the entry box's and the dropdown's which is why they are seperate and makes it "look" more of a monster. Also Meld does not "store" the recent history either which is very very frustrating. >> Including the file selector makes it look extremely cluttered << It may look cluttered but its very functional. ;-) Dont like the idea of bug 349926 at all unless there is an option to switch between file/dir after the dialog is opened, which is why I included the radio buttons. The file/dir radio button switches the file selector between SELECT_DIR and SELECT_FILE mode. This file selector cannot be switched once its open. In fact the radio/dir radios can be done away with altogether because when an item is "selected" it checks that both entries are os.path.isfile() or .isdir() and if they are not the same type, it disables the "OK" button. As for 3 way. I agree its redundant. And the Swap button - thats a personal thing.
I don't use the file or directory comparison, so I don't really understand the use case of starting one thing then switching to another. What does the Swap button do?
(In reply to comment #13) > I don't use the file or directory comparison, so I don't really understand the > use case of starting one thing then switching to another. Curious - what are you using Meld for if you don't use either file or directory comparson? One use case is knowing that there's a particular file pair you want to compare, then realizing that you need to elminate the filename and just compare the whole directories. Another is forgetting to select the right tab and just typing into the field without thinking. User error, yes, but if the program can tell whether both files exist and give you an error if either or both is missing, it can tell whether they're both the same type (text or directory) and do the appropriate thing with them.
(In reply to comment #13) > I don't use the file or directory comparison, so I don't really understand the > use case of starting one thing then switching to another. < In the current interface, the problem is that if one is wanting to compare directories for example, and while navigating to the locations decide to compare files; one cannot switch. One has to "re navigate" in another tab. > What does the Swap button do? > It swaps the paths in the original/mine "files/paths"
> One use case is knowing that there's a particular file pair you want to > compare, then realizing that you need to elminate the filename and just compare > the whole directories. > > Another is forgetting to select the right tab and just typing into the field > without thinking. User error, yes, but if the program can tell whether both > files exist and give you an error if either or both is missing, it can tell > whether they're both the same type (text or directory) and do the appropriate > thing with them. > Thats what the current "selection" intergace does not do, the patch has code for chscking isdir() and isfile()
(In reply to comment #14) > Curious - what are you using Meld for if you don't use either file or directory > comparson? I used meld to update my gnome source from CVS, get diffs from CVS, and make commits. I've once or twice used it to compare files, but rarely. > One use case is knowing that there's a particular file pair you want to > compare, then realizing that you need to elminate the filename and just compare > the whole directories. > > Another is forgetting to select the right tab and just typing into the field > without thinking. User error, yes, but if the program can tell whether both > files exist and give you an error if either or both is missing, it can tell > whether they're both the same type (text or directory) and do the appropriate > thing with them. So basically, the first use case is that you change your mind. (How is this not like me saying GIMP should have a menu item "Oops, I meant to do vector graphics, please launch Inkscape for me"?) The second is the existing problematic interface. Here's what I suggest: * if you've tried to open files in the folder comparison dialog, the error dialog should offer to compare the files (and vice-versa) * If you're comparing files, there should be an easy way to start a new comparison the respective folders of the files (in the context menu, perhaps?)
Guess that this thread has split into two topics. 1) History is absent in the dropdowns 2) Combined file/directory compare dialog
History related issues should go into Bug 316446 - History not saved
This isn't really possible until GtkFileChooser has a mode for combined selection of files and folders. Retitling and adding dependency on bug 136294.
Marking this as a dup of 518179, just because there's more discussion of the UI there. We still can't combine the file and folder selectors, which I think is a pre-requisite for a re-redesign. *** This bug has been marked as a duplicate of bug 518179 ***