From 003a5a01608d07284e5041c23f9974c5e0ff5257 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 23 May 2018 09:20:39 -0700 Subject: [PATCH] remove tray.setHighlightMode() deprecation --- atom/browser/api/atom_api_tray.cc | 10 ---------- docs/tutorial/planned-breaking-changes.md | 14 -------------- lib/browser/api/tray.js | 14 -------------- 3 files changed, 38 deletions(-) diff --git a/atom/browser/api/atom_api_tray.cc b/atom/browser/api/atom_api_tray.cc index 20416b012c33..552563bacfcd 100644 --- a/atom/browser/api/atom_api_tray.cc +++ b/atom/browser/api/atom_api_tray.cc @@ -40,16 +40,6 @@ struct Converter { 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; } }; diff --git a/docs/tutorial/planned-breaking-changes.md b/docs/tutorial/planned-breaking-changes.md index 90f6b6045f3c..2785527f02a2 100644 --- a/docs/tutorial/planned-breaking-changes.md +++ b/docs/tutorial/planned-breaking-changes.md @@ -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 diff --git a/lib/browser/api/tray.js b/lib/browser/api/tray.js index 8f2ee5acd0af..bc0a9d26f655 100644 --- a/lib/browser/api/tray.js +++ b/lib/browser/api/tray.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