Bug 554704 – gtkfilesystemmodel does too much work
svn path=/trunk/; revision=21572
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
2008-10-02 Christian Persch
|
||||||
|
|
||||||
|
Bug 554704 – gtkfilesystemmodel does too much work
|
||||||
|
|
||||||
|
* gtk/gtkfilesystemmodel.c: Replace g_slist_length()<1 check with a
|
||||||
|
simple NULL check.
|
||||||
|
|
||||||
2008-10-02 Christian Persch
|
2008-10-02 Christian Persch
|
||||||
|
|
||||||
Bug 554701 – filechooser spams console with useless warnings
|
Bug 554701 – filechooser spams console with useless warnings
|
||||||
|
|||||||
@ -994,7 +994,7 @@ ref_path_cb (GCancellable *cancellable,
|
|||||||
|
|
||||||
if (folder)
|
if (folder)
|
||||||
info->cleanups = g_slist_prepend (info->cleanups, 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))
|
&& g_file_equal (info->node->file, info->files->data))
|
||||||
{
|
{
|
||||||
/* Done, now call the function */
|
/* Done, now call the function */
|
||||||
@ -1025,7 +1025,7 @@ ref_path_cb (GCancellable *cancellable,
|
|||||||
g_object_unref (info->files->data);
|
g_object_unref (info->files->data);
|
||||||
info->files = g_slist_remove (info->files, 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 */
|
/* Done, now call the function */
|
||||||
if (info->node)
|
if (info->node)
|
||||||
@ -1136,7 +1136,7 @@ _gtk_file_system_model_path_do (GtkFileSystemModel *model,
|
|||||||
}
|
}
|
||||||
g_object_unref (parent_file);
|
g_object_unref (parent_file);
|
||||||
|
|
||||||
if (g_slist_length (files) < 1)
|
if (files == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Now we have all paths, except the root path */
|
/* Now we have all paths, except the root path */
|
||||||
@ -1153,7 +1153,7 @@ _gtk_file_system_model_path_do (GtkFileSystemModel *model,
|
|||||||
g_object_unref (files->data);
|
g_object_unref (files->data);
|
||||||
files = g_slist_remove (files, files->data);
|
files = g_slist_remove (files, files->data);
|
||||||
|
|
||||||
if (g_slist_length (files) < 1)
|
if (files == NULL)
|
||||||
{
|
{
|
||||||
/* Done, now call the function */
|
/* Done, now call the function */
|
||||||
if (node)
|
if (node)
|
||||||
|
|||||||
Reference in New Issue
Block a user