diff options
-rwxr-xr-x | .extract.sh | 2 | ||||
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | Settings.ui | 543 | ||||
-rw-r--r-- | debian/changelog | 24 | ||||
-rw-r--r-- | debian/control | 6 | ||||
-rw-r--r-- | debian/patches/Update-ui.js.patch | 47 | ||||
-rw-r--r-- | debian/patches/add-support-for-gnome-3.34.patch | 95 | ||||
-rw-r--r-- | debian/patches/fix-gnome-version-check.patch | 21 | ||||
-rw-r--r-- | debian/patches/fix-installation-instruction.patch | 46 | ||||
-rw-r--r-- | debian/patches/series | 5 | ||||
-rw-r--r-- | debian/patches/stop-supporting-older-gnome-versions.patch | 21 | ||||
-rwxr-xr-x | debian/rules | 3 | ||||
-rw-r--r-- | debian/watch | 2 | ||||
-rw-r--r-- | metadata.json | 5 | ||||
-rw-r--r-- | prefs.js | 15 | ||||
-rw-r--r-- | settings.js | 6 | ||||
-rw-r--r-- | ui.js | 3 | ||||
-rw-r--r-- | utils.js | 6 |
18 files changed, 318 insertions, 535 deletions
diff --git a/.extract.sh b/.extract.sh index a4578fe..b26f890 100755 --- a/.extract.sh +++ b/.extract.sh @@ -14,7 +14,7 @@ fi mkdir -p "$dir" cd "$dir" -GS=/usr/lib/gnome-shell/libgnome-shell.so +GS=/usr/lib64/gnome-shell/libgnome-shell.so for r in $(gresource list $GS); do t="${r/#\/org\/gnome\/shell\/}" @@ -11,4 +11,7 @@ dist: all clean: rm -fr gnome-bluetooth-quick-connect.zip schemas/gschemas.compiled +install: dist + gnome-extensions install --force gnome-bluetooth-quick-connect.zip + .PHONY: all clean dist diff --git a/Settings.ui b/Settings.ui index d8acbe8..cd9a5a5 100644 --- a/Settings.ui +++ b/Settings.ui @@ -1,79 +1,69 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.38.2 --> <!-- Copyright 2018 Bartosz Jaroszewski SPDX-License-Identifier: GPL-2.0-or-later (see extension.js for details) --> -<!-- Generated with glade 3.20.0 --> <interface> - <requires lib="gtk+" version="3.12"/> + <requires lib="gtk+" version="3.12" /> <object class="GtkAdjustment" id="auto_power_off_interval_adjustment"> <property name="lower">1</property> <property name="upper">3600</property> - <property name="step_increment">1</property> - <property name="page_increment">5</property> + <property name="step-increment">1</property> + <property name="page-increment">5</property> </object> <object class="GtkBox" id="auto_power_off_settings"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="margin_left">24</property> - <property name="margin_right">24</property> - <property name="margin_top">24</property> - <property name="margin_bottom">24</property> + <property name="can-focus">False</property> + <property name="margin-start">24</property> + <property name="margin-end">24</property> + <property name="margin-top">24</property> + <property name="margin-bottom">24</property> <property name="orientation">vertical</property> <property name="spacing">24</property> <child> <object class="GtkFrame"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> + <property name="can-focus">False</property> + <property name="label-xalign">0</property> <child> <object class="GtkListBox"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="selection_mode">none</property> + <property name="can-focus">False</property> + <property name="selection-mode">none</property> <child> <object class="GtkListBoxRow"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <child> - <object class="GtkGrid"> + <object class="GtkBox"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="margin_left">12</property> - <property name="margin_right">12</property> - <property name="margin_top">12</property> - <property name="margin_bottom">12</property> - <property name="column_spacing">32</property> + <property name="can-focus">False</property> + <property name="margin-start">12</property> + <property name="margin-end">12</property> + <property name="margin-top">12</property> + <property name="margin-bottom">12</property> <child> <object class="GtkLabel"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes">Checking idle inteval (seconds)</property> - <property name="xalign">0</property> </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> - </packing> </child> <child> <object class="GtkSpinButton" id="auto_power_off_interval"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="halign">end</property> <property name="hexpand">True</property> <property name="text">60</property> <property name="adjustment">auto_power_off_interval_adjustment</property> - <property name="climb_rate">1</property> - <property name="snap_to_ticks">True</property> + <property name="climb-rate">1</property> + <property name="snap-to-ticks">True</property> <property name="numeric">True</property> </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> - </packing> + </child> </object> </child> @@ -82,293 +72,294 @@ SPDX-License-Identifier: GPL-2.0-or-later </object> </child> </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> </child> </object> - <object class="GtkBox" id="bluetooth_quick_connect_settings"> + <object class="GtkScrolledWindow" id="items_container"> + <!-- <property name="width-request">450</property> --> + <!-- <property name="height-request">692</property> --> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="margin_left">24</property> - <property name="margin_right">24</property> - <property name="margin_top">24</property> - <property name="margin_bottom">24</property> - <property name="orientation">vertical</property> - <property name="spacing">24</property> + <property name="can-focus">True</property> + <property name="vexpand">True</property> + <property name="hscrollbar-policy">never</property> <child> - <object class="GtkFrame"> + <object class="GtkViewport" id="main_prefs_vp"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label_xalign">0</property> - <property name="shadow_type">in</property> + <property name="can-focus">False</property> <child> - <object class="GtkListBox"> + <object class="GtkBox" id="bluetooth_quick_connect_settings"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="selection_mode">none</property> - <child> - <object class="GtkListBoxRow"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <child> - <object class="GtkGrid"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="margin_left">12</property> - <property name="margin_right">12</property> - <property name="margin_top">12</property> - <property name="margin_bottom">12</property> - <property name="column_spacing">32</property> - <child> - <object class="GtkSwitch" id="auto_power_on_switch"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="halign">end</property> - <property name="valign">center</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="auto_power_on_label"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="hexpand">True</property> - <property name="label" translatable="yes">Enable bluetooth when menu opened</property> - <property name="xalign">0</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> - </packing> - </child> - </object> - </child> - </object> - </child> + <property name="can-focus">False</property> + <property name="margin-start">24</property> + <property name="margin-end">24</property> + <property name="margin-top">24</property> + <property name="margin-bottom">24</property> + <property name="orientation">vertical</property> + <property name="spacing">24</property> <child> - <object class="GtkListBoxRow"> - <property name="width_request">100</property> + <object class="GtkFrame"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">False</property> + <property name="label-xalign">0</property> <child> - <object class="GtkGrid"> + <object class="GtkListBox"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="margin_left">12</property> - <property name="margin_right">12</property> - <property name="margin_top">12</property> - <property name="margin_bottom">12</property> - <property name="column_spacing">32</property> + <property name="can-focus">False</property> + <property name="selection-mode">none</property> <child> - <object class="GtkLabel" id="auto_power_off_label"> + <object class="GtkListBoxRow"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="hexpand">True</property> - <property name="label" translatable="yes">Disable bluetooth if idle</property> - <property name="use_markup">True</property> - <property name="xalign">0</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> - </packing> - </child> - <child> - <object class="GtkBox"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="spacing">6</property> + <property name="can-focus">True</property> <child> - <object class="GtkButton" id="auto_power_off_settings_button"> + <!-- n-columns=2 n-rows=1 --> + <object class="GtkGrid"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="halign">center</property> - <property name="valign">center</property> - <property name="xalign">0.46000000834465027</property> + <property name="can-focus">False</property> + <property name="margin-start">12</property> + <property name="margin-end">12</property> + <property name="margin-top">12</property> + <property name="margin-bottom">12</property> + <property name="column-spacing">32</property> <child> - <object class="GtkImage" id="image_window_previews_options2"> + <object class="GtkSwitch" id="auto_power_on_switch"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="icon_name">emblem-system-symbolic</property> + <property name="can-focus">True</property> + <property name="halign">end</property> + <property name="valign">center</property> + <layout> + <property name="column">1</property> + <property name="row">0</property> + </layout> + </object> + </child> + <child> + <object class="GtkLabel" id="auto_power_on_label"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="halign">start</property> + <property name="hexpand">True</property> + <property name="label" translatable="yes">Enable bluetooth when menu opened</property> + <layout> + <property name="column">0</property> + <property name="row">0</property> + </layout> </object> </child> - <style> - <class name="circular"/> - </style> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkSwitch" id="auto_power_off_switch"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="halign">end</property> - <property name="valign">center</property> </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> </child> </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> - </packing> </child> - </object> - </child> - </object> - </child> - <child> - <object class="GtkListBoxRow"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <child> - <object class="GtkGrid"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="margin_left">12</property> - <property name="margin_right">12</property> - <property name="margin_top">12</property> - <property name="margin_bottom">12</property> - <property name="column_spacing">32</property> <child> - <object class="GtkSwitch" id="keep_menu_on_toggle"> + <object class="GtkListBoxRow"> + <property name="width-request">100</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="halign">end</property> - <property name="valign">center</property> + <property name="can-focus">True</property> + <child> + <!-- n-columns=2 n-rows=1 --> + <object class="GtkGrid"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="margin-start">12</property> + <property name="margin-end">12</property> + <property name="margin-top">12</property> + <property name="margin-bottom">12</property> + <property name="column-spacing">32</property> + <child> + <object class="GtkLabel" id="auto_power_off_label"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="halign">start</property> + <property name="hexpand">True</property> + <property name="label" translatable="yes">Disable bluetooth if idle</property> + <property name="use-markup">True</property> + <layout> + <property name="column">0</property> + <property name="row">0</property> + </layout> + </object> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="spacing">6</property> + <child> + <object class="GtkButton" id="auto_power_off_settings_button"> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> + <property name="valign">center</property> + <child> + <object class="GtkImage" id="image_window_previews_options2"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="icon-name">emblem-system-symbolic</property> + </object> + </child> + <style> + <class name="circular" /> + </style> + </object> + + </child> + <child> + <object class="GtkSwitch" id="auto_power_off_switch"> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="halign">end</property> + <property name="valign">center</property> + </object> + + </child> + <layout> + <property name="column">1</property> + <property name="row">0</property> + </layout> + </object> + </child> + </object> + </child> </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> - </packing> </child> <child> - <object class="GtkLabel" id="keep_menu_on_toggle_label"> + <object class="GtkListBoxRow"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="hexpand">True</property> - <property name="label" translatable="yes">Keep the menu open after toggling the connection (restart required)</property> - <property name="xalign">0</property> + <property name="can-focus">True</property> + <child> + <!-- n-columns=2 n-rows=1 --> + <object class="GtkGrid"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="margin-start">12</property> + <property name="margin-end">12</property> + <property name="margin-top">12</property> + <property name="margin-bottom">12</property> + <property name="column-spacing">32</property> + <child> + <object class="GtkSwitch" id="keep_menu_on_toggle"> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="halign">end</property> + <property name="valign">center</property> + <layout> + <property name="column">1</property> + <property name="row">0</property> + </layout> + </object> + </child> + <child> + <object class="GtkLabel" id="keep_menu_on_toggle_label"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="halign">start</property> + <property name="hexpand">True</property> + <property name="label" translatable="yes">Keep the menu open after toggling the connection (restart required)</property> + <layout> + <property name="column">0</property> + <property name="row">0</property> + </layout> + </object> + </child> + </object> + </child> </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> - </packing> </child> - </object> - </child> - </object> - </child> - <child> - <object class="GtkListBoxRow"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <child> - <object class="GtkGrid"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="margin_left">12</property> - <property name="margin_right">12</property> - <property name="margin_top">12</property> - <property name="margin_bottom">12</property> - <property name="column_spacing">32</property> <child> - <object class="GtkSwitch" id="refresh_button_on"> + <object class="GtkListBoxRow"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="halign">end</property> - <property name="valign">center</property> + <property name="can-focus">True</property> + <child> + <!-- n-columns=2 n-rows=1 --> + <object class="GtkGrid"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="margin-start">12</property> + <property name="margin-end">12</property> + <property name="margin-top">12</property> + <property name="margin-bottom">12</property> + <property name="column-spacing">32</property> + <child> + <object class="GtkSwitch" id="refresh_button_on"> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="halign">end</property> + <property name="valign">center</property> + <layout> + <property name="column">1</property> + <property name="row">0</property> + </layout> + </object> + </child> + <child> + <object class="GtkLabel" id="refresh_button_on_label"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="halign">start</property> + <property name="hexpand">True</property> + <property name="label" translatable="yes">Show reconnect button (restart required)</property> + <layout> + <property name="column">0</property> + <property name="row">0</property> + </layout> + </object> + </child> + </object> + </child> </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> - </packing> </child> <child> - <object class="GtkLabel" id="refresh_button_on_label"> + <object class="GtkListBoxRow"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="hexpand">True</property> - <property name="label" translatable="yes">Show reconnect button (restart required)</property> - <property name="xalign">0</property> + <property name="can-focus">True</property> + <child> + <!-- n-columns=2 n-rows=1 --> + <object class="GtkGrid"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="margin-start">12</property> + <property name="margin-end">12</property> + <property name="margin-top">12</property> + <property name="margin-bottom">12</property> + <property name="column-spacing">32</property> + <child> + <object class="GtkSwitch" id="debug_mode_on"> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="halign">end</property> + <property name="valign">center</property> + <layout> + <property name="column">1</property> + <property name="row">0</property> + </layout> + </object> + </child> + <child> + <object class="GtkLabel" id="debug_mode_on_label"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="halign">start</property> + <property name="hexpand">True</property> + <property name="label" translatable="yes">Debug mode (restart required)</property> + <layout> + <property name="column">0</property> + <property name="row">0</property> + </layout> + </object> + </child> + </object> + </child> </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> - </packing> </child> </object> </child> - </object> - </child> - <child> - <object class="GtkListBoxRow"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <child> - <object class="GtkGrid"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="margin_left">12</property> - <property name="margin_right">12</property> - <property name="margin_top">12</property> - <property name="margin_bottom">12</property> - <property name="column_spacing">32</property> - <child> - <object class="GtkSwitch" id="debug_mode_on"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="halign">end</property> - <property name="valign">center</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="debug_mode_on_label"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="hexpand">True</property> - <property name="label" translatable="yes">Debug mode (restart required)</property> - <property name="xalign">0</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> - </packing> - </child> - </object> + <child type="label_item"> + <placeholder /> </child> </object> + </child> </object> </child> - <child type="label_item"> - <placeholder/> - </child> </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> </child> </object> -</interface> +</interface>
\ No newline at end of file diff --git a/debian/changelog b/debian/changelog index 7635130..ef1090f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,27 @@ +gnome-shell-extension-bluetooth-quick-connect (20-1) experimental; urgency=medium + + * New upstream release for GNOME 40 (Closes: #993057) + * d/watch: Update for Github changes + * Use debhelper compat level 13 + * Disable dh_auto_install. + It doesn't do the right thing for upstream's `make install`. + + -- Simon McVittie <smcv@debian.org> Tue, 31 Aug 2021 10:33:02 +0100 + +gnome-shell-extension-bluetooth-quick-connect (16-1) unstable; urgency=medium + + * New upstream release + - Drop patch series + - The code is identical to the patched versions 13-2 and 13-3 + + -- Simon McVittie <smcv@debian.org> Sat, 31 Oct 2020 11:32:12 +0000 + +gnome-shell-extension-bluetooth-quick-connect (13-3) unstable; urgency=medium + + * Release to unstable + + -- Simon McVittie <smcv@debian.org> Sat, 26 Sep 2020 11:30:25 +0100 + gnome-shell-extension-bluetooth-quick-connect (13-2) experimental; urgency=medium * d/patches: Update to upstream v13-7-g662250e diff --git a/debian/control b/debian/control index b5e4ab6..3e02cd8 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,7 @@ Priority: optional Maintainer: Simon McVittie <smcv@debian.org> Uploaders: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org> Build-Depends: - debhelper-compat (= 12), + debhelper-compat (= 13), gettext, libglib2.0-bin, Standards-Version: 4.5.0 @@ -16,8 +16,8 @@ Rules-Requires-Root: no Package: gnome-shell-extension-bluetooth-quick-connect Architecture: all Depends: - gnome-shell (<< 3.39), - gnome-shell (>= 3.37), + gnome-shell (<< 41~), + gnome-shell (>= 40~), ${misc:Depends}, Recommends: gnome-shell-extension-prefs, diff --git a/debian/patches/Update-ui.js.patch b/debian/patches/Update-ui.js.patch deleted file mode 100644 index 26f563d..0000000 --- a/debian/patches/Update-ui.js.patch +++ /dev/null @@ -1,47 +0,0 @@ -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 deleted file mode 100644 index aa2ff28..0000000 --- a/debian/patches/add-support-for-gnome-3.34.patch +++ /dev/null @@ -1,95 +0,0 @@ -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 deleted file mode 100644 index 124b729..0000000 --- a/debian/patches/fix-gnome-version-check.patch +++ /dev/null @@ -1,21 +0,0 @@ -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 deleted file mode 100644 index 47317b1..0000000 --- a/debian/patches/fix-installation-instruction.patch +++ /dev/null @@ -1,46 +0,0 @@ -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 deleted file mode 100644 index 3f988a4..0000000 --- a/debian/patches/series +++ /dev/null @@ -1,5 +0,0 @@ -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 deleted file mode 100644 index 6ce68f4..0000000 --- a/debian/patches/stop-supporting-older-gnome-versions.patch +++ /dev/null @@ -1,21 +0,0 @@ -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" - ] - } diff --git a/debian/rules b/debian/rules index 3c746ff..8cc332e 100755 --- a/debian/rules +++ b/debian/rules @@ -5,3 +5,6 @@ include /usr/share/dpkg/default.mk %: dh $@ + +override_dh_auto_install: + # Upstream's `make install` is not suitable for packaging diff --git a/debian/watch b/debian/watch index f64ea64..0382f1e 100644 --- a/debian/watch +++ b/debian/watch @@ -1,3 +1,3 @@ version=4 opts=filenamemangle=s/.+\/v?@ANY_VERSION@(@ARCHIVE_EXT@)/@PACKAGE@-$1$2/,dversionmangle=s/\+git[0-9.]+$// \ -https://github.com/bjarosze/gnome-bluetooth-quick-connect/tags .*/archive/v?@ANY_VERSION@@ARCHIVE_EXT@ +https://github.com/bjarosze/gnome-bluetooth-quick-connect/tags .*/archive/refs/tags/v?@ANY_VERSION@@ARCHIVE_EXT@ diff --git a/metadata.json b/metadata.json index 925b6c8..0d814bc 100644 --- a/metadata.json +++ b/metadata.json @@ -6,6 +6,9 @@ "settings-schema": "org.gnome.shell.extensions.bluetooth-quick-connect", "gettext-domain": "bluetooth-quick-connect", "shell-version": [ - "3.38" + "40.1", + "40.0", + "40.beta", + "40.rc" ] } @@ -21,33 +21,27 @@ class SettingsBuilder { build() { this._builder.add_from_file(Me.path + '/Settings.ui'); - this._settingsBox = this._builder.get_object('bluetooth_quick_connect_settings'); - - - this._viewport = new Gtk.Viewport(); - this._viewport.add(this._settingsBox); - this._widget = new Gtk.ScrolledWindow(); - this._widget.add(this._viewport); + this._widget = this._builder.get_object('items_container') this._builder.get_object('auto_power_off_settings_button').connect('clicked', () => { let dialog = new Gtk.Dialog({ title: 'Auto power off settings', - transient_for: this._widget.get_toplevel(), + transient_for: this._widget.get_ancestor(Gtk.Window), use_header_bar: true, modal: true }); let box = this._builder.get_object('auto_power_off_settings'); - dialog.get_content_area().add(box); + dialog.get_content_area().append(box); dialog.connect('response', (dialog) => { dialog.get_content_area().remove(box); dialog.destroy(); }); - dialog.show_all(); + dialog.show(); }); @@ -84,7 +78,6 @@ function init() { function buildPrefsWidget() { let settings = new SettingsBuilder(); let widget = settings.build(); - widget.show_all(); return widget; } diff --git a/settings.js b/settings.js index e7040df..e9c5afb 100644 --- a/settings.js +++ b/settings.js @@ -18,7 +18,7 @@ const ExtensionUtils = imports.misc.extensionUtils; const Gio = imports.gi.Gio; const GioSSS = Gio.SettingsSchemaSource; -class Settings { +var Settings = class Settings { constructor() { this.settings = this._loadSettings(); } @@ -59,6 +59,6 @@ class Settings { let schemaObj = schemaSource.lookup(schema, true); - return new Gio.Settings({settings_schema: schemaObj}); + return new Gio.Settings({ settings_schema: schemaObj }); } -}
\ No newline at end of file +};
\ No newline at end of file @@ -24,7 +24,8 @@ const Config = imports.misc.config; var PopupBluetoothDeviceMenuItem = GObject.registerClass( class PopupSwitchWithButtonMenuItem extends PopupMenu.PopupSwitchMenuItem { _init(device, params) { - super._init(device.name, device.isConnected, {}); + let label = device.name || '(unknown)'; + super._init(label, device.isConnected, {}); this._device = device; this._showRefreshButton = params.showRefreshButton; @@ -34,7 +34,7 @@ function isDebugModeEnabled() { return new Settings().isDebugModeEnabled(); } -class Logger { +var Logger = class Logger { constructor(settings) { this._enabled = settings.isDebugModeEnabled(); } @@ -42,9 +42,9 @@ class Logger { info(message) { if (!this._enabled) return; - global.log(`[bluetooth-quick-connect] ${message}`); + log(`[bluetooth-quick-connect] ${message}`); } -} +}; function addSignalsHelperMethods(prototype) { prototype._connectSignal = function (subject, signal_name, method) { |