gtk+ r21578 - in branches/gtk-2-14: . gtk



Author: chpe
Date: Thu Oct  2 19:56:01 2008
New Revision: 21578
URL: http://svn.gnome.org/viewvc/gtk+?rev=21578&view=rev

Log:
Bug 554704 â gtkfilesystemmodel does too much work

Modified:
   branches/gtk-2-14/ChangeLog
   branches/gtk-2-14/gtk/gtkfilesystemmodel.c

Modified: branches/gtk-2-14/gtk/gtkfilesystemmodel.c
==============================================================================
--- branches/gtk-2-14/gtk/gtkfilesystemmodel.c	(original)
+++ branches/gtk-2-14/gtk/gtkfilesystemmodel.c	Thu Oct  2 19:56:01 2008
@@ -994,7 +994,7 @@
 
   if (folder)
     info->cleanups = g_slist_prepend (info->cleanups, folder);
-  else if (g_slist_length (info->files) == 1
+  else if ((info->files != NULL && info->files->next == NULL) /* g_slist_length == 1 */
            && g_file_equal (info->node->file, info->files->data))
     {
       /* Done, now call the function */
@@ -1025,7 +1025,7 @@
   g_object_unref (info->files->data);
   info->files = g_slist_remove (info->files, info->files->data);
 
-  if (g_slist_length (info->files) < 1)
+  if (info->files == NULL)
     {
       /* Done, now call the function */
       if (info->node)
@@ -1136,7 +1136,7 @@
     }
   g_object_unref (parent_file);
 
-  if (g_slist_length (files) < 1)
+  if (files == NULL)
     return;
 
   /* Now we have all paths, except the root path */
@@ -1153,7 +1153,7 @@
   g_object_unref (files->data);
   files = g_slist_remove (files, files->data);
 
-  if (g_slist_length (files) < 1)
+  if (files == NULL)
     {
       /* Done, now call the function */
       if (node)



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