first pass at standardizing; suite still passing!

This commit is contained in:
Zeke Sikelianos 2016-03-24 13:15:04 -07:00 committed by Kevin Sawicki
parent f25c3d33b6
commit 4794385fac
30 changed files with 1454 additions and 1462 deletions

View file

@ -1,23 +1,23 @@
const deprecate = require('electron').deprecate;
const EventEmitter = require('events').EventEmitter;
const Tray = process.atomBinding('tray').Tray;
const deprecate = require('electron').deprecate
const EventEmitter = require('events').EventEmitter
const Tray = process.atomBinding('tray').Tray
Tray.prototype.__proto__ = EventEmitter.prototype;
Tray.prototype.__proto__ = EventEmitter.prototype
Tray.prototype._init = function() {
Tray.prototype._init = function () {
// Deprecated.
deprecate.rename(this, 'popContextMenu', 'popUpContextMenu');
deprecate.event(this, 'clicked', 'click');
deprecate.event(this, 'double-clicked', 'double-click');
deprecate.event(this, 'right-clicked', 'right-click');
return deprecate.event(this, 'balloon-clicked', 'balloon-click');
};
deprecate.rename(this, 'popContextMenu', 'popUpContextMenu')
deprecate.event(this, 'clicked', 'click')
deprecate.event(this, 'double-clicked', 'double-click')
deprecate.event(this, 'right-clicked', 'right-click')
return deprecate.event(this, 'balloon-clicked', 'balloon-click')
}
Tray.prototype.setContextMenu = function(menu) {
this._setContextMenu(menu);
Tray.prototype.setContextMenu = function (menu) {
this._setContextMenu(menu)
// Keep a strong reference of menu.
return this.menu = menu;
};
return this.menu = menu
}
module.exports = Tray;
module.exports = Tray