[almanah] core: Fix text export



commit e3c64de7ae46cead5684df0f000cfe8a09d60bae
Author: Philip Withnall <philip tecnocode co uk>
Date:   Sun Mar 25 22:08:00 2012 +0100

    core: Fix text export
    
    It wasn't clearing its output buffer between entries, resulting in the
    text output files being output as concatenations of all the previous entries.

 src/export-operation.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/export-operation.c b/src/export-operation.c
index 9925e47..c001041 100644
--- a/src/export-operation.c
+++ b/src/export-operation.c
@@ -251,6 +251,9 @@ export_text_files (AlmanahExportOperation *self, GFile *destination, AlmanahExpo
 		g_object_unref (file);
 		g_free (content);
 
+		/* Clear the buffer. */
+		gtk_text_buffer_delete (buffer, &start_iter, &end_iter);
+
 		/* Check for cancellation */
 		if (cancellable != NULL && g_cancellable_set_error_if_cancelled (cancellable, &child_error) == TRUE)
 			break;



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