summaryrefslogtreecommitdiff
path: root/gtk/gtkplacessidebar.c
diff options
context:
space:
mode:
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>2015-07-19 22:09:29 -0300
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>2015-07-27 12:21:36 -0300
commite0339c5244a7b92569b761076dc0e6577687069d (patch)
tree6dd1e91dbeaa7c8de4521445d26d595224dd2333 /gtk/gtkplacessidebar.c
parentee73e27fd7040290227f53cf989fd2d7d993c69f (diff)
downloadgtk+-e0339c5244a7b92569b761076dc0e6577687069d.tar.gz
placessidebar: show Computer item when not in Other Locations
Previous commits removed from places sidebar the code related to displaying the Computer item, which should be shown when the sidebar is not displaying the Other Locations item. Add back the item when the sidebar is not in Other Locations' mode.
Diffstat (limited to 'gtk/gtkplacessidebar.c')
-rw-r--r--gtk/gtkplacessidebar.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c
index 67c5c222ed..08e28b68b0 100644
--- a/gtk/gtkplacessidebar.c
+++ b/gtk/gtkplacessidebar.c
@@ -1133,6 +1133,19 @@ update_places (GtkPlacesSidebar *sidebar)
}
g_list_free (volumes);
+ /* file system root */
+ if (!sidebar->show_other_locations)
+ {
+ mount_uri = "file:///"; /* No need to strdup */
+ icon = g_themed_icon_new_with_default_fallbacks (ICON_NAME_FILESYSTEM);
+ add_place (sidebar, PLACES_BUILT_IN,
+ SECTION_MOUNTS,
+ sidebar->hostname, icon, mount_uri,
+ NULL, NULL, NULL, 0,
+ _("Open the contents of the file system"));
+ g_object_unref (icon);
+ }
+
/* add mounts that has no volume (/etc/mtab mounts, ftp, sftp,...) */
mounts = g_volume_monitor_get_mounts (sidebar->volume_monitor);