[gtk+/wip/gbsneto/places-view] placessidebar: show Computer item when not in Other Locations



commit 1cc1d7fd2a75141faddeb263d45e5a9c6c03ec63
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Sun Jul 19 22:09:29 2015 -0300

    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.

 gtk/gtkplacessidebar.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c
index b4afb0f..1dc01d5 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);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]