Add demands attention support to the messagetray

Inform the user about demands attention events using the messagetray.

Clicking on the notification icon moves the user to the window.

It differentiates between newly started apps and windows of already running apps, by showing different banners for this cases.

It is based on Jon Nettleton's "window attention" extension.

https://bugzilla.gnome.org/show_bug.cgi?id=610594
This commit is contained in:
Adel Gadllah
2010-02-22 19:53:41 +01:00
parent b2db95380b
commit 059504ca70
3 changed files with 113 additions and 0 deletions

View File

@ -22,6 +22,7 @@ const PlaceDisplay = imports.ui.placeDisplay;
const RunDialog = imports.ui.runDialog;
const LookingGlass = imports.ui.lookingGlass;
const NotificationDaemon = imports.ui.notificationDaemon;
const WindowAttentionHandler = imports.ui.windowAttentionHandler;
const ShellDBus = imports.ui.shellDBus;
const Sidebar = imports.ui.sidebar;
const WindowManager = imports.ui.windowManager;
@ -39,6 +40,7 @@ let lookingGlass = null;
let wm = null;
let notificationDaemon = null;
let messageTray = null;
let windowAttentionHandler = null;
let recorder = null;
let shellDBusService = null;
let modalCount = 0;
@ -116,6 +118,7 @@ function start() {
sidebar = new Sidebar.Sidebar();
wm = new WindowManager.WindowManager();
notificationDaemon = new NotificationDaemon.NotificationDaemon();
windowAttentionHandler = new WindowAttentionHandler.WindowAttentionHandler();
messageTray = new MessageTray.MessageTray();
_startDate = new Date();