summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Hertzfeld <andy@src.gnome.org>2001-02-20 22:18:37 +0000
committerAndy Hertzfeld <andy@src.gnome.org>2001-02-20 22:18:37 +0000
commit71b1d39b82b56cd8587aa9dc766931ec7378815a (patch)
tree773fa1186a1619ce0466a68e9ec2db976cf1003d
parent2b93c3e9df3560a6b73f69bc72c6fd4de64b74fa (diff)
downloadnautilus-71b1d39b82b56cd8587aa9dc766931ec7378815a.tar.gz
fixed bug 6732, can't unmount volumes after viewing text files; fixed by
* components/text/nautilus-text-view.c: (file_close_callback), (done_file_read): fixed bug 6732, can't unmount volumes after viewing text files; fixed by closing the file in done_file_read.
-rw-r--r--ChangeLog7
-rw-r--r--components/text/nautilus-text-view.c13
2 files changed, 20 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 285adea9b..e5381d168 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2001-02-20 Andy Hertzfeld <andy@eazel.com>
+
+ * components/text/nautilus-text-view.c: (file_close_callback),
+ (done_file_read):
+ fixed bug 6732, can't unmount volumes after viewing text files;
+ fixed by closing the file in done_file_read.
+
2001-02-20 Rebecca Schulman <rebecka@eazel.com>
reviewed by: John Sullivan <sullivan@eazel.com>
diff --git a/components/text/nautilus-text-view.c b/components/text/nautilus-text-view.c
index c43f5b950..5ae03b396 100644
--- a/components/text/nautilus-text-view.c
+++ b/components/text/nautilus-text-view.c
@@ -257,6 +257,13 @@ nautilus_text_view_destroy (GtkObject *object)
NAUTILUS_CALL_PARENT_CLASS (GTK_OBJECT_CLASS, destroy, (object));
}
+/* here's a callback for the async close, which does nothing */
+static void
+file_close_callback (GnomeVFSAsyncHandle *handle,
+ GnomeVFSResult result,
+ gpointer callback_data)
+{
+}
/* this routine is called when we're finished reading to deallocate the buffer and
* put up an error message if necessary
@@ -268,6 +275,12 @@ done_file_read (NautilusTextView *text_view, gboolean succeeded)
g_free (text_view->details->buffer);
text_view->details->buffer = NULL;
}
+
+ if (text_view->details->file_handle != NULL) {
+ gnome_vfs_async_close (text_view->details->file_handle,
+ file_close_callback,
+ NULL);
+ }
}
/* this callback handles the next chunk of data from the file by copying it into the