[totem] main: Small optimisation when removing loads of items
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] main: Small optimisation when removing loads of items
- Date: Thu, 15 May 2014 17:33:28 +0000 (UTC)
commit 1ce6ccfeef2c1b3b2713a1b33b975ac30b3e3a69
Author: Bastien Nocera <hadess hadess net>
Date: Thu May 15 19:32:05 2014 +0200
main: Small optimisation when removing loads of items
Won't make that much of a difference (compared to say, tracking all the
rows with GtkTreeRowReferences), but doesn't hurt.
src/totem-grilo.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/totem-grilo.c b/src/totem-grilo.c
index 0cff0d6..81c6c53 100644
--- a/src/totem-grilo.c
+++ b/src/totem-grilo.c
@@ -2089,6 +2089,7 @@ delete_foreach (gpointer data,
path = gtk_tree_row_reference_get_path (ref);
if (!path || !gtk_tree_model_get_iter (view_model, &iter, path)) {
g_warning ("An item that was scheduled for removal isn't available any more");
+ gtk_tree_row_reference_free (ref);
return;
}
@@ -2148,6 +2149,7 @@ delete_foreach (gpointer data,
end:
g_clear_object (&media);
g_clear_object (&source);
+ gtk_tree_row_reference_free (ref);
}
static void
@@ -2171,7 +2173,6 @@ delete_cb (TotemSelectionToolbar *bar,
l->data = ref;
}
g_list_foreach (list, delete_foreach, model);
- g_list_free_full (list, (GDestroyNotify) gtk_tree_row_reference_free);
g_signal_handlers_unblock_by_func (self->priv->browser, "view-selection-changed", self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]