[gthumb/ext] emit a single selection-changed signal when clearing the store



commit 2af39ceb60ba9199599d734bced58744741d9426
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sat Nov 21 12:02:02 2009 +0100

    emit a single selection-changed signal when clearing the store
    
    unselect the files before clearing the store to avoid a
    selection-changed signal emition for every file in the store.

 gthumb/gth-file-list.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gthumb/gth-file-list.c b/gthumb/gth-file-list.c
index 2343eee..1ebfb8c 100644
--- a/gthumb/gth-file-list.c
+++ b/gthumb/gth-file-list.c
@@ -719,6 +719,8 @@ gfl_clear_list (GthFileList *file_list,
 {
 	GthFileStore *file_store;
 
+	gth_file_selection_unselect_all (GTH_FILE_SELECTION (file_list->priv->view));
+
 	file_store = (GthFileStore*) gth_file_view_get_model (GTH_FILE_VIEW (file_list->priv->view));
 	gth_file_store_clear (file_store);
 
@@ -953,6 +955,8 @@ gfl_set_files (GthFileList *file_list,
 {
 	GthFileStore *file_store;
 
+	gth_file_selection_unselect_all (GTH_FILE_SELECTION (file_list->priv->view));
+
 	file_store = (GthFileStore*) gth_file_view_get_model (GTH_FILE_VIEW (file_list->priv->view));
 	gth_file_store_clear (file_store);
 	gfl_add_files (file_list, files);



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