Don't use _gtk_file_chooser_is_file_in_roots() when we already know the roots strv

Signed-off-by: Federico Mena Quintero <federico@novell.com>
This commit is contained in:
Federico Mena Quintero
2010-09-06 15:25:51 -05:00
parent 00592c3d4a
commit b2e19e0056

View File

@@ -2989,12 +2989,15 @@ _gtk_file_chooser_get_visible_roots (GtkFileChooser *chooser)
if (fs_root != NULL)
{
if (_gtk_file_chooser_is_file_in_roots (GTK_FILE_CHOOSER (chooser), fs_root))
char *fs_root_uri = g_file_get_uri (fs_root);
if (uri_is_in_roots_strv (fs_root_uri, root_uris))
{
/* This is going to be listed already. Ignore it for now. */
skip = TRUE;
}
g_free (fs_root_uri);
g_object_unref (fs_root);
}
}