Commit c3c4ef55 authored by John Sullivan's avatar John Sullivan

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.
parent 3fe5a510
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.
......
......@@ -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);
}
......
......@@ -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,
......
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment