diff options
-rw-r--r-- | ChangeLog | 16 | ||||
-rw-r--r-- | components/text/Nautilus_View_text.oaf.in | 12 | ||||
-rw-r--r-- | components/text/Nautilus_View_text.server.in | 12 | ||||
-rw-r--r-- | components/text/Nautilus_View_text.server.in.in | 12 | ||||
-rw-r--r-- | components/text/nautilus-text-view.c | 16 |
5 files changed, 29 insertions, 39 deletions
@@ -1,3 +1,19 @@ +2001-03-04 Maciej Stachowiak <mjs@eazel.com> + + reviewed by: George Lebl <jirka@5z.com> + Ramiro Estrugo <ramiro@eazel.com> + + Fixed bug 7336 ("View as Text" not a choice for remote web pages) + + * components/text/Nautilus_View_text.oaf.in: Removed attribute + limiting this view's applicability to the "file:" URI scheme, thus + fixing bug 7336. + + * components/text/nautilus-text-view.c (file_read_callback): + Remove some incorrect checks that made this component only load + the first chunk of text for remote files; this bug was uncovered + in the process of fixing 7336. + 2001-03-05 Ramiro Estrugo <ramiro@eazel.com> reviewed by: Pavel Cisler <pavel@eazel.com> diff --git a/components/text/Nautilus_View_text.oaf.in b/components/text/Nautilus_View_text.oaf.in index da45b751e..7b6ea351b 100644 --- a/components/text/Nautilus_View_text.oaf.in +++ b/components/text/Nautilus_View_text.oaf.in @@ -21,9 +21,8 @@ <oaf_attribute name="bonobo:supported_mime_types" type="stringv"> <item value="text/plain"/> <item value="text/*"/> - </oaf_attribute> - <oaf_attribute name="bonobo:supported_uri_schemes" type="stringv"> - <item value="file"/> + <item value="x-directory/webdav"/> + <item value="x-directory/webdav-prefer-directory"/> </oaf_attribute> <oaf_attribute name="nautilus:view_as_name" type="string" _value="Text"/> <oaf_attribute name="nautilus:view_as_label" type="string" _value="View as Text"/> @@ -31,10 +30,3 @@ </oaf_server> </oaf_info> - - - - - - - diff --git a/components/text/Nautilus_View_text.server.in b/components/text/Nautilus_View_text.server.in index da45b751e..7b6ea351b 100644 --- a/components/text/Nautilus_View_text.server.in +++ b/components/text/Nautilus_View_text.server.in @@ -21,9 +21,8 @@ <oaf_attribute name="bonobo:supported_mime_types" type="stringv"> <item value="text/plain"/> <item value="text/*"/> - </oaf_attribute> - <oaf_attribute name="bonobo:supported_uri_schemes" type="stringv"> - <item value="file"/> + <item value="x-directory/webdav"/> + <item value="x-directory/webdav-prefer-directory"/> </oaf_attribute> <oaf_attribute name="nautilus:view_as_name" type="string" _value="Text"/> <oaf_attribute name="nautilus:view_as_label" type="string" _value="View as Text"/> @@ -31,10 +30,3 @@ </oaf_server> </oaf_info> - - - - - - - diff --git a/components/text/Nautilus_View_text.server.in.in b/components/text/Nautilus_View_text.server.in.in index da45b751e..7b6ea351b 100644 --- a/components/text/Nautilus_View_text.server.in.in +++ b/components/text/Nautilus_View_text.server.in.in @@ -21,9 +21,8 @@ <oaf_attribute name="bonobo:supported_mime_types" type="stringv"> <item value="text/plain"/> <item value="text/*"/> - </oaf_attribute> - <oaf_attribute name="bonobo:supported_uri_schemes" type="stringv"> - <item value="file"/> + <item value="x-directory/webdav"/> + <item value="x-directory/webdav-prefer-directory"/> </oaf_attribute> <oaf_attribute name="nautilus:view_as_name" type="string" _value="Text"/> <oaf_attribute name="nautilus:view_as_label" type="string" _value="View as Text"/> @@ -31,10 +30,3 @@ </oaf_server> </oaf_info> - - - - - - - diff --git a/components/text/nautilus-text-view.c b/components/text/nautilus-text-view.c index 03605bda7..2e3a19084 100644 --- a/components/text/nautilus-text-view.c +++ b/components/text/nautilus-text-view.c @@ -301,7 +301,7 @@ file_read_callback (GnomeVFSAsyncHandle *vfs_handle, byte_count = bytes_read; text_view->details->file_size += bytes_read; - if (result == GNOME_VFS_OK && bytes_read != 0) { + if (result == GNOME_VFS_OK) { /* write the buffer into the text field */ gtk_text_freeze (GTK_TEXT (text_view->details->text_display)); @@ -317,14 +317,12 @@ file_read_callback (GnomeVFSAsyncHandle *vfs_handle, /* read more if necessary */ if (text_view->details->file_size < MAX_FILE_SIZE) { - if (bytes_read == bytes_requested) { - gnome_vfs_async_read (text_view->details->file_handle, - text_view->details->buffer, - TEXT_VIEW_CHUNK_SIZE, - file_read_callback, - callback_data); - return; - } + gnome_vfs_async_read (text_view->details->file_handle, + text_view->details->buffer, + TEXT_VIEW_CHUNK_SIZE, + file_read_callback, + callback_data); + return; } else { char *filename = nautilus_file_get_name(text_view->details->file); char *message = g_strdup_printf (_("Sorry, but %s is too large for Nautilus to load all of it."), filename); |