8
8
const Shell = imports.gi.Shell;
10
10
const GnomeSession = imports.misc.gnomeSession;
11
const LoginManager = imports.misc.loginManager;
12
11
const Main = imports.ui.main;
13
12
const ShellMountOperation = imports.ui.shellMountOperation;
85
83
_onDriveConnected: function() {
86
84
// if we're not in the current ConsoleKit session,
87
85
// or screensaver is active, don't play sounds
88
if (!this._loginManager.sessionActive)
86
if (!this._session.SessionIsActive)
91
global.play_theme_sound(0, 'device-added-media');
89
global.play_theme_sound(0, 'device-added-media',
90
_("External drive connected"),
94
94
_onDriveDisconnected: function() {
95
95
// if we're not in the current ConsoleKit session,
96
96
// or screensaver is active, don't play sounds
97
if (!this._loginManager.sessionActive)
97
if (!this._session.SessionIsActive)
100
global.play_theme_sound(0, 'device-removed-media');
100
global.play_theme_sound(0, 'device-removed-media',
101
_("External drive disconnected"),
103
105
_onDriveEjectButton: function(monitor, drive) {
104
106
// TODO: this code path is not tested, as the GVfs volume monitor
105
107
// doesn't emit this signal just yet.
106
if (!this._loginManager.sessionActive)
108
if (!this._session.SessionIsActive)
109
111
// we force stop/eject in this case, so we don't have to pass a
143
145
if (params.checkSession) {
144
146
// if we're not in the current ConsoleKit session,
145
147
// don't attempt automount
146
if (!this._loginManager.sessionActive)
148
if (!this._session.SessionIsActive)