[gnome-photos] Don't use g_list_first unnecessarily



commit c4b96561b49d9947e8e50de0cb87bf5e01874e22
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Aug 16 20:48:30 2012 +0200

    Don't use g_list_first unnecessarily

 src/photos-base-item.c         |    2 +-
 src/photos-selection-toolbar.c |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/photos-base-item.c b/src/photos-base-item.c
index 589e953..822ee51 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -121,7 +121,7 @@ photos_base_item_check_effects_and_update_info (PhotosBaseItem *self)
 
       emblem_icons = g_list_reverse (emblem_icons);
       emblemed_icon = g_emblemed_icon_new (G_ICON (priv->icon), NULL);
-      for (l = g_list_first (emblem_icons); l != NULL; l = g_list_next (l))
+      for (l = emblem_icons; l != NULL; l = g_list_next (l))
         {
           GEmblem *emblem;
           GIcon *emblem_icon = G_ICON (l->data);
diff --git a/src/photos-selection-toolbar.c b/src/photos-selection-toolbar.c
index 5e7d006..6df617d 100644
--- a/src/photos-selection-toolbar.c
+++ b/src/photos-selection-toolbar.c
@@ -215,7 +215,7 @@ photos_selection_toolbar_set_item_visibility (PhotosSelectionToolbar *self)
   priv->inside_refresh = TRUE;
 
   selection = photos_selection_controller_get_selection (priv->sel_cntrlr);
-  for (l = g_list_first (selection); l != NULL; l = g_list_next (l))
+  for (l = selection; l != NULL; l = g_list_next (l))
     {
       PhotosBaseItem *item;
       const gchar *default_app_name;
@@ -296,7 +296,7 @@ photos_selection_toolbar_set_item_listeners (PhotosSelectionToolbar *self, GList
 
   g_hash_table_foreach_remove (priv->item_listeners, photos_selection_toolbar_disconnect_listeners_foreach, NULL);
 
-  for (l = g_list_first (selection); l != NULL; l = g_list_next (l))
+  for (l = selection; l != NULL; l = g_list_next (l))
     {
       GObject *object;
       gchar *urn = (gchar *) l->data;



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