Permalink
Browse files

messageTray always visible (need to be removed completely), tray icon…

…s in panel
  • Loading branch information...
clefebvre committed Dec 12, 2011
1 parent 424e4e1 commit 51eea5cbcf25b595a6c940e061a3913ab0c01a3a
Showing with 18 additions and 19 deletions.
  1. +2 −2 js/ui/layout.js
  2. +5 −5 js/ui/messageTray.js
  3. +2 −2 js/ui/panel.js
  4. +9 −10 js/ui/statusIconDispatcher.js
View
@@ -162,8 +162,8 @@ LayoutManager.prototype = {
// it (so it's not visible behind the keyboard). The exact
// height of the clip doesn't matter, as long as it's taller
// than any Notification.actor.
- this.trayBox.set_clip(0, -this.bottomMonitor.height,
- this.bottomMonitor.width, this.bottomMonitor.height);
+ //this.trayBox.set_clip(0, -this.bottomMonitor.height,
+ // this.bottomMonitor.width, this.bottomMonitor.height);
},
_updatePanelBarriers: function() {
View
@@ -2019,10 +2019,10 @@ MessageTray.prototype = {
let trayShouldBeVisible = (!notificationsDone ||
this._summaryState == State.SHOWING ||
this._summaryState == State.SHOWN);
- if (!trayIsVisible && trayShouldBeVisible)
- this._showTray();
- else if (trayIsVisible && !trayShouldBeVisible)
- this._hideTray();
+ //if (!trayIsVisible && trayShouldBeVisible)
+ this._showTray();
+ //else if (trayIsVisible && !trayShouldBeVisible)
+ // this._hideTray();
},
_tween: function(actor, statevar, value, params) {
@@ -2060,7 +2060,7 @@ MessageTray.prototype = {
{ y: -1,
time: ANIMATION_TIME,
transition: 'easeOutQuad'
- });
+ });
},
_showNotification: function() {
View
@@ -1089,8 +1089,8 @@ Panel.prototype = {
},
addToStatusArea: function(role, indicator, position) {
- if (this._statusArea[role])
- throw new Error('Extension point conflict: there is already a status indicator for role ' + role);
+ //if (this._statusArea[role])
+ // throw new Error('Extension point conflict: there is already a status indicator for role ' + role);
if (!(indicator instanceof PanelMenu.Button))
throw new TypeError('Status indicator must be an instance of PanelMenu.Button');
@@ -7,6 +7,8 @@ const Signals = imports.signals;
const MessageTray = imports.ui.messageTray;
const NotificationDaemon = imports.ui.notificationDaemon;
const Util = imports.misc.util;
+const Main = imports.ui.main;
+
const STANDARD_TRAY_ICON_IMPLEMENTATIONS = {
'bluetooth-applet': 'bluetooth',
@@ -47,19 +49,16 @@ StatusIconDispatcher.prototype = {
_onTrayIconAdded: function(o, icon) {
let wmClass = (icon.wm_class || 'unknown').toLowerCase();
let role = STANDARD_TRAY_ICON_IMPLEMENTATIONS[wmClass];
- if (role)
- this.emit('status-icon-added', icon, role);
- else
- this.emit('message-icon-added', icon);
+ if (role) {
+ Main.panel._onTrayIconAdded(o, icon, role);
+ } else {
+ role = wmClass;
+ Main.panel._onTrayIconAdded(o, icon, role);
+ }
},
_onTrayIconRemoved: function(o, icon) {
- let wmClass = (icon.wm_class || 'unknown').toLowerCase();
- let role = STANDARD_TRAY_ICON_IMPLEMENTATIONS[wmClass];
- if (role)
- this.emit('status-icon-removed', icon);
- else
- this.emit('message-icon-removed', icon);
+ Main.panel._onTrayIconRemoved(o, icon);
}
};
Signals.addSignalMethods(StatusIconDispatcher.prototype);

0 comments on commit 51eea5c

Please sign in to comment.