[gthumb/ext] use the internal monitor to signal a file change after rotation



commit e69f108a6548134cdb507c9312bdac53106afc13
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sat Sep 26 17:25:14 2009 +0200

    use the internal monitor to signal a file change after rotation
    
    this way the image is reloaded more quickly

 extensions/image_rotation/gth-transform-task.c |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/extensions/image_rotation/gth-transform-task.c b/extensions/image_rotation/gth-transform-task.c
index 8eef2a8..3824409 100644
--- a/extensions/image_rotation/gth-transform-task.c
+++ b/extensions/image_rotation/gth-transform-task.c
@@ -86,11 +86,12 @@ transform_file_ready_cb (GError   *error,
 			 gpointer  user_data)
 {
 	GthTransformTask *self = user_data;
+	GthFileData      *file_data;
+	GFile            *parent;
+	GList            *file_list;
 
 	if (error != NULL) {
 		if (g_error_matches (error, JPEG_ERROR, JPEG_ERROR_MCU)) {
-			GthFileData *file_data;
-
 			g_clear_error (&error);
 
 			gth_task_dialog (GTH_TASK (self), TRUE);
@@ -108,6 +109,17 @@ transform_file_ready_cb (GError   *error,
 		return;
 	}
 
+	file_data = self->priv->current->data;
+	parent = g_file_get_parent (file_data->file);
+	file_list = g_list_append (NULL, file_data->file);
+	gth_monitor_folder_changed (gth_main_get_default_monitor (),
+				    parent,
+				    file_list,
+				    GTH_MONITOR_EVENT_CHANGED);
+
+	g_list_free (file_list);
+	g_object_unref (parent);
+
 	transform_next_file (self);
 }
 



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