GNOME Bugzilla – Bug 698694
Error dialog asks [ Cancel ] or [ Skip ] but there is only one operation
Last modified: 2013-09-01 00:46:14 UTC
+++ This bug was initially created as a clone of Bug #308437 +++ The reporter of bug 308437 pointed out that asking for the user to choose between [ Cancel ] or [ Skip ] when there is only one ongoing operation is a bit sily, because both choices lead to the same result and there is nothing left to skip to. Example: Trying to copy a single symbolic link into a samba share, this dialog pops up: ___________________________________________________________________________ | . | / \ Error while copying “foo”. | / ! \ | /_____\ There was an error copying the file into smb://bar/users/Public. | | v Show more details | | Symlinks not supported by backend | | [ Cancel ] [ Skip ] |___________________________________________________________________________
What is the intended meaning of "Cancel" in this context? When copying multiple files, the option "Skip All" is also given, and it seems to do the same thing as "Cancel" there. Is "Cancel" a necessary option here?
I believe [ Skip All ] means all errors, not all files. With [ Skip All ], files which can be copied without error will be copied. With [ Cancel ], no other file will be copied. The only situation where [ Skip All ] and [ Cancel ] do the same thing is when every singe one of the selected files cannot be copied. But we cannot know about that before trying, or can we?
Created attachment 249427 [details] [review] Fix for nautilus-file-operations.c to remove redundant options
Review of attachment 249427 [details] [review]: William, thanks for the patch, this sounds generally like a good idea. Can you refactor that code block into a function (e.g. run_cancel_or_skip_warning()) that takes source_info and calls run_warning with the appropriate values, instead of repeating the two if branches in all places?
Sure, I can do that. I wasn't sure if the function would be more trouble than it was worth.
Created attachment 249446 [details] [review] Proposed Patch #2 with function wrapper
Apparently writing "Patch #Something" makes Bugzilla link to it automatically. Sorry if that comment was confusing.
Can you please squash the two patches together?
I thought I did that with the second patch. The command I used was "git format-patch -M --stdout master > redundant-options-fix.patch". I don't have a ton of experience with git, so I apologize if I'm making obvious mistakes.
(In reply to comment #9) > I thought I did that with the second patch. The command I used was "git > format-patch -M --stdout master > redundant-options-fix.patch". I don't have a > ton of experience with git, so I apologize if I'm making obvious mistakes. No, that keeps the two patches separate, just concatenating them in a single file. You will have to rebase to the branching point with git rebase -i and use the squash or fixup options on the second commit to actually merge them together. See http://stackoverflow.com/questions/5189560/how-can-i-squash-my-last-x-commits-together-using-git
Created attachment 249448 [details] [review] Merged the last 2 patches
Review of attachment 249448 [details] [review]: Looks good, thanks!