remove tray.setHighlightMode() deprecation
This commit is contained in:
parent
72c63a10ee
commit
003a5a0160
3 changed files with 0 additions and 38 deletions
|
@ -40,16 +40,6 @@ struct Converter<atom::TrayIcon::HighlightMode> {
|
|||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
bool highlight;
|
||||
if (ConvertFromV8(isolate, val, &highlight)) {
|
||||
if (highlight)
|
||||
*out = atom::TrayIcon::HighlightMode::SELECTION;
|
||||
else
|
||||
*out = atom::TrayIcon::HighlightMode::NEVER;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -53,20 +53,6 @@ ses.setCertificateVerifyProc(function (request, callback) {
|
|||
})
|
||||
```
|
||||
|
||||
## `Tray`
|
||||
|
||||
```js
|
||||
// Deprecated
|
||||
tray.setHighlightMode(true)
|
||||
// Replace with
|
||||
tray.setHighlightMode('on')
|
||||
|
||||
// Deprecated
|
||||
tray.setHighlightMode(false)
|
||||
// Replace with
|
||||
tray.setHighlightMode('off')
|
||||
```
|
||||
|
||||
## `webContents`
|
||||
|
||||
```js
|
||||
|
|
|
@ -1,20 +1,6 @@
|
|||
const {EventEmitter} = require('events')
|
||||
const {deprecate} = require('electron')
|
||||
const {Tray} = process.atomBinding('tray')
|
||||
|
||||
Object.setPrototypeOf(Tray.prototype, EventEmitter.prototype)
|
||||
|
||||
// TODO(codebytere): remove in 3.0
|
||||
const nativeSetHighlightMode = Tray.prototype.setHighlightMode
|
||||
Tray.prototype.setHighlightMode = function (param) {
|
||||
if (!process.noDeprecations && typeof param === 'boolean') {
|
||||
if (param) {
|
||||
deprecate.warn('tray.setHighlightMode(true)', `tray.setHighlightMode("on")`)
|
||||
} else {
|
||||
deprecate.warn('tray.setHighlightMode(false)', `tray.setHighlightMode("off")`)
|
||||
}
|
||||
}
|
||||
return nativeSetHighlightMode.call(this, param)
|
||||
}
|
||||
|
||||
module.exports = Tray
|
||||
|
|
Loading…
Add table
Reference in a new issue