summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2020-09-07 18:07:38 +0100
committerSimon McVittie <smcv@debian.org>2020-09-07 18:07:38 +0100
commit8962a561afb7b92a690fbf21530449a0228ce261 (patch)
tree0347e69e15b139f6fb2ea05c24f807a3feaf75a6
parent1a81ad6297d33c3779d25dea76088879eda1c645 (diff)
d/patches: Update to upstream v13-7-g662250e
- Drop compatibility with GNOME Shell < 3.37.x - Be compatible with GNOME Shell >= 3.37.x
-rw-r--r--debian/changelog8
-rw-r--r--debian/control2
-rw-r--r--debian/patches/Update-ui.js.patch47
-rw-r--r--debian/patches/add-support-for-gnome-3.34.patch95
-rw-r--r--debian/patches/fix-gnome-version-check.patch21
-rw-r--r--debian/patches/fix-installation-instruction.patch46
-rw-r--r--debian/patches/series5
-rw-r--r--debian/patches/stop-supporting-older-gnome-versions.patch21
8 files changed, 244 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 6d2a65b..2bdaea0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+gnome-shell-extension-bluetooth-quick-connect (13-2) UNRELEASED; urgency=medium
+
+ * d/patches: Update to upstream v13-7-g662250e
+ - Drop compatibility with GNOME Shell < 3.37.x
+ - Be compatible with GNOME Shell >= 3.37.x
+
+ -- Simon McVittie <smcv@debian.org> Mon, 07 Sep 2020 18:06:37 +0100
+
gnome-shell-extension-bluetooth-quick-connect (13-1) unstable; urgency=medium
* New upstream release
diff --git a/debian/control b/debian/control
index 8eed82b..b5e4ab6 100644
--- a/debian/control
+++ b/debian/control
@@ -17,7 +17,7 @@ Package: gnome-shell-extension-bluetooth-quick-connect
Architecture: all
Depends:
gnome-shell (<< 3.39),
- gnome-shell (>= 3.36),
+ gnome-shell (>= 3.37),
${misc:Depends},
Recommends:
gnome-shell-extension-prefs,
diff --git a/debian/patches/Update-ui.js.patch b/debian/patches/Update-ui.js.patch
new file mode 100644
index 0000000..26f563d
--- /dev/null
+++ b/debian/patches/Update-ui.js.patch
@@ -0,0 +1,47 @@
+From: Raushan Kumar Pandey <raushan.kumar478@gmail.com>
+Date: Wed, 2 Sep 2020 01:30:42 +0530
+Subject: Update ui.js
+
+Tweener has been removed from gnome-shell. This changes fixes the issue in gnome 3.38
+---
+ ui.js | 11 ++++-------
+ 1 file changed, 4 insertions(+), 7 deletions(-)
+
+diff --git a/ui.js b/ui.js
+index 5b703fa..ea3354b 100644
+--- a/ui.js
++++ b/ui.js
+@@ -18,7 +18,6 @@
+ const Clutter = imports.gi.Clutter;
+ const GObject = imports.gi.GObject;
+ const St = imports.gi.St;
+-const Tweener = imports.ui.tweener;
+ const PopupMenu = imports.ui.popupMenu;
+ const Config = imports.misc.config;
+
+@@ -79,21 +78,19 @@ var PopupBluetoothDeviceMenuItem = GObject.registerClass(
+ });
+
+ button.connect("enter-event", (widget) => {
+- Tweener.addTween(
+- widget.child, {
++ widget.child.ease( {
+ opacity: 255,
+ time: 0.05,
+- transition: 'linear'
++ transition: Clutter.AnimationMode.LINEAR
+ }
+ );
+ });
+
+ button.connect("leave-event", (widget) => {
+- Tweener.addTween(
+- widget.child, {
++ widget.child.ease( {
+ opacity: 155,
+ time: 0.05,
+- transition: 'linear'
++ transition: Clutter.AnimationMode.LINEAR
+ }
+ );
+ });
diff --git a/debian/patches/add-support-for-gnome-3.34.patch b/debian/patches/add-support-for-gnome-3.34.patch
new file mode 100644
index 0000000..aa2ff28
--- /dev/null
+++ b/debian/patches/add-support-for-gnome-3.34.patch
@@ -0,0 +1,95 @@
+From: Bartosz Jaroszewski <b.jarosze@gmail.com>
+Date: Sun, 7 Jun 2020 14:20:33 +0200
+Subject: add support for gnome 3.34
+
+---
+ metadata.json | 3 ++-
+ ui.js | 28 ++++++++++++++++++----------
+ 2 files changed, 20 insertions(+), 11 deletions(-)
+
+diff --git a/metadata.json b/metadata.json
+index bc3f83f..e710ffd 100644
+--- a/metadata.json
++++ b/metadata.json
+@@ -6,6 +6,7 @@
+ "settings-schema": "org.gnome.shell.extensions.bluetooth-quick-connect",
+ "gettext-domain": "bluetooth-quick-connect",
+ "shell-version": [
+- "3.36"
++ "3.36",
++ "3.34"
+ ]
+ }
+diff --git a/ui.js b/ui.js
+index e773f98..b2dc363 100644
+--- a/ui.js
++++ b/ui.js
+@@ -20,11 +20,7 @@ const GObject = imports.gi.GObject;
+ const St = imports.gi.St;
+ const Tweener = imports.ui.tweener;
+ const PopupMenu = imports.ui.popupMenu;
+-
+-const ExtensionUtils = imports.misc.extensionUtils;
+-const Me = ExtensionUtils.getCurrentExtension();
+-const Utils = Me.imports.utils;
+-
++const Config = imports.misc.config;
+
+ var PopupBluetoothDeviceMenuItem = GObject.registerClass(
+ class PopupSwitchWithButtonMenuItem extends PopupMenu.PopupSwitchMenuItem {
+@@ -42,6 +38,11 @@ var PopupBluetoothDeviceMenuItem = GObject.registerClass(
+ this._pendingLabel = this._buildPendingLabel();
+ this._connectToggledEvent();
+
++ if (this._isOldGnome()) {
++ this.remove_child(this._statusBin);
++ this.add(this._statusBin, { expand: false });
++ }
++
+ this.insert_child_at_index(this._refreshButton, this.get_n_children() - 1);
+ this.add_child(this._pendingLabel);
+
+@@ -50,7 +51,7 @@ var PopupBluetoothDeviceMenuItem = GObject.registerClass(
+
+ sync(device) {
+ this._device = device;
+- this._switch.state = device.isConnected;
++ this._syncSwitch(device);
+ this.visible = device.isPaired;
+ if (this._showRefreshButton && device.isConnected)
+ this._refreshButton.show();
+@@ -58,6 +59,13 @@ var PopupBluetoothDeviceMenuItem = GObject.registerClass(
+ this._refreshButton.hide();
+ }
+
++ _syncSwitch(device) {
++ if (this._isOldGnome())
++ return this._switch.setToggleState(device.isConnected);
++
++ this._switch.state = device.isConnected;
++ }
++
+ _buildRefreshButton() {
+ let icon = new St.Icon({
+ icon_name: 'view-refresh',
+@@ -144,10 +152,6 @@ var PopupBluetoothDeviceMenuItem = GObject.registerClass(
+ this._enablePending();
+ }
+
+- hideRefreshButton() {
+- this._refreshButton.hide();
+- }
+-
+ _enablePending() {
+ this._refreshButton.reactive = false;
+ this._switch.hide();
+@@ -161,5 +165,9 @@ var PopupBluetoothDeviceMenuItem = GObject.registerClass(
+ this._pendingLabel.hide();
+ this.reactive = true;
+ }
++
++ _isOldGnome() {
++ return Config.PACKAGE_VERSION.match(/3\.3[24]/);
++ }
+ }
+ );
diff --git a/debian/patches/fix-gnome-version-check.patch b/debian/patches/fix-gnome-version-check.patch
new file mode 100644
index 0000000..124b729
--- /dev/null
+++ b/debian/patches/fix-gnome-version-check.patch
@@ -0,0 +1,21 @@
+From: Bartosz Jaroszewski <b.jarosze@gmail.com>
+Date: Sun, 7 Jun 2020 15:41:25 +0200
+Subject: fix gnome version check
+
+---
+ ui.js | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ui.js b/ui.js
+index b2dc363..5b703fa 100644
+--- a/ui.js
++++ b/ui.js
+@@ -167,7 +167,7 @@ var PopupBluetoothDeviceMenuItem = GObject.registerClass(
+ }
+
+ _isOldGnome() {
+- return Config.PACKAGE_VERSION.match(/3\.3[24]/);
++ return Config.PACKAGE_VERSION.startsWith('3.34');
+ }
+ }
+ );
diff --git a/debian/patches/fix-installation-instruction.patch b/debian/patches/fix-installation-instruction.patch
new file mode 100644
index 0000000..47317b1
--- /dev/null
+++ b/debian/patches/fix-installation-instruction.patch
@@ -0,0 +1,46 @@
+From: Bartosz Jaroszewski <b.jarosze@gmail.com>
+Date: Sun, 7 Jun 2020 14:05:25 +0200
+Subject: fix installation instruction
+
+---
+ README.md | 5 +++--
+ ui.js | 3 ++-
+ 2 files changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/README.md b/README.md
+index 12b32e5..b93d4c9 100644
+--- a/README.md
++++ b/README.md
+@@ -18,8 +18,9 @@ https://extensions.gnome.org/extension/1401/bluetooth-quick-connect/
+ git clone https://github.com/bjarosze/gnome-bluetooth-quick-connect
+ cd gnome-bluetooth-quick-connect
+ make
+-rm -r ~/.local/share/gnome-shell/extensions/bluetooth-quick-connect@bjarosze.gmail.com
+-cp -r gnome-bluetooth-quick-connect ~/.local/share/gnome-shell/extensions/bluetooth-quick-connect@bjarosze.gmail.com
++rm -rf ~/.local/share/gnome-shell/extensions/bluetooth-quick-connect@bjarosze.gmail.com
++mkdir -p ~/.local/share/gnome-shell/extensions/bluetooth-quick-connect@bjarosze.gmail.com
++cp -r * ~/.local/share/gnome-shell/extensions/bluetooth-quick-connect@bjarosze.gmail.com
+ ```
+
+ ## Troubleshooting
+diff --git a/ui.js b/ui.js
+index 86deae4..e773f98 100644
+--- a/ui.js
++++ b/ui.js
+@@ -25,6 +25,7 @@ const ExtensionUtils = imports.misc.extensionUtils;
+ const Me = ExtensionUtils.getCurrentExtension();
+ const Utils = Me.imports.utils;
+
++
+ var PopupBluetoothDeviceMenuItem = GObject.registerClass(
+ class PopupSwitchWithButtonMenuItem extends PopupMenu.PopupSwitchMenuItem {
+ _init(device, params) {
+@@ -66,7 +67,7 @@ var PopupBluetoothDeviceMenuItem = GObject.registerClass(
+
+ let button = new St.Button({
+ child: icon,
+- x_align: Clutter.ActorAlign.END
++ x_align: St.Align.END
+ });
+
+ button.connect("enter-event", (widget) => {
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..3f988a4
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,5 @@
+fix-installation-instruction.patch
+add-support-for-gnome-3.34.patch
+fix-gnome-version-check.patch
+Update-ui.js.patch
+stop-supporting-older-gnome-versions.patch
diff --git a/debian/patches/stop-supporting-older-gnome-versions.patch b/debian/patches/stop-supporting-older-gnome-versions.patch
new file mode 100644
index 0000000..6ce68f4
--- /dev/null
+++ b/debian/patches/stop-supporting-older-gnome-versions.patch
@@ -0,0 +1,21 @@
+From: Bartosz Jaroszewski <b.jarosze@gmail.com>
+Date: Thu, 3 Sep 2020 16:45:17 +0200
+Subject: stop supporting older gnome versions
+
+---
+ metadata.json | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/metadata.json b/metadata.json
+index e710ffd..925b6c8 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": [
+- "3.36",
+- "3.34"
++ "3.38"
+ ]
+ }