Am Mittwoch, den 19.10.2005, 14:50 +0200 schrieb Alexander Larsson:
> On Fri, 2005-10-07 at 20:53 +0200, Christian Neumair wrote:
> > Together with [1] this patch ensures that authentication windows are not
> > shown again if they're cancelled.
>
> if (vfs_result_code == GNOME_VFS_OK
> || vfs_result_code == GNOME_VFS_ERROR_NOT_SUPPORTED
> - || vfs_result_code == GNOME_VFS_ERROR_INVALID_URI) {
> + || vfs_result_code == GNOME_VFS_ERROR_INVALID_URI
> + || vfs_result_code != GNOME_VFS_ERROR_CANCELLED) {
>
> This part looks wrong (if result is a, b, or c, or result is anything
> but cancelled, the last bit overrides the first). I don't think its
> needed at all, is it?
Yes, you are right. Dunno how this crap made it into the patch.
Reattaching new version, which doesn't have it.
--
Christian Neumair <chris gnome-de org>
Index: libnautilus-private/nautilus-program-choosing.c
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-program-choosing.c,v
retrieving revision 1.79
diff -u -p -r1.79 nautilus-program-choosing.c
--- libnautilus-private/nautilus-program-choosing.c 12 Aug 2005 18:11:29 -0000 1.79
+++ libnautilus-private/nautilus-program-choosing.c 7 Oct 2005 18:48:10 -0000
@@ -628,6 +628,8 @@ void nautilus_launch_show_file (Nautilus
detail_message = g_strdup
(_("Please check the spelling and try again."));
break;
+ case GNOME_VFS_ERROR_CANCELLED:
+ break;
case GNOME_VFS_OK:
default:
#if NEW_MIME_COMPLETE
Index: src/nautilus-window-manage-views.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-window-manage-views.c,v
retrieving revision 1.354
diff -u -p -r1.354 nautilus-window-manage-views.c
--- src/nautilus-window-manage-views.c 9 Jul 2005 20:09:28 -0000 1.354
+++ src/nautilus-window-manage-views.c 7 Oct 2005 18:48:15 -0000
@@ -1436,7 +1437,11 @@ display_view_selection_failure (Nautilus
detail_message = g_strdup
(_("Check that an SMB server is running in the local network."));
break;
-
+
+ case GNOME_VFS_ERROR_CANCELLED:
+ g_free (uri_for_display);
+ return;
+
case GNOME_VFS_ERROR_SERVICE_NOT_AVAILABLE:
default:
error_message = g_strdup_printf (_("Nautilus cannot display \"%s\"."),
Index: src/file-manager/fm-directory-view.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-directory-view.c,v
retrieving revision 1.711
diff -u -p -r1.711 fm-directory-view.c
--- src/file-manager/fm-directory-view.c 27 Sep 2005 08:34:37 -0000 1.711
+++ src/file-manager/fm-directory-view.c 7 Oct 2005 18:48:15 -0000
@@ -7248,7 +7269,8 @@ activate_callback (NautilusFile *file, g
view = FM_DIRECTORY_VIEW (parameters->view);
- if (!activate_check_mime_types (view, file, TRUE)) {
+ if (!activate_check_mime_types (view, file, TRUE)
+ || nautilus_file_get_file_info_result (file) == GNOME_VFS_ERROR_CANCELLED) {
nautilus_file_unref (file);
g_free (parameters);
@@ -7379,6 +7401,13 @@ activate_activation_uri_ready_callback (
if (nautilus_file_is_broken_symbolic_link (file)) {
stop_activate (parameters);
report_broken_symbolic_link (parameters->view, file);
+ nautilus_file_unref (parameters->file);
+ g_free (parameters);
+ return;
+ }
+
+ if (nautilus_file_get_file_info_result (file) == GNOME_VFS_ERROR_CANCELLED) {
+ stop_activate (parameters);
nautilus_file_unref (parameters->file);
g_free (parameters);
return;
Attachment:
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil