diff options
author | Federico Mena Quintero <federico@novell.com> | 2010-09-06 15:25:51 -0500 |
---|---|---|
committer | Federico Mena Quintero <federico@novell.com> | 2010-09-06 15:25:51 -0500 |
commit | 7d27a40295884119c30b1ba95abcbd0423275841 (patch) | |
tree | ca7d45104797da1a55328ea2f4c831273eaddf2a | |
parent | d79a8bcf9e9cab3a9a26ac2364e710fe95a6ad12 (diff) | |
download | gtk+-7d27a40295884119c30b1ba95abcbd0423275841.tar.gz |
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>
-rw-r--r-- | gtk/gtkfilechooser.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gtk/gtkfilechooser.c b/gtk/gtkfilechooser.c index 47333ada17..4287247ffb 100644 --- a/gtk/gtkfilechooser.c +++ b/gtk/gtkfilechooser.c @@ -3014,12 +3014,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); } } |