~darkxst/ubuntu/saucy/gnome-shell/upstart_log

« back to all changes in this revision

Viewing changes to js/ui/components/automountManager.js

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-05-31 12:01:12 UTC
  • mfrom: (1.1.49) (19.1.36 experimental)
  • Revision ID: package-import@ubuntu.com-20130531120112-ew91khxf051x9i2r
Tags: 3.8.2-1ubuntu1
* Merge with Debian (LP: #1185869, #1185721). Remaining changes:
  - debian/control.in:
    + Build-depend on libsystemd-login-dev & libsystemd-daemon-dev
    + Depend on gdm instead of gdm3
    + Don't recommend gnome-session-fallback
  - debian/patches/40_change-pam-name-to-match-gdm.patch:
  - debian/patches/revert-suspend-break.patch:
    + Disabled, not needed on Ubuntu
  - debian/patches/ubuntu-lightdm-user-switching.patch:
    + Allow user switching when using LightDM. Thanks Gerhard Stein
      for rebasing against gnome-shell 3.8!
  - debian/patches/ubuntu_lock_on_suspend.patch
    + Respect Ubuntu's lock-on-suspend setting.
      Disabled until it can be rewritten.
  - debian/patches/git_relock_screen_after_crash.patch:
    + Add Upstream fix for unlocked session after crash (LP: #1064584)
* Note that the new GNOME Classic mode (which requires installing
  gnome-shell-extensions) won't work until gnome-session 3.8 is
  available in Ubuntu

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
const Shell = imports.gi.Shell;
9
9
 
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;
14
13
 
33
32
                                    Lang.bind(this, this._InhibitorsChanged));
34
33
        this._inhibited = false;
35
34
 
36
 
        this._loginManager = LoginManager.getLoginManager();
37
35
        this._volumeMonitor = Gio.VolumeMonitor.get();
38
36
    },
39
37
 
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)
89
87
            return;
90
88
 
91
 
        global.play_theme_sound(0, 'device-added-media');
 
89
        global.play_theme_sound(0, 'device-added-media',
 
90
                                _("External drive connected"),
 
91
                                null);
92
92
    },
93
93
 
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)
98
98
            return;
99
99
 
100
 
        global.play_theme_sound(0, 'device-removed-media');        
 
100
        global.play_theme_sound(0, 'device-removed-media',
 
101
                                _("External drive disconnected"),
 
102
                                null);
101
103
    },
102
104
 
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)
107
109
            return;
108
110
 
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)
147
149
                return;
148
150
        }
149
151