[Xfce4-commits] <thunar:master> Do not reverse the list twice.

Nick Schermer noreply at xfce.org
Tue Oct 30 22:06:06 CET 2012


Updating branch refs/heads/master
         to 6d2a991f54cb09666b6153d9e25546d7c0434fb1 (commit)
       from 7a22650c65d40a327afff860b22e2ec22fd9d9f7 (commit)

commit 6d2a991f54cb09666b6153d9e25546d7c0434fb1
Author: Nick Schermer <nick at xfce.org>
Date:   Tue Oct 30 19:45:17 2012 +0100

    Do not reverse the list twice.
    
    Reversing the list twice does not change the order.

 thunar/thunar-thumbnailer.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/thunar/thunar-thumbnailer.c b/thunar/thunar-thumbnailer.c
index 998b864..f73ae65 100644
--- a/thunar/thunar-thumbnailer.c
+++ b/thunar/thunar-thumbnailer.c
@@ -870,7 +870,7 @@ thunar_thumbnailer_queue_files (ThunarThumbnailer *thumbnailer,
   /* collect all supported files from the list that are neither in the
    * about to be queued (wait queue), nor already queued, nor already
    * processed (and awaiting to be refreshed) */
-  for (lp = g_list_last (files); lp != NULL; lp = lp->prev)
+  for (lp = files; lp != NULL; lp = lp->next)
     {
       /* get the current thumb state */
       thumb_state = thunar_file_get_thumb_state (lp->data);
@@ -907,7 +907,7 @@ thunar_thumbnailer_queue_files (ThunarThumbnailer *thumbnailer,
       mime_hints = g_new0 (const gchar *, n_items + 1);
 
       /* fill URI and MIME hint arrays with items from the wait queue */
-      for (lp = g_list_last (supported_files), n = 0; lp != NULL; lp = lp->prev, ++n)
+      for (lp = supported_files, n = 0; lp != NULL; lp = lp->next, ++n)
         {
           /* set the thumbnail state to loading */
           thunar_file_set_thumb_state (lp->data, THUNAR_FILE_THUMB_STATE_LOADING);


More information about the Xfce4-commits mailing list