summaryrefslogtreecommitdiff
path: root/Assistant/Threads/MountWatcher.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-01-10 15:06:08 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-01-10 15:06:08 -0400
commitca3f30160a27036d2309094868065bf837a235ac (patch)
tree0e6f2515a687ee3a1334e002679dcbb0705ed800 /Assistant/Threads/MountWatcher.hs
parent94ce3feb6c1971fc7be872d4742a4d84254c0940 (diff)
assistant: Support new gvfs dbus names used in Gnome 3.6. (untested)
Diffstat (limited to 'Assistant/Threads/MountWatcher.hs')
-rw-r--r--Assistant/Threads/MountWatcher.hs14
1 files changed, 10 insertions, 4 deletions
diff --git a/Assistant/Threads/MountWatcher.hs b/Assistant/Threads/MountWatcher.hs
index fa7d4ec3c..2d80c5888 100644
--- a/Assistant/Threads/MountWatcher.hs
+++ b/Assistant/Threads/MountWatcher.hs
@@ -96,9 +96,10 @@ checkMountMonitor client = do
]
return True
where
- startableservices = [gvfs]
+ startableservices = [gvfs, gvfsgdu]
usableservices = startableservices ++ [kde]
- gvfs = "org.gtk.Private.GduVolumeMonitor"
+ gvfs = "org.gtk.Private.RemoteVolumeMonitor"
+ gvfsgdu = "org.gtk.Private.GduVolumeMonitor"
kde = "org.kde.DeviceNotifications"
startOneService :: Client -> [ServiceName] -> Assistant Bool
@@ -118,10 +119,15 @@ startOneService client (x:xs) = do
{- Filter matching events recieved when drives are mounted and unmounted. -}
mountChanged :: [MatchRule]
-mountChanged = [gvfs True, gvfs False, kde, kdefallback]
+mountChanged = [gvfs True, gvfsgdu False, kde, kdefallback]
where
- {- gvfs reliably generates this event whenever a
+ {- gdu gvfs reliably generates this event whenever a
- drive is mounted/unmounted, whether automatically, or manually -}
+ gvfsgdu mount = matchAny
+ { matchInterface = Just "org.gtk.Private.RemoteVolumeMonitor"
+ , matchMember = Just $ if mount then "MountAdded" else "MountRemoved"
+ }
+ {- new gvfs -}
gvfs mount = matchAny
{ matchInterface = Just "org.gtk.Private.RemoteVolumeMonitor"
, matchMember = Just $ if mount then "MountAdded" else "MountRemoved"