[gvfs] Respect UDISKS_AUTOMOUNT_HINT available in recent udisks and gnome-disk-utility



commit 493ee806eba214a748d064b43c10882d76ee1492
Author: David Zeuthen <davidz redhat com>
Date:   Mon Jul 11 11:39:58 2011 -0400

    Respect UDISKS_AUTOMOUNT_HINT available in recent udisks and gnome-disk-utility
    
    https://bugzilla.gnome.org/show_bug.cgi?id=653185
    
    Based on work from Ayan George <ayan george canonical com>.
    
    Signed-off-by: David Zeuthen <davidz redhat com>

 configure.ac             |    2 +-
 monitor/gdu/ggduvolume.c |    9 +++++++++
 2 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index af64480..e362bb6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -205,7 +205,7 @@ AC_ARG_ENABLE(gdu, AS_HELP_STRING([--disable-gdu],[build without GDU volume moni
 msg_gdu=no
 GDU_LIBS=
 GDU_CFLAGS=
-GDU_REQUIRED=2.29.0
+GDU_REQUIRED=3.0.2
 
 if test "x$enable_gdu" != "xno"; then
   PKG_CHECK_EXISTS([gdu >= $GDU_REQUIRED], msg_gdu=yes)
diff --git a/monitor/gdu/ggduvolume.c b/monitor/gdu/ggduvolume.c
index 0665b7a..eb15d22 100644
--- a/monitor/gdu/ggduvolume.c
+++ b/monitor/gdu/ggduvolume.c
@@ -429,6 +429,15 @@ update_volume (GGduVolume *volume)
       g_free (activation_uri);
     }
 
+  /* if there's an automount hint, use it */
+  if (device != NULL)
+    {
+      if (g_strcmp0 (gdu_device_get_automount_hint (device), "always") == 0)
+        volume->should_automount = TRUE;
+      else if (g_strcmp0 (gdu_device_get_automount_hint (device), "never") == 0)
+        volume->should_automount = FALSE;
+    }
+
   if (pool != NULL)
     g_object_unref (pool);
   if (device != NULL)



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