GNOME Bugzilla – Bug 594495
annoying dialog
Last modified: 2010-07-12 13:21:37 UTC
When I click on a location in network:// that has been shared via gnome-user-share and protected with a password, I get a password dialog. Which is good. But if I cancel that password dialog (e.g. because I don't know the password), I get an annoying error dialog that says: Unable to mount location HTML Error: Cancelled There is no reason to tell me that it was cancelled, I just pressed the cancel button myself...
Created attachment 145253 [details] [review] Do not display error dialog when cancelling the password dialog when mounting shares
The last patch will not work as we do not have something called G_IO_ERROR_USER_CANCELLED (yet). But once we do this will prevent the error dialog from appearing. Also note that we need to patch the gvfs backends to use the new code as well. Alex; Company will talk to you about this.
I don't see why G_IO_ERROR_CANCELLED can not be reported by a user requestion. In fact, almost all current uses of G_IO_ERROR_CANCELLED is from a user cancelling something. Why would you need a separate code for this?
*** Bug 594798 has been marked as a duplicate of this bug. ***
G_IO_ERROR_CANCELLED is a special operation that happens only if a cancellable is attached to an operation and that cancellable has been cancelled. It seems to me that just returning CANCELLED in other cases is a bad idea, my code probably relies on that behavior (though not in this exact case). I made gvfs return G_IO_ERROR_FAILED_HANDLED for these cases in http://git.gnome.org/cgit/gvfs/commit/?id=bcc92d779f6e5d1d2bd960ff20d8b4c944cebe91 (the fix is in 1.4.1, too) so it's an error that applications can check for. Alex said on IRC that he wanted to use a new error code for explicit user cancellation, so I'm keeping this bug open.
Didn't this get fixed in [1], bug #601096 ? [1] http://git.gnome.org/browse/nautilus/commit/?id=ae1e7474830fb98eea93e1f4aadbf6e2b6caefc2
Looks like it, yes.