diff options
-rw-r--r-- | debian/changelog | 16 | ||||
-rw-r--r-- | debian/clean | 1 | ||||
-rw-r--r-- | debian/control | 8 | ||||
-rw-r--r-- | extension.js | 26 | ||||
-rw-r--r-- | metadata.json | 5 | ||||
-rw-r--r-- | po/cs.po | 67 | ||||
-rw-r--r-- | po/el.po | 67 | ||||
-rw-r--r-- | quickSettings.js | 46 |
8 files changed, 169 insertions, 67 deletions
diff --git a/debian/changelog b/debian/changelog index b3dc912..0fb7df9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,19 @@ +gnome-shell-extension-bluetooth-quick-connect (36-2) unstable; urgency=medium + + * d/clean: Fix FTBFS-twice-in-a-row by deleting build result + (Closes: #1044877) + * Upload to unstable (part of transition: #1043144) + + -- Simon McVittie <smcv@debian.org> Sun, 20 Aug 2023 23:06:19 +0100 + +gnome-shell-extension-bluetooth-quick-connect (36-1) experimental; urgency=medium + + * New upstream release + * d/control: gnome-shell 44 is required for this version + (Closes: #1041566) + + -- Simon McVittie <smcv@debian.org> Thu, 03 Aug 2023 18:42:54 +0100 + gnome-shell-extension-bluetooth-quick-connect (33-1) unstable; urgency=medium * New upstream release diff --git a/debian/clean b/debian/clean new file mode 100644 index 0000000..c4c4ffc --- /dev/null +++ b/debian/clean @@ -0,0 +1 @@ +*.zip diff --git a/debian/control b/debian/control index d334e88..bc06615 100644 --- a/debian/control +++ b/debian/control @@ -6,8 +6,8 @@ Uploaders: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.o Build-Depends: debhelper-compat (= 13), gettext, - gnome-shell (>= 42~), - gnome-shell (<< 44~), + gnome-shell (>= 44~), + gnome-shell (<< 45~), libglib2.0-bin, unzip, Standards-Version: 4.6.2 @@ -20,8 +20,8 @@ Package: gnome-shell-extension-bluetooth-quick-connect Architecture: all Depends: bluez, - gnome-shell (<< 44~), - gnome-shell (>= 42~), + gnome-shell (<< 45~), + gnome-shell (>= 44~), ${misc:Depends}, Recommends: gnome-shell-extension-prefs, diff --git a/extension.js b/extension.js index a459daa..7935288 100644 --- a/extension.js +++ b/extension.js @@ -32,6 +32,8 @@ const Utils = Me.imports.utils; const Settings = Me.imports.settings.Settings; const BatteryProvider = Me.imports.power.UPowerBatteryProvider; +const PopupMenu = imports.ui.popupMenu; + class BluetoothQuickConnect { constructor(quickSettings, bluetooth, settings) { @@ -39,15 +41,17 @@ class BluetoothQuickConnect { this._logger.info('Initializing extension'); if (quickSettings) { let btIndicator = quickSettings._bluetooth; - let oldItem = btIndicator.quickSettingsItems[0]; - let newItem = new Me.imports.quickSettings.BluetoothToggleMenu(oldItem); - - btIndicator.quickSettingsItems = [newItem]; - quickSettings.menu.addItem(newItem); - quickSettings.menu._grid.set_child_below_sibling(newItem, oldItem); - quickSettings.menu._grid.remove_child(oldItem); - this._proxy = oldItem._client._proxy; - this._menu = newItem.itemsSection; + let bluetoothToggle = btIndicator.quickSettingsItems[0]; + bluetoothToggle._updateDeviceVisibility = () => { + bluetoothToggle._deviceSection.actor.visible = false; + bluetoothToggle._placeholderItem.actor.visible = false; + } + bluetoothToggle._updateDeviceVisibility(); + + this._proxy = bluetoothToggle._client._proxy; + this._menu = new PopupMenu.PopupMenuSection(); + + bluetoothToggle.menu.addMenuItem(this._menu, 0); } else { this._menu = bluetooth._item.menu; this._proxy = bluetooth._proxy; @@ -128,10 +132,6 @@ class BluetoothQuickConnect { this._logger.info(`Device deleted event`); this._refresh(); }); - - this._connectSignal(Main.sessionMode, 'updated', () => { - this._refresh(); - }); } _syncMenuItem(device) { diff --git a/metadata.json b/metadata.json index 7ccace1..70b3688 100644 --- a/metadata.json +++ b/metadata.json @@ -6,9 +6,6 @@ "settings-schema": "org.gnome.shell.extensions.bluetooth-quick-connect", "gettext-domain": "bluetooth-quick-connect", "shell-version": [ - "40", - "41", - "42", - "43" + "44" ] } diff --git a/po/cs.po b/po/cs.po new file mode 100644 index 0000000..e537edf --- /dev/null +++ b/po/cs.po @@ -0,0 +1,67 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR Amerey.eu <info@amerey.eu>, 2023. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-01-26 17:28+0100\n" +"PO-Revision-Date: 2023-02-28 14:39+0100\n" +"Last-Translator: Amerey.eu <info@amerey.eu>\n" +"Language-Team: \n" +"Language: cs\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n>=2 && n<=4 ? 1 : 2);\n" +"X-Generator: Poedit 3.1.1\n" + +#: extension.js:97 +msgid "Bluetooth Quick Connect" +msgstr "Rychlé připojení Bluetooth" + +#: extension.js:97 +msgid "Error trying to execute \"bluetoothctl\"" +msgstr "Chyba při pokusu o spuštění \"bluetoothctl\"" + +#: quickSettings.js:43 +msgid "Bluetooth Settings" +msgstr "Nastavení Bluetooth" + +#: ui.js:197 +msgid "Wait" +msgstr "Počkejte" + +#: Settings.ui:51 +msgid "Checking idle interval (seconds)" +msgstr "Kontrola intervalu nečinnosti (v sekundách)" + +#: Settings.ui:140 +msgid "Enable bluetooth when menu opened" +msgstr "Při otevření nabídky povolit bluetooth" + +#: Settings.ui:172 +msgid "Disable bluetooth if idle" +msgstr "Při nečinnosti deaktivovat bluetooth" + +#: Settings.ui:255 +msgid "Keep the menu open after toggling the connection (restart required)" +msgstr "Po přepnutí připojení nechte nabídku otevřenou (vyžaduje restart)" + +#: Settings.ui:298 +msgid "Show reconnect button (restart required)" +msgstr "Zobrazit tlačítko pro opětovné připojení (vyžaduje restart)" + +#: Settings.ui:341 +msgid "Debug mode (restart required)" +msgstr "Režim ladění (vyžaduje restart)" + +#: Settings.ui:384 +msgid "Show battery value (restart required)" +msgstr "Zobrazit hodnotu baterie (vyžaduje restart)" + +#: Settings.ui:427 +msgid "Show battery icon (restart required)" +msgstr "Zobrazit ikonu baterie (vyžaduje restart)" diff --git a/po/el.po b/po/el.po new file mode 100644 index 0000000..b0d3586 --- /dev/null +++ b/po/el.po @@ -0,0 +1,67 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-01-26 17:28+0100\n" +"PO-Revision-Date: 2023-03-23 15:46+0200\n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: el\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 3.1.1\n" + +#: extension.js:97 +msgid "Bluetooth Quick Connect" +msgstr "Γρήγορη σύνδεση Bluetooth" + +#: extension.js:97 +msgid "Error trying to execute \"bluetoothctl\"" +msgstr "Σφάλμα κατά την προσπάθεια εκτέλεσης του \"bluetoothctl\"" + +#: quickSettings.js:43 +msgid "Bluetooth Settings" +msgstr "Ρυθμίσεις Bluetooth" + +#: ui.js:197 +msgid "Wait" +msgstr "Αναμονή" + +#: Settings.ui:51 +msgid "Checking idle interval (seconds)" +msgstr "Έλεγχος διαστήματος αδράνειας (δευτερόλεπτα)" + +#: Settings.ui:140 +msgid "Enable bluetooth when menu opened" +msgstr "Ενεργοποίηση bluetooth όταν ανοίγει το μενού" + +#: Settings.ui:172 +msgid "Disable bluetooth if idle" +msgstr "Απενεργοποίηση του bluetooth σε αδράνεια" + +#: Settings.ui:255 +msgid "Keep the menu open after toggling the connection (restart required)" +msgstr "Διατηρήστε το μενού ανοιχτό μετά την εναλλαγή της σύνδεσης (απαιτείται επανεκκίνηση)" + +#: Settings.ui:298 +msgid "Show reconnect button (restart required)" +msgstr "Εμφάνιση κουμπιού επανασύνδεσης (απαιτείται επανεκκίνηση)" + +#: Settings.ui:341 +msgid "Debug mode (restart required)" +msgstr "Λειτουργία εντοπισμού σφαλμάτων (απαιτείται επανεκκίνηση)" + +#: Settings.ui:384 +msgid "Show battery value (restart required)" +msgstr "Εμφάνιση τιμής μπαταρίας (απαιτείται επανεκκίνηση)" + +#: Settings.ui:427 +msgid "Show battery icon (restart required)" +msgstr "Εμφάνιση εικονιδίου μπαταρίας (απαιτείται επανεκκίνηση)" diff --git a/quickSettings.js b/quickSettings.js deleted file mode 100644 index 8f0dc9f..0000000 --- a/quickSettings.js +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2010-2022 GNOME Shell contributors -// Copyright 2022 Simon McVittie -// SPDX-License-Identifier: GPL-2.0-or-later -// -// Adapted from gnome-shell js/ui/status/bluetooth.js - -/* exported BluetoothToggleMenu */ - - -const ExtensionUtils = imports.misc.extensionUtils; -const Me = ExtensionUtils.getCurrentExtension(); - -const Gettext = imports.gettext.domain(Me.metadata['gettext-domain']); -const _ = Gettext.gettext; - -const PopupMenu = imports.ui.popupMenu; - -const {GObject} = imports.gi; -const {QuickMenuToggle} = imports.ui.quickSettings; - -var BluetoothToggleMenu = GObject.registerClass( -class BluetoothToggleMenu extends QuickMenuToggle { - _init(originalBluetoothToggle) { - super._init({label: originalBluetoothToggle.label}); - - this._original = originalBluetoothToggle; - this._client = this._original._client; - - this._original.bind_property('visible', this, 'visible', - GObject.BindingFlags.SYNC_CREATE); - this._original.bind_property('checked', this, 'checked', - GObject.BindingFlags.SYNC_CREATE); - this._original.bind_property('icon-name', this, 'icon-name', - GObject.BindingFlags.SYNC_CREATE); - - this.connect('clicked', () => this._client.toggleActive()); - - this.menu.setHeader('bluetooth-active-symbolic', originalBluetoothToggle.label); - - this.itemsSection = new PopupMenu.PopupMenuSection(); - this.menu.addMenuItem(this.itemsSection); - this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); - this.menu.addSettingsAction(_("Bluetooth Settings"), 'gnome-bluetooth-panel.desktop'); - } -}); - |