[gtk+/multiroot-filechooser: 27/30] Don't use _gtk_file_chooser_is_file_in_roots() when we already know the roots strv
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/multiroot-filechooser: 27/30] Don't use _gtk_file_chooser_is_file_in_roots() when we already know the roots strv
- Date: Wed, 6 Oct 2010 18:36:59 +0000 (UTC)
commit b2e19e005604fd8e2e39729fc9ce51d34ee96a10
Author: Federico Mena Quintero <federico novell com>
Date: Mon Sep 6 15:25:51 2010 -0500
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>
gtk/gtkfilechooser.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkfilechooser.c b/gtk/gtkfilechooser.c
index 68023ff..6a1297e 100644
--- a/gtk/gtkfilechooser.c
+++ b/gtk/gtkfilechooser.c
@@ -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);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]