automount: add an AutomountManager class
The AutomountManager class is the low-level counterpart of the previously introduced AutorunManager, and takes care of extracting the list of valid mounts from a GVolume or a GDrive and mounting them, provided a number of conditions and requirements are met. AutomountManager also keeps track of the current session availability (using the ConsoleKit and gnome-screensaver DBus interfaces) and inhibits mounting if the current session is locked, or another session is in use instead. https://bugzilla.gnome.org/show_bug.cgi?id=653520
This commit is contained in:
@ -118,6 +118,11 @@ AutorunManager.prototype = {
|
||||
},
|
||||
|
||||
_onMountAdded: function(monitor, mount) {
|
||||
// don't do anything if our session is not the currently
|
||||
// active one
|
||||
if (!Main.automountManager.ckListener.sessionActive)
|
||||
return;
|
||||
|
||||
let discoverer = new ContentTypeDiscoverer(Lang.bind (this,
|
||||
function (mount, contentTypes) {
|
||||
this._transDispatcher.addMount(mount, contentTypes);
|
||||
|
Reference in New Issue
Block a user