From 5449c3e83ec7eff32f19d34d7390ea5b67ff7a97 Mon Sep 17 00:00:00 2001 From: Andy Holmes Date: Sat, 25 Feb 2023 12:24:46 -0800 Subject: [PATCH] quickSettings: Add a getter for the deprecated label property Since the `label` property was deprecated there have already been reports of fatal errors for some extensions, so add a deprecated getter with a warning to ease migration. Part-of: --- js/ui/quickSettings.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/ui/quickSettings.js b/js/ui/quickSettings.js index 4868cf6b3..d0dc2e996 100644 --- a/js/ui/quickSettings.js +++ b/js/ui/quickSettings.js @@ -124,6 +124,11 @@ var QuickToggle = GObject.registerClass({ null); } + get label() { + console.warn('Trying to get label from QuickToggle. Use title instead.'); + return this.title; + } + set label(label) { console.warn('Trying to set label on QuickToggle. Use title instead.'); this.title = label;