[PATCH] Re: Unable to browse web pages from nautilus



Am Dienstag, den 28.06.2005, 10:18 +0200 schrieb Markus Bertheau:
> Dnia 28-06-2005, Di o godzinie 08:55 +0200, Baptiste Mille-Mathias
> napisał(a):
> 
> > Nautilus doesn't support anymore this feature. This is now the Web
> > browser's job.
> > I closed your bug.
> 
> I think you misunderstood Thomas. He doesn't want the web page to be
> displayed in nautilus itself, but for nautilus to start the application
> that handles the http protocol.

The attached patch should help.

-- 
Christian Neumair <chris gnome-de org>
Index: src/nautilus-window-manage-views.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-window-manage-views.c,v
retrieving revision 1.352
diff -u -p -r1.352 nautilus-window-manage-views.c
--- src/nautilus-window-manage-views.c	4 Jun 2005 16:23:15 -0000	1.352
+++ src/nautilus-window-manage-views.c	28 Jun 2005 09:23:42 -0000
@@ -1356,11 +1356,18 @@ display_view_selection_failure (Nautilus
 			detail_message = g_strdup 
 				(_("Nautilus has no installed viewer capable of displaying the folder."));
 		} else {
-			error_message = g_strdup_printf
-				(_("Couldn't display \"%s\"."),
-				 uri_for_display);
-			detail_message = g_strdup 
-				(_("The location is not a folder."));
+			/* let's see whether GnomeVFS can handle this URI */
+			result_code = gnome_vfs_url_show (location);
+
+			if (result_code == GNOME_VFS_OK) {
+				g_free (uri_for_display);
+				return;
+			} else {
+				error_message = g_strdup_printf
+					(_("Couldn't display \"%s\"."),
+					 uri_for_display);
+				detail_message = g_strdup (gnome_vfs_result_to_string (result_code));
+			}
 		}
 		break;
 	case GNOME_VFS_ERROR_NOT_FOUND:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]