cheese r1139 - in branches/gnome-2-24: . src
- From: fargiolas svn gnome org
- To: svn-commits-list gnome org
- Subject: cheese r1139 - in branches/gnome-2-24: . src
- Date: Sun, 16 Nov 2008 09:20:12 +0000 (UTC)
Author: fargiolas
Date: Sun Nov 16 09:20:12 2008
New Revision: 1139
URL: http://svn.gnome.org/viewvc/cheese?rev=1139&view=rev
Log:
Don't use random access GList methods when accessing a list sequentially.
Properly free list elements after use. Fixes bug #560514, courtesy of Giuseppe Fuggiano
Modified:
branches/gnome-2-24/ChangeLog
branches/gnome-2-24/src/cheese-thumb-view.c
Modified: branches/gnome-2-24/src/cheese-thumb-view.c
==============================================================================
--- branches/gnome-2-24/src/cheese-thumb-view.c (original)
+++ branches/gnome-2-24/src/cheese-thumb-view.c Sun Nov 16 09:20:12 2008
@@ -355,23 +355,21 @@
guint time,
gpointer user_data)
{
- GList *list;
- GtkTreePath *tree_path = NULL;
+ GList *list, *l;
GtkTreeIter iter;
GtkTreeModel *model;
char *str;
char *uris = NULL;
char *tmp_str;
- gint i;
list = gtk_icon_view_get_selected_items (thumb_view);
model = gtk_icon_view_get_model (thumb_view);
- for (i = 0; i < g_list_length (list); i++)
+ for (l = list; l != NULL; l = l->next)
{
- tree_path = g_list_nth_data (list, i);
- gtk_tree_model_get_iter (model, &iter, tree_path);
+ gtk_tree_model_get_iter (model, &iter, l->data);
gtk_tree_model_get (model, &iter, 1, &str, -1);
+ gtk_tree_path_free (l->data);
/* we always store local paths in the model, but DnD
* needs URIs, so we must add file:// to the path.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]