[totem] main: Block selection changes during deletion



commit bdf201ea6c596ef80c54465c744b64b3092d8d8f
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Mar 14 15:42:33 2014 +0100

    main: Block selection changes during deletion
    
    Don't act upon selection changes when we're removing the selection.
    We'll get out of the selection mode straight after the deletion
    finishes.

 src/totem-grilo.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/totem-grilo.c b/src/totem-grilo.c
index d0afbab..ca81129 100644
--- a/src/totem-grilo.c
+++ b/src/totem-grilo.c
@@ -2107,11 +2107,15 @@ delete_cb (TotemSelectionToolbar *bar,
        GtkTreeModel *model;
        GList *list;
 
+       g_signal_handlers_block_by_func (self->priv->browser, "view-selection-changed", self);
+
        model = gd_main_view_get_model (GD_MAIN_VIEW (self->priv->browser));
        list = gd_main_view_get_selection (GD_MAIN_VIEW (self->priv->browser));
        g_list_foreach (list, delete_foreach, model);
        g_list_free_full (list, (GDestroyNotify) gtk_tree_path_free);
 
+       g_signal_handlers_unblock_by_func (self->priv->browser, "view-selection-changed", self);
+
        g_object_set (G_OBJECT (self->priv->browser), "selection-mode", FALSE, NULL);
 }
 


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