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 698694 - Error dialog asks [ Cancel ] or [ Skip ] but there is only one operation
Error dialog asks [ Cancel ] or [ Skip ] but there is only one operation
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: File and Folder Operations
3.8.x
Other All
: Normal minor
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-04-23 19:15 UTC by António Fernandes
Modified: 2013-09-01 00:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix for nautilus-file-operations.c to remove redundant options (9.22 KB, patch)
2013-07-17 18:03 UTC, William Kunkel
reviewed Details | Review
Proposed Patch #2 with function wrapper (20.80 KB, patch)
2013-07-17 20:59 UTC, William Kunkel
none Details | Review
Merged the last 2 patches (6.79 KB, patch)
2013-07-17 21:31 UTC, William Kunkel
committed Details | Review

Description António Fernandes 2013-04-23 19:15:13 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 ]
|___________________________________________________________________________
Comment 1 William Kunkel 2013-06-28 19:39:58 UTC
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?
Comment 2 António Fernandes 2013-06-28 20:11:21 UTC
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?
Comment 3 William Kunkel 2013-07-17 18:03:03 UTC
Created attachment 249427 [details] [review]
Fix for nautilus-file-operations.c to remove redundant options
Comment 4 Cosimo Cecchi 2013-07-17 20:09:18 UTC
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?
Comment 5 William Kunkel 2013-07-17 20:22:35 UTC
Sure, I can do that. I wasn't sure if the function would be more trouble than it was worth.
Comment 6 William Kunkel 2013-07-17 20:59:17 UTC
Created attachment 249446 [details] [review]
Proposed Patch #2 with function wrapper
Comment 7 William Kunkel 2013-07-17 21:09:14 UTC
Apparently writing "Patch #Something" makes Bugzilla link to it automatically. Sorry if that comment was confusing.
Comment 8 Cosimo Cecchi 2013-07-17 21:10:53 UTC
Can you please squash the two patches together?
Comment 9 William Kunkel 2013-07-17 21:18:46 UTC
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.
Comment 10 Cosimo Cecchi 2013-07-17 21:23:32 UTC
(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
Comment 11 William Kunkel 2013-07-17 21:31:27 UTC
Created attachment 249448 [details] [review]
Merged the last 2 patches
Comment 12 Cosimo Cecchi 2013-07-17 21:33:39 UTC
Review of attachment 249448 [details] [review]:

Looks good, thanks!