Commit 03f220e4 authored by Cosimo Cecchi's avatar Cosimo Cecchi

Don't add built-in bookmarks twice

parent 35a56ba9
...@@ -389,40 +389,6 @@ get_icon_size (GtkPlacesSidebar *sidebar) ...@@ -389,40 +389,6 @@ get_icon_size (GtkPlacesSidebar *sidebar)
return 16; return 16;
} }
#if 0
/* FIXME: remove this? Let's allow the user to bookmark whatever he damn well pleases */
static gboolean
is_built_in_bookmark (NautilusFile *file)
{
gboolean built_in;
gint idx;
if (nautilus_file_is_home (file)) {
return TRUE;
}
if (nautilus_file_is_desktop_directory (file) &&
!g_settings_get_boolean (gnome_background_preferences, NAUTILUS_PREFERENCES_SHOW_DESKTOP)) {
return FALSE;
}
built_in = FALSE;
for (idx = 0; idx < G_USER_N_DIRECTORIES; idx++) {
/* PUBLIC_SHARE and TEMPLATES are not in our built-in list */
if (nautilus_file_is_user_special_directory (file, idx)) {
if (idx != G_USER_DIRECTORY_PUBLIC_SHARE && idx != G_USER_DIRECTORY_TEMPLATES) {
built_in = TRUE;
}
break;
}
}
return built_in;
}
#endif
static GtkTreeIter static GtkTreeIter
add_heading (GtkPlacesSidebar *sidebar, add_heading (GtkPlacesSidebar *sidebar,
SectionType section_type, SectionType section_type,
...@@ -576,9 +542,7 @@ add_special_dirs (GtkPlacesSidebar *sidebar) ...@@ -576,9 +542,7 @@ add_special_dirs (GtkPlacesSidebar *sidebar)
char *mount_uri; char *mount_uri;
char *tooltip; char *tooltip;
if (index == G_USER_DIRECTORY_DESKTOP || if (!_gtk_bookmarks_manager_get_is_xdg_dir_builtin (index)) {
index == G_USER_DIRECTORY_TEMPLATES ||
index == G_USER_DIRECTORY_PUBLIC_SHARE) {
continue; continue;
} }
...@@ -1001,18 +965,9 @@ update_places (GtkPlacesSidebar *sidebar) ...@@ -1001,18 +965,9 @@ update_places (GtkPlacesSidebar *sidebar)
} }
#endif #endif
#if 0 if (_gtk_bookmarks_manager_get_is_builtin (sidebar->bookmarks_manager, root)) {
/* FIXME: remove this? Let's allow the user to bookmark whatever he damn well pleases */
NautilusFile *file;
file = nautilus_file_get (root);
if (is_built_in_bookmark (file)) {
g_object_unref (root);
nautilus_file_unref (file);
continue; continue;
} }
nautilus_file_unref (file);
#endif
/* FIXME: we are getting file info synchronously. We may want to do it async at some point. */ /* FIXME: we are getting file info synchronously. We may want to do it async at some point. */
info = g_file_query_info (root, info = g_file_query_info (root,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment