summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Sullivan <sullivan@src.gnome.org>2000-06-05 16:30:19 +0000
committerJohn Sullivan <sullivan@src.gnome.org>2000-06-05 16:30:19 +0000
commitc3c4ef55aff01bfeb55d15a31a7153371950464f (patch)
tree1b70f577a7dcc40187784a36670bde46a62527b5
parent3fe5a51092fb1d00e66e5e51fb88e9512307f24e (diff)
downloadnautilus_ms_may_31.tar.gz
Fixed bug 1118: Generic error message for bogus ftp locationnautilus_ms_may_31
* src/nautilus-applicable-views.h: Added NAUTILUS_NAVIGATION_RESULT_UNDEFINED to enum. * src/nautilus-applicable-views.c: (got_file_info_callback): Used this new value to fix bug where early goto was not setting result code. Goto considered evil. * src/nautilus-window-manage-views.c: (nautilus_window_end_location_change_callback): Added "complain to sullivan@eazel.com" message when an unhandled result code is stumbled across.
-rw-r--r--ChangeLog14
-rw-r--r--src/nautilus-applicable-views.c7
-rw-r--r--src/nautilus-applicable-views.h1
-rw-r--r--src/nautilus-window-manage-views.c1
4 files changed, 21 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 69cddc558..6b6cd36db 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2000-06-05 John Sullivan <sullivan@eazel.com>
+
+ Fixed bug 1118: Generic error message for bogus ftp location
+
+ * src/nautilus-applicable-views.h:
+ Added NAUTILUS_NAVIGATION_RESULT_UNDEFINED to enum.
+ * src/nautilus-applicable-views.c: (got_file_info_callback):
+ Used this new value to fix bug where early goto was not
+ setting result code. Goto considered evil.
+ * src/nautilus-window-manage-views.c:
+ (nautilus_window_end_location_change_callback):
+ Added "complain to sullivan@eazel.com" message when an
+ unhandled result code is stumbled across.
+
2000-06-05 Ramiro Estrugo <ramiro@eazel.com>
Bug 647. Should report missing special directories to user.
diff --git a/src/nautilus-applicable-views.c b/src/nautilus-applicable-views.c
index 1a7faf8f4..1d484bb95 100644
--- a/src/nautilus-applicable-views.c
+++ b/src/nautilus-applicable-views.c
@@ -208,6 +208,8 @@ got_file_info_callback (GnomeVFSAsyncHandle *ah,
g_assert (result_list->data != NULL);
g_assert (result_list->next == NULL);
+ result_code = NAUTILUS_NAVIGATION_RESULT_UNDEFINED;
+
navinfo = data;
navinfo->ah = NULL;
@@ -274,8 +276,6 @@ got_file_info_callback (GnomeVFSAsyncHandle *ah,
if (vfs_result_code == GNOME_VFS_OK && navinfo->content_identifiers == NULL) {
result_code = NAUTILUS_NAVIGATION_RESULT_NO_HANDLER_FOR_TYPE;
}
-
- result_code = get_nautilus_navigation_result_from_gnome_vfs_result (vfs_result_code);
goto out;
}
@@ -288,6 +288,9 @@ got_file_info_callback (GnomeVFSAsyncHandle *ah,
nautilus_view_identifier_free (fallback_id);
out:
+ if (result_code == NAUTILUS_NAVIGATION_RESULT_UNDEFINED) {
+ result_code = get_nautilus_navigation_result_from_gnome_vfs_result (vfs_result_code);
+ }
(* notify_ready) (result_code, navinfo, notify_ready_data);
}
diff --git a/src/nautilus-applicable-views.h b/src/nautilus-applicable-views.h
index 4cb88c8d0..536047542 100644
--- a/src/nautilus-applicable-views.h
+++ b/src/nautilus-applicable-views.h
@@ -43,6 +43,7 @@ typedef struct NautilusNavigationInfo NautilusNavigationInfo;
* the GnomeVFSResults are treated the same here.
*/
typedef enum {
+ NAUTILUS_NAVIGATION_RESULT_UNDEFINED = -1,
NAUTILUS_NAVIGATION_RESULT_OK,
NAUTILUS_NAVIGATION_RESULT_UNSPECIFIC_ERROR,
NAUTILUS_NAVIGATION_RESULT_NO_HANDLER_FOR_TYPE,
diff --git a/src/nautilus-window-manage-views.c b/src/nautilus-window-manage-views.c
index 63fa314c5..0d0be0fad 100644
--- a/src/nautilus-window-manage-views.c
+++ b/src/nautilus-window-manage-views.c
@@ -1161,6 +1161,7 @@ nautilus_window_end_location_change_callback (NautilusNavigationResult result_co
* When this comes up, we should figure out what's really happening
* and add another specific case.
*/
+ g_message ("Case %d not handled well in nautilus_window_end_location_change_callback, please tell sullivan@eazel.com", result_code);
error_message = g_strdup_printf (_("Nautilus cannot display \"%s\"."), requested_uri);
}