GtkPlacesSidebar: Don't show desktop if its home
We go to extra length to set the desktop_uri to NULL when desktop == home, but then we were adding the (non-functional) place item anyway. Don't do that.
This commit is contained in:
parent
98bdc9321e
commit
465d4be3cf
@ -838,6 +838,8 @@ update_places (GtkPlacesSidebar *sidebar)
|
|||||||
if (sidebar->show_desktop)
|
if (sidebar->show_desktop)
|
||||||
{
|
{
|
||||||
mount_uri = get_desktop_directory_uri ();
|
mount_uri = get_desktop_directory_uri ();
|
||||||
|
if (mount_uri)
|
||||||
|
{
|
||||||
icon = g_themed_icon_new_with_default_fallbacks (ICON_NAME_DESKTOP);
|
icon = g_themed_icon_new_with_default_fallbacks (ICON_NAME_DESKTOP);
|
||||||
add_place (sidebar, PLACES_BUILT_IN,
|
add_place (sidebar, PLACES_BUILT_IN,
|
||||||
SECTION_COMPUTER,
|
SECTION_COMPUTER,
|
||||||
@ -847,6 +849,7 @@ update_places (GtkPlacesSidebar *sidebar)
|
|||||||
g_object_unref (icon);
|
g_object_unref (icon);
|
||||||
g_free (mount_uri);
|
g_free (mount_uri);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* XDG directories */
|
/* XDG directories */
|
||||||
add_special_dirs (sidebar);
|
add_special_dirs (sidebar);
|
||||||
|
Loading…
Reference in New Issue
Block a user