[gnome-control-center/gnome-3-4] info: Ignore NFS mounts when calculating disk size



commit 4c5fb84dd6c398934989479c9374d3736d9b057a
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Apr 19 12:00:04 2012 +0100

    info: Ignore NFS mounts when calculating disk size
    
    https://bugzilla.gnome.org/show_bug.cgi?id=674356

 panels/info/Makefile.am     |    4 +++-
 panels/info/cc-info-panel.c |    6 ++++--
 2 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/panels/info/Makefile.am b/panels/info/Makefile.am
index dc9b8b4..0a50361 100644
--- a/panels/info/Makefile.am
+++ b/panels/info/Makefile.am
@@ -28,7 +28,9 @@ libinfo_la_SOURCES =		\
 	cc-info-panel.c		\
 	cc-info-panel.h		\
 	hostname-helper.c	\
-	hostname-helper.h
+	hostname-helper.h	\
+	gsd-disk-space-helper.h	\
+	gsd-disk-space-helper.c
 
 libinfo_la_LIBADD = $(PANEL_LIBS) $(INFO_PANEL_LIBS)
 libinfo_la_LDFLAGS = $(PANEL_LDFLAGS)
diff --git a/panels/info/cc-info-panel.c b/panels/info/cc-info-panel.c
index 0ecb472..226d201 100644
--- a/panels/info/cc-info-panel.c
+++ b/panels/info/cc-info-panel.c
@@ -36,6 +36,7 @@
 #include <glibtop/sysinfo.h>
 
 #include "hostname-helper.h"
+#include "gsd-disk-space-helper.h"
 
 /* Autorun options */
 #define PREF_MEDIA_AUTORUN_NEVER                "autorun-never"
@@ -663,8 +664,9 @@ get_primary_disc_info (CcInfoPanel *self)
 
       mount_path = g_unix_mount_get_mount_path (mount);
 
-      if (g_str_has_prefix (mount_path, "/media/")
-          || g_str_has_prefix (mount_path, g_get_home_dir ()))
+      if (gsd_should_ignore_unix_mount (mount) ||
+          g_str_has_prefix (mount_path, "/media/") ||
+          g_str_has_prefix (mount_path, g_get_home_dir ()))
         {
           g_unix_mount_free (mount);
           continue;



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