autorun: add an AutorunManager class

AutorunManager is a class that takes care of displaying and managing
notifications and UI for storage devices.

When a mount appears and a number of conditions are satisified, a
transient notification will be displayed to immediately interact with
the device. AutorunTransientDispatcher is the object that takes care of
showing/hiding the notification sources as devices appear/disappear.

Likewise, current mounts are kept in a list and presented within a
list in a resident notification, handled by AutorunResidentSource.

https://bugzilla.gnome.org/show_bug.cgi?id=653520
This commit is contained in:
Cosimo Cecchi
2011-07-12 09:47:43 -04:00
parent 6004e3d2e1
commit 534b371d42
4 changed files with 580 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ const Meta = imports.gi.Meta;
const Shell = imports.gi.Shell;
const St = imports.gi.St;
const AutorunManager = imports.ui.autorunManager;
const Chrome = imports.ui.chrome;
const CtrlAltTab = imports.ui.ctrlAltTab;
const EndSessionDialog = imports.ui.endSessionDialog;
@@ -39,6 +40,7 @@ const Util = imports.misc.util;
const DEFAULT_BACKGROUND_COLOR = new Clutter.Color();
DEFAULT_BACKGROUND_COLOR.from_pixel(0x2266bbff);
let autorunManager = null;
let chrome = null;
let panel = null;
let hotCorners = [];
@@ -142,6 +144,7 @@ function start() {
notificationDaemon = new NotificationDaemon.NotificationDaemon();
windowAttentionHandler = new WindowAttentionHandler.WindowAttentionHandler();
telepathyClient = new TelepathyClient.Client();
autorunManager = new AutorunManager.AutorunManager();
layoutManager.init();
overview.init();