diff options
author | Simon McVittie <smcv@debian.org> | 2023-08-03 18:40:32 +0100 |
---|---|---|
committer | Simon McVittie <smcv@debian.org> | 2023-08-03 18:40:32 +0100 |
commit | b7e94e927558721abda34b21e8c5bfafafbeaa8c (patch) | |
tree | 24c5681328322d952c017afe43fb5c64fbb6f923 | |
parent | 0829f37c57a67a9448b96b42e94cf3a4a7001ad3 (diff) | |
parent | bc6af508324012473069d600226c613d34f2a339 (diff) |
New upstream version 36
-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 |
5 files changed, 148 insertions, 63 deletions
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'); - } -}); - |