Commit ef6068ad authored by António Fernandes's avatar António Fernandes 🐚

bookmark-list: Tidy up can_bookmark_location

Make it shorter, reorder as per sidebar, and add comments.

No logical changes.
parent 90799c2a
......@@ -625,11 +625,7 @@ nautilus_bookmark_list_can_bookmark_location (NautilusBookmarkList *list,
if (nautilus_bookmark_list_item_with_location (list, location, NULL))
{
return FALSE;
}
if (nautilus_is_home_directory (location))
{
/* Already bookmarked */
return FALSE;
}
......@@ -638,23 +634,13 @@ nautilus_bookmark_list_can_bookmark_location (NautilusBookmarkList *list,
return FALSE;
}
if (nautilus_is_other_locations_directory (location))
{
return FALSE;
}
if (nautilus_is_recent_directory (location))
{
return FALSE;
}
if (nautilus_is_trash_directory (location))
{
return FALSE;
}
if (nautilus_is_favorite_directory (location))
if (nautilus_is_recent_directory (location) ||
nautilus_is_favorite_directory (location) ||
nautilus_is_home_directory (location) ||
nautilus_is_trash_directory (location) ||
nautilus_is_other_locations_directory (location))
{
/* Already in the sidebar */
return FALSE;
}
......
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