summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2022-04-17 16:40:07 +0100
committerSimon McVittie <smcv@debian.org>2022-04-17 16:40:07 +0100
commit693f4eade318a068640c75215f4b42102503d64f (patch)
tree3745d831a004bea82446501c67024881b4c99a2e
parent4779345fcfaafd4901d442a709ab572c9ca6c378 (diff)
Drop patches, applied upstream
-rw-r--r--debian/patches/bluetooth-Adapt-to-new-GnomeBluetooth-library-in-GNOME-Sh.patch153
-rw-r--r--debian/patches/bluetooth-Use-a-separate-signal-for-changes-to-the-defaul.patch62
-rw-r--r--debian/patches/power-Use-var-syntax-to-export-object.patch27
-rw-r--r--debian/patches/series3
4 files changed, 0 insertions, 245 deletions
diff --git a/debian/patches/bluetooth-Adapt-to-new-GnomeBluetooth-library-in-GNOME-Sh.patch b/debian/patches/bluetooth-Adapt-to-new-GnomeBluetooth-library-in-GNOME-Sh.patch
deleted file mode 100644
index 1b34dbb..0000000
--- a/debian/patches/bluetooth-Adapt-to-new-GnomeBluetooth-library-in-GNOME-Sh.patch
+++ /dev/null
@@ -1,153 +0,0 @@
-From: Simon McVittie <smcv@debian.org>
-Date: Thu, 31 Mar 2022 10:37:54 +0100
-Subject: bluetooth: Adapt to new GnomeBluetooth library in GNOME Shell 42
-
-GNOME 42 has a new version of the GnomeBluetooth library, with a
-different API. Adjust to this.
-
-Signed-off-by: Simon McVittie <smcv@debian.org>
-Resolves: https://github.com/bjarosze/gnome-bluetooth-quick-connect/issues/53
-Forwarded: https://github.com/bjarosze/gnome-bluetooth-quick-connect/pull/55
-Applied-upstream: 27, commit:f240049b3a093534e4a5175d89907e6f9bfc5cbd
----
- bluetooth.js | 85 ++++++++++++++++++++++++-----------------------------------
- metadata.json | 3 +--
- 2 files changed, 35 insertions(+), 53 deletions(-)
-
-diff --git a/bluetooth.js b/bluetooth.js
-index 7472b07..d9dff16 100644
---- a/bluetooth.js
-+++ b/bluetooth.js
-@@ -24,45 +24,46 @@ const Utils = Me.imports.utils;
- var BluetoothController = class {
- constructor() {
- this._client = new GnomeBluetooth.Client();
-- this._model = this._client.get_model();
-+ this._deviceNotifyConnected = new Set();
-+ this._store = this._client.get_devices();
- }
-
- enable() {
-- this._connectSignal(this._model, 'row-changed', (arg0, arg1, iter) => {
-- if (iter) {
-- let device = this._buildDevice(iter);
-- if (device.isDefault) {
-- this.emit('default-adapter-changed', device);
-- }
-- else {
-- this.emit('device-changed', device);
-- }
-- }
--
-+ this._client.connect('notify::default-adapter', () => {
-+ this._deviceNotifyConnected.clear();
-+ this.emit('default-adapter-changed');
-+ });
-+ this._client.connect('notify::default-adapter-powered', () => {
-+ this._deviceNotifyConnected.clear();
-+ this.emit('default-adapter-changed');
- });
-- this._connectSignal(this._model, 'row-deleted', () => {
-+ this._client.connect('device-removed', (c, path) => {
-+ this._deviceNotifyConnected.delete(path);
- this.emit('device-deleted');
- });
-- this._connectSignal(this._model, 'row-inserted', (arg0, arg1, iter) => {
-- if (iter) {
-- let device = this._buildDevice(iter);
-- this.emit('device-inserted', device);
-- }
-+ this._client.connect('device-added', (c, device) => {
-+ this._connectDeviceNotify(device);
-+ this.emit('device-inserted', new BluetoothDevice(device));
- });
- }
-
-- getDevices() {
-- let adapter = this._getDefaultAdapter();
-- if (!adapter)
-- return [];
-+ _connectDeviceNotify(device) {
-+ const path = device.get_object_path();
-+
-+ if (this._deviceNotifyConnected.has(path))
-+ return;
-+
-+ device.connect('notify', (device) => {
-+ this.emit('device-changed', new BluetoothDevice(device));
-+ });
-+ }
-
-+ getDevices() {
- let devices = [];
-
-- let [ret, iter] = this._model.iter_children(adapter);
-- while (ret) {
-- let device = this._buildDevice(iter);
-+ for (let i = 0; i < this._store.get_n_items(); i++) {
-+ let device = new BluetoothDevice(this._store.get_item(i));
- devices.push(device);
-- ret = this._model.iter_next(iter);
- }
-
- return devices;
-@@ -77,39 +78,21 @@ var BluetoothController = class {
- destroy() {
- this._disconnectSignals();
- }
--
-- _getDefaultAdapter() {
-- let [ret, iter] = this._model.get_iter_first();
-- while (ret) {
-- let isDefault = this._model.get_value(iter, GnomeBluetooth.Column.DEFAULT);
-- let isPowered = this._model.get_value(iter, GnomeBluetooth.Column.POWERED);
-- if (isDefault && isPowered)
-- return iter;
-- ret = this._model.iter_next(iter);
-- }
-- return null;
-- }
--
-- _buildDevice(iter) {
-- return new BluetoothDevice(this._model, iter);
-- }
- }
-
- Signals.addSignalMethods(BluetoothController.prototype);
- Utils.addSignalsHelperMethods(BluetoothController.prototype);
-
- var BluetoothDevice = class {
-- constructor(model, iter) {
-- this._model = model;
-- this.update(iter);
-+ constructor(dev) {
-+ this.update(dev);
- }
-
-- update(iter) {
-- this.name = this._model.get_value(iter, GnomeBluetooth.Column.ALIAS) || this._model.get_value(iter, GnomeBluetooth.Column.NAME);
-- this.isConnected = this._model.get_value(iter, GnomeBluetooth.Column.CONNECTED);
-- this.isPaired = this._model.get_value(iter, GnomeBluetooth.Column.PAIRED);
-- this.mac = this._model.get_value(iter, GnomeBluetooth.Column.ADDRESS);
-- this.isDefault = this._model.get_value(iter, GnomeBluetooth.Column.DEFAULT);
-+ update(dev) {
-+ this.name = dev.alias || dev.name;
-+ this.isConnected = dev.connected;
-+ this.isPaired = dev.paired;
-+ this.mac = dev.address;
- }
-
- disconnect() {
-diff --git a/metadata.json b/metadata.json
-index 68effed..3301558 100644
---- a/metadata.json
-+++ b/metadata.json
-@@ -6,7 +6,6 @@
- "settings-schema": "org.gnome.shell.extensions.bluetooth-quick-connect",
- "gettext-domain": "bluetooth-quick-connect",
- "shell-version": [
-- "40",
-- "41"
-+ "42"
- ]
- }
diff --git a/debian/patches/bluetooth-Use-a-separate-signal-for-changes-to-the-defaul.patch b/debian/patches/bluetooth-Use-a-separate-signal-for-changes-to-the-defaul.patch
deleted file mode 100644
index 160b6dc..0000000
--- a/debian/patches/bluetooth-Use-a-separate-signal-for-changes-to-the-defaul.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From: Simon McVittie <smcv@debian.org>
-Date: Thu, 31 Mar 2022 10:13:50 +0100
-Subject: bluetooth: Use a separate signal for changes to the default adapter
-
-In gnome-bluetooth API version 1.0 (GNOME 41 and older), the Bluetooth
-adapters are part of the same GtkTreeModel as the devices attached to
-them, but in gnome-bluetooth API version 3.0 (GNOME 42) they're tracked
-separately.
-
-Signed-off-by: Simon McVittie <smcv@debian.org>
-Forwarded: https://github.com/bjarosze/gnome-bluetooth-quick-connect/pull/55
-Applied-upstream: 27, commit:f70c63f07357a0081985545e6dc447340b3d0ce9
----
- bluetooth.js | 7 ++++++-
- extension.js | 9 ++++++---
- 2 files changed, 12 insertions(+), 4 deletions(-)
-
-diff --git a/bluetooth.js b/bluetooth.js
-index a8ed5e0..7472b07 100644
---- a/bluetooth.js
-+++ b/bluetooth.js
-@@ -31,7 +31,12 @@ var BluetoothController = class {
- this._connectSignal(this._model, 'row-changed', (arg0, arg1, iter) => {
- if (iter) {
- let device = this._buildDevice(iter);
-- this.emit('device-changed', device);
-+ if (device.isDefault) {
-+ this.emit('default-adapter-changed', device);
-+ }
-+ else {
-+ this.emit('device-changed', device);
-+ }
- }
-
- });
-diff --git a/extension.js b/extension.js
-index bf89429..f154581 100644
---- a/extension.js
-+++ b/extension.js
-@@ -82,6 +82,11 @@ class BluetoothQuickConnect {
- _connectControllerSignals() {
- this._logger.info('Connecting bluetooth controller signals');
-
-+ this._connectSignal(this._controller, 'default-adapter-changed', (ctrl) => {
-+ this._logger.info('Default adapter changed event');
-+ this._refresh();
-+ });
-+
- this._connectSignal(this._controller, 'device-inserted', (ctrl, device) => {
- this._logger.info(`Device inserted event: ${device.name}`);
- if (device.isPaired) {
-@@ -93,9 +98,7 @@ class BluetoothQuickConnect {
-
- this._connectSignal(this._controller, 'device-changed', (ctrl, device) => {
- this._logger.info(`Device changed event: ${device.name}`);
-- if (device.isDefault)
-- this._refresh();
-- else if (device.isPaired)
-+ if (device.isPaired)
- this._syncMenuItem(device);
- else
- this._logger.info(`Skipping change event for unpaired device ${device.name}`);
diff --git a/debian/patches/power-Use-var-syntax-to-export-object.patch b/debian/patches/power-Use-var-syntax-to-export-object.patch
deleted file mode 100644
index fd43ef7..0000000
--- a/debian/patches/power-Use-var-syntax-to-export-object.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From: Simon McVittie <smcv@debian.org>
-Date: Thu, 31 Mar 2022 00:17:29 +0100
-Subject: power: Use var syntax to export object
-
-As per <https://gjs.guide/guides/gjs/intro.html#imports-and-modules>.
-This seems to be required by GNOME Shell 42 (gjs 1.72).
-
-Signed-off-by: Simon McVittie <smcv@debian.org>
-Forwarded: https://github.com/bjarosze/gnome-bluetooth-quick-connect/pull/55
-Applied-upstream: 27, commit:4fc876d51848ceb411031dcb6805f5570ba8f6f6
----
- power.js | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/power.js b/power.js
-index 2d82ad1..e15e24b 100644
---- a/power.js
-+++ b/power.js
-@@ -3,7 +3,7 @@ const UPower = imports.gi.UPowerGlib;
- const Me = ExtensionUtils.getCurrentExtension();
- const Utils = Me.imports.utils;
-
--class UPowerBatteryProvider {
-+var UPowerBatteryProvider = class {
- constructor(logger) {
- this._upower_client = UPower.Client.new();
- this._logger = logger;
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 39c9a88..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1,3 +0,0 @@
-power-Use-var-syntax-to-export-object.patch
-bluetooth-Use-a-separate-signal-for-changes-to-the-defaul.patch
-bluetooth-Adapt-to-new-GnomeBluetooth-library-in-GNOME-Sh.patch